From 63bfebde178dcc6e1296f961a9e2ec1dfc98365a Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 16 Feb 2024 04:15:07 +0000
Subject: [PATCH] feat: update via SDK Studio (#3)
---
api.md | 74 +++++++--------
src/index.ts | 20 ++---
src/resources/access/users/failed-logins.ts | 15 ++--
src/resources/access/users/index.ts | 2 +-
src/resources/access/users/users.ts | 2 +-
src/resources/acms/acms.ts | 4 +-
src/resources/acms/index.ts | 2 +-
src/resources/acms/total-tls.ts | 16 ++--
src/resources/certificates.ts | 81 ++++++++---------
src/resources/custom-ns/custom-ns.ts | 2 +-
src/resources/custom-ns/index.ts | 2 +-
src/resources/custom-ns/verifies.ts | 16 ++--
src/resources/index.ts | 20 ++---
src/resources/logpush/edges.ts | 16 ++--
src/resources/logpush/index.ts | 2 +-
src/resources/logpush/logpush.ts | 4 +-
src/resources/mtls-certificates/index.ts | 4 +-
.../mtls-certificates/mtls-certificates.ts | 16 ++--
src/resources/ssls/analyzes.ts | 16 ++--
.../certificate-packs/certificate-packs.ts | 67 +++++++-------
src/resources/ssls/certificate-packs/index.ts | 12 +--
.../ssls/certificate-packs/orders.ts | 18 ++--
.../ssls/certificate-packs/quotas.ts | 15 ++--
src/resources/ssls/index.ts | 10 +--
src/resources/ssls/ssls.ts | 8 +-
src/resources/stream/index.ts | 4 +-
src/resources/stream/stream.ts | 26 +++---
src/resources/subscriptions.ts | 89 +++++++++----------
src/resources/teamnets/routes/index.ts | 4 +-
src/resources/teamnets/routes/networks.ts | 16 ++--
src/resources/teamnets/routes/routes.ts | 4 +-
src/resources/zones/{hold.ts => holds.ts} | 16 ++--
src/resources/zones/index.ts | 4 +-
src/resources/zones/zones.ts | 16 ++--
.../access/users/failed-logins.test.ts | 8 +-
tests/api-resources/acms/total-tls.test.ts | 8 +-
tests/api-resources/certificates.test.ts | 28 +++---
.../api-resources/custom-ns/verifies.test.ts | 4 +-
tests/api-resources/logpush/edges.test.ts | 4 +-
.../mtls-certificates.test.ts | 8 +-
tests/api-resources/ssls/analyzes.test.ts | 7 +-
.../certificate-packs.test.ts | 49 +++++-----
.../ssls/certificate-packs/orders.test.ts | 48 +++++-----
.../ssls/certificate-packs/quotas.test.ts | 15 ++--
tests/api-resources/stream/stream.test.ts | 4 +-
tests/api-resources/subscriptions.test.ts | 51 +++++------
.../teamnets/routes/networks.test.ts | 4 +-
.../zones/{hold.test.ts => holds.test.ts} | 20 +++--
48 files changed, 421 insertions(+), 460 deletions(-)
rename src/resources/zones/{hold.ts => holds.ts} (88%)
rename tests/api-resources/zones/{hold.test.ts => holds.test.ts} (85%)
diff --git a/api.md b/api.md
index 670ee42740..59316fb50b 100644
--- a/api.md
+++ b/api.md
@@ -16,17 +16,17 @@ Methods:
Types:
+- CertificateCreateResponse
+- CertificateListResponse
- CertificateDeleteResponse
- CertificateGetResponse
-- CertificateOriginCaCreateCertificateResponse
-- CertificateOriginCaListCertificatesResponse
Methods:
+- client.certificates.create({ ...params }) -> CertificateCreateResponse
+- client.certificates.list() -> CertificateListResponse | null
- client.certificates.delete(certificateId) -> CertificateDeleteResponse
- client.certificates.get(certificateId) -> CertificateGetResponse
-- client.certificates.originCaCreateCertificate({ ...params }) -> CertificateOriginCaCreateCertificateResponse
-- client.certificates.originCaListCertificates() -> CertificateOriginCaListCertificatesResponse | null
# IPs
@@ -338,19 +338,19 @@ Methods:
- client.zones.delete(zoneId) -> ZoneDeleteResponse | null
- client.zones.get(zoneId) -> ZoneGetResponse
-## Hold
+## Holds
Types:
-- HoldEnforceResponse
-- HoldGetResponse
-- HoldRemoveResponse
+- HoldEnforceResponse
+- HoldGetResponse
+- HoldRemoveResponse
Methods:
-- client.zones.hold.enforce(zoneId, { ...params }) -> HoldEnforceResponse
-- client.zones.hold.get(zoneId) -> HoldGetResponse
-- client.zones.hold.remove(zoneId, { ...params }) -> HoldRemoveResponse
+- client.zones.holds.enforce(zoneId, { ...params }) -> HoldEnforceResponse
+- client.zones.holds.get(zoneId) -> HoldGetResponse
+- client.zones.holds.remove(zoneId, { ...params }) -> HoldRemoveResponse
# AI
@@ -788,11 +788,11 @@ Methods:
Types:
-- FailedLoginZeroTrustUsersGetFailedLoginsResponse
+- FailedLoginGetResponse
Methods:
-- client.access.users.failedLogins.zeroTrustUsersGetFailedLogins(identifier, id) -> FailedLoginZeroTrustUsersGetFailedLoginsResponse | null
+- client.access.users.failedLogins.get(identifier, id) -> FailedLoginGetResponse | null
## CustomPages
@@ -860,47 +860,47 @@ Methods:
Types:
-- AnalyzeAnalyzeCertificateAnalyzeCertificateResponse
+- AnalyzeCreateResponse
Methods:
-- client.ssls.analyzes.analyzeCertificateAnalyzeCertificate(zoneId, { ...params }) -> AnalyzeAnalyzeCertificateAnalyzeCertificateResponse
+- client.ssls.analyzes.create(zoneId, { ...params }) -> AnalyzeCreateResponse
## CertificatePacks
Types:
- CertificatePackUpdateResponse
+- CertificatePackListResponse
- CertificatePackDeleteResponse
-- CertificatePackCertificatePacksListCertificatePacksResponse
- CertificatePackGetResponse
Methods:
- client.ssls.certificatePacks.update(zoneId, certificatePackId) -> CertificatePackUpdateResponse
+- client.ssls.certificatePacks.list(zoneId, { ...params }) -> CertificatePackListResponse | null
- client.ssls.certificatePacks.delete(zoneId, certificatePackId) -> CertificatePackDeleteResponse
-- client.ssls.certificatePacks.certificatePacksListCertificatePacks(zoneId, { ...params }) -> CertificatePackCertificatePacksListCertificatePacksResponse | null
- client.ssls.certificatePacks.get(zoneId, certificatePackId) -> CertificatePackGetResponse
### Orders
Types:
-- OrderCertificatePacksOrderAdvancedCertificateManagerCertificatePackResponse
+- OrderCreateResponse
Methods:
-- client.ssls.certificatePacks.orders.certificatePacksOrderAdvancedCertificateManagerCertificatePack(zoneId, { ...params }) -> OrderCertificatePacksOrderAdvancedCertificateManagerCertificatePackResponse
+- client.ssls.certificatePacks.orders.create(zoneId, { ...params }) -> OrderCreateResponse
### Quotas
Types:
-- QuotaCertificatePacksGetCertificatePackQuotasResponse
+- QuotaGetResponse
Methods:
-- client.ssls.certificatePacks.quotas.certificatePacksGetCertificatePackQuotas(zoneId) -> QuotaCertificatePacksGetCertificatePackQuotasResponse
+- client.ssls.certificatePacks.quotas.get(zoneId) -> QuotaGetResponse
## Recommendations
@@ -942,23 +942,23 @@ Methods:
Types:
+- SubscriptionCreateResponse
- SubscriptionUpdateResponse
- SubscriptionDeleteResponse
- SubscriptionAccountSubscriptionsCreateSubscriptionResponse
- SubscriptionAccountSubscriptionsListSubscriptionsResponse
-- SubscriptionZoneSubscriptionCreateZoneSubscriptionResponse
+- SubscriptionGetResponse
- SubscriptionZoneSubscriptionUpdateZoneSubscriptionResponse
-- SubscriptionZoneSubscriptionZoneSubscriptionDetailsResponse
Methods:
+- client.subscriptions.create(identifier, { ...params }) -> SubscriptionCreateResponse
- client.subscriptions.update(accountIdentifier, subscriptionIdentifier, { ...params }) -> SubscriptionUpdateResponse
- client.subscriptions.delete(accountIdentifier, subscriptionIdentifier) -> SubscriptionDeleteResponse
- client.subscriptions.accountSubscriptionsCreateSubscription(accountIdentifier, { ...params }) -> SubscriptionAccountSubscriptionsCreateSubscriptionResponse
- client.subscriptions.accountSubscriptionsListSubscriptions(accountIdentifier) -> SubscriptionAccountSubscriptionsListSubscriptionsResponse | null
-- client.subscriptions.zoneSubscriptionCreateZoneSubscription(identifier, { ...params }) -> SubscriptionZoneSubscriptionCreateZoneSubscriptionResponse
+- client.subscriptions.get(identifier) -> SubscriptionGetResponse
- client.subscriptions.zoneSubscriptionUpdateZoneSubscription(identifier, { ...params }) -> SubscriptionZoneSubscriptionUpdateZoneSubscriptionResponse
-- client.subscriptions.zoneSubscriptionZoneSubscriptionDetails(identifier) -> SubscriptionZoneSubscriptionZoneSubscriptionDetailsResponse
# Acms
@@ -966,12 +966,12 @@ Methods:
Types:
-- TotalTLSUpdateResponse
+- TotalTLSCreateResponse
- TotalTLSGetResponse
Methods:
-- client.acms.totalTLS.update(zoneId, { ...params }) -> TotalTLSUpdateResponse
+- client.acms.totalTLS.create(zoneId, { ...params }) -> TotalTLSCreateResponse
- client.acms.totalTLS.get(zoneId) -> TotalTLSGetResponse
# Analytics
@@ -1226,11 +1226,11 @@ Methods:
Types:
-- VerifyUpdateResponse
+- VerifyCreateResponse
Methods:
-- client.customNs.verifies.update(accountId) -> VerifyUpdateResponse | null
+- client.customNs.verifies.create(accountId) -> VerifyCreateResponse | null
# DNSRecords
@@ -1592,12 +1592,12 @@ Methods:
Types:
-- EdgeUpdateResponse
+- EdgeCreateResponse
- EdgeGetResponse
Methods:
-- client.logpush.edges.update(zoneId, { ...params }) -> EdgeUpdateResponse | null
+- client.logpush.edges.create(zoneId, { ...params }) -> EdgeCreateResponse | null
- client.logpush.edges.get(zoneId) -> EdgeGetResponse
## Jobs
@@ -3886,14 +3886,14 @@ Methods:
Types:
-- MtlsCertificateUpdateResponse
+- MtlsCertificateCreateResponse
- MtlsCertificateListResponse
- MtlsCertificateDeleteResponse
- MtlsCertificateGetResponse
Methods:
-- client.mtlsCertificates.update(accountId, { ...params }) -> MtlsCertificateUpdateResponse
+- client.mtlsCertificates.create(accountId, { ...params }) -> MtlsCertificateCreateResponse
- client.mtlsCertificates.list(accountId) -> MtlsCertificateListResponse | null
- client.mtlsCertificates.delete(accountId, mtlsCertificateId) -> MtlsCertificateDeleteResponse
- client.mtlsCertificates.get(accountId, mtlsCertificateId) -> MtlsCertificateGetResponse
@@ -4210,13 +4210,13 @@ Methods:
Types:
-- StreamUpdateResponse
+- StreamCreateResponse
- StreamGetResponse
- StreamStreamVideosListVideosResponse
Methods:
-- client.stream.update(accountId, identifier, { ...params }) -> StreamUpdateResponse
+- client.stream.create(accountId, identifier, { ...params }) -> StreamCreateResponse
- client.stream.delete(accountId, identifier) -> void
- client.stream.get(accountId, identifier) -> StreamGetResponse
- client.stream.streamVideosInitiateVideoUploadsUsingTus(accountId, { ...params }) -> void
@@ -4428,12 +4428,12 @@ Methods:
Types:
-- NetworkUpdateResponse
+- NetworkCreateResponse
- NetworkDeleteResponse
Methods:
-- client.teamnets.routes.networks.update(accountId, ipNetworkEncoded, { ...params }) -> NetworkUpdateResponse
+- client.teamnets.routes.networks.create(accountId, ipNetworkEncoded, { ...params }) -> NetworkCreateResponse
- client.teamnets.routes.networks.delete(accountId, ipNetworkEncoded, { ...params }) -> NetworkDeleteResponse
## VirtualNetworks
diff --git a/src/index.ts b/src/index.ts
index 27cd53a778..e917befdf9 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -362,11 +362,11 @@ export namespace Cloudflare {
export import AccountListParams = API.AccountListParams;
export import Certificates = API.Certificates;
+ export import CertificateCreateResponse = API.CertificateCreateResponse;
+ export import CertificateListResponse = API.CertificateListResponse;
export import CertificateDeleteResponse = API.CertificateDeleteResponse;
export import CertificateGetResponse = API.CertificateGetResponse;
- export import CertificateOriginCaCreateCertificateResponse = API.CertificateOriginCaCreateCertificateResponse;
- export import CertificateOriginCaListCertificatesResponse = API.CertificateOriginCaListCertificatesResponse;
- export import CertificateOriginCaCreateCertificateParams = API.CertificateOriginCaCreateCertificateParams;
+ export import CertificateCreateParams = API.CertificateCreateParams;
export import IPs = API.IPs;
export import IPListResponse = API.IPListResponse;
@@ -419,16 +419,16 @@ export namespace Cloudflare {
export import SSLs = API.SSLs;
export import Subscriptions = API.Subscriptions;
+ export import SubscriptionCreateResponse = API.SubscriptionCreateResponse;
export import SubscriptionUpdateResponse = API.SubscriptionUpdateResponse;
export import SubscriptionDeleteResponse = API.SubscriptionDeleteResponse;
export import SubscriptionAccountSubscriptionsCreateSubscriptionResponse = API.SubscriptionAccountSubscriptionsCreateSubscriptionResponse;
export import SubscriptionAccountSubscriptionsListSubscriptionsResponse = API.SubscriptionAccountSubscriptionsListSubscriptionsResponse;
- export import SubscriptionZoneSubscriptionCreateZoneSubscriptionResponse = API.SubscriptionZoneSubscriptionCreateZoneSubscriptionResponse;
+ export import SubscriptionGetResponse = API.SubscriptionGetResponse;
export import SubscriptionZoneSubscriptionUpdateZoneSubscriptionResponse = API.SubscriptionZoneSubscriptionUpdateZoneSubscriptionResponse;
- export import SubscriptionZoneSubscriptionZoneSubscriptionDetailsResponse = API.SubscriptionZoneSubscriptionZoneSubscriptionDetailsResponse;
+ export import SubscriptionCreateParams = API.SubscriptionCreateParams;
export import SubscriptionUpdateParams = API.SubscriptionUpdateParams;
export import SubscriptionAccountSubscriptionsCreateSubscriptionParams = API.SubscriptionAccountSubscriptionsCreateSubscriptionParams;
- export import SubscriptionZoneSubscriptionCreateZoneSubscriptionParams = API.SubscriptionZoneSubscriptionCreateZoneSubscriptionParams;
export import SubscriptionZoneSubscriptionUpdateZoneSubscriptionParams = API.SubscriptionZoneSubscriptionUpdateZoneSubscriptionParams;
export import Acms = API.Acms;
@@ -666,11 +666,11 @@ export namespace Cloudflare {
export import Mnms = API.Mnms;
export import MtlsCertificates = API.MtlsCertificates;
- export import MtlsCertificateUpdateResponse = API.MtlsCertificateUpdateResponse;
+ export import MtlsCertificateCreateResponse = API.MtlsCertificateCreateResponse;
export import MtlsCertificateListResponse = API.MtlsCertificateListResponse;
export import MtlsCertificateDeleteResponse = API.MtlsCertificateDeleteResponse;
export import MtlsCertificateGetResponse = API.MtlsCertificateGetResponse;
- export import MtlsCertificateUpdateParams = API.MtlsCertificateUpdateParams;
+ export import MtlsCertificateCreateParams = API.MtlsCertificateCreateParams;
export import Pages = API.Pages;
@@ -693,10 +693,10 @@ export namespace Cloudflare {
export import Storage = API.Storage;
export import Stream = API.Stream;
- export import StreamUpdateResponse = API.StreamUpdateResponse;
+ export import StreamCreateResponse = API.StreamCreateResponse;
export import StreamGetResponse = API.StreamGetResponse;
export import StreamStreamVideosListVideosResponse = API.StreamStreamVideosListVideosResponse;
- export import StreamUpdateParams = API.StreamUpdateParams;
+ export import StreamCreateParams = API.StreamCreateParams;
export import StreamStreamVideosInitiateVideoUploadsUsingTusParams = API.StreamStreamVideosInitiateVideoUploadsUsingTusParams;
export import StreamStreamVideosListVideosParams = API.StreamStreamVideosListVideosParams;
diff --git a/src/resources/access/users/failed-logins.ts b/src/resources/access/users/failed-logins.ts
index 298c6eb63a..495c3715e7 100644
--- a/src/resources/access/users/failed-logins.ts
+++ b/src/resources/access/users/failed-logins.ts
@@ -8,25 +8,24 @@ export class FailedLogins extends APIResource {
/**
* Get all failed login attempts for a single user.
*/
- zeroTrustUsersGetFailedLogins(
+ get(
identifier: string,
id: string,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
return (
this._client.get(
`/accounts/${identifier}/access/users/${id}/failed_logins`,
options,
- ) as Core.APIPromise<{ result: FailedLoginZeroTrustUsersGetFailedLoginsResponse | null }>
+ ) as Core.APIPromise<{ result: FailedLoginGetResponse | null }>
)._thenUnwrap((obj) => obj.result);
}
}
-export type FailedLoginZeroTrustUsersGetFailedLoginsResponse =
- Array;
+export type FailedLoginGetResponse = Array;
-export namespace FailedLoginZeroTrustUsersGetFailedLoginsResponse {
- export interface FailedLoginZeroTrustUsersGetFailedLoginsResponseItem {
+export namespace FailedLoginGetResponse {
+ export interface FailedLoginGetResponseItem {
expiration?: number;
metadata?: unknown;
@@ -34,5 +33,5 @@ export namespace FailedLoginZeroTrustUsersGetFailedLoginsResponse {
}
export namespace FailedLogins {
- export import FailedLoginZeroTrustUsersGetFailedLoginsResponse = FailedLoginsAPI.FailedLoginZeroTrustUsersGetFailedLoginsResponse;
+ export import FailedLoginGetResponse = FailedLoginsAPI.FailedLoginGetResponse;
}
diff --git a/src/resources/access/users/index.ts b/src/resources/access/users/index.ts
index c823e334d0..98335e495d 100644
--- a/src/resources/access/users/index.ts
+++ b/src/resources/access/users/index.ts
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless.
export { ActiveSessionListResponse, ActiveSessionGetResponse, ActiveSessions } from './active-sessions';
-export { FailedLoginZeroTrustUsersGetFailedLoginsResponse, FailedLogins } from './failed-logins';
+export { FailedLoginGetResponse, FailedLogins } from './failed-logins';
export { LastSeenIdentityGetResponse, LastSeenIdentity } from './last-seen-identity';
export { UserListResponse, Users } from './users';
diff --git a/src/resources/access/users/users.ts b/src/resources/access/users/users.ts
index 5b97babc8e..13c7e5b45b 100644
--- a/src/resources/access/users/users.ts
+++ b/src/resources/access/users/users.ts
@@ -89,5 +89,5 @@ export namespace Users {
export import LastSeenIdentity = LastSeenIdentityAPI.LastSeenIdentity;
export import LastSeenIdentityGetResponse = LastSeenIdentityAPI.LastSeenIdentityGetResponse;
export import FailedLogins = FailedLoginsAPI.FailedLogins;
- export import FailedLoginZeroTrustUsersGetFailedLoginsResponse = FailedLoginsAPI.FailedLoginZeroTrustUsersGetFailedLoginsResponse;
+ export import FailedLoginGetResponse = FailedLoginsAPI.FailedLoginGetResponse;
}
diff --git a/src/resources/acms/acms.ts b/src/resources/acms/acms.ts
index 625c433f4f..d891af961f 100644
--- a/src/resources/acms/acms.ts
+++ b/src/resources/acms/acms.ts
@@ -9,7 +9,7 @@ export class Acms extends APIResource {
export namespace Acms {
export import TotalTLS = TotalTLSAPI.TotalTLS;
- export import TotalTLSUpdateResponse = TotalTLSAPI.TotalTLSUpdateResponse;
+ export import TotalTLSCreateResponse = TotalTLSAPI.TotalTLSCreateResponse;
export import TotalTLSGetResponse = TotalTLSAPI.TotalTLSGetResponse;
- export import TotalTLSUpdateParams = TotalTLSAPI.TotalTLSUpdateParams;
+ export import TotalTLSCreateParams = TotalTLSAPI.TotalTLSCreateParams;
}
diff --git a/src/resources/acms/index.ts b/src/resources/acms/index.ts
index 12147a5380..1b1407cf26 100644
--- a/src/resources/acms/index.ts
+++ b/src/resources/acms/index.ts
@@ -1,4 +1,4 @@
// File generated from our OpenAPI spec by Stainless.
export { Acms } from './acms';
-export { TotalTLSUpdateResponse, TotalTLSGetResponse, TotalTLSUpdateParams, TotalTLS } from './total-tls';
+export { TotalTLSCreateResponse, TotalTLSGetResponse, TotalTLSCreateParams, TotalTLS } from './total-tls';
diff --git a/src/resources/acms/total-tls.ts b/src/resources/acms/total-tls.ts
index 5f046148b2..be4b5145e1 100644
--- a/src/resources/acms/total-tls.ts
+++ b/src/resources/acms/total-tls.ts
@@ -8,14 +8,14 @@ export class TotalTLS extends APIResource {
/**
* Set Total TLS Settings or disable the feature for a Zone.
*/
- update(
+ create(
zoneId: string,
- body: TotalTLSUpdateParams,
+ body: TotalTLSCreateParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
return (
this._client.post(`/zones/${zoneId}/acm/total_tls`, { body, ...options }) as Core.APIPromise<{
- result: TotalTLSUpdateResponse;
+ result: TotalTLSCreateResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
@@ -32,7 +32,7 @@ export class TotalTLS extends APIResource {
}
}
-export interface TotalTLSUpdateResponse {
+export interface TotalTLSCreateResponse {
/**
* The Certificate Authority that Total TLS certificates will be issued through.
*/
@@ -68,7 +68,7 @@ export interface TotalTLSGetResponse {
validity_days?: 90;
}
-export interface TotalTLSUpdateParams {
+export interface TotalTLSCreateParams {
/**
* If enabled, Total TLS will order a hostname specific TLS certificate for any
* proxied A, AAAA, or CNAME record in your zone.
@@ -82,7 +82,7 @@ export interface TotalTLSUpdateParams {
}
export namespace TotalTLS {
- export import TotalTLSUpdateResponse = TotalTLSAPI.TotalTLSUpdateResponse;
+ export import TotalTLSCreateResponse = TotalTLSAPI.TotalTLSCreateResponse;
export import TotalTLSGetResponse = TotalTLSAPI.TotalTLSGetResponse;
- export import TotalTLSUpdateParams = TotalTLSAPI.TotalTLSUpdateParams;
+ export import TotalTLSCreateParams = TotalTLSAPI.TotalTLSCreateParams;
}
diff --git a/src/resources/certificates.ts b/src/resources/certificates.ts
index b977aa9618..a6ed22a2ff 100644
--- a/src/resources/certificates.ts
+++ b/src/resources/certificates.ts
@@ -6,78 +6,66 @@ import * as CertificatesAPI from 'cloudflare/resources/certificates';
export class Certificates extends APIResource {
/**
- * Revoke an existing Origin CA certificate by its serial number. Use your Origin
- * CA Key as your User Service Key when calling this endpoint
- * ([see above](#requests)).
+ * Create an Origin CA certificate. Use your Origin CA Key as your User Service Key
+ * when calling this endpoint ([see above](#requests)).
*/
- delete(certificateId: string, options?: Core.RequestOptions): Core.APIPromise {
+ create(
+ body: CertificateCreateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
return (
- this._client.delete(`/certificates/${certificateId}`, options) as Core.APIPromise<{
- result: CertificateDeleteResponse;
+ this._client.post('/certificates', { body, ...options }) as Core.APIPromise<{
+ result: CertificateCreateResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
/**
- * Get an existing Origin CA certificate by its serial number. Use your Origin CA
+ * List all existing Origin CA certificates for a given zone. Use your Origin CA
* Key as your User Service Key when calling this endpoint
* ([see above](#requests)).
*/
- get(certificateId: string, options?: Core.RequestOptions): Core.APIPromise {
+ list(options?: Core.RequestOptions): Core.APIPromise {
return (
- this._client.get(`/certificates/${certificateId}`, options) as Core.APIPromise<{
- result: CertificateGetResponse;
+ this._client.get('/certificates', options) as Core.APIPromise<{
+ result: CertificateListResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
}
/**
- * Create an Origin CA certificate. Use your Origin CA Key as your User Service Key
- * when calling this endpoint ([see above](#requests)).
+ * Revoke an existing Origin CA certificate by its serial number. Use your Origin
+ * CA Key as your User Service Key when calling this endpoint
+ * ([see above](#requests)).
*/
- originCaCreateCertificate(
- body: CertificateOriginCaCreateCertificateParams,
- options?: Core.RequestOptions,
- ): Core.APIPromise {
+ delete(certificateId: string, options?: Core.RequestOptions): Core.APIPromise {
return (
- this._client.post('/certificates', { body, ...options }) as Core.APIPromise<{
- result: CertificateOriginCaCreateCertificateResponse;
+ this._client.delete(`/certificates/${certificateId}`, options) as Core.APIPromise<{
+ result: CertificateDeleteResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
/**
- * List all existing Origin CA certificates for a given zone. Use your Origin CA
+ * Get an existing Origin CA certificate by its serial number. Use your Origin CA
* Key as your User Service Key when calling this endpoint
* ([see above](#requests)).
*/
- originCaListCertificates(
- options?: Core.RequestOptions,
- ): Core.APIPromise {
+ get(certificateId: string, options?: Core.RequestOptions): Core.APIPromise {
return (
- this._client.get('/certificates', options) as Core.APIPromise<{
- result: CertificateOriginCaListCertificatesResponse | null;
+ this._client.get(`/certificates/${certificateId}`, options) as Core.APIPromise<{
+ result: CertificateGetResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
}
-export interface CertificateDeleteResponse {
- /**
- * Identifier
- */
- id?: string;
-}
+export type CertificateCreateResponse = unknown | string;
-export type CertificateGetResponse = unknown | string;
-
-export type CertificateOriginCaCreateCertificateResponse = unknown | string;
-
-export type CertificateOriginCaListCertificatesResponse =
- Array;
+export type CertificateListResponse = Array;
-export namespace CertificateOriginCaListCertificatesResponse {
- export interface CertificateOriginCaListCertificatesResponseItem {
+export namespace CertificateListResponse {
+ export interface CertificateListResponseItem {
/**
* The Certificate Signing Request (CSR). Must be newline-encoded.
*/
@@ -117,7 +105,16 @@ export namespace CertificateOriginCaListCertificatesResponse {
}
}
-export interface CertificateOriginCaCreateCertificateParams {
+export interface CertificateDeleteResponse {
+ /**
+ * Identifier
+ */
+ id?: string;
+}
+
+export type CertificateGetResponse = unknown | string;
+
+export interface CertificateCreateParams {
/**
* The Certificate Signing Request (CSR). Must be newline-encoded.
*/
@@ -142,9 +139,9 @@ export interface CertificateOriginCaCreateCertificateParams {
}
export namespace Certificates {
+ export import CertificateCreateResponse = CertificatesAPI.CertificateCreateResponse;
+ export import CertificateListResponse = CertificatesAPI.CertificateListResponse;
export import CertificateDeleteResponse = CertificatesAPI.CertificateDeleteResponse;
export import CertificateGetResponse = CertificatesAPI.CertificateGetResponse;
- export import CertificateOriginCaCreateCertificateResponse = CertificatesAPI.CertificateOriginCaCreateCertificateResponse;
- export import CertificateOriginCaListCertificatesResponse = CertificatesAPI.CertificateOriginCaListCertificatesResponse;
- export import CertificateOriginCaCreateCertificateParams = CertificatesAPI.CertificateOriginCaCreateCertificateParams;
+ export import CertificateCreateParams = CertificatesAPI.CertificateCreateParams;
}
diff --git a/src/resources/custom-ns/custom-ns.ts b/src/resources/custom-ns/custom-ns.ts
index d5b5672a9c..5ba49a55ed 100644
--- a/src/resources/custom-ns/custom-ns.ts
+++ b/src/resources/custom-ns/custom-ns.ts
@@ -166,5 +166,5 @@ export namespace CustomNs {
export import Availabilities = AvailabilitiesAPI.Availabilities;
export import AvailabilityGetResponse = AvailabilitiesAPI.AvailabilityGetResponse;
export import Verifies = VerifiesAPI.Verifies;
- export import VerifyUpdateResponse = VerifiesAPI.VerifyUpdateResponse;
+ export import VerifyCreateResponse = VerifiesAPI.VerifyCreateResponse;
}
diff --git a/src/resources/custom-ns/index.ts b/src/resources/custom-ns/index.ts
index 3b8d202f20..02b81e880d 100644
--- a/src/resources/custom-ns/index.ts
+++ b/src/resources/custom-ns/index.ts
@@ -8,4 +8,4 @@ export {
CustomNCreateParams,
CustomNs,
} from './custom-ns';
-export { VerifyUpdateResponse, Verifies } from './verifies';
+export { VerifyCreateResponse, Verifies } from './verifies';
diff --git a/src/resources/custom-ns/verifies.ts b/src/resources/custom-ns/verifies.ts
index fc1a7cab4b..f1da76dffb 100644
--- a/src/resources/custom-ns/verifies.ts
+++ b/src/resources/custom-ns/verifies.ts
@@ -8,26 +8,26 @@ export class Verifies extends APIResource {
/**
* Verify Account Custom Nameserver Glue Records
*/
- update(accountId: string, options?: Core.RequestOptions): Core.APIPromise {
+ create(accountId: string, options?: Core.RequestOptions): Core.APIPromise {
return (
this._client.post(`/accounts/${accountId}/custom_ns/verify`, options) as Core.APIPromise<{
- result: VerifyUpdateResponse | null;
+ result: VerifyCreateResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
}
}
-export type VerifyUpdateResponse = Array;
+export type VerifyCreateResponse = Array;
-export namespace VerifyUpdateResponse {
+export namespace VerifyCreateResponse {
/**
* A single account custom nameserver.
*/
- export interface VerifyUpdateResponseItem {
+ export interface VerifyCreateResponseItem {
/**
* A and AAAA records associated with the nameserver.
*/
- dns_records: Array;
+ dns_records: Array;
/**
* The FQDN of the name server.
@@ -50,7 +50,7 @@ export namespace VerifyUpdateResponse {
ns_set?: number;
}
- export namespace VerifyUpdateResponseItem {
+ export namespace VerifyCreateResponseItem {
export interface DNSRecord {
/**
* DNS record type.
@@ -66,5 +66,5 @@ export namespace VerifyUpdateResponse {
}
export namespace Verifies {
- export import VerifyUpdateResponse = VerifiesAPI.VerifyUpdateResponse;
+ export import VerifyCreateResponse = VerifiesAPI.VerifyCreateResponse;
}
diff --git a/src/resources/index.ts b/src/resources/index.ts
index 5f9f31d051..ba9be04b6d 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -75,11 +75,11 @@ export {
} from './calls';
export { CertificateAuthorities } from './certificate-authorities/certificate-authorities';
export {
+ CertificateCreateResponse,
+ CertificateListResponse,
CertificateDeleteResponse,
CertificateGetResponse,
- CertificateOriginCaCreateCertificateResponse,
- CertificateOriginCaListCertificatesResponse,
- CertificateOriginCaCreateCertificateParams,
+ CertificateCreateParams,
Certificates,
} from './certificates';
export {
@@ -254,11 +254,11 @@ export {
} from './memberships';
export { Mnms } from './mnms/mnms';
export {
- MtlsCertificateUpdateResponse,
+ MtlsCertificateCreateResponse,
MtlsCertificateListResponse,
MtlsCertificateDeleteResponse,
MtlsCertificateGetResponse,
- MtlsCertificateUpdateParams,
+ MtlsCertificateCreateParams,
MtlsCertificates,
} from './mtls-certificates/mtls-certificates';
export {
@@ -358,25 +358,25 @@ export {
} from './speed-api/speed-api';
export { Storage } from './storage/storage';
export {
- StreamUpdateResponse,
+ StreamCreateResponse,
StreamGetResponse,
StreamStreamVideosListVideosResponse,
- StreamUpdateParams,
+ StreamCreateParams,
StreamStreamVideosInitiateVideoUploadsUsingTusParams,
StreamStreamVideosListVideosParams,
Stream,
} from './stream/stream';
export {
+ SubscriptionCreateResponse,
SubscriptionUpdateResponse,
SubscriptionDeleteResponse,
SubscriptionAccountSubscriptionsCreateSubscriptionResponse,
SubscriptionAccountSubscriptionsListSubscriptionsResponse,
- SubscriptionZoneSubscriptionCreateZoneSubscriptionResponse,
+ SubscriptionGetResponse,
SubscriptionZoneSubscriptionUpdateZoneSubscriptionResponse,
- SubscriptionZoneSubscriptionZoneSubscriptionDetailsResponse,
+ SubscriptionCreateParams,
SubscriptionUpdateParams,
SubscriptionAccountSubscriptionsCreateSubscriptionParams,
- SubscriptionZoneSubscriptionCreateZoneSubscriptionParams,
SubscriptionZoneSubscriptionUpdateZoneSubscriptionParams,
Subscriptions,
} from './subscriptions';
diff --git a/src/resources/logpush/edges.ts b/src/resources/logpush/edges.ts
index 93dc19fa4e..8fac1632e9 100644
--- a/src/resources/logpush/edges.ts
+++ b/src/resources/logpush/edges.ts
@@ -8,14 +8,14 @@ export class Edges extends APIResource {
/**
* Creates a new Instant Logs job for a zone.
*/
- update(
+ create(
zoneId: string,
- body: EdgeUpdateParams,
+ body: EdgeCreateParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
return (
this._client.post(`/zones/${zoneId}/logpush/edge`, { body, ...options }) as Core.APIPromise<{
- result: EdgeUpdateResponse | null;
+ result: EdgeCreateResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
}
@@ -32,7 +32,7 @@ export class Edges extends APIResource {
}
}
-export interface EdgeUpdateResponse {
+export interface EdgeCreateResponse {
/**
* Unique WebSocket address that will receive messages from Cloudflare’s edge.
*/
@@ -92,7 +92,7 @@ export namespace EdgeGetResponse {
}
}
-export interface EdgeUpdateParams {
+export interface EdgeCreateParams {
/**
* Comma-separated list of fields.
*/
@@ -111,7 +111,7 @@ export interface EdgeUpdateParams {
}
export namespace Edges {
- export import EdgeUpdateResponse = EdgesAPI.EdgeUpdateResponse;
+ export import EdgeCreateResponse = EdgesAPI.EdgeCreateResponse;
export import EdgeGetResponse = EdgesAPI.EdgeGetResponse;
- export import EdgeUpdateParams = EdgesAPI.EdgeUpdateParams;
+ export import EdgeCreateParams = EdgesAPI.EdgeCreateParams;
}
diff --git a/src/resources/logpush/index.ts b/src/resources/logpush/index.ts
index d5f79a9359..9ca93dfe60 100644
--- a/src/resources/logpush/index.ts
+++ b/src/resources/logpush/index.ts
@@ -1,7 +1,7 @@
// File generated from our OpenAPI spec by Stainless.
export { Datasets } from './datasets/index';
-export { EdgeUpdateResponse, EdgeGetResponse, EdgeUpdateParams, Edges } from './edges';
+export { EdgeCreateResponse, EdgeGetResponse, EdgeCreateParams, Edges } from './edges';
export {
JobCreateResponse,
JobUpdateResponse,
diff --git a/src/resources/logpush/logpush.ts b/src/resources/logpush/logpush.ts
index 1b1781f309..9ede7c7a07 100644
--- a/src/resources/logpush/logpush.ts
+++ b/src/resources/logpush/logpush.ts
@@ -18,9 +18,9 @@ export class Logpush extends APIResource {
export namespace Logpush {
export import Datasets = DatasetsAPI.Datasets;
export import Edges = EdgesAPI.Edges;
- export import EdgeUpdateResponse = EdgesAPI.EdgeUpdateResponse;
+ export import EdgeCreateResponse = EdgesAPI.EdgeCreateResponse;
export import EdgeGetResponse = EdgesAPI.EdgeGetResponse;
- export import EdgeUpdateParams = EdgesAPI.EdgeUpdateParams;
+ export import EdgeCreateParams = EdgesAPI.EdgeCreateParams;
export import Jobs = JobsAPI.Jobs;
export import JobCreateResponse = JobsAPI.JobCreateResponse;
export import JobUpdateResponse = JobsAPI.JobUpdateResponse;
diff --git a/src/resources/mtls-certificates/index.ts b/src/resources/mtls-certificates/index.ts
index 4ebbeb54b9..54032bde67 100644
--- a/src/resources/mtls-certificates/index.ts
+++ b/src/resources/mtls-certificates/index.ts
@@ -2,10 +2,10 @@
export { AssociationListResponse, Associations } from './associations';
export {
- MtlsCertificateUpdateResponse,
+ MtlsCertificateCreateResponse,
MtlsCertificateListResponse,
MtlsCertificateDeleteResponse,
MtlsCertificateGetResponse,
- MtlsCertificateUpdateParams,
+ MtlsCertificateCreateParams,
MtlsCertificates,
} from './mtls-certificates';
diff --git a/src/resources/mtls-certificates/mtls-certificates.ts b/src/resources/mtls-certificates/mtls-certificates.ts
index b59a184be7..0dbaee4274 100644
--- a/src/resources/mtls-certificates/mtls-certificates.ts
+++ b/src/resources/mtls-certificates/mtls-certificates.ts
@@ -11,14 +11,14 @@ export class MtlsCertificates extends APIResource {
/**
* Upload a certificate that you want to use with mTLS-enabled Cloudflare services.
*/
- update(
+ create(
accountId: string,
- body: MtlsCertificateUpdateParams,
+ body: MtlsCertificateCreateParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
return (
this._client.post(`/accounts/${accountId}/mtls_certificates`, { body, ...options }) as Core.APIPromise<{
- result: MtlsCertificateUpdateResponse;
+ result: MtlsCertificateCreateResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
@@ -71,7 +71,7 @@ export class MtlsCertificates extends APIResource {
}
}
-export interface MtlsCertificateUpdateResponse {
+export interface MtlsCertificateCreateResponse {
/**
* Identifier
*/
@@ -268,7 +268,7 @@ export interface MtlsCertificateGetResponse {
uploaded_on?: string;
}
-export interface MtlsCertificateUpdateParams {
+export interface MtlsCertificateCreateParams {
/**
* Indicates whether the certificate is a CA or leaf certificate.
*/
@@ -291,11 +291,11 @@ export interface MtlsCertificateUpdateParams {
}
export namespace MtlsCertificates {
- export import MtlsCertificateUpdateResponse = MtlsCertificatesAPI.MtlsCertificateUpdateResponse;
+ export import MtlsCertificateCreateResponse = MtlsCertificatesAPI.MtlsCertificateCreateResponse;
export import MtlsCertificateListResponse = MtlsCertificatesAPI.MtlsCertificateListResponse;
export import MtlsCertificateDeleteResponse = MtlsCertificatesAPI.MtlsCertificateDeleteResponse;
export import MtlsCertificateGetResponse = MtlsCertificatesAPI.MtlsCertificateGetResponse;
- export import MtlsCertificateUpdateParams = MtlsCertificatesAPI.MtlsCertificateUpdateParams;
+ export import MtlsCertificateCreateParams = MtlsCertificatesAPI.MtlsCertificateCreateParams;
export import Associations = AssociationsAPI.Associations;
export import AssociationListResponse = AssociationsAPI.AssociationListResponse;
}
diff --git a/src/resources/ssls/analyzes.ts b/src/resources/ssls/analyzes.ts
index 88b0abbd4b..1949531b90 100644
--- a/src/resources/ssls/analyzes.ts
+++ b/src/resources/ssls/analyzes.ts
@@ -9,22 +9,22 @@ export class Analyzes extends APIResource {
* Returns the set of hostnames, the signature algorithm, and the expiration date
* of the certificate.
*/
- analyzeCertificateAnalyzeCertificate(
+ create(
zoneId: string,
- body: AnalyzeAnalyzeCertificateAnalyzeCertificateParams,
+ body: AnalyzeCreateParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
return (
this._client.post(`/zones/${zoneId}/ssl/analyze`, { body, ...options }) as Core.APIPromise<{
- result: AnalyzeAnalyzeCertificateAnalyzeCertificateResponse;
+ result: AnalyzeCreateResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
}
-export type AnalyzeAnalyzeCertificateAnalyzeCertificateResponse = unknown | string;
+export type AnalyzeCreateResponse = unknown | string;
-export interface AnalyzeAnalyzeCertificateAnalyzeCertificateParams {
+export interface AnalyzeCreateParams {
/**
* A ubiquitous bundle has the highest probability of being verified everywhere,
* even by clients using outdated or unusual trust stores. An optimal bundle uses
@@ -40,6 +40,6 @@ export interface AnalyzeAnalyzeCertificateAnalyzeCertificateParams {
}
export namespace Analyzes {
- export import AnalyzeAnalyzeCertificateAnalyzeCertificateResponse = AnalyzesAPI.AnalyzeAnalyzeCertificateAnalyzeCertificateResponse;
- export import AnalyzeAnalyzeCertificateAnalyzeCertificateParams = AnalyzesAPI.AnalyzeAnalyzeCertificateAnalyzeCertificateParams;
+ export import AnalyzeCreateResponse = AnalyzesAPI.AnalyzeCreateResponse;
+ export import AnalyzeCreateParams = AnalyzesAPI.AnalyzeCreateParams;
}
diff --git a/src/resources/ssls/certificate-packs/certificate-packs.ts b/src/resources/ssls/certificate-packs/certificate-packs.ts
index 8cbcae4e0c..87c10df62a 100644
--- a/src/resources/ssls/certificate-packs/certificate-packs.ts
+++ b/src/resources/ssls/certificate-packs/certificate-packs.ts
@@ -30,45 +30,42 @@ export class CertificatePacks extends APIResource {
}
/**
- * For a given zone, delete an advanced certificate pack.
+ * For a given zone, list all active certificate packs.
*/
- delete(
+ list(
zoneId: string,
- certificatePackId: string,
+ query?: CertificatePackListParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise;
+ list(zoneId: string, options?: Core.RequestOptions): Core.APIPromise;
+ list(
+ zoneId: string,
+ query: CertificatePackListParams | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ if (isRequestOptions(query)) {
+ return this.list(zoneId, {}, query);
+ }
return (
- this._client.delete(
- `/zones/${zoneId}/ssl/certificate_packs/${certificatePackId}`,
- options,
- ) as Core.APIPromise<{ result: CertificatePackDeleteResponse }>
+ this._client.get(`/zones/${zoneId}/ssl/certificate_packs`, { query, ...options }) as Core.APIPromise<{
+ result: CertificatePackListResponse | null;
+ }>
)._thenUnwrap((obj) => obj.result);
}
/**
- * For a given zone, list all active certificate packs.
+ * For a given zone, delete an advanced certificate pack.
*/
- certificatePacksListCertificatePacks(
- zoneId: string,
- query?: CertificatePackCertificatePacksListCertificatePacksParams,
- options?: Core.RequestOptions,
- ): Core.APIPromise;
- certificatePacksListCertificatePacks(
- zoneId: string,
- options?: Core.RequestOptions,
- ): Core.APIPromise;
- certificatePacksListCertificatePacks(
+ delete(
zoneId: string,
- query: CertificatePackCertificatePacksListCertificatePacksParams | Core.RequestOptions = {},
+ certificatePackId: string,
options?: Core.RequestOptions,
- ): Core.APIPromise {
- if (isRequestOptions(query)) {
- return this.certificatePacksListCertificatePacks(zoneId, {}, query);
- }
+ ): Core.APIPromise {
return (
- this._client.get(`/zones/${zoneId}/ssl/certificate_packs`, { query, ...options }) as Core.APIPromise<{
- result: CertificatePackCertificatePacksListCertificatePacksResponse | null;
- }>
+ this._client.delete(
+ `/zones/${zoneId}/ssl/certificate_packs/${certificatePackId}`,
+ options,
+ ) as Core.APIPromise<{ result: CertificatePackDeleteResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -156,6 +153,8 @@ export interface CertificatePackUpdateResponse {
validity_days?: 14 | 30 | 90 | 365;
}
+export type CertificatePackListResponse = Array;
+
export interface CertificatePackDeleteResponse {
/**
* Identifier
@@ -163,11 +162,9 @@ export interface CertificatePackDeleteResponse {
id?: string;
}
-export type CertificatePackCertificatePacksListCertificatePacksResponse = Array;
-
export type CertificatePackGetResponse = unknown | string;
-export interface CertificatePackCertificatePacksListCertificatePacksParams {
+export interface CertificatePackListParams {
/**
* Include Certificate Packs of all statuses, not just active ones.
*/
@@ -176,13 +173,13 @@ export interface CertificatePackCertificatePacksListCertificatePacksParams {
export namespace CertificatePacks {
export import CertificatePackUpdateResponse = CertificatePacksAPI.CertificatePackUpdateResponse;
+ export import CertificatePackListResponse = CertificatePacksAPI.CertificatePackListResponse;
export import CertificatePackDeleteResponse = CertificatePacksAPI.CertificatePackDeleteResponse;
- export import CertificatePackCertificatePacksListCertificatePacksResponse = CertificatePacksAPI.CertificatePackCertificatePacksListCertificatePacksResponse;
export import CertificatePackGetResponse = CertificatePacksAPI.CertificatePackGetResponse;
- export import CertificatePackCertificatePacksListCertificatePacksParams = CertificatePacksAPI.CertificatePackCertificatePacksListCertificatePacksParams;
+ export import CertificatePackListParams = CertificatePacksAPI.CertificatePackListParams;
export import Orders = OrdersAPI.Orders;
- export import OrderCertificatePacksOrderAdvancedCertificateManagerCertificatePackResponse = OrdersAPI.OrderCertificatePacksOrderAdvancedCertificateManagerCertificatePackResponse;
- export import OrderCertificatePacksOrderAdvancedCertificateManagerCertificatePackParams = OrdersAPI.OrderCertificatePacksOrderAdvancedCertificateManagerCertificatePackParams;
+ export import OrderCreateResponse = OrdersAPI.OrderCreateResponse;
+ export import OrderCreateParams = OrdersAPI.OrderCreateParams;
export import Quotas = QuotasAPI.Quotas;
- export import QuotaCertificatePacksGetCertificatePackQuotasResponse = QuotasAPI.QuotaCertificatePacksGetCertificatePackQuotasResponse;
+ export import QuotaGetResponse = QuotasAPI.QuotaGetResponse;
}
diff --git a/src/resources/ssls/certificate-packs/index.ts b/src/resources/ssls/certificate-packs/index.ts
index 0d662a88d8..818bc5a7c5 100644
--- a/src/resources/ssls/certificate-packs/index.ts
+++ b/src/resources/ssls/certificate-packs/index.ts
@@ -2,15 +2,11 @@
export {
CertificatePackUpdateResponse,
+ CertificatePackListResponse,
CertificatePackDeleteResponse,
- CertificatePackCertificatePacksListCertificatePacksResponse,
CertificatePackGetResponse,
- CertificatePackCertificatePacksListCertificatePacksParams,
+ CertificatePackListParams,
CertificatePacks,
} from './certificate-packs';
-export {
- OrderCertificatePacksOrderAdvancedCertificateManagerCertificatePackResponse,
- OrderCertificatePacksOrderAdvancedCertificateManagerCertificatePackParams,
- Orders,
-} from './orders';
-export { QuotaCertificatePacksGetCertificatePackQuotasResponse, Quotas } from './quotas';
+export { OrderCreateResponse, OrderCreateParams, Orders } from './orders';
+export { QuotaGetResponse, Quotas } from './quotas';
diff --git a/src/resources/ssls/certificate-packs/orders.ts b/src/resources/ssls/certificate-packs/orders.ts
index 1d166c6c8d..108b7148e9 100644
--- a/src/resources/ssls/certificate-packs/orders.ts
+++ b/src/resources/ssls/certificate-packs/orders.ts
@@ -8,23 +8,21 @@ export class Orders extends APIResource {
/**
* For a given zone, order an advanced certificate pack.
*/
- certificatePacksOrderAdvancedCertificateManagerCertificatePack(
+ create(
zoneId: string,
- body: OrderCertificatePacksOrderAdvancedCertificateManagerCertificatePackParams,
+ body: OrderCreateParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
return (
this._client.post(`/zones/${zoneId}/ssl/certificate_packs/order`, {
body,
...options,
- }) as Core.APIPromise<{
- result: OrderCertificatePacksOrderAdvancedCertificateManagerCertificatePackResponse;
- }>
+ }) as Core.APIPromise<{ result: OrderCreateResponse }>
)._thenUnwrap((obj) => obj.result);
}
}
-export interface OrderCertificatePacksOrderAdvancedCertificateManagerCertificatePackResponse {
+export interface OrderCreateResponse {
/**
* Identifier
*/
@@ -91,7 +89,7 @@ export interface OrderCertificatePacksOrderAdvancedCertificateManagerCertificate
validity_days?: 14 | 30 | 90 | 365;
}
-export interface OrderCertificatePacksOrderAdvancedCertificateManagerCertificatePackParams {
+export interface OrderCreateParams {
/**
* Certificate Authority selected for the order. For information on any certificate
* authority specific details or restrictions
@@ -128,6 +126,6 @@ export interface OrderCertificatePacksOrderAdvancedCertificateManagerCertificate
}
export namespace Orders {
- export import OrderCertificatePacksOrderAdvancedCertificateManagerCertificatePackResponse = OrdersAPI.OrderCertificatePacksOrderAdvancedCertificateManagerCertificatePackResponse;
- export import OrderCertificatePacksOrderAdvancedCertificateManagerCertificatePackParams = OrdersAPI.OrderCertificatePacksOrderAdvancedCertificateManagerCertificatePackParams;
+ export import OrderCreateResponse = OrdersAPI.OrderCreateResponse;
+ export import OrderCreateParams = OrdersAPI.OrderCreateParams;
}
diff --git a/src/resources/ssls/certificate-packs/quotas.ts b/src/resources/ssls/certificate-packs/quotas.ts
index 1a0490c7a4..49a241661f 100644
--- a/src/resources/ssls/certificate-packs/quotas.ts
+++ b/src/resources/ssls/certificate-packs/quotas.ts
@@ -8,23 +8,20 @@ export class Quotas extends APIResource {
/**
* For a given zone, list certificate pack quotas.
*/
- certificatePacksGetCertificatePackQuotas(
- zoneId: string,
- options?: Core.RequestOptions,
- ): Core.APIPromise {
+ get(zoneId: string, options?: Core.RequestOptions): Core.APIPromise {
return (
this._client.get(`/zones/${zoneId}/ssl/certificate_packs/quota`, options) as Core.APIPromise<{
- result: QuotaCertificatePacksGetCertificatePackQuotasResponse;
+ result: QuotaGetResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
}
-export interface QuotaCertificatePacksGetCertificatePackQuotasResponse {
- advanced?: QuotaCertificatePacksGetCertificatePackQuotasResponse.Advanced;
+export interface QuotaGetResponse {
+ advanced?: QuotaGetResponse.Advanced;
}
-export namespace QuotaCertificatePacksGetCertificatePackQuotasResponse {
+export namespace QuotaGetResponse {
export interface Advanced {
/**
* Quantity Allocated.
@@ -39,5 +36,5 @@ export namespace QuotaCertificatePacksGetCertificatePackQuotasResponse {
}
export namespace Quotas {
- export import QuotaCertificatePacksGetCertificatePackQuotasResponse = QuotasAPI.QuotaCertificatePacksGetCertificatePackQuotasResponse;
+ export import QuotaGetResponse = QuotasAPI.QuotaGetResponse;
}
diff --git a/src/resources/ssls/index.ts b/src/resources/ssls/index.ts
index 636ca2ca6b..084fa7aa50 100644
--- a/src/resources/ssls/index.ts
+++ b/src/resources/ssls/index.ts
@@ -1,16 +1,12 @@
// File generated from our OpenAPI spec by Stainless.
-export {
- AnalyzeAnalyzeCertificateAnalyzeCertificateResponse,
- AnalyzeAnalyzeCertificateAnalyzeCertificateParams,
- Analyzes,
-} from './analyzes';
+export { AnalyzeCreateResponse, AnalyzeCreateParams, Analyzes } from './analyzes';
export {
CertificatePackUpdateResponse,
+ CertificatePackListResponse,
CertificatePackDeleteResponse,
- CertificatePackCertificatePacksListCertificatePacksResponse,
CertificatePackGetResponse,
- CertificatePackCertificatePacksListCertificatePacksParams,
+ CertificatePackListParams,
CertificatePacks,
} from './certificate-packs/index';
export { RecommendationListResponse, Recommendations } from './recommendations';
diff --git a/src/resources/ssls/ssls.ts b/src/resources/ssls/ssls.ts
index d221850029..5f6a626b5b 100644
--- a/src/resources/ssls/ssls.ts
+++ b/src/resources/ssls/ssls.ts
@@ -19,14 +19,14 @@ export class SSLs extends APIResource {
export namespace SSLs {
export import Analyzes = AnalyzesAPI.Analyzes;
- export import AnalyzeAnalyzeCertificateAnalyzeCertificateResponse = AnalyzesAPI.AnalyzeAnalyzeCertificateAnalyzeCertificateResponse;
- export import AnalyzeAnalyzeCertificateAnalyzeCertificateParams = AnalyzesAPI.AnalyzeAnalyzeCertificateAnalyzeCertificateParams;
+ export import AnalyzeCreateResponse = AnalyzesAPI.AnalyzeCreateResponse;
+ export import AnalyzeCreateParams = AnalyzesAPI.AnalyzeCreateParams;
export import CertificatePacks = CertificatePacksAPI.CertificatePacks;
export import CertificatePackUpdateResponse = CertificatePacksAPI.CertificatePackUpdateResponse;
+ export import CertificatePackListResponse = CertificatePacksAPI.CertificatePackListResponse;
export import CertificatePackDeleteResponse = CertificatePacksAPI.CertificatePackDeleteResponse;
- export import CertificatePackCertificatePacksListCertificatePacksResponse = CertificatePacksAPI.CertificatePackCertificatePacksListCertificatePacksResponse;
export import CertificatePackGetResponse = CertificatePacksAPI.CertificatePackGetResponse;
- export import CertificatePackCertificatePacksListCertificatePacksParams = CertificatePacksAPI.CertificatePackCertificatePacksListCertificatePacksParams;
+ export import CertificatePackListParams = CertificatePacksAPI.CertificatePackListParams;
export import Recommendations = RecommendationsAPI.Recommendations;
export import RecommendationListResponse = RecommendationsAPI.RecommendationListResponse;
export import Universals = UniversalsAPI.Universals;
diff --git a/src/resources/stream/index.ts b/src/resources/stream/index.ts
index 3899430bfa..771fbb539c 100644
--- a/src/resources/stream/index.ts
+++ b/src/resources/stream/index.ts
@@ -55,10 +55,10 @@ export {
LiveInputs,
} from './live-inputs/index';
export {
- StreamUpdateResponse,
+ StreamCreateResponse,
StreamGetResponse,
StreamStreamVideosListVideosResponse,
- StreamUpdateParams,
+ StreamCreateParams,
StreamStreamVideosInitiateVideoUploadsUsingTusParams,
StreamStreamVideosListVideosParams,
Stream,
diff --git a/src/resources/stream/stream.ts b/src/resources/stream/stream.ts
index e29c87291c..f292b142db 100644
--- a/src/resources/stream/stream.ts
+++ b/src/resources/stream/stream.ts
@@ -36,17 +36,17 @@ export class Stream extends APIResource {
/**
* Edit details for a single video.
*/
- update(
+ create(
accountId: string,
identifier: string,
- body: StreamUpdateParams,
+ body: StreamCreateParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
return (
this._client.post(`/accounts/${accountId}/stream/${identifier}`, {
body,
...options,
- }) as Core.APIPromise<{ result: StreamUpdateResponse }>
+ }) as Core.APIPromise<{ result: StreamCreateResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -134,7 +134,7 @@ export class Stream extends APIResource {
}
}
-export interface StreamUpdateResponse {
+export interface StreamCreateResponse {
/**
* Lists the origins allowed to display the video. Enter allowed origin domains in
* an array and use `*` for wildcard subdomains. Empty arrays allow the video to be
@@ -159,7 +159,7 @@ export interface StreamUpdateResponse {
*/
duration?: number;
- input?: StreamUpdateResponse.Input;
+ input?: StreamCreateResponse.Input;
/**
* The live input ID used to upload a video with Stream Live.
@@ -185,7 +185,7 @@ export interface StreamUpdateResponse {
*/
modified?: string;
- playback?: StreamUpdateResponse.Playback;
+ playback?: StreamCreateResponse.Playback;
/**
* The video's preview page URI. This field is omitted until encoding is complete.
@@ -229,7 +229,7 @@ export interface StreamUpdateResponse {
* approximate percent of completion. If the `state` is `error`, `errorReasonCode`
* and `errorReasonText` provide additional details.
*/
- status?: StreamUpdateResponse.Status;
+ status?: StreamCreateResponse.Status;
/**
* The media item's thumbnail URI. This field is omitted until encoding is
@@ -261,10 +261,10 @@ export interface StreamUpdateResponse {
*/
uploadExpiry?: string;
- watermark?: StreamUpdateResponse.Watermark;
+ watermark?: StreamCreateResponse.Watermark;
}
-export namespace StreamUpdateResponse {
+export namespace StreamCreateResponse {
export interface Input {
/**
* The video height in pixels. A value of `-1` means the height is unknown. The
@@ -910,7 +910,7 @@ export namespace StreamStreamVideosListVideosResponse {
}
}
-export interface StreamUpdateParams {
+export interface StreamCreateParams {
/**
* Lists the origins allowed to display the video. Enter allowed origin domains in
* an array and use `*` for wildcard subdomains. Empty arrays allow the video to be
@@ -1036,10 +1036,10 @@ export interface StreamStreamVideosListVideosParams {
}
export namespace Stream {
- export import StreamUpdateResponse = StreamAPI.StreamUpdateResponse;
+ export import StreamCreateResponse = StreamAPI.StreamCreateResponse;
export import StreamGetResponse = StreamAPI.StreamGetResponse;
export import StreamStreamVideosListVideosResponse = StreamAPI.StreamStreamVideosListVideosResponse;
- export import StreamUpdateParams = StreamAPI.StreamUpdateParams;
+ export import StreamCreateParams = StreamAPI.StreamCreateParams;
export import StreamStreamVideosInitiateVideoUploadsUsingTusParams = StreamAPI.StreamStreamVideosInitiateVideoUploadsUsingTusParams;
export import StreamStreamVideosListVideosParams = StreamAPI.StreamStreamVideosListVideosParams;
export import AudioTracks = AudioTracksAPI.AudioTracks;
diff --git a/src/resources/subscriptions.ts b/src/resources/subscriptions.ts
index 42b1543f96..1b725eded2 100644
--- a/src/resources/subscriptions.ts
+++ b/src/resources/subscriptions.ts
@@ -5,6 +5,21 @@ import { APIResource } from 'cloudflare/resource';
import * as SubscriptionsAPI from 'cloudflare/resources/subscriptions';
export class Subscriptions extends APIResource {
+ /**
+ * Create a zone subscription, either plan or add-ons.
+ */
+ create(
+ identifier: string,
+ body: SubscriptionCreateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ return (
+ this._client.post(`/zones/${identifier}/subscription`, { body, ...options }) as Core.APIPromise<{
+ result: SubscriptionCreateResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
/**
* Updates an account subscription.
*/
@@ -69,16 +84,12 @@ export class Subscriptions extends APIResource {
}
/**
- * Create a zone subscription, either plan or add-ons.
+ * Lists zone subscription details.
*/
- zoneSubscriptionCreateZoneSubscription(
- identifier: string,
- body: SubscriptionZoneSubscriptionCreateZoneSubscriptionParams,
- options?: Core.RequestOptions,
- ): Core.APIPromise {
+ get(identifier: string, options?: Core.RequestOptions): Core.APIPromise {
return (
- this._client.post(`/zones/${identifier}/subscription`, { body, ...options }) as Core.APIPromise<{
- result: SubscriptionZoneSubscriptionCreateZoneSubscriptionResponse;
+ this._client.get(`/zones/${identifier}/subscription`, options) as Core.APIPromise<{
+ result: SubscriptionGetResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
@@ -97,22 +108,10 @@ export class Subscriptions extends APIResource {
}>
)._thenUnwrap((obj) => obj.result);
}
-
- /**
- * Lists zone subscription details.
- */
- zoneSubscriptionZoneSubscriptionDetails(
- identifier: string,
- options?: Core.RequestOptions,
- ): Core.APIPromise {
- return (
- this._client.get(`/zones/${identifier}/subscription`, options) as Core.APIPromise<{
- result: SubscriptionZoneSubscriptionZoneSubscriptionDetailsResponse;
- }>
- )._thenUnwrap((obj) => obj.result);
- }
}
+export type SubscriptionCreateResponse = unknown | string | null;
+
export type SubscriptionUpdateResponse = unknown | string | null;
export interface SubscriptionDeleteResponse {
@@ -273,19 +272,17 @@ export namespace SubscriptionAccountSubscriptionsListSubscriptionsResponse {
}
}
-export type SubscriptionZoneSubscriptionCreateZoneSubscriptionResponse = unknown | string | null;
+export type SubscriptionGetResponse = unknown | string | null;
export type SubscriptionZoneSubscriptionUpdateZoneSubscriptionResponse = unknown | string | null;
-export type SubscriptionZoneSubscriptionZoneSubscriptionDetailsResponse = unknown | string | null;
-
-export interface SubscriptionUpdateParams {
- app?: SubscriptionUpdateParams.App;
+export interface SubscriptionCreateParams {
+ app?: SubscriptionCreateParams.App;
/**
* The list of add-ons subscribed to.
*/
- component_values?: Array;
+ component_values?: Array;
/**
* How often the subscription is renewed automatically.
@@ -295,15 +292,15 @@ export interface SubscriptionUpdateParams {
/**
* The rate plan applied to the subscription.
*/
- rate_plan?: SubscriptionUpdateParams.RatePlan;
+ rate_plan?: SubscriptionCreateParams.RatePlan;
/**
* A simple zone object. May have null properties if not a zone subscription.
*/
- zone?: SubscriptionUpdateParams.Zone;
+ zone?: SubscriptionCreateParams.Zone;
}
-export namespace SubscriptionUpdateParams {
+export namespace SubscriptionCreateParams {
export interface App {
/**
* app install id.
@@ -382,13 +379,13 @@ export namespace SubscriptionUpdateParams {
export interface Zone {}
}
-export interface SubscriptionAccountSubscriptionsCreateSubscriptionParams {
- app?: SubscriptionAccountSubscriptionsCreateSubscriptionParams.App;
+export interface SubscriptionUpdateParams {
+ app?: SubscriptionUpdateParams.App;
/**
* The list of add-ons subscribed to.
*/
- component_values?: Array;
+ component_values?: Array;
/**
* How often the subscription is renewed automatically.
@@ -398,15 +395,15 @@ export interface SubscriptionAccountSubscriptionsCreateSubscriptionParams {
/**
* The rate plan applied to the subscription.
*/
- rate_plan?: SubscriptionAccountSubscriptionsCreateSubscriptionParams.RatePlan;
+ rate_plan?: SubscriptionUpdateParams.RatePlan;
/**
* A simple zone object. May have null properties if not a zone subscription.
*/
- zone?: SubscriptionAccountSubscriptionsCreateSubscriptionParams.Zone;
+ zone?: SubscriptionUpdateParams.Zone;
}
-export namespace SubscriptionAccountSubscriptionsCreateSubscriptionParams {
+export namespace SubscriptionUpdateParams {
export interface App {
/**
* app install id.
@@ -485,13 +482,13 @@ export namespace SubscriptionAccountSubscriptionsCreateSubscriptionParams {
export interface Zone {}
}
-export interface SubscriptionZoneSubscriptionCreateZoneSubscriptionParams {
- app?: SubscriptionZoneSubscriptionCreateZoneSubscriptionParams.App;
+export interface SubscriptionAccountSubscriptionsCreateSubscriptionParams {
+ app?: SubscriptionAccountSubscriptionsCreateSubscriptionParams.App;
/**
* The list of add-ons subscribed to.
*/
- component_values?: Array;
+ component_values?: Array;
/**
* How often the subscription is renewed automatically.
@@ -501,15 +498,15 @@ export interface SubscriptionZoneSubscriptionCreateZoneSubscriptionParams {
/**
* The rate plan applied to the subscription.
*/
- rate_plan?: SubscriptionZoneSubscriptionCreateZoneSubscriptionParams.RatePlan;
+ rate_plan?: SubscriptionAccountSubscriptionsCreateSubscriptionParams.RatePlan;
/**
* A simple zone object. May have null properties if not a zone subscription.
*/
- zone?: SubscriptionZoneSubscriptionCreateZoneSubscriptionParams.Zone;
+ zone?: SubscriptionAccountSubscriptionsCreateSubscriptionParams.Zone;
}
-export namespace SubscriptionZoneSubscriptionCreateZoneSubscriptionParams {
+export namespace SubscriptionAccountSubscriptionsCreateSubscriptionParams {
export interface App {
/**
* app install id.
@@ -692,15 +689,15 @@ export namespace SubscriptionZoneSubscriptionUpdateZoneSubscriptionParams {
}
export namespace Subscriptions {
+ export import SubscriptionCreateResponse = SubscriptionsAPI.SubscriptionCreateResponse;
export import SubscriptionUpdateResponse = SubscriptionsAPI.SubscriptionUpdateResponse;
export import SubscriptionDeleteResponse = SubscriptionsAPI.SubscriptionDeleteResponse;
export import SubscriptionAccountSubscriptionsCreateSubscriptionResponse = SubscriptionsAPI.SubscriptionAccountSubscriptionsCreateSubscriptionResponse;
export import SubscriptionAccountSubscriptionsListSubscriptionsResponse = SubscriptionsAPI.SubscriptionAccountSubscriptionsListSubscriptionsResponse;
- export import SubscriptionZoneSubscriptionCreateZoneSubscriptionResponse = SubscriptionsAPI.SubscriptionZoneSubscriptionCreateZoneSubscriptionResponse;
+ export import SubscriptionGetResponse = SubscriptionsAPI.SubscriptionGetResponse;
export import SubscriptionZoneSubscriptionUpdateZoneSubscriptionResponse = SubscriptionsAPI.SubscriptionZoneSubscriptionUpdateZoneSubscriptionResponse;
- export import SubscriptionZoneSubscriptionZoneSubscriptionDetailsResponse = SubscriptionsAPI.SubscriptionZoneSubscriptionZoneSubscriptionDetailsResponse;
+ export import SubscriptionCreateParams = SubscriptionsAPI.SubscriptionCreateParams;
export import SubscriptionUpdateParams = SubscriptionsAPI.SubscriptionUpdateParams;
export import SubscriptionAccountSubscriptionsCreateSubscriptionParams = SubscriptionsAPI.SubscriptionAccountSubscriptionsCreateSubscriptionParams;
- export import SubscriptionZoneSubscriptionCreateZoneSubscriptionParams = SubscriptionsAPI.SubscriptionZoneSubscriptionCreateZoneSubscriptionParams;
export import SubscriptionZoneSubscriptionUpdateZoneSubscriptionParams = SubscriptionsAPI.SubscriptionZoneSubscriptionUpdateZoneSubscriptionParams;
}
diff --git a/src/resources/teamnets/routes/index.ts b/src/resources/teamnets/routes/index.ts
index 36d5e4c532..8168d4842f 100644
--- a/src/resources/teamnets/routes/index.ts
+++ b/src/resources/teamnets/routes/index.ts
@@ -2,9 +2,9 @@
export { IPGetResponse, IPGetParams, IPs } from './ips';
export {
- NetworkUpdateResponse,
+ NetworkCreateResponse,
NetworkDeleteResponse,
- NetworkUpdateParams,
+ NetworkCreateParams,
NetworkDeleteParams,
Networks,
} from './networks';
diff --git a/src/resources/teamnets/routes/networks.ts b/src/resources/teamnets/routes/networks.ts
index 1685f09787..72e8340259 100644
--- a/src/resources/teamnets/routes/networks.ts
+++ b/src/resources/teamnets/routes/networks.ts
@@ -10,17 +10,17 @@ export class Networks extends APIResource {
* Routes a private network through a Cloudflare Tunnel. The CIDR in
* `ip_network_encoded` must be written in URL-encoded format.
*/
- update(
+ create(
accountId: string,
ipNetworkEncoded: string,
- body: NetworkUpdateParams,
+ body: NetworkCreateParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
return (
this._client.post(`/accounts/${accountId}/teamnet/routes/network/${ipNetworkEncoded}`, {
body,
...options,
- }) as Core.APIPromise<{ result: NetworkUpdateResponse }>
+ }) as Core.APIPromise<{ result: NetworkCreateResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -63,7 +63,7 @@ export class Networks extends APIResource {
}
}
-export interface NetworkUpdateResponse {
+export interface NetworkCreateResponse {
/**
* UUID of the route.
*/
@@ -143,7 +143,7 @@ export interface NetworkDeleteResponse {
virtual_network_id?: unknown;
}
-export interface NetworkUpdateParams {
+export interface NetworkCreateParams {
/**
* Optional remark describing the route.
*/
@@ -165,8 +165,8 @@ export interface NetworkDeleteParams {
}
export namespace Networks {
- export import NetworkUpdateResponse = NetworksAPI.NetworkUpdateResponse;
+ export import NetworkCreateResponse = NetworksAPI.NetworkCreateResponse;
export import NetworkDeleteResponse = NetworksAPI.NetworkDeleteResponse;
- export import NetworkUpdateParams = NetworksAPI.NetworkUpdateParams;
+ export import NetworkCreateParams = NetworksAPI.NetworkCreateParams;
export import NetworkDeleteParams = NetworksAPI.NetworkDeleteParams;
}
diff --git a/src/resources/teamnets/routes/routes.ts b/src/resources/teamnets/routes/routes.ts
index 21da1c0ec6..2f7fca1401 100644
--- a/src/resources/teamnets/routes/routes.ts
+++ b/src/resources/teamnets/routes/routes.ts
@@ -162,8 +162,8 @@ export namespace Routes {
export import IPGetResponse = IPsAPI.IPGetResponse;
export import IPGetParams = IPsAPI.IPGetParams;
export import Networks = NetworksAPI.Networks;
- export import NetworkUpdateResponse = NetworksAPI.NetworkUpdateResponse;
+ export import NetworkCreateResponse = NetworksAPI.NetworkCreateResponse;
export import NetworkDeleteResponse = NetworksAPI.NetworkDeleteResponse;
- export import NetworkUpdateParams = NetworksAPI.NetworkUpdateParams;
+ export import NetworkCreateParams = NetworksAPI.NetworkCreateParams;
export import NetworkDeleteParams = NetworksAPI.NetworkDeleteParams;
}
diff --git a/src/resources/zones/hold.ts b/src/resources/zones/holds.ts
similarity index 88%
rename from src/resources/zones/hold.ts
rename to src/resources/zones/holds.ts
index 645baa6064..4238a30e63 100644
--- a/src/resources/zones/hold.ts
+++ b/src/resources/zones/holds.ts
@@ -3,9 +3,9 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
-import * as HoldAPI from 'cloudflare/resources/zones/hold';
+import * as HoldsAPI from 'cloudflare/resources/zones/holds';
-export class Hold extends APIResource {
+export class Holds extends APIResource {
/**
* Enforce a zone hold on the zone, blocking the creation and activation of zones
* with this zone's hostname.
@@ -113,10 +113,10 @@ export interface HoldRemoveParams {
hold_after?: string;
}
-export namespace Hold {
- export import HoldEnforceResponse = HoldAPI.HoldEnforceResponse;
- export import HoldGetResponse = HoldAPI.HoldGetResponse;
- export import HoldRemoveResponse = HoldAPI.HoldRemoveResponse;
- export import HoldEnforceParams = HoldAPI.HoldEnforceParams;
- export import HoldRemoveParams = HoldAPI.HoldRemoveParams;
+export namespace Holds {
+ export import HoldEnforceResponse = HoldsAPI.HoldEnforceResponse;
+ export import HoldGetResponse = HoldsAPI.HoldGetResponse;
+ export import HoldRemoveResponse = HoldsAPI.HoldRemoveResponse;
+ export import HoldEnforceParams = HoldsAPI.HoldEnforceParams;
+ export import HoldRemoveParams = HoldsAPI.HoldRemoveParams;
}
diff --git a/src/resources/zones/index.ts b/src/resources/zones/index.ts
index a540cd2cdb..e3a4762f25 100644
--- a/src/resources/zones/index.ts
+++ b/src/resources/zones/index.ts
@@ -6,8 +6,8 @@ export {
HoldRemoveResponse,
HoldEnforceParams,
HoldRemoveParams,
- Hold,
-} from './hold';
+ Holds,
+} from './holds';
export {
ZoneCreateResponse,
ZoneUpdateResponse,
diff --git a/src/resources/zones/zones.ts b/src/resources/zones/zones.ts
index 8ca4153598..90e2921492 100644
--- a/src/resources/zones/zones.ts
+++ b/src/resources/zones/zones.ts
@@ -4,10 +4,10 @@ import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
import * as ZonesAPI from 'cloudflare/resources/zones/zones';
-import * as HoldAPI from 'cloudflare/resources/zones/hold';
+import * as HoldsAPI from 'cloudflare/resources/zones/holds';
export class Zones extends APIResource {
- hold: HoldAPI.Hold = new HoldAPI.Hold(this._client);
+ holds: HoldsAPI.Holds = new HoldsAPI.Holds(this._client);
/**
* Create Zone
@@ -805,10 +805,10 @@ export namespace Zones {
export import ZoneCreateParams = ZonesAPI.ZoneCreateParams;
export import ZoneUpdateParams = ZonesAPI.ZoneUpdateParams;
export import ZoneListParams = ZonesAPI.ZoneListParams;
- export import Hold = HoldAPI.Hold;
- export import HoldEnforceResponse = HoldAPI.HoldEnforceResponse;
- export import HoldGetResponse = HoldAPI.HoldGetResponse;
- export import HoldRemoveResponse = HoldAPI.HoldRemoveResponse;
- export import HoldEnforceParams = HoldAPI.HoldEnforceParams;
- export import HoldRemoveParams = HoldAPI.HoldRemoveParams;
+ export import Holds = HoldsAPI.Holds;
+ export import HoldEnforceResponse = HoldsAPI.HoldEnforceResponse;
+ export import HoldGetResponse = HoldsAPI.HoldGetResponse;
+ export import HoldRemoveResponse = HoldsAPI.HoldRemoveResponse;
+ export import HoldEnforceParams = HoldsAPI.HoldEnforceParams;
+ export import HoldRemoveParams = HoldsAPI.HoldRemoveParams;
}
diff --git a/tests/api-resources/access/users/failed-logins.test.ts b/tests/api-resources/access/users/failed-logins.test.ts
index 3cb76eab73..48957b961b 100644
--- a/tests/api-resources/access/users/failed-logins.test.ts
+++ b/tests/api-resources/access/users/failed-logins.test.ts
@@ -13,8 +13,8 @@ const cloudflare = new Cloudflare({
describe('resource failedLogins', () => {
// skipped: tests are disabled for the time being
- test.skip('zeroTrustUsersGetFailedLogins', async () => {
- const responsePromise = cloudflare.access.users.failedLogins.zeroTrustUsersGetFailedLogins(
+ test.skip('get', async () => {
+ const responsePromise = cloudflare.access.users.failedLogins.get(
'023e105f4ecef8ad9ca31a8372d0c353',
'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
);
@@ -28,10 +28,10 @@ describe('resource failedLogins', () => {
});
// skipped: tests are disabled for the time being
- test.skip('zeroTrustUsersGetFailedLogins: request options instead of params are passed correctly', async () => {
+ test.skip('get: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.access.users.failedLogins.zeroTrustUsersGetFailedLogins(
+ cloudflare.access.users.failedLogins.get(
'023e105f4ecef8ad9ca31a8372d0c353',
'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
{ path: '/_stainless_unknown_path' },
diff --git a/tests/api-resources/acms/total-tls.test.ts b/tests/api-resources/acms/total-tls.test.ts
index 972f1e4120..6a1a13a9ff 100644
--- a/tests/api-resources/acms/total-tls.test.ts
+++ b/tests/api-resources/acms/total-tls.test.ts
@@ -13,8 +13,8 @@ const cloudflare = new Cloudflare({
describe('resource totalTLS', () => {
// skipped: tests are disabled for the time being
- test.skip('update: only required params', async () => {
- const responsePromise = cloudflare.acms.totalTLS.update('023e105f4ecef8ad9ca31a8372d0c353', {
+ test.skip('create: only required params', async () => {
+ const responsePromise = cloudflare.acms.totalTLS.create('023e105f4ecef8ad9ca31a8372d0c353', {
enabled: true,
});
const rawResponse = await responsePromise.asResponse();
@@ -27,8 +27,8 @@ describe('resource totalTLS', () => {
});
// skipped: tests are disabled for the time being
- test.skip('update: required and optional params', async () => {
- const response = await cloudflare.acms.totalTLS.update('023e105f4ecef8ad9ca31a8372d0c353', {
+ test.skip('create: required and optional params', async () => {
+ const response = await cloudflare.acms.totalTLS.create('023e105f4ecef8ad9ca31a8372d0c353', {
enabled: true,
certificate_authority: 'google',
});
diff --git a/tests/api-resources/certificates.test.ts b/tests/api-resources/certificates.test.ts
index 8c5880b541..0c63b6035f 100644
--- a/tests/api-resources/certificates.test.ts
+++ b/tests/api-resources/certificates.test.ts
@@ -13,8 +13,8 @@ const cloudflare = new Cloudflare({
describe('resource certificates', () => {
// skipped: tests are disabled for the time being
- test.skip('delete', async () => {
- const responsePromise = cloudflare.certificates.delete('023e105f4ecef8ad9ca31a8372d0c353');
+ test.skip('create', async () => {
+ const responsePromise = cloudflare.certificates.create({});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -25,8 +25,8 @@ describe('resource certificates', () => {
});
// skipped: tests are disabled for the time being
- test.skip('get', async () => {
- const responsePromise = cloudflare.certificates.get('023e105f4ecef8ad9ca31a8372d0c353');
+ test.skip('list', async () => {
+ const responsePromise = cloudflare.certificates.list();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -37,16 +37,16 @@ describe('resource certificates', () => {
});
// skipped: tests are disabled for the time being
- test.skip('get: request options instead of params are passed correctly', async () => {
+ test.skip('list: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
- await expect(
- cloudflare.certificates.get('023e105f4ecef8ad9ca31a8372d0c353', { path: '/_stainless_unknown_path' }),
- ).rejects.toThrow(Cloudflare.NotFoundError);
+ await expect(cloudflare.certificates.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
+ Cloudflare.NotFoundError,
+ );
});
// skipped: tests are disabled for the time being
- test.skip('originCaCreateCertificate', async () => {
- const responsePromise = cloudflare.certificates.originCaCreateCertificate({});
+ test.skip('delete', async () => {
+ const responsePromise = cloudflare.certificates.delete('023e105f4ecef8ad9ca31a8372d0c353');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -57,8 +57,8 @@ describe('resource certificates', () => {
});
// skipped: tests are disabled for the time being
- test.skip('originCaListCertificates', async () => {
- const responsePromise = cloudflare.certificates.originCaListCertificates();
+ test.skip('get', async () => {
+ const responsePromise = cloudflare.certificates.get('023e105f4ecef8ad9ca31a8372d0c353');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -69,10 +69,10 @@ describe('resource certificates', () => {
});
// skipped: tests are disabled for the time being
- test.skip('originCaListCertificates: request options instead of params are passed correctly', async () => {
+ test.skip('get: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.certificates.originCaListCertificates({ path: '/_stainless_unknown_path' }),
+ cloudflare.certificates.get('023e105f4ecef8ad9ca31a8372d0c353', { path: '/_stainless_unknown_path' }),
).rejects.toThrow(Cloudflare.NotFoundError);
});
});
diff --git a/tests/api-resources/custom-ns/verifies.test.ts b/tests/api-resources/custom-ns/verifies.test.ts
index 0a18acf81c..8f2d6cc3af 100644
--- a/tests/api-resources/custom-ns/verifies.test.ts
+++ b/tests/api-resources/custom-ns/verifies.test.ts
@@ -13,8 +13,8 @@ const cloudflare = new Cloudflare({
describe('resource verifies', () => {
// skipped: tests are disabled for the time being
- test.skip('update', async () => {
- const responsePromise = cloudflare.customNs.verifies.update('372e67954025e0ba6aaa6d586b9e0b59');
+ test.skip('create', async () => {
+ const responsePromise = cloudflare.customNs.verifies.create('372e67954025e0ba6aaa6d586b9e0b59');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
diff --git a/tests/api-resources/logpush/edges.test.ts b/tests/api-resources/logpush/edges.test.ts
index f4a46253e4..9be1ef936d 100644
--- a/tests/api-resources/logpush/edges.test.ts
+++ b/tests/api-resources/logpush/edges.test.ts
@@ -13,8 +13,8 @@ const cloudflare = new Cloudflare({
describe('resource edges', () => {
// skipped: tests are disabled for the time being
- test.skip('update', async () => {
- const responsePromise = cloudflare.logpush.edges.update('023e105f4ecef8ad9ca31a8372d0c353', {});
+ test.skip('create', async () => {
+ const responsePromise = cloudflare.logpush.edges.create('023e105f4ecef8ad9ca31a8372d0c353', {});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
diff --git a/tests/api-resources/mtls-certificates/mtls-certificates.test.ts b/tests/api-resources/mtls-certificates/mtls-certificates.test.ts
index 9a294e4014..950d3b5eb0 100644
--- a/tests/api-resources/mtls-certificates/mtls-certificates.test.ts
+++ b/tests/api-resources/mtls-certificates/mtls-certificates.test.ts
@@ -13,8 +13,8 @@ const cloudflare = new Cloudflare({
describe('resource mtlsCertificates', () => {
// skipped: tests are disabled for the time being
- test.skip('update: only required params', async () => {
- const responsePromise = cloudflare.mtlsCertificates.update('023e105f4ecef8ad9ca31a8372d0c353', {
+ test.skip('create: only required params', async () => {
+ const responsePromise = cloudflare.mtlsCertificates.create('023e105f4ecef8ad9ca31a8372d0c353', {
ca: true,
certificates:
'-----BEGIN CERTIFICATE-----\nMIIDmDCCAoCgAwIBAgIUKTOAZNjcXVZRj4oQt0SHsl1c1vMwDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVVMxFjAUBgNVBAgMDVNhbiBGcmFuY2lzY28xEzARBgNVBAcMCkNhbGlmb3JuaWExFTATBgNVBAoMDEV4YW1wbGUgSW5jLjAgFw0yMjExMjIxNjU5NDdaGA8yMTIyMTAyOTE2NTk0N1owUTELMAkGA1UEBhMCVVMxFjAUBgNVBAgMDVNhbiBGcmFuY2lzY28xEzARBgNVBAcMCkNhbGlmb3JuaWExFTATBgNVBAoMDEV4YW1wbGUgSW5jLjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMRcORwgJFTdcG/2GKI+cFYiOBNDKjCZUXEOvXWY42BkH9wxiMT869CO+enA1w5pIrXow6kCM1sQspHHaVmJUlotEMJxyoLFfA/8Kt1EKFyobOjuZs2SwyVyJ2sStvQuUQEosULZCNGZEqoH5g6zhMPxaxm7ZLrrsDZ9maNGVqo7EWLWHrZ57Q/5MtTrbxQL+eXjUmJ9K3kS+3uEwMdqR6Z3BluU1ivanpPc1CN2GNhdO0/hSY4YkGEnuLsqJyDd3cIiB1MxuCBJ4ZaqOd2viV1WcP3oU3dxVPm4MWyfYIldMWB14FahScxLhWdRnM9YZ/i9IFcLypXsuz7DjrJPtPUCAwEAAaNmMGQwHQYDVR0OBBYEFP5JzLUawNF+c3AXsYTEWHh7z2czMB8GA1UdIwQYMBaAFP5JzLUawNF+c3AXsYTEWHh7z2czMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMA0GCSqGSIb3DQEBCwUAA4IBAQBc+Be7NDhpE09y7hLPZGRPl1cSKBw4RI0XIv6rlbSTFs5EebpTGjhx/whNxwEZhB9HZ7111Oa1YlT8xkI9DshB78mjAHCKBAJ76moK8tkG0aqdYpJ4ZcJTVBB7l98Rvgc7zfTii7WemTy72deBbSeiEtXavm4EF0mWjHhQ5Nxpnp00Bqn5g1x8CyTDypgmugnep+xG+iFzNmTdsz7WI9T/7kDMXqB7M/FPWBORyS98OJqNDswCLF8bIZYwUBEe+bRHFomoShMzaC3tvim7WCb16noDkSTMlfKO4pnvKhpcVdSgwcruATV7y+W+Lvmz2OT/Gui4JhqeoTewsxndhDDE\n-----END CERTIFICATE-----',
@@ -29,8 +29,8 @@ describe('resource mtlsCertificates', () => {
});
// skipped: tests are disabled for the time being
- test.skip('update: required and optional params', async () => {
- const response = await cloudflare.mtlsCertificates.update('023e105f4ecef8ad9ca31a8372d0c353', {
+ test.skip('create: required and optional params', async () => {
+ const response = await cloudflare.mtlsCertificates.create('023e105f4ecef8ad9ca31a8372d0c353', {
ca: true,
certificates:
'-----BEGIN CERTIFICATE-----\nMIIDmDCCAoCgAwIBAgIUKTOAZNjcXVZRj4oQt0SHsl1c1vMwDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVVMxFjAUBgNVBAgMDVNhbiBGcmFuY2lzY28xEzARBgNVBAcMCkNhbGlmb3JuaWExFTATBgNVBAoMDEV4YW1wbGUgSW5jLjAgFw0yMjExMjIxNjU5NDdaGA8yMTIyMTAyOTE2NTk0N1owUTELMAkGA1UEBhMCVVMxFjAUBgNVBAgMDVNhbiBGcmFuY2lzY28xEzARBgNVBAcMCkNhbGlmb3JuaWExFTATBgNVBAoMDEV4YW1wbGUgSW5jLjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMRcORwgJFTdcG/2GKI+cFYiOBNDKjCZUXEOvXWY42BkH9wxiMT869CO+enA1w5pIrXow6kCM1sQspHHaVmJUlotEMJxyoLFfA/8Kt1EKFyobOjuZs2SwyVyJ2sStvQuUQEosULZCNGZEqoH5g6zhMPxaxm7ZLrrsDZ9maNGVqo7EWLWHrZ57Q/5MtTrbxQL+eXjUmJ9K3kS+3uEwMdqR6Z3BluU1ivanpPc1CN2GNhdO0/hSY4YkGEnuLsqJyDd3cIiB1MxuCBJ4ZaqOd2viV1WcP3oU3dxVPm4MWyfYIldMWB14FahScxLhWdRnM9YZ/i9IFcLypXsuz7DjrJPtPUCAwEAAaNmMGQwHQYDVR0OBBYEFP5JzLUawNF+c3AXsYTEWHh7z2czMB8GA1UdIwQYMBaAFP5JzLUawNF+c3AXsYTEWHh7z2czMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMA0GCSqGSIb3DQEBCwUAA4IBAQBc+Be7NDhpE09y7hLPZGRPl1cSKBw4RI0XIv6rlbSTFs5EebpTGjhx/whNxwEZhB9HZ7111Oa1YlT8xkI9DshB78mjAHCKBAJ76moK8tkG0aqdYpJ4ZcJTVBB7l98Rvgc7zfTii7WemTy72deBbSeiEtXavm4EF0mWjHhQ5Nxpnp00Bqn5g1x8CyTDypgmugnep+xG+iFzNmTdsz7WI9T/7kDMXqB7M/FPWBORyS98OJqNDswCLF8bIZYwUBEe+bRHFomoShMzaC3tvim7WCb16noDkSTMlfKO4pnvKhpcVdSgwcruATV7y+W+Lvmz2OT/Gui4JhqeoTewsxndhDDE\n-----END CERTIFICATE-----',
diff --git a/tests/api-resources/ssls/analyzes.test.ts b/tests/api-resources/ssls/analyzes.test.ts
index 24a908b251..b71d8657a8 100644
--- a/tests/api-resources/ssls/analyzes.test.ts
+++ b/tests/api-resources/ssls/analyzes.test.ts
@@ -13,11 +13,8 @@ const cloudflare = new Cloudflare({
describe('resource analyzes', () => {
// skipped: tests are disabled for the time being
- test.skip('analyzeCertificateAnalyzeCertificate', async () => {
- const responsePromise = cloudflare.ssls.analyzes.analyzeCertificateAnalyzeCertificate(
- '023e105f4ecef8ad9ca31a8372d0c353',
- {},
- );
+ test.skip('create', async () => {
+ const responsePromise = cloudflare.ssls.analyzes.create('023e105f4ecef8ad9ca31a8372d0c353', {});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
diff --git a/tests/api-resources/ssls/certificate-packs/certificate-packs.test.ts b/tests/api-resources/ssls/certificate-packs/certificate-packs.test.ts
index 68ccc83849..d773501b3e 100644
--- a/tests/api-resources/ssls/certificate-packs/certificate-packs.test.ts
+++ b/tests/api-resources/ssls/certificate-packs/certificate-packs.test.ts
@@ -28,25 +28,8 @@ describe('resource certificatePacks', () => {
});
// skipped: tests are disabled for the time being
- test.skip('delete', async () => {
- const responsePromise = cloudflare.ssls.certificatePacks.delete(
- '023e105f4ecef8ad9ca31a8372d0c353',
- '023e105f4ecef8ad9ca31a8372d0c353',
- );
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- // skipped: tests are disabled for the time being
- test.skip('certificatePacksListCertificatePacks', async () => {
- const responsePromise = cloudflare.ssls.certificatePacks.certificatePacksListCertificatePacks(
- '023e105f4ecef8ad9ca31a8372d0c353',
- );
+ test.skip('list', async () => {
+ const responsePromise = cloudflare.ssls.certificatePacks.list('023e105f4ecef8ad9ca31a8372d0c353');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -57,21 +40,20 @@ describe('resource certificatePacks', () => {
});
// skipped: tests are disabled for the time being
- test.skip('certificatePacksListCertificatePacks: request options instead of params are passed correctly', async () => {
+ test.skip('list: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.ssls.certificatePacks.certificatePacksListCertificatePacks(
- '023e105f4ecef8ad9ca31a8372d0c353',
- { path: '/_stainless_unknown_path' },
- ),
+ cloudflare.ssls.certificatePacks.list('023e105f4ecef8ad9ca31a8372d0c353', {
+ path: '/_stainless_unknown_path',
+ }),
).rejects.toThrow(Cloudflare.NotFoundError);
});
// skipped: tests are disabled for the time being
- test.skip('certificatePacksListCertificatePacks: request options and params are passed correctly', async () => {
+ test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.ssls.certificatePacks.certificatePacksListCertificatePacks(
+ cloudflare.ssls.certificatePacks.list(
'023e105f4ecef8ad9ca31a8372d0c353',
{ status: 'all' },
{ path: '/_stainless_unknown_path' },
@@ -79,6 +61,21 @@ describe('resource certificatePacks', () => {
).rejects.toThrow(Cloudflare.NotFoundError);
});
+ // skipped: tests are disabled for the time being
+ test.skip('delete', async () => {
+ const responsePromise = cloudflare.ssls.certificatePacks.delete(
+ '023e105f4ecef8ad9ca31a8372d0c353',
+ '023e105f4ecef8ad9ca31a8372d0c353',
+ );
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
// skipped: tests are disabled for the time being
test.skip('get', async () => {
const responsePromise = cloudflare.ssls.certificatePacks.get(
diff --git a/tests/api-resources/ssls/certificate-packs/orders.test.ts b/tests/api-resources/ssls/certificate-packs/orders.test.ts
index 48169c298a..36349af0fc 100644
--- a/tests/api-resources/ssls/certificate-packs/orders.test.ts
+++ b/tests/api-resources/ssls/certificate-packs/orders.test.ts
@@ -13,18 +13,17 @@ const cloudflare = new Cloudflare({
describe('resource orders', () => {
// skipped: tests are disabled for the time being
- test.skip('certificatePacksOrderAdvancedCertificateManagerCertificatePack: only required params', async () => {
- const responsePromise =
- cloudflare.ssls.certificatePacks.orders.certificatePacksOrderAdvancedCertificateManagerCertificatePack(
- '023e105f4ecef8ad9ca31a8372d0c353',
- {
- certificate_authority: 'lets_encrypt',
- hosts: ['example.com', '*.example.com', 'www.example.com'],
- type: 'advanced',
- validation_method: 'txt',
- validity_days: 14,
- },
- );
+ test.skip('create: only required params', async () => {
+ const responsePromise = cloudflare.ssls.certificatePacks.orders.create(
+ '023e105f4ecef8ad9ca31a8372d0c353',
+ {
+ certificate_authority: 'lets_encrypt',
+ hosts: ['example.com', '*.example.com', 'www.example.com'],
+ type: 'advanced',
+ validation_method: 'txt',
+ validity_days: 14,
+ },
+ );
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -35,18 +34,17 @@ describe('resource orders', () => {
});
// skipped: tests are disabled for the time being
- test.skip('certificatePacksOrderAdvancedCertificateManagerCertificatePack: required and optional params', async () => {
- const response =
- await cloudflare.ssls.certificatePacks.orders.certificatePacksOrderAdvancedCertificateManagerCertificatePack(
- '023e105f4ecef8ad9ca31a8372d0c353',
- {
- certificate_authority: 'lets_encrypt',
- hosts: ['example.com', '*.example.com', 'www.example.com'],
- type: 'advanced',
- validation_method: 'txt',
- validity_days: 14,
- cloudflare_branding: false,
- },
- );
+ test.skip('create: required and optional params', async () => {
+ const response = await cloudflare.ssls.certificatePacks.orders.create(
+ '023e105f4ecef8ad9ca31a8372d0c353',
+ {
+ certificate_authority: 'lets_encrypt',
+ hosts: ['example.com', '*.example.com', 'www.example.com'],
+ type: 'advanced',
+ validation_method: 'txt',
+ validity_days: 14,
+ cloudflare_branding: false,
+ },
+ );
});
});
diff --git a/tests/api-resources/ssls/certificate-packs/quotas.test.ts b/tests/api-resources/ssls/certificate-packs/quotas.test.ts
index 83335e01e4..e7b5a66a61 100644
--- a/tests/api-resources/ssls/certificate-packs/quotas.test.ts
+++ b/tests/api-resources/ssls/certificate-packs/quotas.test.ts
@@ -13,10 +13,8 @@ const cloudflare = new Cloudflare({
describe('resource quotas', () => {
// skipped: tests are disabled for the time being
- test.skip('certificatePacksGetCertificatePackQuotas', async () => {
- const responsePromise = cloudflare.ssls.certificatePacks.quotas.certificatePacksGetCertificatePackQuotas(
- '023e105f4ecef8ad9ca31a8372d0c353',
- );
+ test.skip('get', async () => {
+ const responsePromise = cloudflare.ssls.certificatePacks.quotas.get('023e105f4ecef8ad9ca31a8372d0c353');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -27,13 +25,12 @@ describe('resource quotas', () => {
});
// skipped: tests are disabled for the time being
- test.skip('certificatePacksGetCertificatePackQuotas: request options instead of params are passed correctly', async () => {
+ test.skip('get: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.ssls.certificatePacks.quotas.certificatePacksGetCertificatePackQuotas(
- '023e105f4ecef8ad9ca31a8372d0c353',
- { path: '/_stainless_unknown_path' },
- ),
+ cloudflare.ssls.certificatePacks.quotas.get('023e105f4ecef8ad9ca31a8372d0c353', {
+ path: '/_stainless_unknown_path',
+ }),
).rejects.toThrow(Cloudflare.NotFoundError);
});
});
diff --git a/tests/api-resources/stream/stream.test.ts b/tests/api-resources/stream/stream.test.ts
index 3883dafe8a..2f030aece6 100644
--- a/tests/api-resources/stream/stream.test.ts
+++ b/tests/api-resources/stream/stream.test.ts
@@ -13,8 +13,8 @@ const cloudflare = new Cloudflare({
describe('resource stream', () => {
// skipped: tests are disabled for the time being
- test.skip('update', async () => {
- const responsePromise = cloudflare.stream.update(
+ test.skip('create', async () => {
+ const responsePromise = cloudflare.stream.create(
'023e105f4ecef8ad9ca31a8372d0c353',
'ea95132c15732412d22c1476fa83f27a',
{},
diff --git a/tests/api-resources/subscriptions.test.ts b/tests/api-resources/subscriptions.test.ts
index 05113b8feb..3edddf03d5 100644
--- a/tests/api-resources/subscriptions.test.ts
+++ b/tests/api-resources/subscriptions.test.ts
@@ -12,6 +12,18 @@ const cloudflare = new Cloudflare({
});
describe('resource subscriptions', () => {
+ // skipped: tests are disabled for the time being
+ test.skip('create', async () => {
+ const responsePromise = cloudflare.subscriptions.create('506e3185e9c882d175a2d0cb0093d9f2', {});
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
// skipped: tests are disabled for the time being
test.skip('update', async () => {
const responsePromise = cloudflare.subscriptions.update(
@@ -83,11 +95,8 @@ describe('resource subscriptions', () => {
});
// skipped: tests are disabled for the time being
- test.skip('zoneSubscriptionCreateZoneSubscription', async () => {
- const responsePromise = cloudflare.subscriptions.zoneSubscriptionCreateZoneSubscription(
- '506e3185e9c882d175a2d0cb0093d9f2',
- {},
- );
+ test.skip('get', async () => {
+ const responsePromise = cloudflare.subscriptions.get('506e3185e9c882d175a2d0cb0093d9f2');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -98,24 +107,18 @@ describe('resource subscriptions', () => {
});
// skipped: tests are disabled for the time being
- test.skip('zoneSubscriptionUpdateZoneSubscription', async () => {
- const responsePromise = cloudflare.subscriptions.zoneSubscriptionUpdateZoneSubscription(
- '506e3185e9c882d175a2d0cb0093d9f2',
- {},
- );
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
+ test.skip('get: request options instead of params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ cloudflare.subscriptions.get('506e3185e9c882d175a2d0cb0093d9f2', { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Cloudflare.NotFoundError);
});
// skipped: tests are disabled for the time being
- test.skip('zoneSubscriptionZoneSubscriptionDetails', async () => {
- const responsePromise = cloudflare.subscriptions.zoneSubscriptionZoneSubscriptionDetails(
+ test.skip('zoneSubscriptionUpdateZoneSubscription', async () => {
+ const responsePromise = cloudflare.subscriptions.zoneSubscriptionUpdateZoneSubscription(
'506e3185e9c882d175a2d0cb0093d9f2',
+ {},
);
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
@@ -125,14 +128,4 @@ describe('resource subscriptions', () => {
expect(dataAndResponse.data).toBe(response);
expect(dataAndResponse.response).toBe(rawResponse);
});
-
- // skipped: tests are disabled for the time being
- test.skip('zoneSubscriptionZoneSubscriptionDetails: request options instead of params are passed correctly', async () => {
- // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
- await expect(
- cloudflare.subscriptions.zoneSubscriptionZoneSubscriptionDetails('506e3185e9c882d175a2d0cb0093d9f2', {
- path: '/_stainless_unknown_path',
- }),
- ).rejects.toThrow(Cloudflare.NotFoundError);
- });
});
diff --git a/tests/api-resources/teamnets/routes/networks.test.ts b/tests/api-resources/teamnets/routes/networks.test.ts
index 3aa1f2eb6b..410e3d9812 100644
--- a/tests/api-resources/teamnets/routes/networks.test.ts
+++ b/tests/api-resources/teamnets/routes/networks.test.ts
@@ -13,8 +13,8 @@ const cloudflare = new Cloudflare({
describe('resource networks', () => {
// skipped: tests are disabled for the time being
- test.skip('update', async () => {
- const responsePromise = cloudflare.teamnets.routes.networks.update(
+ test.skip('create', async () => {
+ const responsePromise = cloudflare.teamnets.routes.networks.create(
'699d98642c564d2e855e9661899b7252',
'172.16.0.0%2F16',
{},
diff --git a/tests/api-resources/zones/hold.test.ts b/tests/api-resources/zones/holds.test.ts
similarity index 85%
rename from tests/api-resources/zones/hold.test.ts
rename to tests/api-resources/zones/holds.test.ts
index 6022112062..c0820c05e0 100644
--- a/tests/api-resources/zones/hold.test.ts
+++ b/tests/api-resources/zones/holds.test.ts
@@ -11,10 +11,10 @@ const cloudflare = new Cloudflare({
baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
});
-describe('resource hold', () => {
+describe('resource holds', () => {
// skipped: tests are disabled for the time being
test.skip('enforce', async () => {
- const responsePromise = cloudflare.zones.hold.enforce('023e105f4ecef8ad9ca31a8372d0c353');
+ const responsePromise = cloudflare.zones.holds.enforce('023e105f4ecef8ad9ca31a8372d0c353');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -28,7 +28,9 @@ describe('resource hold', () => {
test.skip('enforce: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.zones.hold.enforce('023e105f4ecef8ad9ca31a8372d0c353', { path: '/_stainless_unknown_path' }),
+ cloudflare.zones.holds.enforce('023e105f4ecef8ad9ca31a8372d0c353', {
+ path: '/_stainless_unknown_path',
+ }),
).rejects.toThrow(Cloudflare.NotFoundError);
});
@@ -36,7 +38,7 @@ describe('resource hold', () => {
test.skip('enforce: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.zones.hold.enforce(
+ cloudflare.zones.holds.enforce(
'023e105f4ecef8ad9ca31a8372d0c353',
{ include_subdomains: true },
{ path: '/_stainless_unknown_path' },
@@ -46,7 +48,7 @@ describe('resource hold', () => {
// skipped: tests are disabled for the time being
test.skip('get', async () => {
- const responsePromise = cloudflare.zones.hold.get('023e105f4ecef8ad9ca31a8372d0c353');
+ const responsePromise = cloudflare.zones.holds.get('023e105f4ecef8ad9ca31a8372d0c353');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -60,13 +62,13 @@ describe('resource hold', () => {
test.skip('get: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.zones.hold.get('023e105f4ecef8ad9ca31a8372d0c353', { path: '/_stainless_unknown_path' }),
+ cloudflare.zones.holds.get('023e105f4ecef8ad9ca31a8372d0c353', { path: '/_stainless_unknown_path' }),
).rejects.toThrow(Cloudflare.NotFoundError);
});
// skipped: tests are disabled for the time being
test.skip('remove', async () => {
- const responsePromise = cloudflare.zones.hold.remove('023e105f4ecef8ad9ca31a8372d0c353');
+ const responsePromise = cloudflare.zones.holds.remove('023e105f4ecef8ad9ca31a8372d0c353');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -80,7 +82,7 @@ describe('resource hold', () => {
test.skip('remove: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.zones.hold.remove('023e105f4ecef8ad9ca31a8372d0c353', { path: '/_stainless_unknown_path' }),
+ cloudflare.zones.holds.remove('023e105f4ecef8ad9ca31a8372d0c353', { path: '/_stainless_unknown_path' }),
).rejects.toThrow(Cloudflare.NotFoundError);
});
@@ -88,7 +90,7 @@ describe('resource hold', () => {
test.skip('remove: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.zones.hold.remove(
+ cloudflare.zones.holds.remove(
'023e105f4ecef8ad9ca31a8372d0c353',
{ hold_after: 'string' },
{ path: '/_stainless_unknown_path' },