From b27aa0681f3b72657479dc56763fb060ec55c702 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 7 May 2024 04:30:38 +0000
Subject: [PATCH] feat(api): update via SDK Studio (#483)
---
api.md | 6 +++-
src/index.ts | 1 +
.../dns/analytics/reports/bytimes.ts | 13 ++------
src/resources/dns/dns.ts | 13 ++------
.../dns/firewall/analytics/analytics.ts | 32 +++++++++++++++++++
src/resources/dns/firewall/analytics/index.ts | 2 +-
.../dns/firewall/analytics/reports/bytimes.ts | 13 ++------
src/resources/dns/firewall/firewall.ts | 1 +
src/resources/dns/firewall/index.ts | 2 +-
src/resources/origin-ca-certificates.ts | 5 +--
src/resources/shared.ts | 12 +++++++
.../certificate-packs/certificate-packs.ts | 13 --------
src/resources/ssl/certificate-packs/index.ts | 1 -
src/resources/ssl/index.ts | 1 -
src/resources/ssl/ssl.ts | 1 -
15 files changed, 62 insertions(+), 54 deletions(-)
diff --git a/api.md b/api.md
index d464314f23..ec120825e2 100644
--- a/api.md
+++ b/api.md
@@ -4,6 +4,7 @@ Types:
- ASN
- AuditLog
+- CertificatePackRequestType
- CloudflareTunnel
- ErrorData
- Identifier
@@ -1096,7 +1097,6 @@ Types:
- CertificateAuthority
- Host
-- RequestType
- RequestValidity
- Status
- ValidationMethod
@@ -1455,6 +1455,10 @@ Methods:
### Analytics
+Types:
+
+- Delta
+
#### Reports
Methods:
diff --git a/src/index.ts b/src/index.ts
index b5b07e3998..0f876fb6e5 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -556,6 +556,7 @@ export namespace Cloudflare {
export import ASN = API.ASN;
export import AuditLog = API.AuditLog;
+ export import CertificatePackRequestType = API.CertificatePackRequestType;
export import CloudflareTunnel = API.CloudflareTunnel;
export import ErrorData = API.ErrorData;
export import Identifier = API.Identifier;
diff --git a/src/resources/dns/analytics/reports/bytimes.ts b/src/resources/dns/analytics/reports/bytimes.ts
index ee9d0621ea..76c5496060 100644
--- a/src/resources/dns/analytics/reports/bytimes.ts
+++ b/src/resources/dns/analytics/reports/bytimes.ts
@@ -4,6 +4,7 @@ import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as BytimesAPI from 'cloudflare/resources/dns/analytics/reports/bytimes';
import * as DNSAPI from 'cloudflare/resources/dns/dns';
+import * as AnalyticsAPI from 'cloudflare/resources/dns/firewall/analytics/analytics';
export class Bytimes extends APIResource {
/**
@@ -124,17 +125,7 @@ export interface BytimeGetParams {
/**
* Query param: Unit of time to group data by.
*/
- time_delta?:
- | 'all'
- | 'auto'
- | 'year'
- | 'quarter'
- | 'month'
- | 'week'
- | 'day'
- | 'hour'
- | 'dekaminute'
- | 'minute';
+ time_delta?: AnalyticsAPI.DeltaParam;
/**
* Query param: End date and time of requesting data period in ISO 8601 format.
diff --git a/src/resources/dns/dns.ts b/src/resources/dns/dns.ts
index 27cef4fa29..b3bc30eac0 100644
--- a/src/resources/dns/dns.ts
+++ b/src/resources/dns/dns.ts
@@ -4,6 +4,7 @@ import { APIResource } from 'cloudflare/resource';
import * as RecordsAPI from 'cloudflare/resources/dns/records';
import * as AnalyticsAPI from 'cloudflare/resources/dns/analytics/analytics';
import * as FirewallAPI from 'cloudflare/resources/dns/firewall/firewall';
+import * as AnalyticsAnalyticsAPI from 'cloudflare/resources/dns/firewall/analytics/analytics';
export class DNS extends APIResource {
records: RecordsAPI.Records = new RecordsAPI.Records(this._client);
@@ -40,17 +41,7 @@ export interface DNSAnalyticsQuery {
/**
* Unit of time to group data by.
*/
- time_delta:
- | 'all'
- | 'auto'
- | 'year'
- | 'quarter'
- | 'month'
- | 'week'
- | 'day'
- | 'hour'
- | 'dekaminute'
- | 'minute';
+ time_delta: AnalyticsAnalyticsAPI.Delta;
/**
* End date and time of requesting data period in ISO 8601 format.
diff --git a/src/resources/dns/firewall/analytics/analytics.ts b/src/resources/dns/firewall/analytics/analytics.ts
index edcf3e2472..03a9bb452c 100644
--- a/src/resources/dns/firewall/analytics/analytics.ts
+++ b/src/resources/dns/firewall/analytics/analytics.ts
@@ -1,13 +1,45 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflare/resource';
+import * as AnalyticsAPI from 'cloudflare/resources/dns/firewall/analytics/analytics';
import * as ReportsAPI from 'cloudflare/resources/dns/firewall/analytics/reports/reports';
export class Analytics extends APIResource {
reports: ReportsAPI.Reports = new ReportsAPI.Reports(this._client);
}
+/**
+ * Unit of time to group data by.
+ */
+export type Delta =
+ | 'all'
+ | 'auto'
+ | 'year'
+ | 'quarter'
+ | 'month'
+ | 'week'
+ | 'day'
+ | 'hour'
+ | 'dekaminute'
+ | 'minute';
+
+/**
+ * Unit of time to group data by.
+ */
+export type DeltaParam =
+ | 'all'
+ | 'auto'
+ | 'year'
+ | 'quarter'
+ | 'month'
+ | 'week'
+ | 'day'
+ | 'hour'
+ | 'dekaminute'
+ | 'minute';
+
export namespace Analytics {
+ export import Delta = AnalyticsAPI.Delta;
export import Reports = ReportsAPI.Reports;
export import ReportGetParams = ReportsAPI.ReportGetParams;
}
diff --git a/src/resources/dns/firewall/analytics/index.ts b/src/resources/dns/firewall/analytics/index.ts
index a0e1639cfa..e841178c20 100644
--- a/src/resources/dns/firewall/analytics/index.ts
+++ b/src/resources/dns/firewall/analytics/index.ts
@@ -1,4 +1,4 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-export { Analytics } from './analytics';
+export { Delta, Analytics } from './analytics';
export { ReportGetParams, Reports } from './reports/index';
diff --git a/src/resources/dns/firewall/analytics/reports/bytimes.ts b/src/resources/dns/firewall/analytics/reports/bytimes.ts
index 8e4fefe3bf..213c62e0f4 100644
--- a/src/resources/dns/firewall/analytics/reports/bytimes.ts
+++ b/src/resources/dns/firewall/analytics/reports/bytimes.ts
@@ -4,6 +4,7 @@ import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as ReportsBytimesAPI from 'cloudflare/resources/dns/firewall/analytics/reports/bytimes';
import * as BytimesAPI from 'cloudflare/resources/dns/analytics/reports/bytimes';
+import * as AnalyticsAPI from 'cloudflare/resources/dns/firewall/analytics/analytics';
export class Bytimes extends APIResource {
/**
@@ -68,17 +69,7 @@ export interface BytimeGetParams {
/**
* Query param: Unit of time to group data by.
*/
- time_delta?:
- | 'all'
- | 'auto'
- | 'year'
- | 'quarter'
- | 'month'
- | 'week'
- | 'day'
- | 'hour'
- | 'dekaminute'
- | 'minute';
+ time_delta?: AnalyticsAPI.DeltaParam;
/**
* Query param: End date and time of requesting data period in ISO 8601 format.
diff --git a/src/resources/dns/firewall/firewall.ts b/src/resources/dns/firewall/firewall.ts
index 81e0b187dd..7a12f87390 100644
--- a/src/resources/dns/firewall/firewall.ts
+++ b/src/resources/dns/firewall/firewall.ts
@@ -369,4 +369,5 @@ export namespace FirewallResource {
export import FirewallEditParams = FirewallAPI.FirewallEditParams;
export import FirewallGetParams = FirewallAPI.FirewallGetParams;
export import Analytics = AnalyticsAPI.Analytics;
+ export import Delta = AnalyticsAPI.Delta;
}
diff --git a/src/resources/dns/firewall/index.ts b/src/resources/dns/firewall/index.ts
index ef21f540ee..fe9a3e3998 100644
--- a/src/resources/dns/firewall/index.ts
+++ b/src/resources/dns/firewall/index.ts
@@ -1,6 +1,5 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-export { Analytics } from './analytics/index';
export {
AttackMitigation,
Firewall,
@@ -15,3 +14,4 @@ export {
FirewallsV4PagePaginationArray,
FirewallResource,
} from './firewall';
+export { Delta, Analytics } from './analytics/index';
diff --git a/src/resources/origin-ca-certificates.ts b/src/resources/origin-ca-certificates.ts
index 826dd379e9..cc34526d88 100644
--- a/src/resources/origin-ca-certificates.ts
+++ b/src/resources/origin-ca-certificates.ts
@@ -3,6 +3,7 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
+import * as Shared from 'cloudflare/resources/shared';
import * as CertificatePacksAPI from 'cloudflare/resources/ssl/certificate-packs/certificate-packs';
import { SinglePage } from 'cloudflare/pagination';
@@ -90,7 +91,7 @@ export interface OriginCACertificate {
* Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),
* or "keyless-certificate" (for Keyless SSL servers).
*/
- request_type: CertificatePacksAPI.RequestType;
+ request_type: Shared.CertificatePackRequestType;
/**
* The number of days for which the certificate should be valid.
@@ -140,7 +141,7 @@ export interface OriginCACertificateCreateParams {
* Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),
* or "keyless-certificate" (for Keyless SSL servers).
*/
- request_type?: CertificatePacksAPI.RequestTypeParam;
+ request_type?: Shared.CertificatePackRequestTypeParam;
/**
* The number of days for which the certificate should be valid.
diff --git a/src/resources/shared.ts b/src/resources/shared.ts
index 3ae80f7e02..cb21fb85c8 100644
--- a/src/resources/shared.ts
+++ b/src/resources/shared.ts
@@ -104,6 +104,18 @@ export namespace AuditLog {
}
}
+/**
+ * Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),
+ * or "keyless-certificate" (for Keyless SSL servers).
+ */
+export type CertificatePackRequestType = 'origin-rsa' | 'origin-ecc' | 'keyless-certificate';
+
+/**
+ * Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),
+ * or "keyless-certificate" (for Keyless SSL servers).
+ */
+export type CertificatePackRequestTypeParam = 'origin-rsa' | 'origin-ecc' | 'keyless-certificate';
+
/**
* A Cloudflare Tunnel that connects your origin to Cloudflare's edge.
*/
diff --git a/src/resources/ssl/certificate-packs/certificate-packs.ts b/src/resources/ssl/certificate-packs/certificate-packs.ts
index 6cebab4b50..6f040a4a57 100644
--- a/src/resources/ssl/certificate-packs/certificate-packs.ts
+++ b/src/resources/ssl/certificate-packs/certificate-packs.ts
@@ -96,18 +96,6 @@ export type Host = string;
export type HostParam = string;
-/**
- * Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),
- * or "keyless-certificate" (for Keyless SSL servers).
- */
-export type RequestType = 'origin-rsa' | 'origin-ecc' | 'keyless-certificate';
-
-/**
- * Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),
- * or "keyless-certificate" (for Keyless SSL servers).
- */
-export type RequestTypeParam = 'origin-rsa' | 'origin-ecc' | 'keyless-certificate';
-
/**
* The number of days for which the certificate should be valid.
*/
@@ -247,7 +235,6 @@ export interface CertificatePackGetParams {
export namespace CertificatePacks {
export import CertificateAuthority = CertificatePacksAPI.CertificateAuthority;
export import Host = CertificatePacksAPI.Host;
- export import RequestType = CertificatePacksAPI.RequestType;
export import RequestValidity = CertificatePacksAPI.RequestValidity;
export import Status = CertificatePacksAPI.Status;
export import ValidationMethod = CertificatePacksAPI.ValidationMethod;
diff --git a/src/resources/ssl/certificate-packs/index.ts b/src/resources/ssl/certificate-packs/index.ts
index 1036f7f550..34527d480e 100644
--- a/src/resources/ssl/certificate-packs/index.ts
+++ b/src/resources/ssl/certificate-packs/index.ts
@@ -3,7 +3,6 @@
export {
CertificateAuthority,
Host,
- RequestType,
RequestValidity,
Status,
ValidationMethod,
diff --git a/src/resources/ssl/index.ts b/src/resources/ssl/index.ts
index 102ab4903b..0b56630bc2 100644
--- a/src/resources/ssl/index.ts
+++ b/src/resources/ssl/index.ts
@@ -4,7 +4,6 @@ export { AnalyzeCreateResponse, AnalyzeCreateParams, Analyze } from './analyze';
export {
CertificateAuthority,
Host,
- RequestType,
RequestValidity,
Status,
ValidationMethod,
diff --git a/src/resources/ssl/ssl.ts b/src/resources/ssl/ssl.ts
index e833626108..6109c661d1 100644
--- a/src/resources/ssl/ssl.ts
+++ b/src/resources/ssl/ssl.ts
@@ -24,7 +24,6 @@ export namespace SSL {
export import CertificatePacks = CertificatePacksAPI.CertificatePacks;
export import CertificateAuthority = CertificatePacksAPI.CertificateAuthority;
export import Host = CertificatePacksAPI.Host;
- export import RequestType = CertificatePacksAPI.RequestType;
export import RequestValidity = CertificatePacksAPI.RequestValidity;
export import Status = CertificatePacksAPI.Status;
export import ValidationMethod = CertificatePacksAPI.ValidationMethod;