From 7cc4cec11f2f11fb65027ca1c4aefe8019b7d514 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 9 May 2024 18:06:30 +0000 Subject: [PATCH 001/473] feat(api): OpenAPI spec update via Stainless API (#497) --- .stats.yml | 2 +- api.md | 27 +- src/resources/calls.ts | 17 +- .../cloudforce-one/requests/message.ts | 22 +- .../cloudforce-one/requests/priority.ts | 22 +- .../cloudforce-one/requests/requests.ts | 22 +- .../intel/indicator-feeds/indicator-feeds.ts | 2 +- src/resources/radar/http/ases/ases.ts | 5 + src/resources/radar/http/ases/bot-class.ts | 5 + src/resources/radar/http/ases/device-type.ts | 5 + src/resources/radar/http/ases/http-method.ts | 5 + .../radar/http/ases/http-protocol.ts | 5 + src/resources/radar/http/ases/ip-version.ts | 5 + src/resources/radar/http/ases/os.ts | 5 + src/resources/radar/http/ases/tls-version.ts | 5 + .../radar/http/locations/bot-class.ts | 5 + .../radar/http/locations/device-type.ts | 5 + .../radar/http/locations/http-method.ts | 5 + .../radar/http/locations/http-protocol.ts | 5 + .../radar/http/locations/ip-version.ts | 5 + .../radar/http/locations/locations.ts | 5 + src/resources/radar/http/locations/os.ts | 5 + .../radar/http/locations/tls-version.ts | 5 + src/resources/radar/http/top.ts | 10 + src/resources/rulesets/phases/phases.ts | 327 + src/resources/rulesets/phases/versions.ts | 114 + src/resources/rulesets/rules.ts | 620 +- src/resources/rulesets/rulesets.ts | 540 + src/resources/rulesets/versions/by-tag.ts | 114 + src/resources/rulesets/versions/versions.ts | 114 + src/resources/zero-trust/access/access.ts | 6 +- .../access/applications/applications.ts | 15061 +++++++++++++++- .../zero-trust/access/applications/index.ts | 12 +- .../access/applications/policies.ts | 374 +- src/resources/zero-trust/access/index.ts | 6 +- .../indicator-feeds/indicator-feeds.test.ts | 2 +- .../radar/http/ases/ases.test.ts | 1 + .../radar/http/ases/bot-class.test.ts | 1 + .../radar/http/ases/device-type.test.ts | 1 + .../radar/http/ases/http-method.test.ts | 1 + .../radar/http/ases/http-protocol.test.ts | 1 + .../radar/http/ases/ip-version.test.ts | 1 + .../api-resources/radar/http/ases/os.test.ts | 1 + .../radar/http/ases/tls-version.test.ts | 1 + .../radar/http/locations/bot-class.test.ts | 1 + .../radar/http/locations/device-type.test.ts | 1 + .../radar/http/locations/http-method.test.ts | 1 + .../http/locations/http-protocol.test.ts | 1 + .../radar/http/locations/ip-version.test.ts | 1 + .../radar/http/locations/locations.test.ts | 1 + .../radar/http/locations/os.test.ts | 1 + .../radar/http/locations/tls-version.test.ts | 1 + tests/api-resources/radar/http/top.test.ts | 2 + .../access/applications/applications.test.ts | 10 + 54 files changed, 17129 insertions(+), 393 deletions(-) diff --git a/.stats.yml b/.stats.yml index b162e09939..9dfc386c5a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1274 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07ec76fab00de3d6227209faf0af1ed586cde9e2f243c13d3db555da20f13d99.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-88d076c2683d7002e7743172b9488fb67d1a07b61995921f27209e01b224af60.yml diff --git a/api.md b/api.md index 6a395e187f..7320b0fdef 100644 --- a/api.md +++ b/api.md @@ -4414,16 +4414,20 @@ Types: - SaaSAppSource - SAMLSaaSApp - SelfHostedDomains +- ApplicationCreateResponse +- ApplicationUpdateResponse +- ApplicationListResponse - ApplicationDeleteResponse +- ApplicationGetResponse - ApplicationRevokeTokensResponse Methods: -- client.zeroTrust.access.applications.create({ ...params }) -> Application -- client.zeroTrust.access.applications.update(appId, { ...params }) -> Application -- client.zeroTrust.access.applications.list({ ...params }) -> ApplicationsSinglePage +- client.zeroTrust.access.applications.create({ ...params }) -> ApplicationCreateResponse +- client.zeroTrust.access.applications.update(appId, { ...params }) -> ApplicationUpdateResponse +- client.zeroTrust.access.applications.list({ ...params }) -> ApplicationListResponsesSinglePage - client.zeroTrust.access.applications.delete(appId, { ...params }) -> ApplicationDeleteResponse -- client.zeroTrust.access.applications.get(appId, { ...params }) -> Application +- client.zeroTrust.access.applications.get(appId, { ...params }) -> ApplicationGetResponse - client.zeroTrust.access.applications.revokeTokens(appId, { ...params }) -> ApplicationRevokeTokensResponse | null #### CAs @@ -4459,15 +4463,19 @@ Types: - ApprovalGroup - Policy +- PolicyCreateResponse +- PolicyUpdateResponse +- PolicyListResponse - PolicyDeleteResponse +- PolicyGetResponse Methods: -- client.zeroTrust.access.applications.policies.create(uuid, { ...params }) -> Policy -- client.zeroTrust.access.applications.policies.update(uuid1, uuid, { ...params }) -> Policy -- client.zeroTrust.access.applications.policies.list(uuid, { ...params }) -> PoliciesSinglePage +- client.zeroTrust.access.applications.policies.create(uuid, { ...params }) -> PolicyCreateResponse +- client.zeroTrust.access.applications.policies.update(uuid1, uuid, { ...params }) -> PolicyUpdateResponse +- client.zeroTrust.access.applications.policies.list(uuid, { ...params }) -> PolicyListResponsesSinglePage - client.zeroTrust.access.applications.policies.delete(uuid1, uuid, { ...params }) -> PolicyDeleteResponse -- client.zeroTrust.access.applications.policies.get(uuid1, uuid, { ...params }) -> Policy +- client.zeroTrust.access.applications.policies.get(uuid1, uuid, { ...params }) -> PolicyGetResponse ### Certificates @@ -6350,12 +6358,13 @@ Types: - CallsApp - CallsAppWithSecret +- CallListResponse Methods: - client.calls.create({ ...params }) -> CallsAppWithSecret - client.calls.update(appId, { ...params }) -> CallsApp -- client.calls.list({ ...params }) -> CallsAppsSinglePage +- client.calls.list({ ...params }) -> CallListResponsesSinglePage - client.calls.delete(appId, { ...params }) -> CallsApp - client.calls.get(appId, { ...params }) -> CallsApp diff --git a/src/resources/calls.ts b/src/resources/calls.ts index 0d638360ad..59ca0fee2f 100644 --- a/src/resources/calls.ts +++ b/src/resources/calls.ts @@ -37,9 +37,13 @@ export class Calls extends APIResource { list( params: CallListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id } = params; - return this._client.getAPIList(`/accounts/${account_id}/calls/apps`, CallsAppsSinglePage, options); + return this._client.getAPIList( + `/accounts/${account_id}/calls/apps`, + CallListResponsesSinglePage, + options, + ); } /** @@ -67,7 +71,7 @@ export class Calls extends APIResource { } } -export class CallsAppsSinglePage extends SinglePage {} +export class CallListResponsesSinglePage extends SinglePage {} export interface CallsApp { /** @@ -108,7 +112,7 @@ export interface CallsAppWithSecret { name?: string; /** - * Bearer token to use the Calls API. + * Bearer token */ secret?: string; @@ -118,6 +122,11 @@ export interface CallsAppWithSecret { uid?: string; } +/** + * Bearer token + */ +export type CallListResponse = string; + export interface CallCreateParams { /** * Path param: The account identifier tag. diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 3cacc527cf..22753ec181 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; -import * as Shared from 'cloudflare/resources/shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 5127074632..9457ae859b 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; -import * as Shared from 'cloudflare/resources/shared'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 0e48eba756..f4a7e06f6f 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; -import * as Shared from 'cloudflare/resources/shared'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** diff --git a/src/resources/intel/indicator-feeds/indicator-feeds.ts b/src/resources/intel/indicator-feeds/indicator-feeds.ts index 1e5b4cc846..11143246dd 100644 --- a/src/resources/intel/indicator-feeds/indicator-feeds.ts +++ b/src/resources/intel/indicator-feeds/indicator-feeds.ts @@ -265,7 +265,7 @@ export interface IndicatorFeedUpdateParams { /** * Body param: The new description of the feed */ - feed_description?: string; + description?: string; /** * Body param: The new is_attributable value of the feed diff --git a/src/resources/radar/http/ases/ases.ts b/src/resources/radar/http/ases/ases.ts index a651ae97f1..61495dc822 100644 --- a/src/resources/radar/http/ases/ases.ts +++ b/src/resources/radar/http/ases/ases.ts @@ -118,6 +118,11 @@ export interface AseGetParams { */ botClass?: Array<'LIKELY_AUTOMATED' | 'LIKELY_HUMAN'>; + /** + * Filter for browser family. + */ + browserFamily?: Array<'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI'>; + /** * Array of comma separated list of continents (alpha-2 continent codes). Start * with `-` to exclude from results. For example, `-EU,NA` excludes results from diff --git a/src/resources/radar/http/ases/bot-class.ts b/src/resources/radar/http/ases/bot-class.ts index 487d3e5e2d..ed1a437db6 100644 --- a/src/resources/radar/http/ases/bot-class.ts +++ b/src/resources/radar/http/ases/bot-class.ts @@ -108,6 +108,11 @@ export interface BotClassGetParams { */ asn?: Array; + /** + * Filter for browser family. + */ + browserFamily?: Array<'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI'>; + /** * Array of comma separated list of continents (alpha-2 continent codes). Start * with `-` to exclude from results. For example, `-EU,NA` excludes results from diff --git a/src/resources/radar/http/ases/device-type.ts b/src/resources/radar/http/ases/device-type.ts index 4292ac1cdf..e80f6afdb2 100644 --- a/src/resources/radar/http/ases/device-type.ts +++ b/src/resources/radar/http/ases/device-type.ts @@ -112,6 +112,11 @@ export interface DeviceTypeGetParams { */ botClass?: Array<'LIKELY_AUTOMATED' | 'LIKELY_HUMAN'>; + /** + * Filter for browser family. + */ + browserFamily?: Array<'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI'>; + /** * Array of comma separated list of continents (alpha-2 continent codes). Start * with `-` to exclude from results. For example, `-EU,NA` excludes results from diff --git a/src/resources/radar/http/ases/http-method.ts b/src/resources/radar/http/ases/http-method.ts index 3c3932c479..8602551214 100644 --- a/src/resources/radar/http/ases/http-method.ts +++ b/src/resources/radar/http/ases/http-method.ts @@ -112,6 +112,11 @@ export interface HTTPMethodGetParams { */ botClass?: Array<'LIKELY_AUTOMATED' | 'LIKELY_HUMAN'>; + /** + * Filter for browser family. + */ + browserFamily?: Array<'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI'>; + /** * Array of comma separated list of continents (alpha-2 continent codes). Start * with `-` to exclude from results. For example, `-EU,NA` excludes results from diff --git a/src/resources/radar/http/ases/http-protocol.ts b/src/resources/radar/http/ases/http-protocol.ts index 0d05c6a4a1..016b18a786 100644 --- a/src/resources/radar/http/ases/http-protocol.ts +++ b/src/resources/radar/http/ases/http-protocol.ts @@ -112,6 +112,11 @@ export interface HTTPProtocolGetParams { */ botClass?: Array<'LIKELY_AUTOMATED' | 'LIKELY_HUMAN'>; + /** + * Filter for browser family. + */ + browserFamily?: Array<'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI'>; + /** * Array of comma separated list of continents (alpha-2 continent codes). Start * with `-` to exclude from results. For example, `-EU,NA` excludes results from diff --git a/src/resources/radar/http/ases/ip-version.ts b/src/resources/radar/http/ases/ip-version.ts index 8b9bd28012..4f7f77103e 100644 --- a/src/resources/radar/http/ases/ip-version.ts +++ b/src/resources/radar/http/ases/ip-version.ts @@ -109,6 +109,11 @@ export interface IPVersionGetParams { */ botClass?: Array<'LIKELY_AUTOMATED' | 'LIKELY_HUMAN'>; + /** + * Filter for browser family. + */ + browserFamily?: Array<'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI'>; + /** * Array of comma separated list of continents (alpha-2 continent codes). Start * with `-` to exclude from results. For example, `-EU,NA` excludes results from diff --git a/src/resources/radar/http/ases/os.ts b/src/resources/radar/http/ases/os.ts index 1712687567..1e6868aa91 100644 --- a/src/resources/radar/http/ases/os.ts +++ b/src/resources/radar/http/ases/os.ts @@ -111,6 +111,11 @@ export interface OSGetParams { */ botClass?: Array<'LIKELY_AUTOMATED' | 'LIKELY_HUMAN'>; + /** + * Filter for browser family. + */ + browserFamily?: Array<'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI'>; + /** * Array of comma separated list of continents (alpha-2 continent codes). Start * with `-` to exclude from results. For example, `-EU,NA` excludes results from diff --git a/src/resources/radar/http/ases/tls-version.ts b/src/resources/radar/http/ases/tls-version.ts index 7b880c8dbb..666ca7695e 100644 --- a/src/resources/radar/http/ases/tls-version.ts +++ b/src/resources/radar/http/ases/tls-version.ts @@ -112,6 +112,11 @@ export interface TLSVersionGetParams { */ botClass?: Array<'LIKELY_AUTOMATED' | 'LIKELY_HUMAN'>; + /** + * Filter for browser family. + */ + browserFamily?: Array<'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI'>; + /** * Array of comma separated list of continents (alpha-2 continent codes). Start * with `-` to exclude from results. For example, `-EU,NA` excludes results from diff --git a/src/resources/radar/http/locations/bot-class.ts b/src/resources/radar/http/locations/bot-class.ts index b3577bf61e..665da71cb5 100644 --- a/src/resources/radar/http/locations/bot-class.ts +++ b/src/resources/radar/http/locations/bot-class.ts @@ -108,6 +108,11 @@ export interface BotClassGetParams { */ asn?: Array; + /** + * Filter for browser family. + */ + browserFamily?: Array<'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI'>; + /** * Array of comma separated list of continents (alpha-2 continent codes). Start * with `-` to exclude from results. For example, `-EU,NA` excludes results from diff --git a/src/resources/radar/http/locations/device-type.ts b/src/resources/radar/http/locations/device-type.ts index 9ff67beef2..0841b18a25 100644 --- a/src/resources/radar/http/locations/device-type.ts +++ b/src/resources/radar/http/locations/device-type.ts @@ -112,6 +112,11 @@ export interface DeviceTypeGetParams { */ botClass?: Array<'LIKELY_AUTOMATED' | 'LIKELY_HUMAN'>; + /** + * Filter for browser family. + */ + browserFamily?: Array<'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI'>; + /** * Array of comma separated list of continents (alpha-2 continent codes). Start * with `-` to exclude from results. For example, `-EU,NA` excludes results from diff --git a/src/resources/radar/http/locations/http-method.ts b/src/resources/radar/http/locations/http-method.ts index e919bf62a6..336c77445d 100644 --- a/src/resources/radar/http/locations/http-method.ts +++ b/src/resources/radar/http/locations/http-method.ts @@ -112,6 +112,11 @@ export interface HTTPMethodGetParams { */ botClass?: Array<'LIKELY_AUTOMATED' | 'LIKELY_HUMAN'>; + /** + * Filter for browser family. + */ + browserFamily?: Array<'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI'>; + /** * Array of comma separated list of continents (alpha-2 continent codes). Start * with `-` to exclude from results. For example, `-EU,NA` excludes results from diff --git a/src/resources/radar/http/locations/http-protocol.ts b/src/resources/radar/http/locations/http-protocol.ts index fdde531f18..c77346866e 100644 --- a/src/resources/radar/http/locations/http-protocol.ts +++ b/src/resources/radar/http/locations/http-protocol.ts @@ -112,6 +112,11 @@ export interface HTTPProtocolGetParams { */ botClass?: Array<'LIKELY_AUTOMATED' | 'LIKELY_HUMAN'>; + /** + * Filter for browser family. + */ + browserFamily?: Array<'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI'>; + /** * Array of comma separated list of continents (alpha-2 continent codes). Start * with `-` to exclude from results. For example, `-EU,NA` excludes results from diff --git a/src/resources/radar/http/locations/ip-version.ts b/src/resources/radar/http/locations/ip-version.ts index f2f70180b9..b8e2977904 100644 --- a/src/resources/radar/http/locations/ip-version.ts +++ b/src/resources/radar/http/locations/ip-version.ts @@ -109,6 +109,11 @@ export interface IPVersionGetParams { */ botClass?: Array<'LIKELY_AUTOMATED' | 'LIKELY_HUMAN'>; + /** + * Filter for browser family. + */ + browserFamily?: Array<'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI'>; + /** * Array of comma separated list of continents (alpha-2 continent codes). Start * with `-` to exclude from results. For example, `-EU,NA` excludes results from diff --git a/src/resources/radar/http/locations/locations.ts b/src/resources/radar/http/locations/locations.ts index 36d4d2e417..631f096fc9 100644 --- a/src/resources/radar/http/locations/locations.ts +++ b/src/resources/radar/http/locations/locations.ts @@ -118,6 +118,11 @@ export interface LocationGetParams { */ botClass?: Array<'LIKELY_AUTOMATED' | 'LIKELY_HUMAN'>; + /** + * Filter for browser family. + */ + browserFamily?: Array<'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI'>; + /** * Array of comma separated list of continents (alpha-2 continent codes). Start * with `-` to exclude from results. For example, `-EU,NA` excludes results from diff --git a/src/resources/radar/http/locations/os.ts b/src/resources/radar/http/locations/os.ts index a3e8e4e1c3..a80630c5c4 100644 --- a/src/resources/radar/http/locations/os.ts +++ b/src/resources/radar/http/locations/os.ts @@ -111,6 +111,11 @@ export interface OSGetParams { */ botClass?: Array<'LIKELY_AUTOMATED' | 'LIKELY_HUMAN'>; + /** + * Filter for browser family. + */ + browserFamily?: Array<'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI'>; + /** * Array of comma separated list of continents (alpha-2 continent codes). Start * with `-` to exclude from results. For example, `-EU,NA` excludes results from diff --git a/src/resources/radar/http/locations/tls-version.ts b/src/resources/radar/http/locations/tls-version.ts index 1cf5a326f8..0c8c39e450 100644 --- a/src/resources/radar/http/locations/tls-version.ts +++ b/src/resources/radar/http/locations/tls-version.ts @@ -112,6 +112,11 @@ export interface TLSVersionGetParams { */ botClass?: Array<'LIKELY_AUTOMATED' | 'LIKELY_HUMAN'>; + /** + * Filter for browser family. + */ + browserFamily?: Array<'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI'>; + /** * Array of comma separated list of continents (alpha-2 continent codes). Start * with `-` to exclude from results. For example, `-EU,NA` excludes results from diff --git a/src/resources/radar/http/top.ts b/src/resources/radar/http/top.ts index 5d427403fe..15c91c12ee 100644 --- a/src/resources/radar/http/top.ts +++ b/src/resources/radar/http/top.ts @@ -178,6 +178,11 @@ export interface TopBrowserFamiliesParams { */ botClass?: Array<'LIKELY_AUTOMATED' | 'LIKELY_HUMAN'>; + /** + * Filter for browser family. + */ + browserFamily?: Array<'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI'>; + /** * Array of comma separated list of continents (alpha-2 continent codes). Start * with `-` to exclude from results. For example, `-EU,NA` excludes results from @@ -285,6 +290,11 @@ export interface TopBrowsersParams { */ botClass?: Array<'LIKELY_AUTOMATED' | 'LIKELY_HUMAN'>; + /** + * Filter for browser family. + */ + browserFamily?: Array<'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI'>; + /** * Array of comma separated list of continents (alpha-2 continent codes). Start * with `-` to exclude from results. For example, `-EU,NA` excludes results from diff --git a/src/resources/rulesets/phases/phases.ts b/src/resources/rulesets/phases/phases.ts index b581ee6b85..349bb66989 100644 --- a/src/resources/rulesets/phases/phases.ts +++ b/src/resources/rulesets/phases/phases.ts @@ -137,6 +137,7 @@ export interface PhaseUpdateResponse { | RulesAPI.SetConfigRule | RulesAPI.SkipRule | RulesAPI.SetCacheSettingsRule + | PhaseUpdateResponse.RulesetsLogCustomFieldRule >; /** @@ -150,6 +151,119 @@ export interface PhaseUpdateResponse { description?: string; } +export namespace PhaseUpdateResponse { + export interface RulesetsLogCustomFieldRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'log_custom_field'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: RulesetsLogCustomFieldRule.ActionParameters; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export namespace RulesetsLogCustomFieldRule { + /** + * The parameters configuring the rule's action. + */ + export interface ActionParameters { + /** + * The cookie fields to log. + */ + cookie_fields?: Array; + + /** + * The request fields to log. + */ + request_fields?: Array; + + /** + * The response fields to log. + */ + response_fields?: Array; + } + + export namespace ActionParameters { + /** + * The cookie field to log. + */ + export interface CookieField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The request field to log. + */ + export interface RequestField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The response field to log. + */ + export interface ResponseField { + /** + * The name of the field. + */ + name: string; + } + } + } +} + /** * A ruleset object. */ @@ -198,6 +312,7 @@ export interface PhaseGetResponse { | RulesAPI.SetConfigRule | RulesAPI.SkipRule | RulesAPI.SetCacheSettingsRule + | PhaseGetResponse.RulesetsLogCustomFieldRule >; /** @@ -211,6 +326,119 @@ export interface PhaseGetResponse { description?: string; } +export namespace PhaseGetResponse { + export interface RulesetsLogCustomFieldRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'log_custom_field'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: RulesetsLogCustomFieldRule.ActionParameters; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export namespace RulesetsLogCustomFieldRule { + /** + * The parameters configuring the rule's action. + */ + export interface ActionParameters { + /** + * The cookie fields to log. + */ + cookie_fields?: Array; + + /** + * The request fields to log. + */ + request_fields?: Array; + + /** + * The response fields to log. + */ + response_fields?: Array; + } + + export namespace ActionParameters { + /** + * The cookie field to log. + */ + export interface CookieField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The request field to log. + */ + export interface RequestField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The response field to log. + */ + export interface ResponseField { + /** + * The name of the field. + */ + name: string; + } + } + } +} + export interface PhaseUpdateParams { /** * Body param: The list of rules in the ruleset. @@ -231,6 +459,7 @@ export interface PhaseUpdateParams { | RulesAPI.SetConfigRuleParam | RulesAPI.SkipRuleParam | RulesAPI.SetCacheSettingsRuleParam + | PhaseUpdateParams.RulesetsLogCustomFieldRule >; /** @@ -266,6 +495,104 @@ export interface PhaseUpdateParams { phase?: RulesetsAPI.PhaseParam; } +export namespace PhaseUpdateParams { + export interface RulesetsLogCustomFieldRule { + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'log_custom_field'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: RulesetsLogCustomFieldRule.ActionParameters; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.LoggingParam; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export namespace RulesetsLogCustomFieldRule { + /** + * The parameters configuring the rule's action. + */ + export interface ActionParameters { + /** + * The cookie fields to log. + */ + cookie_fields?: Array; + + /** + * The request fields to log. + */ + request_fields?: Array; + + /** + * The response fields to log. + */ + response_fields?: Array; + } + + export namespace ActionParameters { + /** + * The cookie field to log. + */ + export interface CookieField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The request field to log. + */ + export interface RequestField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The response field to log. + */ + export interface ResponseField { + /** + * The name of the field. + */ + name: string; + } + } + } +} + export interface PhaseGetParams { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. diff --git a/src/resources/rulesets/phases/versions.ts b/src/resources/rulesets/phases/versions.ts index 01c180bd21..1a4cb47b84 100644 --- a/src/resources/rulesets/phases/versions.ts +++ b/src/resources/rulesets/phases/versions.ts @@ -151,6 +151,7 @@ export interface VersionGetResponse { | RulesAPI.SetConfigRule | RulesAPI.SkipRule | RulesAPI.SetCacheSettingsRule + | VersionGetResponse.RulesetsLogCustomFieldRule >; /** @@ -164,6 +165,119 @@ export interface VersionGetResponse { description?: string; } +export namespace VersionGetResponse { + export interface RulesetsLogCustomFieldRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'log_custom_field'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: RulesetsLogCustomFieldRule.ActionParameters; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export namespace RulesetsLogCustomFieldRule { + /** + * The parameters configuring the rule's action. + */ + export interface ActionParameters { + /** + * The cookie fields to log. + */ + cookie_fields?: Array; + + /** + * The request fields to log. + */ + request_fields?: Array; + + /** + * The response fields to log. + */ + response_fields?: Array; + } + + export namespace ActionParameters { + /** + * The cookie field to log. + */ + export interface CookieField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The request field to log. + */ + export interface RequestField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The response field to log. + */ + export interface ResponseField { + /** + * The name of the field. + */ + name: string; + } + } + } +} + export interface VersionListParams { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. diff --git a/src/resources/rulesets/rules.ts b/src/resources/rulesets/rules.ts index 1aaab09a72..baa68886f9 100644 --- a/src/resources/rulesets/rules.ts +++ b/src/resources/rulesets/rules.ts @@ -3171,18 +3171,28 @@ export namespace SetConfigRule { /** * Turn off all active Cloudflare Apps. */ - disable_apps?: boolean; + disable_apps?: true; + + /** + * Turn off Real User Monitoring (RUM). + */ + disable_rum?: true; /** * Turn off Zaraz. */ - disable_zaraz?: boolean; + disable_zaraz?: true; /** * Turn on or off Email Obfuscation. */ email_obfuscation?: boolean; + /** + * Turn on or off Cloudflare Fonts. + */ + fonts?: boolean; + /** * Turn on or off the Hotlink Protection. */ @@ -3317,18 +3327,28 @@ export namespace SetConfigRuleParam { /** * Turn off all active Cloudflare Apps. */ - disable_apps?: boolean; + disable_apps?: true; + + /** + * Turn off Real User Monitoring (RUM). + */ + disable_rum?: true; /** * Turn off Zaraz. */ - disable_zaraz?: boolean; + disable_zaraz?: true; /** * Turn on or off Email Obfuscation. */ email_obfuscation?: boolean; + /** + * Turn on or off Cloudflare Fonts. + */ + fonts?: boolean; + /** * Turn on or off the Hotlink Protection. */ @@ -3617,6 +3637,7 @@ export interface RuleCreateResponse { | SetConfigRule | SkipRule | SetCacheSettingsRule + | RuleCreateResponse.RulesetsLogCustomFieldRule >; /** @@ -3630,6 +3651,119 @@ export interface RuleCreateResponse { description?: string; } +export namespace RuleCreateResponse { + export interface RulesetsLogCustomFieldRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'log_custom_field'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: RulesetsLogCustomFieldRule.ActionParameters; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export namespace RulesetsLogCustomFieldRule { + /** + * The parameters configuring the rule's action. + */ + export interface ActionParameters { + /** + * The cookie fields to log. + */ + cookie_fields?: Array; + + /** + * The request fields to log. + */ + request_fields?: Array; + + /** + * The response fields to log. + */ + response_fields?: Array; + } + + export namespace ActionParameters { + /** + * The cookie field to log. + */ + export interface CookieField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The request field to log. + */ + export interface RequestField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The response field to log. + */ + export interface ResponseField { + /** + * The name of the field. + */ + name: string; + } + } + } +} + /** * A ruleset object. */ @@ -3678,6 +3812,7 @@ export interface RuleDeleteResponse { | SetConfigRule | SkipRule | SetCacheSettingsRule + | RuleDeleteResponse.RulesetsLogCustomFieldRule >; /** @@ -3691,6 +3826,119 @@ export interface RuleDeleteResponse { description?: string; } +export namespace RuleDeleteResponse { + export interface RulesetsLogCustomFieldRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'log_custom_field'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: RulesetsLogCustomFieldRule.ActionParameters; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export namespace RulesetsLogCustomFieldRule { + /** + * The parameters configuring the rule's action. + */ + export interface ActionParameters { + /** + * The cookie fields to log. + */ + cookie_fields?: Array; + + /** + * The request fields to log. + */ + request_fields?: Array; + + /** + * The response fields to log. + */ + response_fields?: Array; + } + + export namespace ActionParameters { + /** + * The cookie field to log. + */ + export interface CookieField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The request field to log. + */ + export interface RequestField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The response field to log. + */ + export interface ResponseField { + /** + * The name of the field. + */ + name: string; + } + } + } +} + /** * A ruleset object. */ @@ -3739,6 +3987,7 @@ export interface RuleEditResponse { | SetConfigRule | SkipRule | SetCacheSettingsRule + | RuleEditResponse.RulesetsLogCustomFieldRule >; /** @@ -3752,6 +4001,119 @@ export interface RuleEditResponse { description?: string; } +export namespace RuleEditResponse { + export interface RulesetsLogCustomFieldRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'log_custom_field'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: RulesetsLogCustomFieldRule.ActionParameters; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export namespace RulesetsLogCustomFieldRule { + /** + * The parameters configuring the rule's action. + */ + export interface ActionParameters { + /** + * The cookie fields to log. + */ + cookie_fields?: Array; + + /** + * The request fields to log. + */ + request_fields?: Array; + + /** + * The response fields to log. + */ + response_fields?: Array; + } + + export namespace ActionParameters { + /** + * The cookie field to log. + */ + export interface CookieField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The request field to log. + */ + export interface RequestField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The response field to log. + */ + export interface ResponseField { + /** + * The name of the field. + */ + name: string; + } + } + } +} + export type RuleCreateParams = | RuleCreateParams.BlockRule | RuleCreateParams.ChallengeRule @@ -3767,7 +4129,8 @@ export type RuleCreateParams = | RuleCreateParams.ServeErrorRule | RuleCreateParams.SetConfigRule | RuleCreateParams.SkipRule - | RuleCreateParams.SetCacheSettingsRule; + | RuleCreateParams.SetCacheSettingsRule + | RuleCreateParams.RulesetsLogCustomFieldRule; export namespace RuleCreateParams { export interface BlockRule { @@ -4900,18 +5263,28 @@ export namespace RuleCreateParams { /** * Turn off all active Cloudflare Apps. */ - disable_apps?: boolean; + disable_apps?: true; + + /** + * Turn off Real User Monitoring (RUM). + */ + disable_rum?: true; /** * Turn off Zaraz. */ - disable_zaraz?: boolean; + disable_zaraz?: true; /** * Turn on or off Email Obfuscation. */ email_obfuscation?: boolean; + /** + * Turn on or off Cloudflare Fonts. + */ + fonts?: boolean; + /** * Turn on or off the Hotlink Protection. */ @@ -5502,6 +5875,114 @@ export namespace RuleCreateParams { } } } + + export interface RulesetsLogCustomFieldRule { + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The unique ID of the rule. + */ + id?: string; + + /** + * Body param: The action to perform when the rule matches. + */ + action?: 'log_custom_field'; + + /** + * Body param: The parameters configuring the rule's action. + */ + action_parameters?: RuleCreateParams.RulesetsLogCustomFieldRule.ActionParameters; + + /** + * Body param: An informative description of the rule. + */ + description?: string; + + /** + * Body param: Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * Body param: The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * Body param: An object configuring the rule's logging behavior. + */ + logging?: LoggingParam; + + /** + * Body param: The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export namespace RulesetsLogCustomFieldRule { + /** + * The parameters configuring the rule's action. + */ + export interface ActionParameters { + /** + * The cookie fields to log. + */ + cookie_fields?: Array; + + /** + * The request fields to log. + */ + request_fields?: Array; + + /** + * The response fields to log. + */ + response_fields?: Array; + } + + export namespace ActionParameters { + /** + * The cookie field to log. + */ + export interface CookieField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The request field to log. + */ + export interface RequestField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The response field to log. + */ + export interface ResponseField { + /** + * The name of the field. + */ + name: string; + } + } + } } export interface RuleDeleteParams { @@ -5531,7 +6012,8 @@ export type RuleEditParams = | RuleEditParams.ServeErrorRule | RuleEditParams.SetConfigRule | RuleEditParams.SkipRule - | RuleEditParams.SetCacheSettingsRule; + | RuleEditParams.SetCacheSettingsRule + | RuleEditParams.RulesetsLogCustomFieldRule; export namespace RuleEditParams { export interface BlockRule { @@ -6664,18 +7146,28 @@ export namespace RuleEditParams { /** * Turn off all active Cloudflare Apps. */ - disable_apps?: boolean; + disable_apps?: true; + + /** + * Turn off Real User Monitoring (RUM). + */ + disable_rum?: true; /** * Turn off Zaraz. */ - disable_zaraz?: boolean; + disable_zaraz?: true; /** * Turn on or off Email Obfuscation. */ email_obfuscation?: boolean; + /** + * Turn on or off Cloudflare Fonts. + */ + fonts?: boolean; + /** * Turn on or off the Hotlink Protection. */ @@ -7266,6 +7758,114 @@ export namespace RuleEditParams { } } } + + export interface RulesetsLogCustomFieldRule { + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The unique ID of the rule. + */ + id?: string; + + /** + * Body param: The action to perform when the rule matches. + */ + action?: 'log_custom_field'; + + /** + * Body param: The parameters configuring the rule's action. + */ + action_parameters?: RuleEditParams.RulesetsLogCustomFieldRule.ActionParameters; + + /** + * Body param: An informative description of the rule. + */ + description?: string; + + /** + * Body param: Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * Body param: The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * Body param: An object configuring the rule's logging behavior. + */ + logging?: LoggingParam; + + /** + * Body param: The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export namespace RulesetsLogCustomFieldRule { + /** + * The parameters configuring the rule's action. + */ + export interface ActionParameters { + /** + * The cookie fields to log. + */ + cookie_fields?: Array; + + /** + * The request fields to log. + */ + request_fields?: Array; + + /** + * The response fields to log. + */ + response_fields?: Array; + } + + export namespace ActionParameters { + /** + * The cookie field to log. + */ + export interface CookieField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The request field to log. + */ + export interface RequestField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The response field to log. + */ + export interface ResponseField { + /** + * The name of the field. + */ + name: string; + } + } + } } export namespace Rules { diff --git a/src/resources/rulesets/rulesets.ts b/src/resources/rulesets/rulesets.ts index ffbe321501..87d201a7d9 100644 --- a/src/resources/rulesets/rulesets.ts +++ b/src/resources/rulesets/rulesets.ts @@ -354,6 +354,7 @@ export interface RulesetCreateResponse { | RulesAPI.SetConfigRule | RulesAPI.SkipRule | RulesAPI.SetCacheSettingsRule + | RulesetCreateResponse.RulesetsLogCustomFieldRule >; /** @@ -367,6 +368,119 @@ export interface RulesetCreateResponse { description?: string; } +export namespace RulesetCreateResponse { + export interface RulesetsLogCustomFieldRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'log_custom_field'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: RulesetsLogCustomFieldRule.ActionParameters; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export namespace RulesetsLogCustomFieldRule { + /** + * The parameters configuring the rule's action. + */ + export interface ActionParameters { + /** + * The cookie fields to log. + */ + cookie_fields?: Array; + + /** + * The request fields to log. + */ + request_fields?: Array; + + /** + * The response fields to log. + */ + response_fields?: Array; + } + + export namespace ActionParameters { + /** + * The cookie field to log. + */ + export interface CookieField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The request field to log. + */ + export interface RequestField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The response field to log. + */ + export interface ResponseField { + /** + * The name of the field. + */ + name: string; + } + } + } +} + /** * A ruleset object. */ @@ -415,6 +529,7 @@ export interface RulesetUpdateResponse { | RulesAPI.SetConfigRule | RulesAPI.SkipRule | RulesAPI.SetCacheSettingsRule + | RulesetUpdateResponse.RulesetsLogCustomFieldRule >; /** @@ -428,6 +543,119 @@ export interface RulesetUpdateResponse { description?: string; } +export namespace RulesetUpdateResponse { + export interface RulesetsLogCustomFieldRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'log_custom_field'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: RulesetsLogCustomFieldRule.ActionParameters; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export namespace RulesetsLogCustomFieldRule { + /** + * The parameters configuring the rule's action. + */ + export interface ActionParameters { + /** + * The cookie fields to log. + */ + cookie_fields?: Array; + + /** + * The request fields to log. + */ + request_fields?: Array; + + /** + * The response fields to log. + */ + response_fields?: Array; + } + + export namespace ActionParameters { + /** + * The cookie field to log. + */ + export interface CookieField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The request field to log. + */ + export interface RequestField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The response field to log. + */ + export interface ResponseField { + /** + * The name of the field. + */ + name: string; + } + } + } +} + /** * A ruleset object. */ @@ -476,6 +704,7 @@ export interface RulesetGetResponse { | RulesAPI.SetConfigRule | RulesAPI.SkipRule | RulesAPI.SetCacheSettingsRule + | RulesetGetResponse.RulesetsLogCustomFieldRule >; /** @@ -489,6 +718,119 @@ export interface RulesetGetResponse { description?: string; } +export namespace RulesetGetResponse { + export interface RulesetsLogCustomFieldRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'log_custom_field'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: RulesetsLogCustomFieldRule.ActionParameters; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export namespace RulesetsLogCustomFieldRule { + /** + * The parameters configuring the rule's action. + */ + export interface ActionParameters { + /** + * The cookie fields to log. + */ + cookie_fields?: Array; + + /** + * The request fields to log. + */ + request_fields?: Array; + + /** + * The response fields to log. + */ + response_fields?: Array; + } + + export namespace ActionParameters { + /** + * The cookie field to log. + */ + export interface CookieField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The request field to log. + */ + export interface RequestField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The response field to log. + */ + export interface ResponseField { + /** + * The name of the field. + */ + name: string; + } + } + } +} + export interface RulesetCreateParams { /** * Body param: The kind of the ruleset. @@ -524,6 +866,7 @@ export interface RulesetCreateParams { | RulesAPI.SetConfigRuleParam | RulesAPI.SkipRuleParam | RulesAPI.SetCacheSettingsRuleParam + | RulesetCreateParams.RulesetsLogCustomFieldRule >; /** @@ -544,6 +887,104 @@ export interface RulesetCreateParams { description?: string; } +export namespace RulesetCreateParams { + export interface RulesetsLogCustomFieldRule { + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'log_custom_field'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: RulesetsLogCustomFieldRule.ActionParameters; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.LoggingParam; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export namespace RulesetsLogCustomFieldRule { + /** + * The parameters configuring the rule's action. + */ + export interface ActionParameters { + /** + * The cookie fields to log. + */ + cookie_fields?: Array; + + /** + * The request fields to log. + */ + request_fields?: Array; + + /** + * The response fields to log. + */ + response_fields?: Array; + } + + export namespace ActionParameters { + /** + * The cookie field to log. + */ + export interface CookieField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The request field to log. + */ + export interface RequestField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The response field to log. + */ + export interface ResponseField { + /** + * The name of the field. + */ + name: string; + } + } + } +} + export interface RulesetUpdateParams { /** * Body param: The list of rules in the ruleset. @@ -564,6 +1005,7 @@ export interface RulesetUpdateParams { | RulesAPI.SetConfigRuleParam | RulesAPI.SkipRuleParam | RulesAPI.SetCacheSettingsRuleParam + | RulesetUpdateParams.RulesetsLogCustomFieldRule >; /** @@ -599,6 +1041,104 @@ export interface RulesetUpdateParams { phase?: PhaseParam; } +export namespace RulesetUpdateParams { + export interface RulesetsLogCustomFieldRule { + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'log_custom_field'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: RulesetsLogCustomFieldRule.ActionParameters; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.LoggingParam; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export namespace RulesetsLogCustomFieldRule { + /** + * The parameters configuring the rule's action. + */ + export interface ActionParameters { + /** + * The cookie fields to log. + */ + cookie_fields?: Array; + + /** + * The request fields to log. + */ + request_fields?: Array; + + /** + * The response fields to log. + */ + response_fields?: Array; + } + + export namespace ActionParameters { + /** + * The cookie field to log. + */ + export interface CookieField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The request field to log. + */ + export interface RequestField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The response field to log. + */ + export interface ResponseField { + /** + * The name of the field. + */ + name: string; + } + } + } +} + export interface RulesetListParams { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. diff --git a/src/resources/rulesets/versions/by-tag.ts b/src/resources/rulesets/versions/by-tag.ts index 7089f9b90d..8274986908 100644 --- a/src/resources/rulesets/versions/by-tag.ts +++ b/src/resources/rulesets/versions/by-tag.ts @@ -75,6 +75,7 @@ export interface ByTagGetResponse { | RulesAPI.SetConfigRule | RulesAPI.SkipRule | RulesAPI.SetCacheSettingsRule + | ByTagGetResponse.RulesetsLogCustomFieldRule >; /** @@ -88,6 +89,119 @@ export interface ByTagGetResponse { description?: string; } +export namespace ByTagGetResponse { + export interface RulesetsLogCustomFieldRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'log_custom_field'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: RulesetsLogCustomFieldRule.ActionParameters; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export namespace RulesetsLogCustomFieldRule { + /** + * The parameters configuring the rule's action. + */ + export interface ActionParameters { + /** + * The cookie fields to log. + */ + cookie_fields?: Array; + + /** + * The request fields to log. + */ + request_fields?: Array; + + /** + * The response fields to log. + */ + response_fields?: Array; + } + + export namespace ActionParameters { + /** + * The cookie field to log. + */ + export interface CookieField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The request field to log. + */ + export interface RequestField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The response field to log. + */ + export interface ResponseField { + /** + * The name of the field. + */ + name: string; + } + } + } +} + export interface ByTagGetParams { /** * The unique ID of the account. diff --git a/src/resources/rulesets/versions/versions.ts b/src/resources/rulesets/versions/versions.ts index c493777578..4bbb039ed6 100644 --- a/src/resources/rulesets/versions/versions.ts +++ b/src/resources/rulesets/versions/versions.ts @@ -196,6 +196,7 @@ export interface VersionGetResponse { | RulesAPI.SetConfigRule | RulesAPI.SkipRule | RulesAPI.SetCacheSettingsRule + | VersionGetResponse.RulesetsLogCustomFieldRule >; /** @@ -209,6 +210,119 @@ export interface VersionGetResponse { description?: string; } +export namespace VersionGetResponse { + export interface RulesetsLogCustomFieldRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'log_custom_field'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: RulesetsLogCustomFieldRule.ActionParameters; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export namespace RulesetsLogCustomFieldRule { + /** + * The parameters configuring the rule's action. + */ + export interface ActionParameters { + /** + * The cookie fields to log. + */ + cookie_fields?: Array; + + /** + * The request fields to log. + */ + request_fields?: Array; + + /** + * The response fields to log. + */ + response_fields?: Array; + } + + export namespace ActionParameters { + /** + * The cookie field to log. + */ + export interface CookieField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The request field to log. + */ + export interface RequestField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The response field to log. + */ + export interface ResponseField { + /** + * The name of the field. + */ + name: string; + } + } + } +} + export interface VersionListParams { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. diff --git a/src/resources/zero-trust/access/access.ts b/src/resources/zero-trust/access/access.ts index ac2650c9c8..5fee574329 100644 --- a/src/resources/zero-trust/access/access.ts +++ b/src/resources/zero-trust/access/access.ts @@ -739,9 +739,13 @@ export namespace Access { export import SaaSAppSource = ApplicationsAPI.SaaSAppSource; export import SAMLSaaSApp = ApplicationsAPI.SAMLSaaSApp; export import SelfHostedDomains = ApplicationsAPI.SelfHostedDomains; + export import ApplicationCreateResponse = ApplicationsAPI.ApplicationCreateResponse; + export import ApplicationUpdateResponse = ApplicationsAPI.ApplicationUpdateResponse; + export import ApplicationListResponse = ApplicationsAPI.ApplicationListResponse; export import ApplicationDeleteResponse = ApplicationsAPI.ApplicationDeleteResponse; + export import ApplicationGetResponse = ApplicationsAPI.ApplicationGetResponse; export import ApplicationRevokeTokensResponse = ApplicationsAPI.ApplicationRevokeTokensResponse; - export import ApplicationsSinglePage = ApplicationsAPI.ApplicationsSinglePage; + export import ApplicationListResponsesSinglePage = ApplicationsAPI.ApplicationListResponsesSinglePage; export import ApplicationCreateParams = ApplicationsAPI.ApplicationCreateParams; export import ApplicationUpdateParams = ApplicationsAPI.ApplicationUpdateParams; export import ApplicationListParams = ApplicationsAPI.ApplicationListParams; diff --git a/src/resources/zero-trust/access/applications/applications.ts b/src/resources/zero-trust/access/applications/applications.ts index 9701e47f83..11bfc85c42 100644 --- a/src/resources/zero-trust/access/applications/applications.ts +++ b/src/resources/zero-trust/access/applications/applications.ts @@ -5,6 +5,7 @@ import { APIResource } from 'cloudflare/resource'; import { isRequestOptions } from 'cloudflare/core'; import { CloudflareError } from 'cloudflare/error'; import * as ApplicationsAPI from 'cloudflare/resources/zero-trust/access/applications/applications'; +import * as AccessAPI from 'cloudflare/resources/zero-trust/access/access'; import * as CAsAPI from 'cloudflare/resources/zero-trust/access/applications/cas'; import * as PoliciesAPI from 'cloudflare/resources/zero-trust/access/applications/policies'; import * as UserPolicyChecksAPI from 'cloudflare/resources/zero-trust/access/applications/user-policy-checks'; @@ -20,7 +21,10 @@ export class Applications extends APIResource { /** * Adds a new application to Access. */ - create(params: ApplicationCreateParams, options?: Core.RequestOptions): Core.APIPromise { + create( + params: ApplicationCreateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { const { account_id, zone_id, ...body } = params; if (!account_id && !zone_id) { throw new CloudflareError('You must provide either account_id or zone_id.'); @@ -42,7 +46,7 @@ export class Applications extends APIResource { this._client.post(`/${accountOrZone}/${accountOrZoneId}/access/apps`, { body, ...options, - }) as Core.APIPromise<{ result: Application }> + }) as Core.APIPromise<{ result: ApplicationCreateResponse }> )._thenUnwrap((obj) => obj.result); } @@ -53,7 +57,7 @@ export class Applications extends APIResource { appId: AppIDParam, params: ApplicationUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, zone_id, ...body } = params; if (!account_id && !zone_id) { throw new CloudflareError('You must provide either account_id or zone_id.'); @@ -75,7 +79,7 @@ export class Applications extends APIResource { this._client.put(`/${accountOrZone}/${accountOrZoneId}/access/apps/${appId}`, { body, ...options, - }) as Core.APIPromise<{ result: Application }> + }) as Core.APIPromise<{ result: ApplicationUpdateResponse }> )._thenUnwrap((obj) => obj.result); } @@ -85,12 +89,14 @@ export class Applications extends APIResource { list( params?: ApplicationListParams, options?: Core.RequestOptions, - ): Core.PagePromise; - list(options?: Core.RequestOptions): Core.PagePromise; + ): Core.PagePromise; + list( + options?: Core.RequestOptions, + ): Core.PagePromise; list( params: ApplicationListParams | Core.RequestOptions = {}, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { if (isRequestOptions(params)) { return this.list({}, params); } @@ -113,7 +119,7 @@ export class Applications extends APIResource { }; return this._client.getAPIList( `/${accountOrZone}/${accountOrZoneId}/access/apps`, - ApplicationsSinglePage, + ApplicationListResponsesSinglePage, options, ); } @@ -167,13 +173,13 @@ export class Applications extends APIResource { appId: AppIDParam, params?: ApplicationGetParams, options?: Core.RequestOptions, - ): Core.APIPromise; - get(appId: AppIDParam, options?: Core.RequestOptions): Core.APIPromise; + ): Core.APIPromise; + get(appId: AppIDParam, options?: Core.RequestOptions): Core.APIPromise; get( appId: AppIDParam, params: ApplicationGetParams | Core.RequestOptions = {}, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { if (isRequestOptions(params)) { return this.get(appId, {}, params); } @@ -198,7 +204,7 @@ export class Applications extends APIResource { this._client.get( `/${accountOrZone}/${accountOrZoneId}/access/apps/${appId}`, options, - ) as Core.APIPromise<{ result: Application }> + ) as Core.APIPromise<{ result: ApplicationGetResponse }> )._thenUnwrap((obj) => obj.result); } @@ -248,7 +254,7 @@ export class Applications extends APIResource { } } -export class ApplicationsSinglePage extends SinglePage {} +export class ApplicationListResponsesSinglePage extends SinglePage {} export type AllowedHeaders = string; @@ -313,8 +319,7 @@ export type Application = export namespace Application { export interface SelfHostedApplication { /** - * The primary hostname and path that Access will secure. If the app is visible in - * the App Launcher dashboard, this is the domain that will be displayed. + * The domain and path that Access will secure. */ domain: string; @@ -328,14 +333,6 @@ export namespace Application { */ id?: string; - /** - * When set to true, users can authenticate to this application using their WARP - * session. When set to false this application will always require direct IdP - * authentication. This setting always overrides the organization setting for WARP - * authentication. - */ - allow_authenticate_via_warp?: boolean; - /** * The identity providers your users can select when connecting to this * application. Defaults to all IdPs configured in your account. @@ -358,7 +355,7 @@ export namespace Application { */ auto_redirect_to_identity?: boolean; - cors_headers?: ApplicationsAPI.CORSHeaders; + cors_headers?: SelfHostedApplication.CORSHeaders; created_at?: string; @@ -370,21 +367,10 @@ export namespace Application { /** * The custom URL a user is redirected to when they are denied access to the - * application when failing identity-based rules. + * application. */ custom_deny_url?: string; - /** - * The custom URL a user is redirected to when they are denied access to the - * application when failing non-identity rules. - */ - custom_non_identity_deny_url?: string; - - /** - * The custom pages that will be displayed when applicable for this application - */ - custom_pages?: Array; - /** * Enables the binding cookie, which increases security against compromised * authorization tokens and CSRF attacks. @@ -413,12 +399,6 @@ export namespace Application { */ options_preflight_bypass?: boolean; - /** - * Enables cookie paths to scope an application's JWT to the application path. If - * disabled, the JWT will scope to the hostname by default - */ - path_cookie_attribute?: boolean; - /** * Sets the SameSite cookie setting, which provides increased security against CSRF * attacks. @@ -426,9 +406,10 @@ export namespace Application { same_site_cookie_attribute?: string; /** - * List of domains that Access will secure. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - self_hosted_domains?: Array; + scim_config?: SelfHostedApplication.ScimConfig; /** * Returns a 401 status code when the request is blocked by a Service Auth policy. @@ -447,13 +428,231 @@ export namespace Application { */ skip_interstitial?: boolean; + updated_at?: string; + } + + export namespace SelfHostedApplication { + export interface CORSHeaders { + /** + * Allows all HTTP request headers. + */ + allow_all_headers?: boolean; + + /** + * Allows all HTTP request methods. + */ + allow_all_methods?: boolean; + + /** + * Allows all origins. + */ + allow_all_origins?: boolean; + + /** + * When set to `true`, includes credentials (cookies, authorization headers, or TLS + * client certificates) with requests. + */ + allow_credentials?: boolean; + + /** + * Allowed HTTP request headers. + */ + allowed_headers?: Array; + + /** + * Allowed HTTP request methods. + */ + allowed_methods?: Array; + + /** + * Allowed origins. + */ + allowed_origins?: Array; + + /** + * The maximum number of seconds the results of a preflight request can be cached. + */ + max_age?: number; + } + /** - * The tags you want assigned to an application. Tags are used to filter - * applications in the App Launcher dashboard. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - tags?: Array; + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; - updated_at?: string; + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, we propagate DELETE requests to the target application for SCIM + * resources. If true, we only set `active` to false on the SCIM resource. This is + * useful because some targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } } export interface SaaSApplication { @@ -486,11 +685,6 @@ export namespace Application { created_at?: string; - /** - * The custom pages that will be displayed when applicable for this application - */ - custom_pages?: Array; - /** * The image URL for the logo shown in the App Launcher dashboard. */ @@ -501,13 +695,13 @@ export namespace Application { */ name?: string; - saas_app?: ApplicationsAPI.SAMLSaaSApp | SaaSApplication.AccessOIDCSaaSApp; + saas_app?: SaaSApplication.AccessSchemasSAMLSaaSApp | SaaSApplication.AccessSchemasOIDCSaaSApp; /** - * The tags you want assigned to an application. Tags are used to filter - * applications in the App Launcher dashboard. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - tags?: Array; + scim_config?: SaaSApplication.ScimConfig; /** * The application type. @@ -518,7 +712,92 @@ export namespace Application { } export namespace SaaSApplication { - export interface AccessOIDCSaaSApp { + export interface AccessSchemasSAMLSaaSApp { + /** + * Optional identifier indicating the authentication protocol used for the saas + * app. Required for OIDC. Default if unset is "saml" + */ + auth_type?: 'saml' | 'oidc'; + + /** + * The service provider's endpoint that is responsible for receiving and parsing a + * SAML assertion. + */ + consumer_service_url?: string; + + created_at?: string; + + custom_attributes?: AccessSchemasSAMLSaaSApp.CustomAttributes; + + /** + * The unique identifier for your SaaS application. + */ + idp_entity_id?: string; + + /** + * The format of the name identifier sent to the SaaS application. + */ + name_id_format?: ApplicationsAPI.SaaSAppNameIDFormat; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms an application's + * user identities into a NameID value for its SAML assertion. This expression + * should evaluate to a singular string. The output of this expression can override + * the `name_id_format` setting. + */ + name_id_transform_jsonata?: string; + + /** + * The Access public certificate that will be used to verify your identity. + */ + public_key?: string; + + /** + * A globally unique name for an identity or service provider. + */ + sp_entity_id?: string; + + /** + * The endpoint where your SaaS application will send login requests. + */ + sso_endpoint?: string; + + updated_at?: string; + } + + export namespace AccessSchemasSAMLSaaSApp { + export interface CustomAttributes { + /** + * The SAML FriendlyName of the attribute. + */ + friendly_name?: string; + + /** + * The name of the attribute. + */ + name?: string; + + /** + * A globally unique name for an identity or service provider. + */ + name_format?: ApplicationsAPI.SaaSAppNameFormat; + + /** + * If the attribute is required when building a SAML assertion. + */ + required?: boolean; + + source?: ApplicationsAPI.SaaSAppSource; + } + } + + export interface AccessSchemasOIDCSaaSApp { + /** + * If client secret should be required on the token endpoint when + * authorization_code_with_pkce grant is used. + */ + allow_pkce_without_client_secret?: boolean; + /** * The URL where this applications tile redirects users */ @@ -542,15 +821,15 @@ export namespace Application { created_at?: string; - custom_claims?: AccessOIDCSaaSApp.CustomClaims; + custom_claims?: AccessSchemasOIDCSaaSApp.CustomClaims; /** * The OIDC flows supported by this application */ - grant_types?: Array<'authorization_code' | 'authorization_code_with_pkce'>; + grant_types?: Array<'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens'>; /** - * A regex to filter Cloudflare groups returned in ID token and userinfo endpoint + * A regex to filter Cloudflare groups returned in ID token and userinfo endpoint. */ group_filter_regex?: string; @@ -565,15 +844,18 @@ export namespace Application { */ redirect_uris?: Array; + refresh_token_options?: AccessSchemasOIDCSaaSApp.RefreshTokenOptions; + /** - * Define the user information shared with access + * Define the user information shared with access, "offline_access" scope will be + * automatically enabled if refresh tokens are enabled */ scopes?: Array<'openid' | 'groups' | 'email' | 'profile'>; updated_at?: string; } - export namespace AccessOIDCSaaSApp { + export namespace AccessSchemasOIDCSaaSApp { export interface CustomClaims { /** * The name of the claim. @@ -606,33 +888,211 @@ export namespace Application { name?: string; } } - } - } - export interface BrowserSSHApplication { - /** - * The primary hostname and path that Access will secure. If the app is visible in - * the App Launcher dashboard, this is the domain that will be displayed. - */ - domain: string; + export interface RefreshTokenOptions { + /** + * How long a refresh token will be valid for after creation. Valid units are + * m,h,d. Must be longer than 1m. + */ + lifetime?: string; + } + } /** - * The application type. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - type: string; + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; - /** - * UUID - */ - id?: string; + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; - /** - * When set to true, users can authenticate to this application using their WARP - * session. When set to false this application will always require direct IdP - * authentication. This setting always overrides the organization setting for WARP - * authentication. - */ - allow_authenticate_via_warp?: boolean; + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, we propagate DELETE requests to the target application for SCIM + * resources. If true, we only set `active` to false on the SCIM resource. This is + * useful because some targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BrowserSSHApplication { + /** + * The domain and path that Access will secure. + */ + domain: string; + + /** + * The application type. + */ + type: string; + + /** + * UUID + */ + id?: string; /** * The identity providers your users can select when connecting to this @@ -656,7 +1116,7 @@ export namespace Application { */ auto_redirect_to_identity?: boolean; - cors_headers?: ApplicationsAPI.CORSHeaders; + cors_headers?: BrowserSSHApplication.CORSHeaders; created_at?: string; @@ -668,21 +1128,10 @@ export namespace Application { /** * The custom URL a user is redirected to when they are denied access to the - * application when failing identity-based rules. + * application. */ custom_deny_url?: string; - /** - * The custom URL a user is redirected to when they are denied access to the - * application when failing non-identity rules. - */ - custom_non_identity_deny_url?: string; - - /** - * The custom pages that will be displayed when applicable for this application - */ - custom_pages?: Array; - /** * Enables the binding cookie, which increases security against compromised * authorization tokens and CSRF attacks. @@ -711,12 +1160,6 @@ export namespace Application { */ options_preflight_bypass?: boolean; - /** - * Enables cookie paths to scope an application's JWT to the application path. If - * disabled, the JWT will scope to the hostname by default - */ - path_cookie_attribute?: boolean; - /** * Sets the SameSite cookie setting, which provides increased security against CSRF * attacks. @@ -724,9 +1167,10 @@ export namespace Application { same_site_cookie_attribute?: string; /** - * List of domains that Access will secure. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - self_hosted_domains?: Array; + scim_config?: BrowserSSHApplication.ScimConfig; /** * Returns a 401 status code when the request is blocked by a Service Auth policy. @@ -745,19 +1189,236 @@ export namespace Application { */ skip_interstitial?: boolean; + updated_at?: string; + } + + export namespace BrowserSSHApplication { + export interface CORSHeaders { + /** + * Allows all HTTP request headers. + */ + allow_all_headers?: boolean; + + /** + * Allows all HTTP request methods. + */ + allow_all_methods?: boolean; + + /** + * Allows all origins. + */ + allow_all_origins?: boolean; + + /** + * When set to `true`, includes credentials (cookies, authorization headers, or TLS + * client certificates) with requests. + */ + allow_credentials?: boolean; + + /** + * Allowed HTTP request headers. + */ + allowed_headers?: Array; + + /** + * Allowed HTTP request methods. + */ + allowed_methods?: Array; + + /** + * Allowed origins. + */ + allowed_origins?: Array; + + /** + * The maximum number of seconds the results of a preflight request can be cached. + */ + max_age?: number; + } + /** - * The tags you want assigned to an application. Tags are used to filter - * applications in the App Launcher dashboard. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - tags?: Array; + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; - updated_at?: string; + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, we propagate DELETE requests to the target application for SCIM + * resources. If true, we only set `active` to false on the SCIM resource. This is + * useful because some targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } } export interface BrowserVncApplication { /** - * The primary hostname and path that Access will secure. If the app is visible in - * the App Launcher dashboard, this is the domain that will be displayed. + * The domain and path that Access will secure. */ domain: string; @@ -771,14 +1432,6 @@ export namespace Application { */ id?: string; - /** - * When set to true, users can authenticate to this application using their WARP - * session. When set to false this application will always require direct IdP - * authentication. This setting always overrides the organization setting for WARP - * authentication. - */ - allow_authenticate_via_warp?: boolean; - /** * The identity providers your users can select when connecting to this * application. Defaults to all IdPs configured in your account. @@ -801,7 +1454,7 @@ export namespace Application { */ auto_redirect_to_identity?: boolean; - cors_headers?: ApplicationsAPI.CORSHeaders; + cors_headers?: BrowserVncApplication.CORSHeaders; created_at?: string; @@ -813,21 +1466,10 @@ export namespace Application { /** * The custom URL a user is redirected to when they are denied access to the - * application when failing identity-based rules. + * application. */ custom_deny_url?: string; - /** - * The custom URL a user is redirected to when they are denied access to the - * application when failing non-identity rules. - */ - custom_non_identity_deny_url?: string; - - /** - * The custom pages that will be displayed when applicable for this application - */ - custom_pages?: Array; - /** * Enables the binding cookie, which increases security against compromised * authorization tokens and CSRF attacks. @@ -856,12 +1498,6 @@ export namespace Application { */ options_preflight_bypass?: boolean; - /** - * Enables cookie paths to scope an application's JWT to the application path. If - * disabled, the JWT will scope to the hostname by default - */ - path_cookie_attribute?: boolean; - /** * Sets the SameSite cookie setting, which provides increased security against CSRF * attacks. @@ -869,9 +1505,10 @@ export namespace Application { same_site_cookie_attribute?: string; /** - * List of domains that Access will secure. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - self_hosted_domains?: Array; + scim_config?: BrowserVncApplication.ScimConfig; /** * Returns a 401 status code when the request is blocked by a Service Auth policy. @@ -890,13 +1527,231 @@ export namespace Application { */ skip_interstitial?: boolean; + updated_at?: string; + } + + export namespace BrowserVncApplication { + export interface CORSHeaders { + /** + * Allows all HTTP request headers. + */ + allow_all_headers?: boolean; + + /** + * Allows all HTTP request methods. + */ + allow_all_methods?: boolean; + + /** + * Allows all origins. + */ + allow_all_origins?: boolean; + + /** + * When set to `true`, includes credentials (cookies, authorization headers, or TLS + * client certificates) with requests. + */ + allow_credentials?: boolean; + + /** + * Allowed HTTP request headers. + */ + allowed_headers?: Array; + + /** + * Allowed HTTP request methods. + */ + allowed_methods?: Array; + + /** + * Allowed origins. + */ + allowed_origins?: Array; + + /** + * The maximum number of seconds the results of a preflight request can be cached. + */ + max_age?: number; + } + /** - * The tags you want assigned to an application. Tags are used to filter - * applications in the App Launcher dashboard. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - tags?: Array; + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; - updated_at?: string; + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, we propagate DELETE requests to the target application for SCIM + * resources. If true, we only set `active` to false on the SCIM resource. This is + * useful because some targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } } export interface AppLauncherApplication { @@ -930,8 +1785,7 @@ export namespace Application { created_at?: string; /** - * The primary hostname and path that Access will secure. If the app is visible in - * the App Launcher dashboard, this is the domain that will be displayed. + * The domain and path that Access will secure. */ domain?: string; @@ -940,6 +1794,12 @@ export namespace Application { */ name?: string; + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: AppLauncherApplication.ScimConfig; + /** * The amount of time that tokens issued for this application will be valid. Must * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, @@ -950,6 +1810,187 @@ export namespace Application { updated_at?: string; } + export namespace AppLauncherApplication { + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, we propagate DELETE requests to the target application for SCIM + * resources. If true, we only set `active` to false on the SCIM resource. This is + * useful because some targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + export interface DeviceEnrollmentPermissionsApplication { /** * The application type. @@ -981,8 +2022,7 @@ export namespace Application { created_at?: string; /** - * The primary hostname and path that Access will secure. If the app is visible in - * the App Launcher dashboard, this is the domain that will be displayed. + * The domain and path that Access will secure. */ domain?: string; @@ -991,6 +2031,12 @@ export namespace Application { */ name?: string; + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: DeviceEnrollmentPermissionsApplication.ScimConfig; + /** * The amount of time that tokens issued for this application will be valid. Must * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, @@ -1001,13 +2047,194 @@ export namespace Application { updated_at?: string; } - export interface BrowserIsolationPermissionsApplication { + export namespace DeviceEnrollmentPermissionsApplication { /** - * The application type. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - type: ApplicationsAPI.ApplicationType; + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; - /** + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, we propagate DELETE requests to the target application for SCIM + * resources. If true, we only set `active` to false on the SCIM resource. This is + * useful because some targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BrowserIsolationPermissionsApplication { + /** + * The application type. + */ + type: ApplicationsAPI.ApplicationType; + + /** * UUID */ id?: string; @@ -1032,8 +2259,7 @@ export namespace Application { created_at?: string; /** - * The primary hostname and path that Access will secure. If the app is visible in - * the App Launcher dashboard, this is the domain that will be displayed. + * The domain and path that Access will secure. */ domain?: string; @@ -1042,6 +2268,12 @@ export namespace Application { */ name?: string; + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: BrowserIsolationPermissionsApplication.ScimConfig; + /** * The amount of time that tokens issued for this application will be valid. Must * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, @@ -1052,28 +2284,211 @@ export namespace Application { updated_at?: string; } + export namespace BrowserIsolationPermissionsApplication { + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, we propagate DELETE requests to the target application for SCIM + * resources. If true, we only set `active` to false on the SCIM resource. This is + * useful because some targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + export interface BookmarkApplication { /** - * UUID + * The URL or domain of the bookmark. */ - id?: string; + domain: string; /** - * Displays the application in the App Launcher. + * The application type. */ - app_launcher_visible?: boolean; + type: string; /** - * Audience tag. + * UUID */ - aud?: string; + id?: string; - created_at?: string; + app_launcher_visible?: unknown; /** - * The URL or domain of the bookmark. + * Audience tag. */ - domain?: string; + aud?: string; + + created_at?: string; /** * The image URL for the logo shown in the App Launcher dashboard. @@ -1086,42 +2501,218 @@ export namespace Application { name?: string; /** - * The tags you want assigned to an application. Tags are used to filter - * applications in the App Launcher dashboard. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - tags?: Array; + scim_config?: BookmarkApplication.ScimConfig; + + updated_at?: string; + } + export namespace BookmarkApplication { /** - * The application type. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - type?: string; + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; - updated_at?: string; - } -} + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; -/** - * The application type. - */ -export type ApplicationType = - | 'self_hosted' - | 'saas' - | 'ssh' - | 'vnc' - | 'app_launcher' - | 'warp' - | 'biso' - | 'bookmark' - | 'dash_sso'; + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; -/** - * The application type. - */ -export type ApplicationTypeParam = - | 'self_hosted' - | 'saas' - | 'ssh' - | 'vnc' + /** + * If false, we propagate DELETE requests to the target application for SCIM + * resources. If true, we only set `active` to false on the SCIM resource. This is + * useful because some targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } +} + +/** + * The application type. + */ +export type ApplicationType = + | 'self_hosted' + | 'saas' + | 'ssh' + | 'vnc' + | 'app_launcher' + | 'warp' + | 'biso' + | 'bookmark' + | 'dash_sso'; + +/** + * The application type. + */ +export type ApplicationTypeParam = + | 'self_hosted' + | 'saas' + | 'ssh' + | 'vnc' | 'app_launcher' | 'warp' | 'biso' @@ -1411,58 +3002,11430 @@ export interface SAMLSaaSAppParam { */ saml_attribute_transform_jsonata?: string; - /** - * A globally unique name for an identity or service provider. - */ - sp_entity_id?: string; + /** + * A globally unique name for an identity or service provider. + */ + sp_entity_id?: string; + + /** + * The endpoint where your SaaS application will send login requests. + */ + sso_endpoint?: string; +} + +export namespace SAMLSaaSAppParam { + export interface CustomAttributes { + /** + * The SAML FriendlyName of the attribute. + */ + friendly_name?: string; + + /** + * The name of the attribute. + */ + name?: string; + + /** + * A globally unique name for an identity or service provider. + */ + name_format?: ApplicationsAPI.SaaSAppNameFormatParam; + + /** + * If the attribute is required when building a SAML assertion. + */ + required?: boolean; + + source?: ApplicationsAPI.SaaSAppSourceParam; + } +} + +/** + * A domain that Access will secure. + */ +export type SelfHostedDomains = string; + +/** + * A domain that Access will secure. + */ +export type SelfHostedDomainsParam = string; + +export type ApplicationCreateResponse = + | ApplicationCreateResponse.SelfHostedApplication + | ApplicationCreateResponse.SaaSApplication + | ApplicationCreateResponse.BrowserSSHApplication + | ApplicationCreateResponse.BrowserVncApplication + | ApplicationCreateResponse.AppLauncherApplication + | ApplicationCreateResponse.DeviceEnrollmentPermissionsApplication + | ApplicationCreateResponse.BrowserIsolationPermissionsApplication + | ApplicationCreateResponse.BookmarkApplication; + +export namespace ApplicationCreateResponse { + export interface SelfHostedApplication { + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain: string; + + /** + * The application type. + */ + type: string; + + /** + * UUID + */ + id?: string; + + /** + * When set to true, users can authenticate to this application using their WARP + * session. When set to false this application will always require direct IdP + * authentication. This setting always overrides the organization setting for WARP + * authentication. + */ + allow_authenticate_via_warp?: boolean; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + cors_headers?: ApplicationsAPI.CORSHeaders; + + created_at?: string; + + /** + * The custom error message shown to a user when they are denied access to the + * application. + */ + custom_deny_message?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing identity-based rules. + */ + custom_deny_url?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing non-identity rules. + */ + custom_non_identity_deny_url?: string; + + /** + * The custom pages that will be displayed when applicable for this application + */ + custom_pages?: Array; + + /** + * Enables the binding cookie, which increases security against compromised + * authorization tokens and CSRF attacks. + */ + enable_binding_cookie?: boolean; + + /** + * Enables the HttpOnly cookie attribute, which increases security against XSS + * attacks. + */ + http_only_cookie_attribute?: boolean; + + /** + * The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * The name of the application. + */ + name?: string; + + /** + * Allows options preflight requests to bypass Access authentication and go + * directly to the origin. Cannot turn on if cors_headers is set. + */ + options_preflight_bypass?: boolean; + + /** + * Enables cookie paths to scope an application's JWT to the application path. If + * disabled, the JWT will scope to the hostname by default + */ + path_cookie_attribute?: boolean; + + policies?: Array; + + /** + * Sets the SameSite cookie setting, which provides increased security against CSRF + * attacks. + */ + same_site_cookie_attribute?: string; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: SelfHostedApplication.ScimConfig; + + /** + * List of domains that Access will secure. + */ + self_hosted_domains?: Array; + + /** + * Returns a 401 status code when the request is blocked by a Service Auth policy. + */ + service_auth_401_redirect?: boolean; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + /** + * Enables automatic authentication through cloudflared. + */ + skip_interstitial?: boolean; + + /** + * The tags you want assigned to an application. Tags are used to filter + * applications in the App Launcher dashboard. + */ + tags?: Array; + + updated_at?: string; + } + + export namespace SelfHostedApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface SaaSApplication { + /** + * UUID + */ + id?: string; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + created_at?: string; + + /** + * The custom pages that will be displayed when applicable for this application + */ + custom_pages?: Array; + + /** + * The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * The name of the application. + */ + name?: string; + + policies?: Array; + + saas_app?: ApplicationsAPI.SAMLSaaSApp | SaaSApplication.AccessOIDCSaaSApp; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: SaaSApplication.ScimConfig; + + /** + * The tags you want assigned to an application. Tags are used to filter + * applications in the App Launcher dashboard. + */ + tags?: Array; + + /** + * The application type. + */ + type?: string; + + updated_at?: string; + } + + export namespace SaaSApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + export interface AccessOIDCSaaSApp { + /** + * If client secret should be required on the token endpoint when + * authorization_code_with_pkce grant is used. + */ + allow_pkce_without_client_secret?: boolean; + + /** + * The URL where this applications tile redirects users + */ + app_launcher_url?: string; + + /** + * Identifier of the authentication protocol used for the saas app. Required for + * OIDC. + */ + auth_type?: 'saml' | 'oidc'; + + /** + * The application client id + */ + client_id?: string; + + /** + * The application client secret, only returned on POST request. + */ + client_secret?: string; + + created_at?: string; + + custom_claims?: AccessOIDCSaaSApp.CustomClaims; + + /** + * The OIDC flows supported by this application + */ + grant_types?: Array<'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens'>; + + /** + * A regex to filter Cloudflare groups returned in ID token and userinfo endpoint + */ + group_filter_regex?: string; + + /** + * The Access public certificate that will be used to verify your identity. + */ + public_key?: string; + + /** + * The permitted URL's for Cloudflare to return Authorization codes and Access/ID + * tokens + */ + redirect_uris?: Array; + + refresh_token_options?: AccessOIDCSaaSApp.RefreshTokenOptions; + + /** + * Define the user information shared with access, "offline_access" scope will be + * automatically enabled if refresh tokens are enabled + */ + scopes?: Array<'openid' | 'groups' | 'email' | 'profile'>; + + updated_at?: string; + } + + export namespace AccessOIDCSaaSApp { + export interface CustomClaims { + /** + * The name of the claim. + */ + name?: string; + + /** + * A mapping from IdP ID to claim name. + */ + name_by_idp?: Record; + + /** + * If the claim is required when building an OIDC token. + */ + required?: boolean; + + /** + * The scope of the claim. + */ + scope?: 'groups' | 'profile' | 'email' | 'openid'; + + source?: CustomClaims.Source; + } + + export namespace CustomClaims { + export interface Source { + /** + * The name of the IdP claim. + */ + name?: string; + } + } + + export interface RefreshTokenOptions { + /** + * How long a refresh token will be valid for after creation. Valid units are + * m,h,d. Must be longer than 1m. + */ + lifetime?: string; + } + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BrowserSSHApplication { + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain: string; + + /** + * The application type. + */ + type: string; + + /** + * UUID + */ + id?: string; + + /** + * When set to true, users can authenticate to this application using their WARP + * session. When set to false this application will always require direct IdP + * authentication. This setting always overrides the organization setting for WARP + * authentication. + */ + allow_authenticate_via_warp?: boolean; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + cors_headers?: ApplicationsAPI.CORSHeaders; + + created_at?: string; + + /** + * The custom error message shown to a user when they are denied access to the + * application. + */ + custom_deny_message?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing identity-based rules. + */ + custom_deny_url?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing non-identity rules. + */ + custom_non_identity_deny_url?: string; + + /** + * The custom pages that will be displayed when applicable for this application + */ + custom_pages?: Array; + + /** + * Enables the binding cookie, which increases security against compromised + * authorization tokens and CSRF attacks. + */ + enable_binding_cookie?: boolean; + + /** + * Enables the HttpOnly cookie attribute, which increases security against XSS + * attacks. + */ + http_only_cookie_attribute?: boolean; + + /** + * The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * The name of the application. + */ + name?: string; + + /** + * Allows options preflight requests to bypass Access authentication and go + * directly to the origin. Cannot turn on if cors_headers is set. + */ + options_preflight_bypass?: boolean; + + /** + * Enables cookie paths to scope an application's JWT to the application path. If + * disabled, the JWT will scope to the hostname by default + */ + path_cookie_attribute?: boolean; + + policies?: Array; + + /** + * Sets the SameSite cookie setting, which provides increased security against CSRF + * attacks. + */ + same_site_cookie_attribute?: string; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: BrowserSSHApplication.ScimConfig; + + /** + * List of domains that Access will secure. + */ + self_hosted_domains?: Array; + + /** + * Returns a 401 status code when the request is blocked by a Service Auth policy. + */ + service_auth_401_redirect?: boolean; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + /** + * Enables automatic authentication through cloudflared. + */ + skip_interstitial?: boolean; + + /** + * The tags you want assigned to an application. Tags are used to filter + * applications in the App Launcher dashboard. + */ + tags?: Array; + + updated_at?: string; + } + + export namespace BrowserSSHApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BrowserVncApplication { + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain: string; + + /** + * The application type. + */ + type: string; + + /** + * UUID + */ + id?: string; + + /** + * When set to true, users can authenticate to this application using their WARP + * session. When set to false this application will always require direct IdP + * authentication. This setting always overrides the organization setting for WARP + * authentication. + */ + allow_authenticate_via_warp?: boolean; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + cors_headers?: ApplicationsAPI.CORSHeaders; + + created_at?: string; + + /** + * The custom error message shown to a user when they are denied access to the + * application. + */ + custom_deny_message?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing identity-based rules. + */ + custom_deny_url?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing non-identity rules. + */ + custom_non_identity_deny_url?: string; + + /** + * The custom pages that will be displayed when applicable for this application + */ + custom_pages?: Array; + + /** + * Enables the binding cookie, which increases security against compromised + * authorization tokens and CSRF attacks. + */ + enable_binding_cookie?: boolean; + + /** + * Enables the HttpOnly cookie attribute, which increases security against XSS + * attacks. + */ + http_only_cookie_attribute?: boolean; + + /** + * The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * The name of the application. + */ + name?: string; + + /** + * Allows options preflight requests to bypass Access authentication and go + * directly to the origin. Cannot turn on if cors_headers is set. + */ + options_preflight_bypass?: boolean; + + /** + * Enables cookie paths to scope an application's JWT to the application path. If + * disabled, the JWT will scope to the hostname by default + */ + path_cookie_attribute?: boolean; + + policies?: Array; + + /** + * Sets the SameSite cookie setting, which provides increased security against CSRF + * attacks. + */ + same_site_cookie_attribute?: string; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: BrowserVncApplication.ScimConfig; + + /** + * List of domains that Access will secure. + */ + self_hosted_domains?: Array; + + /** + * Returns a 401 status code when the request is blocked by a Service Auth policy. + */ + service_auth_401_redirect?: boolean; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + /** + * Enables automatic authentication through cloudflared. + */ + skip_interstitial?: boolean; + + /** + * The tags you want assigned to an application. Tags are used to filter + * applications in the App Launcher dashboard. + */ + tags?: Array; + + updated_at?: string; + } + + export namespace BrowserVncApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface AppLauncherApplication { + /** + * The application type. + */ + type: ApplicationsAPI.ApplicationType; + + /** + * UUID + */ + id?: string; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + created_at?: string; + + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain?: string; + + /** + * The name of the application. + */ + name?: string; + + policies?: Array; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: AppLauncherApplication.ScimConfig; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + export namespace AppLauncherApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface DeviceEnrollmentPermissionsApplication { + /** + * The application type. + */ + type: ApplicationsAPI.ApplicationType; + + /** + * UUID + */ + id?: string; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + created_at?: string; + + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain?: string; + + /** + * The name of the application. + */ + name?: string; + + policies?: Array; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: DeviceEnrollmentPermissionsApplication.ScimConfig; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + export namespace DeviceEnrollmentPermissionsApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BrowserIsolationPermissionsApplication { + /** + * The application type. + */ + type: ApplicationsAPI.ApplicationType; + + /** + * UUID + */ + id?: string; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + created_at?: string; + + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain?: string; + + /** + * The name of the application. + */ + name?: string; + + policies?: Array; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: BrowserIsolationPermissionsApplication.ScimConfig; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + export namespace BrowserIsolationPermissionsApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BookmarkApplication { + /** + * UUID + */ + id?: string; + + /** + * Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Audience tag. + */ + aud?: string; + + created_at?: string; + + /** + * The URL or domain of the bookmark. + */ + domain?: string; + + /** + * The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * The name of the application. + */ + name?: string; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: BookmarkApplication.ScimConfig; + + /** + * The tags you want assigned to an application. Tags are used to filter + * applications in the App Launcher dashboard. + */ + tags?: Array; + + /** + * The application type. + */ + type?: string; + + updated_at?: string; + } + + export namespace BookmarkApplication { + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } +} + +export type ApplicationUpdateResponse = + | ApplicationUpdateResponse.SelfHostedApplication + | ApplicationUpdateResponse.SaaSApplication + | ApplicationUpdateResponse.BrowserSSHApplication + | ApplicationUpdateResponse.BrowserVncApplication + | ApplicationUpdateResponse.AppLauncherApplication + | ApplicationUpdateResponse.DeviceEnrollmentPermissionsApplication + | ApplicationUpdateResponse.BrowserIsolationPermissionsApplication + | ApplicationUpdateResponse.BookmarkApplication; + +export namespace ApplicationUpdateResponse { + export interface SelfHostedApplication { + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain: string; + + /** + * The application type. + */ + type: string; + + /** + * UUID + */ + id?: string; + + /** + * When set to true, users can authenticate to this application using their WARP + * session. When set to false this application will always require direct IdP + * authentication. This setting always overrides the organization setting for WARP + * authentication. + */ + allow_authenticate_via_warp?: boolean; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + cors_headers?: ApplicationsAPI.CORSHeaders; + + created_at?: string; + + /** + * The custom error message shown to a user when they are denied access to the + * application. + */ + custom_deny_message?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing identity-based rules. + */ + custom_deny_url?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing non-identity rules. + */ + custom_non_identity_deny_url?: string; + + /** + * The custom pages that will be displayed when applicable for this application + */ + custom_pages?: Array; + + /** + * Enables the binding cookie, which increases security against compromised + * authorization tokens and CSRF attacks. + */ + enable_binding_cookie?: boolean; + + /** + * Enables the HttpOnly cookie attribute, which increases security against XSS + * attacks. + */ + http_only_cookie_attribute?: boolean; + + /** + * The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * The name of the application. + */ + name?: string; + + /** + * Allows options preflight requests to bypass Access authentication and go + * directly to the origin. Cannot turn on if cors_headers is set. + */ + options_preflight_bypass?: boolean; + + /** + * Enables cookie paths to scope an application's JWT to the application path. If + * disabled, the JWT will scope to the hostname by default + */ + path_cookie_attribute?: boolean; + + policies?: Array; + + /** + * Sets the SameSite cookie setting, which provides increased security against CSRF + * attacks. + */ + same_site_cookie_attribute?: string; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: SelfHostedApplication.ScimConfig; + + /** + * List of domains that Access will secure. + */ + self_hosted_domains?: Array; + + /** + * Returns a 401 status code when the request is blocked by a Service Auth policy. + */ + service_auth_401_redirect?: boolean; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + /** + * Enables automatic authentication through cloudflared. + */ + skip_interstitial?: boolean; + + /** + * The tags you want assigned to an application. Tags are used to filter + * applications in the App Launcher dashboard. + */ + tags?: Array; + + updated_at?: string; + } + + export namespace SelfHostedApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface SaaSApplication { + /** + * UUID + */ + id?: string; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + created_at?: string; + + /** + * The custom pages that will be displayed when applicable for this application + */ + custom_pages?: Array; + + /** + * The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * The name of the application. + */ + name?: string; + + policies?: Array; + + saas_app?: ApplicationsAPI.SAMLSaaSApp | SaaSApplication.AccessOIDCSaaSApp; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: SaaSApplication.ScimConfig; + + /** + * The tags you want assigned to an application. Tags are used to filter + * applications in the App Launcher dashboard. + */ + tags?: Array; + + /** + * The application type. + */ + type?: string; + + updated_at?: string; + } + + export namespace SaaSApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + export interface AccessOIDCSaaSApp { + /** + * If client secret should be required on the token endpoint when + * authorization_code_with_pkce grant is used. + */ + allow_pkce_without_client_secret?: boolean; + + /** + * The URL where this applications tile redirects users + */ + app_launcher_url?: string; + + /** + * Identifier of the authentication protocol used for the saas app. Required for + * OIDC. + */ + auth_type?: 'saml' | 'oidc'; + + /** + * The application client id + */ + client_id?: string; + + /** + * The application client secret, only returned on POST request. + */ + client_secret?: string; + + created_at?: string; + + custom_claims?: AccessOIDCSaaSApp.CustomClaims; + + /** + * The OIDC flows supported by this application + */ + grant_types?: Array<'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens'>; + + /** + * A regex to filter Cloudflare groups returned in ID token and userinfo endpoint + */ + group_filter_regex?: string; + + /** + * The Access public certificate that will be used to verify your identity. + */ + public_key?: string; + + /** + * The permitted URL's for Cloudflare to return Authorization codes and Access/ID + * tokens + */ + redirect_uris?: Array; + + refresh_token_options?: AccessOIDCSaaSApp.RefreshTokenOptions; + + /** + * Define the user information shared with access, "offline_access" scope will be + * automatically enabled if refresh tokens are enabled + */ + scopes?: Array<'openid' | 'groups' | 'email' | 'profile'>; + + updated_at?: string; + } + + export namespace AccessOIDCSaaSApp { + export interface CustomClaims { + /** + * The name of the claim. + */ + name?: string; + + /** + * A mapping from IdP ID to claim name. + */ + name_by_idp?: Record; + + /** + * If the claim is required when building an OIDC token. + */ + required?: boolean; + + /** + * The scope of the claim. + */ + scope?: 'groups' | 'profile' | 'email' | 'openid'; + + source?: CustomClaims.Source; + } + + export namespace CustomClaims { + export interface Source { + /** + * The name of the IdP claim. + */ + name?: string; + } + } + + export interface RefreshTokenOptions { + /** + * How long a refresh token will be valid for after creation. Valid units are + * m,h,d. Must be longer than 1m. + */ + lifetime?: string; + } + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BrowserSSHApplication { + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain: string; + + /** + * The application type. + */ + type: string; + + /** + * UUID + */ + id?: string; + + /** + * When set to true, users can authenticate to this application using their WARP + * session. When set to false this application will always require direct IdP + * authentication. This setting always overrides the organization setting for WARP + * authentication. + */ + allow_authenticate_via_warp?: boolean; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + cors_headers?: ApplicationsAPI.CORSHeaders; + + created_at?: string; + + /** + * The custom error message shown to a user when they are denied access to the + * application. + */ + custom_deny_message?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing identity-based rules. + */ + custom_deny_url?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing non-identity rules. + */ + custom_non_identity_deny_url?: string; + + /** + * The custom pages that will be displayed when applicable for this application + */ + custom_pages?: Array; + + /** + * Enables the binding cookie, which increases security against compromised + * authorization tokens and CSRF attacks. + */ + enable_binding_cookie?: boolean; + + /** + * Enables the HttpOnly cookie attribute, which increases security against XSS + * attacks. + */ + http_only_cookie_attribute?: boolean; + + /** + * The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * The name of the application. + */ + name?: string; + + /** + * Allows options preflight requests to bypass Access authentication and go + * directly to the origin. Cannot turn on if cors_headers is set. + */ + options_preflight_bypass?: boolean; + + /** + * Enables cookie paths to scope an application's JWT to the application path. If + * disabled, the JWT will scope to the hostname by default + */ + path_cookie_attribute?: boolean; + + policies?: Array; + + /** + * Sets the SameSite cookie setting, which provides increased security against CSRF + * attacks. + */ + same_site_cookie_attribute?: string; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: BrowserSSHApplication.ScimConfig; + + /** + * List of domains that Access will secure. + */ + self_hosted_domains?: Array; + + /** + * Returns a 401 status code when the request is blocked by a Service Auth policy. + */ + service_auth_401_redirect?: boolean; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + /** + * Enables automatic authentication through cloudflared. + */ + skip_interstitial?: boolean; + + /** + * The tags you want assigned to an application. Tags are used to filter + * applications in the App Launcher dashboard. + */ + tags?: Array; + + updated_at?: string; + } + + export namespace BrowserSSHApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BrowserVncApplication { + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain: string; + + /** + * The application type. + */ + type: string; + + /** + * UUID + */ + id?: string; + + /** + * When set to true, users can authenticate to this application using their WARP + * session. When set to false this application will always require direct IdP + * authentication. This setting always overrides the organization setting for WARP + * authentication. + */ + allow_authenticate_via_warp?: boolean; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + cors_headers?: ApplicationsAPI.CORSHeaders; + + created_at?: string; + + /** + * The custom error message shown to a user when they are denied access to the + * application. + */ + custom_deny_message?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing identity-based rules. + */ + custom_deny_url?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing non-identity rules. + */ + custom_non_identity_deny_url?: string; + + /** + * The custom pages that will be displayed when applicable for this application + */ + custom_pages?: Array; + + /** + * Enables the binding cookie, which increases security against compromised + * authorization tokens and CSRF attacks. + */ + enable_binding_cookie?: boolean; + + /** + * Enables the HttpOnly cookie attribute, which increases security against XSS + * attacks. + */ + http_only_cookie_attribute?: boolean; + + /** + * The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * The name of the application. + */ + name?: string; + + /** + * Allows options preflight requests to bypass Access authentication and go + * directly to the origin. Cannot turn on if cors_headers is set. + */ + options_preflight_bypass?: boolean; + + /** + * Enables cookie paths to scope an application's JWT to the application path. If + * disabled, the JWT will scope to the hostname by default + */ + path_cookie_attribute?: boolean; + + policies?: Array; + + /** + * Sets the SameSite cookie setting, which provides increased security against CSRF + * attacks. + */ + same_site_cookie_attribute?: string; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: BrowserVncApplication.ScimConfig; + + /** + * List of domains that Access will secure. + */ + self_hosted_domains?: Array; + + /** + * Returns a 401 status code when the request is blocked by a Service Auth policy. + */ + service_auth_401_redirect?: boolean; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + /** + * Enables automatic authentication through cloudflared. + */ + skip_interstitial?: boolean; + + /** + * The tags you want assigned to an application. Tags are used to filter + * applications in the App Launcher dashboard. + */ + tags?: Array; + + updated_at?: string; + } + + export namespace BrowserVncApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface AppLauncherApplication { + /** + * The application type. + */ + type: ApplicationsAPI.ApplicationType; + + /** + * UUID + */ + id?: string; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + created_at?: string; + + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain?: string; + + /** + * The name of the application. + */ + name?: string; + + policies?: Array; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: AppLauncherApplication.ScimConfig; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + export namespace AppLauncherApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface DeviceEnrollmentPermissionsApplication { + /** + * The application type. + */ + type: ApplicationsAPI.ApplicationType; + + /** + * UUID + */ + id?: string; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + created_at?: string; + + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain?: string; + + /** + * The name of the application. + */ + name?: string; + + policies?: Array; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: DeviceEnrollmentPermissionsApplication.ScimConfig; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + export namespace DeviceEnrollmentPermissionsApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BrowserIsolationPermissionsApplication { + /** + * The application type. + */ + type: ApplicationsAPI.ApplicationType; + + /** + * UUID + */ + id?: string; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + created_at?: string; + + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain?: string; + + /** + * The name of the application. + */ + name?: string; + + policies?: Array; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: BrowserIsolationPermissionsApplication.ScimConfig; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + export namespace BrowserIsolationPermissionsApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BookmarkApplication { + /** + * UUID + */ + id?: string; + + /** + * Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Audience tag. + */ + aud?: string; + + created_at?: string; + + /** + * The URL or domain of the bookmark. + */ + domain?: string; + + /** + * The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * The name of the application. + */ + name?: string; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: BookmarkApplication.ScimConfig; + + /** + * The tags you want assigned to an application. Tags are used to filter + * applications in the App Launcher dashboard. + */ + tags?: Array; + + /** + * The application type. + */ + type?: string; + + updated_at?: string; + } + + export namespace BookmarkApplication { + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } +} + +export type ApplicationListResponse = + | ApplicationListResponse.SelfHostedApplication + | ApplicationListResponse.SaaSApplication + | ApplicationListResponse.BrowserSSHApplication + | ApplicationListResponse.BrowserVncApplication + | ApplicationListResponse.AppLauncherApplication + | ApplicationListResponse.DeviceEnrollmentPermissionsApplication + | ApplicationListResponse.BrowserIsolationPermissionsApplication + | ApplicationListResponse.BookmarkApplication; + +export namespace ApplicationListResponse { + export interface SelfHostedApplication { + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain: string; + + /** + * The application type. + */ + type: string; + + /** + * UUID + */ + id?: string; + + /** + * When set to true, users can authenticate to this application using their WARP + * session. When set to false this application will always require direct IdP + * authentication. This setting always overrides the organization setting for WARP + * authentication. + */ + allow_authenticate_via_warp?: boolean; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + cors_headers?: ApplicationsAPI.CORSHeaders; + + created_at?: string; + + /** + * The custom error message shown to a user when they are denied access to the + * application. + */ + custom_deny_message?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing identity-based rules. + */ + custom_deny_url?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing non-identity rules. + */ + custom_non_identity_deny_url?: string; + + /** + * The custom pages that will be displayed when applicable for this application + */ + custom_pages?: Array; + + /** + * Enables the binding cookie, which increases security against compromised + * authorization tokens and CSRF attacks. + */ + enable_binding_cookie?: boolean; + + /** + * Enables the HttpOnly cookie attribute, which increases security against XSS + * attacks. + */ + http_only_cookie_attribute?: boolean; + + /** + * The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * The name of the application. + */ + name?: string; + + /** + * Allows options preflight requests to bypass Access authentication and go + * directly to the origin. Cannot turn on if cors_headers is set. + */ + options_preflight_bypass?: boolean; + + /** + * Enables cookie paths to scope an application's JWT to the application path. If + * disabled, the JWT will scope to the hostname by default + */ + path_cookie_attribute?: boolean; + + policies?: Array; + + /** + * Sets the SameSite cookie setting, which provides increased security against CSRF + * attacks. + */ + same_site_cookie_attribute?: string; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: SelfHostedApplication.ScimConfig; + + /** + * List of domains that Access will secure. + */ + self_hosted_domains?: Array; + + /** + * Returns a 401 status code when the request is blocked by a Service Auth policy. + */ + service_auth_401_redirect?: boolean; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + /** + * Enables automatic authentication through cloudflared. + */ + skip_interstitial?: boolean; + + /** + * The tags you want assigned to an application. Tags are used to filter + * applications in the App Launcher dashboard. + */ + tags?: Array; + + updated_at?: string; + } + + export namespace SelfHostedApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface SaaSApplication { + /** + * UUID + */ + id?: string; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + created_at?: string; + + /** + * The custom pages that will be displayed when applicable for this application + */ + custom_pages?: Array; + + /** + * The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * The name of the application. + */ + name?: string; + + policies?: Array; + + saas_app?: ApplicationsAPI.SAMLSaaSApp | SaaSApplication.AccessOIDCSaaSApp; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: SaaSApplication.ScimConfig; + + /** + * The tags you want assigned to an application. Tags are used to filter + * applications in the App Launcher dashboard. + */ + tags?: Array; + + /** + * The application type. + */ + type?: string; + + updated_at?: string; + } + + export namespace SaaSApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + export interface AccessOIDCSaaSApp { + /** + * If client secret should be required on the token endpoint when + * authorization_code_with_pkce grant is used. + */ + allow_pkce_without_client_secret?: boolean; + + /** + * The URL where this applications tile redirects users + */ + app_launcher_url?: string; + + /** + * Identifier of the authentication protocol used for the saas app. Required for + * OIDC. + */ + auth_type?: 'saml' | 'oidc'; + + /** + * The application client id + */ + client_id?: string; + + /** + * The application client secret, only returned on POST request. + */ + client_secret?: string; + + created_at?: string; + + custom_claims?: AccessOIDCSaaSApp.CustomClaims; + + /** + * The OIDC flows supported by this application + */ + grant_types?: Array<'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens'>; + + /** + * A regex to filter Cloudflare groups returned in ID token and userinfo endpoint + */ + group_filter_regex?: string; + + /** + * The Access public certificate that will be used to verify your identity. + */ + public_key?: string; + + /** + * The permitted URL's for Cloudflare to return Authorization codes and Access/ID + * tokens + */ + redirect_uris?: Array; + + refresh_token_options?: AccessOIDCSaaSApp.RefreshTokenOptions; + + /** + * Define the user information shared with access, "offline_access" scope will be + * automatically enabled if refresh tokens are enabled + */ + scopes?: Array<'openid' | 'groups' | 'email' | 'profile'>; + + updated_at?: string; + } + + export namespace AccessOIDCSaaSApp { + export interface CustomClaims { + /** + * The name of the claim. + */ + name?: string; + + /** + * A mapping from IdP ID to claim name. + */ + name_by_idp?: Record; + + /** + * If the claim is required when building an OIDC token. + */ + required?: boolean; + + /** + * The scope of the claim. + */ + scope?: 'groups' | 'profile' | 'email' | 'openid'; + + source?: CustomClaims.Source; + } + + export namespace CustomClaims { + export interface Source { + /** + * The name of the IdP claim. + */ + name?: string; + } + } + + export interface RefreshTokenOptions { + /** + * How long a refresh token will be valid for after creation. Valid units are + * m,h,d. Must be longer than 1m. + */ + lifetime?: string; + } + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BrowserSSHApplication { + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain: string; + + /** + * The application type. + */ + type: string; + + /** + * UUID + */ + id?: string; + + /** + * When set to true, users can authenticate to this application using their WARP + * session. When set to false this application will always require direct IdP + * authentication. This setting always overrides the organization setting for WARP + * authentication. + */ + allow_authenticate_via_warp?: boolean; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + cors_headers?: ApplicationsAPI.CORSHeaders; + + created_at?: string; + + /** + * The custom error message shown to a user when they are denied access to the + * application. + */ + custom_deny_message?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing identity-based rules. + */ + custom_deny_url?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing non-identity rules. + */ + custom_non_identity_deny_url?: string; + + /** + * The custom pages that will be displayed when applicable for this application + */ + custom_pages?: Array; + + /** + * Enables the binding cookie, which increases security against compromised + * authorization tokens and CSRF attacks. + */ + enable_binding_cookie?: boolean; + + /** + * Enables the HttpOnly cookie attribute, which increases security against XSS + * attacks. + */ + http_only_cookie_attribute?: boolean; + + /** + * The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * The name of the application. + */ + name?: string; + + /** + * Allows options preflight requests to bypass Access authentication and go + * directly to the origin. Cannot turn on if cors_headers is set. + */ + options_preflight_bypass?: boolean; + + /** + * Enables cookie paths to scope an application's JWT to the application path. If + * disabled, the JWT will scope to the hostname by default + */ + path_cookie_attribute?: boolean; + + policies?: Array; + + /** + * Sets the SameSite cookie setting, which provides increased security against CSRF + * attacks. + */ + same_site_cookie_attribute?: string; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: BrowserSSHApplication.ScimConfig; + + /** + * List of domains that Access will secure. + */ + self_hosted_domains?: Array; + + /** + * Returns a 401 status code when the request is blocked by a Service Auth policy. + */ + service_auth_401_redirect?: boolean; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + /** + * Enables automatic authentication through cloudflared. + */ + skip_interstitial?: boolean; + + /** + * The tags you want assigned to an application. Tags are used to filter + * applications in the App Launcher dashboard. + */ + tags?: Array; + + updated_at?: string; + } + + export namespace BrowserSSHApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BrowserVncApplication { + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain: string; + + /** + * The application type. + */ + type: string; + + /** + * UUID + */ + id?: string; + + /** + * When set to true, users can authenticate to this application using their WARP + * session. When set to false this application will always require direct IdP + * authentication. This setting always overrides the organization setting for WARP + * authentication. + */ + allow_authenticate_via_warp?: boolean; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + cors_headers?: ApplicationsAPI.CORSHeaders; + + created_at?: string; + + /** + * The custom error message shown to a user when they are denied access to the + * application. + */ + custom_deny_message?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing identity-based rules. + */ + custom_deny_url?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing non-identity rules. + */ + custom_non_identity_deny_url?: string; + + /** + * The custom pages that will be displayed when applicable for this application + */ + custom_pages?: Array; + + /** + * Enables the binding cookie, which increases security against compromised + * authorization tokens and CSRF attacks. + */ + enable_binding_cookie?: boolean; + + /** + * Enables the HttpOnly cookie attribute, which increases security against XSS + * attacks. + */ + http_only_cookie_attribute?: boolean; + + /** + * The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * The name of the application. + */ + name?: string; + + /** + * Allows options preflight requests to bypass Access authentication and go + * directly to the origin. Cannot turn on if cors_headers is set. + */ + options_preflight_bypass?: boolean; + + /** + * Enables cookie paths to scope an application's JWT to the application path. If + * disabled, the JWT will scope to the hostname by default + */ + path_cookie_attribute?: boolean; + + policies?: Array; + + /** + * Sets the SameSite cookie setting, which provides increased security against CSRF + * attacks. + */ + same_site_cookie_attribute?: string; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: BrowserVncApplication.ScimConfig; + + /** + * List of domains that Access will secure. + */ + self_hosted_domains?: Array; + + /** + * Returns a 401 status code when the request is blocked by a Service Auth policy. + */ + service_auth_401_redirect?: boolean; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + /** + * Enables automatic authentication through cloudflared. + */ + skip_interstitial?: boolean; + + /** + * The tags you want assigned to an application. Tags are used to filter + * applications in the App Launcher dashboard. + */ + tags?: Array; + + updated_at?: string; + } + + export namespace BrowserVncApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface AppLauncherApplication { + /** + * The application type. + */ + type: ApplicationsAPI.ApplicationType; + + /** + * UUID + */ + id?: string; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + created_at?: string; + + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain?: string; + + /** + * The name of the application. + */ + name?: string; + + policies?: Array; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: AppLauncherApplication.ScimConfig; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + export namespace AppLauncherApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface DeviceEnrollmentPermissionsApplication { + /** + * The application type. + */ + type: ApplicationsAPI.ApplicationType; + + /** + * UUID + */ + id?: string; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + created_at?: string; + + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain?: string; + + /** + * The name of the application. + */ + name?: string; + + policies?: Array; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: DeviceEnrollmentPermissionsApplication.ScimConfig; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + export namespace DeviceEnrollmentPermissionsApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BrowserIsolationPermissionsApplication { + /** + * The application type. + */ + type: ApplicationsAPI.ApplicationType; + + /** + * UUID + */ + id?: string; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + created_at?: string; + + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain?: string; + + /** + * The name of the application. + */ + name?: string; + + policies?: Array; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: BrowserIsolationPermissionsApplication.ScimConfig; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + export namespace BrowserIsolationPermissionsApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BookmarkApplication { + /** + * UUID + */ + id?: string; + + /** + * Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Audience tag. + */ + aud?: string; + + created_at?: string; + + /** + * The URL or domain of the bookmark. + */ + domain?: string; + + /** + * The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * The name of the application. + */ + name?: string; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: BookmarkApplication.ScimConfig; + + /** + * The tags you want assigned to an application. Tags are used to filter + * applications in the App Launcher dashboard. + */ + tags?: Array; + + /** + * The application type. + */ + type?: string; + + updated_at?: string; + } + + export namespace BookmarkApplication { + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } +} + +export interface ApplicationDeleteResponse { + /** + * UUID + */ + id?: string; +} + +export type ApplicationGetResponse = + | ApplicationGetResponse.SelfHostedApplication + | ApplicationGetResponse.SaaSApplication + | ApplicationGetResponse.BrowserSSHApplication + | ApplicationGetResponse.BrowserVncApplication + | ApplicationGetResponse.AppLauncherApplication + | ApplicationGetResponse.DeviceEnrollmentPermissionsApplication + | ApplicationGetResponse.BrowserIsolationPermissionsApplication + | ApplicationGetResponse.BookmarkApplication; + +export namespace ApplicationGetResponse { + export interface SelfHostedApplication { + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain: string; + + /** + * The application type. + */ + type: string; + + /** + * UUID + */ + id?: string; + + /** + * When set to true, users can authenticate to this application using their WARP + * session. When set to false this application will always require direct IdP + * authentication. This setting always overrides the organization setting for WARP + * authentication. + */ + allow_authenticate_via_warp?: boolean; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + cors_headers?: ApplicationsAPI.CORSHeaders; + + created_at?: string; + + /** + * The custom error message shown to a user when they are denied access to the + * application. + */ + custom_deny_message?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing identity-based rules. + */ + custom_deny_url?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing non-identity rules. + */ + custom_non_identity_deny_url?: string; + + /** + * The custom pages that will be displayed when applicable for this application + */ + custom_pages?: Array; + + /** + * Enables the binding cookie, which increases security against compromised + * authorization tokens and CSRF attacks. + */ + enable_binding_cookie?: boolean; + + /** + * Enables the HttpOnly cookie attribute, which increases security against XSS + * attacks. + */ + http_only_cookie_attribute?: boolean; + + /** + * The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * The name of the application. + */ + name?: string; + + /** + * Allows options preflight requests to bypass Access authentication and go + * directly to the origin. Cannot turn on if cors_headers is set. + */ + options_preflight_bypass?: boolean; + + /** + * Enables cookie paths to scope an application's JWT to the application path. If + * disabled, the JWT will scope to the hostname by default + */ + path_cookie_attribute?: boolean; + + policies?: Array; + + /** + * Sets the SameSite cookie setting, which provides increased security against CSRF + * attacks. + */ + same_site_cookie_attribute?: string; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: SelfHostedApplication.ScimConfig; + + /** + * List of domains that Access will secure. + */ + self_hosted_domains?: Array; + + /** + * Returns a 401 status code when the request is blocked by a Service Auth policy. + */ + service_auth_401_redirect?: boolean; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + /** + * Enables automatic authentication through cloudflared. + */ + skip_interstitial?: boolean; + + /** + * The tags you want assigned to an application. Tags are used to filter + * applications in the App Launcher dashboard. + */ + tags?: Array; + + updated_at?: string; + } + + export namespace SelfHostedApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface SaaSApplication { + /** + * UUID + */ + id?: string; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + created_at?: string; + + /** + * The custom pages that will be displayed when applicable for this application + */ + custom_pages?: Array; + + /** + * The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * The name of the application. + */ + name?: string; + + policies?: Array; + + saas_app?: ApplicationsAPI.SAMLSaaSApp | SaaSApplication.AccessOIDCSaaSApp; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: SaaSApplication.ScimConfig; + + /** + * The tags you want assigned to an application. Tags are used to filter + * applications in the App Launcher dashboard. + */ + tags?: Array; + + /** + * The application type. + */ + type?: string; + + updated_at?: string; + } + + export namespace SaaSApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + export interface AccessOIDCSaaSApp { + /** + * If client secret should be required on the token endpoint when + * authorization_code_with_pkce grant is used. + */ + allow_pkce_without_client_secret?: boolean; + + /** + * The URL where this applications tile redirects users + */ + app_launcher_url?: string; + + /** + * Identifier of the authentication protocol used for the saas app. Required for + * OIDC. + */ + auth_type?: 'saml' | 'oidc'; + + /** + * The application client id + */ + client_id?: string; + + /** + * The application client secret, only returned on POST request. + */ + client_secret?: string; + + created_at?: string; + + custom_claims?: AccessOIDCSaaSApp.CustomClaims; + + /** + * The OIDC flows supported by this application + */ + grant_types?: Array<'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens'>; + + /** + * A regex to filter Cloudflare groups returned in ID token and userinfo endpoint + */ + group_filter_regex?: string; + + /** + * The Access public certificate that will be used to verify your identity. + */ + public_key?: string; + + /** + * The permitted URL's for Cloudflare to return Authorization codes and Access/ID + * tokens + */ + redirect_uris?: Array; + + refresh_token_options?: AccessOIDCSaaSApp.RefreshTokenOptions; + + /** + * Define the user information shared with access, "offline_access" scope will be + * automatically enabled if refresh tokens are enabled + */ + scopes?: Array<'openid' | 'groups' | 'email' | 'profile'>; + + updated_at?: string; + } + + export namespace AccessOIDCSaaSApp { + export interface CustomClaims { + /** + * The name of the claim. + */ + name?: string; + + /** + * A mapping from IdP ID to claim name. + */ + name_by_idp?: Record; + + /** + * If the claim is required when building an OIDC token. + */ + required?: boolean; + + /** + * The scope of the claim. + */ + scope?: 'groups' | 'profile' | 'email' | 'openid'; + + source?: CustomClaims.Source; + } + + export namespace CustomClaims { + export interface Source { + /** + * The name of the IdP claim. + */ + name?: string; + } + } + + export interface RefreshTokenOptions { + /** + * How long a refresh token will be valid for after creation. Valid units are + * m,h,d. Must be longer than 1m. + */ + lifetime?: string; + } + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BrowserSSHApplication { + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain: string; + + /** + * The application type. + */ + type: string; + + /** + * UUID + */ + id?: string; + + /** + * When set to true, users can authenticate to this application using their WARP + * session. When set to false this application will always require direct IdP + * authentication. This setting always overrides the organization setting for WARP + * authentication. + */ + allow_authenticate_via_warp?: boolean; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + cors_headers?: ApplicationsAPI.CORSHeaders; + + created_at?: string; + + /** + * The custom error message shown to a user when they are denied access to the + * application. + */ + custom_deny_message?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing identity-based rules. + */ + custom_deny_url?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing non-identity rules. + */ + custom_non_identity_deny_url?: string; + + /** + * The custom pages that will be displayed when applicable for this application + */ + custom_pages?: Array; + + /** + * Enables the binding cookie, which increases security against compromised + * authorization tokens and CSRF attacks. + */ + enable_binding_cookie?: boolean; + + /** + * Enables the HttpOnly cookie attribute, which increases security against XSS + * attacks. + */ + http_only_cookie_attribute?: boolean; + + /** + * The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * The name of the application. + */ + name?: string; + + /** + * Allows options preflight requests to bypass Access authentication and go + * directly to the origin. Cannot turn on if cors_headers is set. + */ + options_preflight_bypass?: boolean; + + /** + * Enables cookie paths to scope an application's JWT to the application path. If + * disabled, the JWT will scope to the hostname by default + */ + path_cookie_attribute?: boolean; + + policies?: Array; + + /** + * Sets the SameSite cookie setting, which provides increased security against CSRF + * attacks. + */ + same_site_cookie_attribute?: string; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: BrowserSSHApplication.ScimConfig; + + /** + * List of domains that Access will secure. + */ + self_hosted_domains?: Array; + + /** + * Returns a 401 status code when the request is blocked by a Service Auth policy. + */ + service_auth_401_redirect?: boolean; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + /** + * Enables automatic authentication through cloudflared. + */ + skip_interstitial?: boolean; + + /** + * The tags you want assigned to an application. Tags are used to filter + * applications in the App Launcher dashboard. + */ + tags?: Array; + + updated_at?: string; + } + + export namespace BrowserSSHApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BrowserVncApplication { + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain: string; + + /** + * The application type. + */ + type: string; + + /** + * UUID + */ + id?: string; + + /** + * When set to true, users can authenticate to this application using their WARP + * session. When set to false this application will always require direct IdP + * authentication. This setting always overrides the organization setting for WARP + * authentication. + */ + allow_authenticate_via_warp?: boolean; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + cors_headers?: ApplicationsAPI.CORSHeaders; + + created_at?: string; + + /** + * The custom error message shown to a user when they are denied access to the + * application. + */ + custom_deny_message?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing identity-based rules. + */ + custom_deny_url?: string; + + /** + * The custom URL a user is redirected to when they are denied access to the + * application when failing non-identity rules. + */ + custom_non_identity_deny_url?: string; + + /** + * The custom pages that will be displayed when applicable for this application + */ + custom_pages?: Array; + + /** + * Enables the binding cookie, which increases security against compromised + * authorization tokens and CSRF attacks. + */ + enable_binding_cookie?: boolean; + + /** + * Enables the HttpOnly cookie attribute, which increases security against XSS + * attacks. + */ + http_only_cookie_attribute?: boolean; + + /** + * The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * The name of the application. + */ + name?: string; + + /** + * Allows options preflight requests to bypass Access authentication and go + * directly to the origin. Cannot turn on if cors_headers is set. + */ + options_preflight_bypass?: boolean; + + /** + * Enables cookie paths to scope an application's JWT to the application path. If + * disabled, the JWT will scope to the hostname by default + */ + path_cookie_attribute?: boolean; + + policies?: Array; + + /** + * Sets the SameSite cookie setting, which provides increased security against CSRF + * attacks. + */ + same_site_cookie_attribute?: string; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: BrowserVncApplication.ScimConfig; + + /** + * List of domains that Access will secure. + */ + self_hosted_domains?: Array; + + /** + * Returns a 401 status code when the request is blocked by a Service Auth policy. + */ + service_auth_401_redirect?: boolean; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + /** + * Enables automatic authentication through cloudflared. + */ + skip_interstitial?: boolean; + + /** + * The tags you want assigned to an application. Tags are used to filter + * applications in the App Launcher dashboard. + */ + tags?: Array; + + updated_at?: string; + } + + export namespace BrowserVncApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface AppLauncherApplication { + /** + * The application type. + */ + type: ApplicationsAPI.ApplicationType; + + /** + * UUID + */ + id?: string; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + created_at?: string; + + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain?: string; + + /** + * The name of the application. + */ + name?: string; + + policies?: Array; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: AppLauncherApplication.ScimConfig; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + export namespace AppLauncherApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface DeviceEnrollmentPermissionsApplication { + /** + * The application type. + */ + type: ApplicationsAPI.ApplicationType; + + /** + * UUID + */ + id?: string; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + created_at?: string; + + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain?: string; + + /** + * The name of the application. + */ + name?: string; + + policies?: Array; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: DeviceEnrollmentPermissionsApplication.ScimConfig; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + export namespace DeviceEnrollmentPermissionsApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BrowserIsolationPermissionsApplication { + /** + * The application type. + */ + type: ApplicationsAPI.ApplicationType; + + /** + * UUID + */ + id?: string; + + /** + * The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Audience tag. + */ + aud?: string; + + /** + * When set to `true`, users skip the identity provider selection step during + * login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + created_at?: string; + + /** + * The primary hostname and path that Access will secure. If the app is visible in + * the App Launcher dashboard, this is the domain that will be displayed. + */ + domain?: string; + + /** + * The name of the application. + */ + name?: string; + + policies?: Array; + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + scim_config?: BrowserIsolationPermissionsApplication.ScimConfig; + + /** + * The amount of time that tokens issued for this application will be valid. Must + * be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + * s, m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + export namespace BrowserIsolationPermissionsApplication { + export interface Policy { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BookmarkApplication { + /** + * UUID + */ + id?: string; + + /** + * Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Audience tag. + */ + aud?: string; + + created_at?: string; - /** - * The endpoint where your SaaS application will send login requests. - */ - sso_endpoint?: string; -} + /** + * The URL or domain of the bookmark. + */ + domain?: string; -export namespace SAMLSaaSAppParam { - export interface CustomAttributes { /** - * The SAML FriendlyName of the attribute. + * The image URL for the logo shown in the App Launcher dashboard. */ - friendly_name?: string; + logo_url?: string; /** - * The name of the attribute. + * The name of the application. */ name?: string; /** - * A globally unique name for an identity or service provider. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - name_format?: ApplicationsAPI.SaaSAppNameFormatParam; + scim_config?: BookmarkApplication.ScimConfig; /** - * If the attribute is required when building a SAML assertion. + * The tags you want assigned to an application. Tags are used to filter + * applications in the App Launcher dashboard. */ - required?: boolean; + tags?: Array; - source?: ApplicationsAPI.SaaSAppSourceParam; + /** + * The application type. + */ + type?: string; + + updated_at?: string; } -} -/** - * A domain that Access will secure. - */ -export type SelfHostedDomains = string; + export namespace BookmarkApplication { + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; -/** - * A domain that Access will secure. - */ -export type SelfHostedDomainsParam = string; + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; -export interface ApplicationDeleteResponse { - /** - * UUID - */ - id?: string; + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } } export type ApplicationRevokeTokensResponse = unknown; @@ -1475,7 +14438,7 @@ export type ApplicationCreateParams = | ApplicationCreateParams.AppLauncherApplication | ApplicationCreateParams.DeviceEnrollmentPermissionsApplication | ApplicationCreateParams.BrowserIsolationPermissionsApplication - | ApplicationCreateParams.BookmarkApplication; + | ApplicationCreateParams.AccessBookmarkProps; export namespace ApplicationCreateParams { export interface SelfHostedApplication { @@ -1591,6 +14554,17 @@ export namespace ApplicationCreateParams { */ path_cookie_attribute?: boolean; + /** + * Body param: The policies that will apply to the application, in ascending order + * of precedence. Items can reference existing policies or create new policies + * exclusive to the application. + */ + policies?: Array< + | ApplicationCreateParams.SelfHostedApplication.AccessAppPolicyLink + | string + | ApplicationCreateParams.SelfHostedApplication.UnionMember2 + >; + /** * Body param: Sets the SameSite cookie setting, which provides increased security * against CSRF attacks. @@ -1627,6 +14601,100 @@ export namespace ApplicationCreateParams { tags?: Array; } + export namespace SelfHostedApplication { + /** + * A JSON that links a reusable policy to an application. + */ + export interface AccessAppPolicyLink { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + } + + export interface UnionMember2 { + /** + * The action Access will take if a user matches this policy. + */ + decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include: Array; + + /** + * The name of the Access policy. + */ + name: string; + + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + } + } + export interface SaaSApplication { /** * Path param: The Account ID to use for this endpoint. Mutually exclusive with the @@ -1673,6 +14741,17 @@ export namespace ApplicationCreateParams { */ name?: string; + /** + * Body param: The policies that will apply to the application, in ascending order + * of precedence. Items can reference existing policies or create new policies + * exclusive to the application. + */ + policies?: Array< + | ApplicationCreateParams.SaaSApplication.AccessAppPolicyLink + | string + | ApplicationCreateParams.SaaSApplication.UnionMember2 + >; + /** * Body param: */ @@ -1690,8 +14769,106 @@ export namespace ApplicationCreateParams { type?: string; } - export namespace SaaSApplication { - export interface AccessOIDCSaaSApp { + export namespace SaaSApplication { + /** + * A JSON that links a reusable policy to an application. + */ + export interface AccessAppPolicyLink { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + } + + export interface UnionMember2 { + /** + * The action Access will take if a user matches this policy. + */ + decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include: Array; + + /** + * The name of the Access policy. + */ + name: string; + + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + } + + export interface AccessOIDCSaaSApp { + /** + * If client secret should be required on the token endpoint when + * authorization_code_with_pkce grant is used. + */ + allow_pkce_without_client_secret?: boolean; + /** * The URL where this applications tile redirects users */ @@ -1718,7 +14895,7 @@ export namespace ApplicationCreateParams { /** * The OIDC flows supported by this application */ - grant_types?: Array<'authorization_code' | 'authorization_code_with_pkce'>; + grant_types?: Array<'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens'>; /** * A regex to filter Cloudflare groups returned in ID token and userinfo endpoint @@ -1736,8 +14913,11 @@ export namespace ApplicationCreateParams { */ redirect_uris?: Array; + refresh_token_options?: AccessOIDCSaaSApp.RefreshTokenOptions; + /** - * Define the user information shared with access + * Define the user information shared with access, "offline_access" scope will be + * automatically enabled if refresh tokens are enabled */ scopes?: Array<'openid' | 'groups' | 'email' | 'profile'>; } @@ -1775,6 +14955,14 @@ export namespace ApplicationCreateParams { name?: string; } } + + export interface RefreshTokenOptions { + /** + * How long a refresh token will be valid for after creation. Valid units are + * m,h,d. Must be longer than 1m. + */ + lifetime?: string; + } } } @@ -1891,6 +15079,17 @@ export namespace ApplicationCreateParams { */ path_cookie_attribute?: boolean; + /** + * Body param: The policies that will apply to the application, in ascending order + * of precedence. Items can reference existing policies or create new policies + * exclusive to the application. + */ + policies?: Array< + | ApplicationCreateParams.BrowserSSHApplication.AccessAppPolicyLink + | string + | ApplicationCreateParams.BrowserSSHApplication.UnionMember2 + >; + /** * Body param: Sets the SameSite cookie setting, which provides increased security * against CSRF attacks. @@ -1927,6 +15126,100 @@ export namespace ApplicationCreateParams { tags?: Array; } + export namespace BrowserSSHApplication { + /** + * A JSON that links a reusable policy to an application. + */ + export interface AccessAppPolicyLink { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + } + + export interface UnionMember2 { + /** + * The action Access will take if a user matches this policy. + */ + decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include: Array; + + /** + * The name of the Access policy. + */ + name: string; + + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + } + } + export interface BrowserVncApplication { /** * Body param: The primary hostname and path that Access will secure. If the app is @@ -2040,6 +15333,17 @@ export namespace ApplicationCreateParams { */ path_cookie_attribute?: boolean; + /** + * Body param: The policies that will apply to the application, in ascending order + * of precedence. Items can reference existing policies or create new policies + * exclusive to the application. + */ + policies?: Array< + | ApplicationCreateParams.BrowserVncApplication.AccessAppPolicyLink + | string + | ApplicationCreateParams.BrowserVncApplication.UnionMember2 + >; + /** * Body param: Sets the SameSite cookie setting, which provides increased security * against CSRF attacks. @@ -2076,6 +15380,100 @@ export namespace ApplicationCreateParams { tags?: Array; } + export namespace BrowserVncApplication { + /** + * A JSON that links a reusable policy to an application. + */ + export interface AccessAppPolicyLink { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + } + + export interface UnionMember2 { + /** + * The action Access will take if a user matches this policy. + */ + decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include: Array; + + /** + * The name of the Access policy. + */ + name: string; + + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + } + } + export interface AppLauncherApplication { /** * Body param: The application type. @@ -2106,6 +15504,17 @@ export namespace ApplicationCreateParams { */ auto_redirect_to_identity?: boolean; + /** + * Body param: The policies that will apply to the application, in ascending order + * of precedence. Items can reference existing policies or create new policies + * exclusive to the application. + */ + policies?: Array< + | ApplicationCreateParams.AppLauncherApplication.AccessAppPolicyLink + | string + | ApplicationCreateParams.AppLauncherApplication.UnionMember2 + >; + /** * Body param: The amount of time that tokens issued for this application will be * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us @@ -2114,6 +15523,100 @@ export namespace ApplicationCreateParams { session_duration?: string; } + export namespace AppLauncherApplication { + /** + * A JSON that links a reusable policy to an application. + */ + export interface AccessAppPolicyLink { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + } + + export interface UnionMember2 { + /** + * The action Access will take if a user matches this policy. + */ + decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include: Array; + + /** + * The name of the Access policy. + */ + name: string; + + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + } + } + export interface DeviceEnrollmentPermissionsApplication { /** * Body param: The application type. @@ -2144,6 +15647,160 @@ export namespace ApplicationCreateParams { */ auto_redirect_to_identity?: boolean; + /** + * Body param: The policies that will apply to the application, in ascending order + * of precedence. Items can reference existing policies or create new policies + * exclusive to the application. + */ + policies?: Array< + | ApplicationCreateParams.DeviceEnrollmentPermissionsApplication.AccessAppPolicyLink + | string + | ApplicationCreateParams.DeviceEnrollmentPermissionsApplication.UnionMember2 + >; + + /** + * Body param: The amount of time that tokens issued for this application will be + * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us + * (or µs), ms, s, m, h. + */ + session_duration?: string; + } + + export namespace DeviceEnrollmentPermissionsApplication { + /** + * A JSON that links a reusable policy to an application. + */ + export interface AccessAppPolicyLink { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + } + + export interface UnionMember2 { + /** + * The action Access will take if a user matches this policy. + */ + decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include: Array; + + /** + * The name of the Access policy. + */ + name: string; + + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + } + } + + export interface BrowserIsolationPermissionsApplication { + /** + * Body param: The application type. + */ + type: ApplicationTypeParam; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Body param: When set to `true`, users skip the identity provider selection step + * during login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + /** + * Body param: The policies that will apply to the application, in ascending order + * of precedence. Items can reference existing policies or create new policies + * exclusive to the application. + */ + policies?: Array< + | ApplicationCreateParams.BrowserIsolationPermissionsApplication.AccessAppPolicyLink + | string + | ApplicationCreateParams.BrowserIsolationPermissionsApplication.UnionMember2 + >; + /** * Body param: The amount of time that tokens issued for this application will be * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us @@ -2152,45 +15809,101 @@ export namespace ApplicationCreateParams { session_duration?: string; } - export interface BrowserIsolationPermissionsApplication { + export namespace BrowserIsolationPermissionsApplication { /** - * Body param: The application type. + * A JSON that links a reusable policy to an application. */ - type: ApplicationTypeParam; + export interface AccessAppPolicyLink { + /** + * The ID of the Access policy. + */ + id?: string; - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + } - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; + export interface UnionMember2 { + /** + * The action Access will take if a user matches this policy. + */ + decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; - /** - * Body param: The identity providers your users can select when connecting to this - * application. Defaults to all IdPs configured in your account. - */ - allowed_idps?: Array; + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include: Array; - /** - * Body param: When set to `true`, users skip the identity provider selection step - * during login. You must specify only one identity provider in allowed_idps. - */ - auto_redirect_to_identity?: boolean; + /** + * The name of the Access policy. + */ + name: string; - /** - * Body param: The amount of time that tokens issued for this application will be - * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us - * (or µs), ms, s, m, h. - */ - session_duration?: string; + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + } } - export interface BookmarkApplication { + export interface AccessBookmarkProps { /** * Path param: The Account ID to use for this endpoint. Mutually exclusive with the * Zone ID. @@ -2244,7 +15957,7 @@ export type ApplicationUpdateParams = | ApplicationUpdateParams.AppLauncherApplication | ApplicationUpdateParams.DeviceEnrollmentPermissionsApplication | ApplicationUpdateParams.BrowserIsolationPermissionsApplication - | ApplicationUpdateParams.BookmarkApplication; + | ApplicationUpdateParams.AccessBookmarkProps; export namespace ApplicationUpdateParams { export interface SelfHostedApplication { @@ -2360,6 +16073,17 @@ export namespace ApplicationUpdateParams { */ path_cookie_attribute?: boolean; + /** + * Body param: The policies that will apply to the application, in ascending order + * of precedence. Items can reference existing policies or create new policies + * exclusive to the application. + */ + policies?: Array< + | ApplicationUpdateParams.SelfHostedApplication.AccessAppPolicyLink + | string + | ApplicationUpdateParams.SelfHostedApplication.UnionMember2 + >; + /** * Body param: Sets the SameSite cookie setting, which provides increased security * against CSRF attacks. @@ -2396,6 +16120,100 @@ export namespace ApplicationUpdateParams { tags?: Array; } + export namespace SelfHostedApplication { + /** + * A JSON that links a reusable policy to an application. + */ + export interface AccessAppPolicyLink { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + } + + export interface UnionMember2 { + /** + * The action Access will take if a user matches this policy. + */ + decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include: Array; + + /** + * The name of the Access policy. + */ + name: string; + + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + } + } + export interface SaaSApplication { /** * Path param: The Account ID to use for this endpoint. Mutually exclusive with the @@ -2442,6 +16260,17 @@ export namespace ApplicationUpdateParams { */ name?: string; + /** + * Body param: The policies that will apply to the application, in ascending order + * of precedence. Items can reference existing policies or create new policies + * exclusive to the application. + */ + policies?: Array< + | ApplicationUpdateParams.SaaSApplication.AccessAppPolicyLink + | string + | ApplicationUpdateParams.SaaSApplication.UnionMember2 + >; + /** * Body param: */ @@ -2460,7 +16289,105 @@ export namespace ApplicationUpdateParams { } export namespace SaaSApplication { + /** + * A JSON that links a reusable policy to an application. + */ + export interface AccessAppPolicyLink { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + } + + export interface UnionMember2 { + /** + * The action Access will take if a user matches this policy. + */ + decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include: Array; + + /** + * The name of the Access policy. + */ + name: string; + + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + } + export interface AccessOIDCSaaSApp { + /** + * If client secret should be required on the token endpoint when + * authorization_code_with_pkce grant is used. + */ + allow_pkce_without_client_secret?: boolean; + /** * The URL where this applications tile redirects users */ @@ -2487,7 +16414,7 @@ export namespace ApplicationUpdateParams { /** * The OIDC flows supported by this application */ - grant_types?: Array<'authorization_code' | 'authorization_code_with_pkce'>; + grant_types?: Array<'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens'>; /** * A regex to filter Cloudflare groups returned in ID token and userinfo endpoint @@ -2505,8 +16432,11 @@ export namespace ApplicationUpdateParams { */ redirect_uris?: Array; + refresh_token_options?: AccessOIDCSaaSApp.RefreshTokenOptions; + /** - * Define the user information shared with access + * Define the user information shared with access, "offline_access" scope will be + * automatically enabled if refresh tokens are enabled */ scopes?: Array<'openid' | 'groups' | 'email' | 'profile'>; } @@ -2544,6 +16474,14 @@ export namespace ApplicationUpdateParams { name?: string; } } + + export interface RefreshTokenOptions { + /** + * How long a refresh token will be valid for after creation. Valid units are + * m,h,d. Must be longer than 1m. + */ + lifetime?: string; + } } } @@ -2660,40 +16598,145 @@ export namespace ApplicationUpdateParams { */ path_cookie_attribute?: boolean; - /** - * Body param: Sets the SameSite cookie setting, which provides increased security - * against CSRF attacks. - */ - same_site_cookie_attribute?: string; + /** + * Body param: The policies that will apply to the application, in ascending order + * of precedence. Items can reference existing policies or create new policies + * exclusive to the application. + */ + policies?: Array< + | ApplicationUpdateParams.BrowserSSHApplication.AccessAppPolicyLink + | string + | ApplicationUpdateParams.BrowserSSHApplication.UnionMember2 + >; + + /** + * Body param: Sets the SameSite cookie setting, which provides increased security + * against CSRF attacks. + */ + same_site_cookie_attribute?: string; + + /** + * Body param: List of domains that Access will secure. + */ + self_hosted_domains?: Array; + + /** + * Body param: Returns a 401 status code when the request is blocked by a Service + * Auth policy. + */ + service_auth_401_redirect?: boolean; + + /** + * Body param: The amount of time that tokens issued for this application will be + * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us + * (or µs), ms, s, m, h. + */ + session_duration?: string; + + /** + * Body param: Enables automatic authentication through cloudflared. + */ + skip_interstitial?: boolean; + + /** + * Body param: The tags you want assigned to an application. Tags are used to + * filter applications in the App Launcher dashboard. + */ + tags?: Array; + } + + export namespace BrowserSSHApplication { + /** + * A JSON that links a reusable policy to an application. + */ + export interface AccessAppPolicyLink { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + } + + export interface UnionMember2 { + /** + * The action Access will take if a user matches this policy. + */ + decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include: Array; + + /** + * The name of the Access policy. + */ + name: string; + + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; - /** - * Body param: List of domains that Access will secure. - */ - self_hosted_domains?: Array; + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; - /** - * Body param: Returns a 401 status code when the request is blocked by a Service - * Auth policy. - */ - service_auth_401_redirect?: boolean; + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; - /** - * Body param: The amount of time that tokens issued for this application will be - * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us - * (or µs), ms, s, m, h. - */ - session_duration?: string; + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; - /** - * Body param: Enables automatic authentication through cloudflared. - */ - skip_interstitial?: boolean; + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; - /** - * Body param: The tags you want assigned to an application. Tags are used to - * filter applications in the App Launcher dashboard. - */ - tags?: Array; + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + } } export interface BrowserVncApplication { @@ -2809,6 +16852,17 @@ export namespace ApplicationUpdateParams { */ path_cookie_attribute?: boolean; + /** + * Body param: The policies that will apply to the application, in ascending order + * of precedence. Items can reference existing policies or create new policies + * exclusive to the application. + */ + policies?: Array< + | ApplicationUpdateParams.BrowserVncApplication.AccessAppPolicyLink + | string + | ApplicationUpdateParams.BrowserVncApplication.UnionMember2 + >; + /** * Body param: Sets the SameSite cookie setting, which provides increased security * against CSRF attacks. @@ -2845,6 +16899,100 @@ export namespace ApplicationUpdateParams { tags?: Array; } + export namespace BrowserVncApplication { + /** + * A JSON that links a reusable policy to an application. + */ + export interface AccessAppPolicyLink { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + } + + export interface UnionMember2 { + /** + * The action Access will take if a user matches this policy. + */ + decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include: Array; + + /** + * The name of the Access policy. + */ + name: string; + + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + } + } + export interface AppLauncherApplication { /** * Body param: The application type. @@ -2875,6 +17023,17 @@ export namespace ApplicationUpdateParams { */ auto_redirect_to_identity?: boolean; + /** + * Body param: The policies that will apply to the application, in ascending order + * of precedence. Items can reference existing policies or create new policies + * exclusive to the application. + */ + policies?: Array< + | ApplicationUpdateParams.AppLauncherApplication.AccessAppPolicyLink + | string + | ApplicationUpdateParams.AppLauncherApplication.UnionMember2 + >; + /** * Body param: The amount of time that tokens issued for this application will be * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us @@ -2883,6 +17042,100 @@ export namespace ApplicationUpdateParams { session_duration?: string; } + export namespace AppLauncherApplication { + /** + * A JSON that links a reusable policy to an application. + */ + export interface AccessAppPolicyLink { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + } + + export interface UnionMember2 { + /** + * The action Access will take if a user matches this policy. + */ + decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include: Array; + + /** + * The name of the Access policy. + */ + name: string; + + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + } + } + export interface DeviceEnrollmentPermissionsApplication { /** * Body param: The application type. @@ -2913,6 +17166,17 @@ export namespace ApplicationUpdateParams { */ auto_redirect_to_identity?: boolean; + /** + * Body param: The policies that will apply to the application, in ascending order + * of precedence. Items can reference existing policies or create new policies + * exclusive to the application. + */ + policies?: Array< + | ApplicationUpdateParams.DeviceEnrollmentPermissionsApplication.AccessAppPolicyLink + | string + | ApplicationUpdateParams.DeviceEnrollmentPermissionsApplication.UnionMember2 + >; + /** * Body param: The amount of time that tokens issued for this application will be * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us @@ -2921,6 +17185,100 @@ export namespace ApplicationUpdateParams { session_duration?: string; } + export namespace DeviceEnrollmentPermissionsApplication { + /** + * A JSON that links a reusable policy to an application. + */ + export interface AccessAppPolicyLink { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + } + + export interface UnionMember2 { + /** + * The action Access will take if a user matches this policy. + */ + decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include: Array; + + /** + * The name of the Access policy. + */ + name: string; + + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + } + } + export interface BrowserIsolationPermissionsApplication { /** * Body param: The application type. @@ -2951,6 +17309,17 @@ export namespace ApplicationUpdateParams { */ auto_redirect_to_identity?: boolean; + /** + * Body param: The policies that will apply to the application, in ascending order + * of precedence. Items can reference existing policies or create new policies + * exclusive to the application. + */ + policies?: Array< + | ApplicationUpdateParams.BrowserIsolationPermissionsApplication.AccessAppPolicyLink + | string + | ApplicationUpdateParams.BrowserIsolationPermissionsApplication.UnionMember2 + >; + /** * Body param: The amount of time that tokens issued for this application will be * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us @@ -2959,7 +17328,101 @@ export namespace ApplicationUpdateParams { session_duration?: string; } - export interface BookmarkApplication { + export namespace BrowserIsolationPermissionsApplication { + /** + * A JSON that links a reusable policy to an application. + */ + export interface AccessAppPolicyLink { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + } + + export interface UnionMember2 { + /** + * The action Access will take if a user matches this policy. + */ + decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include: Array; + + /** + * The name of the Access policy. + */ + name: string; + + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + } + } + + export interface AccessBookmarkProps { /** * Path param: The Account ID to use for this endpoint. Mutually exclusive with the * Zone ID. @@ -3067,9 +17530,13 @@ export namespace Applications { export import SaaSAppSource = ApplicationsAPI.SaaSAppSource; export import SAMLSaaSApp = ApplicationsAPI.SAMLSaaSApp; export import SelfHostedDomains = ApplicationsAPI.SelfHostedDomains; + export import ApplicationCreateResponse = ApplicationsAPI.ApplicationCreateResponse; + export import ApplicationUpdateResponse = ApplicationsAPI.ApplicationUpdateResponse; + export import ApplicationListResponse = ApplicationsAPI.ApplicationListResponse; export import ApplicationDeleteResponse = ApplicationsAPI.ApplicationDeleteResponse; + export import ApplicationGetResponse = ApplicationsAPI.ApplicationGetResponse; export import ApplicationRevokeTokensResponse = ApplicationsAPI.ApplicationRevokeTokensResponse; - export import ApplicationsSinglePage = ApplicationsAPI.ApplicationsSinglePage; + export import ApplicationListResponsesSinglePage = ApplicationsAPI.ApplicationListResponsesSinglePage; export import ApplicationCreateParams = ApplicationsAPI.ApplicationCreateParams; export import ApplicationUpdateParams = ApplicationsAPI.ApplicationUpdateParams; export import ApplicationListParams = ApplicationsAPI.ApplicationListParams; @@ -3093,8 +17560,12 @@ export namespace Applications { export import Policies = PoliciesAPI.Policies; export import ApprovalGroup = PoliciesAPI.ApprovalGroup; export import Policy = PoliciesAPI.Policy; + export import PolicyCreateResponse = PoliciesAPI.PolicyCreateResponse; + export import PolicyUpdateResponse = PoliciesAPI.PolicyUpdateResponse; + export import PolicyListResponse = PoliciesAPI.PolicyListResponse; export import PolicyDeleteResponse = PoliciesAPI.PolicyDeleteResponse; - export import PoliciesSinglePage = PoliciesAPI.PoliciesSinglePage; + export import PolicyGetResponse = PoliciesAPI.PolicyGetResponse; + export import PolicyListResponsesSinglePage = PoliciesAPI.PolicyListResponsesSinglePage; export import PolicyCreateParams = PoliciesAPI.PolicyCreateParams; export import PolicyUpdateParams = PoliciesAPI.PolicyUpdateParams; export import PolicyListParams = PoliciesAPI.PolicyListParams; diff --git a/src/resources/zero-trust/access/applications/index.ts b/src/resources/zero-trust/access/applications/index.ts index 2fe2fdbd76..c1db7c1675 100644 --- a/src/resources/zero-trust/access/applications/index.ts +++ b/src/resources/zero-trust/access/applications/index.ts @@ -14,7 +14,11 @@ export { SaaSAppSource, SAMLSaaSApp, SelfHostedDomains, + ApplicationCreateResponse, + ApplicationUpdateResponse, + ApplicationListResponse, ApplicationDeleteResponse, + ApplicationGetResponse, ApplicationRevokeTokensResponse, ApplicationCreateParams, ApplicationUpdateParams, @@ -22,19 +26,23 @@ export { ApplicationDeleteParams, ApplicationGetParams, ApplicationRevokeTokensParams, - ApplicationsSinglePage, + ApplicationListResponsesSinglePage, Applications, } from './applications'; export { ApprovalGroup, Policy, + PolicyCreateResponse, + PolicyUpdateResponse, + PolicyListResponse, PolicyDeleteResponse, + PolicyGetResponse, PolicyCreateParams, PolicyUpdateParams, PolicyListParams, PolicyDeleteParams, PolicyGetParams, - PoliciesSinglePage, + PolicyListResponsesSinglePage, Policies, } from './policies'; export { diff --git a/src/resources/zero-trust/access/applications/policies.ts b/src/resources/zero-trust/access/applications/policies.ts index 43e1463ea9..acb5d286ba 100644 --- a/src/resources/zero-trust/access/applications/policies.ts +++ b/src/resources/zero-trust/access/applications/policies.ts @@ -10,9 +10,16 @@ import { SinglePage } from 'cloudflare/pagination'; export class Policies extends APIResource { /** - * Create a new Access policy for an application. + * Creates a policy applying exclusive to a single application that defines the + * users or groups who can reach it. We recommend creating a reusable policy + * instead and subsequently referencing its ID in the application's 'policies' + * array. */ - create(uuid: string, params: PolicyCreateParams, options?: Core.RequestOptions): Core.APIPromise { + create( + uuid: string, + params: PolicyCreateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { const { account_id, zone_id, ...body } = params; if (!account_id && !zone_id) { throw new CloudflareError('You must provide either account_id or zone_id.'); @@ -34,19 +41,20 @@ export class Policies extends APIResource { this._client.post(`/${accountOrZone}/${accountOrZoneId}/access/apps/${uuid}/policies`, { body, ...options, - }) as Core.APIPromise<{ result: Policy }> + }) as Core.APIPromise<{ result: PolicyCreateResponse }> )._thenUnwrap((obj) => obj.result); } /** - * Update a configured Access policy. + * Updates an Access policy specific to an application. To update a reusable + * policy, use the /account or zones/{identifier}/policies/{uid} endpoint. */ update( uuid1: string, uuid: string, params: PolicyUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, zone_id, ...body } = params; if (!account_id && !zone_id) { throw new CloudflareError('You must provide either account_id or zone_id.'); @@ -68,24 +76,28 @@ export class Policies extends APIResource { this._client.put(`/${accountOrZone}/${accountOrZoneId}/access/apps/${uuid1}/policies/${uuid}`, { body, ...options, - }) as Core.APIPromise<{ result: Policy }> + }) as Core.APIPromise<{ result: PolicyUpdateResponse }> )._thenUnwrap((obj) => obj.result); } /** - * Lists Access policies configured for an application. + * Lists Access policies configured for an application. Returns both exclusively + * scoped and reusable policies used by the application. */ list( uuid: string, params?: PolicyListParams, options?: Core.RequestOptions, - ): Core.PagePromise; - list(uuid: string, options?: Core.RequestOptions): Core.PagePromise; + ): Core.PagePromise; + list( + uuid: string, + options?: Core.RequestOptions, + ): Core.PagePromise; list( uuid: string, params: PolicyListParams | Core.RequestOptions = {}, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { if (isRequestOptions(params)) { return this.list(uuid, {}, params); } @@ -108,13 +120,14 @@ export class Policies extends APIResource { }; return this._client.getAPIList( `/${accountOrZone}/${accountOrZoneId}/access/apps/${uuid}/policies`, - PoliciesSinglePage, + PolicyListResponsesSinglePage, options, ); } /** - * Delete an Access policy. + * Deletes an Access policy specific to an application. To delete a reusable + * policy, use the /account or zones/{identifier}/policies/{uid} endpoint. */ delete( uuid1: string, @@ -158,21 +171,22 @@ export class Policies extends APIResource { } /** - * Fetches a single Access policy. + * Fetches a single Access policy configured for an application. Returns both + * exclusively owned and reusable policies used by the application. */ get( uuid1: string, uuid: string, params?: PolicyGetParams, options?: Core.RequestOptions, - ): Core.APIPromise; - get(uuid1: string, uuid: string, options?: Core.RequestOptions): Core.APIPromise; + ): Core.APIPromise; + get(uuid1: string, uuid: string, options?: Core.RequestOptions): Core.APIPromise; get( uuid1: string, uuid: string, params: PolicyGetParams | Core.RequestOptions = {}, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { if (isRequestOptions(params)) { return this.get(uuid1, uuid, {}, params); } @@ -197,12 +211,12 @@ export class Policies extends APIResource { this._client.get( `/${accountOrZone}/${accountOrZoneId}/access/apps/${uuid1}/policies/${uuid}`, options, - ) as Core.APIPromise<{ result: Policy }> + ) as Core.APIPromise<{ result: PolicyGetResponse }> )._thenUnwrap((obj) => obj.result); } } -export class PoliciesSinglePage extends SinglePage {} +export class PolicyListResponsesSinglePage extends SinglePage {} /** * A group of email addresses that can approve a temporary authentication request. @@ -250,6 +264,99 @@ export interface Policy { */ id?: string; + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * The order of execution for this policy. Must be unique for each policy. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + updated_at?: string; +} + +export namespace Policy { + /** + * A group of email addresses that can approve a temporary authentication request. + */ + export interface ApprovalGroup { + /** + * The number of approvals needed to obtain access. + */ + approvals_needed: number; + + /** + * A list of emails that can approve the access request. + */ + email_addresses?: Array; + + /** + * The UUID of an re-usable email list. + */ + email_list_uuid?: string; + } +} + +export interface PolicyCreateResponse { + /** + * The ID of the Access policy. + */ + id?: string; + /** * Administrators who can approve a temporary authentication request. */ @@ -293,9 +400,152 @@ export interface Policy { name?: string; /** - * The order of execution for this policy. Must be unique for each policy. + * A custom message that will appear on the purpose justification screen. */ - precedence?: number; + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; +} + +export interface PolicyUpdateResponse { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; +} + +export interface PolicyListResponse { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; /** * A custom message that will appear on the purpose justification screen. @@ -330,6 +580,80 @@ export interface PolicyDeleteResponse { id?: string; } +export interface PolicyGetResponse { + /** + * The ID of the Access policy. + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; +} + export interface PolicyCreateParams { /** * Body param: The action Access will take if a user matches this policy. @@ -385,7 +709,7 @@ export interface PolicyCreateParams { /** * Body param: The order of execution for this policy. Must be unique for each - * policy. + * policy within an app. */ precedence?: number; @@ -470,7 +794,7 @@ export interface PolicyUpdateParams { /** * Body param: The order of execution for this policy. Must be unique for each - * policy. + * policy within an app. */ precedence?: number; @@ -539,8 +863,12 @@ export interface PolicyGetParams { export namespace Policies { export import ApprovalGroup = PoliciesAPI.ApprovalGroup; export import Policy = PoliciesAPI.Policy; + export import PolicyCreateResponse = PoliciesAPI.PolicyCreateResponse; + export import PolicyUpdateResponse = PoliciesAPI.PolicyUpdateResponse; + export import PolicyListResponse = PoliciesAPI.PolicyListResponse; export import PolicyDeleteResponse = PoliciesAPI.PolicyDeleteResponse; - export import PoliciesSinglePage = PoliciesAPI.PoliciesSinglePage; + export import PolicyGetResponse = PoliciesAPI.PolicyGetResponse; + export import PolicyListResponsesSinglePage = PoliciesAPI.PolicyListResponsesSinglePage; export import PolicyCreateParams = PoliciesAPI.PolicyCreateParams; export import PolicyUpdateParams = PoliciesAPI.PolicyUpdateParams; export import PolicyListParams = PoliciesAPI.PolicyListParams; diff --git a/src/resources/zero-trust/access/index.ts b/src/resources/zero-trust/access/index.ts index f38e28deac..99830f97f3 100644 --- a/src/resources/zero-trust/access/index.ts +++ b/src/resources/zero-trust/access/index.ts @@ -38,7 +38,11 @@ export { SaaSAppSource, SAMLSaaSApp, SelfHostedDomains, + ApplicationCreateResponse, + ApplicationUpdateResponse, + ApplicationListResponse, ApplicationDeleteResponse, + ApplicationGetResponse, ApplicationRevokeTokensResponse, ApplicationCreateParams, ApplicationUpdateParams, @@ -46,7 +50,7 @@ export { ApplicationDeleteParams, ApplicationGetParams, ApplicationRevokeTokensParams, - ApplicationsSinglePage, + ApplicationListResponsesSinglePage, Applications, } from './applications/index'; export { diff --git a/tests/api-resources/intel/indicator-feeds/indicator-feeds.test.ts b/tests/api-resources/intel/indicator-feeds/indicator-feeds.test.ts index ede96aba63..64009a8a3d 100644 --- a/tests/api-resources/intel/indicator-feeds/indicator-feeds.test.ts +++ b/tests/api-resources/intel/indicator-feeds/indicator-feeds.test.ts @@ -47,7 +47,7 @@ describe('resource indicatorFeeds', () => { test('update: required and optional params', async () => { const response = await cloudflare.intel.indicatorFeeds.update(12, { account_id: '023e105f4ecef8ad9ca31a8372d0c353', - feed_description: 'This is an example description', + description: 'This is an example description', is_attributable: true, is_public: true, }); diff --git a/tests/api-resources/radar/http/ases/ases.test.ts b/tests/api-resources/radar/http/ases/ases.test.ts index cf9416a774..ff135d28cf 100644 --- a/tests/api-resources/radar/http/ases/ases.test.ts +++ b/tests/api-resources/radar/http/ases/ases.test.ts @@ -35,6 +35,7 @@ describe('resource ases', () => { { asn: ['string', 'string', 'string'], botClass: ['LIKELY_AUTOMATED', 'LIKELY_HUMAN'], + browserFamily: ['CHROME', 'EDGE', 'FIREFOX'], continent: ['string', 'string', 'string'], dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], dateRange: ['1d', '2d', '7d'], diff --git a/tests/api-resources/radar/http/ases/bot-class.test.ts b/tests/api-resources/radar/http/ases/bot-class.test.ts index 190768d7d0..0363fe0648 100644 --- a/tests/api-resources/radar/http/ases/bot-class.test.ts +++ b/tests/api-resources/radar/http/ases/bot-class.test.ts @@ -35,6 +35,7 @@ describe('resource botClass', () => { 'LIKELY_AUTOMATED', { asn: ['string', 'string', 'string'], + browserFamily: ['CHROME', 'EDGE', 'FIREFOX'], continent: ['string', 'string', 'string'], dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], dateRange: ['1d', '2d', '7d'], diff --git a/tests/api-resources/radar/http/ases/device-type.test.ts b/tests/api-resources/radar/http/ases/device-type.test.ts index a3394120e2..42922efaaf 100644 --- a/tests/api-resources/radar/http/ases/device-type.test.ts +++ b/tests/api-resources/radar/http/ases/device-type.test.ts @@ -36,6 +36,7 @@ describe('resource deviceType', () => { { asn: ['string', 'string', 'string'], botClass: ['LIKELY_AUTOMATED', 'LIKELY_HUMAN'], + browserFamily: ['CHROME', 'EDGE', 'FIREFOX'], continent: ['string', 'string', 'string'], dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], dateRange: ['1d', '2d', '7d'], diff --git a/tests/api-resources/radar/http/ases/http-method.test.ts b/tests/api-resources/radar/http/ases/http-method.test.ts index 95b6e9eb75..398be2b1a0 100644 --- a/tests/api-resources/radar/http/ases/http-method.test.ts +++ b/tests/api-resources/radar/http/ases/http-method.test.ts @@ -36,6 +36,7 @@ describe('resource httpMethod', () => { { asn: ['string', 'string', 'string'], botClass: ['LIKELY_AUTOMATED', 'LIKELY_HUMAN'], + browserFamily: ['CHROME', 'EDGE', 'FIREFOX'], continent: ['string', 'string', 'string'], dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], dateRange: ['1d', '2d', '7d'], diff --git a/tests/api-resources/radar/http/ases/http-protocol.test.ts b/tests/api-resources/radar/http/ases/http-protocol.test.ts index aacc4f5bf2..182a36b9b6 100644 --- a/tests/api-resources/radar/http/ases/http-protocol.test.ts +++ b/tests/api-resources/radar/http/ases/http-protocol.test.ts @@ -36,6 +36,7 @@ describe('resource httpProtocol', () => { { asn: ['string', 'string', 'string'], botClass: ['LIKELY_AUTOMATED', 'LIKELY_HUMAN'], + browserFamily: ['CHROME', 'EDGE', 'FIREFOX'], continent: ['string', 'string', 'string'], dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], dateRange: ['1d', '2d', '7d'], diff --git a/tests/api-resources/radar/http/ases/ip-version.test.ts b/tests/api-resources/radar/http/ases/ip-version.test.ts index ea7b08433c..f86b3598d2 100644 --- a/tests/api-resources/radar/http/ases/ip-version.test.ts +++ b/tests/api-resources/radar/http/ases/ip-version.test.ts @@ -36,6 +36,7 @@ describe('resource ipVersion', () => { { asn: ['string', 'string', 'string'], botClass: ['LIKELY_AUTOMATED', 'LIKELY_HUMAN'], + browserFamily: ['CHROME', 'EDGE', 'FIREFOX'], continent: ['string', 'string', 'string'], dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], dateRange: ['1d', '2d', '7d'], diff --git a/tests/api-resources/radar/http/ases/os.test.ts b/tests/api-resources/radar/http/ases/os.test.ts index cfdacf7b45..ae0613d0e8 100644 --- a/tests/api-resources/radar/http/ases/os.test.ts +++ b/tests/api-resources/radar/http/ases/os.test.ts @@ -36,6 +36,7 @@ describe('resource os', () => { { asn: ['string', 'string', 'string'], botClass: ['LIKELY_AUTOMATED', 'LIKELY_HUMAN'], + browserFamily: ['CHROME', 'EDGE', 'FIREFOX'], continent: ['string', 'string', 'string'], dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], dateRange: ['1d', '2d', '7d'], diff --git a/tests/api-resources/radar/http/ases/tls-version.test.ts b/tests/api-resources/radar/http/ases/tls-version.test.ts index de6d27c3f1..c907ef4f69 100644 --- a/tests/api-resources/radar/http/ases/tls-version.test.ts +++ b/tests/api-resources/radar/http/ases/tls-version.test.ts @@ -36,6 +36,7 @@ describe('resource tlsVersion', () => { { asn: ['string', 'string', 'string'], botClass: ['LIKELY_AUTOMATED', 'LIKELY_HUMAN'], + browserFamily: ['CHROME', 'EDGE', 'FIREFOX'], continent: ['string', 'string', 'string'], dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], dateRange: ['1d', '2d', '7d'], diff --git a/tests/api-resources/radar/http/locations/bot-class.test.ts b/tests/api-resources/radar/http/locations/bot-class.test.ts index 41cc9644c2..2e69798b27 100644 --- a/tests/api-resources/radar/http/locations/bot-class.test.ts +++ b/tests/api-resources/radar/http/locations/bot-class.test.ts @@ -35,6 +35,7 @@ describe('resource botClass', () => { 'LIKELY_AUTOMATED', { asn: ['string', 'string', 'string'], + browserFamily: ['CHROME', 'EDGE', 'FIREFOX'], continent: ['string', 'string', 'string'], dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], dateRange: ['1d', '2d', '7d'], diff --git a/tests/api-resources/radar/http/locations/device-type.test.ts b/tests/api-resources/radar/http/locations/device-type.test.ts index ea13bcd23c..9027d587db 100644 --- a/tests/api-resources/radar/http/locations/device-type.test.ts +++ b/tests/api-resources/radar/http/locations/device-type.test.ts @@ -36,6 +36,7 @@ describe('resource deviceType', () => { { asn: ['string', 'string', 'string'], botClass: ['LIKELY_AUTOMATED', 'LIKELY_HUMAN'], + browserFamily: ['CHROME', 'EDGE', 'FIREFOX'], continent: ['string', 'string', 'string'], dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], dateRange: ['1d', '2d', '7d'], diff --git a/tests/api-resources/radar/http/locations/http-method.test.ts b/tests/api-resources/radar/http/locations/http-method.test.ts index ffb886f914..f35240f1c2 100644 --- a/tests/api-resources/radar/http/locations/http-method.test.ts +++ b/tests/api-resources/radar/http/locations/http-method.test.ts @@ -36,6 +36,7 @@ describe('resource httpMethod', () => { { asn: ['string', 'string', 'string'], botClass: ['LIKELY_AUTOMATED', 'LIKELY_HUMAN'], + browserFamily: ['CHROME', 'EDGE', 'FIREFOX'], continent: ['string', 'string', 'string'], dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], dateRange: ['1d', '2d', '7d'], diff --git a/tests/api-resources/radar/http/locations/http-protocol.test.ts b/tests/api-resources/radar/http/locations/http-protocol.test.ts index cfcd771542..3acc7452b3 100644 --- a/tests/api-resources/radar/http/locations/http-protocol.test.ts +++ b/tests/api-resources/radar/http/locations/http-protocol.test.ts @@ -36,6 +36,7 @@ describe('resource httpProtocol', () => { { asn: ['string', 'string', 'string'], botClass: ['LIKELY_AUTOMATED', 'LIKELY_HUMAN'], + browserFamily: ['CHROME', 'EDGE', 'FIREFOX'], continent: ['string', 'string', 'string'], dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], dateRange: ['1d', '2d', '7d'], diff --git a/tests/api-resources/radar/http/locations/ip-version.test.ts b/tests/api-resources/radar/http/locations/ip-version.test.ts index df465eae15..41a3bc76ce 100644 --- a/tests/api-resources/radar/http/locations/ip-version.test.ts +++ b/tests/api-resources/radar/http/locations/ip-version.test.ts @@ -36,6 +36,7 @@ describe('resource ipVersion', () => { { asn: ['string', 'string', 'string'], botClass: ['LIKELY_AUTOMATED', 'LIKELY_HUMAN'], + browserFamily: ['CHROME', 'EDGE', 'FIREFOX'], continent: ['string', 'string', 'string'], dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], dateRange: ['1d', '2d', '7d'], diff --git a/tests/api-resources/radar/http/locations/locations.test.ts b/tests/api-resources/radar/http/locations/locations.test.ts index 1be7f03ef6..289e4c97be 100644 --- a/tests/api-resources/radar/http/locations/locations.test.ts +++ b/tests/api-resources/radar/http/locations/locations.test.ts @@ -35,6 +35,7 @@ describe('resource locations', () => { { asn: ['string', 'string', 'string'], botClass: ['LIKELY_AUTOMATED', 'LIKELY_HUMAN'], + browserFamily: ['CHROME', 'EDGE', 'FIREFOX'], continent: ['string', 'string', 'string'], dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], dateRange: ['1d', '2d', '7d'], diff --git a/tests/api-resources/radar/http/locations/os.test.ts b/tests/api-resources/radar/http/locations/os.test.ts index 55ef1d8a33..b504b071b6 100644 --- a/tests/api-resources/radar/http/locations/os.test.ts +++ b/tests/api-resources/radar/http/locations/os.test.ts @@ -36,6 +36,7 @@ describe('resource os', () => { { asn: ['string', 'string', 'string'], botClass: ['LIKELY_AUTOMATED', 'LIKELY_HUMAN'], + browserFamily: ['CHROME', 'EDGE', 'FIREFOX'], continent: ['string', 'string', 'string'], dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], dateRange: ['1d', '2d', '7d'], diff --git a/tests/api-resources/radar/http/locations/tls-version.test.ts b/tests/api-resources/radar/http/locations/tls-version.test.ts index e403d777a8..11fb1fd43e 100644 --- a/tests/api-resources/radar/http/locations/tls-version.test.ts +++ b/tests/api-resources/radar/http/locations/tls-version.test.ts @@ -36,6 +36,7 @@ describe('resource tlsVersion', () => { { asn: ['string', 'string', 'string'], botClass: ['LIKELY_AUTOMATED', 'LIKELY_HUMAN'], + browserFamily: ['CHROME', 'EDGE', 'FIREFOX'], continent: ['string', 'string', 'string'], dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], dateRange: ['1d', '2d', '7d'], diff --git a/tests/api-resources/radar/http/top.test.ts b/tests/api-resources/radar/http/top.test.ts index ff1732539f..45dace9fca 100644 --- a/tests/api-resources/radar/http/top.test.ts +++ b/tests/api-resources/radar/http/top.test.ts @@ -35,6 +35,7 @@ describe('resource top', () => { { asn: ['string', 'string', 'string'], botClass: ['LIKELY_AUTOMATED', 'LIKELY_HUMAN'], + browserFamily: ['CHROME', 'EDGE', 'FIREFOX'], continent: ['string', 'string', 'string'], dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], dateRange: ['1d', '2d', '7d'], @@ -80,6 +81,7 @@ describe('resource top', () => { { asn: ['string', 'string', 'string'], botClass: ['LIKELY_AUTOMATED', 'LIKELY_HUMAN'], + browserFamily: ['CHROME', 'EDGE', 'FIREFOX'], continent: ['string', 'string', 'string'], dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], dateRange: ['1d', '2d', '7d'], diff --git a/tests/api-resources/zero-trust/access/applications/applications.test.ts b/tests/api-resources/zero-trust/access/applications/applications.test.ts index ebc50b06ea..a2d07f9f72 100644 --- a/tests/api-resources/zero-trust/access/applications/applications.test.ts +++ b/tests/api-resources/zero-trust/access/applications/applications.test.ts @@ -64,6 +64,11 @@ describe('resource applications', () => { name: 'Admin Site', options_preflight_bypass: true, path_cookie_attribute: true, + policies: [ + { id: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', precedence: 0 }, + { id: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', precedence: 0 }, + { id: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', precedence: 0 }, + ], same_site_cookie_attribute: 'strict', self_hosted_domains: ['test.example.com/admin', 'test.anotherexample.com/staff'], service_auth_401_redirect: true, @@ -128,6 +133,11 @@ describe('resource applications', () => { name: 'Admin Site', options_preflight_bypass: true, path_cookie_attribute: true, + policies: [ + { id: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', precedence: 0 }, + { id: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', precedence: 0 }, + { id: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', precedence: 0 }, + ], same_site_cookie_attribute: 'strict', self_hosted_domains: ['test.example.com/admin', 'test.anotherexample.com/staff'], service_auth_401_redirect: true, From 6a1bf57eba8456e55387043f7f8ef1a8539cc413 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 9 May 2024 18:09:04 +0000 Subject: [PATCH 002/473] feat(api): OpenAPI spec update via Stainless API (#499) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9dfc386c5a..2a5b97f1aa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1274 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-88d076c2683d7002e7743172b9488fb67d1a07b61995921f27209e01b224af60.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8f532f2d24923071fb4dd8efef5ac6d0573088cfcfc4513a148a591f9a97d8a0.yml From aca5e19cbca0ebcdfbddf719eec502a79ba4b946 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 9 May 2024 21:06:48 +0000 Subject: [PATCH 003/473] feat(api): OpenAPI spec update via Stainless API (#500) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2a5b97f1aa..59bc235f9c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1274 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8f532f2d24923071fb4dd8efef5ac6d0573088cfcfc4513a148a591f9a97d8a0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-30337a7cd5a7e8751f3555fa711c1c25aebf6791bfa5daced9765f9b234d1a05.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 22753ec181..3cacc527cf 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; +import * as Shared from 'cloudflare/resources/shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 9457ae859b..5127074632 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; +import * as Shared from 'cloudflare/resources/shared'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index f4a7e06f6f..0e48eba756 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; +import * as Shared from 'cloudflare/resources/shared'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From c2185e1397a99beec2e6b0c8b8f1ffdf3906fd46 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 03:38:17 +0000 Subject: [PATCH 004/473] feat(api): update via SDK Studio (#501) --- .stats.yml | 2 +- api.md | 56 ++++- src/resources/{ => calls}/calls.ts | 7 + src/resources/calls/index.ts | 4 + src/resources/calls/turn/index.ts | 17 ++ src/resources/calls/turn/keys.ts | 184 +++++++++++++++ src/resources/calls/turn/turn.ts | 23 ++ src/resources/index.ts | 2 +- src/resources/radar/http/ases/ases.ts | 5 + .../radar/http/ases/browser-family.ts | 211 ++++++++++++++++++ src/resources/radar/http/ases/index.ts | 1 + .../radar/http/locations/browser-family.ts | 211 ++++++++++++++++++ src/resources/radar/http/locations/index.ts | 1 + .../radar/http/locations/locations.ts | 5 + tests/api-resources/{ => calls}/calls.test.ts | 0 tests/api-resources/calls/turn/keys.test.ts | 109 +++++++++ .../radar/http/ases/browser-family.test.ts | 58 +++++ .../http/locations/browser-family.test.ts | 58 +++++ 18 files changed, 944 insertions(+), 10 deletions(-) rename src/resources/{ => calls}/calls.ts (95%) create mode 100644 src/resources/calls/index.ts create mode 100644 src/resources/calls/turn/index.ts create mode 100644 src/resources/calls/turn/keys.ts create mode 100644 src/resources/calls/turn/turn.ts create mode 100644 src/resources/radar/http/ases/browser-family.ts create mode 100644 src/resources/radar/http/locations/browser-family.ts rename tests/api-resources/{ => calls}/calls.test.ts (100%) create mode 100644 tests/api-resources/calls/turn/keys.test.ts create mode 100644 tests/api-resources/radar/http/ases/browser-family.test.ts create mode 100644 tests/api-resources/radar/http/locations/browser-family.test.ts diff --git a/.stats.yml b/.stats.yml index 59bc235f9c..4a6241d303 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1274 +configured_endpoints: 1281 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-30337a7cd5a7e8751f3555fa711c1c25aebf6791bfa5daced9765f9b234d1a05.yml diff --git a/api.md b/api.md index 7320b0fdef..16cb24a44a 100644 --- a/api.md +++ b/api.md @@ -5991,6 +5991,16 @@ Methods: - client.radar.http.locations.tlsVersion.get(tlsVersion, { ...params }) -> TLSVersionGetResponse +#### BrowserFamily + +Types: + +- BrowserFamilyGetResponse + +Methods: + +- client.radar.http.locations.browserFamily.get(browserFamily, { ...params }) -> BrowserFamilyGetResponse + ### Ases Types: @@ -6071,6 +6081,16 @@ Methods: - client.radar.http.ases.tlsVersion.get(tlsVersion, { ...params }) -> TLSVersionGetResponse +#### BrowserFamily + +Types: + +- BrowserFamilyGetResponse + +Methods: + +- client.radar.http.ases.browserFamily.get(browserFamily, { ...params }) -> BrowserFamilyGetResponse + ### Summary Types: @@ -6356,17 +6376,37 @@ Methods: Types: -- CallsApp -- CallsAppWithSecret -- CallListResponse +- CallsApp +- CallsAppWithSecret +- CallListResponse + +Methods: + +- client.calls.create({ ...params }) -> CallsAppWithSecret +- client.calls.update(appId, { ...params }) -> CallsApp +- client.calls.list({ ...params }) -> CallListResponsesSinglePage +- client.calls.delete(appId, { ...params }) -> CallsApp +- client.calls.get(appId, { ...params }) -> CallsApp + +## Turn + +### Keys + +Types: + +- KeyCreateResponse +- KeyUpdateResponse +- KeyListResponse +- KeyDeleteResponse +- KeyGetResponse Methods: -- client.calls.create({ ...params }) -> CallsAppWithSecret -- client.calls.update(appId, { ...params }) -> CallsApp -- client.calls.list({ ...params }) -> CallListResponsesSinglePage -- client.calls.delete(appId, { ...params }) -> CallsApp -- client.calls.get(appId, { ...params }) -> CallsApp +- client.calls.turn.keys.create({ ...params }) -> KeyCreateResponse +- client.calls.turn.keys.update(keyId, { ...params }) -> KeyUpdateResponse +- client.calls.turn.keys.list({ ...params }) -> KeyListResponsesSinglePage +- client.calls.turn.keys.delete(keyId, { ...params }) -> KeyDeleteResponse +- client.calls.turn.keys.get(keyId, { ...params }) -> KeyGetResponse # CloudforceOne diff --git a/src/resources/calls.ts b/src/resources/calls/calls.ts similarity index 95% rename from src/resources/calls.ts rename to src/resources/calls/calls.ts index 59ca0fee2f..9f7fce2060 100644 --- a/src/resources/calls.ts +++ b/src/resources/calls/calls.ts @@ -2,9 +2,12 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; +import * as TurnAPI from 'cloudflare/resources/calls/turn/turn'; import { SinglePage } from 'cloudflare/pagination'; export class Calls extends APIResource { + turn: TurnAPI.Turn = new TurnAPI.Turn(this._client); + /** * Creates a new Cloudflare calls app. An app is an unique enviroment where each * Session can access all Tracks within the app. @@ -171,3 +174,7 @@ export interface CallGetParams { */ account_id: string; } + +export namespace Calls { + export import Turn = TurnAPI.Turn; +} diff --git a/src/resources/calls/index.ts b/src/resources/calls/index.ts new file mode 100644 index 0000000000..439e0bd2e8 --- /dev/null +++ b/src/resources/calls/index.ts @@ -0,0 +1,4 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { Calls } from './calls'; +export { Turn } from './turn/index'; diff --git a/src/resources/calls/turn/index.ts b/src/resources/calls/turn/index.ts new file mode 100644 index 0000000000..4938951d2b --- /dev/null +++ b/src/resources/calls/turn/index.ts @@ -0,0 +1,17 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { + KeyCreateResponse, + KeyUpdateResponse, + KeyListResponse, + KeyDeleteResponse, + KeyGetResponse, + KeyCreateParams, + KeyUpdateParams, + KeyListParams, + KeyDeleteParams, + KeyGetParams, + KeyListResponsesSinglePage, + Keys, +} from './keys'; +export { Turn } from './turn'; diff --git a/src/resources/calls/turn/keys.ts b/src/resources/calls/turn/keys.ts new file mode 100644 index 0000000000..1db762dafa --- /dev/null +++ b/src/resources/calls/turn/keys.ts @@ -0,0 +1,184 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from 'cloudflare/core'; +import { APIResource } from 'cloudflare/resource'; +import * as KeysAPI from 'cloudflare/resources/calls/turn/keys'; +import { SinglePage } from 'cloudflare/pagination'; + +export class Keys extends APIResource { + /** + * Creates a new Cloudflare Calls TURN key. + */ + create(params: KeyCreateParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id, ...body } = params; + return this._client.post(`/accounts/${account_id}/calls/turn_keys`, { body, ...options }); + } + + /** + * Edit details for a single TURN key. + */ + update( + keyId: string, + params: KeyUpdateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.put(`/accounts/${account_id}/calls/turn_keys/${keyId}`, { + body, + ...options, + }) as Core.APIPromise<{ result: KeyUpdateResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Lists all TURN keys in the Cloudflare account + */ + list( + params: KeyListParams, + options?: Core.RequestOptions, + ): Core.PagePromise { + const { account_id } = params; + return this._client.getAPIList( + `/accounts/${account_id}/calls/turn_keys`, + KeyListResponsesSinglePage, + options, + ); + } + + /** + * Deletes a TURN key from Cloudflare Calls + */ + delete( + keyId: string, + params: KeyDeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.delete(`/accounts/${account_id}/calls/turn_keys/${keyId}`, options) as Core.APIPromise<{ + result: KeyDeleteResponse; + }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Fetches details for a single TURN key. + */ + get(keyId: string, params: KeyGetParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id } = params; + return ( + this._client.get(`/accounts/${account_id}/calls/turn_keys/${keyId}`, options) as Core.APIPromise<{ + result: KeyGetResponse; + }> + )._thenUnwrap((obj) => obj.result); + } +} + +export class KeyListResponsesSinglePage extends SinglePage {} + +export interface KeyCreateResponse { + /** + * The date and time the item was created. + */ + created?: string; + + /** + * Bearer token + */ + key?: string; + + /** + * The date and time the item was last modified. + */ + modified?: string; + + /** + * A short description of a TURN key, not shown to end users. + */ + name?: string; + + /** + * A Cloudflare-generated unique identifier for a item. + */ + uid?: string; +} + +/** + * Bearer token + */ +export type KeyUpdateResponse = string; + +/** + * Bearer token + */ +export type KeyListResponse = string; + +/** + * Bearer token + */ +export type KeyDeleteResponse = string; + +/** + * Bearer token + */ +export type KeyGetResponse = string; + +export interface KeyCreateParams { + /** + * Path param: The account identifier tag. + */ + account_id: string; + + /** + * Body param: A short description of a TURN key, not shown to end users. + */ + name?: string; +} + +export interface KeyUpdateParams { + /** + * Path param: The account identifier tag. + */ + account_id: string; + + /** + * Body param: A short description of a TURN key, not shown to end users. + */ + name?: string; +} + +export interface KeyListParams { + /** + * The account identifier tag. + */ + account_id: string; +} + +export interface KeyDeleteParams { + /** + * The account identifier tag. + */ + account_id: string; +} + +export interface KeyGetParams { + /** + * The account identifier tag. + */ + account_id: string; +} + +export namespace Keys { + export import KeyCreateResponse = KeysAPI.KeyCreateResponse; + export import KeyUpdateResponse = KeysAPI.KeyUpdateResponse; + export import KeyListResponse = KeysAPI.KeyListResponse; + export import KeyDeleteResponse = KeysAPI.KeyDeleteResponse; + export import KeyGetResponse = KeysAPI.KeyGetResponse; + export import KeyListResponsesSinglePage = KeysAPI.KeyListResponsesSinglePage; + export import KeyCreateParams = KeysAPI.KeyCreateParams; + export import KeyUpdateParams = KeysAPI.KeyUpdateParams; + export import KeyListParams = KeysAPI.KeyListParams; + export import KeyDeleteParams = KeysAPI.KeyDeleteParams; + export import KeyGetParams = KeysAPI.KeyGetParams; +} diff --git a/src/resources/calls/turn/turn.ts b/src/resources/calls/turn/turn.ts new file mode 100644 index 0000000000..4d67c839d6 --- /dev/null +++ b/src/resources/calls/turn/turn.ts @@ -0,0 +1,23 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from 'cloudflare/resource'; +import * as KeysAPI from 'cloudflare/resources/calls/turn/keys'; + +export class Turn extends APIResource { + keys: KeysAPI.Keys = new KeysAPI.Keys(this._client); +} + +export namespace Turn { + export import Keys = KeysAPI.Keys; + export import KeyCreateResponse = KeysAPI.KeyCreateResponse; + export import KeyUpdateResponse = KeysAPI.KeyUpdateResponse; + export import KeyListResponse = KeysAPI.KeyListResponse; + export import KeyDeleteResponse = KeysAPI.KeyDeleteResponse; + export import KeyGetResponse = KeysAPI.KeyGetResponse; + export import KeyListResponsesSinglePage = KeysAPI.KeyListResponsesSinglePage; + export import KeyCreateParams = KeysAPI.KeyCreateParams; + export import KeyUpdateParams = KeysAPI.KeyUpdateParams; + export import KeyListParams = KeysAPI.KeyListParams; + export import KeyDeleteParams = KeysAPI.KeyDeleteParams; + export import KeyGetParams = KeysAPI.KeyGetParams; +} diff --git a/src/resources/index.ts b/src/resources/index.ts index a901306862..37791955af 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -12,7 +12,7 @@ export { Billing } from './billing/billing'; export { BotManagement } from './bot-management'; export { BrandProtection } from './brand-protection'; export { Cache } from './cache/cache'; -export { Calls } from './calls'; +export { Calls } from './calls/calls'; export { CertificateAuthorities } from './certificate-authorities/certificate-authorities'; export { Challenges } from './challenges/challenges'; export { ClientCertificates } from './client-certificates'; diff --git a/src/resources/radar/http/ases/ases.ts b/src/resources/radar/http/ases/ases.ts index 61495dc822..e2c0997380 100644 --- a/src/resources/radar/http/ases/ases.ts +++ b/src/resources/radar/http/ases/ases.ts @@ -5,6 +5,7 @@ import { APIResource } from 'cloudflare/resource'; import { isRequestOptions } from 'cloudflare/core'; import * as AsesAPI from 'cloudflare/resources/radar/http/ases/ases'; import * as BotClassAPI from 'cloudflare/resources/radar/http/ases/bot-class'; +import * as BrowserFamilyAPI from 'cloudflare/resources/radar/http/ases/browser-family'; import * as DeviceTypeAPI from 'cloudflare/resources/radar/http/ases/device-type'; import * as HTTPMethodAPI from 'cloudflare/resources/radar/http/ases/http-method'; import * as HTTPProtocolAPI from 'cloudflare/resources/radar/http/ases/http-protocol'; @@ -20,6 +21,7 @@ export class Ases extends APIResource { ipVersion: IPVersionAPI.IPVersion = new IPVersionAPI.IPVersion(this._client); os: OSAPI.OS = new OSAPI.OS(this._client); tlsVersion: TLSVersionAPI.TLSVersion = new TLSVersionAPI.TLSVersion(this._client); + browserFamily: BrowserFamilyAPI.BrowserFamily = new BrowserFamilyAPI.BrowserFamily(this._client); /** * Get the top autonomous systems by HTTP traffic. Values are a percentage out of @@ -240,4 +242,7 @@ export namespace Ases { export import TLSVersion = TLSVersionAPI.TLSVersion; export import TLSVersionGetResponse = TLSVersionAPI.TLSVersionGetResponse; export import TLSVersionGetParams = TLSVersionAPI.TLSVersionGetParams; + export import BrowserFamily = BrowserFamilyAPI.BrowserFamily; + export import BrowserFamilyGetResponse = BrowserFamilyAPI.BrowserFamilyGetResponse; + export import BrowserFamilyGetParams = BrowserFamilyAPI.BrowserFamilyGetParams; } diff --git a/src/resources/radar/http/ases/browser-family.ts b/src/resources/radar/http/ases/browser-family.ts new file mode 100644 index 0000000000..e8300d2aa4 --- /dev/null +++ b/src/resources/radar/http/ases/browser-family.ts @@ -0,0 +1,211 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from 'cloudflare/core'; +import { APIResource } from 'cloudflare/resource'; +import { isRequestOptions } from 'cloudflare/core'; +import * as BrowserFamilyAPI from 'cloudflare/resources/radar/http/ases/browser-family'; + +export class BrowserFamily extends APIResource { + /** + * Get the top autonomous systems (AS), by HTTP traffic, of the requested browser + * family. Values are a percentage out of the total traffic. + */ + get( + browserFamily: 'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI', + query?: BrowserFamilyGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise; + get( + browserFamily: 'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI', + options?: Core.RequestOptions, + ): Core.APIPromise; + get( + browserFamily: 'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI', + query: BrowserFamilyGetParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(query)) { + return this.get(browserFamily, {}, query); + } + return ( + this._client.get(`/radar/http/top/ases/browser_family/${browserFamily}`, { + query, + ...options, + }) as Core.APIPromise<{ result: BrowserFamilyGetResponse }> + )._thenUnwrap((obj) => obj.result); + } +} + +export interface BrowserFamilyGetResponse { + meta: BrowserFamilyGetResponse.Meta; + + top_0: Array; +} + +export namespace BrowserFamilyGetResponse { + export interface Meta { + dateRange: Array; + + lastUpdated: string; + + confidenceInfo?: Meta.ConfidenceInfo; + } + + export namespace Meta { + export interface DateRange { + /** + * Adjusted end of date range. + */ + endTime: string; + + /** + * Adjusted start of date range. + */ + startTime: string; + } + + export interface ConfidenceInfo { + annotations?: Array; + + level?: number; + } + + export namespace ConfidenceInfo { + export interface Annotation { + dataSource: string; + + description: string; + + eventType: string; + + isInstantaneous: unknown; + + endTime?: string; + + linkedUrl?: string; + + startTime?: string; + } + } + } + + export interface Top0 { + clientASN: number; + + clientASName: string; + + value: string; + } +} + +export interface BrowserFamilyGetParams { + /** + * Array of comma separated list of ASNs, start with `-` to exclude from results. + * For example, `-174, 3356` excludes results from AS174, but includes results from + * AS3356. + */ + asn?: Array; + + /** + * Filter for bot class. Refer to + * [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/). + */ + botClass?: Array<'LIKELY_AUTOMATED' | 'LIKELY_HUMAN'>; + + /** + * Array of comma separated list of continents (alpha-2 continent codes). Start + * with `-` to exclude from results. For example, `-EU,NA` excludes results from + * Europe, but includes results from North America. + */ + continent?: Array; + + /** + * End of the date range (inclusive). + */ + dateEnd?: Array; + + /** + * For example, use `7d` and `7dControl` to compare this week with the previous + * week. Use this parameter or set specific start and end dates (`dateStart` and + * `dateEnd` parameters). + */ + dateRange?: Array< + | '1d' + | '2d' + | '7d' + | '14d' + | '28d' + | '12w' + | '24w' + | '52w' + | '1dControl' + | '2dControl' + | '7dControl' + | '14dControl' + | '28dControl' + | '12wControl' + | '24wControl' + >; + + /** + * Array of datetimes to filter the start of a series. + */ + dateStart?: Array; + + /** + * Filter for device type. + */ + deviceType?: Array<'DESKTOP' | 'MOBILE' | 'OTHER'>; + + /** + * Format results are returned in. + */ + format?: 'JSON' | 'CSV'; + + /** + * Filter for http protocol. + */ + httpProtocol?: Array<'HTTP' | 'HTTPS'>; + + /** + * Filter for http version. + */ + httpVersion?: Array<'HTTPv1' | 'HTTPv2' | 'HTTPv3'>; + + /** + * Filter for ip version. + */ + ipVersion?: Array<'IPv4' | 'IPv6'>; + + /** + * Limit the number of objects in the response. + */ + limit?: number; + + /** + * Array of comma separated list of locations (alpha-2 country codes). Start with + * `-` to exclude from results. For example, `-US,PT` excludes results from the US, + * but includes results from PT. + */ + location?: Array; + + /** + * Array of names that will be used to name the series in responses. + */ + name?: Array; + + /** + * Filter for os name. + */ + os?: Array<'WINDOWS' | 'MACOSX' | 'IOS' | 'ANDROID' | 'CHROMEOS' | 'LINUX' | 'SMART_TV'>; + + /** + * Filter for tls version. + */ + tlsVersion?: Array<'TLSv1_0' | 'TLSv1_1' | 'TLSv1_2' | 'TLSv1_3' | 'TLSvQUIC'>; +} + +export namespace BrowserFamily { + export import BrowserFamilyGetResponse = BrowserFamilyAPI.BrowserFamilyGetResponse; + export import BrowserFamilyGetParams = BrowserFamilyAPI.BrowserFamilyGetParams; +} diff --git a/src/resources/radar/http/ases/index.ts b/src/resources/radar/http/ases/index.ts index b33588dc98..badc76c9e0 100644 --- a/src/resources/radar/http/ases/index.ts +++ b/src/resources/radar/http/ases/index.ts @@ -2,6 +2,7 @@ export { AseGetResponse, AseGetParams, Ases } from './ases'; export { BotClassGetResponse, BotClassGetParams, BotClass } from './bot-class'; +export { BrowserFamilyGetResponse, BrowserFamilyGetParams, BrowserFamily } from './browser-family'; export { DeviceTypeGetResponse, DeviceTypeGetParams, DeviceType } from './device-type'; export { HTTPMethodGetResponse, HTTPMethodGetParams, HTTPMethod } from './http-method'; export { HTTPProtocolGetResponse, HTTPProtocolGetParams, HTTPProtocol } from './http-protocol'; diff --git a/src/resources/radar/http/locations/browser-family.ts b/src/resources/radar/http/locations/browser-family.ts new file mode 100644 index 0000000000..359da6983d --- /dev/null +++ b/src/resources/radar/http/locations/browser-family.ts @@ -0,0 +1,211 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from 'cloudflare/core'; +import { APIResource } from 'cloudflare/resource'; +import { isRequestOptions } from 'cloudflare/core'; +import * as BrowserFamilyAPI from 'cloudflare/resources/radar/http/locations/browser-family'; + +export class BrowserFamily extends APIResource { + /** + * Get the top locations, by HTTP traffic, of the requested browser family. Values + * are a percentage out of the total traffic. + */ + get( + browserFamily: 'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI', + query?: BrowserFamilyGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise; + get( + browserFamily: 'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI', + options?: Core.RequestOptions, + ): Core.APIPromise; + get( + browserFamily: 'CHROME' | 'EDGE' | 'FIREFOX' | 'SAFARI', + query: BrowserFamilyGetParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(query)) { + return this.get(browserFamily, {}, query); + } + return ( + this._client.get(`/radar/http/top/locations/browser_family/${browserFamily}`, { + query, + ...options, + }) as Core.APIPromise<{ result: BrowserFamilyGetResponse }> + )._thenUnwrap((obj) => obj.result); + } +} + +export interface BrowserFamilyGetResponse { + meta: BrowserFamilyGetResponse.Meta; + + top_0: Array; +} + +export namespace BrowserFamilyGetResponse { + export interface Meta { + dateRange: Array; + + lastUpdated: string; + + confidenceInfo?: Meta.ConfidenceInfo; + } + + export namespace Meta { + export interface DateRange { + /** + * Adjusted end of date range. + */ + endTime: string; + + /** + * Adjusted start of date range. + */ + startTime: string; + } + + export interface ConfidenceInfo { + annotations?: Array; + + level?: number; + } + + export namespace ConfidenceInfo { + export interface Annotation { + dataSource: string; + + description: string; + + eventType: string; + + isInstantaneous: unknown; + + endTime?: string; + + linkedUrl?: string; + + startTime?: string; + } + } + } + + export interface Top0 { + clientCountryAlpha2: string; + + clientCountryName: string; + + value: string; + } +} + +export interface BrowserFamilyGetParams { + /** + * Array of comma separated list of ASNs, start with `-` to exclude from results. + * For example, `-174, 3356` excludes results from AS174, but includes results from + * AS3356. + */ + asn?: Array; + + /** + * Filter for bot class. Refer to + * [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/). + */ + botClass?: Array<'LIKELY_AUTOMATED' | 'LIKELY_HUMAN'>; + + /** + * Array of comma separated list of continents (alpha-2 continent codes). Start + * with `-` to exclude from results. For example, `-EU,NA` excludes results from + * Europe, but includes results from North America. + */ + continent?: Array; + + /** + * End of the date range (inclusive). + */ + dateEnd?: Array; + + /** + * For example, use `7d` and `7dControl` to compare this week with the previous + * week. Use this parameter or set specific start and end dates (`dateStart` and + * `dateEnd` parameters). + */ + dateRange?: Array< + | '1d' + | '2d' + | '7d' + | '14d' + | '28d' + | '12w' + | '24w' + | '52w' + | '1dControl' + | '2dControl' + | '7dControl' + | '14dControl' + | '28dControl' + | '12wControl' + | '24wControl' + >; + + /** + * Array of datetimes to filter the start of a series. + */ + dateStart?: Array; + + /** + * Filter for device type. + */ + deviceType?: Array<'DESKTOP' | 'MOBILE' | 'OTHER'>; + + /** + * Format results are returned in. + */ + format?: 'JSON' | 'CSV'; + + /** + * Filter for http protocol. + */ + httpProtocol?: Array<'HTTP' | 'HTTPS'>; + + /** + * Filter for http version. + */ + httpVersion?: Array<'HTTPv1' | 'HTTPv2' | 'HTTPv3'>; + + /** + * Filter for ip version. + */ + ipVersion?: Array<'IPv4' | 'IPv6'>; + + /** + * Limit the number of objects in the response. + */ + limit?: number; + + /** + * Array of comma separated list of locations (alpha-2 country codes). Start with + * `-` to exclude from results. For example, `-US,PT` excludes results from the US, + * but includes results from PT. + */ + location?: Array; + + /** + * Array of names that will be used to name the series in responses. + */ + name?: Array; + + /** + * Filter for os name. + */ + os?: Array<'WINDOWS' | 'MACOSX' | 'IOS' | 'ANDROID' | 'CHROMEOS' | 'LINUX' | 'SMART_TV'>; + + /** + * Filter for tls version. + */ + tlsVersion?: Array<'TLSv1_0' | 'TLSv1_1' | 'TLSv1_2' | 'TLSv1_3' | 'TLSvQUIC'>; +} + +export namespace BrowserFamily { + export import BrowserFamilyGetResponse = BrowserFamilyAPI.BrowserFamilyGetResponse; + export import BrowserFamilyGetParams = BrowserFamilyAPI.BrowserFamilyGetParams; +} diff --git a/src/resources/radar/http/locations/index.ts b/src/resources/radar/http/locations/index.ts index 71c3e1f088..c1bf9e23b8 100644 --- a/src/resources/radar/http/locations/index.ts +++ b/src/resources/radar/http/locations/index.ts @@ -1,6 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { BotClassGetResponse, BotClassGetParams, BotClass } from './bot-class'; +export { BrowserFamilyGetResponse, BrowserFamilyGetParams, BrowserFamily } from './browser-family'; export { DeviceTypeGetResponse, DeviceTypeGetParams, DeviceType } from './device-type'; export { HTTPMethodGetResponse, HTTPMethodGetParams, HTTPMethod } from './http-method'; export { HTTPProtocolGetResponse, HTTPProtocolGetParams, HTTPProtocol } from './http-protocol'; diff --git a/src/resources/radar/http/locations/locations.ts b/src/resources/radar/http/locations/locations.ts index 631f096fc9..83a4968a0e 100644 --- a/src/resources/radar/http/locations/locations.ts +++ b/src/resources/radar/http/locations/locations.ts @@ -5,6 +5,7 @@ import { APIResource } from 'cloudflare/resource'; import { isRequestOptions } from 'cloudflare/core'; import * as LocationsAPI from 'cloudflare/resources/radar/http/locations/locations'; import * as BotClassAPI from 'cloudflare/resources/radar/http/locations/bot-class'; +import * as BrowserFamilyAPI from 'cloudflare/resources/radar/http/locations/browser-family'; import * as DeviceTypeAPI from 'cloudflare/resources/radar/http/locations/device-type'; import * as HTTPMethodAPI from 'cloudflare/resources/radar/http/locations/http-method'; import * as HTTPProtocolAPI from 'cloudflare/resources/radar/http/locations/http-protocol'; @@ -20,6 +21,7 @@ export class Locations extends APIResource { ipVersion: IPVersionAPI.IPVersion = new IPVersionAPI.IPVersion(this._client); os: OSAPI.OS = new OSAPI.OS(this._client); tlsVersion: TLSVersionAPI.TLSVersion = new TLSVersionAPI.TLSVersion(this._client); + browserFamily: BrowserFamilyAPI.BrowserFamily = new BrowserFamilyAPI.BrowserFamily(this._client); /** * Get the top locations by HTTP traffic. Values are a percentage out of the total @@ -240,4 +242,7 @@ export namespace Locations { export import TLSVersion = TLSVersionAPI.TLSVersion; export import TLSVersionGetResponse = TLSVersionAPI.TLSVersionGetResponse; export import TLSVersionGetParams = TLSVersionAPI.TLSVersionGetParams; + export import BrowserFamily = BrowserFamilyAPI.BrowserFamily; + export import BrowserFamilyGetResponse = BrowserFamilyAPI.BrowserFamilyGetResponse; + export import BrowserFamilyGetParams = BrowserFamilyAPI.BrowserFamilyGetParams; } diff --git a/tests/api-resources/calls.test.ts b/tests/api-resources/calls/calls.test.ts similarity index 100% rename from tests/api-resources/calls.test.ts rename to tests/api-resources/calls/calls.test.ts diff --git a/tests/api-resources/calls/turn/keys.test.ts b/tests/api-resources/calls/turn/keys.test.ts new file mode 100644 index 0000000000..fd67d29cbf --- /dev/null +++ b/tests/api-resources/calls/turn/keys.test.ts @@ -0,0 +1,109 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource keys', () => { + test('create: only required params', async () => { + const responsePromise = cloudflare.calls.turn.keys.create({ + account_id: '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); + }); + + test('create: required and optional params', async () => { + const response = await cloudflare.calls.turn.keys.create({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + name: 'my-turn-key', + }); + }); + + test('update: only required params', async () => { + const responsePromise = cloudflare.calls.turn.keys.update('2a95132c15732412d22c1476fa83f27a', { + account_id: '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); + }); + + test('update: required and optional params', async () => { + const response = await cloudflare.calls.turn.keys.update('2a95132c15732412d22c1476fa83f27a', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + name: 'my-turn-key', + }); + }); + + test('list: only required params', async () => { + const responsePromise = cloudflare.calls.turn.keys.list({ + account_id: '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); + }); + + test('list: required and optional params', async () => { + const response = await cloudflare.calls.turn.keys.list({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); + + test('delete: only required params', async () => { + const responsePromise = cloudflare.calls.turn.keys.delete('2a95132c15732412d22c1476fa83f27a', { + account_id: '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); + }); + + test('delete: required and optional params', async () => { + const response = await cloudflare.calls.turn.keys.delete('2a95132c15732412d22c1476fa83f27a', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); + + test('get: only required params', async () => { + const responsePromise = cloudflare.calls.turn.keys.get('2a95132c15732412d22c1476fa83f27a', { + account_id: '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); + }); + + test('get: required and optional params', async () => { + const response = await cloudflare.calls.turn.keys.get('2a95132c15732412d22c1476fa83f27a', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); +}); diff --git a/tests/api-resources/radar/http/ases/browser-family.test.ts b/tests/api-resources/radar/http/ases/browser-family.test.ts new file mode 100644 index 0000000000..a79058603a --- /dev/null +++ b/tests/api-resources/radar/http/ases/browser-family.test.ts @@ -0,0 +1,58 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource browserFamily', () => { + test('get', async () => { + const responsePromise = cloudflare.radar.http.ases.browserFamily.get('CHROME'); + 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('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.radar.http.ases.browserFamily.get('CHROME', { path: '/_stainless_unknown_path' }), + ).rejects.toThrow(Cloudflare.NotFoundError); + }); + + test('get: 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.radar.http.ases.browserFamily.get( + 'CHROME', + { + asn: ['string', 'string', 'string'], + botClass: ['LIKELY_AUTOMATED', 'LIKELY_HUMAN'], + continent: ['string', 'string', 'string'], + dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], + dateRange: ['1d', '2d', '7d'], + dateStart: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], + deviceType: ['DESKTOP', 'MOBILE', 'OTHER'], + format: 'JSON', + httpProtocol: ['HTTP', 'HTTPS'], + httpVersion: ['HTTPv1', 'HTTPv2', 'HTTPv3'], + ipVersion: ['IPv4', 'IPv6'], + limit: 5, + location: ['string', 'string', 'string'], + name: ['string', 'string', 'string'], + os: ['WINDOWS', 'MACOSX', 'IOS'], + tlsVersion: ['TLSv1_0', 'TLSv1_1', 'TLSv1_2'], + }, + { path: '/_stainless_unknown_path' }, + ), + ).rejects.toThrow(Cloudflare.NotFoundError); + }); +}); diff --git a/tests/api-resources/radar/http/locations/browser-family.test.ts b/tests/api-resources/radar/http/locations/browser-family.test.ts new file mode 100644 index 0000000000..b6e1c9ef0f --- /dev/null +++ b/tests/api-resources/radar/http/locations/browser-family.test.ts @@ -0,0 +1,58 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource browserFamily', () => { + test('get', async () => { + const responsePromise = cloudflare.radar.http.locations.browserFamily.get('CHROME'); + 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('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.radar.http.locations.browserFamily.get('CHROME', { path: '/_stainless_unknown_path' }), + ).rejects.toThrow(Cloudflare.NotFoundError); + }); + + test('get: 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.radar.http.locations.browserFamily.get( + 'CHROME', + { + asn: ['string', 'string', 'string'], + botClass: ['LIKELY_AUTOMATED', 'LIKELY_HUMAN'], + continent: ['string', 'string', 'string'], + dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], + dateRange: ['1d', '2d', '7d'], + dateStart: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], + deviceType: ['DESKTOP', 'MOBILE', 'OTHER'], + format: 'JSON', + httpProtocol: ['HTTP', 'HTTPS'], + httpVersion: ['HTTPv1', 'HTTPv2', 'HTTPv3'], + ipVersion: ['IPv4', 'IPv6'], + limit: 5, + location: ['string', 'string', 'string'], + name: ['string', 'string', 'string'], + os: ['WINDOWS', 'MACOSX', 'IOS'], + tlsVersion: ['TLSv1_0', 'TLSv1_1', 'TLSv1_2'], + }, + { path: '/_stainless_unknown_path' }, + ), + ).rejects.toThrow(Cloudflare.NotFoundError); + }); +}); From c78b195be75e9dca63985880cd9f83d277290da6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 03:40:55 +0000 Subject: [PATCH 005/473] feat(api): update via SDK Studio (#502) --- api.md | 2 +- src/resources/calls/calls.ts | 6 +++--- src/resources/calls/index.ts | 2 +- src/resources/calls/turn/index.ts | 2 +- src/resources/calls/turn/turn.ts | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api.md b/api.md index 16cb24a44a..110e413df0 100644 --- a/api.md +++ b/api.md @@ -6388,7 +6388,7 @@ Methods: - client.calls.delete(appId, { ...params }) -> CallsApp - client.calls.get(appId, { ...params }) -> CallsApp -## Turn +## TURN ### Keys diff --git a/src/resources/calls/calls.ts b/src/resources/calls/calls.ts index 9f7fce2060..be65bdb5ee 100644 --- a/src/resources/calls/calls.ts +++ b/src/resources/calls/calls.ts @@ -2,11 +2,11 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; -import * as TurnAPI from 'cloudflare/resources/calls/turn/turn'; +import * as TURNAPI from 'cloudflare/resources/calls/turn/turn'; import { SinglePage } from 'cloudflare/pagination'; export class Calls extends APIResource { - turn: TurnAPI.Turn = new TurnAPI.Turn(this._client); + turn: TURNAPI.TURN = new TURNAPI.TURN(this._client); /** * Creates a new Cloudflare calls app. An app is an unique enviroment where each @@ -176,5 +176,5 @@ export interface CallGetParams { } export namespace Calls { - export import Turn = TurnAPI.Turn; + export import TURN = TURNAPI.TURN; } diff --git a/src/resources/calls/index.ts b/src/resources/calls/index.ts index 439e0bd2e8..46899af8fa 100644 --- a/src/resources/calls/index.ts +++ b/src/resources/calls/index.ts @@ -1,4 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { Calls } from './calls'; -export { Turn } from './turn/index'; +export { TURN } from './turn/index'; diff --git a/src/resources/calls/turn/index.ts b/src/resources/calls/turn/index.ts index 4938951d2b..1f1fa45050 100644 --- a/src/resources/calls/turn/index.ts +++ b/src/resources/calls/turn/index.ts @@ -14,4 +14,4 @@ export { KeyListResponsesSinglePage, Keys, } from './keys'; -export { Turn } from './turn'; +export { TURN } from './turn'; diff --git a/src/resources/calls/turn/turn.ts b/src/resources/calls/turn/turn.ts index 4d67c839d6..50eb0ff6bf 100644 --- a/src/resources/calls/turn/turn.ts +++ b/src/resources/calls/turn/turn.ts @@ -3,11 +3,11 @@ import { APIResource } from 'cloudflare/resource'; import * as KeysAPI from 'cloudflare/resources/calls/turn/keys'; -export class Turn extends APIResource { +export class TURN extends APIResource { keys: KeysAPI.Keys = new KeysAPI.Keys(this._client); } -export namespace Turn { +export namespace TURN { export import Keys = KeysAPI.Keys; export import KeyCreateResponse = KeysAPI.KeyCreateResponse; export import KeyUpdateResponse = KeysAPI.KeyUpdateResponse; From 2a8d8a6ddcbdd1420b6aa4952559d903c91d5ccd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 07:58:01 +0000 Subject: [PATCH 006/473] feat(api): OpenAPI spec update via Stainless API (#503) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4a6241d303..c51d58997e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1281 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-30337a7cd5a7e8751f3555fa711c1c25aebf6791bfa5daced9765f9b234d1a05.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8f532f2d24923071fb4dd8efef5ac6d0573088cfcfc4513a148a591f9a97d8a0.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 3cacc527cf..22753ec181 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; -import * as Shared from 'cloudflare/resources/shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 5127074632..9457ae859b 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; -import * as Shared from 'cloudflare/resources/shared'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 0e48eba756..f4a7e06f6f 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; -import * as Shared from 'cloudflare/resources/shared'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 304656aae8d64a7de7eb264655dd31854c0d48cf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 08:00:39 +0000 Subject: [PATCH 007/473] feat(api): OpenAPI spec update via Stainless API (#504) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index c51d58997e..4a6241d303 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1281 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8f532f2d24923071fb4dd8efef5ac6d0573088cfcfc4513a148a591f9a97d8a0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-30337a7cd5a7e8751f3555fa711c1c25aebf6791bfa5daced9765f9b234d1a05.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 22753ec181..3cacc527cf 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; +import * as Shared from 'cloudflare/resources/shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 9457ae859b..5127074632 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; +import * as Shared from 'cloudflare/resources/shared'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index f4a7e06f6f..0e48eba756 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; +import * as Shared from 'cloudflare/resources/shared'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 1df67c4f17ed7df0d764bb69a6cbd2db9ce8f301 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 16:18:13 +0000 Subject: [PATCH 008/473] feat(api): OpenAPI spec update via Stainless API (#505) --- .stats.yml | 2 +- .../access/applications/applications.ts | 4926 +++++++++++++---- .../access/applications/policies.ts | 8 +- .../access/applications/applications.test.ts | 78 +- 4 files changed, 3948 insertions(+), 1066 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4a6241d303..180c43d61b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1281 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-30337a7cd5a7e8751f3555fa711c1c25aebf6791bfa5daced9765f9b234d1a05.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-60b75a573109cad5aa0149c739c7e355f3e2571b3a71fced4c8848e44b8c334f.yml diff --git a/src/resources/zero-trust/access/applications/applications.ts b/src/resources/zero-trust/access/applications/applications.ts index 11bfc85c42..0e3c9ee4d6 100644 --- a/src/resources/zero-trust/access/applications/applications.ts +++ b/src/resources/zero-trust/access/applications/applications.ts @@ -862,11 +862,6 @@ export namespace Application { */ name?: string; - /** - * A mapping from IdP ID to claim name. - */ - name_by_idp?: Record; - /** * If the claim is required when building an OIDC token. */ @@ -886,6 +881,11 @@ export namespace Application { * The name of the IdP claim. */ name?: string; + + /** + * A mapping from IdP ID to claim name. + */ + name_by_idp?: Record; } } @@ -3216,7 +3216,7 @@ export namespace ApplicationCreateResponse { export namespace SelfHostedApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -3540,7 +3540,7 @@ export namespace ApplicationCreateResponse { export namespace SaaSApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -3683,11 +3683,6 @@ export namespace ApplicationCreateResponse { */ name?: string; - /** - * A mapping from IdP ID to claim name. - */ - name_by_idp?: Record; - /** * If the claim is required when building an OIDC token. */ @@ -3707,6 +3702,11 @@ export namespace ApplicationCreateResponse { * The name of the IdP claim. */ name?: string; + + /** + * A mapping from IdP ID to claim name. + */ + name_by_idp?: Record; } } @@ -4055,7 +4055,7 @@ export namespace ApplicationCreateResponse { export namespace BrowserSSHApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -4463,7 +4463,7 @@ export namespace ApplicationCreateResponse { export namespace BrowserVncApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -4777,7 +4777,7 @@ export namespace ApplicationCreateResponse { export namespace AppLauncherApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -5091,7 +5091,7 @@ export namespace ApplicationCreateResponse { export namespace DeviceEnrollmentPermissionsApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -5405,7 +5405,7 @@ export namespace ApplicationCreateResponse { export namespace BrowserIsolationPermissionsApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -6059,7 +6059,7 @@ export namespace ApplicationUpdateResponse { export namespace SelfHostedApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -6383,7 +6383,7 @@ export namespace ApplicationUpdateResponse { export namespace SaaSApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -6526,11 +6526,6 @@ export namespace ApplicationUpdateResponse { */ name?: string; - /** - * A mapping from IdP ID to claim name. - */ - name_by_idp?: Record; - /** * If the claim is required when building an OIDC token. */ @@ -6550,6 +6545,11 @@ export namespace ApplicationUpdateResponse { * The name of the IdP claim. */ name?: string; + + /** + * A mapping from IdP ID to claim name. + */ + name_by_idp?: Record; } } @@ -6898,7 +6898,7 @@ export namespace ApplicationUpdateResponse { export namespace BrowserSSHApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -7306,7 +7306,7 @@ export namespace ApplicationUpdateResponse { export namespace BrowserVncApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -7620,7 +7620,7 @@ export namespace ApplicationUpdateResponse { export namespace AppLauncherApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -7934,7 +7934,7 @@ export namespace ApplicationUpdateResponse { export namespace DeviceEnrollmentPermissionsApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -8248,7 +8248,7 @@ export namespace ApplicationUpdateResponse { export namespace BrowserIsolationPermissionsApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -8902,7 +8902,7 @@ export namespace ApplicationListResponse { export namespace SelfHostedApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -9226,7 +9226,7 @@ export namespace ApplicationListResponse { export namespace SaaSApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -9369,11 +9369,6 @@ export namespace ApplicationListResponse { */ name?: string; - /** - * A mapping from IdP ID to claim name. - */ - name_by_idp?: Record; - /** * If the claim is required when building an OIDC token. */ @@ -9393,6 +9388,11 @@ export namespace ApplicationListResponse { * The name of the IdP claim. */ name?: string; + + /** + * A mapping from IdP ID to claim name. + */ + name_by_idp?: Record; } } @@ -9741,7 +9741,7 @@ export namespace ApplicationListResponse { export namespace BrowserSSHApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -10149,7 +10149,7 @@ export namespace ApplicationListResponse { export namespace BrowserVncApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -10463,7 +10463,7 @@ export namespace ApplicationListResponse { export namespace AppLauncherApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -10777,7 +10777,7 @@ export namespace ApplicationListResponse { export namespace DeviceEnrollmentPermissionsApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -11091,7 +11091,7 @@ export namespace ApplicationListResponse { export namespace BrowserIsolationPermissionsApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -11752,7 +11752,7 @@ export namespace ApplicationGetResponse { export namespace SelfHostedApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -12076,7 +12076,7 @@ export namespace ApplicationGetResponse { export namespace SaaSApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -12219,11 +12219,6 @@ export namespace ApplicationGetResponse { */ name?: string; - /** - * A mapping from IdP ID to claim name. - */ - name_by_idp?: Record; - /** * If the claim is required when building an OIDC token. */ @@ -12243,6 +12238,11 @@ export namespace ApplicationGetResponse { * The name of the IdP claim. */ name?: string; + + /** + * A mapping from IdP ID to claim name. + */ + name_by_idp?: Record; } } @@ -12591,7 +12591,7 @@ export namespace ApplicationGetResponse { export namespace BrowserSSHApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -12999,7 +12999,7 @@ export namespace ApplicationGetResponse { export namespace BrowserVncApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -13313,7 +13313,7 @@ export namespace ApplicationGetResponse { export namespace AppLauncherApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -13627,7 +13627,7 @@ export namespace ApplicationGetResponse { export namespace DeviceEnrollmentPermissionsApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -13941,7 +13941,7 @@ export namespace ApplicationGetResponse { export namespace BrowserIsolationPermissionsApplication { export interface Policy { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -14438,7 +14438,7 @@ export type ApplicationCreateParams = | ApplicationCreateParams.AppLauncherApplication | ApplicationCreateParams.DeviceEnrollmentPermissionsApplication | ApplicationCreateParams.BrowserIsolationPermissionsApplication - | ApplicationCreateParams.AccessBookmarkProps; + | ApplicationCreateParams.BookmarkApplication; export namespace ApplicationCreateParams { export interface SelfHostedApplication { @@ -14571,6 +14571,12 @@ export namespace ApplicationCreateParams { */ same_site_cookie_attribute?: string; + /** + * Body param: Configuration for provisioning to this application via SCIM. This is + * currently in closed beta. + */ + scim_config?: ApplicationCreateParams.SelfHostedApplication.ScimConfig; + /** * Body param: List of domains that Access will secure. */ @@ -14606,11 +14612,6 @@ export namespace ApplicationCreateParams { * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { - /** - * The ID of the Access policy. - */ - id?: string; - /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -14635,11 +14636,6 @@ export namespace ApplicationCreateParams { */ name: string; - /** - * The ID of the Access policy. - */ - id?: string; - /** * Administrators who can approve a temporary authentication request. */ @@ -14693,6 +14689,185 @@ export namespace ApplicationCreateParams { */ session_duration?: string; } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } } export interface SaaSApplication { @@ -14757,6 +14932,12 @@ export namespace ApplicationCreateParams { */ saas_app?: SAMLSaaSAppParam | ApplicationCreateParams.SaaSApplication.AccessOIDCSaaSApp; + /** + * Body param: Configuration for provisioning to this application via SCIM. This is + * currently in closed beta. + */ + scim_config?: ApplicationCreateParams.SaaSApplication.ScimConfig; + /** * Body param: The tags you want assigned to an application. Tags are used to * filter applications in the App Launcher dashboard. @@ -14774,11 +14955,6 @@ export namespace ApplicationCreateParams { * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { - /** - * The ID of the Access policy. - */ - id?: string; - /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -14803,11 +14979,6 @@ export namespace ApplicationCreateParams { */ name: string; - /** - * The ID of the Access policy. - */ - id?: string; - /** * Administrators who can approve a temporary authentication request. */ @@ -14929,11 +15100,6 @@ export namespace ApplicationCreateParams { */ name?: string; - /** - * A mapping from IdP ID to claim name. - */ - name_by_idp?: Record; - /** * If the claim is required when building an OIDC token. */ @@ -14953,6 +15119,11 @@ export namespace ApplicationCreateParams { * The name of the IdP claim. */ name?: string; + + /** + * A mapping from IdP ID to claim name. + */ + name_by_idp?: Record; } } @@ -14964,20 +15135,199 @@ export namespace ApplicationCreateParams { lifetime?: string; } } - } - - export interface BrowserSSHApplication { - /** - * Body param: The primary hostname and path that Access will secure. If the app is - * visible in the App Launcher dashboard, this is the domain that will be - * displayed. - */ - domain: string; /** - * Body param: The application type. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - type: string; + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BrowserSSHApplication { + /** + * Body param: The primary hostname and path that Access will secure. If the app is + * visible in the App Launcher dashboard, this is the domain that will be + * displayed. + */ + domain: string; + + /** + * Body param: The application type. + */ + type: string; /** * Path param: The Account ID to use for this endpoint. Mutually exclusive with the @@ -15096,6 +15446,12 @@ export namespace ApplicationCreateParams { */ same_site_cookie_attribute?: string; + /** + * Body param: Configuration for provisioning to this application via SCIM. This is + * currently in closed beta. + */ + scim_config?: ApplicationCreateParams.BrowserSSHApplication.ScimConfig; + /** * Body param: List of domains that Access will secure. */ @@ -15131,11 +15487,6 @@ export namespace ApplicationCreateParams { * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { - /** - * The ID of the Access policy. - */ - id?: string; - /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -15160,11 +15511,6 @@ export namespace ApplicationCreateParams { */ name: string; - /** - * The ID of the Access policy. - */ - id?: string; - /** * Administrators who can approve a temporary authentication request. */ @@ -15218,46 +15564,225 @@ export namespace ApplicationCreateParams { */ session_duration?: string; } - } - - export interface BrowserVncApplication { - /** - * Body param: The primary hostname and path that Access will secure. If the app is - * visible in the App Launcher dashboard, this is the domain that will be - * displayed. - */ - domain: string; /** - * Body param: The application type. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - type: string; + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; - /** - * Body param: When set to true, users can authenticate to this application using - * their WARP session. When set to false this application will always require - * direct IdP authentication. This setting always overrides the organization - * setting for WARP authentication. - */ - allow_authenticate_via_warp?: boolean; + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; - /** - * Body param: The identity providers your users can select when connecting to this - * application. Defaults to all IdPs configured in your account. - */ - allowed_idps?: Array; + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BrowserVncApplication { + /** + * Body param: The primary hostname and path that Access will secure. If the app is + * visible in the App Launcher dashboard, this is the domain that will be + * displayed. + */ + domain: string; + + /** + * Body param: The application type. + */ + type: string; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: When set to true, users can authenticate to this application using + * their WARP session. When set to false this application will always require + * direct IdP authentication. This setting always overrides the organization + * setting for WARP authentication. + */ + allow_authenticate_via_warp?: boolean; + + /** + * Body param: The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; /** * Body param: Displays the application in the App Launcher. @@ -15350,6 +15875,12 @@ export namespace ApplicationCreateParams { */ same_site_cookie_attribute?: string; + /** + * Body param: Configuration for provisioning to this application via SCIM. This is + * currently in closed beta. + */ + scim_config?: ApplicationCreateParams.BrowserVncApplication.ScimConfig; + /** * Body param: List of domains that Access will secure. */ @@ -15385,11 +15916,6 @@ export namespace ApplicationCreateParams { * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { - /** - * The ID of the Access policy. - */ - id?: string; - /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -15414,11 +15940,6 @@ export namespace ApplicationCreateParams { */ name: string; - /** - * The ID of the Access policy. - */ - id?: string; - /** * Administrators who can approve a temporary authentication request. */ @@ -15472,152 +15993,188 @@ export namespace ApplicationCreateParams { */ session_duration?: string; } - } - - export interface AppLauncherApplication { - /** - * Body param: The application type. - */ - type: ApplicationTypeParam; - - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: The identity providers your users can select when connecting to this - * application. Defaults to all IdPs configured in your account. - */ - allowed_idps?: Array; - - /** - * Body param: When set to `true`, users skip the identity provider selection step - * during login. You must specify only one identity provider in allowed_idps. - */ - auto_redirect_to_identity?: boolean; /** - * Body param: The policies that will apply to the application, in ascending order - * of precedence. Items can reference existing policies or create new policies - * exclusive to the application. - */ - policies?: Array< - | ApplicationCreateParams.AppLauncherApplication.AccessAppPolicyLink - | string - | ApplicationCreateParams.AppLauncherApplication.UnionMember2 - >; - - /** - * Body param: The amount of time that tokens issued for this application will be - * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us - * (or µs), ms, s, m, h. - */ - session_duration?: string; - } - - export namespace AppLauncherApplication { - /** - * A JSON that links a reusable policy to an application. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - export interface AccessAppPolicyLink { + export interface ScimConfig { /** - * The ID of the Access policy. + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. */ - id?: string; + idp_uid: string; /** - * The order of execution for this policy. Must be unique for each policy within an - * app. + * The base URI for the application's SCIM-compatible API. */ - precedence?: number; - } + remote_uri: string; - export interface UnionMember2 { /** - * The action Access will take if a user matches this policy. + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. */ - decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; /** - * Rules evaluated with an OR logical operator. A user needs to meet only one of - * the Include rules. + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. */ - include: Array; + deactivate_on_delete?: boolean; /** - * The name of the Access policy. + * Whether SCIM provisioning is turned on for this application. */ - name: string; + enabled?: boolean; /** - * The ID of the Access policy. + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. */ - id?: string; + mappings?: Array; + } + export namespace ScimConfig { /** - * Administrators who can approve a temporary authentication request. + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. */ - approval_groups?: Array; + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; - /** - * Requires the user to request access from an administrator at the start of each - * session. - */ - approval_required?: boolean; + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; - /** - * Rules evaluated with a NOT logical operator. To match the policy, a user cannot - * meet any of the Exclude rules. - */ - exclude?: Array; + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } /** - * Require this application to be served in an isolated browser for users matching - * this policy. 'Client Web Isolation' must be on for the account in order to use - * this feature. + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. */ - isolation_required?: boolean; + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; - /** - * The order of execution for this policy. Must be unique for each policy within an - * app. - */ - precedence?: number; + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } /** - * A custom message that will appear on the purpose justification screen. + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. */ - purpose_justification_prompt?: string; + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; - /** - * Require users to enter a justification when they log in to the application. - */ - purpose_justification_required?: boolean; + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; - /** - * Rules evaluated with an AND logical operator. To match the policy, a user must - * meet all of the Require rules. - */ - require?: Array; + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } /** - * The amount of time that tokens issued for the application will be valid. Must be - * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, - * m, h. + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. */ - session_duration?: string; + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } } } - export interface DeviceEnrollmentPermissionsApplication { + export interface AppLauncherApplication { /** * Body param: The application type. */ @@ -15653,11 +16210,17 @@ export namespace ApplicationCreateParams { * exclusive to the application. */ policies?: Array< - | ApplicationCreateParams.DeviceEnrollmentPermissionsApplication.AccessAppPolicyLink + | ApplicationCreateParams.AppLauncherApplication.AccessAppPolicyLink | string - | ApplicationCreateParams.DeviceEnrollmentPermissionsApplication.UnionMember2 + | ApplicationCreateParams.AppLauncherApplication.UnionMember2 >; + /** + * Body param: Configuration for provisioning to this application via SCIM. This is + * currently in closed beta. + */ + scim_config?: ApplicationCreateParams.AppLauncherApplication.ScimConfig; + /** * Body param: The amount of time that tokens issued for this application will be * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us @@ -15666,16 +16229,11 @@ export namespace ApplicationCreateParams { session_duration?: string; } - export namespace DeviceEnrollmentPermissionsApplication { + export namespace AppLauncherApplication { /** * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { - /** - * The ID of the Access policy. - */ - id?: string; - /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -15700,11 +16258,6 @@ export namespace ApplicationCreateParams { */ name: string; - /** - * The ID of the Access policy. - */ - id?: string; - /** * Administrators who can approve a temporary authentication request. */ @@ -15758,49 +16311,234 @@ export namespace ApplicationCreateParams { */ session_duration?: string; } - } - export interface BrowserIsolationPermissionsApplication { /** - * Body param: The application type. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - type: ApplicationTypeParam; + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; - /** - * Body param: The identity providers your users can select when connecting to this - * application. Defaults to all IdPs configured in your account. - */ - allowed_idps?: Array; + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; - /** - * Body param: When set to `true`, users skip the identity provider selection step - * during login. You must specify only one identity provider in allowed_idps. - */ - auto_redirect_to_identity?: boolean; + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; - /** - * Body param: The policies that will apply to the application, in ascending order + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface DeviceEnrollmentPermissionsApplication { + /** + * Body param: The application type. + */ + type: ApplicationTypeParam; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Body param: When set to `true`, users skip the identity provider selection step + * during login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + /** + * Body param: The policies that will apply to the application, in ascending order * of precedence. Items can reference existing policies or create new policies * exclusive to the application. */ policies?: Array< - | ApplicationCreateParams.BrowserIsolationPermissionsApplication.AccessAppPolicyLink + | ApplicationCreateParams.DeviceEnrollmentPermissionsApplication.AccessAppPolicyLink | string - | ApplicationCreateParams.BrowserIsolationPermissionsApplication.UnionMember2 + | ApplicationCreateParams.DeviceEnrollmentPermissionsApplication.UnionMember2 >; + /** + * Body param: Configuration for provisioning to this application via SCIM. This is + * currently in closed beta. + */ + scim_config?: ApplicationCreateParams.DeviceEnrollmentPermissionsApplication.ScimConfig; + /** * Body param: The amount of time that tokens issued for this application will be * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us @@ -15809,16 +16547,11 @@ export namespace ApplicationCreateParams { session_duration?: string; } - export namespace BrowserIsolationPermissionsApplication { + export namespace DeviceEnrollmentPermissionsApplication { /** * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { - /** - * The ID of the Access policy. - */ - id?: string; - /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -15843,11 +16576,6 @@ export namespace ApplicationCreateParams { */ name: string; - /** - * The ID of the Access policy. - */ - id?: string; - /** * Administrators who can approve a temporary authentication request. */ @@ -15901,66 +16629,2054 @@ export namespace ApplicationCreateParams { */ session_duration?: string; } - } - export interface AccessBookmarkProps { /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - account_id?: string; + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; - /** - * Body param: Displays the application in the App Launcher. - */ - app_launcher_visible?: boolean; + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; - /** - * Body param: The URL or domain of the bookmark. - */ - domain?: string; + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; - /** - * Body param: The image URL for the logo shown in the App Launcher dashboard. - */ - logo_url?: string; + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; - /** - * Body param: The name of the application. - */ - name?: string; + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } - /** - * Body param: The tags you want assigned to an application. Tags are used to - * filter applications in the App Launcher dashboard. + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BrowserIsolationPermissionsApplication { + /** + * Body param: The application type. + */ + type: ApplicationTypeParam; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Body param: When set to `true`, users skip the identity provider selection step + * during login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + /** + * Body param: The policies that will apply to the application, in ascending order + * of precedence. Items can reference existing policies or create new policies + * exclusive to the application. + */ + policies?: Array< + | ApplicationCreateParams.BrowserIsolationPermissionsApplication.AccessAppPolicyLink + | string + | ApplicationCreateParams.BrowserIsolationPermissionsApplication.UnionMember2 + >; + + /** + * Body param: Configuration for provisioning to this application via SCIM. This is + * currently in closed beta. + */ + scim_config?: ApplicationCreateParams.BrowserIsolationPermissionsApplication.ScimConfig; + + /** + * Body param: The amount of time that tokens issued for this application will be + * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us + * (or µs), ms, s, m, h. + */ + session_duration?: string; + } + + export namespace BrowserIsolationPermissionsApplication { + /** + * A JSON that links a reusable policy to an application. + */ + export interface AccessAppPolicyLink { + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + } + + export interface UnionMember2 { + /** + * The action Access will take if a user matches this policy. + */ + decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include: Array; + + /** + * The name of the Access policy. + */ + name: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BookmarkApplication { + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Body param: The URL or domain of the bookmark. + */ + domain?: string; + + /** + * Body param: The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * Body param: The name of the application. + */ + name?: string; + + /** + * Body param: Configuration for provisioning to this application via SCIM. This is + * currently in closed beta. + */ + scim_config?: ApplicationCreateParams.BookmarkApplication.ScimConfig; + + /** + * Body param: The tags you want assigned to an application. Tags are used to + * filter applications in the App Launcher dashboard. + */ + tags?: Array; + + /** + * Body param: The application type. + */ + type?: string; + } + + export namespace BookmarkApplication { + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } +} + +export type ApplicationUpdateParams = + | ApplicationUpdateParams.SelfHostedApplication + | ApplicationUpdateParams.SaaSApplication + | ApplicationUpdateParams.BrowserSSHApplication + | ApplicationUpdateParams.BrowserVncApplication + | ApplicationUpdateParams.AppLauncherApplication + | ApplicationUpdateParams.DeviceEnrollmentPermissionsApplication + | ApplicationUpdateParams.BrowserIsolationPermissionsApplication + | ApplicationUpdateParams.BookmarkApplication; + +export namespace ApplicationUpdateParams { + export interface SelfHostedApplication { + /** + * Body param: The primary hostname and path that Access will secure. If the app is + * visible in the App Launcher dashboard, this is the domain that will be + * displayed. + */ + domain: string; + + /** + * Body param: The application type. + */ + type: string; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: When set to true, users can authenticate to this application using + * their WARP session. When set to false this application will always require + * direct IdP authentication. This setting always overrides the organization + * setting for WARP authentication. + */ + allow_authenticate_via_warp?: boolean; + + /** + * Body param: The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Body param: Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Body param: When set to `true`, users skip the identity provider selection step + * during login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + /** + * Body param: + */ + cors_headers?: CORSHeadersParam; + + /** + * Body param: The custom error message shown to a user when they are denied access + * to the application. + */ + custom_deny_message?: string; + + /** + * Body param: The custom URL a user is redirected to when they are denied access + * to the application when failing identity-based rules. + */ + custom_deny_url?: string; + + /** + * Body param: The custom URL a user is redirected to when they are denied access + * to the application when failing non-identity rules. + */ + custom_non_identity_deny_url?: string; + + /** + * Body param: The custom pages that will be displayed when applicable for this + * application + */ + custom_pages?: Array; + + /** + * Body param: Enables the binding cookie, which increases security against + * compromised authorization tokens and CSRF attacks. + */ + enable_binding_cookie?: boolean; + + /** + * Body param: Enables the HttpOnly cookie attribute, which increases security + * against XSS attacks. + */ + http_only_cookie_attribute?: boolean; + + /** + * Body param: The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * Body param: The name of the application. + */ + name?: string; + + /** + * Body param: Allows options preflight requests to bypass Access authentication + * and go directly to the origin. Cannot turn on if cors_headers is set. + */ + options_preflight_bypass?: boolean; + + /** + * Body param: Enables cookie paths to scope an application's JWT to the + * application path. If disabled, the JWT will scope to the hostname by default + */ + path_cookie_attribute?: boolean; + + /** + * Body param: The policies that will apply to the application, in ascending order + * of precedence. Items can reference existing policies or create new policies + * exclusive to the application. + */ + policies?: Array< + | ApplicationUpdateParams.SelfHostedApplication.AccessAppPolicyLink + | string + | ApplicationUpdateParams.SelfHostedApplication.UnionMember2 + >; + + /** + * Body param: Sets the SameSite cookie setting, which provides increased security + * against CSRF attacks. + */ + same_site_cookie_attribute?: string; + + /** + * Body param: Configuration for provisioning to this application via SCIM. This is + * currently in closed beta. + */ + scim_config?: ApplicationUpdateParams.SelfHostedApplication.ScimConfig; + + /** + * Body param: List of domains that Access will secure. + */ + self_hosted_domains?: Array; + + /** + * Body param: Returns a 401 status code when the request is blocked by a Service + * Auth policy. + */ + service_auth_401_redirect?: boolean; + + /** + * Body param: The amount of time that tokens issued for this application will be + * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us + * (or µs), ms, s, m, h. + */ + session_duration?: string; + + /** + * Body param: Enables automatic authentication through cloudflared. + */ + skip_interstitial?: boolean; + + /** + * Body param: The tags you want assigned to an application. Tags are used to + * filter applications in the App Launcher dashboard. + */ + tags?: Array; + } + + export namespace SelfHostedApplication { + /** + * A JSON that links a reusable policy to an application. + */ + export interface AccessAppPolicyLink { + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + } + + export interface UnionMember2 { + /** + * The action Access will take if a user matches this policy. + */ + decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include: Array; + + /** + * The name of the Access policy. + */ + name: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface SaaSApplication { + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Body param: Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Body param: When set to `true`, users skip the identity provider selection step + * during login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + /** + * Body param: The custom pages that will be displayed when applicable for this + * application + */ + custom_pages?: Array; + + /** + * Body param: The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * Body param: The name of the application. + */ + name?: string; + + /** + * Body param: The policies that will apply to the application, in ascending order + * of precedence. Items can reference existing policies or create new policies + * exclusive to the application. + */ + policies?: Array< + | ApplicationUpdateParams.SaaSApplication.AccessAppPolicyLink + | string + | ApplicationUpdateParams.SaaSApplication.UnionMember2 + >; + + /** + * Body param: + */ + saas_app?: SAMLSaaSAppParam | ApplicationUpdateParams.SaaSApplication.AccessOIDCSaaSApp; + + /** + * Body param: Configuration for provisioning to this application via SCIM. This is + * currently in closed beta. + */ + scim_config?: ApplicationUpdateParams.SaaSApplication.ScimConfig; + + /** + * Body param: The tags you want assigned to an application. Tags are used to + * filter applications in the App Launcher dashboard. + */ + tags?: Array; + + /** + * Body param: The application type. + */ + type?: string; + } + + export namespace SaaSApplication { + /** + * A JSON that links a reusable policy to an application. + */ + export interface AccessAppPolicyLink { + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + } + + export interface UnionMember2 { + /** + * The action Access will take if a user matches this policy. + */ + decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include: Array; + + /** + * The name of the Access policy. + */ + name: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + } + + export interface AccessOIDCSaaSApp { + /** + * If client secret should be required on the token endpoint when + * authorization_code_with_pkce grant is used. + */ + allow_pkce_without_client_secret?: boolean; + + /** + * The URL where this applications tile redirects users + */ + app_launcher_url?: string; + + /** + * Identifier of the authentication protocol used for the saas app. Required for + * OIDC. + */ + auth_type?: 'saml' | 'oidc'; + + /** + * The application client id + */ + client_id?: string; + + /** + * The application client secret, only returned on POST request. + */ + client_secret?: string; + + custom_claims?: AccessOIDCSaaSApp.CustomClaims; + + /** + * The OIDC flows supported by this application + */ + grant_types?: Array<'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens'>; + + /** + * A regex to filter Cloudflare groups returned in ID token and userinfo endpoint + */ + group_filter_regex?: string; + + /** + * The Access public certificate that will be used to verify your identity. + */ + public_key?: string; + + /** + * The permitted URL's for Cloudflare to return Authorization codes and Access/ID + * tokens + */ + redirect_uris?: Array; + + refresh_token_options?: AccessOIDCSaaSApp.RefreshTokenOptions; + + /** + * Define the user information shared with access, "offline_access" scope will be + * automatically enabled if refresh tokens are enabled + */ + scopes?: Array<'openid' | 'groups' | 'email' | 'profile'>; + } + + export namespace AccessOIDCSaaSApp { + export interface CustomClaims { + /** + * The name of the claim. + */ + name?: string; + + /** + * If the claim is required when building an OIDC token. + */ + required?: boolean; + + /** + * The scope of the claim. + */ + scope?: 'groups' | 'profile' | 'email' | 'openid'; + + source?: CustomClaims.Source; + } + + export namespace CustomClaims { + export interface Source { + /** + * The name of the IdP claim. + */ + name?: string; + + /** + * A mapping from IdP ID to claim name. + */ + name_by_idp?: Record; + } + } + + export interface RefreshTokenOptions { + /** + * How long a refresh token will be valid for after creation. Valid units are + * m,h,d. Must be longer than 1m. + */ + lifetime?: string; + } + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BrowserSSHApplication { + /** + * Body param: The primary hostname and path that Access will secure. If the app is + * visible in the App Launcher dashboard, this is the domain that will be + * displayed. + */ + domain: string; + + /** + * Body param: The application type. + */ + type: string; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: When set to true, users can authenticate to this application using + * their WARP session. When set to false this application will always require + * direct IdP authentication. This setting always overrides the organization + * setting for WARP authentication. + */ + allow_authenticate_via_warp?: boolean; + + /** + * Body param: The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. + */ + allowed_idps?: Array; + + /** + * Body param: Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Body param: When set to `true`, users skip the identity provider selection step + * during login. You must specify only one identity provider in allowed_idps. + */ + auto_redirect_to_identity?: boolean; + + /** + * Body param: + */ + cors_headers?: CORSHeadersParam; + + /** + * Body param: The custom error message shown to a user when they are denied access + * to the application. + */ + custom_deny_message?: string; + + /** + * Body param: The custom URL a user is redirected to when they are denied access + * to the application when failing identity-based rules. + */ + custom_deny_url?: string; + + /** + * Body param: The custom URL a user is redirected to when they are denied access + * to the application when failing non-identity rules. + */ + custom_non_identity_deny_url?: string; + + /** + * Body param: The custom pages that will be displayed when applicable for this + * application + */ + custom_pages?: Array; + + /** + * Body param: Enables the binding cookie, which increases security against + * compromised authorization tokens and CSRF attacks. + */ + enable_binding_cookie?: boolean; + + /** + * Body param: Enables the HttpOnly cookie attribute, which increases security + * against XSS attacks. + */ + http_only_cookie_attribute?: boolean; + + /** + * Body param: The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; + + /** + * Body param: The name of the application. + */ + name?: string; + + /** + * Body param: Allows options preflight requests to bypass Access authentication + * and go directly to the origin. Cannot turn on if cors_headers is set. + */ + options_preflight_bypass?: boolean; + + /** + * Body param: Enables cookie paths to scope an application's JWT to the + * application path. If disabled, the JWT will scope to the hostname by default + */ + path_cookie_attribute?: boolean; + + /** + * Body param: The policies that will apply to the application, in ascending order + * of precedence. Items can reference existing policies or create new policies + * exclusive to the application. + */ + policies?: Array< + | ApplicationUpdateParams.BrowserSSHApplication.AccessAppPolicyLink + | string + | ApplicationUpdateParams.BrowserSSHApplication.UnionMember2 + >; + + /** + * Body param: Sets the SameSite cookie setting, which provides increased security + * against CSRF attacks. + */ + same_site_cookie_attribute?: string; + + /** + * Body param: Configuration for provisioning to this application via SCIM. This is + * currently in closed beta. + */ + scim_config?: ApplicationUpdateParams.BrowserSSHApplication.ScimConfig; + + /** + * Body param: List of domains that Access will secure. + */ + self_hosted_domains?: Array; + + /** + * Body param: Returns a 401 status code when the request is blocked by a Service + * Auth policy. + */ + service_auth_401_redirect?: boolean; + + /** + * Body param: The amount of time that tokens issued for this application will be + * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us + * (or µs), ms, s, m, h. + */ + session_duration?: string; + + /** + * Body param: Enables automatic authentication through cloudflared. + */ + skip_interstitial?: boolean; + + /** + * Body param: The tags you want assigned to an application. Tags are used to + * filter applications in the App Launcher dashboard. */ tags?: Array; + } + + export namespace BrowserSSHApplication { + /** + * A JSON that links a reusable policy to an application. + */ + export interface AccessAppPolicyLink { + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + } + + export interface UnionMember2 { + /** + * The action Access will take if a user matches this policy. + */ + decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include: Array; + + /** + * The name of the Access policy. + */ + name: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + } + + /** + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. + */ + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; - /** - * Body param: The application type. - */ - type?: string; - } -} + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; -export type ApplicationUpdateParams = - | ApplicationUpdateParams.SelfHostedApplication - | ApplicationUpdateParams.SaaSApplication - | ApplicationUpdateParams.BrowserSSHApplication - | ApplicationUpdateParams.BrowserVncApplication - | ApplicationUpdateParams.AppLauncherApplication - | ApplicationUpdateParams.DeviceEnrollmentPermissionsApplication - | ApplicationUpdateParams.BrowserIsolationPermissionsApplication - | ApplicationUpdateParams.AccessBookmarkProps; + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } -export namespace ApplicationUpdateParams { - export interface SelfHostedApplication { + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BrowserVncApplication { /** * Body param: The primary hostname and path that Access will secure. If the app is * visible in the App Launcher dashboard, this is the domain that will be @@ -16079,9 +18795,9 @@ export namespace ApplicationUpdateParams { * exclusive to the application. */ policies?: Array< - | ApplicationUpdateParams.SelfHostedApplication.AccessAppPolicyLink + | ApplicationUpdateParams.BrowserVncApplication.AccessAppPolicyLink | string - | ApplicationUpdateParams.SelfHostedApplication.UnionMember2 + | ApplicationUpdateParams.BrowserVncApplication.UnionMember2 >; /** @@ -16090,6 +18806,12 @@ export namespace ApplicationUpdateParams { */ same_site_cookie_attribute?: string; + /** + * Body param: Configuration for provisioning to this application via SCIM. This is + * currently in closed beta. + */ + scim_config?: ApplicationUpdateParams.BrowserVncApplication.ScimConfig; + /** * Body param: List of domains that Access will secure. */ @@ -16120,16 +18842,11 @@ export namespace ApplicationUpdateParams { tags?: Array; } - export namespace SelfHostedApplication { + export namespace BrowserVncApplication { /** * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { - /** - * The ID of the Access policy. - */ - id?: string; - /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -16154,11 +18871,6 @@ export namespace ApplicationUpdateParams { */ name: string; - /** - * The ID of the Access policy. - */ - id?: string; - /** * Administrators who can approve a temporary authentication request. */ @@ -16212,291 +18924,192 @@ export namespace ApplicationUpdateParams { */ session_duration?: string; } - } - - export interface SaaSApplication { - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: The identity providers your users can select when connecting to this - * application. Defaults to all IdPs configured in your account. - */ - allowed_idps?: Array; - - /** - * Body param: Displays the application in the App Launcher. - */ - app_launcher_visible?: boolean; - - /** - * Body param: When set to `true`, users skip the identity provider selection step - * during login. You must specify only one identity provider in allowed_idps. - */ - auto_redirect_to_identity?: boolean; - - /** - * Body param: The custom pages that will be displayed when applicable for this - * application - */ - custom_pages?: Array; - - /** - * Body param: The image URL for the logo shown in the App Launcher dashboard. - */ - logo_url?: string; - - /** - * Body param: The name of the application. - */ - name?: string; - - /** - * Body param: The policies that will apply to the application, in ascending order - * of precedence. Items can reference existing policies or create new policies - * exclusive to the application. - */ - policies?: Array< - | ApplicationUpdateParams.SaaSApplication.AccessAppPolicyLink - | string - | ApplicationUpdateParams.SaaSApplication.UnionMember2 - >; - - /** - * Body param: - */ - saas_app?: SAMLSaaSAppParam | ApplicationUpdateParams.SaaSApplication.AccessOIDCSaaSApp; - - /** - * Body param: The tags you want assigned to an application. Tags are used to - * filter applications in the App Launcher dashboard. - */ - tags?: Array; - - /** - * Body param: The application type. - */ - type?: string; - } - export namespace SaaSApplication { /** - * A JSON that links a reusable policy to an application. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - export interface AccessAppPolicyLink { - /** - * The ID of the Access policy. - */ - id?: string; - - /** - * The order of execution for this policy. Must be unique for each policy within an - * app. - */ - precedence?: number; - } - - export interface UnionMember2 { - /** - * The action Access will take if a user matches this policy. - */ - decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; - - /** - * Rules evaluated with an OR logical operator. A user needs to meet only one of - * the Include rules. - */ - include: Array; - - /** - * The name of the Access policy. - */ - name: string; - - /** - * The ID of the Access policy. - */ - id?: string; - - /** - * Administrators who can approve a temporary authentication request. - */ - approval_groups?: Array; - + export interface ScimConfig { /** - * Requires the user to request access from an administrator at the start of each - * session. + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. */ - approval_required?: boolean; + idp_uid: string; /** - * Rules evaluated with a NOT logical operator. To match the policy, a user cannot - * meet any of the Exclude rules. + * The base URI for the application's SCIM-compatible API. */ - exclude?: Array; + remote_uri: string; /** - * Require this application to be served in an isolated browser for users matching - * this policy. 'Client Web Isolation' must be on for the account in order to use - * this feature. + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. */ - isolation_required?: boolean; + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; /** - * The order of execution for this policy. Must be unique for each policy within an - * app. + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. */ - precedence?: number; + deactivate_on_delete?: boolean; /** - * A custom message that will appear on the purpose justification screen. + * Whether SCIM provisioning is turned on for this application. */ - purpose_justification_prompt?: string; + enabled?: boolean; /** - * Require users to enter a justification when they log in to the application. + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. */ - purpose_justification_required?: boolean; + mappings?: Array; + } + export namespace ScimConfig { /** - * Rules evaluated with an AND logical operator. To match the policy, a user must - * meet all of the Require rules. + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. */ - require?: Array; + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; - /** - * The amount of time that tokens issued for the application will be valid. Must be - * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, - * m, h. - */ - session_duration?: string; - } + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; - export interface AccessOIDCSaaSApp { - /** - * If client secret should be required on the token endpoint when - * authorization_code_with_pkce grant is used. - */ - allow_pkce_without_client_secret?: boolean; + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } /** - * The URL where this applications tile redirects users + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. */ - app_launcher_url?: string; + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; - /** - * Identifier of the authentication protocol used for the saas app. Required for - * OIDC. - */ - auth_type?: 'saml' | 'oidc'; + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } /** - * The application client id + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. */ - client_id?: string; + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; - /** - * The application client secret, only returned on POST request. - */ - client_secret?: string; + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; - custom_claims?: AccessOIDCSaaSApp.CustomClaims; + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; - /** - * The OIDC flows supported by this application - */ - grant_types?: Array<'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens'>; + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; - /** - * A regex to filter Cloudflare groups returned in ID token and userinfo endpoint - */ - group_filter_regex?: string; + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; - /** - * The Access public certificate that will be used to verify your identity. - */ - public_key?: string; + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } /** - * The permitted URL's for Cloudflare to return Authorization codes and Access/ID - * tokens + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. */ - redirect_uris?: Array; - - refresh_token_options?: AccessOIDCSaaSApp.RefreshTokenOptions; + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; - /** - * Define the user information shared with access, "offline_access" scope will be - * automatically enabled if refresh tokens are enabled - */ - scopes?: Array<'openid' | 'groups' | 'email' | 'profile'>; - } + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; - export namespace AccessOIDCSaaSApp { - export interface CustomClaims { /** - * The name of the claim. + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. */ - name?: string; + filter?: string; /** - * A mapping from IdP ID to claim name. + * Whether or not this mapping applies to creates, updates, or deletes. */ - name_by_idp?: Record; + operations?: Mapping.Operations; /** - * If the claim is required when building an OIDC token. + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. */ - required?: boolean; + transform_jsonata?: string; + } + export namespace Mapping { /** - * The scope of the claim. + * Whether or not this mapping applies to creates, updates, or deletes. */ - scope?: 'groups' | 'profile' | 'email' | 'openid'; + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; - source?: CustomClaims.Source; - } + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; - export namespace CustomClaims { - export interface Source { /** - * The name of the IdP claim. + * Whether or not this mapping applies to update (PATCH/PUT) operations. */ - name?: string; + update?: boolean; } } - - export interface RefreshTokenOptions { - /** - * How long a refresh token will be valid for after creation. Valid units are - * m,h,d. Must be longer than 1m. - */ - lifetime?: string; - } } } - export interface BrowserSSHApplication { - /** - * Body param: The primary hostname and path that Access will secure. If the app is - * visible in the App Launcher dashboard, this is the domain that will be - * displayed. - */ - domain: string; - + export interface AppLauncherApplication { /** * Body param: The application type. */ - type: string; + type: ApplicationTypeParam; /** * Path param: The Account ID to use for this endpoint. Mutually exclusive with the @@ -16510,121 +19123,34 @@ export namespace ApplicationUpdateParams { */ zone_id?: string; - /** - * Body param: When set to true, users can authenticate to this application using - * their WARP session. When set to false this application will always require - * direct IdP authentication. This setting always overrides the organization - * setting for WARP authentication. - */ - allow_authenticate_via_warp?: boolean; - /** * Body param: The identity providers your users can select when connecting to this * application. Defaults to all IdPs configured in your account. */ allowed_idps?: Array; - /** - * Body param: Displays the application in the App Launcher. - */ - app_launcher_visible?: boolean; - /** * Body param: When set to `true`, users skip the identity provider selection step * during login. You must specify only one identity provider in allowed_idps. */ auto_redirect_to_identity?: boolean; - /** - * Body param: - */ - cors_headers?: CORSHeadersParam; - - /** - * Body param: The custom error message shown to a user when they are denied access - * to the application. - */ - custom_deny_message?: string; - - /** - * Body param: The custom URL a user is redirected to when they are denied access - * to the application when failing identity-based rules. - */ - custom_deny_url?: string; - - /** - * Body param: The custom URL a user is redirected to when they are denied access - * to the application when failing non-identity rules. - */ - custom_non_identity_deny_url?: string; - - /** - * Body param: The custom pages that will be displayed when applicable for this - * application - */ - custom_pages?: Array; - - /** - * Body param: Enables the binding cookie, which increases security against - * compromised authorization tokens and CSRF attacks. - */ - enable_binding_cookie?: boolean; - - /** - * Body param: Enables the HttpOnly cookie attribute, which increases security - * against XSS attacks. - */ - http_only_cookie_attribute?: boolean; - - /** - * Body param: The image URL for the logo shown in the App Launcher dashboard. - */ - logo_url?: string; - - /** - * Body param: The name of the application. - */ - name?: string; - - /** - * Body param: Allows options preflight requests to bypass Access authentication - * and go directly to the origin. Cannot turn on if cors_headers is set. - */ - options_preflight_bypass?: boolean; - - /** - * Body param: Enables cookie paths to scope an application's JWT to the - * application path. If disabled, the JWT will scope to the hostname by default - */ - path_cookie_attribute?: boolean; - /** * Body param: The policies that will apply to the application, in ascending order * of precedence. Items can reference existing policies or create new policies * exclusive to the application. */ policies?: Array< - | ApplicationUpdateParams.BrowserSSHApplication.AccessAppPolicyLink + | ApplicationUpdateParams.AppLauncherApplication.AccessAppPolicyLink | string - | ApplicationUpdateParams.BrowserSSHApplication.UnionMember2 + | ApplicationUpdateParams.AppLauncherApplication.UnionMember2 >; /** - * Body param: Sets the SameSite cookie setting, which provides increased security - * against CSRF attacks. - */ - same_site_cookie_attribute?: string; - - /** - * Body param: List of domains that Access will secure. - */ - self_hosted_domains?: Array; - - /** - * Body param: Returns a 401 status code when the request is blocked by a Service - * Auth policy. + * Body param: Configuration for provisioning to this application via SCIM. This is + * currently in closed beta. */ - service_auth_401_redirect?: boolean; + scim_config?: ApplicationUpdateParams.AppLauncherApplication.ScimConfig; /** * Body param: The amount of time that tokens issued for this application will be @@ -16632,29 +19158,13 @@ export namespace ApplicationUpdateParams { * (or µs), ms, s, m, h. */ session_duration?: string; - - /** - * Body param: Enables automatic authentication through cloudflared. - */ - skip_interstitial?: boolean; - - /** - * Body param: The tags you want assigned to an application. Tags are used to - * filter applications in the App Launcher dashboard. - */ - tags?: Array; } - export namespace BrowserSSHApplication { + export namespace AppLauncherApplication { /** * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { - /** - * The ID of the Access policy. - */ - id?: string; - /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -16679,11 +19189,6 @@ export namespace ApplicationUpdateParams { */ name: string; - /** - * The ID of the Access policy. - */ - id?: string; - /** * Administrators who can approve a temporary authentication request. */ @@ -16737,120 +19242,216 @@ export namespace ApplicationUpdateParams { */ session_duration?: string; } - } - export interface BrowserVncApplication { /** - * Body param: The primary hostname and path that Access will secure. If the app is - * visible in the App Launcher dashboard, this is the domain that will be - * displayed. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - domain: string; + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; - /** - * Body param: The application type. - */ - type: string; + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; - /** - * Body param: When set to true, users can authenticate to this application using - * their WARP session. When set to false this application will always require - * direct IdP authentication. This setting always overrides the organization - * setting for WARP authentication. - */ - allow_authenticate_via_warp?: boolean; + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; - /** - * Body param: The identity providers your users can select when connecting to this - * application. Defaults to all IdPs configured in your account. - */ - allowed_idps?: Array; + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } - /** - * Body param: Displays the application in the App Launcher. - */ - app_launcher_visible?: boolean; + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; - /** - * Body param: When set to `true`, users skip the identity provider selection step - * during login. You must specify only one identity provider in allowed_idps. - */ - auto_redirect_to_identity?: boolean; + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; - /** - * Body param: - */ - cors_headers?: CORSHeadersParam; + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } - /** - * Body param: The custom error message shown to a user when they are denied access - * to the application. - */ - custom_deny_message?: string; + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; - /** - * Body param: The custom URL a user is redirected to when they are denied access - * to the application when failing identity-based rules. - */ - custom_deny_url?: string; + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } - /** - * Body param: The custom URL a user is redirected to when they are denied access - * to the application when failing non-identity rules. - */ - custom_non_identity_deny_url?: string; + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; - /** - * Body param: The custom pages that will be displayed when applicable for this - * application - */ - custom_pages?: Array; + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; - /** - * Body param: Enables the binding cookie, which increases security against - * compromised authorization tokens and CSRF attacks. - */ - enable_binding_cookie?: boolean; + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + export interface DeviceEnrollmentPermissionsApplication { /** - * Body param: Enables the HttpOnly cookie attribute, which increases security - * against XSS attacks. + * Body param: The application type. */ - http_only_cookie_attribute?: boolean; + type: ApplicationTypeParam; /** - * Body param: The image URL for the logo shown in the App Launcher dashboard. + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. */ - logo_url?: string; + account_id?: string; /** - * Body param: The name of the application. + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. */ - name?: string; + zone_id?: string; /** - * Body param: Allows options preflight requests to bypass Access authentication - * and go directly to the origin. Cannot turn on if cors_headers is set. + * Body param: The identity providers your users can select when connecting to this + * application. Defaults to all IdPs configured in your account. */ - options_preflight_bypass?: boolean; + allowed_idps?: Array; /** - * Body param: Enables cookie paths to scope an application's JWT to the - * application path. If disabled, the JWT will scope to the hostname by default + * Body param: When set to `true`, users skip the identity provider selection step + * during login. You must specify only one identity provider in allowed_idps. */ - path_cookie_attribute?: boolean; + auto_redirect_to_identity?: boolean; /** * Body param: The policies that will apply to the application, in ascending order @@ -16858,27 +19459,16 @@ export namespace ApplicationUpdateParams { * exclusive to the application. */ policies?: Array< - | ApplicationUpdateParams.BrowserVncApplication.AccessAppPolicyLink + | ApplicationUpdateParams.DeviceEnrollmentPermissionsApplication.AccessAppPolicyLink | string - | ApplicationUpdateParams.BrowserVncApplication.UnionMember2 + | ApplicationUpdateParams.DeviceEnrollmentPermissionsApplication.UnionMember2 >; /** - * Body param: Sets the SameSite cookie setting, which provides increased security - * against CSRF attacks. - */ - same_site_cookie_attribute?: string; - - /** - * Body param: List of domains that Access will secure. - */ - self_hosted_domains?: Array; - - /** - * Body param: Returns a 401 status code when the request is blocked by a Service - * Auth policy. + * Body param: Configuration for provisioning to this application via SCIM. This is + * currently in closed beta. */ - service_auth_401_redirect?: boolean; + scim_config?: ApplicationUpdateParams.DeviceEnrollmentPermissionsApplication.ScimConfig; /** * Body param: The amount of time that tokens issued for this application will be @@ -16886,29 +19476,13 @@ export namespace ApplicationUpdateParams { * (or µs), ms, s, m, h. */ session_duration?: string; - - /** - * Body param: Enables automatic authentication through cloudflared. - */ - skip_interstitial?: boolean; - - /** - * Body param: The tags you want assigned to an application. Tags are used to - * filter applications in the App Launcher dashboard. - */ - tags?: Array; } - export namespace BrowserVncApplication { + export namespace DeviceEnrollmentPermissionsApplication { /** * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { - /** - * The ID of the Access policy. - */ - id?: string; - /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -16933,11 +19507,6 @@ export namespace ApplicationUpdateParams { */ name: string; - /** - * The ID of the Access policy. - */ - id?: string; - /** * Administrators who can approve a temporary authentication request. */ @@ -16991,152 +19560,188 @@ export namespace ApplicationUpdateParams { */ session_duration?: string; } - } - - export interface AppLauncherApplication { - /** - * Body param: The application type. - */ - type: ApplicationTypeParam; - - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: The identity providers your users can select when connecting to this - * application. Defaults to all IdPs configured in your account. - */ - allowed_idps?: Array; - - /** - * Body param: When set to `true`, users skip the identity provider selection step - * during login. You must specify only one identity provider in allowed_idps. - */ - auto_redirect_to_identity?: boolean; - - /** - * Body param: The policies that will apply to the application, in ascending order - * of precedence. Items can reference existing policies or create new policies - * exclusive to the application. - */ - policies?: Array< - | ApplicationUpdateParams.AppLauncherApplication.AccessAppPolicyLink - | string - | ApplicationUpdateParams.AppLauncherApplication.UnionMember2 - >; /** - * Body param: The amount of time that tokens issued for this application will be - * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us - * (or µs), ms, s, m, h. - */ - session_duration?: string; - } - - export namespace AppLauncherApplication { - /** - * A JSON that links a reusable policy to an application. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - export interface AccessAppPolicyLink { + export interface ScimConfig { /** - * The ID of the Access policy. + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. */ - id?: string; + idp_uid: string; /** - * The order of execution for this policy. Must be unique for each policy within an - * app. + * The base URI for the application's SCIM-compatible API. */ - precedence?: number; - } + remote_uri: string; - export interface UnionMember2 { /** - * The action Access will take if a user matches this policy. + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. */ - decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; /** - * Rules evaluated with an OR logical operator. A user needs to meet only one of - * the Include rules. + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. */ - include: Array; + deactivate_on_delete?: boolean; /** - * The name of the Access policy. + * Whether SCIM provisioning is turned on for this application. */ - name: string; + enabled?: boolean; /** - * The ID of the Access policy. + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. */ - id?: string; + mappings?: Array; + } + export namespace ScimConfig { /** - * Administrators who can approve a temporary authentication request. + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. */ - approval_groups?: Array; + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; - /** - * Requires the user to request access from an administrator at the start of each - * session. - */ - approval_required?: boolean; + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; - /** - * Rules evaluated with a NOT logical operator. To match the policy, a user cannot - * meet any of the Exclude rules. - */ - exclude?: Array; + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } /** - * Require this application to be served in an isolated browser for users matching - * this policy. 'Client Web Isolation' must be on for the account in order to use - * this feature. + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. */ - isolation_required?: boolean; + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } /** - * The order of execution for this policy. Must be unique for each policy within an - * app. + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. */ - precedence?: number; + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } /** - * A custom message that will appear on the purpose justification screen. + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. */ - purpose_justification_prompt?: string; + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; - /** - * Require users to enter a justification when they log in to the application. - */ - purpose_justification_required?: boolean; + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } - /** - * Rules evaluated with an AND logical operator. To match the policy, a user must - * meet all of the Require rules. - */ - require?: Array; + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; - /** - * The amount of time that tokens issued for the application will be valid. Must be - * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, - * m, h. - */ - session_duration?: string; + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } } } - export interface DeviceEnrollmentPermissionsApplication { + export interface BrowserIsolationPermissionsApplication { /** * Body param: The application type. */ @@ -17172,11 +19777,17 @@ export namespace ApplicationUpdateParams { * exclusive to the application. */ policies?: Array< - | ApplicationUpdateParams.DeviceEnrollmentPermissionsApplication.AccessAppPolicyLink + | ApplicationUpdateParams.BrowserIsolationPermissionsApplication.AccessAppPolicyLink | string - | ApplicationUpdateParams.DeviceEnrollmentPermissionsApplication.UnionMember2 + | ApplicationUpdateParams.BrowserIsolationPermissionsApplication.UnionMember2 >; + /** + * Body param: Configuration for provisioning to this application via SCIM. This is + * currently in closed beta. + */ + scim_config?: ApplicationUpdateParams.BrowserIsolationPermissionsApplication.ScimConfig; + /** * Body param: The amount of time that tokens issued for this application will be * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us @@ -17185,16 +19796,11 @@ export namespace ApplicationUpdateParams { session_duration?: string; } - export namespace DeviceEnrollmentPermissionsApplication { + export namespace BrowserIsolationPermissionsApplication { /** * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { - /** - * The ID of the Access policy. - */ - id?: string; - /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -17219,11 +19825,6 @@ export namespace ApplicationUpdateParams { */ name: string; - /** - * The ID of the Access policy. - */ - id?: string; - /** * Administrators who can approve a temporary authentication request. */ @@ -17277,14 +19878,188 @@ export namespace ApplicationUpdateParams { */ session_duration?: string; } - } - export interface BrowserIsolationPermissionsApplication { /** - * Body param: The application type. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - type: ApplicationTypeParam; + export interface ScimConfig { + /** + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. + */ + idp_uid: string; + + /** + * The base URI for the application's SCIM-compatible API. + */ + remote_uri: string; + + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; + + /** + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. + */ + deactivate_on_delete?: boolean; + + /** + * Whether SCIM provisioning is turned on for this application. + */ + enabled?: boolean; + + /** + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. + */ + mappings?: Array; + } + + export namespace ScimConfig { + /** + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; + + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } + /** + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. + */ + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } + + /** + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. + */ + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; + + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; + + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } + + /** + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. + */ + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; + + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; + + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; + + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; + + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } + + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; + + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; + + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } + } + + export interface BookmarkApplication { /** * Path param: The Account ID to use for this endpoint. Mutually exclusive with the * Zone ID. @@ -17295,176 +20070,225 @@ export namespace ApplicationUpdateParams { * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the * Account ID. */ - zone_id?: string; + zone_id?: string; + + /** + * Body param: Displays the application in the App Launcher. + */ + app_launcher_visible?: boolean; + + /** + * Body param: The URL or domain of the bookmark. + */ + domain?: string; + + /** + * Body param: The image URL for the logo shown in the App Launcher dashboard. + */ + logo_url?: string; /** - * Body param: The identity providers your users can select when connecting to this - * application. Defaults to all IdPs configured in your account. + * Body param: The name of the application. */ - allowed_idps?: Array; + name?: string; /** - * Body param: When set to `true`, users skip the identity provider selection step - * during login. You must specify only one identity provider in allowed_idps. + * Body param: Configuration for provisioning to this application via SCIM. This is + * currently in closed beta. */ - auto_redirect_to_identity?: boolean; + scim_config?: ApplicationUpdateParams.BookmarkApplication.ScimConfig; /** - * Body param: The policies that will apply to the application, in ascending order - * of precedence. Items can reference existing policies or create new policies - * exclusive to the application. + * Body param: The tags you want assigned to an application. Tags are used to + * filter applications in the App Launcher dashboard. */ - policies?: Array< - | ApplicationUpdateParams.BrowserIsolationPermissionsApplication.AccessAppPolicyLink - | string - | ApplicationUpdateParams.BrowserIsolationPermissionsApplication.UnionMember2 - >; + tags?: Array; /** - * Body param: The amount of time that tokens issued for this application will be - * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us - * (or µs), ms, s, m, h. + * Body param: The application type. */ - session_duration?: string; + type?: string; } - export namespace BrowserIsolationPermissionsApplication { + export namespace BookmarkApplication { /** - * A JSON that links a reusable policy to an application. + * Configuration for provisioning to this application via SCIM. This is currently + * in closed beta. */ - export interface AccessAppPolicyLink { + export interface ScimConfig { /** - * The ID of the Access policy. + * The UID of the IdP to use as the source for SCIM resources to provision to this + * application. */ - id?: string; + idp_uid: string; /** - * The order of execution for this policy. Must be unique for each policy within an - * app. + * The base URI for the application's SCIM-compatible API. */ - precedence?: number; - } + remote_uri: string; - export interface UnionMember2 { /** - * The action Access will take if a user matches this policy. + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. */ - decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + authentication?: + | ScimConfig.AccessScimConfigAuthenticationHTTPBasic + | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken + | ScimConfig.AccessScimConfigAuthenticationOauth2; /** - * Rules evaluated with an OR logical operator. A user needs to meet only one of - * the Include rules. + * If false, propagates DELETE requests to the target application for SCIM + * resources. If true, sets 'active' to false on the SCIM resource. Note: Some + * targets do not support DELETE operations. */ - include: Array; + deactivate_on_delete?: boolean; /** - * The name of the Access policy. + * Whether SCIM provisioning is turned on for this application. */ - name: string; + enabled?: boolean; /** - * The ID of the Access policy. + * A list of mappings to apply to SCIM resources before provisioning them in this + * application. These can transform or filter the resources to be provisioned. */ - id?: string; + mappings?: Array; + } + export namespace ScimConfig { /** - * Administrators who can approve a temporary authentication request. + * Attributes for configuring HTTP Basic authentication scheme for SCIM + * provisioning to an application. */ - approval_groups?: Array; + export interface AccessScimConfigAuthenticationHTTPBasic { + /** + * Password used to authenticate with the remote SCIM service. + */ + password: string; - /** - * Requires the user to request access from an administrator at the start of each - * session. - */ - approval_required?: boolean; + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'httpbasic'; - /** - * Rules evaluated with a NOT logical operator. To match the policy, a user cannot - * meet any of the Exclude rules. - */ - exclude?: Array; + /** + * User name used to authenticate with the remote SCIM service. + */ + user: string; + } /** - * Require this application to be served in an isolated browser for users matching - * this policy. 'Client Web Isolation' must be on for the account in order to use - * this feature. + * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM + * provisioning to an application. */ - isolation_required?: boolean; + export interface AccessScimConfigAuthenticationOAuthBearerToken { + /** + * Token used to authenticate with the remote SCIM service. + */ + token: string; - /** - * The order of execution for this policy. Must be unique for each policy within an - * app. - */ - precedence?: number; + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauthbearertoken'; + } /** - * A custom message that will appear on the purpose justification screen. + * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning + * to an application. */ - purpose_justification_prompt?: string; + export interface AccessScimConfigAuthenticationOauth2 { + /** + * URL used to generate the auth code used during token generation. + */ + authorization_url: string; - /** - * Require users to enter a justification when they log in to the application. - */ - purpose_justification_required?: boolean; + /** + * Client ID used to authenticate when generating a token for authenticating with + * the remote SCIM service. + */ + client_id: string; - /** - * Rules evaluated with an AND logical operator. To match the policy, a user must - * meet all of the Require rules. - */ - require?: Array; + /** + * Secret used to authenticate when generating a token for authenticating with the + * remove SCIM service. + */ + client_secret: string; + + /** + * The authentication scheme to use when making SCIM requests to this application. + */ + scheme: 'oauth2'; + + /** + * URL used to generate the token used to authenticate with the remote SCIM + * service. + */ + token_url: string; + + /** + * The authorization scopes to request when generating the token used to + * authenticate with the remove SCIM service. + */ + scopes?: Array; + } /** - * The amount of time that tokens issued for the application will be valid. Must be - * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, - * m, h. + * Transformations and filters applied to resources before they are provisioned in + * the remote SCIM service. */ - session_duration?: string; - } - } - - export interface AccessBookmarkProps { - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; + export interface Mapping { + /** + * Which SCIM resource type this mapping applies to. + */ + schema: string; - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; + /** + * Whether or not this mapping is enabled. + */ + enabled?: boolean; - /** - * Body param: Displays the application in the App Launcher. - */ - app_launcher_visible?: boolean; + /** + * A + * [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) + * that matches resources that should be provisioned to this application. + */ + filter?: string; - /** - * Body param: The URL or domain of the bookmark. - */ - domain?: string; + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + operations?: Mapping.Operations; - /** - * Body param: The image URL for the logo shown in the App Launcher dashboard. - */ - logo_url?: string; + /** + * A [JSONata](https://jsonata.org/) expression that transforms the resource before + * provisioning it in the application. + */ + transform_jsonata?: string; + } - /** - * Body param: The name of the application. - */ - name?: string; + export namespace Mapping { + /** + * Whether or not this mapping applies to creates, updates, or deletes. + */ + export interface Operations { + /** + * Whether or not this mapping applies to create (POST) operations. + */ + create?: boolean; - /** - * Body param: The tags you want assigned to an application. Tags are used to - * filter applications in the App Launcher dashboard. - */ - tags?: Array; + /** + * Whether or not this mapping applies to DELETE operations. + */ + delete?: boolean; - /** - * Body param: The application type. - */ - type?: string; + /** + * Whether or not this mapping applies to update (PATCH/PUT) operations. + */ + update?: boolean; + } + } + } } } diff --git a/src/resources/zero-trust/access/applications/policies.ts b/src/resources/zero-trust/access/applications/policies.ts index acb5d286ba..4104b5ae16 100644 --- a/src/resources/zero-trust/access/applications/policies.ts +++ b/src/resources/zero-trust/access/applications/policies.ts @@ -353,7 +353,7 @@ export namespace Policy { export interface PolicyCreateResponse { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -427,7 +427,7 @@ export interface PolicyCreateResponse { export interface PolicyUpdateResponse { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -501,7 +501,7 @@ export interface PolicyUpdateResponse { export interface PolicyListResponse { /** - * The ID of the Access policy. + * UUID */ id?: string; @@ -582,7 +582,7 @@ export interface PolicyDeleteResponse { export interface PolicyGetResponse { /** - * The ID of the Access policy. + * UUID */ id?: string; diff --git a/tests/api-resources/zero-trust/access/applications/applications.test.ts b/tests/api-resources/zero-trust/access/applications/applications.test.ts index a2d07f9f72..a14a2fc5b9 100644 --- a/tests/api-resources/zero-trust/access/applications/applications.test.ts +++ b/tests/api-resources/zero-trust/access/applications/applications.test.ts @@ -64,12 +64,41 @@ describe('resource applications', () => { name: 'Admin Site', options_preflight_bypass: true, path_cookie_attribute: true, - policies: [ - { id: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', precedence: 0 }, - { id: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', precedence: 0 }, - { id: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', precedence: 0 }, - ], + policies: [{ precedence: 0 }, { precedence: 0 }, { precedence: 0 }], same_site_cookie_attribute: 'strict', + scim_config: { + authentication: { password: 'string', scheme: 'httpbasic', user: 'string' }, + deactivate_on_delete: true, + enabled: true, + idp_uid: 'string', + mappings: [ + { + enabled: true, + filter: 'title pr or userType eq "Intern"', + operations: { create: true, delete: true, update: true }, + schema: 'urn:ietf:params:scim:schemas:core:2.0:User', + transform_jsonata: + "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", + }, + { + enabled: true, + filter: 'title pr or userType eq "Intern"', + operations: { create: true, delete: true, update: true }, + schema: 'urn:ietf:params:scim:schemas:core:2.0:User', + transform_jsonata: + "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", + }, + { + enabled: true, + filter: 'title pr or userType eq "Intern"', + operations: { create: true, delete: true, update: true }, + schema: 'urn:ietf:params:scim:schemas:core:2.0:User', + transform_jsonata: + "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", + }, + ], + remote_uri: 'string', + }, self_hosted_domains: ['test.example.com/admin', 'test.anotherexample.com/staff'], service_auth_401_redirect: true, session_duration: '24h', @@ -133,12 +162,41 @@ describe('resource applications', () => { name: 'Admin Site', options_preflight_bypass: true, path_cookie_attribute: true, - policies: [ - { id: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', precedence: 0 }, - { id: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', precedence: 0 }, - { id: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', precedence: 0 }, - ], + policies: [{ precedence: 0 }, { precedence: 0 }, { precedence: 0 }], same_site_cookie_attribute: 'strict', + scim_config: { + authentication: { password: 'string', scheme: 'httpbasic', user: 'string' }, + deactivate_on_delete: true, + enabled: true, + idp_uid: 'string', + mappings: [ + { + enabled: true, + filter: 'title pr or userType eq "Intern"', + operations: { create: true, delete: true, update: true }, + schema: 'urn:ietf:params:scim:schemas:core:2.0:User', + transform_jsonata: + "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", + }, + { + enabled: true, + filter: 'title pr or userType eq "Intern"', + operations: { create: true, delete: true, update: true }, + schema: 'urn:ietf:params:scim:schemas:core:2.0:User', + transform_jsonata: + "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", + }, + { + enabled: true, + filter: 'title pr or userType eq "Intern"', + operations: { create: true, delete: true, update: true }, + schema: 'urn:ietf:params:scim:schemas:core:2.0:User', + transform_jsonata: + "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", + }, + ], + remote_uri: 'string', + }, self_hosted_domains: ['test.example.com/admin', 'test.anotherexample.com/staff'], service_auth_401_redirect: true, session_duration: '24h', From bdb59f33eae95431531562d1ea5651cffad025e6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 18:08:24 +0000 Subject: [PATCH 009/473] feat(api): OpenAPI spec update via Stainless API (#506) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 180c43d61b..46bc4446e5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1281 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-60b75a573109cad5aa0149c739c7e355f3e2571b3a71fced4c8848e44b8c334f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c29a8e5a4a9b932030192272e03404b274e9119c670d493d19150b93d01c2b51.yml From cbfe7afec4a7106ccb54274ec9f786ba2ecbd30e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 18:58:18 +0000 Subject: [PATCH 010/473] feat(api): update via SDK Studio (#507) --- .stats.yml | 2 +- api.md | 1 + src/resources/zero-trust/access/access.ts | 1 + .../access/applications/applications.ts | 95 +++++++++++-------- .../zero-trust/access/applications/index.ts | 1 + .../access/applications/policies.ts | 15 +-- src/resources/zero-trust/access/index.ts | 1 + 7 files changed, 66 insertions(+), 50 deletions(-) diff --git a/.stats.yml b/.stats.yml index 46bc4446e5..180c43d61b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1281 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c29a8e5a4a9b932030192272e03404b274e9119c670d493d19150b93d01c2b51.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-60b75a573109cad5aa0149c739c7e355f3e2571b3a71fced4c8848e44b8c334f.yml diff --git a/api.md b/api.md index 110e413df0..14088f7a76 100644 --- a/api.md +++ b/api.md @@ -4409,6 +4409,7 @@ Types: - Application - ApplicationType - CORSHeaders +- Decision - SaaSAppNameFormat - SaaSAppNameIDFormat - SaaSAppSource diff --git a/src/resources/zero-trust/access/access.ts b/src/resources/zero-trust/access/access.ts index 5fee574329..3a467d5cca 100644 --- a/src/resources/zero-trust/access/access.ts +++ b/src/resources/zero-trust/access/access.ts @@ -734,6 +734,7 @@ export namespace Access { export import Application = ApplicationsAPI.Application; export import ApplicationType = ApplicationsAPI.ApplicationType; export import CORSHeaders = ApplicationsAPI.CORSHeaders; + export import Decision = ApplicationsAPI.Decision; export import SaaSAppNameFormat = ApplicationsAPI.SaaSAppNameFormat; export import SaaSAppNameIDFormat = ApplicationsAPI.SaaSAppNameIDFormat; export import SaaSAppSource = ApplicationsAPI.SaaSAppSource; diff --git a/src/resources/zero-trust/access/applications/applications.ts b/src/resources/zero-trust/access/applications/applications.ts index 0e3c9ee4d6..6f5b531ca4 100644 --- a/src/resources/zero-trust/access/applications/applications.ts +++ b/src/resources/zero-trust/access/applications/applications.ts @@ -2805,6 +2805,16 @@ export interface CORSHeadersParam { max_age?: number; } +/** + * The action Access will take if a user matches this policy. + */ +export type Decision = 'allow' | 'deny' | 'non_identity' | 'bypass'; + +/** + * The action Access will take if a user matches this policy. + */ +export type DecisionParam = 'allow' | 'deny' | 'non_identity' | 'bypass'; + /** * A globally unique name for an identity or service provider. */ @@ -3236,7 +3246,7 @@ export namespace ApplicationCreateResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -3560,7 +3570,7 @@ export namespace ApplicationCreateResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -4075,7 +4085,7 @@ export namespace ApplicationCreateResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -4483,7 +4493,7 @@ export namespace ApplicationCreateResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -4797,7 +4807,7 @@ export namespace ApplicationCreateResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -5111,7 +5121,7 @@ export namespace ApplicationCreateResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -5425,7 +5435,7 @@ export namespace ApplicationCreateResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -6079,7 +6089,7 @@ export namespace ApplicationUpdateResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -6403,7 +6413,7 @@ export namespace ApplicationUpdateResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -6918,7 +6928,7 @@ export namespace ApplicationUpdateResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -7326,7 +7336,7 @@ export namespace ApplicationUpdateResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -7640,7 +7650,7 @@ export namespace ApplicationUpdateResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -7954,7 +7964,7 @@ export namespace ApplicationUpdateResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -8268,7 +8278,7 @@ export namespace ApplicationUpdateResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -8922,7 +8932,7 @@ export namespace ApplicationListResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -9246,7 +9256,7 @@ export namespace ApplicationListResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -9761,7 +9771,7 @@ export namespace ApplicationListResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -10169,7 +10179,7 @@ export namespace ApplicationListResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -10483,7 +10493,7 @@ export namespace ApplicationListResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -10797,7 +10807,7 @@ export namespace ApplicationListResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -11111,7 +11121,7 @@ export namespace ApplicationListResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -11772,7 +11782,7 @@ export namespace ApplicationGetResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -12096,7 +12106,7 @@ export namespace ApplicationGetResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -12611,7 +12621,7 @@ export namespace ApplicationGetResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -13019,7 +13029,7 @@ export namespace ApplicationGetResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -13333,7 +13343,7 @@ export namespace ApplicationGetResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -13647,7 +13657,7 @@ export namespace ApplicationGetResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -13961,7 +13971,7 @@ export namespace ApplicationGetResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -14623,7 +14633,7 @@ export namespace ApplicationCreateParams { /** * The action Access will take if a user matches this policy. */ - decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision: ApplicationsAPI.DecisionParam; /** * Rules evaluated with an OR logical operator. A user needs to meet only one of @@ -14966,7 +14976,7 @@ export namespace ApplicationCreateParams { /** * The action Access will take if a user matches this policy. */ - decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision: ApplicationsAPI.DecisionParam; /** * Rules evaluated with an OR logical operator. A user needs to meet only one of @@ -15498,7 +15508,7 @@ export namespace ApplicationCreateParams { /** * The action Access will take if a user matches this policy. */ - decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision: ApplicationsAPI.DecisionParam; /** * Rules evaluated with an OR logical operator. A user needs to meet only one of @@ -15927,7 +15937,7 @@ export namespace ApplicationCreateParams { /** * The action Access will take if a user matches this policy. */ - decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision: ApplicationsAPI.DecisionParam; /** * Rules evaluated with an OR logical operator. A user needs to meet only one of @@ -16245,7 +16255,7 @@ export namespace ApplicationCreateParams { /** * The action Access will take if a user matches this policy. */ - decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision: ApplicationsAPI.DecisionParam; /** * Rules evaluated with an OR logical operator. A user needs to meet only one of @@ -16563,7 +16573,7 @@ export namespace ApplicationCreateParams { /** * The action Access will take if a user matches this policy. */ - decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision: ApplicationsAPI.DecisionParam; /** * Rules evaluated with an OR logical operator. A user needs to meet only one of @@ -16881,7 +16891,7 @@ export namespace ApplicationCreateParams { /** * The action Access will take if a user matches this policy. */ - decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision: ApplicationsAPI.DecisionParam; /** * Rules evaluated with an OR logical operator. A user needs to meet only one of @@ -17554,7 +17564,7 @@ export namespace ApplicationUpdateParams { /** * The action Access will take if a user matches this policy. */ - decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision: ApplicationsAPI.DecisionParam; /** * Rules evaluated with an OR logical operator. A user needs to meet only one of @@ -17897,7 +17907,7 @@ export namespace ApplicationUpdateParams { /** * The action Access will take if a user matches this policy. */ - decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision: ApplicationsAPI.DecisionParam; /** * Rules evaluated with an OR logical operator. A user needs to meet only one of @@ -18429,7 +18439,7 @@ export namespace ApplicationUpdateParams { /** * The action Access will take if a user matches this policy. */ - decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision: ApplicationsAPI.DecisionParam; /** * Rules evaluated with an OR logical operator. A user needs to meet only one of @@ -18858,7 +18868,7 @@ export namespace ApplicationUpdateParams { /** * The action Access will take if a user matches this policy. */ - decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision: ApplicationsAPI.DecisionParam; /** * Rules evaluated with an OR logical operator. A user needs to meet only one of @@ -19176,7 +19186,7 @@ export namespace ApplicationUpdateParams { /** * The action Access will take if a user matches this policy. */ - decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision: ApplicationsAPI.DecisionParam; /** * Rules evaluated with an OR logical operator. A user needs to meet only one of @@ -19494,7 +19504,7 @@ export namespace ApplicationUpdateParams { /** * The action Access will take if a user matches this policy. */ - decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision: ApplicationsAPI.DecisionParam; /** * Rules evaluated with an OR logical operator. A user needs to meet only one of @@ -19812,7 +19822,7 @@ export namespace ApplicationUpdateParams { /** * The action Access will take if a user matches this policy. */ - decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision: ApplicationsAPI.DecisionParam; /** * Rules evaluated with an OR logical operator. A user needs to meet only one of @@ -20349,6 +20359,7 @@ export namespace Applications { export import Application = ApplicationsAPI.Application; export import ApplicationType = ApplicationsAPI.ApplicationType; export import CORSHeaders = ApplicationsAPI.CORSHeaders; + export import Decision = ApplicationsAPI.Decision; export import SaaSAppNameFormat = ApplicationsAPI.SaaSAppNameFormat; export import SaaSAppNameIDFormat = ApplicationsAPI.SaaSAppNameIDFormat; export import SaaSAppSource = ApplicationsAPI.SaaSAppSource; diff --git a/src/resources/zero-trust/access/applications/index.ts b/src/resources/zero-trust/access/applications/index.ts index c1db7c1675..ed76c33146 100644 --- a/src/resources/zero-trust/access/applications/index.ts +++ b/src/resources/zero-trust/access/applications/index.ts @@ -9,6 +9,7 @@ export { Application, ApplicationType, CORSHeaders, + Decision, SaaSAppNameFormat, SaaSAppNameIDFormat, SaaSAppSource, diff --git a/src/resources/zero-trust/access/applications/policies.ts b/src/resources/zero-trust/access/applications/policies.ts index 4104b5ae16..e29aa1ca3b 100644 --- a/src/resources/zero-trust/access/applications/policies.ts +++ b/src/resources/zero-trust/access/applications/policies.ts @@ -6,6 +6,7 @@ import { isRequestOptions } from 'cloudflare/core'; import { CloudflareError } from 'cloudflare/error'; import * as PoliciesAPI from 'cloudflare/resources/zero-trust/access/applications/policies'; import * as AccessAPI from 'cloudflare/resources/zero-trust/access/access'; +import * as ApplicationsAPI from 'cloudflare/resources/zero-trust/access/applications/applications'; import { SinglePage } from 'cloudflare/pagination'; export class Policies extends APIResource { @@ -280,7 +281,7 @@ export interface Policy { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -373,7 +374,7 @@ export interface PolicyCreateResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -447,7 +448,7 @@ export interface PolicyUpdateResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -521,7 +522,7 @@ export interface PolicyListResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -602,7 +603,7 @@ export interface PolicyGetResponse { /** * The action Access will take if a user matches this policy. */ - decision?: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision?: ApplicationsAPI.Decision; /** * Rules evaluated with a NOT logical operator. To match the policy, a user cannot @@ -658,7 +659,7 @@ export interface PolicyCreateParams { /** * Body param: The action Access will take if a user matches this policy. */ - decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision: ApplicationsAPI.DecisionParam; /** * Body param: Rules evaluated with an OR logical operator. A user needs to meet @@ -743,7 +744,7 @@ export interface PolicyUpdateParams { /** * Body param: The action Access will take if a user matches this policy. */ - decision: 'allow' | 'deny' | 'non_identity' | 'bypass'; + decision: ApplicationsAPI.DecisionParam; /** * Body param: Rules evaluated with an OR logical operator. A user needs to meet diff --git a/src/resources/zero-trust/access/index.ts b/src/resources/zero-trust/access/index.ts index 99830f97f3..a1740c63b5 100644 --- a/src/resources/zero-trust/access/index.ts +++ b/src/resources/zero-trust/access/index.ts @@ -33,6 +33,7 @@ export { Application, ApplicationType, CORSHeaders, + Decision, SaaSAppNameFormat, SaaSAppNameIDFormat, SaaSAppSource, From 1e7fc220ff1947f35a3dbe0a1c9295c8a48fe925 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 19:21:01 +0000 Subject: [PATCH 011/473] feat(api): OpenAPI spec update via Stainless API (#508) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 180c43d61b..46bc4446e5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1281 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-60b75a573109cad5aa0149c739c7e355f3e2571b3a71fced4c8848e44b8c334f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c29a8e5a4a9b932030192272e03404b274e9119c670d493d19150b93d01c2b51.yml From bcd2ca67f9420391b9792f027aa1ef4b7401a6b6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 19:23:39 +0000 Subject: [PATCH 012/473] feat(api): OpenAPI spec update via Stainless API (#509) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 46bc4446e5..d3f7578d0d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1281 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c29a8e5a4a9b932030192272e03404b274e9119c670d493d19150b93d01c2b51.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-09cd12c71c1bf4d47a96a1b013ea92dfdfbac4647336dd53fdda685632b3c43a.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 3cacc527cf..22753ec181 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; -import * as Shared from 'cloudflare/resources/shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 5127074632..9457ae859b 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; -import * as Shared from 'cloudflare/resources/shared'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 0e48eba756..f4a7e06f6f 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; -import * as Shared from 'cloudflare/resources/shared'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From b8b619b488f0421ba7e549d2c2cfd5400c409266 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 13:44:10 +0000 Subject: [PATCH 013/473] feat(api): OpenAPI spec update via Stainless API (#510) --- .stats.yml | 2 +- SECURITY.md | 27 +++++++++++++++++++ .../cloudforce-one/requests/message.ts | 22 ++++++++++----- .../cloudforce-one/requests/priority.ts | 22 ++++++++++----- .../cloudforce-one/requests/requests.ts | 22 ++++++++++----- 5 files changed, 73 insertions(+), 22 deletions(-) create mode 100644 SECURITY.md diff --git a/.stats.yml b/.stats.yml index d3f7578d0d..63842570e7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1281 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-09cd12c71c1bf4d47a96a1b013ea92dfdfbac4647336dd53fdda685632b3c43a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-233400c5ae165d478f6a8ca3dfc099961cbca90f3b175f1e14b631a7cb298f41.yml diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000000..8cd70e5e93 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,27 @@ +# Security Policy + +## Reporting Security Issues + +This SDK is generated by [Stainless Software Inc](http://stainlessapi.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken. + +To report a security issue, please contact the Stainless team at security@stainlessapi.com. + +## Responsible Disclosure + +We appreciate the efforts of security researchers and individuals who help us maintain the security of +SDKs we generate. If you believe you have found a security vulnerability, please adhere to responsible +disclosure practices by allowing us a reasonable amount of time to investigate and address the issue +before making any information public. + +## Reporting Non-SDK Related Security Issues + +If you encounter security issues that are not directly related to SDKs but pertain to the services +or products provided by Cloudflare please follow the respective company's security reporting guidelines. + +### Cloudflare Terms and Policies + +Please contact api@cloudflare.com for any questions or concerns regarding security of our services. + +--- + +Thank you for helping us keep the SDKs and systems they interact with secure. diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 22753ec181..3cacc527cf 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; +import * as Shared from 'cloudflare/resources/shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 9457ae859b..5127074632 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; +import * as Shared from 'cloudflare/resources/shared'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index f4a7e06f6f..0e48eba756 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; +import * as Shared from 'cloudflare/resources/shared'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 1a4d2775495aac3647e390b0589662c1cf32409b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 13:47:12 +0000 Subject: [PATCH 014/473] feat(api): OpenAPI spec update via Stainless API (#511) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 63842570e7..d3f7578d0d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1281 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-233400c5ae165d478f6a8ca3dfc099961cbca90f3b175f1e14b631a7cb298f41.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-09cd12c71c1bf4d47a96a1b013ea92dfdfbac4647336dd53fdda685632b3c43a.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 3cacc527cf..22753ec181 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; -import * as Shared from 'cloudflare/resources/shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 5127074632..9457ae859b 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; -import * as Shared from 'cloudflare/resources/shared'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 0e48eba756..f4a7e06f6f 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; -import * as Shared from 'cloudflare/resources/shared'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From c74817912485f5f257f9733cb792c1029053799f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 13:54:50 +0000 Subject: [PATCH 015/473] feat(api): OpenAPI spec update via Stainless API (#512) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index d3f7578d0d..63842570e7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1281 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-09cd12c71c1bf4d47a96a1b013ea92dfdfbac4647336dd53fdda685632b3c43a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-233400c5ae165d478f6a8ca3dfc099961cbca90f3b175f1e14b631a7cb298f41.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 22753ec181..3cacc527cf 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; +import * as Shared from 'cloudflare/resources/shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 9457ae859b..5127074632 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; +import * as Shared from 'cloudflare/resources/shared'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index f4a7e06f6f..0e48eba756 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; +import * as Shared from 'cloudflare/resources/shared'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 7873c01e8398de43039147e17969c637ef417f7e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 13:57:24 +0000 Subject: [PATCH 016/473] feat(api): OpenAPI spec update via Stainless API (#513) --- .stats.yml | 2 +- src/resources/ai-gateway/ai-gateway.ts | 62 +++++++------------ .../ai-gateway/ai-gateway.test.ts | 24 +++---- tests/api-resources/ai-gateway/logs.test.ts | 4 +- 4 files changed, 33 insertions(+), 59 deletions(-) diff --git a/.stats.yml b/.stats.yml index 63842570e7..df3052cd59 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1281 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-233400c5ae165d478f6a8ca3dfc099961cbca90f3b175f1e14b631a7cb298f41.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e9768930aab7041f58b5f317137699bbd040d5be0864adcee08df4a026b99300.yml diff --git a/src/resources/ai-gateway/ai-gateway.ts b/src/resources/ai-gateway/ai-gateway.ts index ab77108e13..1c159d6674 100644 --- a/src/resources/ai-gateway/ai-gateway.ts +++ b/src/resources/ai-gateway/ai-gateway.ts @@ -97,6 +97,9 @@ export interface AIGatewayCreateResponse { export namespace AIGatewayCreateResponse { export interface Task { + /** + * gateway slug + */ id: string; cache_invalidate_on_update: boolean; @@ -109,10 +112,6 @@ export namespace AIGatewayCreateResponse { modified_at: string; - name: string; - - slug: string; - rate_limiting_interval?: number; rate_limiting_limit?: number; @@ -122,6 +121,9 @@ export namespace AIGatewayCreateResponse { } export interface AIGatewayUpdateResponse { + /** + * gateway slug + */ id: string; cache_invalidate_on_update: boolean; @@ -134,10 +136,6 @@ export interface AIGatewayUpdateResponse { modified_at: string; - name: string; - - slug: string; - rate_limiting_interval?: number; rate_limiting_limit?: number; @@ -146,6 +144,9 @@ export interface AIGatewayUpdateResponse { } export interface AIGatewayListResponse { + /** + * gateway slug + */ id: string; cache_invalidate_on_update: boolean; @@ -158,10 +159,6 @@ export interface AIGatewayListResponse { modified_at: string; - name: string; - - slug: string; - rate_limiting_interval?: number; rate_limiting_limit?: number; @@ -170,6 +167,9 @@ export interface AIGatewayListResponse { } export interface AIGatewayDeleteResponse { + /** + * gateway slug + */ id: string; cache_invalidate_on_update: boolean; @@ -182,10 +182,6 @@ export interface AIGatewayDeleteResponse { modified_at: string; - name: string; - - slug: string; - rate_limiting_interval?: number; rate_limiting_limit?: number; @@ -194,6 +190,9 @@ export interface AIGatewayDeleteResponse { } export interface AIGatewayGetResponse { + /** + * gateway slug + */ id: string; cache_invalidate_on_update: boolean; @@ -206,10 +205,6 @@ export interface AIGatewayGetResponse { modified_at: string; - name: string; - - slug: string; - rate_limiting_interval?: number; rate_limiting_limit?: number; @@ -224,29 +219,24 @@ export interface AIGatewayCreateParams { account_id: string; /** - * Body param: - */ - cache_invalidate_on_update: boolean; - - /** - * Body param: + * Body param: gateway slug */ - cache_ttl: number; + id: string; /** * Body param: */ - collect_logs: boolean; + cache_invalidate_on_update: boolean; /** * Body param: */ - name: string; + cache_ttl: number; /** * Body param: */ - slug: string; + collect_logs: boolean; /** * Body param: @@ -285,16 +275,6 @@ export interface AIGatewayUpdateParams { */ collect_logs: boolean; - /** - * Body param: - */ - name: string; - - /** - * Body param: - */ - slug: string; - /** * Body param: */ @@ -318,7 +298,7 @@ export interface AIGatewayListParams extends V4PagePaginationArrayParams { account_id: string; /** - * Query param: + * Query param: gateway slug */ id?: string; diff --git a/tests/api-resources/ai-gateway/ai-gateway.test.ts b/tests/api-resources/ai-gateway/ai-gateway.test.ts index 524948e094..80304c3da7 100644 --- a/tests/api-resources/ai-gateway/ai-gateway.test.ts +++ b/tests/api-resources/ai-gateway/ai-gateway.test.ts @@ -13,11 +13,10 @@ describe('resource aiGateway', () => { test('create: only required params', async () => { const responsePromise = cloudflare.aiGateway.create({ account_id: '0d37909e38d3e99c29fa2cd343ac421a', + id: 'my-gateway', cache_invalidate_on_update: true, cache_ttl: 0, collect_logs: true, - name: 'string', - slug: 'string', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -31,11 +30,10 @@ describe('resource aiGateway', () => { test('create: required and optional params', async () => { const response = await cloudflare.aiGateway.create({ account_id: '0d37909e38d3e99c29fa2cd343ac421a', + id: 'my-gateway', cache_invalidate_on_update: true, cache_ttl: 0, collect_logs: true, - name: 'string', - slug: 'string', rate_limiting_interval: 0, rate_limiting_limit: 0, rate_limiting_technique: 'string', @@ -43,13 +41,11 @@ describe('resource aiGateway', () => { }); test('update: only required params', async () => { - const responsePromise = cloudflare.aiGateway.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + const responsePromise = cloudflare.aiGateway.update('my-gateway', { account_id: '0d37909e38d3e99c29fa2cd343ac421a', cache_invalidate_on_update: true, cache_ttl: 0, collect_logs: true, - name: 'string', - slug: 'string', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -61,13 +57,11 @@ describe('resource aiGateway', () => { }); test('update: required and optional params', async () => { - const response = await cloudflare.aiGateway.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + const response = await cloudflare.aiGateway.update('my-gateway', { account_id: '0d37909e38d3e99c29fa2cd343ac421a', cache_invalidate_on_update: true, cache_ttl: 0, collect_logs: true, - name: 'string', - slug: 'string', rate_limiting_interval: 0, rate_limiting_limit: 0, rate_limiting_technique: 'string', @@ -88,7 +82,7 @@ describe('resource aiGateway', () => { test('list: required and optional params', async () => { const response = await cloudflare.aiGateway.list({ account_id: '0d37909e38d3e99c29fa2cd343ac421a', - id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + id: 'my-gateway', order_by: 'string', page: 1, per_page: 5, @@ -96,7 +90,7 @@ describe('resource aiGateway', () => { }); test('delete: only required params', async () => { - const responsePromise = cloudflare.aiGateway.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + const responsePromise = cloudflare.aiGateway.delete('my-gateway', { account_id: '0d37909e38d3e99c29fa2cd343ac421a', }); const rawResponse = await responsePromise.asResponse(); @@ -109,13 +103,13 @@ describe('resource aiGateway', () => { }); test('delete: required and optional params', async () => { - const response = await cloudflare.aiGateway.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + const response = await cloudflare.aiGateway.delete('my-gateway', { account_id: '0d37909e38d3e99c29fa2cd343ac421a', }); }); test('get: only required params', async () => { - const responsePromise = cloudflare.aiGateway.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + const responsePromise = cloudflare.aiGateway.get('my-gateway', { account_id: '0d37909e38d3e99c29fa2cd343ac421a', }); const rawResponse = await responsePromise.asResponse(); @@ -128,7 +122,7 @@ describe('resource aiGateway', () => { }); test('get: required and optional params', async () => { - const response = await cloudflare.aiGateway.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + const response = await cloudflare.aiGateway.get('my-gateway', { account_id: '0d37909e38d3e99c29fa2cd343ac421a', }); }); diff --git a/tests/api-resources/ai-gateway/logs.test.ts b/tests/api-resources/ai-gateway/logs.test.ts index 8219a5f916..1729e9e4d1 100644 --- a/tests/api-resources/ai-gateway/logs.test.ts +++ b/tests/api-resources/ai-gateway/logs.test.ts @@ -11,7 +11,7 @@ const cloudflare = new Cloudflare({ describe('resource logs', () => { test('get: only required params', async () => { - const responsePromise = cloudflare.aiGateway.logs.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + const responsePromise = cloudflare.aiGateway.logs.get('my-gateway', { account_id: '0d37909e38d3e99c29fa2cd343ac421a', }); const rawResponse = await responsePromise.asResponse(); @@ -24,7 +24,7 @@ describe('resource logs', () => { }); test('get: required and optional params', async () => { - const response = await cloudflare.aiGateway.logs.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + const response = await cloudflare.aiGateway.logs.get('my-gateway', { account_id: '0d37909e38d3e99c29fa2cd343ac421a', cached: true, direction: 'asc', From 63bc1b18444e1bf49d0601d5fd1dd529bf12a6af Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 14:01:12 +0000 Subject: [PATCH 017/473] feat(api): OpenAPI spec update via Stainless API (#514) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index df3052cd59..7265ef528d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1281 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e9768930aab7041f58b5f317137699bbd040d5be0864adcee08df4a026b99300.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e148a50116381bddb9ef72b3a05b476394c7779eb327ea8abd69de4a04fa9e65.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 3cacc527cf..22753ec181 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; -import * as Shared from 'cloudflare/resources/shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 5127074632..9457ae859b 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; -import * as Shared from 'cloudflare/resources/shared'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 0e48eba756..f4a7e06f6f 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; -import * as Shared from 'cloudflare/resources/shared'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 5583f0ca24a34e80f53d50118dc683e45568c6ba Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 15:03:37 +0000 Subject: [PATCH 018/473] feat(api): OpenAPI spec update via Stainless API (#515) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7265ef528d..2bd6410820 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1281 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e148a50116381bddb9ef72b3a05b476394c7779eb327ea8abd69de4a04fa9e65.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d2235d448eaf798042945bdd265a7c0ec1a6d761475165e410bd3aae6fc2d61a.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 22753ec181..3cacc527cf 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; +import * as Shared from 'cloudflare/resources/shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 9457ae859b..5127074632 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; +import * as Shared from 'cloudflare/resources/shared'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index f4a7e06f6f..0e48eba756 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; +import * as Shared from 'cloudflare/resources/shared'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 9c5eb0968c03a3a053e36406dae0b4435674165d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 16:09:13 +0000 Subject: [PATCH 019/473] feat(api): OpenAPI spec update via Stainless API (#516) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 2bd6410820..df3052cd59 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1281 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d2235d448eaf798042945bdd265a7c0ec1a6d761475165e410bd3aae6fc2d61a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e9768930aab7041f58b5f317137699bbd040d5be0864adcee08df4a026b99300.yml From 7e2c644e2416a5c72328e1a3fda46a500f3e9441 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 16:14:26 +0000 Subject: [PATCH 020/473] feat(api): OpenAPI spec update via Stainless API (#517) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index df3052cd59..2bd6410820 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1281 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e9768930aab7041f58b5f317137699bbd040d5be0864adcee08df4a026b99300.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d2235d448eaf798042945bdd265a7c0ec1a6d761475165e410bd3aae6fc2d61a.yml From 616345a2fb1b9cd769e88a2bef01c18589682790 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 17:48:18 +0000 Subject: [PATCH 021/473] feat(api): OpenAPI spec update via Stainless API (#518) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 2bd6410820..df3052cd59 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1281 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d2235d448eaf798042945bdd265a7c0ec1a6d761475165e410bd3aae6fc2d61a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e9768930aab7041f58b5f317137699bbd040d5be0864adcee08df4a026b99300.yml From 86e92560de428faad57f9750a535cc283c5e2a0b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 18:14:30 +0000 Subject: [PATCH 022/473] feat(api): OpenAPI spec update via Stainless API (#519) --- .stats.yml | 2 +- src/resources/zero-trust/access/service-tokens.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index df3052cd59..cd62ae7132 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1281 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e9768930aab7041f58b5f317137699bbd040d5be0864adcee08df4a026b99300.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-839600a13efe864362aeb0940c721ebf4bbace7a23853dc24da23e029dc06116.yml diff --git a/src/resources/zero-trust/access/service-tokens.ts b/src/resources/zero-trust/access/service-tokens.ts index fdf9fb5233..c53051f5d2 100644 --- a/src/resources/zero-trust/access/service-tokens.ts +++ b/src/resources/zero-trust/access/service-tokens.ts @@ -191,7 +191,7 @@ export interface ServiceToken { /** * The ID of the service token. */ - id?: unknown; + id?: string; /** * The Client ID for the service token. Access will check for this value in the From bde582f94c6cee3b42fadd3f1c2ab00e397c0037 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 23:29:49 +0000 Subject: [PATCH 023/473] feat(api): OpenAPI spec update via Stainless API (#520) --- .stats.yml | 2 +- src/error.ts | 2 +- src/index.ts | 4 +- src/resources/accounts/accounts.ts | 12 +- src/resources/accounts/members.ts | 10 +- src/resources/accounts/roles.ts | 10 +- src/resources/acm/acm.ts | 4 +- src/resources/acm/total-tls.ts | 6 +- .../addressing/address-maps/accounts.ts | 6 +- .../addressing/address-maps/address-maps.ts | 14 +-- src/resources/addressing/address-maps/ips.ts | 6 +- .../addressing/address-maps/zones.ts | 6 +- src/resources/addressing/addressing.ts | 10 +- .../addressing/loa-documents/downloads.ts | 6 +- .../addressing/loa-documents/loa-documents.ts | 10 +- src/resources/addressing/prefixes/bgp/bgp.ts | 8 +- .../addressing/prefixes/bgp/bindings.ts | 10 +- .../addressing/prefixes/bgp/prefixes.ts | 8 +- .../addressing/prefixes/bgp/statuses.ts | 6 +- .../addressing/prefixes/delegations.ts | 8 +- src/resources/addressing/prefixes/prefixes.ts | 12 +- src/resources/addressing/services.ts | 8 +- src/resources/ai-gateway/ai-gateway.ts | 8 +- src/resources/ai-gateway/logs.ts | 6 +- src/resources/alerting/alerting.ts | 10 +- src/resources/alerting/available-alerts.ts | 6 +- .../alerting/destinations/destinations.ts | 8 +- .../alerting/destinations/eligible.ts | 6 +- .../alerting/destinations/pagerduty.ts | 6 +- .../alerting/destinations/webhooks.ts | 8 +- src/resources/alerting/history.ts | 8 +- src/resources/alerting/policies.ts | 8 +- src/resources/argo/argo.ts | 6 +- src/resources/argo/smart-routing.ts | 6 +- src/resources/argo/tiered-caching.ts | 6 +- src/resources/audit-logs.ts | 10 +- src/resources/billing/billing.ts | 4 +- src/resources/billing/profiles.ts | 6 +- src/resources/bot-management.ts | 4 +- src/resources/brand-protection.ts | 4 +- src/resources/cache/cache-reserve.ts | 6 +- src/resources/cache/cache.ts | 12 +- src/resources/cache/regional-tiered-cache.ts | 6 +- src/resources/cache/smart-tiered-cache.ts | 6 +- src/resources/cache/variants.ts | 6 +- src/resources/calls/calls.ts | 8 +- src/resources/calls/turn/keys.ts | 8 +- src/resources/calls/turn/turn.ts | 4 +- .../certificate-authorities.ts | 4 +- .../hostname-associations.ts | 6 +- src/resources/challenges/challenges.ts | 4 +- src/resources/challenges/widgets.ts | 8 +- src/resources/client-certificates.ts | 8 +- .../cloudforce-one/cloudforce-one.ts | 4 +- .../cloudforce-one/requests/message.ts | 28 ++--- .../cloudforce-one/requests/priority.ts | 30 ++--- .../cloudforce-one/requests/requests.ts | 34 +++--- .../custom-certificates.ts | 12 +- .../custom-certificates/prioritize.ts | 8 +- .../custom-hostnames/custom-hostnames.ts | 12 +- .../custom-hostnames/fallback-origin.ts | 6 +- src/resources/custom-nameservers.ts | 4 +- src/resources/d1/d1.ts | 4 +- src/resources/d1/database.ts | 10 +- .../dcv-delegation/dcv-delegation.ts | 4 +- src/resources/dcv-delegation/uuid.ts | 6 +- src/resources/diagnostics/diagnostics.ts | 4 +- src/resources/diagnostics/traceroutes.ts | 6 +- src/resources/dns/analytics/analytics.ts | 4 +- .../dns/analytics/reports/bytimes.ts | 10 +- .../dns/analytics/reports/reports.ts | 8 +- src/resources/dns/dns.ts | 10 +- .../dns/firewall/analytics/analytics.ts | 6 +- .../dns/firewall/analytics/reports/bytimes.ts | 10 +- .../dns/firewall/analytics/reports/reports.ts | 10 +- src/resources/dns/firewall/firewall.ts | 10 +- src/resources/dns/records.ts | 12 +- src/resources/dnssec.ts | 4 +- .../durable-objects/durable-objects.ts | 4 +- .../durable-objects/namespaces/namespaces.ts | 10 +- .../durable-objects/namespaces/objects.ts | 8 +- src/resources/email-routing/addresses.ts | 10 +- src/resources/email-routing/dns.ts | 6 +- src/resources/email-routing/email-routing.ts | 10 +- .../email-routing/rules/catch-alls.ts | 6 +- src/resources/email-routing/rules/rules.ts | 12 +- .../event-notifications.ts | 4 +- .../r2/configuration/configuration.ts | 8 +- .../r2/configuration/queues.ts | 6 +- src/resources/event-notifications/r2/r2.ts | 4 +- src/resources/filters.ts | 8 +- src/resources/firewall/access-rules.ts | 12 +- src/resources/firewall/firewall.ts | 12 +- src/resources/firewall/lockdowns.ts | 10 +- src/resources/firewall/rules.ts | 14 +-- src/resources/firewall/ua-rules.ts | 10 +- src/resources/firewall/waf/overrides.ts | 10 +- src/resources/firewall/waf/packages/groups.ts | 8 +- .../firewall/waf/packages/packages.ts | 16 +-- src/resources/firewall/waf/packages/rules.ts | 8 +- src/resources/firewall/waf/waf.ts | 6 +- src/resources/healthchecks/healthchecks.ts | 8 +- src/resources/healthchecks/previews.ts | 8 +- src/resources/hostnames/hostnames.ts | 4 +- src/resources/hostnames/settings/settings.ts | 4 +- src/resources/hostnames/settings/tls.ts | 6 +- src/resources/hyperdrive/configs.ts | 10 +- src/resources/hyperdrive/hyperdrive.ts | 6 +- src/resources/images/images.ts | 6 +- src/resources/images/v1/blobs.ts | 8 +- src/resources/images/v1/keys.ts | 6 +- src/resources/images/v1/stats.ts | 6 +- src/resources/images/v1/v1.ts | 20 ++-- src/resources/images/v1/variants.ts | 6 +- src/resources/images/v2/direct-uploads.ts | 8 +- src/resources/images/v2/v2.ts | 10 +- src/resources/intel/asn/asn.ts | 10 +- src/resources/intel/asn/subnets.ts | 8 +- .../attack-surface-report.ts | 6 +- .../attack-surface-report/issue-types.ts | 6 +- .../intel/attack-surface-report/issues.ts | 10 +- src/resources/intel/dns.ts | 10 +- src/resources/intel/domain-history.ts | 6 +- src/resources/intel/domains/bulks.ts | 6 +- src/resources/intel/domains/domains.ts | 8 +- .../intel/indicator-feeds/indicator-feeds.ts | 12 +- .../intel/indicator-feeds/permissions.ts | 6 +- .../intel/indicator-feeds/snapshots.ts | 8 +- src/resources/intel/intel.ts | 24 ++-- src/resources/intel/ip-lists.ts | 6 +- src/resources/intel/ips.ts | 6 +- src/resources/intel/miscategorizations.ts | 6 +- src/resources/intel/sinkholes.ts | 8 +- src/resources/intel/whois.ts | 6 +- src/resources/ips.ts | 6 +- src/resources/keyless-certificates.ts | 8 +- src/resources/kv/kv.ts | 4 +- src/resources/kv/namespaces/bulk.ts | 6 +- src/resources/kv/namespaces/keys.ts | 8 +- src/resources/kv/namespaces/metadata.ts | 6 +- src/resources/kv/namespaces/namespaces.ts | 16 +-- src/resources/kv/namespaces/values.ts | 8 +- .../load-balancers/load-balancers.ts | 18 +-- .../load-balancers/monitors/monitors.ts | 12 +- .../load-balancers/monitors/previews.ts | 6 +- .../load-balancers/monitors/references.ts | 6 +- src/resources/load-balancers/pools/health.ts | 6 +- src/resources/load-balancers/pools/pools.ts | 14 +-- .../load-balancers/pools/references.ts | 6 +- src/resources/load-balancers/previews.ts | 6 +- src/resources/load-balancers/regions.ts | 6 +- src/resources/load-balancers/searches.ts | 6 +- src/resources/logpush/datasets/datasets.ts | 6 +- src/resources/logpush/datasets/fields.ts | 10 +- src/resources/logpush/datasets/jobs.ts | 12 +- src/resources/logpush/edge.ts | 6 +- src/resources/logpush/jobs.ts | 12 +- src/resources/logpush/logpush.ts | 12 +- src/resources/logpush/ownership.ts | 8 +- src/resources/logpush/validate.ts | 8 +- src/resources/logs/control/cmb/cmb.ts | 4 +- src/resources/logs/control/cmb/config.ts | 6 +- src/resources/logs/control/control.ts | 6 +- src/resources/logs/control/retention/flag.ts | 6 +- .../logs/control/retention/retention.ts | 4 +- src/resources/logs/logs.ts | 8 +- src/resources/logs/rayid.ts | 8 +- src/resources/logs/received/fields.ts | 6 +- src/resources/logs/received/received.ts | 8 +- .../configs/configs.ts | 8 +- .../magic-network-monitoring/configs/full.ts | 8 +- .../magic-network-monitoring.ts | 6 +- .../rules/advertisements.ts | 6 +- .../magic-network-monitoring/rules/rules.ts | 10 +- .../magic-transit/cf-interconnects.ts | 8 +- src/resources/magic-transit/gre-tunnels.ts | 8 +- src/resources/magic-transit/ipsec-tunnels.ts | 8 +- src/resources/magic-transit/magic-transit.ts | 12 +- src/resources/magic-transit/routes.ts | 6 +- src/resources/magic-transit/sites/acls.ts | 8 +- src/resources/magic-transit/sites/lans.ts | 8 +- src/resources/magic-transit/sites/sites.ts | 14 +-- src/resources/magic-transit/sites/wans.ts | 8 +- src/resources/managed-headers.ts | 4 +- src/resources/memberships.ts | 12 +- .../mtls-certificates/associations.ts | 6 +- .../mtls-certificates/mtls-certificates.ts | 8 +- src/resources/origin-ca-certificates.ts | 12 +- .../origin-post-quantum-encryption.ts | 4 +- .../hostnames/certificates.ts | 10 +- .../hostnames/hostnames.ts | 10 +- .../origin-tls-client-auth.ts | 10 +- .../origin-tls-client-auth/settings.ts | 6 +- src/resources/page-shield/connections.ts | 8 +- src/resources/page-shield/page-shield.ts | 10 +- src/resources/page-shield/policies.ts | 8 +- src/resources/page-shield/scripts.ts | 8 +- src/resources/pagerules/pagerules.ts | 6 +- src/resources/pagerules/settings.ts | 6 +- src/resources/pages/pages.ts | 4 +- .../pages/projects/deployments/deployments.ts | 14 +-- .../projects/deployments/history/history.ts | 4 +- .../projects/deployments/history/logs.ts | 6 +- src/resources/pages/projects/domains.ts | 8 +- src/resources/pages/projects/projects.ts | 12 +- src/resources/pcaps/download.ts | 8 +- src/resources/pcaps/ownership.ts | 6 +- src/resources/pcaps/pcaps.ts | 12 +- src/resources/plans.ts | 6 +- src/resources/queues/consumers.ts | 6 +- src/resources/queues/messages.ts | 6 +- src/resources/queues/queues.ts | 10 +- src/resources/r2/buckets.ts | 8 +- src/resources/r2/r2.ts | 6 +- src/resources/r2/sippy.ts | 6 +- .../radar/annotations/annotations.ts | 4 +- src/resources/radar/annotations/outages.ts | 8 +- src/resources/radar/as112/as112.ts | 14 +-- src/resources/radar/as112/summary.ts | 8 +- .../radar/as112/timeseries-groups.ts | 8 +- src/resources/radar/as112/top.ts | 8 +- src/resources/radar/attacks/attacks.ts | 6 +- src/resources/radar/attacks/layer3/layer3.ts | 14 +-- src/resources/radar/attacks/layer3/summary.ts | 8 +- .../radar/attacks/layer3/timeseries-groups.ts | 8 +- .../radar/attacks/layer3/top/locations.ts | 8 +- src/resources/radar/attacks/layer3/top/top.ts | 12 +- src/resources/radar/attacks/layer7/layer7.ts | 14 +-- src/resources/radar/attacks/layer7/summary.ts | 8 +- .../radar/attacks/layer7/timeseries-groups.ts | 8 +- .../radar/attacks/layer7/top/ases.ts | 8 +- .../radar/attacks/layer7/top/locations.ts | 8 +- src/resources/radar/attacks/layer7/top/top.ts | 14 +-- src/resources/radar/bgp/bgp.ts | 16 +-- src/resources/radar/bgp/hijacks/events.ts | 10 +- src/resources/radar/bgp/hijacks/hijacks.ts | 4 +- src/resources/radar/bgp/leaks/events.ts | 10 +- src/resources/radar/bgp/leaks/leaks.ts | 4 +- src/resources/radar/bgp/routes.ts | 8 +- src/resources/radar/bgp/top/ases.ts | 8 +- src/resources/radar/bgp/top/top.ts | 10 +- src/resources/radar/connection-tampering.ts | 8 +- src/resources/radar/datasets.ts | 8 +- src/resources/radar/dns/dns.ts | 4 +- src/resources/radar/dns/top.ts | 6 +- src/resources/radar/email/email.ts | 8 +- src/resources/radar/email/routing/routing.ts | 6 +- src/resources/radar/email/routing/summary.ts | 10 +- .../radar/email/routing/timeseries-groups.ts | 10 +- .../radar/email/security/security.ts | 8 +- src/resources/radar/email/security/summary.ts | 10 +- .../radar/email/security/timeseries-groups.ts | 10 +- .../email/security/top/tlds/malicious.ts | 10 +- .../radar/email/security/top/tlds/spam.ts | 10 +- .../radar/email/security/top/tlds/spoof.ts | 10 +- .../radar/email/security/top/tlds/tlds.ts | 16 +-- src/resources/radar/email/security/top/top.ts | 4 +- src/resources/radar/entities/asns.ts | 8 +- src/resources/radar/entities/entities.ts | 10 +- src/resources/radar/entities/locations.ts | 8 +- src/resources/radar/http/ases/ases.ts | 24 ++-- src/resources/radar/http/ases/bot-class.ts | 8 +- .../radar/http/ases/browser-family.ts | 8 +- src/resources/radar/http/ases/device-type.ts | 8 +- src/resources/radar/http/ases/http-method.ts | 8 +- .../radar/http/ases/http-protocol.ts | 8 +- src/resources/radar/http/ases/ip-version.ts | 8 +- src/resources/radar/http/ases/os.ts | 8 +- src/resources/radar/http/ases/tls-version.ts | 8 +- src/resources/radar/http/http.ts | 12 +- .../radar/http/locations/bot-class.ts | 8 +- .../radar/http/locations/browser-family.ts | 8 +- .../radar/http/locations/device-type.ts | 8 +- .../radar/http/locations/http-method.ts | 8 +- .../radar/http/locations/http-protocol.ts | 8 +- .../radar/http/locations/ip-version.ts | 8 +- .../radar/http/locations/locations.ts | 24 ++-- src/resources/radar/http/locations/os.ts | 8 +- .../radar/http/locations/tls-version.ts | 8 +- src/resources/radar/http/summary.ts | 8 +- src/resources/radar/http/timeseries-groups.ts | 8 +- src/resources/radar/http/top.ts | 8 +- src/resources/radar/netflows/netflows.ts | 10 +- src/resources/radar/netflows/top.ts | 8 +- src/resources/radar/quality/iqi.ts | 6 +- src/resources/radar/quality/quality.ts | 6 +- src/resources/radar/quality/speed/speed.ts | 10 +- src/resources/radar/quality/speed/top.ts | 8 +- src/resources/radar/radar.ts | 34 +++--- src/resources/radar/ranking/domain.ts | 8 +- src/resources/radar/ranking/ranking.ts | 10 +- src/resources/radar/search.ts | 6 +- .../radar/traffic-anomalies/locations.ts | 8 +- .../traffic-anomalies/traffic-anomalies.ts | 10 +- src/resources/radar/verified-bots/top.ts | 8 +- .../radar/verified-bots/verified-bots.ts | 4 +- src/resources/rate-limits.ts | 10 +- src/resources/rate-plans.ts | 4 +- src/resources/registrar/domains.ts | 8 +- src/resources/registrar/registrar.ts | 4 +- .../request-tracers/request-tracers.ts | 4 +- src/resources/request-tracers/traces.ts | 6 +- src/resources/rules/lists/bulk-operations.ts | 6 +- src/resources/rules/lists/items.ts | 10 +- src/resources/rules/lists/lists.ts | 12 +- src/resources/rules/rules.ts | 4 +- src/resources/rulesets/phases/phases.ts | 16 +-- src/resources/rulesets/phases/versions.ts | 16 +-- src/resources/rulesets/rules.ts | 12 +- src/resources/rulesets/rulesets.ts | 16 +-- src/resources/rulesets/versions/by-tag.ts | 10 +- src/resources/rulesets/versions/versions.ts | 18 +-- src/resources/rum/rules.ts | 6 +- src/resources/rum/rum.ts | 6 +- src/resources/rum/site-info.ts | 10 +- src/resources/secondary-dns/acls.ts | 8 +- src/resources/secondary-dns/force-axfr.ts | 6 +- src/resources/secondary-dns/incoming.ts | 6 +- .../secondary-dns/outgoing/outgoing.ts | 8 +- .../secondary-dns/outgoing/status.ts | 8 +- src/resources/secondary-dns/peers.ts | 8 +- src/resources/secondary-dns/secondary-dns.ts | 14 +-- src/resources/secondary-dns/tsigs.ts | 8 +- src/resources/shared.ts | 4 +- src/resources/snippets/content.ts | 8 +- src/resources/snippets/rules.ts | 8 +- src/resources/snippets/snippets.ts | 14 +-- .../analytics/aggregates/aggregates.ts | 4 +- .../spectrum/analytics/aggregates/currents.ts | 8 +- src/resources/spectrum/analytics/analytics.ts | 6 +- .../spectrum/analytics/events/bytimes.ts | 10 +- .../spectrum/analytics/events/events.ts | 8 +- .../spectrum/analytics/events/summaries.ts | 10 +- src/resources/spectrum/apps.ts | 12 +- src/resources/spectrum/spectrum.ts | 6 +- src/resources/speed/availabilities.ts | 8 +- src/resources/speed/pages/pages.ts | 12 +- src/resources/speed/pages/tests.ts | 10 +- src/resources/speed/schedule.ts | 8 +- src/resources/speed/speed.ts | 8 +- src/resources/ssl/analyze.ts | 8 +- .../certificate-packs/certificate-packs.ts | 12 +- src/resources/ssl/certificate-packs/order.ts | 8 +- src/resources/ssl/certificate-packs/quota.ts | 6 +- src/resources/ssl/recommendations.ts | 6 +- src/resources/ssl/ssl.ts | 12 +- src/resources/ssl/universal/settings.ts | 6 +- src/resources/ssl/universal/universal.ts | 4 +- src/resources/ssl/verification.ts | 8 +- src/resources/storage/analytics.ts | 6 +- src/resources/storage/storage.ts | 4 +- src/resources/stream/audio-tracks.ts | 6 +- src/resources/stream/captions/captions.ts | 8 +- .../stream/captions/language/language.ts | 12 +- src/resources/stream/captions/language/vtt.ts | 6 +- src/resources/stream/clip.ts | 8 +- src/resources/stream/copy.ts | 8 +- src/resources/stream/direct-upload.ts | 10 +- src/resources/stream/downloads.ts | 6 +- src/resources/stream/embed.ts | 6 +- src/resources/stream/keys.ts | 6 +- .../stream/live-inputs/live-inputs.ts | 8 +- src/resources/stream/live-inputs/outputs.ts | 8 +- src/resources/stream/stream.ts | 32 +++--- src/resources/stream/token.ts | 6 +- src/resources/stream/videos.ts | 6 +- src/resources/stream/watermarks.ts | 10 +- src/resources/stream/webhooks.ts | 6 +- src/resources/subscriptions.ts | 8 +- src/resources/url-normalization.ts | 4 +- src/resources/url-scanner/scans.ts | 12 +- src/resources/url-scanner/url-scanner.ts | 8 +- src/resources/user/audit-logs.ts | 14 +-- src/resources/user/billing/billing.ts | 6 +- src/resources/user/billing/history.ts | 10 +- src/resources/user/billing/profile.ts | 6 +- src/resources/user/invites.ts | 10 +- src/resources/user/organizations.ts | 14 +-- src/resources/user/subscriptions.ts | 8 +- .../user/tokens/permission-groups.ts | 8 +- src/resources/user/tokens/tokens.ts | 14 +-- src/resources/user/tokens/value.ts | 6 +- src/resources/user/user.ts | 16 +-- src/resources/vectorize/indexes.ts | 8 +- src/resources/vectorize/vectorize.ts | 4 +- src/resources/waiting-rooms/events/details.ts | 6 +- src/resources/waiting-rooms/events/events.ts | 10 +- src/resources/waiting-rooms/page.ts | 6 +- src/resources/waiting-rooms/rules.ts | 8 +- src/resources/waiting-rooms/settings.ts | 6 +- src/resources/waiting-rooms/statuses.ts | 6 +- src/resources/waiting-rooms/waiting-rooms.ts | 16 +-- src/resources/warp-connector.ts | 8 +- src/resources/web3/hostnames/hostnames.ts | 10 +- .../content-lists/content-lists.ts | 8 +- .../content-lists/entries.ts | 6 +- .../ipfs-universal-paths.ts | 4 +- src/resources/web3/web3.ts | 4 +- .../dispatch/dispatch.ts | 4 +- .../dispatch/namespaces/namespaces.ts | 10 +- .../dispatch/namespaces/scripts/bindings.ts | 8 +- .../dispatch/namespaces/scripts/content.ts | 14 +-- .../dispatch/namespaces/scripts/scripts.ts | 24 ++-- .../dispatch/namespaces/scripts/secrets.ts | 8 +- .../dispatch/namespaces/scripts/settings.ts | 12 +- .../dispatch/namespaces/scripts/tags.ts | 8 +- .../workers-for-platforms.ts | 4 +- src/resources/workers/account-settings.ts | 6 +- src/resources/workers/ai.ts | 8 +- src/resources/workers/domains.ts | 8 +- src/resources/workers/scripts/content.ts | 14 +-- src/resources/workers/scripts/deployments.ts | 6 +- src/resources/workers/scripts/schedules.ts | 6 +- src/resources/workers/scripts/scripts.ts | 26 ++--- src/resources/workers/scripts/settings.ts | 10 +- src/resources/workers/scripts/tail.ts | 8 +- src/resources/workers/scripts/versions.ts | 8 +- src/resources/workers/subdomains.ts | 6 +- src/resources/workers/workers.ts | 12 +- src/resources/zero-trust/access/access.ts | 24 ++-- .../access/applications/applications.ts | 20 ++-- .../zero-trust/access/applications/cas.ts | 12 +- .../access/applications/policies.ts | 16 +-- .../access/applications/user-policy-checks.ts | 12 +- src/resources/zero-trust/access/bookmarks.ts | 8 +- .../access/certificates/certificates.ts | 14 +-- .../access/certificates/settings.ts | 10 +- .../zero-trust/access/custom-pages.ts | 8 +- src/resources/zero-trust/access/groups.ts | 14 +-- src/resources/zero-trust/access/keys.ts | 6 +- .../zero-trust/access/logs/access-requests.ts | 6 +- src/resources/zero-trust/access/logs/logs.ts | 4 +- .../zero-trust/access/service-tokens.ts | 12 +- src/resources/zero-trust/access/tags.ts | 8 +- .../access/users/active-sessions.ts | 10 +- .../zero-trust/access/users/failed-logins.ts | 8 +- .../access/users/last-seen-identity.ts | 8 +- .../zero-trust/access/users/users.ts | 14 +-- .../zero-trust/connectivity-settings.ts | 6 +- src/resources/zero-trust/devices/devices.ts | 24 ++-- src/resources/zero-trust/devices/dex-tests.ts | 8 +- src/resources/zero-trust/devices/networks.ts | 8 +- .../zero-trust/devices/override-codes.ts | 6 +- .../devices/policies/default-policy.ts | 6 +- .../zero-trust/devices/policies/excludes.ts | 8 +- .../devices/policies/fallback-domains.ts | 8 +- .../zero-trust/devices/policies/includes.ts | 8 +- .../zero-trust/devices/policies/policies.ts | 16 +-- .../devices/posture/integrations.ts | 8 +- .../zero-trust/devices/posture/posture.ts | 10 +- src/resources/zero-trust/devices/revoke.ts | 6 +- src/resources/zero-trust/devices/settings.ts | 6 +- src/resources/zero-trust/devices/unrevoke.ts | 6 +- src/resources/zero-trust/dex/colos.ts | 8 +- src/resources/zero-trust/dex/dex.ts | 16 +-- .../zero-trust/dex/fleet-status/devices.ts | 8 +- .../dex/fleet-status/fleet-status.ts | 8 +- .../zero-trust/dex/http-tests/http-tests.ts | 10 +- .../zero-trust/dex/http-tests/percentiles.ts | 8 +- src/resources/zero-trust/dex/tests/tests.ts | 14 +-- .../zero-trust/dex/tests/unique-devices.ts | 6 +- .../traceroute-test-results/network-path.ts | 6 +- .../traceroute-test-results.ts | 4 +- .../zero-trust/dex/traceroute-tests.ts | 10 +- .../zero-trust/dlp/datasets/datasets.ts | 10 +- .../zero-trust/dlp/datasets/upload.ts | 8 +- src/resources/zero-trust/dlp/dlp.ts | 10 +- src/resources/zero-trust/dlp/patterns.ts | 8 +- src/resources/zero-trust/dlp/payload-logs.ts | 6 +- .../zero-trust/dlp/profiles/custom.ts | 8 +- .../zero-trust/dlp/profiles/predefined.ts | 8 +- .../zero-trust/dlp/profiles/profiles.ts | 12 +- src/resources/zero-trust/gateway/app-types.ts | 8 +- .../zero-trust/gateway/audit-ssh-settings.ts | 6 +- .../zero-trust/gateway/categories.ts | 8 +- .../zero-trust/gateway/configurations.ts | 6 +- src/resources/zero-trust/gateway/gateway.ts | 24 ++-- .../zero-trust/gateway/lists/items.ts | 10 +- .../zero-trust/gateway/lists/lists.ts | 10 +- src/resources/zero-trust/gateway/locations.ts | 8 +- src/resources/zero-trust/gateway/logging.ts | 6 +- .../zero-trust/gateway/proxy-endpoints.ts | 8 +- src/resources/zero-trust/gateway/rules.ts | 8 +- .../zero-trust/identity-providers.ts | 12 +- src/resources/zero-trust/networks/networks.ts | 6 +- .../zero-trust/networks/routes/ips.ts | 8 +- .../zero-trust/networks/routes/networks.ts | 8 +- .../zero-trust/networks/routes/routes.ts | 12 +- .../zero-trust/networks/virtual-networks.ts | 8 +- src/resources/zero-trust/organizations.ts | 10 +- .../zero-trust/risk-scoring/behaviours.ts | 6 +- .../zero-trust/risk-scoring/risk-scoring.ts | 12 +- .../zero-trust/risk-scoring/summary.ts | 8 +- src/resources/zero-trust/seats.ts | 6 +- .../zero-trust/tunnels/configurations.ts | 6 +- .../zero-trust/tunnels/connections.ts | 6 +- .../zero-trust/tunnels/connectors.ts | 8 +- .../zero-trust/tunnels/management.ts | 6 +- src/resources/zero-trust/tunnels/token.ts | 6 +- src/resources/zero-trust/tunnels/tunnels.ts | 20 ++-- src/resources/zero-trust/zero-trust.ts | 26 ++--- src/resources/zones/activation-check.ts | 6 +- src/resources/zones/custom-nameservers.ts | 6 +- src/resources/zones/dns-settings.ts | 6 +- src/resources/zones/holds.ts | 6 +- src/resources/zones/settings/advanced-ddos.ts | 6 +- src/resources/zones/settings/always-online.ts | 6 +- .../zones/settings/always-use-https.ts | 6 +- .../settings/automatic-https-rewrites.ts | 6 +- .../automatic-platform-optimization.ts | 6 +- src/resources/zones/settings/brotli.ts | 6 +- .../zones/settings/browser-cache-ttl.ts | 6 +- src/resources/zones/settings/browser-check.ts | 6 +- src/resources/zones/settings/cache-level.ts | 6 +- src/resources/zones/settings/challenge-ttl.ts | 6 +- src/resources/zones/settings/ciphers.ts | 6 +- .../zones/settings/development-mode.ts | 6 +- src/resources/zones/settings/early-hints.ts | 6 +- .../zones/settings/email-obfuscation.ts | 6 +- src/resources/zones/settings/font-settings.ts | 6 +- .../zones/settings/h2-prioritization.ts | 6 +- .../zones/settings/hotlink-protection.ts | 6 +- src/resources/zones/settings/http2.ts | 6 +- src/resources/zones/settings/http3.ts | 6 +- .../zones/settings/image-resizing.ts | 6 +- .../zones/settings/ip-geolocation.ts | 6 +- src/resources/zones/settings/ipv6.ts | 6 +- .../zones/settings/min-tls-version.ts | 6 +- src/resources/zones/settings/minify.ts | 6 +- src/resources/zones/settings/mirage.ts | 6 +- .../zones/settings/mobile-redirect.ts | 6 +- src/resources/zones/settings/nel.ts | 6 +- .../settings/opportunistic-encryption.ts | 6 +- .../zones/settings/opportunistic-onion.ts | 6 +- .../zones/settings/orange-to-orange.ts | 6 +- .../settings/origin-error-page-pass-thru.ts | 6 +- .../zones/settings/origin-max-http-version.ts | 6 +- src/resources/zones/settings/polish.ts | 6 +- .../zones/settings/prefetch-preload.ts | 6 +- .../zones/settings/proxy-read-timeout.ts | 6 +- src/resources/zones/settings/pseudo-ipv4.ts | 6 +- .../zones/settings/response-buffering.ts | 6 +- src/resources/zones/settings/rocket-loader.ts | 6 +- .../zones/settings/security-headers.ts | 6 +- .../zones/settings/security-level.ts | 6 +- .../zones/settings/server-side-excludes.ts | 6 +- src/resources/zones/settings/settings.ts | 104 +++++++++--------- .../settings/sort-query-string-for-cache.ts | 6 +- .../zones/settings/ssl-recommender.ts | 6 +- src/resources/zones/settings/ssl.ts | 6 +- src/resources/zones/settings/tls-1-3.ts | 6 +- .../zones/settings/tls-client-auth.ts | 6 +- .../zones/settings/true-client-ip-header.ts | 6 +- src/resources/zones/settings/waf.ts | 6 +- src/resources/zones/settings/webp.ts | 6 +- src/resources/zones/settings/websocket.ts | 6 +- src/resources/zones/settings/zero-rtt.ts | 6 +- src/resources/zones/subscriptions.ts | 10 +- src/resources/zones/zones.ts | 20 ++-- 559 files changed, 2405 insertions(+), 2429 deletions(-) diff --git a/.stats.yml b/.stats.yml index cd62ae7132..54ae329193 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1281 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-839600a13efe864362aeb0940c721ebf4bbace7a23853dc24da23e029dc06116.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9a8e3aedb1193065fd84ae0b74a4a4c2d217ff2a821096f825a7798bbb921d76.yml diff --git a/src/error.ts b/src/error.ts index 71c9b37fa9..481076817d 100644 --- a/src/error.ts +++ b/src/error.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { castToError, Headers } from './core'; -import * as Shared from 'cloudflare/resources/shared'; +import * as Shared from './resources/shared'; export class CloudflareError extends Error {} diff --git a/src/index.ts b/src/index.ts index e3affd1107..db392dfd87 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,8 +5,8 @@ import * as Errors from './error'; import { type Agent } from './_shims/index'; import * as Uploads from './uploads'; import * as qs from 'qs'; -import * as Pagination from 'cloudflare/pagination'; -import * as API from 'cloudflare/resources/index'; +import * as Pagination from './pagination'; +import * as API from './resources/index'; export interface ClientOptions { /** diff --git a/src/resources/accounts/accounts.ts b/src/resources/accounts/accounts.ts index 0921824697..1d581596b1 100644 --- a/src/resources/accounts/accounts.ts +++ b/src/resources/accounts/accounts.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as MembersAPI from 'cloudflare/resources/accounts/members'; -import * as RolesAPI from 'cloudflare/resources/accounts/roles'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import * as MembersAPI from './members'; +import * as RolesAPI from './roles'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class Accounts extends APIResource { members: MembersAPI.Members = new MembersAPI.Members(this._client); diff --git a/src/resources/accounts/members.ts b/src/resources/accounts/members.ts index 07c593db9b..3719cddcd2 100644 --- a/src/resources/accounts/members.ts +++ b/src/resources/accounts/members.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as MembersAPI from 'cloudflare/resources/accounts/members'; -import * as Shared from 'cloudflare/resources/shared'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as MembersAPI from './members'; +import * as Shared from '../shared'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class Members extends APIResource { /** diff --git a/src/resources/accounts/roles.ts b/src/resources/accounts/roles.ts index b267b4b4e2..9f4b48c80f 100644 --- a/src/resources/accounts/roles.ts +++ b/src/resources/accounts/roles.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as RolesAPI from 'cloudflare/resources/accounts/roles'; -import * as Shared from 'cloudflare/resources/shared'; -import { RolesSinglePage } from 'cloudflare/resources/shared'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as RolesAPI from './roles'; +import * as Shared from '../shared'; +import { RolesSinglePage } from '../shared'; export class Roles extends APIResource { /** diff --git a/src/resources/acm/acm.ts b/src/resources/acm/acm.ts index eb811dd19b..d6c5e8b41d 100644 --- a/src/resources/acm/acm.ts +++ b/src/resources/acm/acm.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as TotalTLSAPI from 'cloudflare/resources/acm/total-tls'; +import { APIResource } from '../../resource'; +import * as TotalTLSAPI from './total-tls'; export class ACM extends APIResource { totalTLS: TotalTLSAPI.TotalTLS = new TotalTLSAPI.TotalTLS(this._client); diff --git a/src/resources/acm/total-tls.ts b/src/resources/acm/total-tls.ts index 7701d4f56c..5457130d21 100644 --- a/src/resources/acm/total-tls.ts +++ b/src/resources/acm/total-tls.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as TotalTLSAPI from 'cloudflare/resources/acm/total-tls'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as TotalTLSAPI from './total-tls'; export class TotalTLS extends APIResource { /** diff --git a/src/resources/addressing/address-maps/accounts.ts b/src/resources/addressing/address-maps/accounts.ts index 9f143a53d2..8cb36d602e 100644 --- a/src/resources/addressing/address-maps/accounts.ts +++ b/src/resources/addressing/address-maps/accounts.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AccountsAPI from 'cloudflare/resources/addressing/address-maps/accounts'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as AccountsAPI from './accounts'; export class Accounts extends APIResource { /** diff --git a/src/resources/addressing/address-maps/address-maps.ts b/src/resources/addressing/address-maps/address-maps.ts index fd575236c7..866a465e1d 100644 --- a/src/resources/addressing/address-maps/address-maps.ts +++ b/src/resources/addressing/address-maps/address-maps.ts @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AddressMapsAPI from 'cloudflare/resources/addressing/address-maps/address-maps'; -import * as AccountsAPI from 'cloudflare/resources/addressing/address-maps/accounts'; -import * as IPsAPI from 'cloudflare/resources/addressing/address-maps/ips'; -import * as ZonesAPI from 'cloudflare/resources/addressing/address-maps/zones'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as AddressMapsAPI from './address-maps'; +import * as AccountsAPI from './accounts'; +import * as IPsAPI from './ips'; +import * as ZonesAPI from './zones'; +import { SinglePage } from '../../../pagination'; export class AddressMaps extends APIResource { accounts: AccountsAPI.Accounts = new AccountsAPI.Accounts(this._client); diff --git a/src/resources/addressing/address-maps/ips.ts b/src/resources/addressing/address-maps/ips.ts index ed142658ff..2dfb9eeb83 100644 --- a/src/resources/addressing/address-maps/ips.ts +++ b/src/resources/addressing/address-maps/ips.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as IPsAPI from 'cloudflare/resources/addressing/address-maps/ips'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as IPsAPI from './ips'; export class IPs extends APIResource { /** diff --git a/src/resources/addressing/address-maps/zones.ts b/src/resources/addressing/address-maps/zones.ts index 21437b1052..82295ad661 100644 --- a/src/resources/addressing/address-maps/zones.ts +++ b/src/resources/addressing/address-maps/zones.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ZonesAPI from 'cloudflare/resources/addressing/address-maps/zones'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ZonesAPI from './zones'; export class Zones extends APIResource { /** diff --git a/src/resources/addressing/addressing.ts b/src/resources/addressing/addressing.ts index 2fafd10208..7d979781a8 100644 --- a/src/resources/addressing/addressing.ts +++ b/src/resources/addressing/addressing.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as ServicesAPI from 'cloudflare/resources/addressing/services'; -import * as AddressMapsAPI from 'cloudflare/resources/addressing/address-maps/address-maps'; -import * as LOADocumentsAPI from 'cloudflare/resources/addressing/loa-documents/loa-documents'; -import * as PrefixesAPI from 'cloudflare/resources/addressing/prefixes/prefixes'; +import { APIResource } from '../../resource'; +import * as ServicesAPI from './services'; +import * as AddressMapsAPI from './address-maps/address-maps'; +import * as LOADocumentsAPI from './loa-documents/loa-documents'; +import * as PrefixesAPI from './prefixes/prefixes'; export class Addressing extends APIResource { services: ServicesAPI.Services = new ServicesAPI.Services(this._client); diff --git a/src/resources/addressing/loa-documents/downloads.ts b/src/resources/addressing/loa-documents/downloads.ts index 733fb21f43..32c281650e 100644 --- a/src/resources/addressing/loa-documents/downloads.ts +++ b/src/resources/addressing/loa-documents/downloads.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DownloadsAPI from 'cloudflare/resources/addressing/loa-documents/downloads'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as DownloadsAPI from './downloads'; export class Downloads extends APIResource { /** diff --git a/src/resources/addressing/loa-documents/loa-documents.ts b/src/resources/addressing/loa-documents/loa-documents.ts index 9d67c6a4c5..0112ff9578 100644 --- a/src/resources/addressing/loa-documents/loa-documents.ts +++ b/src/resources/addressing/loa-documents/loa-documents.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as LOADocumentsAPI from 'cloudflare/resources/addressing/loa-documents/loa-documents'; -import * as DownloadsAPI from 'cloudflare/resources/addressing/loa-documents/downloads'; -import { multipartFormRequestOptions } from 'cloudflare/core'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as LOADocumentsAPI from './loa-documents'; +import * as DownloadsAPI from './downloads'; +import { multipartFormRequestOptions } from '../../../core'; export class LOADocuments extends APIResource { downloads: DownloadsAPI.Downloads = new DownloadsAPI.Downloads(this._client); diff --git a/src/resources/addressing/prefixes/bgp/bgp.ts b/src/resources/addressing/prefixes/bgp/bgp.ts index a9f9a065e5..a6c0766ac7 100644 --- a/src/resources/addressing/prefixes/bgp/bgp.ts +++ b/src/resources/addressing/prefixes/bgp/bgp.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as BindingsAPI from 'cloudflare/resources/addressing/prefixes/bgp/bindings'; -import * as PrefixesAPI from 'cloudflare/resources/addressing/prefixes/bgp/prefixes'; -import * as StatusesAPI from 'cloudflare/resources/addressing/prefixes/bgp/statuses'; +import { APIResource } from '../../../../resource'; +import * as BindingsAPI from './bindings'; +import * as PrefixesAPI from './prefixes'; +import * as StatusesAPI from './statuses'; export class BGP extends APIResource { bindings: BindingsAPI.Bindings = new BindingsAPI.Bindings(this._client); diff --git a/src/resources/addressing/prefixes/bgp/bindings.ts b/src/resources/addressing/prefixes/bgp/bindings.ts index 41a3181938..a586813361 100644 --- a/src/resources/addressing/prefixes/bgp/bindings.ts +++ b/src/resources/addressing/prefixes/bgp/bindings.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as BindingsAPI from 'cloudflare/resources/addressing/prefixes/bgp/bindings'; -import * as Shared from 'cloudflare/resources/shared'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as BindingsAPI from './bindings'; +import * as Shared from '../../../shared'; +import { SinglePage } from '../../../../pagination'; export class Bindings extends APIResource { /** diff --git a/src/resources/addressing/prefixes/bgp/prefixes.ts b/src/resources/addressing/prefixes/bgp/prefixes.ts index f08fed9587..2733b74dfc 100644 --- a/src/resources/addressing/prefixes/bgp/prefixes.ts +++ b/src/resources/addressing/prefixes/bgp/prefixes.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PrefixesAPI from 'cloudflare/resources/addressing/prefixes/bgp/prefixes'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as PrefixesAPI from './prefixes'; +import { SinglePage } from '../../../../pagination'; export class Prefixes extends APIResource { /** diff --git a/src/resources/addressing/prefixes/bgp/statuses.ts b/src/resources/addressing/prefixes/bgp/statuses.ts index c3cea81256..04fcccec54 100644 --- a/src/resources/addressing/prefixes/bgp/statuses.ts +++ b/src/resources/addressing/prefixes/bgp/statuses.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as StatusesAPI from 'cloudflare/resources/addressing/prefixes/bgp/statuses'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as StatusesAPI from './statuses'; export class Statuses extends APIResource { /** diff --git a/src/resources/addressing/prefixes/delegations.ts b/src/resources/addressing/prefixes/delegations.ts index 4ffec2585b..12cd427ea3 100644 --- a/src/resources/addressing/prefixes/delegations.ts +++ b/src/resources/addressing/prefixes/delegations.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DelegationsAPI from 'cloudflare/resources/addressing/prefixes/delegations'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as DelegationsAPI from './delegations'; +import { SinglePage } from '../../../pagination'; export class Delegations extends APIResource { /** diff --git a/src/resources/addressing/prefixes/prefixes.ts b/src/resources/addressing/prefixes/prefixes.ts index 935cc861e1..48a6f0a08b 100644 --- a/src/resources/addressing/prefixes/prefixes.ts +++ b/src/resources/addressing/prefixes/prefixes.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PrefixesAPI from 'cloudflare/resources/addressing/prefixes/prefixes'; -import * as DelegationsAPI from 'cloudflare/resources/addressing/prefixes/delegations'; -import * as BGPAPI from 'cloudflare/resources/addressing/prefixes/bgp/bgp'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as PrefixesAPI from './prefixes'; +import * as DelegationsAPI from './delegations'; +import * as BGPAPI from './bgp/bgp'; +import { SinglePage } from '../../../pagination'; export class Prefixes extends APIResource { bgp: BGPAPI.BGP = new BGPAPI.BGP(this._client); diff --git a/src/resources/addressing/services.ts b/src/resources/addressing/services.ts index 5856c601c8..ecc878ead7 100644 --- a/src/resources/addressing/services.ts +++ b/src/resources/addressing/services.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ServicesAPI from 'cloudflare/resources/addressing/services'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as ServicesAPI from './services'; +import { SinglePage } from '../../pagination'; export class Services extends APIResource { /** diff --git a/src/resources/ai-gateway/ai-gateway.ts b/src/resources/ai-gateway/ai-gateway.ts index 1c159d6674..6d8a29cd23 100644 --- a/src/resources/ai-gateway/ai-gateway.ts +++ b/src/resources/ai-gateway/ai-gateway.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as LogsAPI from 'cloudflare/resources/ai-gateway/logs'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as LogsAPI from './logs'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class AIGateway extends APIResource { logs: LogsAPI.Logs = new LogsAPI.Logs(this._client); diff --git a/src/resources/ai-gateway/logs.ts b/src/resources/ai-gateway/logs.ts index 62ac6886e2..65ba8d9515 100644 --- a/src/resources/ai-gateway/logs.ts +++ b/src/resources/ai-gateway/logs.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as LogsAPI from 'cloudflare/resources/ai-gateway/logs'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as LogsAPI from './logs'; export class Logs extends APIResource { /** diff --git a/src/resources/alerting/alerting.ts b/src/resources/alerting/alerting.ts index 1509b6d7bb..54d8d325d9 100644 --- a/src/resources/alerting/alerting.ts +++ b/src/resources/alerting/alerting.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as AvailableAlertsAPI from 'cloudflare/resources/alerting/available-alerts'; -import * as HistoryAPI from 'cloudflare/resources/alerting/history'; -import * as PoliciesAPI from 'cloudflare/resources/alerting/policies'; -import * as DestinationsAPI from 'cloudflare/resources/alerting/destinations/destinations'; +import { APIResource } from '../../resource'; +import * as AvailableAlertsAPI from './available-alerts'; +import * as HistoryAPI from './history'; +import * as PoliciesAPI from './policies'; +import * as DestinationsAPI from './destinations/destinations'; export class Alerting extends APIResource { availableAlerts: AvailableAlertsAPI.AvailableAlerts = new AvailableAlertsAPI.AvailableAlerts(this._client); diff --git a/src/resources/alerting/available-alerts.ts b/src/resources/alerting/available-alerts.ts index ece9bd30c2..4e16567d9f 100644 --- a/src/resources/alerting/available-alerts.ts +++ b/src/resources/alerting/available-alerts.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AvailableAlertsAPI from 'cloudflare/resources/alerting/available-alerts'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as AvailableAlertsAPI from './available-alerts'; export class AvailableAlerts extends APIResource { /** diff --git a/src/resources/alerting/destinations/destinations.ts b/src/resources/alerting/destinations/destinations.ts index 53efe6aaba..ed7e2c8144 100644 --- a/src/resources/alerting/destinations/destinations.ts +++ b/src/resources/alerting/destinations/destinations.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as EligibleAPI from 'cloudflare/resources/alerting/destinations/eligible'; -import * as PagerdutyAPI from 'cloudflare/resources/alerting/destinations/pagerduty'; -import * as WebhooksAPI from 'cloudflare/resources/alerting/destinations/webhooks'; +import { APIResource } from '../../../resource'; +import * as EligibleAPI from './eligible'; +import * as PagerdutyAPI from './pagerduty'; +import * as WebhooksAPI from './webhooks'; export class Destinations extends APIResource { eligible: EligibleAPI.Eligible = new EligibleAPI.Eligible(this._client); diff --git a/src/resources/alerting/destinations/eligible.ts b/src/resources/alerting/destinations/eligible.ts index 2d6ea0a8d9..bcd81a3582 100644 --- a/src/resources/alerting/destinations/eligible.ts +++ b/src/resources/alerting/destinations/eligible.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as EligibleAPI from 'cloudflare/resources/alerting/destinations/eligible'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as EligibleAPI from './eligible'; export class Eligible extends APIResource { /** diff --git a/src/resources/alerting/destinations/pagerduty.ts b/src/resources/alerting/destinations/pagerduty.ts index ded4f2859a..5e4b4d3ae8 100644 --- a/src/resources/alerting/destinations/pagerduty.ts +++ b/src/resources/alerting/destinations/pagerduty.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PagerdutyAPI from 'cloudflare/resources/alerting/destinations/pagerduty'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as PagerdutyAPI from './pagerduty'; export class PagerdutyResource extends APIResource { /** diff --git a/src/resources/alerting/destinations/webhooks.ts b/src/resources/alerting/destinations/webhooks.ts index c803afeb38..bda4a02561 100644 --- a/src/resources/alerting/destinations/webhooks.ts +++ b/src/resources/alerting/destinations/webhooks.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as WebhooksAPI from 'cloudflare/resources/alerting/destinations/webhooks'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as WebhooksAPI from './webhooks'; +import { SinglePage } from '../../../pagination'; export class Webhooks extends APIResource { /** diff --git a/src/resources/alerting/history.ts b/src/resources/alerting/history.ts index 87204e440b..4260b84495 100644 --- a/src/resources/alerting/history.ts +++ b/src/resources/alerting/history.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as HistoryAPI from 'cloudflare/resources/alerting/history'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as HistoryAPI from './history'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class HistoryResource extends APIResource { /** diff --git a/src/resources/alerting/policies.ts b/src/resources/alerting/policies.ts index ae84cbb279..9e09ffbc1a 100644 --- a/src/resources/alerting/policies.ts +++ b/src/resources/alerting/policies.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PoliciesAPI from 'cloudflare/resources/alerting/policies'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as PoliciesAPI from './policies'; +import { SinglePage } from '../../pagination'; export class Policies extends APIResource { /** diff --git a/src/resources/argo/argo.ts b/src/resources/argo/argo.ts index 066ecd129f..3734991993 100644 --- a/src/resources/argo/argo.ts +++ b/src/resources/argo/argo.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as SmartRoutingAPI from 'cloudflare/resources/argo/smart-routing'; -import * as TieredCachingAPI from 'cloudflare/resources/argo/tiered-caching'; +import { APIResource } from '../../resource'; +import * as SmartRoutingAPI from './smart-routing'; +import * as TieredCachingAPI from './tiered-caching'; export class Argo extends APIResource { smartRouting: SmartRoutingAPI.SmartRouting = new SmartRoutingAPI.SmartRouting(this._client); diff --git a/src/resources/argo/smart-routing.ts b/src/resources/argo/smart-routing.ts index dc696f5ed2..1945137bab 100644 --- a/src/resources/argo/smart-routing.ts +++ b/src/resources/argo/smart-routing.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SmartRoutingAPI from 'cloudflare/resources/argo/smart-routing'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as SmartRoutingAPI from './smart-routing'; export class SmartRouting extends APIResource { /** diff --git a/src/resources/argo/tiered-caching.ts b/src/resources/argo/tiered-caching.ts index 2c4b97fd40..7f11c38a0c 100644 --- a/src/resources/argo/tiered-caching.ts +++ b/src/resources/argo/tiered-caching.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as TieredCachingAPI from 'cloudflare/resources/argo/tiered-caching'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as TieredCachingAPI from './tiered-caching'; export class TieredCaching extends APIResource { /** diff --git a/src/resources/audit-logs.ts b/src/resources/audit-logs.ts index 3278f7e2fb..9cac7c693d 100644 --- a/src/resources/audit-logs.ts +++ b/src/resources/audit-logs.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as Shared from 'cloudflare/resources/shared'; -import { AuditLogsV4PagePaginationArray } from 'cloudflare/resources/shared'; -import { type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../core'; +import { APIResource } from '../resource'; +import * as Shared from './shared'; +import { AuditLogsV4PagePaginationArray } from './shared'; +import { type V4PagePaginationArrayParams } from '../pagination'; export class AuditLogs extends APIResource { /** diff --git a/src/resources/billing/billing.ts b/src/resources/billing/billing.ts index c222ce4315..0ba1bf5aeb 100644 --- a/src/resources/billing/billing.ts +++ b/src/resources/billing/billing.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as ProfilesAPI from 'cloudflare/resources/billing/profiles'; +import { APIResource } from '../../resource'; +import * as ProfilesAPI from './profiles'; export class Billing extends APIResource { profiles: ProfilesAPI.Profiles = new ProfilesAPI.Profiles(this._client); diff --git a/src/resources/billing/profiles.ts b/src/resources/billing/profiles.ts index 2be29b81f9..9f9c6523c5 100644 --- a/src/resources/billing/profiles.ts +++ b/src/resources/billing/profiles.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ProfilesAPI from 'cloudflare/resources/billing/profiles'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as ProfilesAPI from './profiles'; export class Profiles extends APIResource { /** diff --git a/src/resources/bot-management.ts b/src/resources/bot-management.ts index 740a337aed..6eae3ba531 100644 --- a/src/resources/bot-management.ts +++ b/src/resources/bot-management.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; +import * as Core from '../core'; +import { APIResource } from '../resource'; export class BotManagement extends APIResource { /** diff --git a/src/resources/brand-protection.ts b/src/resources/brand-protection.ts index 7da5f528d2..a77d3aa865 100644 --- a/src/resources/brand-protection.ts +++ b/src/resources/brand-protection.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; +import * as Core from '../core'; +import { APIResource } from '../resource'; export class BrandProtection extends APIResource { /** diff --git a/src/resources/cache/cache-reserve.ts b/src/resources/cache/cache-reserve.ts index 12294cadc4..cc70dbc36d 100644 --- a/src/resources/cache/cache-reserve.ts +++ b/src/resources/cache/cache-reserve.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as CacheReserveAPI from 'cloudflare/resources/cache/cache-reserve'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as CacheReserveAPI from './cache-reserve'; export class CacheReserveResource extends APIResource { /** diff --git a/src/resources/cache/cache.ts b/src/resources/cache/cache.ts index dc6e3f621f..db60985692 100644 --- a/src/resources/cache/cache.ts +++ b/src/resources/cache/cache.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as CacheReserveAPI from 'cloudflare/resources/cache/cache-reserve'; -import * as RegionalTieredCacheAPI from 'cloudflare/resources/cache/regional-tiered-cache'; -import * as SmartTieredCacheAPI from 'cloudflare/resources/cache/smart-tiered-cache'; -import * as VariantsAPI from 'cloudflare/resources/cache/variants'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as CacheReserveAPI from './cache-reserve'; +import * as RegionalTieredCacheAPI from './regional-tiered-cache'; +import * as SmartTieredCacheAPI from './smart-tiered-cache'; +import * as VariantsAPI from './variants'; export class Cache extends APIResource { cacheReserve: CacheReserveAPI.CacheReserveResource = new CacheReserveAPI.CacheReserveResource(this._client); diff --git a/src/resources/cache/regional-tiered-cache.ts b/src/resources/cache/regional-tiered-cache.ts index 2bef99f31b..d675c2799c 100644 --- a/src/resources/cache/regional-tiered-cache.ts +++ b/src/resources/cache/regional-tiered-cache.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as RegionalTieredCacheAPI from 'cloudflare/resources/cache/regional-tiered-cache'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as RegionalTieredCacheAPI from './regional-tiered-cache'; export class RegionalTieredCacheResource extends APIResource { /** diff --git a/src/resources/cache/smart-tiered-cache.ts b/src/resources/cache/smart-tiered-cache.ts index fe6a1f6b9d..46d43237c0 100644 --- a/src/resources/cache/smart-tiered-cache.ts +++ b/src/resources/cache/smart-tiered-cache.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SmartTieredCacheAPI from 'cloudflare/resources/cache/smart-tiered-cache'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as SmartTieredCacheAPI from './smart-tiered-cache'; export class SmartTieredCache extends APIResource { /** diff --git a/src/resources/cache/variants.ts b/src/resources/cache/variants.ts index 5cbc4e0355..9a35fad846 100644 --- a/src/resources/cache/variants.ts +++ b/src/resources/cache/variants.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as VariantsAPI from 'cloudflare/resources/cache/variants'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as VariantsAPI from './variants'; export class Variants extends APIResource { /** diff --git a/src/resources/calls/calls.ts b/src/resources/calls/calls.ts index be65bdb5ee..fa5d242760 100644 --- a/src/resources/calls/calls.ts +++ b/src/resources/calls/calls.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as TURNAPI from 'cloudflare/resources/calls/turn/turn'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as TURNAPI from './turn/turn'; +import { SinglePage } from '../../pagination'; export class Calls extends APIResource { turn: TURNAPI.TURN = new TURNAPI.TURN(this._client); diff --git a/src/resources/calls/turn/keys.ts b/src/resources/calls/turn/keys.ts index 1db762dafa..bba47cf659 100644 --- a/src/resources/calls/turn/keys.ts +++ b/src/resources/calls/turn/keys.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as KeysAPI from 'cloudflare/resources/calls/turn/keys'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as KeysAPI from './keys'; +import { SinglePage } from '../../../pagination'; export class Keys extends APIResource { /** diff --git a/src/resources/calls/turn/turn.ts b/src/resources/calls/turn/turn.ts index 50eb0ff6bf..8eec8b39a0 100644 --- a/src/resources/calls/turn/turn.ts +++ b/src/resources/calls/turn/turn.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as KeysAPI from 'cloudflare/resources/calls/turn/keys'; +import { APIResource } from '../../../resource'; +import * as KeysAPI from './keys'; export class TURN extends APIResource { keys: KeysAPI.Keys = new KeysAPI.Keys(this._client); diff --git a/src/resources/certificate-authorities/certificate-authorities.ts b/src/resources/certificate-authorities/certificate-authorities.ts index e5f52f3caa..ab1cd1a2ab 100644 --- a/src/resources/certificate-authorities/certificate-authorities.ts +++ b/src/resources/certificate-authorities/certificate-authorities.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as HostnameAssociationsAPI from 'cloudflare/resources/certificate-authorities/hostname-associations'; +import { APIResource } from '../../resource'; +import * as HostnameAssociationsAPI from './hostname-associations'; export class CertificateAuthorities extends APIResource { hostnameAssociations: HostnameAssociationsAPI.HostnameAssociations = diff --git a/src/resources/certificate-authorities/hostname-associations.ts b/src/resources/certificate-authorities/hostname-associations.ts index 514dc3ba28..86ed19f82d 100644 --- a/src/resources/certificate-authorities/hostname-associations.ts +++ b/src/resources/certificate-authorities/hostname-associations.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as HostnameAssociationsAPI from 'cloudflare/resources/certificate-authorities/hostname-associations'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as HostnameAssociationsAPI from './hostname-associations'; export class HostnameAssociations extends APIResource { /** diff --git a/src/resources/challenges/challenges.ts b/src/resources/challenges/challenges.ts index 0371c921b7..6c4e7c2629 100644 --- a/src/resources/challenges/challenges.ts +++ b/src/resources/challenges/challenges.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as WidgetsAPI from 'cloudflare/resources/challenges/widgets'; +import { APIResource } from '../../resource'; +import * as WidgetsAPI from './widgets'; export class Challenges extends APIResource { widgets: WidgetsAPI.Widgets = new WidgetsAPI.Widgets(this._client); diff --git a/src/resources/challenges/widgets.ts b/src/resources/challenges/widgets.ts index 1881e27f5d..a4f687c441 100644 --- a/src/resources/challenges/widgets.ts +++ b/src/resources/challenges/widgets.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as WidgetsAPI from 'cloudflare/resources/challenges/widgets'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as WidgetsAPI from './widgets'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class Widgets extends APIResource { /** diff --git a/src/resources/client-certificates.ts b/src/resources/client-certificates.ts index 7e38fd8bcf..56460a4fdb 100644 --- a/src/resources/client-certificates.ts +++ b/src/resources/client-certificates.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as CustomCertificatesAPI from 'cloudflare/resources/custom-certificates/custom-certificates'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../core'; +import { APIResource } from '../resource'; +import * as CustomCertificatesAPI from './custom-certificates/custom-certificates'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../pagination'; export class ClientCertificates extends APIResource { /** diff --git a/src/resources/cloudforce-one/cloudforce-one.ts b/src/resources/cloudforce-one/cloudforce-one.ts index 1d0aef9573..5323b87163 100644 --- a/src/resources/cloudforce-one/cloudforce-one.ts +++ b/src/resources/cloudforce-one/cloudforce-one.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; +import { APIResource } from '../../resource'; +import * as RequestsAPI from './requests/requests'; export class CloudforceOne extends APIResource { requests: RequestsAPI.Requests = new RequestsAPI.Requests(this._client); diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 3cacc527cf..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; -import * as Shared from 'cloudflare/resources/shared'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as MessageAPI from './message'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 5127074632..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; -import * as Shared from 'cloudflare/resources/shared'; -import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as PriorityAPI from './priority'; +import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { /** @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 0e48eba756..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -1,12 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; -import * as Shared from 'cloudflare/resources/shared'; -import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; -import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/priority'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as RequestsAPI from './requests'; +import * as MessageAPI from './message'; +import * as PriorityAPI from './priority'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; export class Requests extends APIResource { message: MessageAPI.MessageResource = new MessageAPI.MessageResource(this._client); @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** diff --git a/src/resources/custom-certificates/custom-certificates.ts b/src/resources/custom-certificates/custom-certificates.ts index e39add6c3e..d4c18d7557 100644 --- a/src/resources/custom-certificates/custom-certificates.ts +++ b/src/resources/custom-certificates/custom-certificates.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as KeylessCertificatesAPI from 'cloudflare/resources/keyless-certificates'; -import * as PrioritizeAPI from 'cloudflare/resources/custom-certificates/prioritize'; -import * as CustomHostnamesAPI from 'cloudflare/resources/custom-hostnames/custom-hostnames'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as KeylessCertificatesAPI from '../keyless-certificates'; +import * as PrioritizeAPI from './prioritize'; +import * as CustomHostnamesAPI from '../custom-hostnames/custom-hostnames'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class CustomCertificates extends APIResource { prioritize: PrioritizeAPI.Prioritize = new PrioritizeAPI.Prioritize(this._client); diff --git a/src/resources/custom-certificates/prioritize.ts b/src/resources/custom-certificates/prioritize.ts index bc5645a8d8..f2f8f814cb 100644 --- a/src/resources/custom-certificates/prioritize.ts +++ b/src/resources/custom-certificates/prioritize.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PrioritizeAPI from 'cloudflare/resources/custom-certificates/prioritize'; -import * as CustomCertificatesAPI from 'cloudflare/resources/custom-certificates/custom-certificates'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as PrioritizeAPI from './prioritize'; +import * as CustomCertificatesAPI from './custom-certificates'; export class Prioritize extends APIResource { /** diff --git a/src/resources/custom-hostnames/custom-hostnames.ts b/src/resources/custom-hostnames/custom-hostnames.ts index 7bfe820348..ed6610150f 100644 --- a/src/resources/custom-hostnames/custom-hostnames.ts +++ b/src/resources/custom-hostnames/custom-hostnames.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as CustomHostnamesAPI from 'cloudflare/resources/custom-hostnames/custom-hostnames'; -import * as Shared from 'cloudflare/resources/shared'; -import * as FallbackOriginAPI from 'cloudflare/resources/custom-hostnames/fallback-origin'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as CustomHostnamesAPI from './custom-hostnames'; +import * as Shared from '../shared'; +import * as FallbackOriginAPI from './fallback-origin'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class CustomHostnames extends APIResource { fallbackOrigin: FallbackOriginAPI.FallbackOrigin = new FallbackOriginAPI.FallbackOrigin(this._client); diff --git a/src/resources/custom-hostnames/fallback-origin.ts b/src/resources/custom-hostnames/fallback-origin.ts index 4a22fddba5..07af742fb1 100644 --- a/src/resources/custom-hostnames/fallback-origin.ts +++ b/src/resources/custom-hostnames/fallback-origin.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as FallbackOriginAPI from 'cloudflare/resources/custom-hostnames/fallback-origin'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as FallbackOriginAPI from './fallback-origin'; export class FallbackOrigin extends APIResource { /** diff --git a/src/resources/custom-nameservers.ts b/src/resources/custom-nameservers.ts index 463f0bc7e2..a8fdb905d3 100644 --- a/src/resources/custom-nameservers.ts +++ b/src/resources/custom-nameservers.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; +import * as Core from '../core'; +import { APIResource } from '../resource'; export class CustomNameservers extends APIResource { /** diff --git a/src/resources/d1/d1.ts b/src/resources/d1/d1.ts index f0dbf0db2e..1835c57270 100644 --- a/src/resources/d1/d1.ts +++ b/src/resources/d1/d1.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as DatabaseAPI from 'cloudflare/resources/d1/database'; +import { APIResource } from '../../resource'; +import * as DatabaseAPI from './database'; export class D1Resource extends APIResource { database: DatabaseAPI.Database = new DatabaseAPI.Database(this._client); diff --git a/src/resources/d1/database.ts b/src/resources/d1/database.ts index db5fbc94bf..e412408868 100644 --- a/src/resources/d1/database.ts +++ b/src/resources/d1/database.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DatabaseAPI from 'cloudflare/resources/d1/database'; -import * as D1API from 'cloudflare/resources/d1/d1'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as DatabaseAPI from './database'; +import * as D1API from './d1'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class Database extends APIResource { /** diff --git a/src/resources/dcv-delegation/dcv-delegation.ts b/src/resources/dcv-delegation/dcv-delegation.ts index f378088892..01943a8bf0 100644 --- a/src/resources/dcv-delegation/dcv-delegation.ts +++ b/src/resources/dcv-delegation/dcv-delegation.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as UUIDAPI from 'cloudflare/resources/dcv-delegation/uuid'; +import { APIResource } from '../../resource'; +import * as UUIDAPI from './uuid'; export class DCVDelegation extends APIResource { uuid: UUIDAPI.UUID = new UUIDAPI.UUID(this._client); diff --git a/src/resources/dcv-delegation/uuid.ts b/src/resources/dcv-delegation/uuid.ts index 671d725b4c..c9bc988842 100644 --- a/src/resources/dcv-delegation/uuid.ts +++ b/src/resources/dcv-delegation/uuid.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as UUIDAPI from 'cloudflare/resources/dcv-delegation/uuid'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as UUIDAPI from './uuid'; export class UUID extends APIResource { /** diff --git a/src/resources/diagnostics/diagnostics.ts b/src/resources/diagnostics/diagnostics.ts index 3dc217bf32..a67592e655 100644 --- a/src/resources/diagnostics/diagnostics.ts +++ b/src/resources/diagnostics/diagnostics.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as TraceroutesAPI from 'cloudflare/resources/diagnostics/traceroutes'; +import { APIResource } from '../../resource'; +import * as TraceroutesAPI from './traceroutes'; export class Diagnostics extends APIResource { traceroutes: TraceroutesAPI.Traceroutes = new TraceroutesAPI.Traceroutes(this._client); diff --git a/src/resources/diagnostics/traceroutes.ts b/src/resources/diagnostics/traceroutes.ts index 9d7d86e167..002baf8f3f 100644 --- a/src/resources/diagnostics/traceroutes.ts +++ b/src/resources/diagnostics/traceroutes.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as TraceroutesAPI from 'cloudflare/resources/diagnostics/traceroutes'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as TraceroutesAPI from './traceroutes'; export class Traceroutes extends APIResource { /** diff --git a/src/resources/dns/analytics/analytics.ts b/src/resources/dns/analytics/analytics.ts index 8b31d9e046..70e8a8b528 100644 --- a/src/resources/dns/analytics/analytics.ts +++ b/src/resources/dns/analytics/analytics.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as ReportsAPI from 'cloudflare/resources/dns/analytics/reports/reports'; +import { APIResource } from '../../../resource'; +import * as ReportsAPI from './reports/reports'; export class Analytics extends APIResource { reports: ReportsAPI.Reports = new ReportsAPI.Reports(this._client); diff --git a/src/resources/dns/analytics/reports/bytimes.ts b/src/resources/dns/analytics/reports/bytimes.ts index 76c5496060..457a949129 100644 --- a/src/resources/dns/analytics/reports/bytimes.ts +++ b/src/resources/dns/analytics/reports/bytimes.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as BytimesAPI from 'cloudflare/resources/dns/analytics/reports/bytimes'; -import * as DNSAPI from 'cloudflare/resources/dns/dns'; -import * as AnalyticsAPI from 'cloudflare/resources/dns/firewall/analytics/analytics'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as BytimesAPI from './bytimes'; +import * as DNSAPI from '../../dns'; +import * as AnalyticsAPI from '../../firewall/analytics/analytics'; export class Bytimes extends APIResource { /** diff --git a/src/resources/dns/analytics/reports/reports.ts b/src/resources/dns/analytics/reports/reports.ts index 4357be5c02..5a6464f68c 100644 --- a/src/resources/dns/analytics/reports/reports.ts +++ b/src/resources/dns/analytics/reports/reports.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ReportsAPI from 'cloudflare/resources/dns/analytics/reports/reports'; -import * as BytimesAPI from 'cloudflare/resources/dns/analytics/reports/bytimes'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as ReportsAPI from './reports'; +import * as BytimesAPI from './bytimes'; export class Reports extends APIResource { bytimes: BytimesAPI.Bytimes = new BytimesAPI.Bytimes(this._client); diff --git a/src/resources/dns/dns.ts b/src/resources/dns/dns.ts index b3bc30eac0..adda2d0f8e 100644 --- a/src/resources/dns/dns.ts +++ b/src/resources/dns/dns.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as RecordsAPI from 'cloudflare/resources/dns/records'; -import * as AnalyticsAPI from 'cloudflare/resources/dns/analytics/analytics'; -import * as FirewallAPI from 'cloudflare/resources/dns/firewall/firewall'; -import * as AnalyticsAnalyticsAPI from 'cloudflare/resources/dns/firewall/analytics/analytics'; +import { APIResource } from '../../resource'; +import * as RecordsAPI from './records'; +import * as AnalyticsAPI from './analytics/analytics'; +import * as FirewallAPI from './firewall/firewall'; +import * as AnalyticsAnalyticsAPI from './firewall/analytics/analytics'; export class DNS extends APIResource { records: RecordsAPI.Records = new RecordsAPI.Records(this._client); diff --git a/src/resources/dns/firewall/analytics/analytics.ts b/src/resources/dns/firewall/analytics/analytics.ts index 03a9bb452c..0e4f718672 100644 --- a/src/resources/dns/firewall/analytics/analytics.ts +++ b/src/resources/dns/firewall/analytics/analytics.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as AnalyticsAPI from 'cloudflare/resources/dns/firewall/analytics/analytics'; -import * as ReportsAPI from 'cloudflare/resources/dns/firewall/analytics/reports/reports'; +import { APIResource } from '../../../../resource'; +import * as AnalyticsAPI from './analytics'; +import * as ReportsAPI from './reports/reports'; export class Analytics extends APIResource { reports: ReportsAPI.Reports = new ReportsAPI.Reports(this._client); diff --git a/src/resources/dns/firewall/analytics/reports/bytimes.ts b/src/resources/dns/firewall/analytics/reports/bytimes.ts index 213c62e0f4..4b65681252 100644 --- a/src/resources/dns/firewall/analytics/reports/bytimes.ts +++ b/src/resources/dns/firewall/analytics/reports/bytimes.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ReportsBytimesAPI from 'cloudflare/resources/dns/firewall/analytics/reports/bytimes'; -import * as BytimesAPI from 'cloudflare/resources/dns/analytics/reports/bytimes'; -import * as AnalyticsAPI from 'cloudflare/resources/dns/firewall/analytics/analytics'; +import * as Core from '../../../../../core'; +import { APIResource } from '../../../../../resource'; +import * as ReportsBytimesAPI from './bytimes'; +import * as BytimesAPI from '../../../analytics/reports/bytimes'; +import * as AnalyticsAPI from '../analytics'; export class Bytimes extends APIResource { /** diff --git a/src/resources/dns/firewall/analytics/reports/reports.ts b/src/resources/dns/firewall/analytics/reports/reports.ts index 818f34c268..1d712d2b93 100644 --- a/src/resources/dns/firewall/analytics/reports/reports.ts +++ b/src/resources/dns/firewall/analytics/reports/reports.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ReportsReportsAPI from 'cloudflare/resources/dns/firewall/analytics/reports/reports'; -import * as ReportsAPI from 'cloudflare/resources/dns/analytics/reports/reports'; -import * as BytimesAPI from 'cloudflare/resources/dns/firewall/analytics/reports/bytimes'; +import * as Core from '../../../../../core'; +import { APIResource } from '../../../../../resource'; +import * as ReportsReportsAPI from './reports'; +import * as ReportsAPI from '../../../analytics/reports/reports'; +import * as BytimesAPI from './bytimes'; export class Reports extends APIResource { bytimes: BytimesAPI.Bytimes = new BytimesAPI.Bytimes(this._client); diff --git a/src/resources/dns/firewall/firewall.ts b/src/resources/dns/firewall/firewall.ts index 7a12f87390..7704d302ae 100644 --- a/src/resources/dns/firewall/firewall.ts +++ b/src/resources/dns/firewall/firewall.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as FirewallAPI from 'cloudflare/resources/dns/firewall/firewall'; -import * as AnalyticsAPI from 'cloudflare/resources/dns/firewall/analytics/analytics'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as FirewallAPI from './firewall'; +import * as AnalyticsAPI from './analytics/analytics'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; export class FirewallResource extends APIResource { analytics: AnalyticsAPI.Analytics = new AnalyticsAPI.Analytics(this._client); diff --git a/src/resources/dns/records.ts b/src/resources/dns/records.ts index 35198c404f..39a7d061c9 100644 --- a/src/resources/dns/records.ts +++ b/src/resources/dns/records.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as RecordsAPI from 'cloudflare/resources/dns/records'; -import * as Shared from 'cloudflare/resources/shared'; -import { multipartFormRequestOptions } from 'cloudflare/core'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as RecordsAPI from './records'; +import * as Shared from '../shared'; +import { multipartFormRequestOptions } from '../../core'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class Records extends APIResource { /** diff --git a/src/resources/dnssec.ts b/src/resources/dnssec.ts index 091b392972..710180876c 100644 --- a/src/resources/dnssec.ts +++ b/src/resources/dnssec.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; +import * as Core from '../core'; +import { APIResource } from '../resource'; export class DNSSECResource extends APIResource { /** diff --git a/src/resources/durable-objects/durable-objects.ts b/src/resources/durable-objects/durable-objects.ts index 9887db1710..a79041c6f0 100644 --- a/src/resources/durable-objects/durable-objects.ts +++ b/src/resources/durable-objects/durable-objects.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as NamespacesAPI from 'cloudflare/resources/durable-objects/namespaces/namespaces'; +import { APIResource } from '../../resource'; +import * as NamespacesAPI from './namespaces/namespaces'; export class DurableObjects extends APIResource { namespaces: NamespacesAPI.Namespaces = new NamespacesAPI.Namespaces(this._client); diff --git a/src/resources/durable-objects/namespaces/namespaces.ts b/src/resources/durable-objects/namespaces/namespaces.ts index c0f425444e..916ed6d17e 100644 --- a/src/resources/durable-objects/namespaces/namespaces.ts +++ b/src/resources/durable-objects/namespaces/namespaces.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as NamespacesAPI from 'cloudflare/resources/durable-objects/namespaces/namespaces'; -import * as ObjectsAPI from 'cloudflare/resources/durable-objects/namespaces/objects'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as NamespacesAPI from './namespaces'; +import * as ObjectsAPI from './objects'; +import { SinglePage } from '../../../pagination'; export class Namespaces extends APIResource { objects: ObjectsAPI.Objects = new ObjectsAPI.Objects(this._client); diff --git a/src/resources/durable-objects/namespaces/objects.ts b/src/resources/durable-objects/namespaces/objects.ts index 7e747117bb..56808a32b3 100644 --- a/src/resources/durable-objects/namespaces/objects.ts +++ b/src/resources/durable-objects/namespaces/objects.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ObjectsAPI from 'cloudflare/resources/durable-objects/namespaces/objects'; -import { CursorLimitPagination, type CursorLimitPaginationParams } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ObjectsAPI from './objects'; +import { CursorLimitPagination, type CursorLimitPaginationParams } from '../../../pagination'; export class Objects extends APIResource { /** diff --git a/src/resources/email-routing/addresses.ts b/src/resources/email-routing/addresses.ts index aa518412e2..5c48faa264 100644 --- a/src/resources/email-routing/addresses.ts +++ b/src/resources/email-routing/addresses.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as AddressesAPI from 'cloudflare/resources/email-routing/addresses'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import * as AddressesAPI from './addresses'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class Addresses extends APIResource { /** diff --git a/src/resources/email-routing/dns.ts b/src/resources/email-routing/dns.ts index 24469c5879..faed9eddb7 100644 --- a/src/resources/email-routing/dns.ts +++ b/src/resources/email-routing/dns.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DNSAPI from 'cloudflare/resources/email-routing/dns'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as DNSAPI from './dns'; export class DNS extends APIResource { /** diff --git a/src/resources/email-routing/email-routing.ts b/src/resources/email-routing/email-routing.ts index 55037f6bb5..d5e83585a4 100644 --- a/src/resources/email-routing/email-routing.ts +++ b/src/resources/email-routing/email-routing.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AddressesAPI from 'cloudflare/resources/email-routing/addresses'; -import * as DNSAPI from 'cloudflare/resources/email-routing/dns'; -import * as RulesAPI from 'cloudflare/resources/email-routing/rules/rules'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as AddressesAPI from './addresses'; +import * as DNSAPI from './dns'; +import * as RulesAPI from './rules/rules'; export class EmailRouting extends APIResource { dns: DNSAPI.DNS = new DNSAPI.DNS(this._client); diff --git a/src/resources/email-routing/rules/catch-alls.ts b/src/resources/email-routing/rules/catch-alls.ts index b1f1c47bc1..d2088d010a 100644 --- a/src/resources/email-routing/rules/catch-alls.ts +++ b/src/resources/email-routing/rules/catch-alls.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as CatchAllsAPI from 'cloudflare/resources/email-routing/rules/catch-alls'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as CatchAllsAPI from './catch-alls'; export class CatchAlls extends APIResource { /** diff --git a/src/resources/email-routing/rules/rules.ts b/src/resources/email-routing/rules/rules.ts index 53cc3b64c7..a26f54777b 100644 --- a/src/resources/email-routing/rules/rules.ts +++ b/src/resources/email-routing/rules/rules.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as RulesAPI from 'cloudflare/resources/email-routing/rules/rules'; -import * as CatchAllsAPI from 'cloudflare/resources/email-routing/rules/catch-alls'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as RulesAPI from './rules'; +import * as CatchAllsAPI from './catch-alls'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; export class Rules extends APIResource { catchAlls: CatchAllsAPI.CatchAlls = new CatchAllsAPI.CatchAlls(this._client); diff --git a/src/resources/event-notifications/event-notifications.ts b/src/resources/event-notifications/event-notifications.ts index 46876c9726..f428122919 100644 --- a/src/resources/event-notifications/event-notifications.ts +++ b/src/resources/event-notifications/event-notifications.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as R2API from 'cloudflare/resources/event-notifications/r2/r2'; +import { APIResource } from '../../resource'; +import * as R2API from './r2/r2'; export class EventNotifications extends APIResource { r2: R2API.R2 = new R2API.R2(this._client); diff --git a/src/resources/event-notifications/r2/configuration/configuration.ts b/src/resources/event-notifications/r2/configuration/configuration.ts index 0cc8b8ae0b..8650d573b1 100644 --- a/src/resources/event-notifications/r2/configuration/configuration.ts +++ b/src/resources/event-notifications/r2/configuration/configuration.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ConfigurationAPI from 'cloudflare/resources/event-notifications/r2/configuration/configuration'; -import * as QueuesAPI from 'cloudflare/resources/event-notifications/r2/configuration/queues'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as ConfigurationAPI from './configuration'; +import * as QueuesAPI from './queues'; export class Configuration extends APIResource { queues: QueuesAPI.Queues = new QueuesAPI.Queues(this._client); diff --git a/src/resources/event-notifications/r2/configuration/queues.ts b/src/resources/event-notifications/r2/configuration/queues.ts index 75e5f8c95f..f4ea566d18 100644 --- a/src/resources/event-notifications/r2/configuration/queues.ts +++ b/src/resources/event-notifications/r2/configuration/queues.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as QueuesAPI from 'cloudflare/resources/event-notifications/r2/configuration/queues'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as QueuesAPI from './queues'; export class Queues extends APIResource { /** diff --git a/src/resources/event-notifications/r2/r2.ts b/src/resources/event-notifications/r2/r2.ts index 6e4f15948e..ace8e1f627 100644 --- a/src/resources/event-notifications/r2/r2.ts +++ b/src/resources/event-notifications/r2/r2.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as ConfigurationAPI from 'cloudflare/resources/event-notifications/r2/configuration/configuration'; +import { APIResource } from '../../../resource'; +import * as ConfigurationAPI from './configuration/configuration'; export class R2 extends APIResource { configuration: ConfigurationAPI.Configuration = new ConfigurationAPI.Configuration(this._client); diff --git a/src/resources/filters.ts b/src/resources/filters.ts index 3cfa36da8f..7cdc8488a4 100644 --- a/src/resources/filters.ts +++ b/src/resources/filters.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../core'; +import { APIResource } from '../resource'; +import { isRequestOptions } from '../core'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../pagination'; export class Filters extends APIResource { /** diff --git a/src/resources/firewall/access-rules.ts b/src/resources/firewall/access-rules.ts index d809e40306..e724466b9d 100644 --- a/src/resources/firewall/access-rules.ts +++ b/src/resources/firewall/access-rules.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { CloudflareError } from 'cloudflare/error'; -import * as AccessRulesAPI from 'cloudflare/resources/firewall/access-rules'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import { CloudflareError } from '../../error'; +import * as AccessRulesAPI from './access-rules'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class AccessRules extends APIResource { /** diff --git a/src/resources/firewall/firewall.ts b/src/resources/firewall/firewall.ts index adcde5d5cf..54a99d9d8c 100644 --- a/src/resources/firewall/firewall.ts +++ b/src/resources/firewall/firewall.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as AccessRulesAPI from 'cloudflare/resources/firewall/access-rules'; -import * as LockdownsAPI from 'cloudflare/resources/firewall/lockdowns'; -import * as RulesAPI from 'cloudflare/resources/firewall/rules'; -import * as UARulesAPI from 'cloudflare/resources/firewall/ua-rules'; -import * as WAFAPI from 'cloudflare/resources/firewall/waf/waf'; +import { APIResource } from '../../resource'; +import * as AccessRulesAPI from './access-rules'; +import * as LockdownsAPI from './lockdowns'; +import * as RulesAPI from './rules'; +import * as UARulesAPI from './ua-rules'; +import * as WAFAPI from './waf/waf'; export class Firewall extends APIResource { lockdowns: LockdownsAPI.Lockdowns = new LockdownsAPI.Lockdowns(this._client); diff --git a/src/resources/firewall/lockdowns.ts b/src/resources/firewall/lockdowns.ts index 87f576f1ce..a8c492fe38 100644 --- a/src/resources/firewall/lockdowns.ts +++ b/src/resources/firewall/lockdowns.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as LockdownsAPI from 'cloudflare/resources/firewall/lockdowns'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import * as LockdownsAPI from './lockdowns'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class Lockdowns extends APIResource { /** diff --git a/src/resources/firewall/rules.ts b/src/resources/firewall/rules.ts index 7e0296a634..e9c77d6904 100644 --- a/src/resources/firewall/rules.ts +++ b/src/resources/firewall/rules.ts @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as RulesAPI from 'cloudflare/resources/firewall/rules'; -import * as FiltersAPI from 'cloudflare/resources/filters'; -import * as RateLimitsAPI from 'cloudflare/resources/rate-limits'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import * as RulesAPI from './rules'; +import * as FiltersAPI from '../filters'; +import * as RateLimitsAPI from '../rate-limits'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class Rules extends APIResource { /** diff --git a/src/resources/firewall/ua-rules.ts b/src/resources/firewall/ua-rules.ts index 4e4478551e..d1e2229b06 100644 --- a/src/resources/firewall/ua-rules.ts +++ b/src/resources/firewall/ua-rules.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as UARulesAPI from 'cloudflare/resources/firewall/ua-rules'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import * as UARulesAPI from './ua-rules'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class UARules extends APIResource { /** diff --git a/src/resources/firewall/waf/overrides.ts b/src/resources/firewall/waf/overrides.ts index cd5ed39316..58ba981b7c 100644 --- a/src/resources/firewall/waf/overrides.ts +++ b/src/resources/firewall/waf/overrides.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as OverridesAPI from 'cloudflare/resources/firewall/waf/overrides'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as OverridesAPI from './overrides'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; export class Overrides extends APIResource { /** diff --git a/src/resources/firewall/waf/packages/groups.ts b/src/resources/firewall/waf/packages/groups.ts index 0e46b00f29..10fea43d97 100644 --- a/src/resources/firewall/waf/packages/groups.ts +++ b/src/resources/firewall/waf/packages/groups.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as GroupsAPI from 'cloudflare/resources/firewall/waf/packages/groups'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as GroupsAPI from './groups'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../../pagination'; export class Groups extends APIResource { /** diff --git a/src/resources/firewall/waf/packages/packages.ts b/src/resources/firewall/waf/packages/packages.ts index 55e43d5db5..33ec75111c 100644 --- a/src/resources/firewall/waf/packages/packages.ts +++ b/src/resources/firewall/waf/packages/packages.ts @@ -1,13 +1,13 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as PackagesAPI from 'cloudflare/resources/firewall/waf/packages/packages'; -import * as Shared from 'cloudflare/resources/shared'; -import * as GroupsAPI from 'cloudflare/resources/firewall/waf/packages/groups'; -import * as RulesAPI from 'cloudflare/resources/firewall/waf/packages/rules'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as PackagesAPI from './packages'; +import * as Shared from '../../../shared'; +import * as GroupsAPI from './groups'; +import * as RulesAPI from './rules'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../../pagination'; export class Packages extends APIResource { groups: GroupsAPI.Groups = new GroupsAPI.Groups(this._client); diff --git a/src/resources/firewall/waf/packages/rules.ts b/src/resources/firewall/waf/packages/rules.ts index 5ab94b0ec6..40e5efe3d8 100644 --- a/src/resources/firewall/waf/packages/rules.ts +++ b/src/resources/firewall/waf/packages/rules.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as RulesAPI from 'cloudflare/resources/firewall/waf/packages/rules'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as RulesAPI from './rules'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../../pagination'; export class Rules extends APIResource { /** diff --git a/src/resources/firewall/waf/waf.ts b/src/resources/firewall/waf/waf.ts index 9b1d1a2a8b..225565216a 100644 --- a/src/resources/firewall/waf/waf.ts +++ b/src/resources/firewall/waf/waf.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as OverridesAPI from 'cloudflare/resources/firewall/waf/overrides'; -import * as PackagesAPI from 'cloudflare/resources/firewall/waf/packages/packages'; +import { APIResource } from '../../../resource'; +import * as OverridesAPI from './overrides'; +import * as PackagesAPI from './packages/packages'; export class WAF extends APIResource { overrides: OverridesAPI.Overrides = new OverridesAPI.Overrides(this._client); diff --git a/src/resources/healthchecks/healthchecks.ts b/src/resources/healthchecks/healthchecks.ts index 8636a92eb5..5146e7a977 100644 --- a/src/resources/healthchecks/healthchecks.ts +++ b/src/resources/healthchecks/healthchecks.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PreviewsAPI from 'cloudflare/resources/healthchecks/previews'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as PreviewsAPI from './previews'; +import { SinglePage } from '../../pagination'; export class Healthchecks extends APIResource { previews: PreviewsAPI.Previews = new PreviewsAPI.Previews(this._client); diff --git a/src/resources/healthchecks/previews.ts b/src/resources/healthchecks/previews.ts index 74497b157d..50c4326efe 100644 --- a/src/resources/healthchecks/previews.ts +++ b/src/resources/healthchecks/previews.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PreviewsAPI from 'cloudflare/resources/healthchecks/previews'; -import * as HealthchecksAPI from 'cloudflare/resources/healthchecks/healthchecks'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as PreviewsAPI from './previews'; +import * as HealthchecksAPI from './healthchecks'; export class Previews extends APIResource { /** diff --git a/src/resources/hostnames/hostnames.ts b/src/resources/hostnames/hostnames.ts index 0fdb34dd3e..f957b44436 100644 --- a/src/resources/hostnames/hostnames.ts +++ b/src/resources/hostnames/hostnames.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as SettingsAPI from 'cloudflare/resources/hostnames/settings/settings'; +import { APIResource } from '../../resource'; +import * as SettingsAPI from './settings/settings'; export class Hostnames extends APIResource { settings: SettingsAPI.Settings = new SettingsAPI.Settings(this._client); diff --git a/src/resources/hostnames/settings/settings.ts b/src/resources/hostnames/settings/settings.ts index 01bf6cbd65..0f03b8db42 100644 --- a/src/resources/hostnames/settings/settings.ts +++ b/src/resources/hostnames/settings/settings.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as TLSAPI from 'cloudflare/resources/hostnames/settings/tls'; +import { APIResource } from '../../../resource'; +import * as TLSAPI from './tls'; export class Settings extends APIResource { tls: TLSAPI.TLS = new TLSAPI.TLS(this._client); diff --git a/src/resources/hostnames/settings/tls.ts b/src/resources/hostnames/settings/tls.ts index d50ea676ff..4a0a0b5af3 100644 --- a/src/resources/hostnames/settings/tls.ts +++ b/src/resources/hostnames/settings/tls.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as TLSAPI from 'cloudflare/resources/hostnames/settings/tls'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as TLSAPI from './tls'; export class TLS extends APIResource { /** diff --git a/src/resources/hyperdrive/configs.ts b/src/resources/hyperdrive/configs.ts index b4c7bed455..e75695a38f 100644 --- a/src/resources/hyperdrive/configs.ts +++ b/src/resources/hyperdrive/configs.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ConfigsAPI from 'cloudflare/resources/hyperdrive/configs'; -import * as HyperdriveAPI from 'cloudflare/resources/hyperdrive/hyperdrive'; -import { HyperdrivesSinglePage } from 'cloudflare/resources/hyperdrive/hyperdrive'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as ConfigsAPI from './configs'; +import * as HyperdriveAPI from './hyperdrive'; +import { HyperdrivesSinglePage } from './hyperdrive'; export class Configs extends APIResource { /** diff --git a/src/resources/hyperdrive/hyperdrive.ts b/src/resources/hyperdrive/hyperdrive.ts index 504a014f83..f3b876ca3d 100644 --- a/src/resources/hyperdrive/hyperdrive.ts +++ b/src/resources/hyperdrive/hyperdrive.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as ConfigsAPI from 'cloudflare/resources/hyperdrive/configs'; -import { SinglePage } from 'cloudflare/pagination'; +import { APIResource } from '../../resource'; +import * as ConfigsAPI from './configs'; +import { SinglePage } from '../../pagination'; export class HyperdriveResource extends APIResource { configs: ConfigsAPI.Configs = new ConfigsAPI.Configs(this._client); diff --git a/src/resources/images/images.ts b/src/resources/images/images.ts index e7b70f150e..5162c81598 100644 --- a/src/resources/images/images.ts +++ b/src/resources/images/images.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as V1API from 'cloudflare/resources/images/v1/v1'; -import * as V2API from 'cloudflare/resources/images/v2/v2'; +import { APIResource } from '../../resource'; +import * as V1API from './v1/v1'; +import * as V2API from './v2/v2'; export class Images extends APIResource { v1: V1API.V1 = new V1API.V1(this._client); diff --git a/src/resources/images/v1/blobs.ts b/src/resources/images/v1/blobs.ts index 4d5e937b06..3ba711546f 100644 --- a/src/resources/images/v1/blobs.ts +++ b/src/resources/images/v1/blobs.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { type Response } from 'cloudflare/_shims/index'; -import * as BlobsAPI from 'cloudflare/resources/images/v1/blobs'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { type Response } from '../../../_shims/index'; +import * as BlobsAPI from './blobs'; export class Blobs extends APIResource { /** diff --git a/src/resources/images/v1/keys.ts b/src/resources/images/v1/keys.ts index 012b2599b9..d3b0713e49 100644 --- a/src/resources/images/v1/keys.ts +++ b/src/resources/images/v1/keys.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as KeysAPI from 'cloudflare/resources/images/v1/keys'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as KeysAPI from './keys'; export class Keys extends APIResource { /** diff --git a/src/resources/images/v1/stats.ts b/src/resources/images/v1/stats.ts index 3546a0c74e..89cc2d9e2b 100644 --- a/src/resources/images/v1/stats.ts +++ b/src/resources/images/v1/stats.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as StatsAPI from 'cloudflare/resources/images/v1/stats'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as StatsAPI from './stats'; export class Stats extends APIResource { /** diff --git a/src/resources/images/v1/v1.ts b/src/resources/images/v1/v1.ts index 3bbe88830e..06f943c9a8 100644 --- a/src/resources/images/v1/v1.ts +++ b/src/resources/images/v1/v1.ts @@ -1,15 +1,15 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as V1API from 'cloudflare/resources/images/v1/v1'; -import * as Shared from 'cloudflare/resources/shared'; -import * as BlobsAPI from 'cloudflare/resources/images/v1/blobs'; -import * as KeysAPI from 'cloudflare/resources/images/v1/keys'; -import * as StatsAPI from 'cloudflare/resources/images/v1/stats'; -import * as VariantsAPI from 'cloudflare/resources/images/v1/variants'; -import { multipartFormRequestOptions } from 'cloudflare/core'; -import { V4PagePagination, type V4PagePaginationParams } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as V1API from './v1'; +import * as Shared from '../../shared'; +import * as BlobsAPI from './blobs'; +import * as KeysAPI from './keys'; +import * as StatsAPI from './stats'; +import * as VariantsAPI from './variants'; +import { multipartFormRequestOptions } from '../../../core'; +import { V4PagePagination, type V4PagePaginationParams } from '../../../pagination'; export class V1 extends APIResource { keys: KeysAPI.Keys = new KeysAPI.Keys(this._client); diff --git a/src/resources/images/v1/variants.ts b/src/resources/images/v1/variants.ts index d1dc7dde9f..67c32b9ea7 100644 --- a/src/resources/images/v1/variants.ts +++ b/src/resources/images/v1/variants.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as VariantsAPI from 'cloudflare/resources/images/v1/variants'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as VariantsAPI from './variants'; export class Variants extends APIResource { /** diff --git a/src/resources/images/v2/direct-uploads.ts b/src/resources/images/v2/direct-uploads.ts index b9bd59de3a..ba2527da97 100644 --- a/src/resources/images/v2/direct-uploads.ts +++ b/src/resources/images/v2/direct-uploads.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DirectUploadsAPI from 'cloudflare/resources/images/v2/direct-uploads'; -import { multipartFormRequestOptions } from 'cloudflare/core'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as DirectUploadsAPI from './direct-uploads'; +import { multipartFormRequestOptions } from '../../../core'; export class DirectUploads extends APIResource { /** diff --git a/src/resources/images/v2/v2.ts b/src/resources/images/v2/v2.ts index 33fe749024..67d1639ea4 100644 --- a/src/resources/images/v2/v2.ts +++ b/src/resources/images/v2/v2.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as V2API from 'cloudflare/resources/images/v2/v2'; -import * as V1API from 'cloudflare/resources/images/v1/v1'; -import * as DirectUploadsAPI from 'cloudflare/resources/images/v2/direct-uploads'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as V2API from './v2'; +import * as V1API from '../v1/v1'; +import * as DirectUploadsAPI from './direct-uploads'; export class V2 extends APIResource { directUploads: DirectUploadsAPI.DirectUploads = new DirectUploadsAPI.DirectUploads(this._client); diff --git a/src/resources/intel/asn/asn.ts b/src/resources/intel/asn/asn.ts index 86d496b90b..080e03903e 100644 --- a/src/resources/intel/asn/asn.ts +++ b/src/resources/intel/asn/asn.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ASNAPI from 'cloudflare/resources/intel/asn/asn'; -import * as Shared from 'cloudflare/resources/shared'; -import * as SubnetsAPI from 'cloudflare/resources/intel/asn/subnets'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ASNAPI from './asn'; +import * as Shared from '../../shared'; +import * as SubnetsAPI from './subnets'; export class ASN extends APIResource { subnets: SubnetsAPI.Subnets = new SubnetsAPI.Subnets(this._client); diff --git a/src/resources/intel/asn/subnets.ts b/src/resources/intel/asn/subnets.ts index 97143b1ea2..4d89ba197a 100644 --- a/src/resources/intel/asn/subnets.ts +++ b/src/resources/intel/asn/subnets.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SubnetsAPI from 'cloudflare/resources/intel/asn/subnets'; -import * as Shared from 'cloudflare/resources/shared'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as SubnetsAPI from './subnets'; +import * as Shared from '../../shared'; export class Subnets extends APIResource { /** diff --git a/src/resources/intel/attack-surface-report/attack-surface-report.ts b/src/resources/intel/attack-surface-report/attack-surface-report.ts index d178a786a9..bc4865775c 100644 --- a/src/resources/intel/attack-surface-report/attack-surface-report.ts +++ b/src/resources/intel/attack-surface-report/attack-surface-report.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as IssueTypesAPI from 'cloudflare/resources/intel/attack-surface-report/issue-types'; -import * as IssuesAPI from 'cloudflare/resources/intel/attack-surface-report/issues'; +import { APIResource } from '../../../resource'; +import * as IssueTypesAPI from './issue-types'; +import * as IssuesAPI from './issues'; export class AttackSurfaceReport extends APIResource { issueTypes: IssueTypesAPI.IssueTypes = new IssueTypesAPI.IssueTypes(this._client); diff --git a/src/resources/intel/attack-surface-report/issue-types.ts b/src/resources/intel/attack-surface-report/issue-types.ts index d1f7f7e85d..389bcb4bec 100644 --- a/src/resources/intel/attack-surface-report/issue-types.ts +++ b/src/resources/intel/attack-surface-report/issue-types.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as IssueTypesAPI from 'cloudflare/resources/intel/attack-surface-report/issue-types'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as IssueTypesAPI from './issue-types'; export class IssueTypes extends APIResource { /** diff --git a/src/resources/intel/attack-surface-report/issues.ts b/src/resources/intel/attack-surface-report/issues.ts index b8cb78c76e..2dbbf68b27 100644 --- a/src/resources/intel/attack-surface-report/issues.ts +++ b/src/resources/intel/attack-surface-report/issues.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as IssuesAPI from 'cloudflare/resources/intel/attack-surface-report/issues'; -import * as Shared from 'cloudflare/resources/shared'; -import { V4PagePagination, type V4PagePaginationParams } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as IssuesAPI from './issues'; +import * as Shared from '../../shared'; +import { V4PagePagination, type V4PagePaginationParams } from '../../../pagination'; export class Issues extends APIResource { /** diff --git a/src/resources/intel/dns.ts b/src/resources/intel/dns.ts index 682a0017df..c2ea97f731 100644 --- a/src/resources/intel/dns.ts +++ b/src/resources/intel/dns.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DNSAPI from 'cloudflare/resources/intel/dns'; -import * as Shared from 'cloudflare/resources/shared'; -import { V4PagePagination, type V4PagePaginationParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as DNSAPI from './dns'; +import * as Shared from '../shared'; +import { V4PagePagination, type V4PagePaginationParams } from '../../pagination'; export class DNS extends APIResource { /** diff --git a/src/resources/intel/domain-history.ts b/src/resources/intel/domain-history.ts index e637ba4ae6..49673721a9 100644 --- a/src/resources/intel/domain-history.ts +++ b/src/resources/intel/domain-history.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DomainHistoryAPI from 'cloudflare/resources/intel/domain-history'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as DomainHistoryAPI from './domain-history'; export class DomainHistoryResource extends APIResource { /** diff --git a/src/resources/intel/domains/bulks.ts b/src/resources/intel/domains/bulks.ts index 91689524ca..f3ab2a65b1 100644 --- a/src/resources/intel/domains/bulks.ts +++ b/src/resources/intel/domains/bulks.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as BulksAPI from 'cloudflare/resources/intel/domains/bulks'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as BulksAPI from './bulks'; export class Bulks extends APIResource { /** diff --git a/src/resources/intel/domains/domains.ts b/src/resources/intel/domains/domains.ts index a38dc03d65..64b9c6430d 100644 --- a/src/resources/intel/domains/domains.ts +++ b/src/resources/intel/domains/domains.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DomainsAPI from 'cloudflare/resources/intel/domains/domains'; -import * as BulksAPI from 'cloudflare/resources/intel/domains/bulks'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as DomainsAPI from './domains'; +import * as BulksAPI from './bulks'; export class Domains extends APIResource { bulks: BulksAPI.Bulks = new BulksAPI.Bulks(this._client); diff --git a/src/resources/intel/indicator-feeds/indicator-feeds.ts b/src/resources/intel/indicator-feeds/indicator-feeds.ts index 11143246dd..45789b11c1 100644 --- a/src/resources/intel/indicator-feeds/indicator-feeds.ts +++ b/src/resources/intel/indicator-feeds/indicator-feeds.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as IndicatorFeedsAPI from 'cloudflare/resources/intel/indicator-feeds/indicator-feeds'; -import * as PermissionsAPI from 'cloudflare/resources/intel/indicator-feeds/permissions'; -import * as SnapshotsAPI from 'cloudflare/resources/intel/indicator-feeds/snapshots'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as IndicatorFeedsAPI from './indicator-feeds'; +import * as PermissionsAPI from './permissions'; +import * as SnapshotsAPI from './snapshots'; +import { SinglePage } from '../../../pagination'; export class IndicatorFeeds extends APIResource { snapshots: SnapshotsAPI.Snapshots = new SnapshotsAPI.Snapshots(this._client); diff --git a/src/resources/intel/indicator-feeds/permissions.ts b/src/resources/intel/indicator-feeds/permissions.ts index 77af94151f..44584cd529 100644 --- a/src/resources/intel/indicator-feeds/permissions.ts +++ b/src/resources/intel/indicator-feeds/permissions.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PermissionsAPI from 'cloudflare/resources/intel/indicator-feeds/permissions'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as PermissionsAPI from './permissions'; export class Permissions extends APIResource { /** diff --git a/src/resources/intel/indicator-feeds/snapshots.ts b/src/resources/intel/indicator-feeds/snapshots.ts index 060aee2835..9020b8fa91 100644 --- a/src/resources/intel/indicator-feeds/snapshots.ts +++ b/src/resources/intel/indicator-feeds/snapshots.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SnapshotsAPI from 'cloudflare/resources/intel/indicator-feeds/snapshots'; -import { multipartFormRequestOptions } from 'cloudflare/core'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as SnapshotsAPI from './snapshots'; +import { multipartFormRequestOptions } from '../../../core'; export class Snapshots extends APIResource { /** diff --git a/src/resources/intel/intel.ts b/src/resources/intel/intel.ts index 2b0881b649..0e079b060e 100644 --- a/src/resources/intel/intel.ts +++ b/src/resources/intel/intel.ts @@ -1,17 +1,17 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as DNSAPI from 'cloudflare/resources/intel/dns'; -import * as DomainHistoryAPI from 'cloudflare/resources/intel/domain-history'; -import * as IPListsAPI from 'cloudflare/resources/intel/ip-lists'; -import * as IPsAPI from 'cloudflare/resources/intel/ips'; -import * as MiscategorizationsAPI from 'cloudflare/resources/intel/miscategorizations'; -import * as SinkholesAPI from 'cloudflare/resources/intel/sinkholes'; -import * as WhoisAPI from 'cloudflare/resources/intel/whois'; -import * as ASNAPI from 'cloudflare/resources/intel/asn/asn'; -import * as AttackSurfaceReportAPI from 'cloudflare/resources/intel/attack-surface-report/attack-surface-report'; -import * as DomainsAPI from 'cloudflare/resources/intel/domains/domains'; -import * as IndicatorFeedsAPI from 'cloudflare/resources/intel/indicator-feeds/indicator-feeds'; +import { APIResource } from '../../resource'; +import * as DNSAPI from './dns'; +import * as DomainHistoryAPI from './domain-history'; +import * as IPListsAPI from './ip-lists'; +import * as IPsAPI from './ips'; +import * as MiscategorizationsAPI from './miscategorizations'; +import * as SinkholesAPI from './sinkholes'; +import * as WhoisAPI from './whois'; +import * as ASNAPI from './asn/asn'; +import * as AttackSurfaceReportAPI from './attack-surface-report/attack-surface-report'; +import * as DomainsAPI from './domains/domains'; +import * as IndicatorFeedsAPI from './indicator-feeds/indicator-feeds'; export class Intel extends APIResource { asn: ASNAPI.ASN = new ASNAPI.ASN(this._client); diff --git a/src/resources/intel/ip-lists.ts b/src/resources/intel/ip-lists.ts index b7f51f3a25..1a7d70d266 100644 --- a/src/resources/intel/ip-lists.ts +++ b/src/resources/intel/ip-lists.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as IPListsAPI from 'cloudflare/resources/intel/ip-lists'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as IPListsAPI from './ip-lists'; export class IPLists extends APIResource { /** diff --git a/src/resources/intel/ips.ts b/src/resources/intel/ips.ts index 629fc7124b..0f23dad420 100644 --- a/src/resources/intel/ips.ts +++ b/src/resources/intel/ips.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as IPsAPI from 'cloudflare/resources/intel/ips'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as IPsAPI from './ips'; export class IPs extends APIResource { /** diff --git a/src/resources/intel/miscategorizations.ts b/src/resources/intel/miscategorizations.ts index d08553da57..fe51cc3da9 100644 --- a/src/resources/intel/miscategorizations.ts +++ b/src/resources/intel/miscategorizations.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as MiscategorizationsAPI from 'cloudflare/resources/intel/miscategorizations'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as MiscategorizationsAPI from './miscategorizations'; export class Miscategorizations extends APIResource { /** diff --git a/src/resources/intel/sinkholes.ts b/src/resources/intel/sinkholes.ts index 2c6a44c4e7..8b4307d2a4 100644 --- a/src/resources/intel/sinkholes.ts +++ b/src/resources/intel/sinkholes.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SinkholesAPI from 'cloudflare/resources/intel/sinkholes'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as SinkholesAPI from './sinkholes'; +import { SinglePage } from '../../pagination'; export class Sinkholes extends APIResource { /** diff --git a/src/resources/intel/whois.ts b/src/resources/intel/whois.ts index 13ff51be30..d7b8e0a2ce 100644 --- a/src/resources/intel/whois.ts +++ b/src/resources/intel/whois.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as WhoisAPI from 'cloudflare/resources/intel/whois'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as WhoisAPI from './whois'; export class Whois extends APIResource { /** diff --git a/src/resources/ips.ts b/src/resources/ips.ts index 93a91a1596..c16761d51d 100644 --- a/src/resources/ips.ts +++ b/src/resources/ips.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; +import * as Core from '../core'; +import { APIResource } from '../resource'; +import { isRequestOptions } from '../core'; export class IPs extends APIResource { /** diff --git a/src/resources/keyless-certificates.ts b/src/resources/keyless-certificates.ts index d9eae0ca16..0eb0d7d9bd 100644 --- a/src/resources/keyless-certificates.ts +++ b/src/resources/keyless-certificates.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as CustomHostnamesAPI from 'cloudflare/resources/custom-hostnames/custom-hostnames'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../core'; +import { APIResource } from '../resource'; +import * as CustomHostnamesAPI from './custom-hostnames/custom-hostnames'; +import { SinglePage } from '../pagination'; export class KeylessCertificates extends APIResource { /** diff --git a/src/resources/kv/kv.ts b/src/resources/kv/kv.ts index 2c2ba67b3f..581d6ef2ed 100644 --- a/src/resources/kv/kv.ts +++ b/src/resources/kv/kv.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as NamespacesAPI from 'cloudflare/resources/kv/namespaces/namespaces'; +import { APIResource } from '../../resource'; +import * as NamespacesAPI from './namespaces/namespaces'; export class KV extends APIResource { namespaces: NamespacesAPI.Namespaces = new NamespacesAPI.Namespaces(this._client); diff --git a/src/resources/kv/namespaces/bulk.ts b/src/resources/kv/namespaces/bulk.ts index 525dc771ad..3940b013c9 100644 --- a/src/resources/kv/namespaces/bulk.ts +++ b/src/resources/kv/namespaces/bulk.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as BulkAPI from 'cloudflare/resources/kv/namespaces/bulk'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as BulkAPI from './bulk'; export class Bulk extends APIResource { /** diff --git a/src/resources/kv/namespaces/keys.ts b/src/resources/kv/namespaces/keys.ts index 0cb3be07df..17b2c45673 100644 --- a/src/resources/kv/namespaces/keys.ts +++ b/src/resources/kv/namespaces/keys.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as KeysAPI from 'cloudflare/resources/kv/namespaces/keys'; -import { CursorLimitPagination, type CursorLimitPaginationParams } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as KeysAPI from './keys'; +import { CursorLimitPagination, type CursorLimitPaginationParams } from '../../../pagination'; export class Keys extends APIResource { /** diff --git a/src/resources/kv/namespaces/metadata.ts b/src/resources/kv/namespaces/metadata.ts index 2db47b252a..1d027bf657 100644 --- a/src/resources/kv/namespaces/metadata.ts +++ b/src/resources/kv/namespaces/metadata.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as MetadataAPI from 'cloudflare/resources/kv/namespaces/metadata'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as MetadataAPI from './metadata'; export class Metadata extends APIResource { /** diff --git a/src/resources/kv/namespaces/namespaces.ts b/src/resources/kv/namespaces/namespaces.ts index 953767e2c2..8450b03859 100644 --- a/src/resources/kv/namespaces/namespaces.ts +++ b/src/resources/kv/namespaces/namespaces.ts @@ -1,13 +1,13 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as NamespacesAPI from 'cloudflare/resources/kv/namespaces/namespaces'; -import * as BulkAPI from 'cloudflare/resources/kv/namespaces/bulk'; -import * as KeysAPI from 'cloudflare/resources/kv/namespaces/keys'; -import * as MetadataAPI from 'cloudflare/resources/kv/namespaces/metadata'; -import * as ValuesAPI from 'cloudflare/resources/kv/namespaces/values'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as NamespacesAPI from './namespaces'; +import * as BulkAPI from './bulk'; +import * as KeysAPI from './keys'; +import * as MetadataAPI from './metadata'; +import * as ValuesAPI from './values'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; export class Namespaces extends APIResource { bulk: BulkAPI.Bulk = new BulkAPI.Bulk(this._client); diff --git a/src/resources/kv/namespaces/values.ts b/src/resources/kv/namespaces/values.ts index b0d4351da2..9bb679348b 100644 --- a/src/resources/kv/namespaces/values.ts +++ b/src/resources/kv/namespaces/values.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ValuesAPI from 'cloudflare/resources/kv/namespaces/values'; -import { multipartFormRequestOptions } from 'cloudflare/core'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ValuesAPI from './values'; +import { multipartFormRequestOptions } from '../../../core'; export class Values extends APIResource { /** diff --git a/src/resources/load-balancers/load-balancers.ts b/src/resources/load-balancers/load-balancers.ts index b0055df342..1d4aeb3720 100644 --- a/src/resources/load-balancers/load-balancers.ts +++ b/src/resources/load-balancers/load-balancers.ts @@ -1,14 +1,14 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as LoadBalancersAPI from 'cloudflare/resources/load-balancers/load-balancers'; -import * as PreviewsAPI from 'cloudflare/resources/load-balancers/previews'; -import * as RegionsAPI from 'cloudflare/resources/load-balancers/regions'; -import * as SearchesAPI from 'cloudflare/resources/load-balancers/searches'; -import * as MonitorsAPI from 'cloudflare/resources/load-balancers/monitors/monitors'; -import * as PoolsAPI from 'cloudflare/resources/load-balancers/pools/pools'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as LoadBalancersAPI from './load-balancers'; +import * as PreviewsAPI from './previews'; +import * as RegionsAPI from './regions'; +import * as SearchesAPI from './searches'; +import * as MonitorsAPI from './monitors/monitors'; +import * as PoolsAPI from './pools/pools'; +import { SinglePage } from '../../pagination'; export class LoadBalancers extends APIResource { monitors: MonitorsAPI.Monitors = new MonitorsAPI.Monitors(this._client); diff --git a/src/resources/load-balancers/monitors/monitors.ts b/src/resources/load-balancers/monitors/monitors.ts index cb297d1cd4..81e9b4f47b 100644 --- a/src/resources/load-balancers/monitors/monitors.ts +++ b/src/resources/load-balancers/monitors/monitors.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as MonitorsAPI from 'cloudflare/resources/load-balancers/monitors/monitors'; -import * as PreviewsAPI from 'cloudflare/resources/load-balancers/monitors/previews'; -import * as ReferencesAPI from 'cloudflare/resources/load-balancers/monitors/references'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as MonitorsAPI from './monitors'; +import * as PreviewsAPI from './previews'; +import * as ReferencesAPI from './references'; +import { SinglePage } from '../../../pagination'; export class Monitors extends APIResource { previews: PreviewsAPI.Previews = new PreviewsAPI.Previews(this._client); diff --git a/src/resources/load-balancers/monitors/previews.ts b/src/resources/load-balancers/monitors/previews.ts index 6fa3d7d31e..951d269a52 100644 --- a/src/resources/load-balancers/monitors/previews.ts +++ b/src/resources/load-balancers/monitors/previews.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PreviewsAPI from 'cloudflare/resources/load-balancers/monitors/previews'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as PreviewsAPI from './previews'; export class Previews extends APIResource { /** diff --git a/src/resources/load-balancers/monitors/references.ts b/src/resources/load-balancers/monitors/references.ts index 6128aca377..78dc854ffe 100644 --- a/src/resources/load-balancers/monitors/references.ts +++ b/src/resources/load-balancers/monitors/references.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ReferencesAPI from 'cloudflare/resources/load-balancers/monitors/references'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ReferencesAPI from './references'; export class References extends APIResource { /** diff --git a/src/resources/load-balancers/pools/health.ts b/src/resources/load-balancers/pools/health.ts index 3ac8f73f60..8d19df803a 100644 --- a/src/resources/load-balancers/pools/health.ts +++ b/src/resources/load-balancers/pools/health.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as HealthAPI from 'cloudflare/resources/load-balancers/pools/health'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as HealthAPI from './health'; export class Health extends APIResource { /** diff --git a/src/resources/load-balancers/pools/pools.ts b/src/resources/load-balancers/pools/pools.ts index 4bc7474921..cc801cacbd 100644 --- a/src/resources/load-balancers/pools/pools.ts +++ b/src/resources/load-balancers/pools/pools.ts @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PoolsAPI from 'cloudflare/resources/load-balancers/pools/pools'; -import * as LoadBalancersAPI from 'cloudflare/resources/load-balancers/load-balancers'; -import * as HealthAPI from 'cloudflare/resources/load-balancers/pools/health'; -import * as ReferencesAPI from 'cloudflare/resources/load-balancers/pools/references'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as PoolsAPI from './pools'; +import * as LoadBalancersAPI from '../load-balancers'; +import * as HealthAPI from './health'; +import * as ReferencesAPI from './references'; +import { SinglePage } from '../../../pagination'; export class Pools extends APIResource { health: HealthAPI.Health = new HealthAPI.Health(this._client); diff --git a/src/resources/load-balancers/pools/references.ts b/src/resources/load-balancers/pools/references.ts index 59ee1f6e0d..832b2b2fc1 100644 --- a/src/resources/load-balancers/pools/references.ts +++ b/src/resources/load-balancers/pools/references.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ReferencesAPI from 'cloudflare/resources/load-balancers/pools/references'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ReferencesAPI from './references'; export class References extends APIResource { /** diff --git a/src/resources/load-balancers/previews.ts b/src/resources/load-balancers/previews.ts index 1dbb508134..c10e744099 100644 --- a/src/resources/load-balancers/previews.ts +++ b/src/resources/load-balancers/previews.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PreviewsAPI from 'cloudflare/resources/load-balancers/previews'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as PreviewsAPI from './previews'; export class Previews extends APIResource { /** diff --git a/src/resources/load-balancers/regions.ts b/src/resources/load-balancers/regions.ts index 660f8428c5..db9424ea0c 100644 --- a/src/resources/load-balancers/regions.ts +++ b/src/resources/load-balancers/regions.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as RegionsAPI from 'cloudflare/resources/load-balancers/regions'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as RegionsAPI from './regions'; export class Regions extends APIResource { /** diff --git a/src/resources/load-balancers/searches.ts b/src/resources/load-balancers/searches.ts index 8f5250d3db..e888f01345 100644 --- a/src/resources/load-balancers/searches.ts +++ b/src/resources/load-balancers/searches.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SearchesAPI from 'cloudflare/resources/load-balancers/searches'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as SearchesAPI from './searches'; export class Searches extends APIResource { /** diff --git a/src/resources/logpush/datasets/datasets.ts b/src/resources/logpush/datasets/datasets.ts index 607ea4890b..901686e865 100644 --- a/src/resources/logpush/datasets/datasets.ts +++ b/src/resources/logpush/datasets/datasets.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as FieldsAPI from 'cloudflare/resources/logpush/datasets/fields'; -import * as JobsAPI from 'cloudflare/resources/logpush/datasets/jobs'; +import { APIResource } from '../../../resource'; +import * as FieldsAPI from './fields'; +import * as JobsAPI from './jobs'; export class Datasets extends APIResource { fields: FieldsAPI.Fields = new FieldsAPI.Fields(this._client); diff --git a/src/resources/logpush/datasets/fields.ts b/src/resources/logpush/datasets/fields.ts index 11c201e10c..29f483f652 100644 --- a/src/resources/logpush/datasets/fields.ts +++ b/src/resources/logpush/datasets/fields.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { CloudflareError } from 'cloudflare/error'; -import * as FieldsAPI from 'cloudflare/resources/logpush/datasets/fields'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import { CloudflareError } from '../../../error'; +import * as FieldsAPI from './fields'; export class Fields extends APIResource { /** diff --git a/src/resources/logpush/datasets/jobs.ts b/src/resources/logpush/datasets/jobs.ts index d9814402d4..e04a74c299 100644 --- a/src/resources/logpush/datasets/jobs.ts +++ b/src/resources/logpush/datasets/jobs.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { CloudflareError } from 'cloudflare/error'; -import * as DatasetsJobsAPI from 'cloudflare/resources/logpush/datasets/jobs'; -import * as JobsAPI from 'cloudflare/resources/logpush/jobs'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import { CloudflareError } from '../../../error'; +import * as DatasetsJobsAPI from './jobs'; +import * as JobsAPI from '../jobs'; export class Jobs extends APIResource { /** diff --git a/src/resources/logpush/edge.ts b/src/resources/logpush/edge.ts index 7dd7df61b8..ec96d04dc0 100644 --- a/src/resources/logpush/edge.ts +++ b/src/resources/logpush/edge.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as EdgeAPI from 'cloudflare/resources/logpush/edge'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as EdgeAPI from './edge'; export class Edge extends APIResource { /** diff --git a/src/resources/logpush/jobs.ts b/src/resources/logpush/jobs.ts index adb63d26cc..5e81418d40 100644 --- a/src/resources/logpush/jobs.ts +++ b/src/resources/logpush/jobs.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { CloudflareError } from 'cloudflare/error'; -import * as JobsAPI from 'cloudflare/resources/logpush/jobs'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import { CloudflareError } from '../../error'; +import * as JobsAPI from './jobs'; +import { SinglePage } from '../../pagination'; export class Jobs extends APIResource { /** diff --git a/src/resources/logpush/logpush.ts b/src/resources/logpush/logpush.ts index e7e47c9c23..97fa183fdd 100644 --- a/src/resources/logpush/logpush.ts +++ b/src/resources/logpush/logpush.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as EdgeAPI from 'cloudflare/resources/logpush/edge'; -import * as JobsAPI from 'cloudflare/resources/logpush/jobs'; -import * as OwnershipAPI from 'cloudflare/resources/logpush/ownership'; -import * as ValidateAPI from 'cloudflare/resources/logpush/validate'; -import * as DatasetsAPI from 'cloudflare/resources/logpush/datasets/datasets'; +import { APIResource } from '../../resource'; +import * as EdgeAPI from './edge'; +import * as JobsAPI from './jobs'; +import * as OwnershipAPI from './ownership'; +import * as ValidateAPI from './validate'; +import * as DatasetsAPI from './datasets/datasets'; export class Logpush extends APIResource { datasets: DatasetsAPI.Datasets = new DatasetsAPI.Datasets(this._client); diff --git a/src/resources/logpush/ownership.ts b/src/resources/logpush/ownership.ts index cb0c76e08e..ca74a04a0f 100644 --- a/src/resources/logpush/ownership.ts +++ b/src/resources/logpush/ownership.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { CloudflareError } from 'cloudflare/error'; -import * as OwnershipAPI from 'cloudflare/resources/logpush/ownership'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { CloudflareError } from '../../error'; +import * as OwnershipAPI from './ownership'; export class Ownership extends APIResource { /** diff --git a/src/resources/logpush/validate.ts b/src/resources/logpush/validate.ts index 3136a0a3f7..5cf2adce3a 100644 --- a/src/resources/logpush/validate.ts +++ b/src/resources/logpush/validate.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { CloudflareError } from 'cloudflare/error'; -import * as ValidateAPI from 'cloudflare/resources/logpush/validate'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { CloudflareError } from '../../error'; +import * as ValidateAPI from './validate'; export class Validate extends APIResource { /** diff --git a/src/resources/logs/control/cmb/cmb.ts b/src/resources/logs/control/cmb/cmb.ts index 991696219f..8009e1085e 100644 --- a/src/resources/logs/control/cmb/cmb.ts +++ b/src/resources/logs/control/cmb/cmb.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as ConfigAPI from 'cloudflare/resources/logs/control/cmb/config'; +import { APIResource } from '../../../../resource'; +import * as ConfigAPI from './config'; export class Cmb extends APIResource { config: ConfigAPI.Config = new ConfigAPI.Config(this._client); diff --git a/src/resources/logs/control/cmb/config.ts b/src/resources/logs/control/cmb/config.ts index a9546cdaeb..b02a883d85 100644 --- a/src/resources/logs/control/cmb/config.ts +++ b/src/resources/logs/control/cmb/config.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ConfigAPI from 'cloudflare/resources/logs/control/cmb/config'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as ConfigAPI from './config'; export class Config extends APIResource { /** diff --git a/src/resources/logs/control/control.ts b/src/resources/logs/control/control.ts index f2a6572076..47a0cc332f 100644 --- a/src/resources/logs/control/control.ts +++ b/src/resources/logs/control/control.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as CmbAPI from 'cloudflare/resources/logs/control/cmb/cmb'; -import * as RetentionAPI from 'cloudflare/resources/logs/control/retention/retention'; +import { APIResource } from '../../../resource'; +import * as CmbAPI from './cmb/cmb'; +import * as RetentionAPI from './retention/retention'; export class Control extends APIResource { retention: RetentionAPI.Retention = new RetentionAPI.Retention(this._client); diff --git a/src/resources/logs/control/retention/flag.ts b/src/resources/logs/control/retention/flag.ts index 0b8122bb58..b153a8c656 100644 --- a/src/resources/logs/control/retention/flag.ts +++ b/src/resources/logs/control/retention/flag.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as FlagAPI from 'cloudflare/resources/logs/control/retention/flag'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as FlagAPI from './flag'; export class Flag extends APIResource { /** diff --git a/src/resources/logs/control/retention/retention.ts b/src/resources/logs/control/retention/retention.ts index 5cd890d1be..79e8195280 100644 --- a/src/resources/logs/control/retention/retention.ts +++ b/src/resources/logs/control/retention/retention.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as FlagAPI from 'cloudflare/resources/logs/control/retention/flag'; +import { APIResource } from '../../../../resource'; +import * as FlagAPI from './flag'; export class Retention extends APIResource { flag: FlagAPI.Flag = new FlagAPI.Flag(this._client); diff --git a/src/resources/logs/logs.ts b/src/resources/logs/logs.ts index 85706a04ee..97d33bfd3d 100644 --- a/src/resources/logs/logs.ts +++ b/src/resources/logs/logs.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as RayIDAPI from 'cloudflare/resources/logs/rayid'; -import * as ControlAPI from 'cloudflare/resources/logs/control/control'; -import * as ReceivedAPI from 'cloudflare/resources/logs/received/received'; +import { APIResource } from '../../resource'; +import * as RayIDAPI from './rayid'; +import * as ControlAPI from './control/control'; +import * as ReceivedAPI from './received/received'; export class Logs extends APIResource { control: ControlAPI.Control = new ControlAPI.Control(this._client); diff --git a/src/resources/logs/rayid.ts b/src/resources/logs/rayid.ts index ed70ce8bfb..67a1fe9c38 100644 --- a/src/resources/logs/rayid.ts +++ b/src/resources/logs/rayid.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as RayIDAPI from 'cloudflare/resources/logs/rayid'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import * as RayIDAPI from './rayid'; export class RayID extends APIResource { /** diff --git a/src/resources/logs/received/fields.ts b/src/resources/logs/received/fields.ts index b7186309c8..f96d3a0a60 100644 --- a/src/resources/logs/received/fields.ts +++ b/src/resources/logs/received/fields.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as FieldsAPI from 'cloudflare/resources/logs/received/fields'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as FieldsAPI from './fields'; export class Fields extends APIResource { /** diff --git a/src/resources/logs/received/received.ts b/src/resources/logs/received/received.ts index 27ead9879f..bf6fddae18 100644 --- a/src/resources/logs/received/received.ts +++ b/src/resources/logs/received/received.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ReceivedAPI from 'cloudflare/resources/logs/received/received'; -import * as FieldsAPI from 'cloudflare/resources/logs/received/fields'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ReceivedAPI from './received'; +import * as FieldsAPI from './fields'; export class Received extends APIResource { fields: FieldsAPI.Fields = new FieldsAPI.Fields(this._client); diff --git a/src/resources/magic-network-monitoring/configs/configs.ts b/src/resources/magic-network-monitoring/configs/configs.ts index f14f989741..e5c496687d 100644 --- a/src/resources/magic-network-monitoring/configs/configs.ts +++ b/src/resources/magic-network-monitoring/configs/configs.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ConfigsAPI from 'cloudflare/resources/magic-network-monitoring/configs/configs'; -import * as FullAPI from 'cloudflare/resources/magic-network-monitoring/configs/full'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ConfigsAPI from './configs'; +import * as FullAPI from './full'; export class Configs extends APIResource { full: FullAPI.Full = new FullAPI.Full(this._client); diff --git a/src/resources/magic-network-monitoring/configs/full.ts b/src/resources/magic-network-monitoring/configs/full.ts index 493ec68121..066b65b273 100644 --- a/src/resources/magic-network-monitoring/configs/full.ts +++ b/src/resources/magic-network-monitoring/configs/full.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as FullAPI from 'cloudflare/resources/magic-network-monitoring/configs/full'; -import * as ConfigsAPI from 'cloudflare/resources/magic-network-monitoring/configs/configs'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as FullAPI from './full'; +import * as ConfigsAPI from './configs'; export class Full extends APIResource { /** diff --git a/src/resources/magic-network-monitoring/magic-network-monitoring.ts b/src/resources/magic-network-monitoring/magic-network-monitoring.ts index 48e60045fc..f717cb98ba 100644 --- a/src/resources/magic-network-monitoring/magic-network-monitoring.ts +++ b/src/resources/magic-network-monitoring/magic-network-monitoring.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as ConfigsAPI from 'cloudflare/resources/magic-network-monitoring/configs/configs'; -import * as RulesAPI from 'cloudflare/resources/magic-network-monitoring/rules/rules'; +import { APIResource } from '../../resource'; +import * as ConfigsAPI from './configs/configs'; +import * as RulesAPI from './rules/rules'; export class MagicNetworkMonitoring extends APIResource { configs: ConfigsAPI.Configs = new ConfigsAPI.Configs(this._client); diff --git a/src/resources/magic-network-monitoring/rules/advertisements.ts b/src/resources/magic-network-monitoring/rules/advertisements.ts index 62cd5ab886..e9fed635b8 100644 --- a/src/resources/magic-network-monitoring/rules/advertisements.ts +++ b/src/resources/magic-network-monitoring/rules/advertisements.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AdvertisementsAPI from 'cloudflare/resources/magic-network-monitoring/rules/advertisements'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as AdvertisementsAPI from './advertisements'; export class Advertisements extends APIResource { /** diff --git a/src/resources/magic-network-monitoring/rules/rules.ts b/src/resources/magic-network-monitoring/rules/rules.ts index 0a35d27bf6..ae73811ce8 100644 --- a/src/resources/magic-network-monitoring/rules/rules.ts +++ b/src/resources/magic-network-monitoring/rules/rules.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as RulesAPI from 'cloudflare/resources/magic-network-monitoring/rules/rules'; -import * as AdvertisementsAPI from 'cloudflare/resources/magic-network-monitoring/rules/advertisements'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as RulesAPI from './rules'; +import * as AdvertisementsAPI from './advertisements'; +import { SinglePage } from '../../../pagination'; export class Rules extends APIResource { advertisements: AdvertisementsAPI.Advertisements = new AdvertisementsAPI.Advertisements(this._client); diff --git a/src/resources/magic-transit/cf-interconnects.ts b/src/resources/magic-transit/cf-interconnects.ts index b3f5aefc4c..ac68244ffe 100644 --- a/src/resources/magic-transit/cf-interconnects.ts +++ b/src/resources/magic-transit/cf-interconnects.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as CfInterconnectsAPI from 'cloudflare/resources/magic-transit/cf-interconnects'; -import * as MagicTransitAPI from 'cloudflare/resources/magic-transit/magic-transit'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as CfInterconnectsAPI from './cf-interconnects'; +import * as MagicTransitAPI from './magic-transit'; export class CfInterconnects extends APIResource { /** diff --git a/src/resources/magic-transit/gre-tunnels.ts b/src/resources/magic-transit/gre-tunnels.ts index ab4f7fc398..7f2ed87e41 100644 --- a/src/resources/magic-transit/gre-tunnels.ts +++ b/src/resources/magic-transit/gre-tunnels.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as GRETunnelsAPI from 'cloudflare/resources/magic-transit/gre-tunnels'; -import * as MagicTransitAPI from 'cloudflare/resources/magic-transit/magic-transit'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as GRETunnelsAPI from './gre-tunnels'; +import * as MagicTransitAPI from './magic-transit'; export class GRETunnels extends APIResource { /** diff --git a/src/resources/magic-transit/ipsec-tunnels.ts b/src/resources/magic-transit/ipsec-tunnels.ts index 0f6ceed908..11e02de15d 100644 --- a/src/resources/magic-transit/ipsec-tunnels.ts +++ b/src/resources/magic-transit/ipsec-tunnels.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as IPSECTunnelsAPI from 'cloudflare/resources/magic-transit/ipsec-tunnels'; -import * as MagicTransitAPI from 'cloudflare/resources/magic-transit/magic-transit'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as IPSECTunnelsAPI from './ipsec-tunnels'; +import * as MagicTransitAPI from './magic-transit'; export class IPSECTunnels extends APIResource { /** diff --git a/src/resources/magic-transit/magic-transit.ts b/src/resources/magic-transit/magic-transit.ts index f5fd5c4cc2..3489ec3379 100644 --- a/src/resources/magic-transit/magic-transit.ts +++ b/src/resources/magic-transit/magic-transit.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as CfInterconnectsAPI from 'cloudflare/resources/magic-transit/cf-interconnects'; -import * as GRETunnelsAPI from 'cloudflare/resources/magic-transit/gre-tunnels'; -import * as IPSECTunnelsAPI from 'cloudflare/resources/magic-transit/ipsec-tunnels'; -import * as RoutesAPI from 'cloudflare/resources/magic-transit/routes'; -import * as SitesAPI from 'cloudflare/resources/magic-transit/sites/sites'; +import { APIResource } from '../../resource'; +import * as CfInterconnectsAPI from './cf-interconnects'; +import * as GRETunnelsAPI from './gre-tunnels'; +import * as IPSECTunnelsAPI from './ipsec-tunnels'; +import * as RoutesAPI from './routes'; +import * as SitesAPI from './sites/sites'; export class MagicTransit extends APIResource { cfInterconnects: CfInterconnectsAPI.CfInterconnects = new CfInterconnectsAPI.CfInterconnects(this._client); diff --git a/src/resources/magic-transit/routes.ts b/src/resources/magic-transit/routes.ts index db499da07e..e9183a3481 100644 --- a/src/resources/magic-transit/routes.ts +++ b/src/resources/magic-transit/routes.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as RoutesAPI from 'cloudflare/resources/magic-transit/routes'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as RoutesAPI from './routes'; export class Routes extends APIResource { /** diff --git a/src/resources/magic-transit/sites/acls.ts b/src/resources/magic-transit/sites/acls.ts index 285c1b758c..8b370b2383 100644 --- a/src/resources/magic-transit/sites/acls.ts +++ b/src/resources/magic-transit/sites/acls.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ACLsAPI from 'cloudflare/resources/magic-transit/sites/acls'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ACLsAPI from './acls'; +import { SinglePage } from '../../../pagination'; export class ACLs extends APIResource { /** diff --git a/src/resources/magic-transit/sites/lans.ts b/src/resources/magic-transit/sites/lans.ts index f92a7c91cb..944bc980bd 100644 --- a/src/resources/magic-transit/sites/lans.ts +++ b/src/resources/magic-transit/sites/lans.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as LANsAPI from 'cloudflare/resources/magic-transit/sites/lans'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as LANsAPI from './lans'; +import { SinglePage } from '../../../pagination'; export class LANs extends APIResource { /** diff --git a/src/resources/magic-transit/sites/sites.ts b/src/resources/magic-transit/sites/sites.ts index 0fae34dfb8..a85ad5d8d0 100644 --- a/src/resources/magic-transit/sites/sites.ts +++ b/src/resources/magic-transit/sites/sites.ts @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SitesAPI from 'cloudflare/resources/magic-transit/sites/sites'; -import * as ACLsAPI from 'cloudflare/resources/magic-transit/sites/acls'; -import * as LANsAPI from 'cloudflare/resources/magic-transit/sites/lans'; -import * as WANsAPI from 'cloudflare/resources/magic-transit/sites/wans'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as SitesAPI from './sites'; +import * as ACLsAPI from './acls'; +import * as LANsAPI from './lans'; +import * as WANsAPI from './wans'; +import { SinglePage } from '../../../pagination'; export class Sites extends APIResource { acls: ACLsAPI.ACLs = new ACLsAPI.ACLs(this._client); diff --git a/src/resources/magic-transit/sites/wans.ts b/src/resources/magic-transit/sites/wans.ts index a1f9f6acb9..80ff42d5fb 100644 --- a/src/resources/magic-transit/sites/wans.ts +++ b/src/resources/magic-transit/sites/wans.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as WANsAPI from 'cloudflare/resources/magic-transit/sites/wans'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as WANsAPI from './wans'; +import { SinglePage } from '../../../pagination'; export class WANs extends APIResource { /** diff --git a/src/resources/managed-headers.ts b/src/resources/managed-headers.ts index 3a657c6d7c..b5d201762b 100644 --- a/src/resources/managed-headers.ts +++ b/src/resources/managed-headers.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; +import * as Core from '../core'; +import { APIResource } from '../resource'; export class ManagedHeaders extends APIResource { /** diff --git a/src/resources/memberships.ts b/src/resources/memberships.ts index a9e141fe19..530f3ce5cc 100644 --- a/src/resources/memberships.ts +++ b/src/resources/memberships.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as Shared from 'cloudflare/resources/shared'; -import * as AccountsAPI from 'cloudflare/resources/accounts/accounts'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../core'; +import { APIResource } from '../resource'; +import { isRequestOptions } from '../core'; +import * as Shared from './shared'; +import * as AccountsAPI from './accounts/accounts'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../pagination'; export class Memberships extends APIResource { /** diff --git a/src/resources/mtls-certificates/associations.ts b/src/resources/mtls-certificates/associations.ts index f54e8486fe..c074e95c8e 100644 --- a/src/resources/mtls-certificates/associations.ts +++ b/src/resources/mtls-certificates/associations.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AssociationsAPI from 'cloudflare/resources/mtls-certificates/associations'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as AssociationsAPI from './associations'; export class Associations extends APIResource { /** diff --git a/src/resources/mtls-certificates/mtls-certificates.ts b/src/resources/mtls-certificates/mtls-certificates.ts index 025fa5d9c3..22cfbf07db 100644 --- a/src/resources/mtls-certificates/mtls-certificates.ts +++ b/src/resources/mtls-certificates/mtls-certificates.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AssociationsAPI from 'cloudflare/resources/mtls-certificates/associations'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as AssociationsAPI from './associations'; +import { SinglePage } from '../../pagination'; export class MTLSCertificates extends APIResource { associations: AssociationsAPI.Associations = new AssociationsAPI.Associations(this._client); diff --git a/src/resources/origin-ca-certificates.ts b/src/resources/origin-ca-certificates.ts index 59425688f6..f210a48c39 100644 --- a/src/resources/origin-ca-certificates.ts +++ b/src/resources/origin-ca-certificates.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as Shared from 'cloudflare/resources/shared'; -import * as CertificatePacksAPI from 'cloudflare/resources/ssl/certificate-packs/certificate-packs'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../core'; +import { APIResource } from '../resource'; +import { isRequestOptions } from '../core'; +import * as Shared from './shared'; +import * as CertificatePacksAPI from './ssl/certificate-packs/certificate-packs'; +import { SinglePage } from '../pagination'; export class OriginCACertificates extends APIResource { /** diff --git a/src/resources/origin-post-quantum-encryption.ts b/src/resources/origin-post-quantum-encryption.ts index 86a1620df6..b327644619 100644 --- a/src/resources/origin-post-quantum-encryption.ts +++ b/src/resources/origin-post-quantum-encryption.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; +import * as Core from '../core'; +import { APIResource } from '../resource'; export class OriginPostQuantumEncryption extends APIResource { /** diff --git a/src/resources/origin-tls-client-auth/hostnames/certificates.ts b/src/resources/origin-tls-client-auth/hostnames/certificates.ts index 09f9a7c460..9c65801a4a 100644 --- a/src/resources/origin-tls-client-auth/hostnames/certificates.ts +++ b/src/resources/origin-tls-client-auth/hostnames/certificates.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as CertificatesAPI from 'cloudflare/resources/origin-tls-client-auth/hostnames/certificates'; -import * as HostnamesAPI from 'cloudflare/resources/origin-tls-client-auth/hostnames/hostnames'; -import { AuthenticatedOriginPullsSinglePage } from 'cloudflare/resources/origin-tls-client-auth/hostnames/hostnames'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as CertificatesAPI from './certificates'; +import * as HostnamesAPI from './hostnames'; +import { AuthenticatedOriginPullsSinglePage } from './hostnames'; export class Certificates extends APIResource { /** diff --git a/src/resources/origin-tls-client-auth/hostnames/hostnames.ts b/src/resources/origin-tls-client-auth/hostnames/hostnames.ts index 6063268c81..04142dbd8d 100644 --- a/src/resources/origin-tls-client-auth/hostnames/hostnames.ts +++ b/src/resources/origin-tls-client-auth/hostnames/hostnames.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as HostnamesAPI from 'cloudflare/resources/origin-tls-client-auth/hostnames/hostnames'; -import * as CertificatesAPI from 'cloudflare/resources/origin-tls-client-auth/hostnames/certificates'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as HostnamesAPI from './hostnames'; +import * as CertificatesAPI from './certificates'; +import { SinglePage } from '../../../pagination'; export class Hostnames extends APIResource { certificates: CertificatesAPI.Certificates = new CertificatesAPI.Certificates(this._client); diff --git a/src/resources/origin-tls-client-auth/origin-tls-client-auth.ts b/src/resources/origin-tls-client-auth/origin-tls-client-auth.ts index 15acaf904a..05259249ee 100644 --- a/src/resources/origin-tls-client-auth/origin-tls-client-auth.ts +++ b/src/resources/origin-tls-client-auth/origin-tls-client-auth.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SettingsAPI from 'cloudflare/resources/origin-tls-client-auth/settings'; -import * as HostnamesAPI from 'cloudflare/resources/origin-tls-client-auth/hostnames/hostnames'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as SettingsAPI from './settings'; +import * as HostnamesAPI from './hostnames/hostnames'; +import { SinglePage } from '../../pagination'; export class OriginTLSClientAuth extends APIResource { hostnames: HostnamesAPI.Hostnames = new HostnamesAPI.Hostnames(this._client); diff --git a/src/resources/origin-tls-client-auth/settings.ts b/src/resources/origin-tls-client-auth/settings.ts index dc1d507b6c..ba5bdbc692 100644 --- a/src/resources/origin-tls-client-auth/settings.ts +++ b/src/resources/origin-tls-client-auth/settings.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SettingsAPI from 'cloudflare/resources/origin-tls-client-auth/settings'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as SettingsAPI from './settings'; export class Settings extends APIResource { /** diff --git a/src/resources/page-shield/connections.ts b/src/resources/page-shield/connections.ts index a3b7ed1bc8..2c4b486609 100644 --- a/src/resources/page-shield/connections.ts +++ b/src/resources/page-shield/connections.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ConnectionsAPI from 'cloudflare/resources/page-shield/connections'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as ConnectionsAPI from './connections'; +import { SinglePage } from '../../pagination'; export class Connections extends APIResource { /** diff --git a/src/resources/page-shield/page-shield.ts b/src/resources/page-shield/page-shield.ts index ae21a8e94a..e8de11c69e 100644 --- a/src/resources/page-shield/page-shield.ts +++ b/src/resources/page-shield/page-shield.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ConnectionsAPI from 'cloudflare/resources/page-shield/connections'; -import * as PoliciesAPI from 'cloudflare/resources/page-shield/policies'; -import * as ScriptsAPI from 'cloudflare/resources/page-shield/scripts'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as ConnectionsAPI from './connections'; +import * as PoliciesAPI from './policies'; +import * as ScriptsAPI from './scripts'; export class PageShield extends APIResource { policies: PoliciesAPI.Policies = new PoliciesAPI.Policies(this._client); diff --git a/src/resources/page-shield/policies.ts b/src/resources/page-shield/policies.ts index a2ee000052..97da07037d 100644 --- a/src/resources/page-shield/policies.ts +++ b/src/resources/page-shield/policies.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PoliciesAPI from 'cloudflare/resources/page-shield/policies'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as PoliciesAPI from './policies'; +import { SinglePage } from '../../pagination'; export class Policies extends APIResource { /** diff --git a/src/resources/page-shield/scripts.ts b/src/resources/page-shield/scripts.ts index 6f47575887..bf0ad01ff2 100644 --- a/src/resources/page-shield/scripts.ts +++ b/src/resources/page-shield/scripts.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ScriptsAPI from 'cloudflare/resources/page-shield/scripts'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as ScriptsAPI from './scripts'; +import { SinglePage } from '../../pagination'; export class Scripts extends APIResource { /** diff --git a/src/resources/pagerules/pagerules.ts b/src/resources/pagerules/pagerules.ts index 478b8fd8e8..94e89efba9 100644 --- a/src/resources/pagerules/pagerules.ts +++ b/src/resources/pagerules/pagerules.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SettingsAPI from 'cloudflare/resources/pagerules/settings'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as SettingsAPI from './settings'; export class Pagerules extends APIResource { settings: SettingsAPI.Settings = new SettingsAPI.Settings(this._client); diff --git a/src/resources/pagerules/settings.ts b/src/resources/pagerules/settings.ts index 7004a6203d..58f8732df6 100644 --- a/src/resources/pagerules/settings.ts +++ b/src/resources/pagerules/settings.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SettingsAPI from 'cloudflare/resources/pagerules/settings'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as SettingsAPI from './settings'; export class Settings extends APIResource { /** diff --git a/src/resources/pages/pages.ts b/src/resources/pages/pages.ts index dfd4f4e39a..4e351fdce8 100644 --- a/src/resources/pages/pages.ts +++ b/src/resources/pages/pages.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as ProjectsAPI from 'cloudflare/resources/pages/projects/projects'; +import { APIResource } from '../../resource'; +import * as ProjectsAPI from './projects/projects'; export class Pages extends APIResource { projects: ProjectsAPI.Projects = new ProjectsAPI.Projects(this._client); diff --git a/src/resources/pages/projects/deployments/deployments.ts b/src/resources/pages/projects/deployments/deployments.ts index 84c7b9b475..bc13e7d3d1 100644 --- a/src/resources/pages/projects/deployments/deployments.ts +++ b/src/resources/pages/projects/deployments/deployments.ts @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DeploymentsAPI from 'cloudflare/resources/pages/projects/deployments/deployments'; -import * as ProjectsAPI from 'cloudflare/resources/pages/projects/projects'; -import { DeploymentsSinglePage } from 'cloudflare/resources/pages/projects/projects'; -import * as HistoryAPI from 'cloudflare/resources/pages/projects/deployments/history/history'; -import { multipartFormRequestOptions } from 'cloudflare/core'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as DeploymentsAPI from './deployments'; +import * as ProjectsAPI from '../projects'; +import { DeploymentsSinglePage } from '../projects'; +import * as HistoryAPI from './history/history'; +import { multipartFormRequestOptions } from '../../../../core'; export class Deployments extends APIResource { history: HistoryAPI.History = new HistoryAPI.History(this._client); diff --git a/src/resources/pages/projects/deployments/history/history.ts b/src/resources/pages/projects/deployments/history/history.ts index c7463ca31a..e174423465 100644 --- a/src/resources/pages/projects/deployments/history/history.ts +++ b/src/resources/pages/projects/deployments/history/history.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as LogsAPI from 'cloudflare/resources/pages/projects/deployments/history/logs'; +import { APIResource } from '../../../../../resource'; +import * as LogsAPI from './logs'; export class History extends APIResource { logs: LogsAPI.Logs = new LogsAPI.Logs(this._client); diff --git a/src/resources/pages/projects/deployments/history/logs.ts b/src/resources/pages/projects/deployments/history/logs.ts index 6ee9b54388..4a7d47c845 100644 --- a/src/resources/pages/projects/deployments/history/logs.ts +++ b/src/resources/pages/projects/deployments/history/logs.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as LogsAPI from 'cloudflare/resources/pages/projects/deployments/history/logs'; +import * as Core from '../../../../../core'; +import { APIResource } from '../../../../../resource'; +import * as LogsAPI from './logs'; export class Logs extends APIResource { /** diff --git a/src/resources/pages/projects/domains.ts b/src/resources/pages/projects/domains.ts index f6bf2d9c36..7140b7afb5 100644 --- a/src/resources/pages/projects/domains.ts +++ b/src/resources/pages/projects/domains.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DomainsAPI from 'cloudflare/resources/pages/projects/domains'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as DomainsAPI from './domains'; +import { SinglePage } from '../../../pagination'; export class Domains extends APIResource { /** diff --git a/src/resources/pages/projects/projects.ts b/src/resources/pages/projects/projects.ts index aebedd192b..5f0424380a 100644 --- a/src/resources/pages/projects/projects.ts +++ b/src/resources/pages/projects/projects.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ProjectsAPI from 'cloudflare/resources/pages/projects/projects'; -import * as DomainsAPI from 'cloudflare/resources/pages/projects/domains'; -import * as DeploymentsAPI from 'cloudflare/resources/pages/projects/deployments/deployments'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ProjectsAPI from './projects'; +import * as DomainsAPI from './domains'; +import * as DeploymentsAPI from './deployments/deployments'; +import { SinglePage } from '../../../pagination'; export class Projects extends APIResource { deployments: DeploymentsAPI.Deployments = new DeploymentsAPI.Deployments(this._client); diff --git a/src/resources/pcaps/download.ts b/src/resources/pcaps/download.ts index dacc0985d1..0d3cc4cb60 100644 --- a/src/resources/pcaps/download.ts +++ b/src/resources/pcaps/download.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { type Response } from 'cloudflare/_shims/index'; -import * as DownloadAPI from 'cloudflare/resources/pcaps/download'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { type Response } from '../../_shims/index'; +import * as DownloadAPI from './download'; export class Download extends APIResource { /** diff --git a/src/resources/pcaps/ownership.ts b/src/resources/pcaps/ownership.ts index b1d700112c..d39750465f 100644 --- a/src/resources/pcaps/ownership.ts +++ b/src/resources/pcaps/ownership.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as OwnershipAPI from 'cloudflare/resources/pcaps/ownership'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as OwnershipAPI from './ownership'; export class OwnershipResource extends APIResource { /** diff --git a/src/resources/pcaps/pcaps.ts b/src/resources/pcaps/pcaps.ts index 295ac0e548..675d040534 100644 --- a/src/resources/pcaps/pcaps.ts +++ b/src/resources/pcaps/pcaps.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PCAPsAPI from 'cloudflare/resources/pcaps/pcaps'; -import * as DownloadAPI from 'cloudflare/resources/pcaps/download'; -import * as OwnershipAPI from 'cloudflare/resources/pcaps/ownership'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as PCAPsAPI from './pcaps'; +import * as DownloadAPI from './download'; +import * as OwnershipAPI from './ownership'; +import { SinglePage } from '../../pagination'; export class PCAPs extends APIResource { ownership: OwnershipAPI.OwnershipResource = new OwnershipAPI.OwnershipResource(this._client); diff --git a/src/resources/plans.ts b/src/resources/plans.ts index 3d9cf5f9bb..5352768b32 100644 --- a/src/resources/plans.ts +++ b/src/resources/plans.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../core'; +import { APIResource } from '../resource'; +import { SinglePage } from '../pagination'; export class Plans extends APIResource { /** diff --git a/src/resources/queues/consumers.ts b/src/resources/queues/consumers.ts index 633588f013..2d81ca1227 100644 --- a/src/resources/queues/consumers.ts +++ b/src/resources/queues/consumers.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ConsumersAPI from 'cloudflare/resources/queues/consumers'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as ConsumersAPI from './consumers'; export class Consumers extends APIResource { /** diff --git a/src/resources/queues/messages.ts b/src/resources/queues/messages.ts index 7d76cdc2d8..871ce9984c 100644 --- a/src/resources/queues/messages.ts +++ b/src/resources/queues/messages.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as MessagesAPI from 'cloudflare/resources/queues/messages'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as MessagesAPI from './messages'; export class Messages extends APIResource { /** diff --git a/src/resources/queues/queues.ts b/src/resources/queues/queues.ts index f4cd3577a7..47394530d0 100644 --- a/src/resources/queues/queues.ts +++ b/src/resources/queues/queues.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ConsumersAPI from 'cloudflare/resources/queues/consumers'; -import * as MessagesAPI from 'cloudflare/resources/queues/messages'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as ConsumersAPI from './consumers'; +import * as MessagesAPI from './messages'; +import { SinglePage } from '../../pagination'; export class Queues extends APIResource { consumers: ConsumersAPI.Consumers = new ConsumersAPI.Consumers(this._client); diff --git a/src/resources/r2/buckets.ts b/src/resources/r2/buckets.ts index 3beed2bff8..1096ec550b 100644 --- a/src/resources/r2/buckets.ts +++ b/src/resources/r2/buckets.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as BucketsAPI from 'cloudflare/resources/r2/buckets'; -import { CursorPagination, type CursorPaginationParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as BucketsAPI from './buckets'; +import { CursorPagination, type CursorPaginationParams } from '../../pagination'; export class Buckets extends APIResource { /** diff --git a/src/resources/r2/r2.ts b/src/resources/r2/r2.ts index 179fffa286..d02124af22 100644 --- a/src/resources/r2/r2.ts +++ b/src/resources/r2/r2.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as BucketsAPI from 'cloudflare/resources/r2/buckets'; -import * as SippyAPI from 'cloudflare/resources/r2/sippy'; +import { APIResource } from '../../resource'; +import * as BucketsAPI from './buckets'; +import * as SippyAPI from './sippy'; export class R2 extends APIResource { buckets: BucketsAPI.Buckets = new BucketsAPI.Buckets(this._client); diff --git a/src/resources/r2/sippy.ts b/src/resources/r2/sippy.ts index 3126ade595..c59d346bef 100644 --- a/src/resources/r2/sippy.ts +++ b/src/resources/r2/sippy.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SippyAPI from 'cloudflare/resources/r2/sippy'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as SippyAPI from './sippy'; export class SippyResource extends APIResource { /** diff --git a/src/resources/radar/annotations/annotations.ts b/src/resources/radar/annotations/annotations.ts index 9a76f05e98..ea0d8ea2bc 100644 --- a/src/resources/radar/annotations/annotations.ts +++ b/src/resources/radar/annotations/annotations.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as OutagesAPI from 'cloudflare/resources/radar/annotations/outages'; +import { APIResource } from '../../../resource'; +import * as OutagesAPI from './outages'; export class Annotations extends APIResource { outages: OutagesAPI.Outages = new OutagesAPI.Outages(this._client); diff --git a/src/resources/radar/annotations/outages.ts b/src/resources/radar/annotations/outages.ts index b9ad9ede60..6a47891b17 100644 --- a/src/resources/radar/annotations/outages.ts +++ b/src/resources/radar/annotations/outages.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as OutagesAPI from 'cloudflare/resources/radar/annotations/outages'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as OutagesAPI from './outages'; export class Outages extends APIResource { /** diff --git a/src/resources/radar/as112/as112.ts b/src/resources/radar/as112/as112.ts index 4f486a1e47..c9924054ed 100644 --- a/src/resources/radar/as112/as112.ts +++ b/src/resources/radar/as112/as112.ts @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as AS112API from 'cloudflare/resources/radar/as112/as112'; -import * as SummaryAPI from 'cloudflare/resources/radar/as112/summary'; -import * as TimeseriesGroupsAPI from 'cloudflare/resources/radar/as112/timeseries-groups'; -import * as TopAPI from 'cloudflare/resources/radar/as112/top'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as AS112API from './as112'; +import * as SummaryAPI from './summary'; +import * as TimeseriesGroupsAPI from './timeseries-groups'; +import * as TopAPI from './top'; export class AS112 extends APIResource { summary: SummaryAPI.Summary = new SummaryAPI.Summary(this._client); diff --git a/src/resources/radar/as112/summary.ts b/src/resources/radar/as112/summary.ts index 72ff43f7db..3200fdc047 100644 --- a/src/resources/radar/as112/summary.ts +++ b/src/resources/radar/as112/summary.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as SummaryAPI from 'cloudflare/resources/radar/as112/summary'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as SummaryAPI from './summary'; export class Summary extends APIResource { /** diff --git a/src/resources/radar/as112/timeseries-groups.ts b/src/resources/radar/as112/timeseries-groups.ts index 602e8aba33..8370e7c048 100644 --- a/src/resources/radar/as112/timeseries-groups.ts +++ b/src/resources/radar/as112/timeseries-groups.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as TimeseriesGroupsAPI from 'cloudflare/resources/radar/as112/timeseries-groups'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as TimeseriesGroupsAPI from './timeseries-groups'; export class TimeseriesGroups extends APIResource { /** diff --git a/src/resources/radar/as112/top.ts b/src/resources/radar/as112/top.ts index b90f908cbe..09b77befed 100644 --- a/src/resources/radar/as112/top.ts +++ b/src/resources/radar/as112/top.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as TopAPI from 'cloudflare/resources/radar/as112/top'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as TopAPI from './top'; export class Top extends APIResource { /** diff --git a/src/resources/radar/attacks/attacks.ts b/src/resources/radar/attacks/attacks.ts index f8eca38fb7..3f54faf8cf 100644 --- a/src/resources/radar/attacks/attacks.ts +++ b/src/resources/radar/attacks/attacks.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as Layer3API from 'cloudflare/resources/radar/attacks/layer3/layer3'; -import * as Layer7API from 'cloudflare/resources/radar/attacks/layer7/layer7'; +import { APIResource } from '../../../resource'; +import * as Layer3API from './layer3/layer3'; +import * as Layer7API from './layer7/layer7'; export class Attacks extends APIResource { layer3: Layer3API.Layer3 = new Layer3API.Layer3(this._client); diff --git a/src/resources/radar/attacks/layer3/layer3.ts b/src/resources/radar/attacks/layer3/layer3.ts index 059373a4ef..5d9db8d3eb 100644 --- a/src/resources/radar/attacks/layer3/layer3.ts +++ b/src/resources/radar/attacks/layer3/layer3.ts @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as Layer3API from 'cloudflare/resources/radar/attacks/layer3/layer3'; -import * as SummaryAPI from 'cloudflare/resources/radar/attacks/layer3/summary'; -import * as TimeseriesGroupsAPI from 'cloudflare/resources/radar/attacks/layer3/timeseries-groups'; -import * as TopAPI from 'cloudflare/resources/radar/attacks/layer3/top/top'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as Layer3API from './layer3'; +import * as SummaryAPI from './summary'; +import * as TimeseriesGroupsAPI from './timeseries-groups'; +import * as TopAPI from './top/top'; export class Layer3 extends APIResource { summary: SummaryAPI.Summary = new SummaryAPI.Summary(this._client); diff --git a/src/resources/radar/attacks/layer3/summary.ts b/src/resources/radar/attacks/layer3/summary.ts index 1c78c52b76..b4ba6d2853 100644 --- a/src/resources/radar/attacks/layer3/summary.ts +++ b/src/resources/radar/attacks/layer3/summary.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as SummaryAPI from 'cloudflare/resources/radar/attacks/layer3/summary'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as SummaryAPI from './summary'; export class Summary extends APIResource { /** diff --git a/src/resources/radar/attacks/layer3/timeseries-groups.ts b/src/resources/radar/attacks/layer3/timeseries-groups.ts index 965593709d..62595ec8a8 100644 --- a/src/resources/radar/attacks/layer3/timeseries-groups.ts +++ b/src/resources/radar/attacks/layer3/timeseries-groups.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as TimeseriesGroupsAPI from 'cloudflare/resources/radar/attacks/layer3/timeseries-groups'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as TimeseriesGroupsAPI from './timeseries-groups'; export class TimeseriesGroups extends APIResource { /** diff --git a/src/resources/radar/attacks/layer3/top/locations.ts b/src/resources/radar/attacks/layer3/top/locations.ts index 8140901010..b02d30c2d0 100644 --- a/src/resources/radar/attacks/layer3/top/locations.ts +++ b/src/resources/radar/attacks/layer3/top/locations.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as LocationsAPI from 'cloudflare/resources/radar/attacks/layer3/top/locations'; +import * as Core from '../../../../../core'; +import { APIResource } from '../../../../../resource'; +import { isRequestOptions } from '../../../../../core'; +import * as LocationsAPI from './locations'; export class Locations extends APIResource { /** diff --git a/src/resources/radar/attacks/layer3/top/top.ts b/src/resources/radar/attacks/layer3/top/top.ts index 34fcac050d..7bfaaa5305 100644 --- a/src/resources/radar/attacks/layer3/top/top.ts +++ b/src/resources/radar/attacks/layer3/top/top.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as TopTopAPI from 'cloudflare/resources/radar/attacks/layer3/top/top'; -import * as TopAPI from 'cloudflare/resources/radar/http/top'; -import * as LocationsAPI from 'cloudflare/resources/radar/attacks/layer3/top/locations'; +import * as Core from '../../../../../core'; +import { APIResource } from '../../../../../resource'; +import { isRequestOptions } from '../../../../../core'; +import * as TopTopAPI from './top'; +import * as TopAPI from '../../../http/top'; +import * as LocationsAPI from './locations'; export class Top extends APIResource { locations: LocationsAPI.Locations = new LocationsAPI.Locations(this._client); diff --git a/src/resources/radar/attacks/layer7/layer7.ts b/src/resources/radar/attacks/layer7/layer7.ts index 95234d55cd..1ff5784c3e 100644 --- a/src/resources/radar/attacks/layer7/layer7.ts +++ b/src/resources/radar/attacks/layer7/layer7.ts @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as Layer7API from 'cloudflare/resources/radar/attacks/layer7/layer7'; -import * as SummaryAPI from 'cloudflare/resources/radar/attacks/layer7/summary'; -import * as TimeseriesGroupsAPI from 'cloudflare/resources/radar/attacks/layer7/timeseries-groups'; -import * as TopAPI from 'cloudflare/resources/radar/attacks/layer7/top/top'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as Layer7API from './layer7'; +import * as SummaryAPI from './summary'; +import * as TimeseriesGroupsAPI from './timeseries-groups'; +import * as TopAPI from './top/top'; export class Layer7 extends APIResource { summary: SummaryAPI.Summary = new SummaryAPI.Summary(this._client); diff --git a/src/resources/radar/attacks/layer7/summary.ts b/src/resources/radar/attacks/layer7/summary.ts index 057421f3a4..fe7b61d10b 100644 --- a/src/resources/radar/attacks/layer7/summary.ts +++ b/src/resources/radar/attacks/layer7/summary.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as SummaryAPI from 'cloudflare/resources/radar/attacks/layer7/summary'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as SummaryAPI from './summary'; export class Summary extends APIResource { /** diff --git a/src/resources/radar/attacks/layer7/timeseries-groups.ts b/src/resources/radar/attacks/layer7/timeseries-groups.ts index 81b50ed041..f860aeac58 100644 --- a/src/resources/radar/attacks/layer7/timeseries-groups.ts +++ b/src/resources/radar/attacks/layer7/timeseries-groups.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as TimeseriesGroupsAPI from 'cloudflare/resources/radar/attacks/layer7/timeseries-groups'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as TimeseriesGroupsAPI from './timeseries-groups'; export class TimeseriesGroups extends APIResource { /** diff --git a/src/resources/radar/attacks/layer7/top/ases.ts b/src/resources/radar/attacks/layer7/top/ases.ts index 2b9af6f249..27e9f59e36 100644 --- a/src/resources/radar/attacks/layer7/top/ases.ts +++ b/src/resources/radar/attacks/layer7/top/ases.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as AsesAPI from 'cloudflare/resources/radar/attacks/layer7/top/ases'; +import * as Core from '../../../../../core'; +import { APIResource } from '../../../../../resource'; +import { isRequestOptions } from '../../../../../core'; +import * as AsesAPI from './ases'; export class Ases extends APIResource { /** diff --git a/src/resources/radar/attacks/layer7/top/locations.ts b/src/resources/radar/attacks/layer7/top/locations.ts index 553611abd7..271986ca15 100644 --- a/src/resources/radar/attacks/layer7/top/locations.ts +++ b/src/resources/radar/attacks/layer7/top/locations.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as LocationsAPI from 'cloudflare/resources/radar/attacks/layer7/top/locations'; +import * as Core from '../../../../../core'; +import { APIResource } from '../../../../../resource'; +import { isRequestOptions } from '../../../../../core'; +import * as LocationsAPI from './locations'; export class Locations extends APIResource { /** diff --git a/src/resources/radar/attacks/layer7/top/top.ts b/src/resources/radar/attacks/layer7/top/top.ts index 512cdc8316..c3d6357ebe 100644 --- a/src/resources/radar/attacks/layer7/top/top.ts +++ b/src/resources/radar/attacks/layer7/top/top.ts @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as TopTopAPI from 'cloudflare/resources/radar/attacks/layer7/top/top'; -import * as TopAPI from 'cloudflare/resources/radar/http/top'; -import * as AsesAPI from 'cloudflare/resources/radar/attacks/layer7/top/ases'; -import * as LocationsAPI from 'cloudflare/resources/radar/attacks/layer7/top/locations'; +import * as Core from '../../../../../core'; +import { APIResource } from '../../../../../resource'; +import { isRequestOptions } from '../../../../../core'; +import * as TopTopAPI from './top'; +import * as TopAPI from '../../../http/top'; +import * as AsesAPI from './ases'; +import * as LocationsAPI from './locations'; export class Top extends APIResource { locations: LocationsAPI.Locations = new LocationsAPI.Locations(this._client); diff --git a/src/resources/radar/bgp/bgp.ts b/src/resources/radar/bgp/bgp.ts index 869fd9b2af..d4adde08c7 100644 --- a/src/resources/radar/bgp/bgp.ts +++ b/src/resources/radar/bgp/bgp.ts @@ -1,13 +1,13 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as BGPAPI from 'cloudflare/resources/radar/bgp/bgp'; -import * as RoutesAPI from 'cloudflare/resources/radar/bgp/routes'; -import * as HijacksAPI from 'cloudflare/resources/radar/bgp/hijacks/hijacks'; -import * as LeaksAPI from 'cloudflare/resources/radar/bgp/leaks/leaks'; -import * as TopAPI from 'cloudflare/resources/radar/bgp/top/top'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as BGPAPI from './bgp'; +import * as RoutesAPI from './routes'; +import * as HijacksAPI from './hijacks/hijacks'; +import * as LeaksAPI from './leaks/leaks'; +import * as TopAPI from './top/top'; export class BGP extends APIResource { leaks: LeaksAPI.Leaks = new LeaksAPI.Leaks(this._client); diff --git a/src/resources/radar/bgp/hijacks/events.ts b/src/resources/radar/bgp/hijacks/events.ts index 96131d6733..44e47c4a38 100644 --- a/src/resources/radar/bgp/hijacks/events.ts +++ b/src/resources/radar/bgp/hijacks/events.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as EventsAPI from 'cloudflare/resources/radar/bgp/hijacks/events'; -import { V4PagePagination, type V4PagePaginationParams } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as EventsAPI from './events'; +import { V4PagePagination, type V4PagePaginationParams } from '../../../../pagination'; export class Events extends APIResource { /** diff --git a/src/resources/radar/bgp/hijacks/hijacks.ts b/src/resources/radar/bgp/hijacks/hijacks.ts index 38eb964dd9..17f01e0a56 100644 --- a/src/resources/radar/bgp/hijacks/hijacks.ts +++ b/src/resources/radar/bgp/hijacks/hijacks.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as EventsAPI from 'cloudflare/resources/radar/bgp/hijacks/events'; +import { APIResource } from '../../../../resource'; +import * as EventsAPI from './events'; export class Hijacks extends APIResource { events: EventsAPI.Events = new EventsAPI.Events(this._client); diff --git a/src/resources/radar/bgp/leaks/events.ts b/src/resources/radar/bgp/leaks/events.ts index 17f20fb8e0..8b3c79fc91 100644 --- a/src/resources/radar/bgp/leaks/events.ts +++ b/src/resources/radar/bgp/leaks/events.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as EventsAPI from 'cloudflare/resources/radar/bgp/leaks/events'; -import { V4PagePagination, type V4PagePaginationParams } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as EventsAPI from './events'; +import { V4PagePagination, type V4PagePaginationParams } from '../../../../pagination'; export class Events extends APIResource { /** diff --git a/src/resources/radar/bgp/leaks/leaks.ts b/src/resources/radar/bgp/leaks/leaks.ts index fd1b7c5d71..7f58990b1f 100644 --- a/src/resources/radar/bgp/leaks/leaks.ts +++ b/src/resources/radar/bgp/leaks/leaks.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as EventsAPI from 'cloudflare/resources/radar/bgp/leaks/events'; +import { APIResource } from '../../../../resource'; +import * as EventsAPI from './events'; export class Leaks extends APIResource { events: EventsAPI.Events = new EventsAPI.Events(this._client); diff --git a/src/resources/radar/bgp/routes.ts b/src/resources/radar/bgp/routes.ts index 3169184a15..7ac44ae33a 100644 --- a/src/resources/radar/bgp/routes.ts +++ b/src/resources/radar/bgp/routes.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as RoutesAPI from 'cloudflare/resources/radar/bgp/routes'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as RoutesAPI from './routes'; export class Routes extends APIResource { /** diff --git a/src/resources/radar/bgp/top/ases.ts b/src/resources/radar/bgp/top/ases.ts index ca09b1f3c6..1ea8b37ff2 100644 --- a/src/resources/radar/bgp/top/ases.ts +++ b/src/resources/radar/bgp/top/ases.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as AsesAPI from 'cloudflare/resources/radar/bgp/top/ases'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as AsesAPI from './ases'; export class Ases extends APIResource { /** diff --git a/src/resources/radar/bgp/top/top.ts b/src/resources/radar/bgp/top/top.ts index baaaf3fa88..7a8cbd7e83 100644 --- a/src/resources/radar/bgp/top/top.ts +++ b/src/resources/radar/bgp/top/top.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as TopAPI from 'cloudflare/resources/radar/bgp/top/top'; -import * as AsesAPI from 'cloudflare/resources/radar/bgp/top/ases'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as TopAPI from './top'; +import * as AsesAPI from './ases'; export class Top extends APIResource { ases: AsesAPI.Ases = new AsesAPI.Ases(this._client); diff --git a/src/resources/radar/connection-tampering.ts b/src/resources/radar/connection-tampering.ts index e2cdb64003..34b4726e4a 100644 --- a/src/resources/radar/connection-tampering.ts +++ b/src/resources/radar/connection-tampering.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as ConnectionTamperingAPI from 'cloudflare/resources/radar/connection-tampering'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import * as ConnectionTamperingAPI from './connection-tampering'; export class ConnectionTampering extends APIResource { /** diff --git a/src/resources/radar/datasets.ts b/src/resources/radar/datasets.ts index 5437417f21..2e0c939c22 100644 --- a/src/resources/radar/datasets.ts +++ b/src/resources/radar/datasets.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as DatasetsAPI from 'cloudflare/resources/radar/datasets'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import * as DatasetsAPI from './datasets'; export class Datasets extends APIResource { /** diff --git a/src/resources/radar/dns/dns.ts b/src/resources/radar/dns/dns.ts index 34c56f2217..f9a56b8302 100644 --- a/src/resources/radar/dns/dns.ts +++ b/src/resources/radar/dns/dns.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as TopAPI from 'cloudflare/resources/radar/dns/top'; +import { APIResource } from '../../../resource'; +import * as TopAPI from './top'; export class DNS extends APIResource { top: TopAPI.Top = new TopAPI.Top(this._client); diff --git a/src/resources/radar/dns/top.ts b/src/resources/radar/dns/top.ts index 82c76a149e..a8d1d2d93a 100644 --- a/src/resources/radar/dns/top.ts +++ b/src/resources/radar/dns/top.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as TopAPI from 'cloudflare/resources/radar/dns/top'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as TopAPI from './top'; export class Top extends APIResource { /** diff --git a/src/resources/radar/email/email.ts b/src/resources/radar/email/email.ts index 238b638a0b..57ef0faae4 100644 --- a/src/resources/radar/email/email.ts +++ b/src/resources/radar/email/email.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as EmailAPI from 'cloudflare/resources/radar/email/email'; -import * as RoutingAPI from 'cloudflare/resources/radar/email/routing/routing'; -import * as SecurityAPI from 'cloudflare/resources/radar/email/security/security'; +import { APIResource } from '../../../resource'; +import * as EmailAPI from './email'; +import * as RoutingAPI from './routing/routing'; +import * as SecurityAPI from './security/security'; export class Email extends APIResource { routing: RoutingAPI.Routing = new RoutingAPI.Routing(this._client); diff --git a/src/resources/radar/email/routing/routing.ts b/src/resources/radar/email/routing/routing.ts index 805e493928..7ed68db170 100644 --- a/src/resources/radar/email/routing/routing.ts +++ b/src/resources/radar/email/routing/routing.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as SummaryAPI from 'cloudflare/resources/radar/email/routing/summary'; -import * as TimeseriesGroupsAPI from 'cloudflare/resources/radar/email/routing/timeseries-groups'; +import { APIResource } from '../../../../resource'; +import * as SummaryAPI from './summary'; +import * as TimeseriesGroupsAPI from './timeseries-groups'; export class Routing extends APIResource { summary: SummaryAPI.Summary = new SummaryAPI.Summary(this._client); diff --git a/src/resources/radar/email/routing/summary.ts b/src/resources/radar/email/routing/summary.ts index c4a2b332e0..047adbc1e0 100644 --- a/src/resources/radar/email/routing/summary.ts +++ b/src/resources/radar/email/routing/summary.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as SummaryAPI from 'cloudflare/resources/radar/email/routing/summary'; -import * as EmailAPI from 'cloudflare/resources/radar/email/email'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as SummaryAPI from './summary'; +import * as EmailAPI from '../email'; export class Summary extends APIResource { /** diff --git a/src/resources/radar/email/routing/timeseries-groups.ts b/src/resources/radar/email/routing/timeseries-groups.ts index 67ec2feaa4..0af29e5e59 100644 --- a/src/resources/radar/email/routing/timeseries-groups.ts +++ b/src/resources/radar/email/routing/timeseries-groups.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as TimeseriesGroupsAPI from 'cloudflare/resources/radar/email/routing/timeseries-groups'; -import * as EmailAPI from 'cloudflare/resources/radar/email/email'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as TimeseriesGroupsAPI from './timeseries-groups'; +import * as EmailAPI from '../email'; export class TimeseriesGroups extends APIResource { /** diff --git a/src/resources/radar/email/security/security.ts b/src/resources/radar/email/security/security.ts index c5b6d27dc4..bb2ff1ce6f 100644 --- a/src/resources/radar/email/security/security.ts +++ b/src/resources/radar/email/security/security.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as SummaryAPI from 'cloudflare/resources/radar/email/security/summary'; -import * as TimeseriesGroupsAPI from 'cloudflare/resources/radar/email/security/timeseries-groups'; -import * as TopAPI from 'cloudflare/resources/radar/email/security/top/top'; +import { APIResource } from '../../../../resource'; +import * as SummaryAPI from './summary'; +import * as TimeseriesGroupsAPI from './timeseries-groups'; +import * as TopAPI from './top/top'; export class Security extends APIResource { top: TopAPI.Top = new TopAPI.Top(this._client); diff --git a/src/resources/radar/email/security/summary.ts b/src/resources/radar/email/security/summary.ts index 0eba6928cd..e813339ff5 100644 --- a/src/resources/radar/email/security/summary.ts +++ b/src/resources/radar/email/security/summary.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as SummaryAPI from 'cloudflare/resources/radar/email/security/summary'; -import * as EmailAPI from 'cloudflare/resources/radar/email/email'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as SummaryAPI from './summary'; +import * as EmailAPI from '../email'; export class Summary extends APIResource { /** diff --git a/src/resources/radar/email/security/timeseries-groups.ts b/src/resources/radar/email/security/timeseries-groups.ts index f5b21bc7fa..009efcd406 100644 --- a/src/resources/radar/email/security/timeseries-groups.ts +++ b/src/resources/radar/email/security/timeseries-groups.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as TimeseriesGroupsAPI from 'cloudflare/resources/radar/email/security/timeseries-groups'; -import * as EmailAPI from 'cloudflare/resources/radar/email/email'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as TimeseriesGroupsAPI from './timeseries-groups'; +import * as EmailAPI from '../email'; export class TimeseriesGroups extends APIResource { /** diff --git a/src/resources/radar/email/security/top/tlds/malicious.ts b/src/resources/radar/email/security/top/tlds/malicious.ts index 326eb58cbb..735078f2f1 100644 --- a/src/resources/radar/email/security/top/tlds/malicious.ts +++ b/src/resources/radar/email/security/top/tlds/malicious.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as MaliciousAPI from 'cloudflare/resources/radar/email/security/top/tlds/malicious'; -import * as TopAPI from 'cloudflare/resources/radar/http/top'; +import * as Core from '../../../../../../core'; +import { APIResource } from '../../../../../../resource'; +import { isRequestOptions } from '../../../../../../core'; +import * as MaliciousAPI from './malicious'; +import * as TopAPI from '../../../../http/top'; export class Malicious extends APIResource { /** diff --git a/src/resources/radar/email/security/top/tlds/spam.ts b/src/resources/radar/email/security/top/tlds/spam.ts index 1515590701..ab7d5801af 100644 --- a/src/resources/radar/email/security/top/tlds/spam.ts +++ b/src/resources/radar/email/security/top/tlds/spam.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as SpamAPI from 'cloudflare/resources/radar/email/security/top/tlds/spam'; -import * as TopAPI from 'cloudflare/resources/radar/http/top'; +import * as Core from '../../../../../../core'; +import { APIResource } from '../../../../../../resource'; +import { isRequestOptions } from '../../../../../../core'; +import * as SpamAPI from './spam'; +import * as TopAPI from '../../../../http/top'; export class Spam extends APIResource { /** diff --git a/src/resources/radar/email/security/top/tlds/spoof.ts b/src/resources/radar/email/security/top/tlds/spoof.ts index 9fdc127d6a..8fc6a987d4 100644 --- a/src/resources/radar/email/security/top/tlds/spoof.ts +++ b/src/resources/radar/email/security/top/tlds/spoof.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as SpoofAPI from 'cloudflare/resources/radar/email/security/top/tlds/spoof'; -import * as TopAPI from 'cloudflare/resources/radar/http/top'; +import * as Core from '../../../../../../core'; +import { APIResource } from '../../../../../../resource'; +import { isRequestOptions } from '../../../../../../core'; +import * as SpoofAPI from './spoof'; +import * as TopAPI from '../../../../http/top'; export class Spoof extends APIResource { /** diff --git a/src/resources/radar/email/security/top/tlds/tlds.ts b/src/resources/radar/email/security/top/tlds/tlds.ts index a03479212b..1407b10765 100644 --- a/src/resources/radar/email/security/top/tlds/tlds.ts +++ b/src/resources/radar/email/security/top/tlds/tlds.ts @@ -1,13 +1,13 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as TldsAPI from 'cloudflare/resources/radar/email/security/top/tlds/tlds'; -import * as TopAPI from 'cloudflare/resources/radar/http/top'; -import * as MaliciousAPI from 'cloudflare/resources/radar/email/security/top/tlds/malicious'; -import * as SpamAPI from 'cloudflare/resources/radar/email/security/top/tlds/spam'; -import * as SpoofAPI from 'cloudflare/resources/radar/email/security/top/tlds/spoof'; +import * as Core from '../../../../../../core'; +import { APIResource } from '../../../../../../resource'; +import { isRequestOptions } from '../../../../../../core'; +import * as TldsAPI from './tlds'; +import * as TopAPI from '../../../../http/top'; +import * as MaliciousAPI from './malicious'; +import * as SpamAPI from './spam'; +import * as SpoofAPI from './spoof'; export class Tlds extends APIResource { malicious: MaliciousAPI.Malicious = new MaliciousAPI.Malicious(this._client); diff --git a/src/resources/radar/email/security/top/top.ts b/src/resources/radar/email/security/top/top.ts index 2f4205176d..1ef8c26ab4 100644 --- a/src/resources/radar/email/security/top/top.ts +++ b/src/resources/radar/email/security/top/top.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as TldsAPI from 'cloudflare/resources/radar/email/security/top/tlds/tlds'; +import { APIResource } from '../../../../../resource'; +import * as TldsAPI from './tlds/tlds'; export class Top extends APIResource { tlds: TldsAPI.Tlds = new TldsAPI.Tlds(this._client); diff --git a/src/resources/radar/entities/asns.ts b/src/resources/radar/entities/asns.ts index 5b39eec6bd..3f32cce7a9 100644 --- a/src/resources/radar/entities/asns.ts +++ b/src/resources/radar/entities/asns.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as ASNsAPI from 'cloudflare/resources/radar/entities/asns'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as ASNsAPI from './asns'; export class ASNs extends APIResource { /** diff --git a/src/resources/radar/entities/entities.ts b/src/resources/radar/entities/entities.ts index 1b4e761af9..5e29b9ccfb 100644 --- a/src/resources/radar/entities/entities.ts +++ b/src/resources/radar/entities/entities.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as EntitiesAPI from 'cloudflare/resources/radar/entities/entities'; -import * as ASNsAPI from 'cloudflare/resources/radar/entities/asns'; -import * as LocationsAPI from 'cloudflare/resources/radar/entities/locations'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as EntitiesAPI from './entities'; +import * as ASNsAPI from './asns'; +import * as LocationsAPI from './locations'; export class Entities extends APIResource { asns: ASNsAPI.ASNs = new ASNsAPI.ASNs(this._client); diff --git a/src/resources/radar/entities/locations.ts b/src/resources/radar/entities/locations.ts index cbf442ad44..851e8acb10 100644 --- a/src/resources/radar/entities/locations.ts +++ b/src/resources/radar/entities/locations.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as LocationsAPI from 'cloudflare/resources/radar/entities/locations'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as LocationsAPI from './locations'; export class Locations extends APIResource { /** diff --git a/src/resources/radar/http/ases/ases.ts b/src/resources/radar/http/ases/ases.ts index e2c0997380..e54b1e36e7 100644 --- a/src/resources/radar/http/ases/ases.ts +++ b/src/resources/radar/http/ases/ases.ts @@ -1,17 +1,17 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as AsesAPI from 'cloudflare/resources/radar/http/ases/ases'; -import * as BotClassAPI from 'cloudflare/resources/radar/http/ases/bot-class'; -import * as BrowserFamilyAPI from 'cloudflare/resources/radar/http/ases/browser-family'; -import * as DeviceTypeAPI from 'cloudflare/resources/radar/http/ases/device-type'; -import * as HTTPMethodAPI from 'cloudflare/resources/radar/http/ases/http-method'; -import * as HTTPProtocolAPI from 'cloudflare/resources/radar/http/ases/http-protocol'; -import * as IPVersionAPI from 'cloudflare/resources/radar/http/ases/ip-version'; -import * as OSAPI from 'cloudflare/resources/radar/http/ases/os'; -import * as TLSVersionAPI from 'cloudflare/resources/radar/http/ases/tls-version'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as AsesAPI from './ases'; +import * as BotClassAPI from './bot-class'; +import * as BrowserFamilyAPI from './browser-family'; +import * as DeviceTypeAPI from './device-type'; +import * as HTTPMethodAPI from './http-method'; +import * as HTTPProtocolAPI from './http-protocol'; +import * as IPVersionAPI from './ip-version'; +import * as OSAPI from './os'; +import * as TLSVersionAPI from './tls-version'; export class Ases extends APIResource { botClass: BotClassAPI.BotClass = new BotClassAPI.BotClass(this._client); diff --git a/src/resources/radar/http/ases/bot-class.ts b/src/resources/radar/http/ases/bot-class.ts index ed1a437db6..e49673b002 100644 --- a/src/resources/radar/http/ases/bot-class.ts +++ b/src/resources/radar/http/ases/bot-class.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as BotClassAPI from 'cloudflare/resources/radar/http/ases/bot-class'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as BotClassAPI from './bot-class'; export class BotClass extends APIResource { /** diff --git a/src/resources/radar/http/ases/browser-family.ts b/src/resources/radar/http/ases/browser-family.ts index e8300d2aa4..40e14ef5fc 100644 --- a/src/resources/radar/http/ases/browser-family.ts +++ b/src/resources/radar/http/ases/browser-family.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as BrowserFamilyAPI from 'cloudflare/resources/radar/http/ases/browser-family'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as BrowserFamilyAPI from './browser-family'; export class BrowserFamily extends APIResource { /** diff --git a/src/resources/radar/http/ases/device-type.ts b/src/resources/radar/http/ases/device-type.ts index e80f6afdb2..1357e1af21 100644 --- a/src/resources/radar/http/ases/device-type.ts +++ b/src/resources/radar/http/ases/device-type.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as DeviceTypeAPI from 'cloudflare/resources/radar/http/ases/device-type'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as DeviceTypeAPI from './device-type'; export class DeviceType extends APIResource { /** diff --git a/src/resources/radar/http/ases/http-method.ts b/src/resources/radar/http/ases/http-method.ts index 8602551214..c1acb3ed59 100644 --- a/src/resources/radar/http/ases/http-method.ts +++ b/src/resources/radar/http/ases/http-method.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as HTTPMethodAPI from 'cloudflare/resources/radar/http/ases/http-method'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as HTTPMethodAPI from './http-method'; export class HTTPMethod extends APIResource { /** diff --git a/src/resources/radar/http/ases/http-protocol.ts b/src/resources/radar/http/ases/http-protocol.ts index 016b18a786..42e05e360b 100644 --- a/src/resources/radar/http/ases/http-protocol.ts +++ b/src/resources/radar/http/ases/http-protocol.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as HTTPProtocolAPI from 'cloudflare/resources/radar/http/ases/http-protocol'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as HTTPProtocolAPI from './http-protocol'; export class HTTPProtocol extends APIResource { /** diff --git a/src/resources/radar/http/ases/ip-version.ts b/src/resources/radar/http/ases/ip-version.ts index 4f7f77103e..dc9eb9695c 100644 --- a/src/resources/radar/http/ases/ip-version.ts +++ b/src/resources/radar/http/ases/ip-version.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as IPVersionAPI from 'cloudflare/resources/radar/http/ases/ip-version'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as IPVersionAPI from './ip-version'; export class IPVersion extends APIResource { /** diff --git a/src/resources/radar/http/ases/os.ts b/src/resources/radar/http/ases/os.ts index 1e6868aa91..0b0683e0bd 100644 --- a/src/resources/radar/http/ases/os.ts +++ b/src/resources/radar/http/ases/os.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as OSAPI from 'cloudflare/resources/radar/http/ases/os'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as OSAPI from './os'; export class OS extends APIResource { /** diff --git a/src/resources/radar/http/ases/tls-version.ts b/src/resources/radar/http/ases/tls-version.ts index 666ca7695e..188742dc55 100644 --- a/src/resources/radar/http/ases/tls-version.ts +++ b/src/resources/radar/http/ases/tls-version.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as TLSVersionAPI from 'cloudflare/resources/radar/http/ases/tls-version'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as TLSVersionAPI from './tls-version'; export class TLSVersion extends APIResource { /** diff --git a/src/resources/radar/http/http.ts b/src/resources/radar/http/http.ts index 159e11833a..fd41dd113a 100644 --- a/src/resources/radar/http/http.ts +++ b/src/resources/radar/http/http.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as SummaryAPI from 'cloudflare/resources/radar/http/summary'; -import * as TimeseriesGroupsAPI from 'cloudflare/resources/radar/http/timeseries-groups'; -import * as TopAPI from 'cloudflare/resources/radar/http/top'; -import * as AsesAPI from 'cloudflare/resources/radar/http/ases/ases'; -import * as LocationsAPI from 'cloudflare/resources/radar/http/locations/locations'; +import { APIResource } from '../../../resource'; +import * as SummaryAPI from './summary'; +import * as TimeseriesGroupsAPI from './timeseries-groups'; +import * as TopAPI from './top'; +import * as AsesAPI from './ases/ases'; +import * as LocationsAPI from './locations/locations'; export class HTTP extends APIResource { top: TopAPI.Top = new TopAPI.Top(this._client); diff --git a/src/resources/radar/http/locations/bot-class.ts b/src/resources/radar/http/locations/bot-class.ts index 665da71cb5..aa8911c2cd 100644 --- a/src/resources/radar/http/locations/bot-class.ts +++ b/src/resources/radar/http/locations/bot-class.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as BotClassAPI from 'cloudflare/resources/radar/http/locations/bot-class'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as BotClassAPI from './bot-class'; export class BotClass extends APIResource { /** diff --git a/src/resources/radar/http/locations/browser-family.ts b/src/resources/radar/http/locations/browser-family.ts index 359da6983d..cf8033b7ef 100644 --- a/src/resources/radar/http/locations/browser-family.ts +++ b/src/resources/radar/http/locations/browser-family.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as BrowserFamilyAPI from 'cloudflare/resources/radar/http/locations/browser-family'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as BrowserFamilyAPI from './browser-family'; export class BrowserFamily extends APIResource { /** diff --git a/src/resources/radar/http/locations/device-type.ts b/src/resources/radar/http/locations/device-type.ts index 0841b18a25..6eca33427d 100644 --- a/src/resources/radar/http/locations/device-type.ts +++ b/src/resources/radar/http/locations/device-type.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as DeviceTypeAPI from 'cloudflare/resources/radar/http/locations/device-type'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as DeviceTypeAPI from './device-type'; export class DeviceType extends APIResource { /** diff --git a/src/resources/radar/http/locations/http-method.ts b/src/resources/radar/http/locations/http-method.ts index 336c77445d..f1f56f4c45 100644 --- a/src/resources/radar/http/locations/http-method.ts +++ b/src/resources/radar/http/locations/http-method.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as HTTPMethodAPI from 'cloudflare/resources/radar/http/locations/http-method'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as HTTPMethodAPI from './http-method'; export class HTTPMethod extends APIResource { /** diff --git a/src/resources/radar/http/locations/http-protocol.ts b/src/resources/radar/http/locations/http-protocol.ts index c77346866e..820832a817 100644 --- a/src/resources/radar/http/locations/http-protocol.ts +++ b/src/resources/radar/http/locations/http-protocol.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as HTTPProtocolAPI from 'cloudflare/resources/radar/http/locations/http-protocol'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as HTTPProtocolAPI from './http-protocol'; export class HTTPProtocol extends APIResource { /** diff --git a/src/resources/radar/http/locations/ip-version.ts b/src/resources/radar/http/locations/ip-version.ts index b8e2977904..99d5c098d4 100644 --- a/src/resources/radar/http/locations/ip-version.ts +++ b/src/resources/radar/http/locations/ip-version.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as IPVersionAPI from 'cloudflare/resources/radar/http/locations/ip-version'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as IPVersionAPI from './ip-version'; export class IPVersion extends APIResource { /** diff --git a/src/resources/radar/http/locations/locations.ts b/src/resources/radar/http/locations/locations.ts index 83a4968a0e..3fe6bfcf0f 100644 --- a/src/resources/radar/http/locations/locations.ts +++ b/src/resources/radar/http/locations/locations.ts @@ -1,17 +1,17 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as LocationsAPI from 'cloudflare/resources/radar/http/locations/locations'; -import * as BotClassAPI from 'cloudflare/resources/radar/http/locations/bot-class'; -import * as BrowserFamilyAPI from 'cloudflare/resources/radar/http/locations/browser-family'; -import * as DeviceTypeAPI from 'cloudflare/resources/radar/http/locations/device-type'; -import * as HTTPMethodAPI from 'cloudflare/resources/radar/http/locations/http-method'; -import * as HTTPProtocolAPI from 'cloudflare/resources/radar/http/locations/http-protocol'; -import * as IPVersionAPI from 'cloudflare/resources/radar/http/locations/ip-version'; -import * as OSAPI from 'cloudflare/resources/radar/http/locations/os'; -import * as TLSVersionAPI from 'cloudflare/resources/radar/http/locations/tls-version'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as LocationsAPI from './locations'; +import * as BotClassAPI from './bot-class'; +import * as BrowserFamilyAPI from './browser-family'; +import * as DeviceTypeAPI from './device-type'; +import * as HTTPMethodAPI from './http-method'; +import * as HTTPProtocolAPI from './http-protocol'; +import * as IPVersionAPI from './ip-version'; +import * as OSAPI from './os'; +import * as TLSVersionAPI from './tls-version'; export class Locations extends APIResource { botClass: BotClassAPI.BotClass = new BotClassAPI.BotClass(this._client); diff --git a/src/resources/radar/http/locations/os.ts b/src/resources/radar/http/locations/os.ts index a80630c5c4..73e50b1045 100644 --- a/src/resources/radar/http/locations/os.ts +++ b/src/resources/radar/http/locations/os.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as OSAPI from 'cloudflare/resources/radar/http/locations/os'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as OSAPI from './os'; export class OS extends APIResource { /** diff --git a/src/resources/radar/http/locations/tls-version.ts b/src/resources/radar/http/locations/tls-version.ts index 0c8c39e450..5eaf184e48 100644 --- a/src/resources/radar/http/locations/tls-version.ts +++ b/src/resources/radar/http/locations/tls-version.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as TLSVersionAPI from 'cloudflare/resources/radar/http/locations/tls-version'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as TLSVersionAPI from './tls-version'; export class TLSVersion extends APIResource { /** diff --git a/src/resources/radar/http/summary.ts b/src/resources/radar/http/summary.ts index 1a1ec561a2..dd40d919b0 100644 --- a/src/resources/radar/http/summary.ts +++ b/src/resources/radar/http/summary.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as SummaryAPI from 'cloudflare/resources/radar/http/summary'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as SummaryAPI from './summary'; export class Summary extends APIResource { /** diff --git a/src/resources/radar/http/timeseries-groups.ts b/src/resources/radar/http/timeseries-groups.ts index 8540d2466d..1299d5b940 100644 --- a/src/resources/radar/http/timeseries-groups.ts +++ b/src/resources/radar/http/timeseries-groups.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as TimeseriesGroupsAPI from 'cloudflare/resources/radar/http/timeseries-groups'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as TimeseriesGroupsAPI from './timeseries-groups'; export class TimeseriesGroups extends APIResource { /** diff --git a/src/resources/radar/http/top.ts b/src/resources/radar/http/top.ts index 15c91c12ee..9d17fc1bd1 100644 --- a/src/resources/radar/http/top.ts +++ b/src/resources/radar/http/top.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as TopAPI from 'cloudflare/resources/radar/http/top'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as TopAPI from './top'; export class Top extends APIResource { /** diff --git a/src/resources/radar/netflows/netflows.ts b/src/resources/radar/netflows/netflows.ts index 4e86717bc2..28ab287f19 100644 --- a/src/resources/radar/netflows/netflows.ts +++ b/src/resources/radar/netflows/netflows.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as NetflowsAPI from 'cloudflare/resources/radar/netflows/netflows'; -import * as TopAPI from 'cloudflare/resources/radar/netflows/top'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as NetflowsAPI from './netflows'; +import * as TopAPI from './top'; export class Netflows extends APIResource { top: TopAPI.Top = new TopAPI.Top(this._client); diff --git a/src/resources/radar/netflows/top.ts b/src/resources/radar/netflows/top.ts index 4ff4f5eda5..a83791bdca 100644 --- a/src/resources/radar/netflows/top.ts +++ b/src/resources/radar/netflows/top.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as TopAPI from 'cloudflare/resources/radar/netflows/top'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as TopAPI from './top'; export class Top extends APIResource { /** diff --git a/src/resources/radar/quality/iqi.ts b/src/resources/radar/quality/iqi.ts index 4e6f89cf23..32f64696cf 100644 --- a/src/resources/radar/quality/iqi.ts +++ b/src/resources/radar/quality/iqi.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as IQIAPI from 'cloudflare/resources/radar/quality/iqi'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as IQIAPI from './iqi'; export class IQI extends APIResource { /** diff --git a/src/resources/radar/quality/quality.ts b/src/resources/radar/quality/quality.ts index 83c0129e60..d1836e4e82 100644 --- a/src/resources/radar/quality/quality.ts +++ b/src/resources/radar/quality/quality.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as IQIAPI from 'cloudflare/resources/radar/quality/iqi'; -import * as SpeedAPI from 'cloudflare/resources/radar/quality/speed/speed'; +import { APIResource } from '../../../resource'; +import * as IQIAPI from './iqi'; +import * as SpeedAPI from './speed/speed'; export class Quality extends APIResource { iqi: IQIAPI.IQI = new IQIAPI.IQI(this._client); diff --git a/src/resources/radar/quality/speed/speed.ts b/src/resources/radar/quality/speed/speed.ts index 2d8c324a2b..b2ad4f7fe2 100644 --- a/src/resources/radar/quality/speed/speed.ts +++ b/src/resources/radar/quality/speed/speed.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as SpeedAPI from 'cloudflare/resources/radar/quality/speed/speed'; -import * as TopAPI from 'cloudflare/resources/radar/quality/speed/top'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as SpeedAPI from './speed'; +import * as TopAPI from './top'; export class Speed extends APIResource { top: TopAPI.Top = new TopAPI.Top(this._client); diff --git a/src/resources/radar/quality/speed/top.ts b/src/resources/radar/quality/speed/top.ts index 70d9470f8b..b0c58cdb3e 100644 --- a/src/resources/radar/quality/speed/top.ts +++ b/src/resources/radar/quality/speed/top.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as TopAPI from 'cloudflare/resources/radar/quality/speed/top'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as TopAPI from './top'; export class Top extends APIResource { /** diff --git a/src/resources/radar/radar.ts b/src/resources/radar/radar.ts index a8e6cdf3d2..f204f32c5b 100644 --- a/src/resources/radar/radar.ts +++ b/src/resources/radar/radar.ts @@ -1,22 +1,22 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as ConnectionTamperingAPI from 'cloudflare/resources/radar/connection-tampering'; -import * as DatasetsAPI from 'cloudflare/resources/radar/datasets'; -import * as SearchAPI from 'cloudflare/resources/radar/search'; -import * as AnnotationsAPI from 'cloudflare/resources/radar/annotations/annotations'; -import * as AS112API from 'cloudflare/resources/radar/as112/as112'; -import * as AttacksAPI from 'cloudflare/resources/radar/attacks/attacks'; -import * as BGPAPI from 'cloudflare/resources/radar/bgp/bgp'; -import * as DNSAPI from 'cloudflare/resources/radar/dns/dns'; -import * as EmailAPI from 'cloudflare/resources/radar/email/email'; -import * as EntitiesAPI from 'cloudflare/resources/radar/entities/entities'; -import * as HTTPAPI from 'cloudflare/resources/radar/http/http'; -import * as NetflowsAPI from 'cloudflare/resources/radar/netflows/netflows'; -import * as QualityAPI from 'cloudflare/resources/radar/quality/quality'; -import * as RankingAPI from 'cloudflare/resources/radar/ranking/ranking'; -import * as TrafficAnomaliesAPI from 'cloudflare/resources/radar/traffic-anomalies/traffic-anomalies'; -import * as VerifiedBotsAPI from 'cloudflare/resources/radar/verified-bots/verified-bots'; +import { APIResource } from '../../resource'; +import * as ConnectionTamperingAPI from './connection-tampering'; +import * as DatasetsAPI from './datasets'; +import * as SearchAPI from './search'; +import * as AnnotationsAPI from './annotations/annotations'; +import * as AS112API from './as112/as112'; +import * as AttacksAPI from './attacks/attacks'; +import * as BGPAPI from './bgp/bgp'; +import * as DNSAPI from './dns/dns'; +import * as EmailAPI from './email/email'; +import * as EntitiesAPI from './entities/entities'; +import * as HTTPAPI from './http/http'; +import * as NetflowsAPI from './netflows/netflows'; +import * as QualityAPI from './quality/quality'; +import * as RankingAPI from './ranking/ranking'; +import * as TrafficAnomaliesAPI from './traffic-anomalies/traffic-anomalies'; +import * as VerifiedBotsAPI from './verified-bots/verified-bots'; export class Radar extends APIResource { annotations: AnnotationsAPI.Annotations = new AnnotationsAPI.Annotations(this._client); diff --git a/src/resources/radar/ranking/domain.ts b/src/resources/radar/ranking/domain.ts index 0cd253072a..9d159f3da1 100644 --- a/src/resources/radar/ranking/domain.ts +++ b/src/resources/radar/ranking/domain.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as DomainAPI from 'cloudflare/resources/radar/ranking/domain'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as DomainAPI from './domain'; export class Domain extends APIResource { /** diff --git a/src/resources/radar/ranking/ranking.ts b/src/resources/radar/ranking/ranking.ts index 37b036951a..6079302db6 100644 --- a/src/resources/radar/ranking/ranking.ts +++ b/src/resources/radar/ranking/ranking.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as RankingAPI from 'cloudflare/resources/radar/ranking/ranking'; -import * as DomainAPI from 'cloudflare/resources/radar/ranking/domain'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as RankingAPI from './ranking'; +import * as DomainAPI from './domain'; export class Ranking extends APIResource { domain: DomainAPI.Domain = new DomainAPI.Domain(this._client); diff --git a/src/resources/radar/search.ts b/src/resources/radar/search.ts index 082cfce15e..691450b174 100644 --- a/src/resources/radar/search.ts +++ b/src/resources/radar/search.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SearchAPI from 'cloudflare/resources/radar/search'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as SearchAPI from './search'; export class Search extends APIResource { /** diff --git a/src/resources/radar/traffic-anomalies/locations.ts b/src/resources/radar/traffic-anomalies/locations.ts index dc778618fd..4962732b4d 100644 --- a/src/resources/radar/traffic-anomalies/locations.ts +++ b/src/resources/radar/traffic-anomalies/locations.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as LocationsAPI from 'cloudflare/resources/radar/traffic-anomalies/locations'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as LocationsAPI from './locations'; export class Locations extends APIResource { /** diff --git a/src/resources/radar/traffic-anomalies/traffic-anomalies.ts b/src/resources/radar/traffic-anomalies/traffic-anomalies.ts index 1fd95b1676..f21d3a3e28 100644 --- a/src/resources/radar/traffic-anomalies/traffic-anomalies.ts +++ b/src/resources/radar/traffic-anomalies/traffic-anomalies.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as TrafficAnomaliesAPI from 'cloudflare/resources/radar/traffic-anomalies/traffic-anomalies'; -import * as LocationsAPI from 'cloudflare/resources/radar/traffic-anomalies/locations'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as TrafficAnomaliesAPI from './traffic-anomalies'; +import * as LocationsAPI from './locations'; export class TrafficAnomalies extends APIResource { locations: LocationsAPI.Locations = new LocationsAPI.Locations(this._client); diff --git a/src/resources/radar/verified-bots/top.ts b/src/resources/radar/verified-bots/top.ts index b8530b37bc..3dab14505b 100644 --- a/src/resources/radar/verified-bots/top.ts +++ b/src/resources/radar/verified-bots/top.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as TopAPI from 'cloudflare/resources/radar/verified-bots/top'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as TopAPI from './top'; export class Top extends APIResource { /** diff --git a/src/resources/radar/verified-bots/verified-bots.ts b/src/resources/radar/verified-bots/verified-bots.ts index 25cc5b1aef..9983346183 100644 --- a/src/resources/radar/verified-bots/verified-bots.ts +++ b/src/resources/radar/verified-bots/verified-bots.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as TopAPI from 'cloudflare/resources/radar/verified-bots/top'; +import { APIResource } from '../../../resource'; +import * as TopAPI from './top'; export class VerifiedBots extends APIResource { top: TopAPI.Top = new TopAPI.Top(this._client); diff --git a/src/resources/rate-limits.ts b/src/resources/rate-limits.ts index 72ce8264e9..e4d965db89 100644 --- a/src/resources/rate-limits.ts +++ b/src/resources/rate-limits.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as RateLimitsAPI from 'cloudflare/resources/rate-limits'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../core'; +import { APIResource } from '../resource'; +import { isRequestOptions } from '../core'; +import * as RateLimitsAPI from './rate-limits'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../pagination'; export class RateLimits extends APIResource { /** diff --git a/src/resources/rate-plans.ts b/src/resources/rate-plans.ts index f5d309fdc6..a364ee2022 100644 --- a/src/resources/rate-plans.ts +++ b/src/resources/rate-plans.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; +import * as Core from '../core'; +import { APIResource } from '../resource'; export class RatePlans extends APIResource { /** diff --git a/src/resources/registrar/domains.ts b/src/resources/registrar/domains.ts index ee59ec07ea..7d3de76c77 100644 --- a/src/resources/registrar/domains.ts +++ b/src/resources/registrar/domains.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DomainsAPI from 'cloudflare/resources/registrar/domains'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as DomainsAPI from './domains'; +import { SinglePage } from '../../pagination'; export class Domains extends APIResource { /** diff --git a/src/resources/registrar/registrar.ts b/src/resources/registrar/registrar.ts index f6b3024561..c7b79a625d 100644 --- a/src/resources/registrar/registrar.ts +++ b/src/resources/registrar/registrar.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as DomainsAPI from 'cloudflare/resources/registrar/domains'; +import { APIResource } from '../../resource'; +import * as DomainsAPI from './domains'; export class Registrar extends APIResource { domains: DomainsAPI.Domains = new DomainsAPI.Domains(this._client); diff --git a/src/resources/request-tracers/request-tracers.ts b/src/resources/request-tracers/request-tracers.ts index c0068f7b90..4d7396aa06 100644 --- a/src/resources/request-tracers/request-tracers.ts +++ b/src/resources/request-tracers/request-tracers.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as TracesAPI from 'cloudflare/resources/request-tracers/traces'; +import { APIResource } from '../../resource'; +import * as TracesAPI from './traces'; export class RequestTracers extends APIResource { traces: TracesAPI.Traces = new TracesAPI.Traces(this._client); diff --git a/src/resources/request-tracers/traces.ts b/src/resources/request-tracers/traces.ts index e6a38c4b76..67da17e582 100644 --- a/src/resources/request-tracers/traces.ts +++ b/src/resources/request-tracers/traces.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as TracesAPI from 'cloudflare/resources/request-tracers/traces'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as TracesAPI from './traces'; export class Traces extends APIResource { /** diff --git a/src/resources/rules/lists/bulk-operations.ts b/src/resources/rules/lists/bulk-operations.ts index 745fe18635..b5dba1e7a3 100644 --- a/src/resources/rules/lists/bulk-operations.ts +++ b/src/resources/rules/lists/bulk-operations.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as BulkOperationsAPI from 'cloudflare/resources/rules/lists/bulk-operations'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as BulkOperationsAPI from './bulk-operations'; export class BulkOperations extends APIResource { /** diff --git a/src/resources/rules/lists/items.ts b/src/resources/rules/lists/items.ts index 913858c7fe..6aaa20856a 100644 --- a/src/resources/rules/lists/items.ts +++ b/src/resources/rules/lists/items.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ItemsAPI from 'cloudflare/resources/rules/lists/items'; -import * as ListsAPI from 'cloudflare/resources/rules/lists/lists'; -import { CursorPagination, type CursorPaginationParams } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ItemsAPI from './items'; +import * as ListsAPI from './lists'; +import { CursorPagination, type CursorPaginationParams } from '../../../pagination'; export class Items extends APIResource { /** diff --git a/src/resources/rules/lists/lists.ts b/src/resources/rules/lists/lists.ts index 909143fe4c..21216d6cfc 100644 --- a/src/resources/rules/lists/lists.ts +++ b/src/resources/rules/lists/lists.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ListsAPI from 'cloudflare/resources/rules/lists/lists'; -import * as BulkOperationsAPI from 'cloudflare/resources/rules/lists/bulk-operations'; -import * as ItemsAPI from 'cloudflare/resources/rules/lists/items'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ListsAPI from './lists'; +import * as BulkOperationsAPI from './bulk-operations'; +import * as ItemsAPI from './items'; +import { SinglePage } from '../../../pagination'; export class Lists extends APIResource { bulkOperations: BulkOperationsAPI.BulkOperations = new BulkOperationsAPI.BulkOperations(this._client); diff --git a/src/resources/rules/rules.ts b/src/resources/rules/rules.ts index 9a21de7fcd..024dcf605e 100644 --- a/src/resources/rules/rules.ts +++ b/src/resources/rules/rules.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as ListsAPI from 'cloudflare/resources/rules/lists/lists'; +import { APIResource } from '../../resource'; +import * as ListsAPI from './lists/lists'; export class Rules extends APIResource { lists: ListsAPI.Lists = new ListsAPI.Lists(this._client); diff --git a/src/resources/rulesets/phases/phases.ts b/src/resources/rulesets/phases/phases.ts index 349bb66989..e3a8719092 100644 --- a/src/resources/rulesets/phases/phases.ts +++ b/src/resources/rulesets/phases/phases.ts @@ -1,13 +1,13 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { CloudflareError } from 'cloudflare/error'; -import * as PhasesAPI from 'cloudflare/resources/rulesets/phases/phases'; -import * as RulesAPI from 'cloudflare/resources/rulesets/rules'; -import * as RulesetsAPI from 'cloudflare/resources/rulesets/rulesets'; -import * as VersionsAPI from 'cloudflare/resources/rulesets/phases/versions'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import { CloudflareError } from '../../../error'; +import * as PhasesAPI from './phases'; +import * as RulesAPI from '../rules'; +import * as RulesetsAPI from '../rulesets'; +import * as VersionsAPI from './versions'; export class Phases extends APIResource { versions: VersionsAPI.Versions = new VersionsAPI.Versions(this._client); diff --git a/src/resources/rulesets/phases/versions.ts b/src/resources/rulesets/phases/versions.ts index 1a4cb47b84..27be834baa 100644 --- a/src/resources/rulesets/phases/versions.ts +++ b/src/resources/rulesets/phases/versions.ts @@ -1,13 +1,13 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { CloudflareError } from 'cloudflare/error'; -import * as VersionsAPI from 'cloudflare/resources/rulesets/phases/versions'; -import * as RulesAPI from 'cloudflare/resources/rulesets/rules'; -import * as RulesetsAPI from 'cloudflare/resources/rulesets/rulesets'; -import { RulesetsSinglePage } from 'cloudflare/resources/rulesets/rulesets'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import { CloudflareError } from '../../../error'; +import * as VersionsAPI from './versions'; +import * as RulesAPI from '../rules'; +import * as RulesetsAPI from '../rulesets'; +import { RulesetsSinglePage } from '../rulesets'; export class Versions extends APIResource { /** diff --git a/src/resources/rulesets/rules.ts b/src/resources/rulesets/rules.ts index baa68886f9..caf33230d4 100644 --- a/src/resources/rulesets/rules.ts +++ b/src/resources/rulesets/rules.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { CloudflareError } from 'cloudflare/error'; -import * as RulesAPI from 'cloudflare/resources/rulesets/rules'; -import * as RulesetsAPI from 'cloudflare/resources/rulesets/rulesets'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import { CloudflareError } from '../../error'; +import * as RulesAPI from './rules'; +import * as RulesetsAPI from './rulesets'; export class Rules extends APIResource { /** diff --git a/src/resources/rulesets/rulesets.ts b/src/resources/rulesets/rulesets.ts index 87d201a7d9..91486846b9 100644 --- a/src/resources/rulesets/rulesets.ts +++ b/src/resources/rulesets/rulesets.ts @@ -1,13 +1,13 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { CloudflareError } from 'cloudflare/error'; -import * as RulesAPI from 'cloudflare/resources/rulesets/rules'; -import * as PhasesAPI from 'cloudflare/resources/rulesets/phases/phases'; -import * as VersionsAPI from 'cloudflare/resources/rulesets/versions/versions'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import { CloudflareError } from '../../error'; +import * as RulesAPI from './rules'; +import * as PhasesAPI from './phases/phases'; +import * as VersionsAPI from './versions/versions'; +import { SinglePage } from '../../pagination'; export class Rulesets extends APIResource { phases: PhasesAPI.Phases = new PhasesAPI.Phases(this._client); diff --git a/src/resources/rulesets/versions/by-tag.ts b/src/resources/rulesets/versions/by-tag.ts index 8274986908..cc42060c78 100644 --- a/src/resources/rulesets/versions/by-tag.ts +++ b/src/resources/rulesets/versions/by-tag.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ByTagAPI from 'cloudflare/resources/rulesets/versions/by-tag'; -import * as RulesAPI from 'cloudflare/resources/rulesets/rules'; -import * as RulesetsAPI from 'cloudflare/resources/rulesets/rulesets'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ByTagAPI from './by-tag'; +import * as RulesAPI from '../rules'; +import * as RulesetsAPI from '../rulesets'; export class ByTag extends APIResource { /** diff --git a/src/resources/rulesets/versions/versions.ts b/src/resources/rulesets/versions/versions.ts index 4bbb039ed6..d79224f50d 100644 --- a/src/resources/rulesets/versions/versions.ts +++ b/src/resources/rulesets/versions/versions.ts @@ -1,14 +1,14 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { CloudflareError } from 'cloudflare/error'; -import * as VersionsAPI from 'cloudflare/resources/rulesets/versions/versions'; -import * as RulesAPI from 'cloudflare/resources/rulesets/rules'; -import * as RulesetsAPI from 'cloudflare/resources/rulesets/rulesets'; -import { RulesetsSinglePage } from 'cloudflare/resources/rulesets/rulesets'; -import * as ByTagAPI from 'cloudflare/resources/rulesets/versions/by-tag'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import { CloudflareError } from '../../../error'; +import * as VersionsAPI from './versions'; +import * as RulesAPI from '../rules'; +import * as RulesetsAPI from '../rulesets'; +import { RulesetsSinglePage } from '../rulesets'; +import * as ByTagAPI from './by-tag'; export class Versions extends APIResource { byTag: ByTagAPI.ByTag = new ByTagAPI.ByTag(this._client); diff --git a/src/resources/rum/rules.ts b/src/resources/rum/rules.ts index e654dceed2..f92883470c 100644 --- a/src/resources/rum/rules.ts +++ b/src/resources/rum/rules.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as RulesAPI from 'cloudflare/resources/rum/rules'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as RulesAPI from './rules'; export class Rules extends APIResource { /** diff --git a/src/resources/rum/rum.ts b/src/resources/rum/rum.ts index eef3ab088d..379996b3a1 100644 --- a/src/resources/rum/rum.ts +++ b/src/resources/rum/rum.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as RulesAPI from 'cloudflare/resources/rum/rules'; -import * as SiteInfoAPI from 'cloudflare/resources/rum/site-info'; +import { APIResource } from '../../resource'; +import * as RulesAPI from './rules'; +import * as SiteInfoAPI from './site-info'; export class RUM extends APIResource { siteInfo: SiteInfoAPI.SiteInfo = new SiteInfoAPI.SiteInfo(this._client); diff --git a/src/resources/rum/site-info.ts b/src/resources/rum/site-info.ts index 6ee17825f5..3670c02756 100644 --- a/src/resources/rum/site-info.ts +++ b/src/resources/rum/site-info.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SiteInfoAPI from 'cloudflare/resources/rum/site-info'; -import * as RulesAPI from 'cloudflare/resources/rum/rules'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as SiteInfoAPI from './site-info'; +import * as RulesAPI from './rules'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class SiteInfo extends APIResource { /** diff --git a/src/resources/secondary-dns/acls.ts b/src/resources/secondary-dns/acls.ts index 08bed9a927..fda6b5436d 100644 --- a/src/resources/secondary-dns/acls.ts +++ b/src/resources/secondary-dns/acls.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ACLsAPI from 'cloudflare/resources/secondary-dns/acls'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as ACLsAPI from './acls'; +import { SinglePage } from '../../pagination'; export class ACLs extends APIResource { /** diff --git a/src/resources/secondary-dns/force-axfr.ts b/src/resources/secondary-dns/force-axfr.ts index 6ececea486..4fc6a56dff 100644 --- a/src/resources/secondary-dns/force-axfr.ts +++ b/src/resources/secondary-dns/force-axfr.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ForceAXFRAPI from 'cloudflare/resources/secondary-dns/force-axfr'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as ForceAXFRAPI from './force-axfr'; export class ForceAXFRResource extends APIResource { /** diff --git a/src/resources/secondary-dns/incoming.ts b/src/resources/secondary-dns/incoming.ts index 1ffd9e0234..d9a16516b5 100644 --- a/src/resources/secondary-dns/incoming.ts +++ b/src/resources/secondary-dns/incoming.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as IncomingAPI from 'cloudflare/resources/secondary-dns/incoming'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as IncomingAPI from './incoming'; export class IncomingResource extends APIResource { /** diff --git a/src/resources/secondary-dns/outgoing/outgoing.ts b/src/resources/secondary-dns/outgoing/outgoing.ts index e85776b865..4511773133 100644 --- a/src/resources/secondary-dns/outgoing/outgoing.ts +++ b/src/resources/secondary-dns/outgoing/outgoing.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as OutgoingAPI from 'cloudflare/resources/secondary-dns/outgoing/outgoing'; -import * as StatusAPI from 'cloudflare/resources/secondary-dns/outgoing/status'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as OutgoingAPI from './outgoing'; +import * as StatusAPI from './status'; export class OutgoingResource extends APIResource { status: StatusAPI.Status = new StatusAPI.Status(this._client); diff --git a/src/resources/secondary-dns/outgoing/status.ts b/src/resources/secondary-dns/outgoing/status.ts index cf882368f8..984949359f 100644 --- a/src/resources/secondary-dns/outgoing/status.ts +++ b/src/resources/secondary-dns/outgoing/status.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as StatusAPI from 'cloudflare/resources/secondary-dns/outgoing/status'; -import * as OutgoingAPI from 'cloudflare/resources/secondary-dns/outgoing/outgoing'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as StatusAPI from './status'; +import * as OutgoingAPI from './outgoing'; export class Status extends APIResource { /** diff --git a/src/resources/secondary-dns/peers.ts b/src/resources/secondary-dns/peers.ts index 44b69b2d35..8acddc4146 100644 --- a/src/resources/secondary-dns/peers.ts +++ b/src/resources/secondary-dns/peers.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PeersAPI from 'cloudflare/resources/secondary-dns/peers'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as PeersAPI from './peers'; +import { SinglePage } from '../../pagination'; export class Peers extends APIResource { /** diff --git a/src/resources/secondary-dns/secondary-dns.ts b/src/resources/secondary-dns/secondary-dns.ts index d507404f36..7a730b3597 100644 --- a/src/resources/secondary-dns/secondary-dns.ts +++ b/src/resources/secondary-dns/secondary-dns.ts @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as ACLsAPI from 'cloudflare/resources/secondary-dns/acls'; -import * as ForceAXFRAPI from 'cloudflare/resources/secondary-dns/force-axfr'; -import * as IncomingAPI from 'cloudflare/resources/secondary-dns/incoming'; -import * as PeersAPI from 'cloudflare/resources/secondary-dns/peers'; -import * as TSIGsAPI from 'cloudflare/resources/secondary-dns/tsigs'; -import * as OutgoingAPI from 'cloudflare/resources/secondary-dns/outgoing/outgoing'; +import { APIResource } from '../../resource'; +import * as ACLsAPI from './acls'; +import * as ForceAXFRAPI from './force-axfr'; +import * as IncomingAPI from './incoming'; +import * as PeersAPI from './peers'; +import * as TSIGsAPI from './tsigs'; +import * as OutgoingAPI from './outgoing/outgoing'; export class SecondaryDNS extends APIResource { forceAXFR: ForceAXFRAPI.ForceAXFRResource = new ForceAXFRAPI.ForceAXFRResource(this._client); diff --git a/src/resources/secondary-dns/tsigs.ts b/src/resources/secondary-dns/tsigs.ts index 4352b3966a..5142f74ff7 100644 --- a/src/resources/secondary-dns/tsigs.ts +++ b/src/resources/secondary-dns/tsigs.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as TSIGsAPI from 'cloudflare/resources/secondary-dns/tsigs'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as TSIGsAPI from './tsigs'; +import { SinglePage } from '../../pagination'; export class TSIGs extends APIResource { /** diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 6b02fc7917..b853366647 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Shared from 'cloudflare/resources/shared'; -import { SinglePage, V4PagePaginationArray } from 'cloudflare/pagination'; +import * as Shared from './shared'; +import { SinglePage, V4PagePaginationArray } from '../pagination'; export type ASN = number; diff --git a/src/resources/snippets/content.ts b/src/resources/snippets/content.ts index caff3f5ae3..0f47fd7c49 100644 --- a/src/resources/snippets/content.ts +++ b/src/resources/snippets/content.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { type Response } from 'cloudflare/_shims/index'; -import * as ContentAPI from 'cloudflare/resources/snippets/content'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { type Response } from '../../_shims/index'; +import * as ContentAPI from './content'; export class Content extends APIResource { /** diff --git a/src/resources/snippets/rules.ts b/src/resources/snippets/rules.ts index f0233f51aa..4ee74483db 100644 --- a/src/resources/snippets/rules.ts +++ b/src/resources/snippets/rules.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as RulesAPI from 'cloudflare/resources/snippets/rules'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as RulesAPI from './rules'; +import { SinglePage } from '../../pagination'; export class Rules extends APIResource { /** diff --git a/src/resources/snippets/snippets.ts b/src/resources/snippets/snippets.ts index b4f98acdd6..ce814b9a59 100644 --- a/src/resources/snippets/snippets.ts +++ b/src/resources/snippets/snippets.ts @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as Shared from 'cloudflare/resources/shared'; -import * as ContentAPI from 'cloudflare/resources/snippets/content'; -import * as RulesAPI from 'cloudflare/resources/snippets/rules'; -import { multipartFormRequestOptions } from 'cloudflare/core'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as Shared from '../shared'; +import * as ContentAPI from './content'; +import * as RulesAPI from './rules'; +import { multipartFormRequestOptions } from '../../core'; +import { SinglePage } from '../../pagination'; export class Snippets extends APIResource { content: ContentAPI.Content = new ContentAPI.Content(this._client); diff --git a/src/resources/spectrum/analytics/aggregates/aggregates.ts b/src/resources/spectrum/analytics/aggregates/aggregates.ts index 923e7ef1f1..815bca4142 100644 --- a/src/resources/spectrum/analytics/aggregates/aggregates.ts +++ b/src/resources/spectrum/analytics/aggregates/aggregates.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as CurrentsAPI from 'cloudflare/resources/spectrum/analytics/aggregates/currents'; +import { APIResource } from '../../../../resource'; +import * as CurrentsAPI from './currents'; export class Aggregates extends APIResource { currents: CurrentsAPI.Currents = new CurrentsAPI.Currents(this._client); diff --git a/src/resources/spectrum/analytics/aggregates/currents.ts b/src/resources/spectrum/analytics/aggregates/currents.ts index 486e687607..a3c937040f 100644 --- a/src/resources/spectrum/analytics/aggregates/currents.ts +++ b/src/resources/spectrum/analytics/aggregates/currents.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as CurrentsAPI from 'cloudflare/resources/spectrum/analytics/aggregates/currents'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as CurrentsAPI from './currents'; export class Currents extends APIResource { /** diff --git a/src/resources/spectrum/analytics/analytics.ts b/src/resources/spectrum/analytics/analytics.ts index f32afbfee2..3981cfdf8d 100644 --- a/src/resources/spectrum/analytics/analytics.ts +++ b/src/resources/spectrum/analytics/analytics.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as AggregatesAPI from 'cloudflare/resources/spectrum/analytics/aggregates/aggregates'; -import * as EventsAPI from 'cloudflare/resources/spectrum/analytics/events/events'; +import { APIResource } from '../../../resource'; +import * as AggregatesAPI from './aggregates/aggregates'; +import * as EventsAPI from './events/events'; export class Analytics extends APIResource { aggregates: AggregatesAPI.Aggregates = new AggregatesAPI.Aggregates(this._client); diff --git a/src/resources/spectrum/analytics/events/bytimes.ts b/src/resources/spectrum/analytics/events/bytimes.ts index 8f215ff928..d067dc97db 100644 --- a/src/resources/spectrum/analytics/events/bytimes.ts +++ b/src/resources/spectrum/analytics/events/bytimes.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as BytimesAPI from 'cloudflare/resources/spectrum/analytics/events/bytimes'; -import * as EventsAPI from 'cloudflare/resources/spectrum/analytics/events/events'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as BytimesAPI from './bytimes'; +import * as EventsAPI from './events'; export class Bytimes extends APIResource { /** diff --git a/src/resources/spectrum/analytics/events/events.ts b/src/resources/spectrum/analytics/events/events.ts index e3c3c86a1f..ab7c699dc2 100644 --- a/src/resources/spectrum/analytics/events/events.ts +++ b/src/resources/spectrum/analytics/events/events.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as EventsAPI from 'cloudflare/resources/spectrum/analytics/events/events'; -import * as BytimesAPI from 'cloudflare/resources/spectrum/analytics/events/bytimes'; -import * as SummariesAPI from 'cloudflare/resources/spectrum/analytics/events/summaries'; +import { APIResource } from '../../../../resource'; +import * as EventsAPI from './events'; +import * as BytimesAPI from './bytimes'; +import * as SummariesAPI from './summaries'; export class Events extends APIResource { bytimes: BytimesAPI.Bytimes = new BytimesAPI.Bytimes(this._client); diff --git a/src/resources/spectrum/analytics/events/summaries.ts b/src/resources/spectrum/analytics/events/summaries.ts index e267585d8a..52fd2303d0 100644 --- a/src/resources/spectrum/analytics/events/summaries.ts +++ b/src/resources/spectrum/analytics/events/summaries.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as SummariesAPI from 'cloudflare/resources/spectrum/analytics/events/summaries'; -import * as EventsAPI from 'cloudflare/resources/spectrum/analytics/events/events'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import * as SummariesAPI from './summaries'; +import * as EventsAPI from './events'; export class Summaries extends APIResource { /** diff --git a/src/resources/spectrum/apps.ts b/src/resources/spectrum/apps.ts index 1409a2204f..a141152723 100644 --- a/src/resources/spectrum/apps.ts +++ b/src/resources/spectrum/apps.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as AppsAPI from 'cloudflare/resources/spectrum/apps'; -import * as SpectrumAPI from 'cloudflare/resources/spectrum/spectrum'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import * as AppsAPI from './apps'; +import * as SpectrumAPI from './spectrum'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class Apps extends APIResource { /** diff --git a/src/resources/spectrum/spectrum.ts b/src/resources/spectrum/spectrum.ts index c163eae99d..27b0055b81 100644 --- a/src/resources/spectrum/spectrum.ts +++ b/src/resources/spectrum/spectrum.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as AppsAPI from 'cloudflare/resources/spectrum/apps'; -import * as AnalyticsAPI from 'cloudflare/resources/spectrum/analytics/analytics'; +import { APIResource } from '../../resource'; +import * as AppsAPI from './apps'; +import * as AnalyticsAPI from './analytics/analytics'; export class Spectrum extends APIResource { analytics: AnalyticsAPI.Analytics = new AnalyticsAPI.Analytics(this._client); diff --git a/src/resources/speed/availabilities.ts b/src/resources/speed/availabilities.ts index 52a9b4aea0..3cb8fa4074 100644 --- a/src/resources/speed/availabilities.ts +++ b/src/resources/speed/availabilities.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AvailabilitiesAPI from 'cloudflare/resources/speed/availabilities'; -import * as SpeedAPI from 'cloudflare/resources/speed/speed'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as AvailabilitiesAPI from './availabilities'; +import * as SpeedAPI from './speed'; export class Availabilities extends APIResource { /** diff --git a/src/resources/speed/pages/pages.ts b/src/resources/speed/pages/pages.ts index b8893dbbba..12472afdcd 100644 --- a/src/resources/speed/pages/pages.ts +++ b/src/resources/speed/pages/pages.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PagesAPI from 'cloudflare/resources/speed/pages/pages'; -import * as SpeedAPI from 'cloudflare/resources/speed/speed'; -import * as TestsAPI from 'cloudflare/resources/speed/pages/tests'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as PagesAPI from './pages'; +import * as SpeedAPI from '../speed'; +import * as TestsAPI from './tests'; +import { SinglePage } from '../../../pagination'; export class Pages extends APIResource { tests: TestsAPI.Tests = new TestsAPI.Tests(this._client); diff --git a/src/resources/speed/pages/tests.ts b/src/resources/speed/pages/tests.ts index 77868fcb24..dbb70fa2e2 100644 --- a/src/resources/speed/pages/tests.ts +++ b/src/resources/speed/pages/tests.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as TestsAPI from 'cloudflare/resources/speed/pages/tests'; -import * as Shared from 'cloudflare/resources/shared'; -import * as SpeedAPI from 'cloudflare/resources/speed/speed'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as TestsAPI from './tests'; +import * as Shared from '../../shared'; +import * as SpeedAPI from '../speed'; export class Tests extends APIResource { /** diff --git a/src/resources/speed/schedule.ts b/src/resources/speed/schedule.ts index f0b05ee760..a1b906eba9 100644 --- a/src/resources/speed/schedule.ts +++ b/src/resources/speed/schedule.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ScheduleAPI from 'cloudflare/resources/speed/schedule'; -import * as TestsAPI from 'cloudflare/resources/speed/pages/tests'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as ScheduleAPI from './schedule'; +import * as TestsAPI from './pages/tests'; export class ScheduleResource extends APIResource { /** diff --git a/src/resources/speed/speed.ts b/src/resources/speed/speed.ts index a67da1cf0d..a4c930f26e 100644 --- a/src/resources/speed/speed.ts +++ b/src/resources/speed/speed.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as AvailabilitiesAPI from 'cloudflare/resources/speed/availabilities'; -import * as ScheduleAPI from 'cloudflare/resources/speed/schedule'; -import * as PagesAPI from 'cloudflare/resources/speed/pages/pages'; +import { APIResource } from '../../resource'; +import * as AvailabilitiesAPI from './availabilities'; +import * as ScheduleAPI from './schedule'; +import * as PagesAPI from './pages/pages'; export class Speed extends APIResource { schedule: ScheduleAPI.ScheduleResource = new ScheduleAPI.ScheduleResource(this._client); diff --git a/src/resources/ssl/analyze.ts b/src/resources/ssl/analyze.ts index cd698a564f..9de5466f44 100644 --- a/src/resources/ssl/analyze.ts +++ b/src/resources/ssl/analyze.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AnalyzeAPI from 'cloudflare/resources/ssl/analyze'; -import * as CustomHostnamesAPI from 'cloudflare/resources/custom-hostnames/custom-hostnames'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as AnalyzeAPI from './analyze'; +import * as CustomHostnamesAPI from '../custom-hostnames/custom-hostnames'; export class Analyze extends APIResource { /** diff --git a/src/resources/ssl/certificate-packs/certificate-packs.ts b/src/resources/ssl/certificate-packs/certificate-packs.ts index ab0343dc4f..dfd511dbf5 100644 --- a/src/resources/ssl/certificate-packs/certificate-packs.ts +++ b/src/resources/ssl/certificate-packs/certificate-packs.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as CertificatePacksAPI from 'cloudflare/resources/ssl/certificate-packs/certificate-packs'; -import * as OrderAPI from 'cloudflare/resources/ssl/certificate-packs/order'; -import * as QuotaAPI from 'cloudflare/resources/ssl/certificate-packs/quota'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as CertificatePacksAPI from './certificate-packs'; +import * as OrderAPI from './order'; +import * as QuotaAPI from './quota'; +import { SinglePage } from '../../../pagination'; export class CertificatePacks extends APIResource { order: OrderAPI.Order = new OrderAPI.Order(this._client); diff --git a/src/resources/ssl/certificate-packs/order.ts b/src/resources/ssl/certificate-packs/order.ts index 30b8096f4f..c4160e4611 100644 --- a/src/resources/ssl/certificate-packs/order.ts +++ b/src/resources/ssl/certificate-packs/order.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as OrderAPI from 'cloudflare/resources/ssl/certificate-packs/order'; -import * as CertificatePacksAPI from 'cloudflare/resources/ssl/certificate-packs/certificate-packs'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as OrderAPI from './order'; +import * as CertificatePacksAPI from './certificate-packs'; export class Order extends APIResource { /** diff --git a/src/resources/ssl/certificate-packs/quota.ts b/src/resources/ssl/certificate-packs/quota.ts index 833ba5df5f..28c6bf0f78 100644 --- a/src/resources/ssl/certificate-packs/quota.ts +++ b/src/resources/ssl/certificate-packs/quota.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as QuotaAPI from 'cloudflare/resources/ssl/certificate-packs/quota'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as QuotaAPI from './quota'; export class Quota extends APIResource { /** diff --git a/src/resources/ssl/recommendations.ts b/src/resources/ssl/recommendations.ts index effff12a70..7cb5037bdf 100644 --- a/src/resources/ssl/recommendations.ts +++ b/src/resources/ssl/recommendations.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as RecommendationsAPI from 'cloudflare/resources/ssl/recommendations'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as RecommendationsAPI from './recommendations'; export class Recommendations extends APIResource { /** diff --git a/src/resources/ssl/ssl.ts b/src/resources/ssl/ssl.ts index 31236c68b9..f0b563ed37 100644 --- a/src/resources/ssl/ssl.ts +++ b/src/resources/ssl/ssl.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as AnalyzeAPI from 'cloudflare/resources/ssl/analyze'; -import * as RecommendationsAPI from 'cloudflare/resources/ssl/recommendations'; -import * as VerificationAPI from 'cloudflare/resources/ssl/verification'; -import * as CertificatePacksAPI from 'cloudflare/resources/ssl/certificate-packs/certificate-packs'; -import * as UniversalAPI from 'cloudflare/resources/ssl/universal/universal'; +import { APIResource } from '../../resource'; +import * as AnalyzeAPI from './analyze'; +import * as RecommendationsAPI from './recommendations'; +import * as VerificationAPI from './verification'; +import * as CertificatePacksAPI from './certificate-packs/certificate-packs'; +import * as UniversalAPI from './universal/universal'; export class SSL extends APIResource { analyze: AnalyzeAPI.Analyze = new AnalyzeAPI.Analyze(this._client); diff --git a/src/resources/ssl/universal/settings.ts b/src/resources/ssl/universal/settings.ts index c1e7299ffd..da7ce28524 100644 --- a/src/resources/ssl/universal/settings.ts +++ b/src/resources/ssl/universal/settings.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SettingsAPI from 'cloudflare/resources/ssl/universal/settings'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as SettingsAPI from './settings'; export class Settings extends APIResource { /** diff --git a/src/resources/ssl/universal/universal.ts b/src/resources/ssl/universal/universal.ts index 538c8742b4..6d2db0ea1b 100644 --- a/src/resources/ssl/universal/universal.ts +++ b/src/resources/ssl/universal/universal.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as SettingsAPI from 'cloudflare/resources/ssl/universal/settings'; +import { APIResource } from '../../../resource'; +import * as SettingsAPI from './settings'; export class Universal extends APIResource { settings: SettingsAPI.Settings = new SettingsAPI.Settings(this._client); diff --git a/src/resources/ssl/verification.ts b/src/resources/ssl/verification.ts index 66386411af..c09a31abb3 100644 --- a/src/resources/ssl/verification.ts +++ b/src/resources/ssl/verification.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as VerificationAPI from 'cloudflare/resources/ssl/verification'; -import * as CertificatePacksAPI from 'cloudflare/resources/ssl/certificate-packs/certificate-packs'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as VerificationAPI from './verification'; +import * as CertificatePacksAPI from './certificate-packs/certificate-packs'; export class VerificationResource extends APIResource { /** diff --git a/src/resources/storage/analytics.ts b/src/resources/storage/analytics.ts index bece29399e..e09ff49c82 100644 --- a/src/resources/storage/analytics.ts +++ b/src/resources/storage/analytics.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AnalyticsAPI from 'cloudflare/resources/storage/analytics'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as AnalyticsAPI from './analytics'; export class Analytics extends APIResource { /** diff --git a/src/resources/storage/storage.ts b/src/resources/storage/storage.ts index 53f0bbf2dc..4c8e515c96 100644 --- a/src/resources/storage/storage.ts +++ b/src/resources/storage/storage.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as AnalyticsAPI from 'cloudflare/resources/storage/analytics'; +import { APIResource } from '../../resource'; +import * as AnalyticsAPI from './analytics'; export class Storage extends APIResource { analytics: AnalyticsAPI.Analytics = new AnalyticsAPI.Analytics(this._client); diff --git a/src/resources/stream/audio-tracks.ts b/src/resources/stream/audio-tracks.ts index 08ec781536..12924c444c 100644 --- a/src/resources/stream/audio-tracks.ts +++ b/src/resources/stream/audio-tracks.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AudioTracksAPI from 'cloudflare/resources/stream/audio-tracks'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as AudioTracksAPI from './audio-tracks'; export class AudioTracks extends APIResource { /** diff --git a/src/resources/stream/captions/captions.ts b/src/resources/stream/captions/captions.ts index ff0ed4b4bb..4b8a93ac46 100644 --- a/src/resources/stream/captions/captions.ts +++ b/src/resources/stream/captions/captions.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as CaptionsAPI from 'cloudflare/resources/stream/captions/captions'; -import * as LanguageAPI from 'cloudflare/resources/stream/captions/language/language'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as CaptionsAPI from './captions'; +import * as LanguageAPI from './language/language'; export class Captions extends APIResource { language: LanguageAPI.Language = new LanguageAPI.Language(this._client); diff --git a/src/resources/stream/captions/language/language.ts b/src/resources/stream/captions/language/language.ts index 88c65d06a9..06accac4f7 100644 --- a/src/resources/stream/captions/language/language.ts +++ b/src/resources/stream/captions/language/language.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as LanguageAPI from 'cloudflare/resources/stream/captions/language/language'; -import * as CaptionsAPI from 'cloudflare/resources/stream/captions/captions'; -import * as VttAPI from 'cloudflare/resources/stream/captions/language/vtt'; -import { multipartFormRequestOptions } from 'cloudflare/core'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as LanguageAPI from './language'; +import * as CaptionsAPI from '../captions'; +import * as VttAPI from './vtt'; +import { multipartFormRequestOptions } from '../../../../core'; export class Language extends APIResource { vtt: VttAPI.Vtt = new VttAPI.Vtt(this._client); diff --git a/src/resources/stream/captions/language/vtt.ts b/src/resources/stream/captions/language/vtt.ts index b789863b1a..26617fc8f6 100644 --- a/src/resources/stream/captions/language/vtt.ts +++ b/src/resources/stream/captions/language/vtt.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as VttAPI from 'cloudflare/resources/stream/captions/language/vtt'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as VttAPI from './vtt'; export class Vtt extends APIResource { /** diff --git a/src/resources/stream/clip.ts b/src/resources/stream/clip.ts index 8ea608cf86..3e937f61a9 100644 --- a/src/resources/stream/clip.ts +++ b/src/resources/stream/clip.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ClipAPI from 'cloudflare/resources/stream/clip'; -import * as StreamAPI from 'cloudflare/resources/stream/stream'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as ClipAPI from './clip'; +import * as StreamAPI from './stream'; export class ClipResource extends APIResource { /** diff --git a/src/resources/stream/copy.ts b/src/resources/stream/copy.ts index 9950009b80..af4f2dc0a9 100644 --- a/src/resources/stream/copy.ts +++ b/src/resources/stream/copy.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as CopyAPI from 'cloudflare/resources/stream/copy'; -import * as StreamAPI from 'cloudflare/resources/stream/stream'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as CopyAPI from './copy'; +import * as StreamAPI from './stream'; export class Copy extends APIResource { /** diff --git a/src/resources/stream/direct-upload.ts b/src/resources/stream/direct-upload.ts index f727513eab..b55c288ba6 100644 --- a/src/resources/stream/direct-upload.ts +++ b/src/resources/stream/direct-upload.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DirectUploadAPI from 'cloudflare/resources/stream/direct-upload'; -import * as StreamAPI from 'cloudflare/resources/stream/stream'; -import * as WatermarksAPI from 'cloudflare/resources/stream/watermarks'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as DirectUploadAPI from './direct-upload'; +import * as StreamAPI from './stream'; +import * as WatermarksAPI from './watermarks'; export class DirectUpload extends APIResource { /** diff --git a/src/resources/stream/downloads.ts b/src/resources/stream/downloads.ts index 9068af925f..e1dffe591e 100644 --- a/src/resources/stream/downloads.ts +++ b/src/resources/stream/downloads.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DownloadsAPI from 'cloudflare/resources/stream/downloads'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as DownloadsAPI from './downloads'; export class Downloads extends APIResource { /** diff --git a/src/resources/stream/embed.ts b/src/resources/stream/embed.ts index e3eb4d6b4f..f3af5120a5 100644 --- a/src/resources/stream/embed.ts +++ b/src/resources/stream/embed.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as EmbedAPI from 'cloudflare/resources/stream/embed'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as EmbedAPI from './embed'; export class Embed extends APIResource { /** diff --git a/src/resources/stream/keys.ts b/src/resources/stream/keys.ts index 1e9b59311f..fdb757d1c5 100644 --- a/src/resources/stream/keys.ts +++ b/src/resources/stream/keys.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as KeysAPI from 'cloudflare/resources/stream/keys'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as KeysAPI from './keys'; export class Keys extends APIResource { /** diff --git a/src/resources/stream/live-inputs/live-inputs.ts b/src/resources/stream/live-inputs/live-inputs.ts index 02ef19ade9..2986494c16 100644 --- a/src/resources/stream/live-inputs/live-inputs.ts +++ b/src/resources/stream/live-inputs/live-inputs.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as LiveInputsAPI from 'cloudflare/resources/stream/live-inputs/live-inputs'; -import * as OutputsAPI from 'cloudflare/resources/stream/live-inputs/outputs'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as LiveInputsAPI from './live-inputs'; +import * as OutputsAPI from './outputs'; export class LiveInputs extends APIResource { outputs: OutputsAPI.Outputs = new OutputsAPI.Outputs(this._client); diff --git a/src/resources/stream/live-inputs/outputs.ts b/src/resources/stream/live-inputs/outputs.ts index e7babfeaa7..55b3e76cb7 100644 --- a/src/resources/stream/live-inputs/outputs.ts +++ b/src/resources/stream/live-inputs/outputs.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as OutputsAPI from 'cloudflare/resources/stream/live-inputs/outputs'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as OutputsAPI from './outputs'; +import { SinglePage } from '../../../pagination'; export class Outputs extends APIResource { /** diff --git a/src/resources/stream/stream.ts b/src/resources/stream/stream.ts index 4f38c64ea8..3805afcc5e 100644 --- a/src/resources/stream/stream.ts +++ b/src/resources/stream/stream.ts @@ -1,21 +1,21 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AudioTracksAPI from 'cloudflare/resources/stream/audio-tracks'; -import * as ClipAPI from 'cloudflare/resources/stream/clip'; -import * as CopyAPI from 'cloudflare/resources/stream/copy'; -import * as DirectUploadAPI from 'cloudflare/resources/stream/direct-upload'; -import * as DownloadsAPI from 'cloudflare/resources/stream/downloads'; -import * as EmbedAPI from 'cloudflare/resources/stream/embed'; -import * as KeysAPI from 'cloudflare/resources/stream/keys'; -import * as TokenAPI from 'cloudflare/resources/stream/token'; -import * as VideosAPI from 'cloudflare/resources/stream/videos'; -import * as WatermarksAPI from 'cloudflare/resources/stream/watermarks'; -import * as WebhooksAPI from 'cloudflare/resources/stream/webhooks'; -import * as CaptionsAPI from 'cloudflare/resources/stream/captions/captions'; -import * as LiveInputsAPI from 'cloudflare/resources/stream/live-inputs/live-inputs'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as AudioTracksAPI from './audio-tracks'; +import * as ClipAPI from './clip'; +import * as CopyAPI from './copy'; +import * as DirectUploadAPI from './direct-upload'; +import * as DownloadsAPI from './downloads'; +import * as EmbedAPI from './embed'; +import * as KeysAPI from './keys'; +import * as TokenAPI from './token'; +import * as VideosAPI from './videos'; +import * as WatermarksAPI from './watermarks'; +import * as WebhooksAPI from './webhooks'; +import * as CaptionsAPI from './captions/captions'; +import * as LiveInputsAPI from './live-inputs/live-inputs'; +import { SinglePage } from '../../pagination'; export class Stream extends APIResource { audioTracks: AudioTracksAPI.AudioTracks = new AudioTracksAPI.AudioTracks(this._client); diff --git a/src/resources/stream/token.ts b/src/resources/stream/token.ts index d96873aa79..a296dc0ec8 100644 --- a/src/resources/stream/token.ts +++ b/src/resources/stream/token.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as TokenAPI from 'cloudflare/resources/stream/token'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as TokenAPI from './token'; export class Token extends APIResource { /** diff --git a/src/resources/stream/videos.ts b/src/resources/stream/videos.ts index 496255bbdd..be308e595f 100644 --- a/src/resources/stream/videos.ts +++ b/src/resources/stream/videos.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as VideosAPI from 'cloudflare/resources/stream/videos'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as VideosAPI from './videos'; export class Videos extends APIResource { /** diff --git a/src/resources/stream/watermarks.ts b/src/resources/stream/watermarks.ts index 15ab908bcb..dc7c1a0761 100644 --- a/src/resources/stream/watermarks.ts +++ b/src/resources/stream/watermarks.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as WatermarksAPI from 'cloudflare/resources/stream/watermarks'; -import { multipartFormRequestOptions } from 'cloudflare/core'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as WatermarksAPI from './watermarks'; +import { multipartFormRequestOptions } from '../../core'; +import { SinglePage } from '../../pagination'; export class Watermarks extends APIResource { /** diff --git a/src/resources/stream/webhooks.ts b/src/resources/stream/webhooks.ts index 775d4a0e30..bfbbea5d70 100644 --- a/src/resources/stream/webhooks.ts +++ b/src/resources/stream/webhooks.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as WebhooksAPI from 'cloudflare/resources/stream/webhooks'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as WebhooksAPI from './webhooks'; export class Webhooks extends APIResource { /** diff --git a/src/resources/subscriptions.ts b/src/resources/subscriptions.ts index 62ce7ff291..177721ed9a 100644 --- a/src/resources/subscriptions.ts +++ b/src/resources/subscriptions.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as UserSubscriptionsAPI from 'cloudflare/resources/user/subscriptions'; -import { SubscriptionsSinglePage } from 'cloudflare/resources/user/subscriptions'; +import * as Core from '../core'; +import { APIResource } from '../resource'; +import * as UserSubscriptionsAPI from './user/subscriptions'; +import { SubscriptionsSinglePage } from './user/subscriptions'; export class Subscriptions extends APIResource { /** diff --git a/src/resources/url-normalization.ts b/src/resources/url-normalization.ts index 9761b6ec2f..e356cd2031 100644 --- a/src/resources/url-normalization.ts +++ b/src/resources/url-normalization.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; +import * as Core from '../core'; +import { APIResource } from '../resource'; export class URLNormalization extends APIResource { /** diff --git a/src/resources/url-scanner/scans.ts b/src/resources/url-scanner/scans.ts index 622cdcdd9a..a520ab04e6 100644 --- a/src/resources/url-scanner/scans.ts +++ b/src/resources/url-scanner/scans.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { type Response } from 'cloudflare/_shims/index'; -import * as ScansAPI from 'cloudflare/resources/url-scanner/scans'; -import * as TopAPI from 'cloudflare/resources/radar/http/top'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import { type Response } from '../../_shims/index'; +import * as ScansAPI from './scans'; +import * as TopAPI from '../radar/http/top'; export class Scans extends APIResource { /** diff --git a/src/resources/url-scanner/url-scanner.ts b/src/resources/url-scanner/url-scanner.ts index 5e33eea696..b9110fbab2 100644 --- a/src/resources/url-scanner/url-scanner.ts +++ b/src/resources/url-scanner/url-scanner.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as ScansAPI from 'cloudflare/resources/url-scanner/scans'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import * as ScansAPI from './scans'; export class URLScanner extends APIResource { scans: ScansAPI.Scans = new ScansAPI.Scans(this._client); diff --git a/src/resources/user/audit-logs.ts b/src/resources/user/audit-logs.ts index fc8e458874..8a1ad5c950 100644 --- a/src/resources/user/audit-logs.ts +++ b/src/resources/user/audit-logs.ts @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as AuditLogsAPI from 'cloudflare/resources/user/audit-logs'; -import * as Shared from 'cloudflare/resources/shared'; -import { AuditLogsV4PagePaginationArray } from 'cloudflare/resources/shared'; -import { type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import * as AuditLogsAPI from './audit-logs'; +import * as Shared from '../shared'; +import { AuditLogsV4PagePaginationArray } from '../shared'; +import { type V4PagePaginationArrayParams } from '../../pagination'; export class AuditLogs extends APIResource { /** diff --git a/src/resources/user/billing/billing.ts b/src/resources/user/billing/billing.ts index 691c4099a8..ba0a998297 100644 --- a/src/resources/user/billing/billing.ts +++ b/src/resources/user/billing/billing.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as HistoryAPI from 'cloudflare/resources/user/billing/history'; -import * as ProfileAPI from 'cloudflare/resources/user/billing/profile'; +import { APIResource } from '../../../resource'; +import * as HistoryAPI from './history'; +import * as ProfileAPI from './profile'; export class Billing extends APIResource { history: HistoryAPI.History = new HistoryAPI.History(this._client); diff --git a/src/resources/user/billing/history.ts b/src/resources/user/billing/history.ts index 976a4ad2e1..619d0fa14f 100644 --- a/src/resources/user/billing/history.ts +++ b/src/resources/user/billing/history.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as HistoryAPI from 'cloudflare/resources/user/billing/history'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as HistoryAPI from './history'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; export class History extends APIResource { /** diff --git a/src/resources/user/billing/profile.ts b/src/resources/user/billing/profile.ts index 0da1b6efc2..6f3c9b405a 100644 --- a/src/resources/user/billing/profile.ts +++ b/src/resources/user/billing/profile.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ProfileAPI from 'cloudflare/resources/user/billing/profile'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ProfileAPI from './profile'; export class Profile extends APIResource { /** diff --git a/src/resources/user/invites.ts b/src/resources/user/invites.ts index 375808d71e..9d9309f7d0 100644 --- a/src/resources/user/invites.ts +++ b/src/resources/user/invites.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as InvitesAPI from 'cloudflare/resources/user/invites'; -import * as Shared from 'cloudflare/resources/shared'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as InvitesAPI from './invites'; +import * as Shared from '../shared'; +import { SinglePage } from '../../pagination'; export class Invites extends APIResource { /** diff --git a/src/resources/user/organizations.ts b/src/resources/user/organizations.ts index 57c128fea6..37a77ab176 100644 --- a/src/resources/user/organizations.ts +++ b/src/resources/user/organizations.ts @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as OrganizationsAPI from 'cloudflare/resources/user/organizations'; -import * as Shared from 'cloudflare/resources/shared'; -import * as MembersAPI from 'cloudflare/resources/accounts/members'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import * as OrganizationsAPI from './organizations'; +import * as Shared from '../shared'; +import * as MembersAPI from '../accounts/members'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class Organizations extends APIResource { /** diff --git a/src/resources/user/subscriptions.ts b/src/resources/user/subscriptions.ts index 8783b47efe..a153a8b0d0 100644 --- a/src/resources/user/subscriptions.ts +++ b/src/resources/user/subscriptions.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SubscriptionsAPI from 'cloudflare/resources/user/subscriptions'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as SubscriptionsAPI from './subscriptions'; +import { SinglePage } from '../../pagination'; export class Subscriptions extends APIResource { /** diff --git a/src/resources/user/tokens/permission-groups.ts b/src/resources/user/tokens/permission-groups.ts index d71df2cc9b..3b5c91519f 100644 --- a/src/resources/user/tokens/permission-groups.ts +++ b/src/resources/user/tokens/permission-groups.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PermissionGroupsAPI from 'cloudflare/resources/user/tokens/permission-groups'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as PermissionGroupsAPI from './permission-groups'; +import { SinglePage } from '../../../pagination'; export class PermissionGroups extends APIResource { /** diff --git a/src/resources/user/tokens/tokens.ts b/src/resources/user/tokens/tokens.ts index 4e5f5ce2a8..40c3aaeef3 100644 --- a/src/resources/user/tokens/tokens.ts +++ b/src/resources/user/tokens/tokens.ts @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as TokensAPI from 'cloudflare/resources/user/tokens/tokens'; -import * as PermissionGroupsAPI from 'cloudflare/resources/user/tokens/permission-groups'; -import * as ValueAPI from 'cloudflare/resources/user/tokens/value'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as TokensAPI from './tokens'; +import * as PermissionGroupsAPI from './permission-groups'; +import * as ValueAPI from './value'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; export class Tokens extends APIResource { permissionGroups: PermissionGroupsAPI.PermissionGroups = new PermissionGroupsAPI.PermissionGroups( diff --git a/src/resources/user/tokens/value.ts b/src/resources/user/tokens/value.ts index 23e5f0a4cf..974803612b 100644 --- a/src/resources/user/tokens/value.ts +++ b/src/resources/user/tokens/value.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ValueAPI from 'cloudflare/resources/user/tokens/value'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ValueAPI from './value'; export class ValueResource extends APIResource { /** diff --git a/src/resources/user/user.ts b/src/resources/user/user.ts index 57ef43263e..f3c4872fda 100644 --- a/src/resources/user/user.ts +++ b/src/resources/user/user.ts @@ -1,13 +1,13 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AuditLogsAPI from 'cloudflare/resources/user/audit-logs'; -import * as InvitesAPI from 'cloudflare/resources/user/invites'; -import * as OrganizationsAPI from 'cloudflare/resources/user/organizations'; -import * as SubscriptionsAPI from 'cloudflare/resources/user/subscriptions'; -import * as BillingAPI from 'cloudflare/resources/user/billing/billing'; -import * as TokensAPI from 'cloudflare/resources/user/tokens/tokens'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as AuditLogsAPI from './audit-logs'; +import * as InvitesAPI from './invites'; +import * as OrganizationsAPI from './organizations'; +import * as SubscriptionsAPI from './subscriptions'; +import * as BillingAPI from './billing/billing'; +import * as TokensAPI from './tokens/tokens'; export class User extends APIResource { auditLogs: AuditLogsAPI.AuditLogs = new AuditLogsAPI.AuditLogs(this._client); diff --git a/src/resources/vectorize/indexes.ts b/src/resources/vectorize/indexes.ts index ebc4c49faa..8a18ba2b10 100644 --- a/src/resources/vectorize/indexes.ts +++ b/src/resources/vectorize/indexes.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as IndexesAPI from 'cloudflare/resources/vectorize/indexes'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as IndexesAPI from './indexes'; +import { SinglePage } from '../../pagination'; export class Indexes extends APIResource { /** diff --git a/src/resources/vectorize/vectorize.ts b/src/resources/vectorize/vectorize.ts index c32fc561d0..1f350e0ccb 100644 --- a/src/resources/vectorize/vectorize.ts +++ b/src/resources/vectorize/vectorize.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as IndexesAPI from 'cloudflare/resources/vectorize/indexes'; +import { APIResource } from '../../resource'; +import * as IndexesAPI from './indexes'; export class Vectorize extends APIResource { indexes: IndexesAPI.Indexes = new IndexesAPI.Indexes(this._client); diff --git a/src/resources/waiting-rooms/events/details.ts b/src/resources/waiting-rooms/events/details.ts index 746c1cbcc2..452db8b288 100644 --- a/src/resources/waiting-rooms/events/details.ts +++ b/src/resources/waiting-rooms/events/details.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DetailsAPI from 'cloudflare/resources/waiting-rooms/events/details'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as DetailsAPI from './details'; export class Details extends APIResource { /** diff --git a/src/resources/waiting-rooms/events/events.ts b/src/resources/waiting-rooms/events/events.ts index 1479464714..0acb1e0a85 100644 --- a/src/resources/waiting-rooms/events/events.ts +++ b/src/resources/waiting-rooms/events/events.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as EventsAPI from 'cloudflare/resources/waiting-rooms/events/events'; -import * as DetailsAPI from 'cloudflare/resources/waiting-rooms/events/details'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as EventsAPI from './events'; +import * as DetailsAPI from './details'; +import { SinglePage } from '../../../pagination'; export class Events extends APIResource { details: DetailsAPI.Details = new DetailsAPI.Details(this._client); diff --git a/src/resources/waiting-rooms/page.ts b/src/resources/waiting-rooms/page.ts index 70ca795a39..48889a337b 100644 --- a/src/resources/waiting-rooms/page.ts +++ b/src/resources/waiting-rooms/page.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PageAPI from 'cloudflare/resources/waiting-rooms/page'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as PageAPI from './page'; export class Page extends APIResource { /** diff --git a/src/resources/waiting-rooms/rules.ts b/src/resources/waiting-rooms/rules.ts index fa0f46a396..5895c5736b 100644 --- a/src/resources/waiting-rooms/rules.ts +++ b/src/resources/waiting-rooms/rules.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as RulesAPI from 'cloudflare/resources/waiting-rooms/rules'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as RulesAPI from './rules'; +import { SinglePage } from '../../pagination'; export class Rules extends APIResource { /** diff --git a/src/resources/waiting-rooms/settings.ts b/src/resources/waiting-rooms/settings.ts index 72f069839c..7657650050 100644 --- a/src/resources/waiting-rooms/settings.ts +++ b/src/resources/waiting-rooms/settings.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SettingsAPI from 'cloudflare/resources/waiting-rooms/settings'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as SettingsAPI from './settings'; export class Settings extends APIResource { /** diff --git a/src/resources/waiting-rooms/statuses.ts b/src/resources/waiting-rooms/statuses.ts index b021b4bab8..adb03b7818 100644 --- a/src/resources/waiting-rooms/statuses.ts +++ b/src/resources/waiting-rooms/statuses.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as StatusesAPI from 'cloudflare/resources/waiting-rooms/statuses'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as StatusesAPI from './statuses'; export class Statuses extends APIResource { /** diff --git a/src/resources/waiting-rooms/waiting-rooms.ts b/src/resources/waiting-rooms/waiting-rooms.ts index 0c47af6bbe..087e2ef9dc 100644 --- a/src/resources/waiting-rooms/waiting-rooms.ts +++ b/src/resources/waiting-rooms/waiting-rooms.ts @@ -1,13 +1,13 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PageAPI from 'cloudflare/resources/waiting-rooms/page'; -import * as RulesAPI from 'cloudflare/resources/waiting-rooms/rules'; -import * as SettingsAPI from 'cloudflare/resources/waiting-rooms/settings'; -import * as StatusesAPI from 'cloudflare/resources/waiting-rooms/statuses'; -import * as EventsAPI from 'cloudflare/resources/waiting-rooms/events/events'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as PageAPI from './page'; +import * as RulesAPI from './rules'; +import * as SettingsAPI from './settings'; +import * as StatusesAPI from './statuses'; +import * as EventsAPI from './events/events'; +import { SinglePage } from '../../pagination'; export class WaitingRooms extends APIResource { page: PageAPI.Page = new PageAPI.Page(this._client); diff --git a/src/resources/warp-connector.ts b/src/resources/warp-connector.ts index 0e59367db6..371a307516 100644 --- a/src/resources/warp-connector.ts +++ b/src/resources/warp-connector.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as Shared from 'cloudflare/resources/shared'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../core'; +import { APIResource } from '../resource'; +import * as Shared from './shared'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../pagination'; export class WARPConnector extends APIResource { /** diff --git a/src/resources/web3/hostnames/hostnames.ts b/src/resources/web3/hostnames/hostnames.ts index 7d9b039d3f..5ca51a9bb6 100644 --- a/src/resources/web3/hostnames/hostnames.ts +++ b/src/resources/web3/hostnames/hostnames.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as HostnamesAPI from 'cloudflare/resources/web3/hostnames/hostnames'; -import * as IPFSUniversalPathsAPI from 'cloudflare/resources/web3/hostnames/ipfs-universal-paths/ipfs-universal-paths'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as HostnamesAPI from './hostnames'; +import * as IPFSUniversalPathsAPI from './ipfs-universal-paths/ipfs-universal-paths'; +import { SinglePage } from '../../../pagination'; export class Hostnames extends APIResource { ipfsUniversalPaths: IPFSUniversalPathsAPI.IPFSUniversalPaths = new IPFSUniversalPathsAPI.IPFSUniversalPaths( diff --git a/src/resources/web3/hostnames/ipfs-universal-paths/content-lists/content-lists.ts b/src/resources/web3/hostnames/ipfs-universal-paths/content-lists/content-lists.ts index 0c2dfc0280..374bf0703b 100644 --- a/src/resources/web3/hostnames/ipfs-universal-paths/content-lists/content-lists.ts +++ b/src/resources/web3/hostnames/ipfs-universal-paths/content-lists/content-lists.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ContentListsAPI from 'cloudflare/resources/web3/hostnames/ipfs-universal-paths/content-lists/content-lists'; -import * as EntriesAPI from 'cloudflare/resources/web3/hostnames/ipfs-universal-paths/content-lists/entries'; +import * as Core from '../../../../../core'; +import { APIResource } from '../../../../../resource'; +import * as ContentListsAPI from './content-lists'; +import * as EntriesAPI from './entries'; export class ContentLists extends APIResource { entries: EntriesAPI.Entries = new EntriesAPI.Entries(this._client); diff --git a/src/resources/web3/hostnames/ipfs-universal-paths/content-lists/entries.ts b/src/resources/web3/hostnames/ipfs-universal-paths/content-lists/entries.ts index fb019394b5..c286cf6f85 100644 --- a/src/resources/web3/hostnames/ipfs-universal-paths/content-lists/entries.ts +++ b/src/resources/web3/hostnames/ipfs-universal-paths/content-lists/entries.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as EntriesAPI from 'cloudflare/resources/web3/hostnames/ipfs-universal-paths/content-lists/entries'; +import * as Core from '../../../../../core'; +import { APIResource } from '../../../../../resource'; +import * as EntriesAPI from './entries'; export class Entries extends APIResource { /** diff --git a/src/resources/web3/hostnames/ipfs-universal-paths/ipfs-universal-paths.ts b/src/resources/web3/hostnames/ipfs-universal-paths/ipfs-universal-paths.ts index daf60ce68f..152de4e7d2 100644 --- a/src/resources/web3/hostnames/ipfs-universal-paths/ipfs-universal-paths.ts +++ b/src/resources/web3/hostnames/ipfs-universal-paths/ipfs-universal-paths.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as ContentListsAPI from 'cloudflare/resources/web3/hostnames/ipfs-universal-paths/content-lists/content-lists'; +import { APIResource } from '../../../../resource'; +import * as ContentListsAPI from './content-lists/content-lists'; export class IPFSUniversalPaths extends APIResource { contentLists: ContentListsAPI.ContentLists = new ContentListsAPI.ContentLists(this._client); diff --git a/src/resources/web3/web3.ts b/src/resources/web3/web3.ts index f41240f2b9..01b5766d42 100644 --- a/src/resources/web3/web3.ts +++ b/src/resources/web3/web3.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as HostnamesAPI from 'cloudflare/resources/web3/hostnames/hostnames'; +import { APIResource } from '../../resource'; +import * as HostnamesAPI from './hostnames/hostnames'; export class Web3 extends APIResource { hostnames: HostnamesAPI.Hostnames = new HostnamesAPI.Hostnames(this._client); diff --git a/src/resources/workers-for-platforms/dispatch/dispatch.ts b/src/resources/workers-for-platforms/dispatch/dispatch.ts index 56aac9af99..019a8b6412 100644 --- a/src/resources/workers-for-platforms/dispatch/dispatch.ts +++ b/src/resources/workers-for-platforms/dispatch/dispatch.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as NamespacesAPI from 'cloudflare/resources/workers-for-platforms/dispatch/namespaces/namespaces'; +import { APIResource } from '../../../resource'; +import * as NamespacesAPI from './namespaces/namespaces'; export class Dispatch extends APIResource { namespaces: NamespacesAPI.Namespaces = new NamespacesAPI.Namespaces(this._client); diff --git a/src/resources/workers-for-platforms/dispatch/namespaces/namespaces.ts b/src/resources/workers-for-platforms/dispatch/namespaces/namespaces.ts index 983e233561..0aaf452125 100644 --- a/src/resources/workers-for-platforms/dispatch/namespaces/namespaces.ts +++ b/src/resources/workers-for-platforms/dispatch/namespaces/namespaces.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as NamespacesAPI from 'cloudflare/resources/workers-for-platforms/dispatch/namespaces/namespaces'; -import * as ScriptsAPI from 'cloudflare/resources/workers-for-platforms/dispatch/namespaces/scripts/scripts'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as NamespacesAPI from './namespaces'; +import * as ScriptsAPI from './scripts/scripts'; +import { SinglePage } from '../../../../pagination'; export class Namespaces extends APIResource { scripts: ScriptsAPI.Scripts = new ScriptsAPI.Scripts(this._client); diff --git a/src/resources/workers-for-platforms/dispatch/namespaces/scripts/bindings.ts b/src/resources/workers-for-platforms/dispatch/namespaces/scripts/bindings.ts index 9ca685de33..8e2dbc86fe 100644 --- a/src/resources/workers-for-platforms/dispatch/namespaces/scripts/bindings.ts +++ b/src/resources/workers-for-platforms/dispatch/namespaces/scripts/bindings.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as BindingsAPI from 'cloudflare/resources/workers-for-platforms/dispatch/namespaces/scripts/bindings'; -import * as WorkersAPI from 'cloudflare/resources/workers/workers'; +import * as Core from '../../../../../core'; +import { APIResource } from '../../../../../resource'; +import * as BindingsAPI from './bindings'; +import * as WorkersAPI from '../../../../workers/workers'; export class Bindings extends APIResource { /** diff --git a/src/resources/workers-for-platforms/dispatch/namespaces/scripts/content.ts b/src/resources/workers-for-platforms/dispatch/namespaces/scripts/content.ts index 836719f70f..5ba04d7e15 100644 --- a/src/resources/workers-for-platforms/dispatch/namespaces/scripts/content.ts +++ b/src/resources/workers-for-platforms/dispatch/namespaces/scripts/content.ts @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { type Response } from 'cloudflare/_shims/index'; -import * as ContentAPI from 'cloudflare/resources/workers-for-platforms/dispatch/namespaces/scripts/content'; -import * as WorkersAPI from 'cloudflare/resources/workers/workers'; -import * as ScriptsAPI from 'cloudflare/resources/workers/scripts/scripts'; -import { type Uploadable, multipartFormRequestOptions } from 'cloudflare/core'; +import * as Core from '../../../../../core'; +import { APIResource } from '../../../../../resource'; +import { type Response } from '../../../../../_shims/index'; +import * as ContentAPI from './content'; +import * as WorkersAPI from '../../../../workers/workers'; +import * as ScriptsAPI from '../../../../workers/scripts/scripts'; +import { type Uploadable, multipartFormRequestOptions } from '../../../../../core'; export class Content extends APIResource { /** diff --git a/src/resources/workers-for-platforms/dispatch/namespaces/scripts/scripts.ts b/src/resources/workers-for-platforms/dispatch/namespaces/scripts/scripts.ts index c2ccf0351f..ce5a325abf 100644 --- a/src/resources/workers-for-platforms/dispatch/namespaces/scripts/scripts.ts +++ b/src/resources/workers-for-platforms/dispatch/namespaces/scripts/scripts.ts @@ -1,17 +1,17 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ScriptsScriptsAPI from 'cloudflare/resources/workers-for-platforms/dispatch/namespaces/scripts/scripts'; -import * as WorkersAPI from 'cloudflare/resources/workers/workers'; -import * as ScriptsAPI from 'cloudflare/resources/workers/scripts/scripts'; -import * as TailAPI from 'cloudflare/resources/workers/scripts/tail'; -import * as BindingsAPI from 'cloudflare/resources/workers-for-platforms/dispatch/namespaces/scripts/bindings'; -import * as ContentAPI from 'cloudflare/resources/workers-for-platforms/dispatch/namespaces/scripts/content'; -import * as SecretsAPI from 'cloudflare/resources/workers-for-platforms/dispatch/namespaces/scripts/secrets'; -import * as SettingsAPI from 'cloudflare/resources/workers-for-platforms/dispatch/namespaces/scripts/settings'; -import * as TagsAPI from 'cloudflare/resources/workers-for-platforms/dispatch/namespaces/scripts/tags'; -import { type Uploadable, maybeMultipartFormRequestOptions } from 'cloudflare/core'; +import * as Core from '../../../../../core'; +import { APIResource } from '../../../../../resource'; +import * as ScriptsScriptsAPI from './scripts'; +import * as WorkersAPI from '../../../../workers/workers'; +import * as ScriptsAPI from '../../../../workers/scripts/scripts'; +import * as TailAPI from '../../../../workers/scripts/tail'; +import * as BindingsAPI from './bindings'; +import * as ContentAPI from './content'; +import * as SecretsAPI from './secrets'; +import * as SettingsAPI from './settings'; +import * as TagsAPI from './tags'; +import { type Uploadable, maybeMultipartFormRequestOptions } from '../../../../../core'; export class Scripts extends APIResource { content: ContentAPI.Content = new ContentAPI.Content(this._client); diff --git a/src/resources/workers-for-platforms/dispatch/namespaces/scripts/secrets.ts b/src/resources/workers-for-platforms/dispatch/namespaces/scripts/secrets.ts index 293c8ef4b1..62165d22fc 100644 --- a/src/resources/workers-for-platforms/dispatch/namespaces/scripts/secrets.ts +++ b/src/resources/workers-for-platforms/dispatch/namespaces/scripts/secrets.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SecretsAPI from 'cloudflare/resources/workers-for-platforms/dispatch/namespaces/scripts/secrets'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../../core'; +import { APIResource } from '../../../../../resource'; +import * as SecretsAPI from './secrets'; +import { SinglePage } from '../../../../../pagination'; export class Secrets extends APIResource { /** diff --git a/src/resources/workers-for-platforms/dispatch/namespaces/scripts/settings.ts b/src/resources/workers-for-platforms/dispatch/namespaces/scripts/settings.ts index 5ec66b2096..8aed8bf68d 100644 --- a/src/resources/workers-for-platforms/dispatch/namespaces/scripts/settings.ts +++ b/src/resources/workers-for-platforms/dispatch/namespaces/scripts/settings.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SettingsAPI from 'cloudflare/resources/workers-for-platforms/dispatch/namespaces/scripts/settings'; -import * as WorkersAPI from 'cloudflare/resources/workers/workers'; -import * as TailAPI from 'cloudflare/resources/workers/scripts/tail'; -import { multipartFormRequestOptions } from 'cloudflare/core'; +import * as Core from '../../../../../core'; +import { APIResource } from '../../../../../resource'; +import * as SettingsAPI from './settings'; +import * as WorkersAPI from '../../../../workers/workers'; +import * as TailAPI from '../../../../workers/scripts/tail'; +import { multipartFormRequestOptions } from '../../../../../core'; export class Settings extends APIResource { /** diff --git a/src/resources/workers-for-platforms/dispatch/namespaces/scripts/tags.ts b/src/resources/workers-for-platforms/dispatch/namespaces/scripts/tags.ts index 00f706c5a0..09f70512ae 100644 --- a/src/resources/workers-for-platforms/dispatch/namespaces/scripts/tags.ts +++ b/src/resources/workers-for-platforms/dispatch/namespaces/scripts/tags.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as TagsAPI from 'cloudflare/resources/workers-for-platforms/dispatch/namespaces/scripts/tags'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../../core'; +import { APIResource } from '../../../../../resource'; +import * as TagsAPI from './tags'; +import { SinglePage } from '../../../../../pagination'; export class Tags extends APIResource { /** diff --git a/src/resources/workers-for-platforms/workers-for-platforms.ts b/src/resources/workers-for-platforms/workers-for-platforms.ts index 4d6d45bf6d..3fa3f301b7 100644 --- a/src/resources/workers-for-platforms/workers-for-platforms.ts +++ b/src/resources/workers-for-platforms/workers-for-platforms.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as DispatchAPI from 'cloudflare/resources/workers-for-platforms/dispatch/dispatch'; +import { APIResource } from '../../resource'; +import * as DispatchAPI from './dispatch/dispatch'; export class WorkersForPlatforms extends APIResource { dispatch: DispatchAPI.Dispatch = new DispatchAPI.Dispatch(this._client); diff --git a/src/resources/workers/account-settings.ts b/src/resources/workers/account-settings.ts index 31e954a06a..361fd57e9e 100644 --- a/src/resources/workers/account-settings.ts +++ b/src/resources/workers/account-settings.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AccountSettingsAPI from 'cloudflare/resources/workers/account-settings'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as AccountSettingsAPI from './account-settings'; export class AccountSettings extends APIResource { /** diff --git a/src/resources/workers/ai.ts b/src/resources/workers/ai.ts index a38aad5e90..ba8750d87c 100644 --- a/src/resources/workers/ai.ts +++ b/src/resources/workers/ai.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AIAPI from 'cloudflare/resources/workers/ai'; -import { type Uploadable } from 'cloudflare/core'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as AIAPI from './ai'; +import { type Uploadable } from '../../core'; export class AI extends APIResource { /** diff --git a/src/resources/workers/domains.ts b/src/resources/workers/domains.ts index 6d65aac68b..6b98b62e5c 100644 --- a/src/resources/workers/domains.ts +++ b/src/resources/workers/domains.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DomainsAPI from 'cloudflare/resources/workers/domains'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as DomainsAPI from './domains'; +import { SinglePage } from '../../pagination'; export class Domains extends APIResource { /** diff --git a/src/resources/workers/scripts/content.ts b/src/resources/workers/scripts/content.ts index 8c34259dfc..d13a80c486 100644 --- a/src/resources/workers/scripts/content.ts +++ b/src/resources/workers/scripts/content.ts @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { type Response } from 'cloudflare/_shims/index'; -import * as ContentAPI from 'cloudflare/resources/workers/scripts/content'; -import * as WorkersAPI from 'cloudflare/resources/workers/workers'; -import * as ScriptsAPI from 'cloudflare/resources/workers/scripts/scripts'; -import { type Uploadable, multipartFormRequestOptions } from 'cloudflare/core'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { type Response } from '../../../_shims/index'; +import * as ContentAPI from './content'; +import * as WorkersAPI from '../workers'; +import * as ScriptsAPI from './scripts'; +import { type Uploadable, multipartFormRequestOptions } from '../../../core'; export class Content extends APIResource { /** diff --git a/src/resources/workers/scripts/deployments.ts b/src/resources/workers/scripts/deployments.ts index 68b807f146..47d8ffef87 100644 --- a/src/resources/workers/scripts/deployments.ts +++ b/src/resources/workers/scripts/deployments.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DeploymentsAPI from 'cloudflare/resources/workers/scripts/deployments'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as DeploymentsAPI from './deployments'; export class Deployments extends APIResource { /** diff --git a/src/resources/workers/scripts/schedules.ts b/src/resources/workers/scripts/schedules.ts index b40e6fc1de..1d1f4e92df 100644 --- a/src/resources/workers/scripts/schedules.ts +++ b/src/resources/workers/scripts/schedules.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SchedulesAPI from 'cloudflare/resources/workers/scripts/schedules'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as SchedulesAPI from './schedules'; export class Schedules extends APIResource { /** diff --git a/src/resources/workers/scripts/scripts.ts b/src/resources/workers/scripts/scripts.ts index 2fa9971d2a..90558b0639 100644 --- a/src/resources/workers/scripts/scripts.ts +++ b/src/resources/workers/scripts/scripts.ts @@ -1,18 +1,18 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { type Response } from 'cloudflare/_shims/index'; -import * as ScriptsAPI from 'cloudflare/resources/workers/scripts/scripts'; -import * as WorkersAPI from 'cloudflare/resources/workers/workers'; -import * as ContentAPI from 'cloudflare/resources/workers/scripts/content'; -import * as DeploymentsAPI from 'cloudflare/resources/workers/scripts/deployments'; -import * as SchedulesAPI from 'cloudflare/resources/workers/scripts/schedules'; -import * as SettingsAPI from 'cloudflare/resources/workers/scripts/settings'; -import * as TailAPI from 'cloudflare/resources/workers/scripts/tail'; -import * as VersionsAPI from 'cloudflare/resources/workers/scripts/versions'; -import { type Uploadable, maybeMultipartFormRequestOptions } from 'cloudflare/core'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { type Response } from '../../../_shims/index'; +import * as ScriptsAPI from './scripts'; +import * as WorkersAPI from '../workers'; +import * as ContentAPI from './content'; +import * as DeploymentsAPI from './deployments'; +import * as SchedulesAPI from './schedules'; +import * as SettingsAPI from './settings'; +import * as TailAPI from './tail'; +import * as VersionsAPI from './versions'; +import { type Uploadable, maybeMultipartFormRequestOptions } from '../../../core'; +import { SinglePage } from '../../../pagination'; export class Scripts extends APIResource { schedules: SchedulesAPI.Schedules = new SchedulesAPI.Schedules(this._client); diff --git a/src/resources/workers/scripts/settings.ts b/src/resources/workers/scripts/settings.ts index 1078ecc57c..706df4b6ea 100644 --- a/src/resources/workers/scripts/settings.ts +++ b/src/resources/workers/scripts/settings.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SettingsAPI from 'cloudflare/resources/workers/scripts/settings'; -import * as ScriptsAPI from 'cloudflare/resources/workers/scripts/scripts'; -import * as TailAPI from 'cloudflare/resources/workers/scripts/tail'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as SettingsAPI from './settings'; +import * as ScriptsAPI from './scripts'; +import * as TailAPI from './tail'; export class Settings extends APIResource { /** diff --git a/src/resources/workers/scripts/tail.ts b/src/resources/workers/scripts/tail.ts index 945df2c462..3cca32c531 100644 --- a/src/resources/workers/scripts/tail.ts +++ b/src/resources/workers/scripts/tail.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as TailAPI from 'cloudflare/resources/workers/scripts/tail'; -import * as Shared from 'cloudflare/resources/shared'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as TailAPI from './tail'; +import * as Shared from '../../shared'; export class Tail extends APIResource { /** diff --git a/src/resources/workers/scripts/versions.ts b/src/resources/workers/scripts/versions.ts index de5171a745..f8e55463b5 100644 --- a/src/resources/workers/scripts/versions.ts +++ b/src/resources/workers/scripts/versions.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as VersionsAPI from 'cloudflare/resources/workers/scripts/versions'; -import { type Uploadable, multipartFormRequestOptions } from 'cloudflare/core'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as VersionsAPI from './versions'; +import { type Uploadable, multipartFormRequestOptions } from '../../../core'; export class Versions extends APIResource { /** diff --git a/src/resources/workers/subdomains.ts b/src/resources/workers/subdomains.ts index 518cd6521a..bf114b6fd5 100644 --- a/src/resources/workers/subdomains.ts +++ b/src/resources/workers/subdomains.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SubdomainsAPI from 'cloudflare/resources/workers/subdomains'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as SubdomainsAPI from './subdomains'; export class Subdomains extends APIResource { /** diff --git a/src/resources/workers/workers.ts b/src/resources/workers/workers.ts index 74d03b91a1..ac62310d48 100644 --- a/src/resources/workers/workers.ts +++ b/src/resources/workers/workers.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as AccountSettingsAPI from 'cloudflare/resources/workers/account-settings'; -import * as AIAPI from 'cloudflare/resources/workers/ai'; -import * as DomainsAPI from 'cloudflare/resources/workers/domains'; -import * as SubdomainsAPI from 'cloudflare/resources/workers/subdomains'; -import * as ScriptsAPI from 'cloudflare/resources/workers/scripts/scripts'; +import { APIResource } from '../../resource'; +import * as AccountSettingsAPI from './account-settings'; +import * as AIAPI from './ai'; +import * as DomainsAPI from './domains'; +import * as SubdomainsAPI from './subdomains'; +import * as ScriptsAPI from './scripts/scripts'; export class Workers extends APIResource { ai: AIAPI.AI = new AIAPI.AI(this._client); diff --git a/src/resources/zero-trust/access/access.ts b/src/resources/zero-trust/access/access.ts index 3a467d5cca..21b968ae43 100644 --- a/src/resources/zero-trust/access/access.ts +++ b/src/resources/zero-trust/access/access.ts @@ -1,17 +1,17 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as AccessAPI from 'cloudflare/resources/zero-trust/access/access'; -import * as BookmarksAPI from 'cloudflare/resources/zero-trust/access/bookmarks'; -import * as CustomPagesAPI from 'cloudflare/resources/zero-trust/access/custom-pages'; -import * as GroupsAPI from 'cloudflare/resources/zero-trust/access/groups'; -import * as KeysAPI from 'cloudflare/resources/zero-trust/access/keys'; -import * as ServiceTokensAPI from 'cloudflare/resources/zero-trust/access/service-tokens'; -import * as TagsAPI from 'cloudflare/resources/zero-trust/access/tags'; -import * as ApplicationsAPI from 'cloudflare/resources/zero-trust/access/applications/applications'; -import * as CertificatesAPI from 'cloudflare/resources/zero-trust/access/certificates/certificates'; -import * as LogsAPI from 'cloudflare/resources/zero-trust/access/logs/logs'; -import * as UsersAPI from 'cloudflare/resources/zero-trust/access/users/users'; +import { APIResource } from '../../../resource'; +import * as AccessAPI from './access'; +import * as BookmarksAPI from './bookmarks'; +import * as CustomPagesAPI from './custom-pages'; +import * as GroupsAPI from './groups'; +import * as KeysAPI from './keys'; +import * as ServiceTokensAPI from './service-tokens'; +import * as TagsAPI from './tags'; +import * as ApplicationsAPI from './applications/applications'; +import * as CertificatesAPI from './certificates/certificates'; +import * as LogsAPI from './logs/logs'; +import * as UsersAPI from './users/users'; export class Access extends APIResource { applications: ApplicationsAPI.Applications = new ApplicationsAPI.Applications(this._client); diff --git a/src/resources/zero-trust/access/applications/applications.ts b/src/resources/zero-trust/access/applications/applications.ts index 6f5b531ca4..56183ebce2 100644 --- a/src/resources/zero-trust/access/applications/applications.ts +++ b/src/resources/zero-trust/access/applications/applications.ts @@ -1,15 +1,15 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { CloudflareError } from 'cloudflare/error'; -import * as ApplicationsAPI from 'cloudflare/resources/zero-trust/access/applications/applications'; -import * as AccessAPI from 'cloudflare/resources/zero-trust/access/access'; -import * as CAsAPI from 'cloudflare/resources/zero-trust/access/applications/cas'; -import * as PoliciesAPI from 'cloudflare/resources/zero-trust/access/applications/policies'; -import * as UserPolicyChecksAPI from 'cloudflare/resources/zero-trust/access/applications/user-policy-checks'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import { CloudflareError } from '../../../../error'; +import * as ApplicationsAPI from './applications'; +import * as AccessAPI from '../access'; +import * as CAsAPI from './cas'; +import * as PoliciesAPI from './policies'; +import * as UserPolicyChecksAPI from './user-policy-checks'; +import { SinglePage } from '../../../../pagination'; export class Applications extends APIResource { cas: CAsAPI.CAs = new CAsAPI.CAs(this._client); diff --git a/src/resources/zero-trust/access/applications/cas.ts b/src/resources/zero-trust/access/applications/cas.ts index 9d405e81c3..02aef3098d 100644 --- a/src/resources/zero-trust/access/applications/cas.ts +++ b/src/resources/zero-trust/access/applications/cas.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { CloudflareError } from 'cloudflare/error'; -import * as CAsAPI from 'cloudflare/resources/zero-trust/access/applications/cas'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import { CloudflareError } from '../../../../error'; +import * as CAsAPI from './cas'; +import { SinglePage } from '../../../../pagination'; export class CAs extends APIResource { /** diff --git a/src/resources/zero-trust/access/applications/policies.ts b/src/resources/zero-trust/access/applications/policies.ts index e29aa1ca3b..014e628827 100644 --- a/src/resources/zero-trust/access/applications/policies.ts +++ b/src/resources/zero-trust/access/applications/policies.ts @@ -1,13 +1,13 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { CloudflareError } from 'cloudflare/error'; -import * as PoliciesAPI from 'cloudflare/resources/zero-trust/access/applications/policies'; -import * as AccessAPI from 'cloudflare/resources/zero-trust/access/access'; -import * as ApplicationsAPI from 'cloudflare/resources/zero-trust/access/applications/applications'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import { CloudflareError } from '../../../../error'; +import * as PoliciesAPI from './policies'; +import * as AccessAPI from '../access'; +import * as ApplicationsAPI from './applications'; +import { SinglePage } from '../../../../pagination'; export class Policies extends APIResource { /** diff --git a/src/resources/zero-trust/access/applications/user-policy-checks.ts b/src/resources/zero-trust/access/applications/user-policy-checks.ts index e846d076ec..e8f957e679 100644 --- a/src/resources/zero-trust/access/applications/user-policy-checks.ts +++ b/src/resources/zero-trust/access/applications/user-policy-checks.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { CloudflareError } from 'cloudflare/error'; -import * as UserPolicyChecksAPI from 'cloudflare/resources/zero-trust/access/applications/user-policy-checks'; -import * as ApplicationsAPI from 'cloudflare/resources/zero-trust/access/applications/applications'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import { CloudflareError } from '../../../../error'; +import * as UserPolicyChecksAPI from './user-policy-checks'; +import * as ApplicationsAPI from './applications'; export class UserPolicyChecks extends APIResource { /** diff --git a/src/resources/zero-trust/access/bookmarks.ts b/src/resources/zero-trust/access/bookmarks.ts index b5c00d120f..a26571b47f 100644 --- a/src/resources/zero-trust/access/bookmarks.ts +++ b/src/resources/zero-trust/access/bookmarks.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as BookmarksAPI from 'cloudflare/resources/zero-trust/access/bookmarks'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as BookmarksAPI from './bookmarks'; +import { SinglePage } from '../../../pagination'; export class Bookmarks extends APIResource { /** diff --git a/src/resources/zero-trust/access/certificates/certificates.ts b/src/resources/zero-trust/access/certificates/certificates.ts index 1537887643..2a6c13cb42 100644 --- a/src/resources/zero-trust/access/certificates/certificates.ts +++ b/src/resources/zero-trust/access/certificates/certificates.ts @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { CloudflareError } from 'cloudflare/error'; -import * as CertificatesAPI from 'cloudflare/resources/zero-trust/access/certificates/certificates'; -import * as SettingsAPI from 'cloudflare/resources/zero-trust/access/certificates/settings'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import { CloudflareError } from '../../../../error'; +import * as CertificatesAPI from './certificates'; +import * as SettingsAPI from './settings'; +import { SinglePage } from '../../../../pagination'; export class Certificates extends APIResource { settings: SettingsAPI.Settings = new SettingsAPI.Settings(this._client); diff --git a/src/resources/zero-trust/access/certificates/settings.ts b/src/resources/zero-trust/access/certificates/settings.ts index dfe925194e..8adda4c2d4 100644 --- a/src/resources/zero-trust/access/certificates/settings.ts +++ b/src/resources/zero-trust/access/certificates/settings.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { CloudflareError } from 'cloudflare/error'; -import * as SettingsAPI from 'cloudflare/resources/zero-trust/access/certificates/settings'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import { CloudflareError } from '../../../../error'; +import * as SettingsAPI from './settings'; export class Settings extends APIResource { /** diff --git a/src/resources/zero-trust/access/custom-pages.ts b/src/resources/zero-trust/access/custom-pages.ts index 013bea3852..f599bbe114 100644 --- a/src/resources/zero-trust/access/custom-pages.ts +++ b/src/resources/zero-trust/access/custom-pages.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as CustomPagesAPI from 'cloudflare/resources/zero-trust/access/custom-pages'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as CustomPagesAPI from './custom-pages'; +import { SinglePage } from '../../../pagination'; export class CustomPages extends APIResource { /** diff --git a/src/resources/zero-trust/access/groups.ts b/src/resources/zero-trust/access/groups.ts index 95543de236..5d135d10a5 100644 --- a/src/resources/zero-trust/access/groups.ts +++ b/src/resources/zero-trust/access/groups.ts @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { CloudflareError } from 'cloudflare/error'; -import * as GroupsAPI from 'cloudflare/resources/zero-trust/access/groups'; -import * as AccessAPI from 'cloudflare/resources/zero-trust/access/access'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import { CloudflareError } from '../../../error'; +import * as GroupsAPI from './groups'; +import * as AccessAPI from './access'; +import { SinglePage } from '../../../pagination'; export class Groups extends APIResource { /** diff --git a/src/resources/zero-trust/access/keys.ts b/src/resources/zero-trust/access/keys.ts index fcba723a98..70c8151b19 100644 --- a/src/resources/zero-trust/access/keys.ts +++ b/src/resources/zero-trust/access/keys.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as KeysAPI from 'cloudflare/resources/zero-trust/access/keys'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as KeysAPI from './keys'; export class Keys extends APIResource { /** diff --git a/src/resources/zero-trust/access/logs/access-requests.ts b/src/resources/zero-trust/access/logs/access-requests.ts index d3930c39cf..b1fe770657 100644 --- a/src/resources/zero-trust/access/logs/access-requests.ts +++ b/src/resources/zero-trust/access/logs/access-requests.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AccessRequestsAPI from 'cloudflare/resources/zero-trust/access/logs/access-requests'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as AccessRequestsAPI from './access-requests'; export class AccessRequests extends APIResource { /** diff --git a/src/resources/zero-trust/access/logs/logs.ts b/src/resources/zero-trust/access/logs/logs.ts index 88f75b7249..7480ab283e 100644 --- a/src/resources/zero-trust/access/logs/logs.ts +++ b/src/resources/zero-trust/access/logs/logs.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as AccessRequestsAPI from 'cloudflare/resources/zero-trust/access/logs/access-requests'; +import { APIResource } from '../../../../resource'; +import * as AccessRequestsAPI from './access-requests'; export class Logs extends APIResource { accessRequests: AccessRequestsAPI.AccessRequests = new AccessRequestsAPI.AccessRequests(this._client); diff --git a/src/resources/zero-trust/access/service-tokens.ts b/src/resources/zero-trust/access/service-tokens.ts index c53051f5d2..cd0725835e 100644 --- a/src/resources/zero-trust/access/service-tokens.ts +++ b/src/resources/zero-trust/access/service-tokens.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { CloudflareError } from 'cloudflare/error'; -import * as ServiceTokensAPI from 'cloudflare/resources/zero-trust/access/service-tokens'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import { CloudflareError } from '../../../error'; +import * as ServiceTokensAPI from './service-tokens'; +import { SinglePage } from '../../../pagination'; export class ServiceTokens extends APIResource { /** diff --git a/src/resources/zero-trust/access/tags.ts b/src/resources/zero-trust/access/tags.ts index 6ab983e6de..9a47c958b2 100644 --- a/src/resources/zero-trust/access/tags.ts +++ b/src/resources/zero-trust/access/tags.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as TagsAPI from 'cloudflare/resources/zero-trust/access/tags'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as TagsAPI from './tags'; +import { SinglePage } from '../../../pagination'; export class Tags extends APIResource { /** diff --git a/src/resources/zero-trust/access/users/active-sessions.ts b/src/resources/zero-trust/access/users/active-sessions.ts index 1904df16d3..31178910e7 100644 --- a/src/resources/zero-trust/access/users/active-sessions.ts +++ b/src/resources/zero-trust/access/users/active-sessions.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ActiveSessionsAPI from 'cloudflare/resources/zero-trust/access/users/active-sessions'; -import * as UserPolicyChecksAPI from 'cloudflare/resources/zero-trust/access/applications/user-policy-checks'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as ActiveSessionsAPI from './active-sessions'; +import * as UserPolicyChecksAPI from '../applications/user-policy-checks'; +import { SinglePage } from '../../../../pagination'; export class ActiveSessions extends APIResource { /** diff --git a/src/resources/zero-trust/access/users/failed-logins.ts b/src/resources/zero-trust/access/users/failed-logins.ts index a4fd88b5b2..fcd3137144 100644 --- a/src/resources/zero-trust/access/users/failed-logins.ts +++ b/src/resources/zero-trust/access/users/failed-logins.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as FailedLoginsAPI from 'cloudflare/resources/zero-trust/access/users/failed-logins'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as FailedLoginsAPI from './failed-logins'; +import { SinglePage } from '../../../../pagination'; export class FailedLogins extends APIResource { /** diff --git a/src/resources/zero-trust/access/users/last-seen-identity.ts b/src/resources/zero-trust/access/users/last-seen-identity.ts index b986ea8208..7186509ed3 100644 --- a/src/resources/zero-trust/access/users/last-seen-identity.ts +++ b/src/resources/zero-trust/access/users/last-seen-identity.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as LastSeenIdentityAPI from 'cloudflare/resources/zero-trust/access/users/last-seen-identity'; -import * as UserPolicyChecksAPI from 'cloudflare/resources/zero-trust/access/applications/user-policy-checks'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as LastSeenIdentityAPI from './last-seen-identity'; +import * as UserPolicyChecksAPI from '../applications/user-policy-checks'; export class LastSeenIdentity extends APIResource { /** diff --git a/src/resources/zero-trust/access/users/users.ts b/src/resources/zero-trust/access/users/users.ts index 0d98ae3658..f9471e943d 100644 --- a/src/resources/zero-trust/access/users/users.ts +++ b/src/resources/zero-trust/access/users/users.ts @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as UsersAPI from 'cloudflare/resources/zero-trust/access/users/users'; -import * as ActiveSessionsAPI from 'cloudflare/resources/zero-trust/access/users/active-sessions'; -import * as FailedLoginsAPI from 'cloudflare/resources/zero-trust/access/users/failed-logins'; -import * as LastSeenIdentityAPI from 'cloudflare/resources/zero-trust/access/users/last-seen-identity'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as UsersAPI from './users'; +import * as ActiveSessionsAPI from './active-sessions'; +import * as FailedLoginsAPI from './failed-logins'; +import * as LastSeenIdentityAPI from './last-seen-identity'; +import { SinglePage } from '../../../../pagination'; export class Users extends APIResource { activeSessions: ActiveSessionsAPI.ActiveSessions = new ActiveSessionsAPI.ActiveSessions(this._client); diff --git a/src/resources/zero-trust/connectivity-settings.ts b/src/resources/zero-trust/connectivity-settings.ts index 2e2fce4e64..2f5aaf011a 100644 --- a/src/resources/zero-trust/connectivity-settings.ts +++ b/src/resources/zero-trust/connectivity-settings.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ConnectivitySettingsAPI from 'cloudflare/resources/zero-trust/connectivity-settings'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as ConnectivitySettingsAPI from './connectivity-settings'; export class ConnectivitySettings extends APIResource { /** diff --git a/src/resources/zero-trust/devices/devices.ts b/src/resources/zero-trust/devices/devices.ts index 11c7005a50..38f88cdcf5 100644 --- a/src/resources/zero-trust/devices/devices.ts +++ b/src/resources/zero-trust/devices/devices.ts @@ -1,17 +1,17 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DevicesAPI from 'cloudflare/resources/zero-trust/devices/devices'; -import * as DEXTestsAPI from 'cloudflare/resources/zero-trust/devices/dex-tests'; -import * as NetworksAPI from 'cloudflare/resources/zero-trust/devices/networks'; -import * as OverrideCodesAPI from 'cloudflare/resources/zero-trust/devices/override-codes'; -import * as RevokeAPI from 'cloudflare/resources/zero-trust/devices/revoke'; -import * as SettingsAPI from 'cloudflare/resources/zero-trust/devices/settings'; -import * as UnrevokeAPI from 'cloudflare/resources/zero-trust/devices/unrevoke'; -import * as PoliciesAPI from 'cloudflare/resources/zero-trust/devices/policies/policies'; -import * as PostureAPI from 'cloudflare/resources/zero-trust/devices/posture/posture'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as DevicesAPI from './devices'; +import * as DEXTestsAPI from './dex-tests'; +import * as NetworksAPI from './networks'; +import * as OverrideCodesAPI from './override-codes'; +import * as RevokeAPI from './revoke'; +import * as SettingsAPI from './settings'; +import * as UnrevokeAPI from './unrevoke'; +import * as PoliciesAPI from './policies/policies'; +import * as PostureAPI from './posture/posture'; +import { SinglePage } from '../../../pagination'; export class Devices extends APIResource { dexTests: DEXTestsAPI.DEXTests = new DEXTestsAPI.DEXTests(this._client); diff --git a/src/resources/zero-trust/devices/dex-tests.ts b/src/resources/zero-trust/devices/dex-tests.ts index 578ac03e09..46a2f9be4f 100644 --- a/src/resources/zero-trust/devices/dex-tests.ts +++ b/src/resources/zero-trust/devices/dex-tests.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DEXTestsAPI from 'cloudflare/resources/zero-trust/devices/dex-tests'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as DEXTestsAPI from './dex-tests'; +import { SinglePage } from '../../../pagination'; export class DEXTests extends APIResource { /** diff --git a/src/resources/zero-trust/devices/networks.ts b/src/resources/zero-trust/devices/networks.ts index f6809dd777..bc17d04730 100644 --- a/src/resources/zero-trust/devices/networks.ts +++ b/src/resources/zero-trust/devices/networks.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as NetworksAPI from 'cloudflare/resources/zero-trust/devices/networks'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as NetworksAPI from './networks'; +import { SinglePage } from '../../../pagination'; export class Networks extends APIResource { /** diff --git a/src/resources/zero-trust/devices/override-codes.ts b/src/resources/zero-trust/devices/override-codes.ts index e93e012570..e72c5a4a33 100644 --- a/src/resources/zero-trust/devices/override-codes.ts +++ b/src/resources/zero-trust/devices/override-codes.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as OverrideCodesAPI from 'cloudflare/resources/zero-trust/devices/override-codes'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as OverrideCodesAPI from './override-codes'; export class OverrideCodes extends APIResource { /** diff --git a/src/resources/zero-trust/devices/policies/default-policy.ts b/src/resources/zero-trust/devices/policies/default-policy.ts index b993c621ae..999fbebc7b 100644 --- a/src/resources/zero-trust/devices/policies/default-policy.ts +++ b/src/resources/zero-trust/devices/policies/default-policy.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DefaultPolicyAPI from 'cloudflare/resources/zero-trust/devices/policies/default-policy'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as DefaultPolicyAPI from './default-policy'; export class DefaultPolicy extends APIResource { /** diff --git a/src/resources/zero-trust/devices/policies/excludes.ts b/src/resources/zero-trust/devices/policies/excludes.ts index a274ae8c8d..a2d1202861 100644 --- a/src/resources/zero-trust/devices/policies/excludes.ts +++ b/src/resources/zero-trust/devices/policies/excludes.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ExcludesAPI from 'cloudflare/resources/zero-trust/devices/policies/excludes'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as ExcludesAPI from './excludes'; +import { SinglePage } from '../../../../pagination'; export class Excludes extends APIResource { /** diff --git a/src/resources/zero-trust/devices/policies/fallback-domains.ts b/src/resources/zero-trust/devices/policies/fallback-domains.ts index e80d8c82a3..1c2c7c6007 100644 --- a/src/resources/zero-trust/devices/policies/fallback-domains.ts +++ b/src/resources/zero-trust/devices/policies/fallback-domains.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as FallbackDomainsAPI from 'cloudflare/resources/zero-trust/devices/policies/fallback-domains'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as FallbackDomainsAPI from './fallback-domains'; +import { SinglePage } from '../../../../pagination'; export class FallbackDomains extends APIResource { /** diff --git a/src/resources/zero-trust/devices/policies/includes.ts b/src/resources/zero-trust/devices/policies/includes.ts index 10a151142e..a81671df9d 100644 --- a/src/resources/zero-trust/devices/policies/includes.ts +++ b/src/resources/zero-trust/devices/policies/includes.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as IncludesAPI from 'cloudflare/resources/zero-trust/devices/policies/includes'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as IncludesAPI from './includes'; +import { SinglePage } from '../../../../pagination'; export class Includes extends APIResource { /** diff --git a/src/resources/zero-trust/devices/policies/policies.ts b/src/resources/zero-trust/devices/policies/policies.ts index 68dda5a988..e6ce0dae83 100644 --- a/src/resources/zero-trust/devices/policies/policies.ts +++ b/src/resources/zero-trust/devices/policies/policies.ts @@ -1,13 +1,13 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PoliciesAPI from 'cloudflare/resources/zero-trust/devices/policies/policies'; -import * as DefaultPolicyAPI from 'cloudflare/resources/zero-trust/devices/policies/default-policy'; -import * as ExcludesAPI from 'cloudflare/resources/zero-trust/devices/policies/excludes'; -import * as FallbackDomainsAPI from 'cloudflare/resources/zero-trust/devices/policies/fallback-domains'; -import * as IncludesAPI from 'cloudflare/resources/zero-trust/devices/policies/includes'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as PoliciesAPI from './policies'; +import * as DefaultPolicyAPI from './default-policy'; +import * as ExcludesAPI from './excludes'; +import * as FallbackDomainsAPI from './fallback-domains'; +import * as IncludesAPI from './includes'; +import { SinglePage } from '../../../../pagination'; export class Policies extends APIResource { defaultPolicy: DefaultPolicyAPI.DefaultPolicy = new DefaultPolicyAPI.DefaultPolicy(this._client); diff --git a/src/resources/zero-trust/devices/posture/integrations.ts b/src/resources/zero-trust/devices/posture/integrations.ts index 45d5ca5cc0..643749a543 100644 --- a/src/resources/zero-trust/devices/posture/integrations.ts +++ b/src/resources/zero-trust/devices/posture/integrations.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as IntegrationsAPI from 'cloudflare/resources/zero-trust/devices/posture/integrations'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as IntegrationsAPI from './integrations'; +import { SinglePage } from '../../../../pagination'; export class Integrations extends APIResource { /** diff --git a/src/resources/zero-trust/devices/posture/posture.ts b/src/resources/zero-trust/devices/posture/posture.ts index d48e7e080f..9b04a1e30a 100644 --- a/src/resources/zero-trust/devices/posture/posture.ts +++ b/src/resources/zero-trust/devices/posture/posture.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PostureAPI from 'cloudflare/resources/zero-trust/devices/posture/posture'; -import * as IntegrationsAPI from 'cloudflare/resources/zero-trust/devices/posture/integrations'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as PostureAPI from './posture'; +import * as IntegrationsAPI from './integrations'; +import { SinglePage } from '../../../../pagination'; export class Posture extends APIResource { integrations: IntegrationsAPI.Integrations = new IntegrationsAPI.Integrations(this._client); diff --git a/src/resources/zero-trust/devices/revoke.ts b/src/resources/zero-trust/devices/revoke.ts index 32cf48ff58..280ca8bb3f 100644 --- a/src/resources/zero-trust/devices/revoke.ts +++ b/src/resources/zero-trust/devices/revoke.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as RevokeAPI from 'cloudflare/resources/zero-trust/devices/revoke'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as RevokeAPI from './revoke'; export class Revoke extends APIResource { /** diff --git a/src/resources/zero-trust/devices/settings.ts b/src/resources/zero-trust/devices/settings.ts index 22db63e60f..e0340547f5 100644 --- a/src/resources/zero-trust/devices/settings.ts +++ b/src/resources/zero-trust/devices/settings.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SettingsAPI from 'cloudflare/resources/zero-trust/devices/settings'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as SettingsAPI from './settings'; export class Settings extends APIResource { /** diff --git a/src/resources/zero-trust/devices/unrevoke.ts b/src/resources/zero-trust/devices/unrevoke.ts index a076da1bea..d639f1263b 100644 --- a/src/resources/zero-trust/devices/unrevoke.ts +++ b/src/resources/zero-trust/devices/unrevoke.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as UnrevokeAPI from 'cloudflare/resources/zero-trust/devices/unrevoke'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as UnrevokeAPI from './unrevoke'; export class Unrevoke extends APIResource { /** diff --git a/src/resources/zero-trust/dex/colos.ts b/src/resources/zero-trust/dex/colos.ts index 7ab0cfdbee..6b3118b3c4 100644 --- a/src/resources/zero-trust/dex/colos.ts +++ b/src/resources/zero-trust/dex/colos.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ColosAPI from 'cloudflare/resources/zero-trust/dex/colos'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ColosAPI from './colos'; +import { SinglePage } from '../../../pagination'; export class Colos extends APIResource { /** diff --git a/src/resources/zero-trust/dex/dex.ts b/src/resources/zero-trust/dex/dex.ts index cec738000b..24e7376e49 100644 --- a/src/resources/zero-trust/dex/dex.ts +++ b/src/resources/zero-trust/dex/dex.ts @@ -1,13 +1,13 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as DEXAPI from 'cloudflare/resources/zero-trust/dex/dex'; -import * as ColosAPI from 'cloudflare/resources/zero-trust/dex/colos'; -import * as TracerouteTestsAPI from 'cloudflare/resources/zero-trust/dex/traceroute-tests'; -import * as FleetStatusAPI from 'cloudflare/resources/zero-trust/dex/fleet-status/fleet-status'; -import * as HTTPTestsAPI from 'cloudflare/resources/zero-trust/dex/http-tests/http-tests'; -import * as TestsAPI from 'cloudflare/resources/zero-trust/dex/tests/tests'; -import * as TracerouteTestResultsAPI from 'cloudflare/resources/zero-trust/dex/traceroute-test-results/traceroute-test-results'; +import { APIResource } from '../../../resource'; +import * as DEXAPI from './dex'; +import * as ColosAPI from './colos'; +import * as TracerouteTestsAPI from './traceroute-tests'; +import * as FleetStatusAPI from './fleet-status/fleet-status'; +import * as HTTPTestsAPI from './http-tests/http-tests'; +import * as TestsAPI from './tests/tests'; +import * as TracerouteTestResultsAPI from './traceroute-test-results/traceroute-test-results'; export class DEX extends APIResource { colos: ColosAPI.Colos = new ColosAPI.Colos(this._client); diff --git a/src/resources/zero-trust/dex/fleet-status/devices.ts b/src/resources/zero-trust/dex/fleet-status/devices.ts index 64f73ffac6..c00efc5891 100644 --- a/src/resources/zero-trust/dex/fleet-status/devices.ts +++ b/src/resources/zero-trust/dex/fleet-status/devices.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DevicesAPI from 'cloudflare/resources/zero-trust/dex/fleet-status/devices'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as DevicesAPI from './devices'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../../pagination'; export class Devices extends APIResource { /** diff --git a/src/resources/zero-trust/dex/fleet-status/fleet-status.ts b/src/resources/zero-trust/dex/fleet-status/fleet-status.ts index 57c7833ff5..e97748168c 100644 --- a/src/resources/zero-trust/dex/fleet-status/fleet-status.ts +++ b/src/resources/zero-trust/dex/fleet-status/fleet-status.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as FleetStatusAPI from 'cloudflare/resources/zero-trust/dex/fleet-status/fleet-status'; -import * as DevicesAPI from 'cloudflare/resources/zero-trust/dex/fleet-status/devices'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as FleetStatusAPI from './fleet-status'; +import * as DevicesAPI from './devices'; export class FleetStatus extends APIResource { devices: DevicesAPI.Devices = new DevicesAPI.Devices(this._client); diff --git a/src/resources/zero-trust/dex/http-tests/http-tests.ts b/src/resources/zero-trust/dex/http-tests/http-tests.ts index fda5785194..a13d165644 100644 --- a/src/resources/zero-trust/dex/http-tests/http-tests.ts +++ b/src/resources/zero-trust/dex/http-tests/http-tests.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as HTTPTestsAPI from 'cloudflare/resources/zero-trust/dex/http-tests/http-tests'; -import * as DEXAPI from 'cloudflare/resources/zero-trust/dex/dex'; -import * as PercentilesAPI from 'cloudflare/resources/zero-trust/dex/http-tests/percentiles'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as HTTPTestsAPI from './http-tests'; +import * as DEXAPI from '../dex'; +import * as PercentilesAPI from './percentiles'; export class HTTPTests extends APIResource { percentiles: PercentilesAPI.Percentiles = new PercentilesAPI.Percentiles(this._client); diff --git a/src/resources/zero-trust/dex/http-tests/percentiles.ts b/src/resources/zero-trust/dex/http-tests/percentiles.ts index 4d1b5a5455..338c444690 100644 --- a/src/resources/zero-trust/dex/http-tests/percentiles.ts +++ b/src/resources/zero-trust/dex/http-tests/percentiles.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PercentilesAPI from 'cloudflare/resources/zero-trust/dex/http-tests/percentiles'; -import * as DEXAPI from 'cloudflare/resources/zero-trust/dex/dex'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as PercentilesAPI from './percentiles'; +import * as DEXAPI from '../dex'; export class Percentiles extends APIResource { /** diff --git a/src/resources/zero-trust/dex/tests/tests.ts b/src/resources/zero-trust/dex/tests/tests.ts index 1c565f1772..caba20506f 100644 --- a/src/resources/zero-trust/dex/tests/tests.ts +++ b/src/resources/zero-trust/dex/tests/tests.ts @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as TestsAPI from 'cloudflare/resources/zero-trust/dex/tests/tests'; -import * as Shared from 'cloudflare/resources/shared'; -import * as DEXAPI from 'cloudflare/resources/zero-trust/dex/dex'; -import * as UniqueDevicesAPI from 'cloudflare/resources/zero-trust/dex/tests/unique-devices'; -import { V4PagePagination, type V4PagePaginationParams } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as TestsAPI from './tests'; +import * as Shared from '../../../shared'; +import * as DEXAPI from '../dex'; +import * as UniqueDevicesAPI from './unique-devices'; +import { V4PagePagination, type V4PagePaginationParams } from '../../../../pagination'; export class Tests extends APIResource { uniqueDevices: UniqueDevicesAPI.UniqueDevices = new UniqueDevicesAPI.UniqueDevices(this._client); diff --git a/src/resources/zero-trust/dex/tests/unique-devices.ts b/src/resources/zero-trust/dex/tests/unique-devices.ts index 8b3aee2b30..84e04f417b 100644 --- a/src/resources/zero-trust/dex/tests/unique-devices.ts +++ b/src/resources/zero-trust/dex/tests/unique-devices.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as UniqueDevicesAPI from 'cloudflare/resources/zero-trust/dex/tests/unique-devices'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as UniqueDevicesAPI from './unique-devices'; export class UniqueDevices extends APIResource { /** diff --git a/src/resources/zero-trust/dex/traceroute-test-results/network-path.ts b/src/resources/zero-trust/dex/traceroute-test-results/network-path.ts index a297dd4b7c..556051e047 100644 --- a/src/resources/zero-trust/dex/traceroute-test-results/network-path.ts +++ b/src/resources/zero-trust/dex/traceroute-test-results/network-path.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as NetworkPathAPI from 'cloudflare/resources/zero-trust/dex/traceroute-test-results/network-path'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as NetworkPathAPI from './network-path'; export class NetworkPath extends APIResource { /** diff --git a/src/resources/zero-trust/dex/traceroute-test-results/traceroute-test-results.ts b/src/resources/zero-trust/dex/traceroute-test-results/traceroute-test-results.ts index c07cf93e2b..ea9068c067 100644 --- a/src/resources/zero-trust/dex/traceroute-test-results/traceroute-test-results.ts +++ b/src/resources/zero-trust/dex/traceroute-test-results/traceroute-test-results.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as NetworkPathAPI from 'cloudflare/resources/zero-trust/dex/traceroute-test-results/network-path'; +import { APIResource } from '../../../../resource'; +import * as NetworkPathAPI from './network-path'; export class TracerouteTestResults extends APIResource { networkPath: NetworkPathAPI.NetworkPath = new NetworkPathAPI.NetworkPath(this._client); diff --git a/src/resources/zero-trust/dex/traceroute-tests.ts b/src/resources/zero-trust/dex/traceroute-tests.ts index 5d75f9e55e..bc48c0494e 100644 --- a/src/resources/zero-trust/dex/traceroute-tests.ts +++ b/src/resources/zero-trust/dex/traceroute-tests.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as TracerouteTestsAPI from 'cloudflare/resources/zero-trust/dex/traceroute-tests'; -import * as DEXAPI from 'cloudflare/resources/zero-trust/dex/dex'; -import * as PercentilesAPI from 'cloudflare/resources/zero-trust/dex/http-tests/percentiles'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as TracerouteTestsAPI from './traceroute-tests'; +import * as DEXAPI from './dex'; +import * as PercentilesAPI from './http-tests/percentiles'; export class TracerouteTests extends APIResource { /** diff --git a/src/resources/zero-trust/dlp/datasets/datasets.ts b/src/resources/zero-trust/dlp/datasets/datasets.ts index b73e5ef9c0..b006a40edd 100644 --- a/src/resources/zero-trust/dlp/datasets/datasets.ts +++ b/src/resources/zero-trust/dlp/datasets/datasets.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DatasetsAPI from 'cloudflare/resources/zero-trust/dlp/datasets/datasets'; -import * as UploadAPI from 'cloudflare/resources/zero-trust/dlp/datasets/upload'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as DatasetsAPI from './datasets'; +import * as UploadAPI from './upload'; +import { SinglePage } from '../../../../pagination'; export class Datasets extends APIResource { upload: UploadAPI.Upload = new UploadAPI.Upload(this._client); diff --git a/src/resources/zero-trust/dlp/datasets/upload.ts b/src/resources/zero-trust/dlp/datasets/upload.ts index e0e01a2ca0..2391176d95 100644 --- a/src/resources/zero-trust/dlp/datasets/upload.ts +++ b/src/resources/zero-trust/dlp/datasets/upload.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as UploadAPI from 'cloudflare/resources/zero-trust/dlp/datasets/upload'; -import * as DatasetsAPI from 'cloudflare/resources/zero-trust/dlp/datasets/datasets'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as UploadAPI from './upload'; +import * as DatasetsAPI from './datasets'; export class Upload extends APIResource { /** diff --git a/src/resources/zero-trust/dlp/dlp.ts b/src/resources/zero-trust/dlp/dlp.ts index 86f1d47ef2..088b5ee2d2 100644 --- a/src/resources/zero-trust/dlp/dlp.ts +++ b/src/resources/zero-trust/dlp/dlp.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as PatternsAPI from 'cloudflare/resources/zero-trust/dlp/patterns'; -import * as PayloadLogsAPI from 'cloudflare/resources/zero-trust/dlp/payload-logs'; -import * as DatasetsAPI from 'cloudflare/resources/zero-trust/dlp/datasets/datasets'; -import * as ProfilesAPI from 'cloudflare/resources/zero-trust/dlp/profiles/profiles'; +import { APIResource } from '../../../resource'; +import * as PatternsAPI from './patterns'; +import * as PayloadLogsAPI from './payload-logs'; +import * as DatasetsAPI from './datasets/datasets'; +import * as ProfilesAPI from './profiles/profiles'; export class DLP extends APIResource { datasets: DatasetsAPI.Datasets = new DatasetsAPI.Datasets(this._client); diff --git a/src/resources/zero-trust/dlp/patterns.ts b/src/resources/zero-trust/dlp/patterns.ts index 5546d7ceca..230087729a 100644 --- a/src/resources/zero-trust/dlp/patterns.ts +++ b/src/resources/zero-trust/dlp/patterns.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PatternsAPI from 'cloudflare/resources/zero-trust/dlp/patterns'; -import * as OwnershipAPI from 'cloudflare/resources/logpush/ownership'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as PatternsAPI from './patterns'; +import * as OwnershipAPI from '../../logpush/ownership'; export class Patterns extends APIResource { /** diff --git a/src/resources/zero-trust/dlp/payload-logs.ts b/src/resources/zero-trust/dlp/payload-logs.ts index 0634778111..f47f6777e3 100644 --- a/src/resources/zero-trust/dlp/payload-logs.ts +++ b/src/resources/zero-trust/dlp/payload-logs.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PayloadLogsAPI from 'cloudflare/resources/zero-trust/dlp/payload-logs'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as PayloadLogsAPI from './payload-logs'; export class PayloadLogs extends APIResource { /** diff --git a/src/resources/zero-trust/dlp/profiles/custom.ts b/src/resources/zero-trust/dlp/profiles/custom.ts index c5ea964e25..6b917142a4 100644 --- a/src/resources/zero-trust/dlp/profiles/custom.ts +++ b/src/resources/zero-trust/dlp/profiles/custom.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as CustomAPI from 'cloudflare/resources/zero-trust/dlp/profiles/custom'; -import * as ProfilesAPI from 'cloudflare/resources/zero-trust/dlp/profiles/profiles'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as CustomAPI from './custom'; +import * as ProfilesAPI from './profiles'; export class Custom extends APIResource { /** diff --git a/src/resources/zero-trust/dlp/profiles/predefined.ts b/src/resources/zero-trust/dlp/profiles/predefined.ts index 45752731a4..4a6f19a74a 100644 --- a/src/resources/zero-trust/dlp/profiles/predefined.ts +++ b/src/resources/zero-trust/dlp/profiles/predefined.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PredefinedAPI from 'cloudflare/resources/zero-trust/dlp/profiles/predefined'; -import * as ProfilesAPI from 'cloudflare/resources/zero-trust/dlp/profiles/profiles'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as PredefinedAPI from './predefined'; +import * as ProfilesAPI from './profiles'; export class Predefined extends APIResource { /** diff --git a/src/resources/zero-trust/dlp/profiles/profiles.ts b/src/resources/zero-trust/dlp/profiles/profiles.ts index f7d57606c3..11da93cf72 100644 --- a/src/resources/zero-trust/dlp/profiles/profiles.ts +++ b/src/resources/zero-trust/dlp/profiles/profiles.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ProfilesAPI from 'cloudflare/resources/zero-trust/dlp/profiles/profiles'; -import * as CustomAPI from 'cloudflare/resources/zero-trust/dlp/profiles/custom'; -import * as PredefinedAPI from 'cloudflare/resources/zero-trust/dlp/profiles/predefined'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as ProfilesAPI from './profiles'; +import * as CustomAPI from './custom'; +import * as PredefinedAPI from './predefined'; +import { SinglePage } from '../../../../pagination'; export class Profiles extends APIResource { custom: CustomAPI.Custom = new CustomAPI.Custom(this._client); diff --git a/src/resources/zero-trust/gateway/app-types.ts b/src/resources/zero-trust/gateway/app-types.ts index b696cafc97..68dd676967 100644 --- a/src/resources/zero-trust/gateway/app-types.ts +++ b/src/resources/zero-trust/gateway/app-types.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AppTypesAPI from 'cloudflare/resources/zero-trust/gateway/app-types'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as AppTypesAPI from './app-types'; +import { SinglePage } from '../../../pagination'; export class AppTypes extends APIResource { /** diff --git a/src/resources/zero-trust/gateway/audit-ssh-settings.ts b/src/resources/zero-trust/gateway/audit-ssh-settings.ts index 485bd7d8a0..2c1010a577 100644 --- a/src/resources/zero-trust/gateway/audit-ssh-settings.ts +++ b/src/resources/zero-trust/gateway/audit-ssh-settings.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AuditSSHSettingsAPI from 'cloudflare/resources/zero-trust/gateway/audit-ssh-settings'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as AuditSSHSettingsAPI from './audit-ssh-settings'; export class AuditSSHSettings extends APIResource { /** diff --git a/src/resources/zero-trust/gateway/categories.ts b/src/resources/zero-trust/gateway/categories.ts index 570e00053c..ebe29165ce 100644 --- a/src/resources/zero-trust/gateway/categories.ts +++ b/src/resources/zero-trust/gateway/categories.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as CategoriesAPI from 'cloudflare/resources/zero-trust/gateway/categories'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as CategoriesAPI from './categories'; +import { SinglePage } from '../../../pagination'; export class Categories extends APIResource { /** diff --git a/src/resources/zero-trust/gateway/configurations.ts b/src/resources/zero-trust/gateway/configurations.ts index 0877d2620c..8918b4bd21 100644 --- a/src/resources/zero-trust/gateway/configurations.ts +++ b/src/resources/zero-trust/gateway/configurations.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ConfigurationsAPI from 'cloudflare/resources/zero-trust/gateway/configurations'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ConfigurationsAPI from './configurations'; export class Configurations extends APIResource { /** diff --git a/src/resources/zero-trust/gateway/gateway.ts b/src/resources/zero-trust/gateway/gateway.ts index 4ca99b314e..25360eff0f 100644 --- a/src/resources/zero-trust/gateway/gateway.ts +++ b/src/resources/zero-trust/gateway/gateway.ts @@ -1,17 +1,17 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as GatewayAPI from 'cloudflare/resources/zero-trust/gateway/gateway'; -import * as AppTypesAPI from 'cloudflare/resources/zero-trust/gateway/app-types'; -import * as AuditSSHSettingsAPI from 'cloudflare/resources/zero-trust/gateway/audit-ssh-settings'; -import * as CategoriesAPI from 'cloudflare/resources/zero-trust/gateway/categories'; -import * as ConfigurationsAPI from 'cloudflare/resources/zero-trust/gateway/configurations'; -import * as LocationsAPI from 'cloudflare/resources/zero-trust/gateway/locations'; -import * as LoggingAPI from 'cloudflare/resources/zero-trust/gateway/logging'; -import * as ProxyEndpointsAPI from 'cloudflare/resources/zero-trust/gateway/proxy-endpoints'; -import * as RulesAPI from 'cloudflare/resources/zero-trust/gateway/rules'; -import * as ListsAPI from 'cloudflare/resources/zero-trust/gateway/lists/lists'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as GatewayAPI from './gateway'; +import * as AppTypesAPI from './app-types'; +import * as AuditSSHSettingsAPI from './audit-ssh-settings'; +import * as CategoriesAPI from './categories'; +import * as ConfigurationsAPI from './configurations'; +import * as LocationsAPI from './locations'; +import * as LoggingAPI from './logging'; +import * as ProxyEndpointsAPI from './proxy-endpoints'; +import * as RulesAPI from './rules'; +import * as ListsAPI from './lists/lists'; export class Gateway extends APIResource { auditSSHSettings: AuditSSHSettingsAPI.AuditSSHSettings = new AuditSSHSettingsAPI.AuditSSHSettings( diff --git a/src/resources/zero-trust/gateway/lists/items.ts b/src/resources/zero-trust/gateway/lists/items.ts index 01da96b806..8a6ab1ea56 100644 --- a/src/resources/zero-trust/gateway/lists/items.ts +++ b/src/resources/zero-trust/gateway/lists/items.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ItemsAPI from 'cloudflare/resources/zero-trust/gateway/lists/items'; -import * as ListsAPI from 'cloudflare/resources/zero-trust/gateway/lists/lists'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as ItemsAPI from './items'; +import * as ListsAPI from './lists'; +import { SinglePage } from '../../../../pagination'; export class Items extends APIResource { /** diff --git a/src/resources/zero-trust/gateway/lists/lists.ts b/src/resources/zero-trust/gateway/lists/lists.ts index 05235915d2..716fcd5834 100644 --- a/src/resources/zero-trust/gateway/lists/lists.ts +++ b/src/resources/zero-trust/gateway/lists/lists.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ListsAPI from 'cloudflare/resources/zero-trust/gateway/lists/lists'; -import * as ItemsAPI from 'cloudflare/resources/zero-trust/gateway/lists/items'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as ListsAPI from './lists'; +import * as ItemsAPI from './items'; +import { SinglePage } from '../../../../pagination'; export class Lists extends APIResource { items: ItemsAPI.Items = new ItemsAPI.Items(this._client); diff --git a/src/resources/zero-trust/gateway/locations.ts b/src/resources/zero-trust/gateway/locations.ts index b18c68a542..3ed52f6674 100644 --- a/src/resources/zero-trust/gateway/locations.ts +++ b/src/resources/zero-trust/gateway/locations.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as LocationsAPI from 'cloudflare/resources/zero-trust/gateway/locations'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as LocationsAPI from './locations'; +import { SinglePage } from '../../../pagination'; export class Locations extends APIResource { /** diff --git a/src/resources/zero-trust/gateway/logging.ts b/src/resources/zero-trust/gateway/logging.ts index d11d230be9..6fb96be204 100644 --- a/src/resources/zero-trust/gateway/logging.ts +++ b/src/resources/zero-trust/gateway/logging.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as LoggingAPI from 'cloudflare/resources/zero-trust/gateway/logging'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as LoggingAPI from './logging'; export class Logging extends APIResource { /** diff --git a/src/resources/zero-trust/gateway/proxy-endpoints.ts b/src/resources/zero-trust/gateway/proxy-endpoints.ts index 4ef193ed9e..7aa87a10ca 100644 --- a/src/resources/zero-trust/gateway/proxy-endpoints.ts +++ b/src/resources/zero-trust/gateway/proxy-endpoints.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ProxyEndpointsAPI from 'cloudflare/resources/zero-trust/gateway/proxy-endpoints'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ProxyEndpointsAPI from './proxy-endpoints'; +import { SinglePage } from '../../../pagination'; export class ProxyEndpoints extends APIResource { /** diff --git a/src/resources/zero-trust/gateway/rules.ts b/src/resources/zero-trust/gateway/rules.ts index baa6ac9698..dd28917ea9 100644 --- a/src/resources/zero-trust/gateway/rules.ts +++ b/src/resources/zero-trust/gateway/rules.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as RulesAPI from 'cloudflare/resources/zero-trust/gateway/rules'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as RulesAPI from './rules'; +import { SinglePage } from '../../../pagination'; export class Rules extends APIResource { /** diff --git a/src/resources/zero-trust/identity-providers.ts b/src/resources/zero-trust/identity-providers.ts index c87c8d7314..a3a547f1fd 100644 --- a/src/resources/zero-trust/identity-providers.ts +++ b/src/resources/zero-trust/identity-providers.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { CloudflareError } from 'cloudflare/error'; -import * as IdentityProvidersAPI from 'cloudflare/resources/zero-trust/identity-providers'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import { CloudflareError } from '../../error'; +import * as IdentityProvidersAPI from './identity-providers'; +import { SinglePage } from '../../pagination'; export class IdentityProviders extends APIResource { /** diff --git a/src/resources/zero-trust/networks/networks.ts b/src/resources/zero-trust/networks/networks.ts index cc44391cd5..fca2f3e36e 100644 --- a/src/resources/zero-trust/networks/networks.ts +++ b/src/resources/zero-trust/networks/networks.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as VirtualNetworksAPI from 'cloudflare/resources/zero-trust/networks/virtual-networks'; -import * as RoutesAPI from 'cloudflare/resources/zero-trust/networks/routes/routes'; +import { APIResource } from '../../../resource'; +import * as VirtualNetworksAPI from './virtual-networks'; +import * as RoutesAPI from './routes/routes'; export class Networks extends APIResource { routes: RoutesAPI.Routes = new RoutesAPI.Routes(this._client); diff --git a/src/resources/zero-trust/networks/routes/ips.ts b/src/resources/zero-trust/networks/routes/ips.ts index 8b0a9fc689..ddbad74171 100644 --- a/src/resources/zero-trust/networks/routes/ips.ts +++ b/src/resources/zero-trust/networks/routes/ips.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as IPsAPI from 'cloudflare/resources/zero-trust/networks/routes/ips'; -import * as RoutesAPI from 'cloudflare/resources/zero-trust/networks/routes/routes'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as IPsAPI from './ips'; +import * as RoutesAPI from './routes'; export class IPs extends APIResource { /** diff --git a/src/resources/zero-trust/networks/routes/networks.ts b/src/resources/zero-trust/networks/routes/networks.ts index 5bde20e784..8eecec3f43 100644 --- a/src/resources/zero-trust/networks/routes/networks.ts +++ b/src/resources/zero-trust/networks/routes/networks.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as NetworksAPI from 'cloudflare/resources/zero-trust/networks/routes/networks'; -import * as RoutesAPI from 'cloudflare/resources/zero-trust/networks/routes/routes'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as NetworksAPI from './networks'; +import * as RoutesAPI from './routes'; export class Networks extends APIResource { /** diff --git a/src/resources/zero-trust/networks/routes/routes.ts b/src/resources/zero-trust/networks/routes/routes.ts index 4f6afe5f40..1afa2bb040 100644 --- a/src/resources/zero-trust/networks/routes/routes.ts +++ b/src/resources/zero-trust/networks/routes/routes.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as RoutesAPI from 'cloudflare/resources/zero-trust/networks/routes/routes'; -import * as IPsAPI from 'cloudflare/resources/zero-trust/networks/routes/ips'; -import * as NetworksAPI from 'cloudflare/resources/zero-trust/networks/routes/networks'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as RoutesAPI from './routes'; +import * as IPsAPI from './ips'; +import * as NetworksAPI from './networks'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../../pagination'; export class Routes extends APIResource { ips: IPsAPI.IPs = new IPsAPI.IPs(this._client); diff --git a/src/resources/zero-trust/networks/virtual-networks.ts b/src/resources/zero-trust/networks/virtual-networks.ts index 0cff364047..fdd6e17b77 100644 --- a/src/resources/zero-trust/networks/virtual-networks.ts +++ b/src/resources/zero-trust/networks/virtual-networks.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as VirtualNetworksAPI from 'cloudflare/resources/zero-trust/networks/virtual-networks'; -import { SinglePage } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as VirtualNetworksAPI from './virtual-networks'; +import { SinglePage } from '../../../pagination'; export class VirtualNetworks extends APIResource { /** diff --git a/src/resources/zero-trust/organizations.ts b/src/resources/zero-trust/organizations.ts index 835574f365..f2bc9cb04d 100644 --- a/src/resources/zero-trust/organizations.ts +++ b/src/resources/zero-trust/organizations.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import { CloudflareError } from 'cloudflare/error'; -import * as OrganizationsAPI from 'cloudflare/resources/zero-trust/organizations'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import { CloudflareError } from '../../error'; +import * as OrganizationsAPI from './organizations'; export class Organizations extends APIResource { /** diff --git a/src/resources/zero-trust/risk-scoring/behaviours.ts b/src/resources/zero-trust/risk-scoring/behaviours.ts index 3593bd7cf2..6d291a3ff1 100644 --- a/src/resources/zero-trust/risk-scoring/behaviours.ts +++ b/src/resources/zero-trust/risk-scoring/behaviours.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as BehavioursAPI from 'cloudflare/resources/zero-trust/risk-scoring/behaviours'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as BehavioursAPI from './behaviours'; export class Behaviours extends APIResource { /** diff --git a/src/resources/zero-trust/risk-scoring/risk-scoring.ts b/src/resources/zero-trust/risk-scoring/risk-scoring.ts index c288a530cc..6f4e81aab3 100644 --- a/src/resources/zero-trust/risk-scoring/risk-scoring.ts +++ b/src/resources/zero-trust/risk-scoring/risk-scoring.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as RiskScoringAPI from 'cloudflare/resources/zero-trust/risk-scoring/risk-scoring'; -import * as BehavioursAPI from 'cloudflare/resources/zero-trust/risk-scoring/behaviours'; -import * as SummaryAPI from 'cloudflare/resources/zero-trust/risk-scoring/summary'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as RiskScoringAPI from './risk-scoring'; +import * as BehavioursAPI from './behaviours'; +import * as SummaryAPI from './summary'; export class RiskScoring extends APIResource { behaviours: BehavioursAPI.Behaviours = new BehavioursAPI.Behaviours(this._client); diff --git a/src/resources/zero-trust/risk-scoring/summary.ts b/src/resources/zero-trust/risk-scoring/summary.ts index 8e851b170a..8ee7ec202b 100644 --- a/src/resources/zero-trust/risk-scoring/summary.ts +++ b/src/resources/zero-trust/risk-scoring/summary.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as SummaryAPI from 'cloudflare/resources/zero-trust/risk-scoring/summary'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as SummaryAPI from './summary'; export class Summary extends APIResource { /** diff --git a/src/resources/zero-trust/seats.ts b/src/resources/zero-trust/seats.ts index dfb536ec85..387affcca8 100644 --- a/src/resources/zero-trust/seats.ts +++ b/src/resources/zero-trust/seats.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SeatsAPI from 'cloudflare/resources/zero-trust/seats'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as SeatsAPI from './seats'; export class Seats extends APIResource { /** diff --git a/src/resources/zero-trust/tunnels/configurations.ts b/src/resources/zero-trust/tunnels/configurations.ts index e8cb50dd4d..8971955b7b 100644 --- a/src/resources/zero-trust/tunnels/configurations.ts +++ b/src/resources/zero-trust/tunnels/configurations.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ConfigurationsAPI from 'cloudflare/resources/zero-trust/tunnels/configurations'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ConfigurationsAPI from './configurations'; export class Configurations extends APIResource { /** diff --git a/src/resources/zero-trust/tunnels/connections.ts b/src/resources/zero-trust/tunnels/connections.ts index e856006b56..24db07e2fb 100644 --- a/src/resources/zero-trust/tunnels/connections.ts +++ b/src/resources/zero-trust/tunnels/connections.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ConnectionsAPI from 'cloudflare/resources/zero-trust/tunnels/connections'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ConnectionsAPI from './connections'; export class Connections extends APIResource { /** diff --git a/src/resources/zero-trust/tunnels/connectors.ts b/src/resources/zero-trust/tunnels/connectors.ts index c3df6b5e62..fdb05ea31a 100644 --- a/src/resources/zero-trust/tunnels/connectors.ts +++ b/src/resources/zero-trust/tunnels/connectors.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ConnectorsAPI from 'cloudflare/resources/zero-trust/tunnels/connectors'; -import * as ConnectionsAPI from 'cloudflare/resources/zero-trust/tunnels/connections'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ConnectorsAPI from './connectors'; +import * as ConnectionsAPI from './connections'; export class Connectors extends APIResource { /** diff --git a/src/resources/zero-trust/tunnels/management.ts b/src/resources/zero-trust/tunnels/management.ts index ba7f25b545..e811ac1639 100644 --- a/src/resources/zero-trust/tunnels/management.ts +++ b/src/resources/zero-trust/tunnels/management.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ManagementAPI from 'cloudflare/resources/zero-trust/tunnels/management'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ManagementAPI from './management'; export class Management extends APIResource { /** diff --git a/src/resources/zero-trust/tunnels/token.ts b/src/resources/zero-trust/tunnels/token.ts index 4293535720..9594d393b0 100644 --- a/src/resources/zero-trust/tunnels/token.ts +++ b/src/resources/zero-trust/tunnels/token.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as TokenAPI from 'cloudflare/resources/zero-trust/tunnels/token'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as TokenAPI from './token'; export class Token extends APIResource { /** diff --git a/src/resources/zero-trust/tunnels/tunnels.ts b/src/resources/zero-trust/tunnels/tunnels.ts index 64d1922a7a..2d85ecbfe3 100644 --- a/src/resources/zero-trust/tunnels/tunnels.ts +++ b/src/resources/zero-trust/tunnels/tunnels.ts @@ -1,15 +1,15 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as TunnelsAPI from 'cloudflare/resources/zero-trust/tunnels/tunnels'; -import * as Shared from 'cloudflare/resources/shared'; -import * as ConfigurationsAPI from 'cloudflare/resources/zero-trust/tunnels/configurations'; -import * as ConnectionsAPI from 'cloudflare/resources/zero-trust/tunnels/connections'; -import * as ConnectorsAPI from 'cloudflare/resources/zero-trust/tunnels/connectors'; -import * as ManagementAPI from 'cloudflare/resources/zero-trust/tunnels/management'; -import * as TokenAPI from 'cloudflare/resources/zero-trust/tunnels/token'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as TunnelsAPI from './tunnels'; +import * as Shared from '../../shared'; +import * as ConfigurationsAPI from './configurations'; +import * as ConnectionsAPI from './connections'; +import * as ConnectorsAPI from './connectors'; +import * as ManagementAPI from './management'; +import * as TokenAPI from './token'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; export class Tunnels extends APIResource { configurations: ConfigurationsAPI.Configurations = new ConfigurationsAPI.Configurations(this._client); diff --git a/src/resources/zero-trust/zero-trust.ts b/src/resources/zero-trust/zero-trust.ts index 5f743cd766..45f05d017f 100644 --- a/src/resources/zero-trust/zero-trust.ts +++ b/src/resources/zero-trust/zero-trust.ts @@ -1,18 +1,18 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as ConnectivitySettingsAPI from 'cloudflare/resources/zero-trust/connectivity-settings'; -import * as IdentityProvidersAPI from 'cloudflare/resources/zero-trust/identity-providers'; -import * as OrganizationsAPI from 'cloudflare/resources/zero-trust/organizations'; -import * as SeatsAPI from 'cloudflare/resources/zero-trust/seats'; -import * as AccessAPI from 'cloudflare/resources/zero-trust/access/access'; -import * as DevicesAPI from 'cloudflare/resources/zero-trust/devices/devices'; -import * as DEXAPI from 'cloudflare/resources/zero-trust/dex/dex'; -import * as DLPAPI from 'cloudflare/resources/zero-trust/dlp/dlp'; -import * as GatewayAPI from 'cloudflare/resources/zero-trust/gateway/gateway'; -import * as NetworksAPI from 'cloudflare/resources/zero-trust/networks/networks'; -import * as RiskScoringAPI from 'cloudflare/resources/zero-trust/risk-scoring/risk-scoring'; -import * as TunnelsAPI from 'cloudflare/resources/zero-trust/tunnels/tunnels'; +import { APIResource } from '../../resource'; +import * as ConnectivitySettingsAPI from './connectivity-settings'; +import * as IdentityProvidersAPI from './identity-providers'; +import * as OrganizationsAPI from './organizations'; +import * as SeatsAPI from './seats'; +import * as AccessAPI from './access/access'; +import * as DevicesAPI from './devices/devices'; +import * as DEXAPI from './dex/dex'; +import * as DLPAPI from './dlp/dlp'; +import * as GatewayAPI from './gateway/gateway'; +import * as NetworksAPI from './networks/networks'; +import * as RiskScoringAPI from './risk-scoring/risk-scoring'; +import * as TunnelsAPI from './tunnels/tunnels'; export class ZeroTrust extends APIResource { devices: DevicesAPI.Devices = new DevicesAPI.Devices(this._client); diff --git a/src/resources/zones/activation-check.ts b/src/resources/zones/activation-check.ts index cf751f944d..68d9b9a70a 100644 --- a/src/resources/zones/activation-check.ts +++ b/src/resources/zones/activation-check.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ActivationCheckAPI from 'cloudflare/resources/zones/activation-check'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as ActivationCheckAPI from './activation-check'; export class ActivationCheck extends APIResource { /** diff --git a/src/resources/zones/custom-nameservers.ts b/src/resources/zones/custom-nameservers.ts index 5ee95a03ad..b0052bf855 100644 --- a/src/resources/zones/custom-nameservers.ts +++ b/src/resources/zones/custom-nameservers.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as CustomNameserversAPI from 'cloudflare/resources/zones/custom-nameservers'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as CustomNameserversAPI from './custom-nameservers'; export class CustomNameservers extends APIResource { /** diff --git a/src/resources/zones/dns-settings.ts b/src/resources/zones/dns-settings.ts index bfeeba86dc..1ec28d443a 100644 --- a/src/resources/zones/dns-settings.ts +++ b/src/resources/zones/dns-settings.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DNSSettingsAPI from 'cloudflare/resources/zones/dns-settings'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as DNSSettingsAPI from './dns-settings'; export class DNSSettings extends APIResource { /** diff --git a/src/resources/zones/holds.ts b/src/resources/zones/holds.ts index fdd8e37c78..1394d2006b 100644 --- a/src/resources/zones/holds.ts +++ b/src/resources/zones/holds.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as HoldsAPI from 'cloudflare/resources/zones/holds'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as HoldsAPI from './holds'; export class Holds extends APIResource { /** diff --git a/src/resources/zones/settings/advanced-ddos.ts b/src/resources/zones/settings/advanced-ddos.ts index 5318571cf0..90622e62bc 100644 --- a/src/resources/zones/settings/advanced-ddos.ts +++ b/src/resources/zones/settings/advanced-ddos.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AdvancedDDoSAPI from 'cloudflare/resources/zones/settings/advanced-ddos'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as AdvancedDDoSAPI from './advanced-ddos'; export class AdvancedDDoS extends APIResource { /** diff --git a/src/resources/zones/settings/always-online.ts b/src/resources/zones/settings/always-online.ts index 9a16965354..744e4ecc32 100644 --- a/src/resources/zones/settings/always-online.ts +++ b/src/resources/zones/settings/always-online.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AlwaysOnlineAPI from 'cloudflare/resources/zones/settings/always-online'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as AlwaysOnlineAPI from './always-online'; export class AlwaysOnlineResource extends APIResource { /** diff --git a/src/resources/zones/settings/always-use-https.ts b/src/resources/zones/settings/always-use-https.ts index 2c458a2831..312e6c57b1 100644 --- a/src/resources/zones/settings/always-use-https.ts +++ b/src/resources/zones/settings/always-use-https.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AlwaysUseHTTPSAPI from 'cloudflare/resources/zones/settings/always-use-https'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as AlwaysUseHTTPSAPI from './always-use-https'; export class AlwaysUseHTTPS extends APIResource { /** diff --git a/src/resources/zones/settings/automatic-https-rewrites.ts b/src/resources/zones/settings/automatic-https-rewrites.ts index ad2838ebdb..67b527cc96 100644 --- a/src/resources/zones/settings/automatic-https-rewrites.ts +++ b/src/resources/zones/settings/automatic-https-rewrites.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AutomaticHTTPSRewritesAPI from 'cloudflare/resources/zones/settings/automatic-https-rewrites'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as AutomaticHTTPSRewritesAPI from './automatic-https-rewrites'; export class AutomaticHTTPSRewrites extends APIResource { /** diff --git a/src/resources/zones/settings/automatic-platform-optimization.ts b/src/resources/zones/settings/automatic-platform-optimization.ts index 79b7ea135e..82efc99b83 100644 --- a/src/resources/zones/settings/automatic-platform-optimization.ts +++ b/src/resources/zones/settings/automatic-platform-optimization.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as AutomaticPlatformOptimizationAPI from 'cloudflare/resources/zones/settings/automatic-platform-optimization'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as AutomaticPlatformOptimizationAPI from './automatic-platform-optimization'; export class AutomaticPlatformOptimizationResource extends APIResource { /** diff --git a/src/resources/zones/settings/brotli.ts b/src/resources/zones/settings/brotli.ts index 292489d221..2094eef80f 100644 --- a/src/resources/zones/settings/brotli.ts +++ b/src/resources/zones/settings/brotli.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as BrotliAPI from 'cloudflare/resources/zones/settings/brotli'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as BrotliAPI from './brotli'; export class BrotliResource extends APIResource { /** diff --git a/src/resources/zones/settings/browser-cache-ttl.ts b/src/resources/zones/settings/browser-cache-ttl.ts index 13d7cb548e..1a535cc023 100644 --- a/src/resources/zones/settings/browser-cache-ttl.ts +++ b/src/resources/zones/settings/browser-cache-ttl.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as BrowserCacheTTLAPI from 'cloudflare/resources/zones/settings/browser-cache-ttl'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as BrowserCacheTTLAPI from './browser-cache-ttl'; export class BrowserCacheTTLResource extends APIResource { /** diff --git a/src/resources/zones/settings/browser-check.ts b/src/resources/zones/settings/browser-check.ts index 2e380d724b..e88f318c65 100644 --- a/src/resources/zones/settings/browser-check.ts +++ b/src/resources/zones/settings/browser-check.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as BrowserCheckAPI from 'cloudflare/resources/zones/settings/browser-check'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as BrowserCheckAPI from './browser-check'; export class BrowserCheckResource extends APIResource { /** diff --git a/src/resources/zones/settings/cache-level.ts b/src/resources/zones/settings/cache-level.ts index 57c2f582b0..1bb5e16035 100644 --- a/src/resources/zones/settings/cache-level.ts +++ b/src/resources/zones/settings/cache-level.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as CacheLevelAPI from 'cloudflare/resources/zones/settings/cache-level'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as CacheLevelAPI from './cache-level'; export class CacheLevelResource extends APIResource { /** diff --git a/src/resources/zones/settings/challenge-ttl.ts b/src/resources/zones/settings/challenge-ttl.ts index e2f433055f..d9bc2baa54 100644 --- a/src/resources/zones/settings/challenge-ttl.ts +++ b/src/resources/zones/settings/challenge-ttl.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ChallengeTTLAPI from 'cloudflare/resources/zones/settings/challenge-ttl'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ChallengeTTLAPI from './challenge-ttl'; export class ChallengeTTLResource extends APIResource { /** diff --git a/src/resources/zones/settings/ciphers.ts b/src/resources/zones/settings/ciphers.ts index 3d11c66687..edce8fca8c 100644 --- a/src/resources/zones/settings/ciphers.ts +++ b/src/resources/zones/settings/ciphers.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as CiphersAPI from 'cloudflare/resources/zones/settings/ciphers'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as CiphersAPI from './ciphers'; export class Ciphers extends APIResource { /** diff --git a/src/resources/zones/settings/development-mode.ts b/src/resources/zones/settings/development-mode.ts index 05cdc4d340..849bc63b82 100644 --- a/src/resources/zones/settings/development-mode.ts +++ b/src/resources/zones/settings/development-mode.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as DevelopmentModeAPI from 'cloudflare/resources/zones/settings/development-mode'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as DevelopmentModeAPI from './development-mode'; export class DevelopmentModeResource extends APIResource { /** diff --git a/src/resources/zones/settings/early-hints.ts b/src/resources/zones/settings/early-hints.ts index fe69a5e8eb..f4949c73bd 100644 --- a/src/resources/zones/settings/early-hints.ts +++ b/src/resources/zones/settings/early-hints.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as EarlyHintsAPI from 'cloudflare/resources/zones/settings/early-hints'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as EarlyHintsAPI from './early-hints'; export class EarlyHints extends APIResource { /** diff --git a/src/resources/zones/settings/email-obfuscation.ts b/src/resources/zones/settings/email-obfuscation.ts index fdf9a1a2d7..b026b0b584 100644 --- a/src/resources/zones/settings/email-obfuscation.ts +++ b/src/resources/zones/settings/email-obfuscation.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as EmailObfuscationAPI from 'cloudflare/resources/zones/settings/email-obfuscation'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as EmailObfuscationAPI from './email-obfuscation'; export class EmailObfuscationResource extends APIResource { /** diff --git a/src/resources/zones/settings/font-settings.ts b/src/resources/zones/settings/font-settings.ts index 5de94544b4..881d996a23 100644 --- a/src/resources/zones/settings/font-settings.ts +++ b/src/resources/zones/settings/font-settings.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as FontSettingsAPI from 'cloudflare/resources/zones/settings/font-settings'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as FontSettingsAPI from './font-settings'; export class FontSettings extends APIResource { /** diff --git a/src/resources/zones/settings/h2-prioritization.ts b/src/resources/zones/settings/h2-prioritization.ts index 892f79e5d2..c62c7e0ea8 100644 --- a/src/resources/zones/settings/h2-prioritization.ts +++ b/src/resources/zones/settings/h2-prioritization.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as H2PrioritizationAPI from 'cloudflare/resources/zones/settings/h2-prioritization'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as H2PrioritizationAPI from './h2-prioritization'; export class H2PrioritizationResource extends APIResource { /** diff --git a/src/resources/zones/settings/hotlink-protection.ts b/src/resources/zones/settings/hotlink-protection.ts index 42e9002f42..c6e0970294 100644 --- a/src/resources/zones/settings/hotlink-protection.ts +++ b/src/resources/zones/settings/hotlink-protection.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as HotlinkProtectionAPI from 'cloudflare/resources/zones/settings/hotlink-protection'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as HotlinkProtectionAPI from './hotlink-protection'; export class HotlinkProtectionResource extends APIResource { /** diff --git a/src/resources/zones/settings/http2.ts b/src/resources/zones/settings/http2.ts index 4b8e0e113d..57e6f7d1a2 100644 --- a/src/resources/zones/settings/http2.ts +++ b/src/resources/zones/settings/http2.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as HTTP2API from 'cloudflare/resources/zones/settings/http2'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as HTTP2API from './http2'; export class HTTP2Resource extends APIResource { /** diff --git a/src/resources/zones/settings/http3.ts b/src/resources/zones/settings/http3.ts index d72852643f..4b7fd789bd 100644 --- a/src/resources/zones/settings/http3.ts +++ b/src/resources/zones/settings/http3.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as HTTP3API from 'cloudflare/resources/zones/settings/http3'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as HTTP3API from './http3'; export class HTTP3Resource extends APIResource { /** diff --git a/src/resources/zones/settings/image-resizing.ts b/src/resources/zones/settings/image-resizing.ts index f72754dffd..88833d34cf 100644 --- a/src/resources/zones/settings/image-resizing.ts +++ b/src/resources/zones/settings/image-resizing.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ImageResizingAPI from 'cloudflare/resources/zones/settings/image-resizing'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ImageResizingAPI from './image-resizing'; export class ImageResizingResource extends APIResource { /** diff --git a/src/resources/zones/settings/ip-geolocation.ts b/src/resources/zones/settings/ip-geolocation.ts index 7a1a4a9521..a9f30961eb 100644 --- a/src/resources/zones/settings/ip-geolocation.ts +++ b/src/resources/zones/settings/ip-geolocation.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as IPGeolocationAPI from 'cloudflare/resources/zones/settings/ip-geolocation'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as IPGeolocationAPI from './ip-geolocation'; export class IPGeolocationResource extends APIResource { /** diff --git a/src/resources/zones/settings/ipv6.ts b/src/resources/zones/settings/ipv6.ts index 73ffdbe797..238a0fc71f 100644 --- a/src/resources/zones/settings/ipv6.ts +++ b/src/resources/zones/settings/ipv6.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as IPV6API from 'cloudflare/resources/zones/settings/ipv6'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as IPV6API from './ipv6'; export class IPV6Resource extends APIResource { /** diff --git a/src/resources/zones/settings/min-tls-version.ts b/src/resources/zones/settings/min-tls-version.ts index c706ff39d1..e566eb0fe6 100644 --- a/src/resources/zones/settings/min-tls-version.ts +++ b/src/resources/zones/settings/min-tls-version.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as MinTLSVersionAPI from 'cloudflare/resources/zones/settings/min-tls-version'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as MinTLSVersionAPI from './min-tls-version'; export class MinTLSVersionResource extends APIResource { /** diff --git a/src/resources/zones/settings/minify.ts b/src/resources/zones/settings/minify.ts index f7a9d78f9f..eb8c4dddf9 100644 --- a/src/resources/zones/settings/minify.ts +++ b/src/resources/zones/settings/minify.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as MinifyAPI from 'cloudflare/resources/zones/settings/minify'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as MinifyAPI from './minify'; export class MinifyResource extends APIResource { /** diff --git a/src/resources/zones/settings/mirage.ts b/src/resources/zones/settings/mirage.ts index 24ef7dec18..27b2ebf023 100644 --- a/src/resources/zones/settings/mirage.ts +++ b/src/resources/zones/settings/mirage.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as MirageAPI from 'cloudflare/resources/zones/settings/mirage'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as MirageAPI from './mirage'; export class MirageResource extends APIResource { /** diff --git a/src/resources/zones/settings/mobile-redirect.ts b/src/resources/zones/settings/mobile-redirect.ts index aed84fdc89..04f47e1072 100644 --- a/src/resources/zones/settings/mobile-redirect.ts +++ b/src/resources/zones/settings/mobile-redirect.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as MobileRedirectAPI from 'cloudflare/resources/zones/settings/mobile-redirect'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as MobileRedirectAPI from './mobile-redirect'; export class MobileRedirectResource extends APIResource { /** diff --git a/src/resources/zones/settings/nel.ts b/src/resources/zones/settings/nel.ts index 91cdca0079..0768eb5279 100644 --- a/src/resources/zones/settings/nel.ts +++ b/src/resources/zones/settings/nel.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as NELAPI from 'cloudflare/resources/zones/settings/nel'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as NELAPI from './nel'; export class NELResource extends APIResource { /** diff --git a/src/resources/zones/settings/opportunistic-encryption.ts b/src/resources/zones/settings/opportunistic-encryption.ts index 2974e6efc3..26138028f1 100644 --- a/src/resources/zones/settings/opportunistic-encryption.ts +++ b/src/resources/zones/settings/opportunistic-encryption.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as OpportunisticEncryptionAPI from 'cloudflare/resources/zones/settings/opportunistic-encryption'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as OpportunisticEncryptionAPI from './opportunistic-encryption'; export class OpportunisticEncryptionResource extends APIResource { /** diff --git a/src/resources/zones/settings/opportunistic-onion.ts b/src/resources/zones/settings/opportunistic-onion.ts index 8d4d9a7e92..354034113f 100644 --- a/src/resources/zones/settings/opportunistic-onion.ts +++ b/src/resources/zones/settings/opportunistic-onion.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as OpportunisticOnionAPI from 'cloudflare/resources/zones/settings/opportunistic-onion'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as OpportunisticOnionAPI from './opportunistic-onion'; export class OpportunisticOnionResource extends APIResource { /** diff --git a/src/resources/zones/settings/orange-to-orange.ts b/src/resources/zones/settings/orange-to-orange.ts index 843d383af3..2f1d703c30 100644 --- a/src/resources/zones/settings/orange-to-orange.ts +++ b/src/resources/zones/settings/orange-to-orange.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as OrangeToOrangeAPI from 'cloudflare/resources/zones/settings/orange-to-orange'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as OrangeToOrangeAPI from './orange-to-orange'; export class OrangeToOrangeResource extends APIResource { /** diff --git a/src/resources/zones/settings/origin-error-page-pass-thru.ts b/src/resources/zones/settings/origin-error-page-pass-thru.ts index 26e7bdbcd2..b79293b89c 100644 --- a/src/resources/zones/settings/origin-error-page-pass-thru.ts +++ b/src/resources/zones/settings/origin-error-page-pass-thru.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as OriginErrorPagePassThruAPI from 'cloudflare/resources/zones/settings/origin-error-page-pass-thru'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as OriginErrorPagePassThruAPI from './origin-error-page-pass-thru'; export class OriginErrorPagePassThruResource extends APIResource { /** diff --git a/src/resources/zones/settings/origin-max-http-version.ts b/src/resources/zones/settings/origin-max-http-version.ts index d2b949dac5..9d52b779c2 100644 --- a/src/resources/zones/settings/origin-max-http-version.ts +++ b/src/resources/zones/settings/origin-max-http-version.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as OriginMaxHTTPVersionAPI from 'cloudflare/resources/zones/settings/origin-max-http-version'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as OriginMaxHTTPVersionAPI from './origin-max-http-version'; export class OriginMaxHTTPVersionResource extends APIResource { /** diff --git a/src/resources/zones/settings/polish.ts b/src/resources/zones/settings/polish.ts index fda8a660b2..cfda1a61cc 100644 --- a/src/resources/zones/settings/polish.ts +++ b/src/resources/zones/settings/polish.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PolishAPI from 'cloudflare/resources/zones/settings/polish'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as PolishAPI from './polish'; export class PolishResource extends APIResource { /** diff --git a/src/resources/zones/settings/prefetch-preload.ts b/src/resources/zones/settings/prefetch-preload.ts index 50d271421b..c534df3377 100644 --- a/src/resources/zones/settings/prefetch-preload.ts +++ b/src/resources/zones/settings/prefetch-preload.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PrefetchPreloadAPI from 'cloudflare/resources/zones/settings/prefetch-preload'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as PrefetchPreloadAPI from './prefetch-preload'; export class PrefetchPreloadResource extends APIResource { /** diff --git a/src/resources/zones/settings/proxy-read-timeout.ts b/src/resources/zones/settings/proxy-read-timeout.ts index 9638208ffb..c6ee7919ad 100644 --- a/src/resources/zones/settings/proxy-read-timeout.ts +++ b/src/resources/zones/settings/proxy-read-timeout.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ProxyReadTimeoutAPI from 'cloudflare/resources/zones/settings/proxy-read-timeout'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ProxyReadTimeoutAPI from './proxy-read-timeout'; export class ProxyReadTimeoutResource extends APIResource { /** diff --git a/src/resources/zones/settings/pseudo-ipv4.ts b/src/resources/zones/settings/pseudo-ipv4.ts index 301957885a..8107cef41a 100644 --- a/src/resources/zones/settings/pseudo-ipv4.ts +++ b/src/resources/zones/settings/pseudo-ipv4.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as PseudoIPV4API from 'cloudflare/resources/zones/settings/pseudo-ipv4'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as PseudoIPV4API from './pseudo-ipv4'; export class PseudoIPV4Resource extends APIResource { /** diff --git a/src/resources/zones/settings/response-buffering.ts b/src/resources/zones/settings/response-buffering.ts index 8760e320df..30af26abc8 100644 --- a/src/resources/zones/settings/response-buffering.ts +++ b/src/resources/zones/settings/response-buffering.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ResponseBufferingAPI from 'cloudflare/resources/zones/settings/response-buffering'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ResponseBufferingAPI from './response-buffering'; export class ResponseBufferingResource extends APIResource { /** diff --git a/src/resources/zones/settings/rocket-loader.ts b/src/resources/zones/settings/rocket-loader.ts index 2b038e492d..d12dfc01f4 100644 --- a/src/resources/zones/settings/rocket-loader.ts +++ b/src/resources/zones/settings/rocket-loader.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as RocketLoaderAPI from 'cloudflare/resources/zones/settings/rocket-loader'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as RocketLoaderAPI from './rocket-loader'; export class RocketLoaderResource extends APIResource { /** diff --git a/src/resources/zones/settings/security-headers.ts b/src/resources/zones/settings/security-headers.ts index 9b93c0c681..ccfe18082d 100644 --- a/src/resources/zones/settings/security-headers.ts +++ b/src/resources/zones/settings/security-headers.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SecurityHeadersAPI from 'cloudflare/resources/zones/settings/security-headers'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as SecurityHeadersAPI from './security-headers'; export class SecurityHeaders extends APIResource { /** diff --git a/src/resources/zones/settings/security-level.ts b/src/resources/zones/settings/security-level.ts index e094b01298..4c62b076d4 100644 --- a/src/resources/zones/settings/security-level.ts +++ b/src/resources/zones/settings/security-level.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SecurityLevelAPI from 'cloudflare/resources/zones/settings/security-level'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as SecurityLevelAPI from './security-level'; export class SecurityLevelResource extends APIResource { /** diff --git a/src/resources/zones/settings/server-side-excludes.ts b/src/resources/zones/settings/server-side-excludes.ts index a8eb546d0f..20d5fc151a 100644 --- a/src/resources/zones/settings/server-side-excludes.ts +++ b/src/resources/zones/settings/server-side-excludes.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ServerSideExcludesAPI from 'cloudflare/resources/zones/settings/server-side-excludes'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ServerSideExcludesAPI from './server-side-excludes'; export class ServerSideExcludes extends APIResource { /** diff --git a/src/resources/zones/settings/settings.ts b/src/resources/zones/settings/settings.ts index 55f069650d..b4cc18b021 100644 --- a/src/resources/zones/settings/settings.ts +++ b/src/resources/zones/settings/settings.ts @@ -1,57 +1,57 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from 'cloudflare/resource'; -import * as AdvancedDDoSAPI from 'cloudflare/resources/zones/settings/advanced-ddos'; -import * as AlwaysOnlineAPI from 'cloudflare/resources/zones/settings/always-online'; -import * as AlwaysUseHTTPSAPI from 'cloudflare/resources/zones/settings/always-use-https'; -import * as AutomaticHTTPSRewritesAPI from 'cloudflare/resources/zones/settings/automatic-https-rewrites'; -import * as AutomaticPlatformOptimizationAPI from 'cloudflare/resources/zones/settings/automatic-platform-optimization'; -import * as BrotliAPI from 'cloudflare/resources/zones/settings/brotli'; -import * as BrowserCacheTTLAPI from 'cloudflare/resources/zones/settings/browser-cache-ttl'; -import * as BrowserCheckAPI from 'cloudflare/resources/zones/settings/browser-check'; -import * as CacheLevelAPI from 'cloudflare/resources/zones/settings/cache-level'; -import * as ChallengeTTLAPI from 'cloudflare/resources/zones/settings/challenge-ttl'; -import * as CiphersAPI from 'cloudflare/resources/zones/settings/ciphers'; -import * as DevelopmentModeAPI from 'cloudflare/resources/zones/settings/development-mode'; -import * as EarlyHintsAPI from 'cloudflare/resources/zones/settings/early-hints'; -import * as EmailObfuscationAPI from 'cloudflare/resources/zones/settings/email-obfuscation'; -import * as FontSettingsAPI from 'cloudflare/resources/zones/settings/font-settings'; -import * as H2PrioritizationAPI from 'cloudflare/resources/zones/settings/h2-prioritization'; -import * as HotlinkProtectionAPI from 'cloudflare/resources/zones/settings/hotlink-protection'; -import * as HTTP2API from 'cloudflare/resources/zones/settings/http2'; -import * as HTTP3API from 'cloudflare/resources/zones/settings/http3'; -import * as ImageResizingAPI from 'cloudflare/resources/zones/settings/image-resizing'; -import * as IPGeolocationAPI from 'cloudflare/resources/zones/settings/ip-geolocation'; -import * as IPV6API from 'cloudflare/resources/zones/settings/ipv6'; -import * as MinTLSVersionAPI from 'cloudflare/resources/zones/settings/min-tls-version'; -import * as MinifyAPI from 'cloudflare/resources/zones/settings/minify'; -import * as MirageAPI from 'cloudflare/resources/zones/settings/mirage'; -import * as MobileRedirectAPI from 'cloudflare/resources/zones/settings/mobile-redirect'; -import * as NELAPI from 'cloudflare/resources/zones/settings/nel'; -import * as OpportunisticEncryptionAPI from 'cloudflare/resources/zones/settings/opportunistic-encryption'; -import * as OpportunisticOnionAPI from 'cloudflare/resources/zones/settings/opportunistic-onion'; -import * as OrangeToOrangeAPI from 'cloudflare/resources/zones/settings/orange-to-orange'; -import * as OriginErrorPagePassThruAPI from 'cloudflare/resources/zones/settings/origin-error-page-pass-thru'; -import * as OriginMaxHTTPVersionAPI from 'cloudflare/resources/zones/settings/origin-max-http-version'; -import * as PolishAPI from 'cloudflare/resources/zones/settings/polish'; -import * as PrefetchPreloadAPI from 'cloudflare/resources/zones/settings/prefetch-preload'; -import * as ProxyReadTimeoutAPI from 'cloudflare/resources/zones/settings/proxy-read-timeout'; -import * as PseudoIPV4API from 'cloudflare/resources/zones/settings/pseudo-ipv4'; -import * as ResponseBufferingAPI from 'cloudflare/resources/zones/settings/response-buffering'; -import * as RocketLoaderAPI from 'cloudflare/resources/zones/settings/rocket-loader'; -import * as SecurityHeadersAPI from 'cloudflare/resources/zones/settings/security-headers'; -import * as SecurityLevelAPI from 'cloudflare/resources/zones/settings/security-level'; -import * as ServerSideExcludesAPI from 'cloudflare/resources/zones/settings/server-side-excludes'; -import * as SortQueryStringForCacheAPI from 'cloudflare/resources/zones/settings/sort-query-string-for-cache'; -import * as SSLAPI from 'cloudflare/resources/zones/settings/ssl'; -import * as SSLRecommenderAPI from 'cloudflare/resources/zones/settings/ssl-recommender'; -import * as TLS1_3API from 'cloudflare/resources/zones/settings/tls-1-3'; -import * as TLSClientAuthAPI from 'cloudflare/resources/zones/settings/tls-client-auth'; -import * as TrueClientIPHeaderAPI from 'cloudflare/resources/zones/settings/true-client-ip-header'; -import * as WAFAPI from 'cloudflare/resources/zones/settings/waf'; -import * as WebPAPI from 'cloudflare/resources/zones/settings/webp'; -import * as WebsocketAPI from 'cloudflare/resources/zones/settings/websocket'; -import * as ZeroRTTAPI from 'cloudflare/resources/zones/settings/zero-rtt'; +import { APIResource } from '../../../resource'; +import * as AdvancedDDoSAPI from './advanced-ddos'; +import * as AlwaysOnlineAPI from './always-online'; +import * as AlwaysUseHTTPSAPI from './always-use-https'; +import * as AutomaticHTTPSRewritesAPI from './automatic-https-rewrites'; +import * as AutomaticPlatformOptimizationAPI from './automatic-platform-optimization'; +import * as BrotliAPI from './brotli'; +import * as BrowserCacheTTLAPI from './browser-cache-ttl'; +import * as BrowserCheckAPI from './browser-check'; +import * as CacheLevelAPI from './cache-level'; +import * as ChallengeTTLAPI from './challenge-ttl'; +import * as CiphersAPI from './ciphers'; +import * as DevelopmentModeAPI from './development-mode'; +import * as EarlyHintsAPI from './early-hints'; +import * as EmailObfuscationAPI from './email-obfuscation'; +import * as FontSettingsAPI from './font-settings'; +import * as H2PrioritizationAPI from './h2-prioritization'; +import * as HotlinkProtectionAPI from './hotlink-protection'; +import * as HTTP2API from './http2'; +import * as HTTP3API from './http3'; +import * as ImageResizingAPI from './image-resizing'; +import * as IPGeolocationAPI from './ip-geolocation'; +import * as IPV6API from './ipv6'; +import * as MinTLSVersionAPI from './min-tls-version'; +import * as MinifyAPI from './minify'; +import * as MirageAPI from './mirage'; +import * as MobileRedirectAPI from './mobile-redirect'; +import * as NELAPI from './nel'; +import * as OpportunisticEncryptionAPI from './opportunistic-encryption'; +import * as OpportunisticOnionAPI from './opportunistic-onion'; +import * as OrangeToOrangeAPI from './orange-to-orange'; +import * as OriginErrorPagePassThruAPI from './origin-error-page-pass-thru'; +import * as OriginMaxHTTPVersionAPI from './origin-max-http-version'; +import * as PolishAPI from './polish'; +import * as PrefetchPreloadAPI from './prefetch-preload'; +import * as ProxyReadTimeoutAPI from './proxy-read-timeout'; +import * as PseudoIPV4API from './pseudo-ipv4'; +import * as ResponseBufferingAPI from './response-buffering'; +import * as RocketLoaderAPI from './rocket-loader'; +import * as SecurityHeadersAPI from './security-headers'; +import * as SecurityLevelAPI from './security-level'; +import * as ServerSideExcludesAPI from './server-side-excludes'; +import * as SortQueryStringForCacheAPI from './sort-query-string-for-cache'; +import * as SSLAPI from './ssl'; +import * as SSLRecommenderAPI from './ssl-recommender'; +import * as TLS1_3API from './tls-1-3'; +import * as TLSClientAuthAPI from './tls-client-auth'; +import * as TrueClientIPHeaderAPI from './true-client-ip-header'; +import * as WAFAPI from './waf'; +import * as WebPAPI from './webp'; +import * as WebsocketAPI from './websocket'; +import * as ZeroRTTAPI from './zero-rtt'; export class Settings extends APIResource { zeroRTT: ZeroRTTAPI.ZeroRTTResource = new ZeroRTTAPI.ZeroRTTResource(this._client); diff --git a/src/resources/zones/settings/sort-query-string-for-cache.ts b/src/resources/zones/settings/sort-query-string-for-cache.ts index c4ff52b5fb..4bc804d4c6 100644 --- a/src/resources/zones/settings/sort-query-string-for-cache.ts +++ b/src/resources/zones/settings/sort-query-string-for-cache.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SortQueryStringForCacheAPI from 'cloudflare/resources/zones/settings/sort-query-string-for-cache'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as SortQueryStringForCacheAPI from './sort-query-string-for-cache'; export class SortQueryStringForCacheResource extends APIResource { /** diff --git a/src/resources/zones/settings/ssl-recommender.ts b/src/resources/zones/settings/ssl-recommender.ts index 0042f97c25..841db251a4 100644 --- a/src/resources/zones/settings/ssl-recommender.ts +++ b/src/resources/zones/settings/ssl-recommender.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SSLRecommenderAPI from 'cloudflare/resources/zones/settings/ssl-recommender'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as SSLRecommenderAPI from './ssl-recommender'; export class SSLRecommenderResource extends APIResource { /** diff --git a/src/resources/zones/settings/ssl.ts b/src/resources/zones/settings/ssl.ts index 58a508ec21..d8d0571039 100644 --- a/src/resources/zones/settings/ssl.ts +++ b/src/resources/zones/settings/ssl.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as SSLAPI from 'cloudflare/resources/zones/settings/ssl'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as SSLAPI from './ssl'; export class SSLResource extends APIResource { /** diff --git a/src/resources/zones/settings/tls-1-3.ts b/src/resources/zones/settings/tls-1-3.ts index 162ada8b08..a314697948 100644 --- a/src/resources/zones/settings/tls-1-3.ts +++ b/src/resources/zones/settings/tls-1-3.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as TLS1_3API from 'cloudflare/resources/zones/settings/tls-1-3'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as TLS1_3API from './tls-1-3'; export class TLS1_3Resource extends APIResource { /** diff --git a/src/resources/zones/settings/tls-client-auth.ts b/src/resources/zones/settings/tls-client-auth.ts index 7ac546b587..b625a7400b 100644 --- a/src/resources/zones/settings/tls-client-auth.ts +++ b/src/resources/zones/settings/tls-client-auth.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as TLSClientAuthAPI from 'cloudflare/resources/zones/settings/tls-client-auth'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as TLSClientAuthAPI from './tls-client-auth'; export class TLSClientAuthResource extends APIResource { /** diff --git a/src/resources/zones/settings/true-client-ip-header.ts b/src/resources/zones/settings/true-client-ip-header.ts index f34f55e618..098bc34a52 100644 --- a/src/resources/zones/settings/true-client-ip-header.ts +++ b/src/resources/zones/settings/true-client-ip-header.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as TrueClientIPHeaderAPI from 'cloudflare/resources/zones/settings/true-client-ip-header'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as TrueClientIPHeaderAPI from './true-client-ip-header'; export class TrueClientIPHeaderResource extends APIResource { /** diff --git a/src/resources/zones/settings/waf.ts b/src/resources/zones/settings/waf.ts index 459d210cdf..3ec78e45b9 100644 --- a/src/resources/zones/settings/waf.ts +++ b/src/resources/zones/settings/waf.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as WAFAPI from 'cloudflare/resources/zones/settings/waf'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as WAFAPI from './waf'; export class WAFResource extends APIResource { /** diff --git a/src/resources/zones/settings/webp.ts b/src/resources/zones/settings/webp.ts index 26750b2016..1f0e75eabe 100644 --- a/src/resources/zones/settings/webp.ts +++ b/src/resources/zones/settings/webp.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as WebPAPI from 'cloudflare/resources/zones/settings/webp'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as WebPAPI from './webp'; export class WebPResource extends APIResource { /** diff --git a/src/resources/zones/settings/websocket.ts b/src/resources/zones/settings/websocket.ts index 9324650b69..e515d8d9c0 100644 --- a/src/resources/zones/settings/websocket.ts +++ b/src/resources/zones/settings/websocket.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as WebsocketAPI from 'cloudflare/resources/zones/settings/websocket'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as WebsocketAPI from './websocket'; export class WebsocketResource extends APIResource { /** diff --git a/src/resources/zones/settings/zero-rtt.ts b/src/resources/zones/settings/zero-rtt.ts index 8ac7ecd097..c669530b52 100644 --- a/src/resources/zones/settings/zero-rtt.ts +++ b/src/resources/zones/settings/zero-rtt.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ZeroRTTAPI from 'cloudflare/resources/zones/settings/zero-rtt'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as ZeroRTTAPI from './zero-rtt'; export class ZeroRTTResource extends APIResource { /** diff --git a/src/resources/zones/subscriptions.ts b/src/resources/zones/subscriptions.ts index e7ea80acba..d108b53a43 100644 --- a/src/resources/zones/subscriptions.ts +++ b/src/resources/zones/subscriptions.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import * as ZonesSubscriptionsAPI from 'cloudflare/resources/zones/subscriptions'; -import * as SubscriptionsAPI from 'cloudflare/resources/user/subscriptions'; -import { SubscriptionsSinglePage } from 'cloudflare/resources/user/subscriptions'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as ZonesSubscriptionsAPI from './subscriptions'; +import * as SubscriptionsAPI from '../user/subscriptions'; +import { SubscriptionsSinglePage } from '../user/subscriptions'; export class Subscriptions extends APIResource { /** diff --git a/src/resources/zones/zones.ts b/src/resources/zones/zones.ts index a4251d48bd..fe070e3b4e 100644 --- a/src/resources/zones/zones.ts +++ b/src/resources/zones/zones.ts @@ -1,15 +1,15 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; -import { APIResource } from 'cloudflare/resource'; -import { isRequestOptions } from 'cloudflare/core'; -import * as ActivationCheckAPI from 'cloudflare/resources/zones/activation-check'; -import * as CustomNameserversAPI from 'cloudflare/resources/zones/custom-nameservers'; -import * as DNSSettingsAPI from 'cloudflare/resources/zones/dns-settings'; -import * as HoldsAPI from 'cloudflare/resources/zones/holds'; -import * as SubscriptionsAPI from 'cloudflare/resources/zones/subscriptions'; -import * as SettingsAPI from 'cloudflare/resources/zones/settings/settings'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import * as ActivationCheckAPI from './activation-check'; +import * as CustomNameserversAPI from './custom-nameservers'; +import * as DNSSettingsAPI from './dns-settings'; +import * as HoldsAPI from './holds'; +import * as SubscriptionsAPI from './subscriptions'; +import * as SettingsAPI from './settings/settings'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class Zones extends APIResource { activationCheck: ActivationCheckAPI.ActivationCheck = new ActivationCheckAPI.ActivationCheck(this._client); From 5a50a1df24ea6acf929c2d13ae7ec970a4d60333 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 23:54:21 +0000 Subject: [PATCH 024/473] feat(api): update via SDK Studio (#521) --- .stats.yml | 2 +- api.md | 17 ++ src/resources/magic-transit/connectors.ts | 280 ++++++++++++++++++ src/resources/magic-transit/index.ts | 12 + src/resources/magic-transit/magic-transit.ts | 12 + src/resources/zero-trust/access/access.ts | 1 + src/resources/zero-trust/access/index.ts | 1 + .../zero-trust/access/service-tokens.ts | 55 ++++ .../magic-transit/connectors.test.ts | 86 ++++++ .../zero-trust/access/service-tokens.test.ts | 15 + 10 files changed, 480 insertions(+), 1 deletion(-) create mode 100644 src/resources/magic-transit/connectors.ts create mode 100644 tests/api-resources/magic-transit/connectors.test.ts diff --git a/.stats.yml b/.stats.yml index 54ae329193..9c05255519 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1281 +configured_endpoints: 1286 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9a8e3aedb1193065fd84ae0b74a4a4c2d217ff2a821096f825a7798bbb921d76.yml diff --git a/api.md b/api.md index 14088f7a76..5216a7e507 100644 --- a/api.md +++ b/api.md @@ -3400,6 +3400,22 @@ Methods: - client.magicTransit.sites.wans.delete(siteId, wanId, { ...params }) -> WAN - client.magicTransit.sites.wans.get(siteId, wanId, { ...params }) -> WAN +## Connectors + +Types: + +- ConnectorUpdateResponse +- ConnectorListResponse +- ConnectorEditResponse +- ConnectorGetResponse + +Methods: + +- client.magicTransit.connectors.update(connectorId, { ...params }) -> ConnectorUpdateResponse +- client.magicTransit.connectors.list({ ...params }) -> ConnectorListResponsesSinglePage +- client.magicTransit.connectors.edit(connectorId, { ...params }) -> ConnectorEditResponse +- client.magicTransit.connectors.get(connectorId, { ...params }) -> ConnectorGetResponse + # MagicNetworkMonitoring ## Configs @@ -4536,6 +4552,7 @@ Methods: - client.zeroTrust.access.serviceTokens.update(uuid, { ...params }) -> ServiceToken - client.zeroTrust.access.serviceTokens.list({ ...params }) -> ServiceTokensSinglePage - client.zeroTrust.access.serviceTokens.delete(uuid, { ...params }) -> ServiceToken +- client.zeroTrust.access.serviceTokens.get(uuid, { ...params }) -> ServiceToken - client.zeroTrust.access.serviceTokens.refresh(identifier, uuid) -> ServiceToken - client.zeroTrust.access.serviceTokens.rotate(identifier, uuid) -> ServiceTokenRotateResponse diff --git a/src/resources/magic-transit/connectors.ts b/src/resources/magic-transit/connectors.ts new file mode 100644 index 0000000000..638027f693 --- /dev/null +++ b/src/resources/magic-transit/connectors.ts @@ -0,0 +1,280 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as ConnectorsAPI from './connectors'; +import { SinglePage } from '../../pagination'; + +export class Connectors extends APIResource { + /** + * Replace Connector + */ + update( + connectorId: string, + params: ConnectorUpdateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.put(`/accounts/${account_id}/magic/connectors/${connectorId}`, { + body, + ...options, + }) as Core.APIPromise<{ result: ConnectorUpdateResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * List Connectors + */ + list( + params: ConnectorListParams, + options?: Core.RequestOptions, + ): Core.PagePromise { + const { account_id } = params; + return this._client.getAPIList( + `/accounts/${account_id}/magic/connectors`, + ConnectorListResponsesSinglePage, + options, + ); + } + + /** + * Update Connector + */ + edit( + connectorId: string, + params: ConnectorEditParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.patch(`/accounts/${account_id}/magic/connectors/${connectorId}`, { + body, + ...options, + }) as Core.APIPromise<{ result: ConnectorEditResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Fetch Connector + */ + get( + connectorId: string, + params: ConnectorGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.get( + `/accounts/${account_id}/magic/connectors/${connectorId}`, + options, + ) as Core.APIPromise<{ result: ConnectorGetResponse }> + )._thenUnwrap((obj) => obj.result); + } +} + +export class ConnectorListResponsesSinglePage extends SinglePage {} + +export interface ConnectorUpdateResponse { + id: string; + + activated: boolean; + + interrupt_window_duration_hours: number; + + interrupt_window_hour_of_day: number; + + last_updated: string; + + notes: string; + + timezone: string; + + device?: ConnectorUpdateResponse.Device; + + last_heartbeat?: string; + + last_seen_version?: string; +} + +export namespace ConnectorUpdateResponse { + export interface Device { + id: string; + + serial_number?: string; + } +} + +export interface ConnectorListResponse { + id: string; + + activated: boolean; + + interrupt_window_duration_hours: number; + + interrupt_window_hour_of_day: number; + + last_updated: string; + + notes: string; + + timezone: string; + + device?: ConnectorListResponse.Device; + + last_heartbeat?: string; + + last_seen_version?: string; +} + +export namespace ConnectorListResponse { + export interface Device { + id: string; + + serial_number?: string; + } +} + +export interface ConnectorEditResponse { + id: string; + + activated: boolean; + + interrupt_window_duration_hours: number; + + interrupt_window_hour_of_day: number; + + last_updated: string; + + notes: string; + + timezone: string; + + device?: ConnectorEditResponse.Device; + + last_heartbeat?: string; + + last_seen_version?: string; +} + +export namespace ConnectorEditResponse { + export interface Device { + id: string; + + serial_number?: string; + } +} + +export interface ConnectorGetResponse { + id: string; + + activated: boolean; + + interrupt_window_duration_hours: number; + + interrupt_window_hour_of_day: number; + + last_updated: string; + + notes: string; + + timezone: string; + + device?: ConnectorGetResponse.Device; + + last_heartbeat?: string; + + last_seen_version?: string; +} + +export namespace ConnectorGetResponse { + export interface Device { + id: string; + + serial_number?: string; + } +} + +export interface ConnectorUpdateParams { + /** + * Path param: + */ + account_id: number; + + /** + * Body param: + */ + activated?: boolean; + + /** + * Body param: + */ + interrupt_window_duration_hours?: number; + + /** + * Body param: + */ + interrupt_window_hour_of_day?: number; + + /** + * Body param: + */ + notes?: string; + + /** + * Body param: + */ + timezone?: string; +} + +export interface ConnectorListParams { + account_id: number; +} + +export interface ConnectorEditParams { + /** + * Path param: + */ + account_id: number; + + /** + * Body param: + */ + activated?: boolean; + + /** + * Body param: + */ + interrupt_window_duration_hours?: number; + + /** + * Body param: + */ + interrupt_window_hour_of_day?: number; + + /** + * Body param: + */ + notes?: string; + + /** + * Body param: + */ + timezone?: string; +} + +export interface ConnectorGetParams { + account_id: number; +} + +export namespace Connectors { + export import ConnectorUpdateResponse = ConnectorsAPI.ConnectorUpdateResponse; + export import ConnectorListResponse = ConnectorsAPI.ConnectorListResponse; + export import ConnectorEditResponse = ConnectorsAPI.ConnectorEditResponse; + export import ConnectorGetResponse = ConnectorsAPI.ConnectorGetResponse; + export import ConnectorListResponsesSinglePage = ConnectorsAPI.ConnectorListResponsesSinglePage; + export import ConnectorUpdateParams = ConnectorsAPI.ConnectorUpdateParams; + export import ConnectorListParams = ConnectorsAPI.ConnectorListParams; + export import ConnectorEditParams = ConnectorsAPI.ConnectorEditParams; + export import ConnectorGetParams = ConnectorsAPI.ConnectorGetParams; +} diff --git a/src/resources/magic-transit/index.ts b/src/resources/magic-transit/index.ts index 41ebcbb761..1caa622a1e 100644 --- a/src/resources/magic-transit/index.ts +++ b/src/resources/magic-transit/index.ts @@ -9,6 +9,18 @@ export { CfInterconnectGetParams, CfInterconnects, } from './cf-interconnects'; +export { + ConnectorUpdateResponse, + ConnectorListResponse, + ConnectorEditResponse, + ConnectorGetResponse, + ConnectorUpdateParams, + ConnectorListParams, + ConnectorEditParams, + ConnectorGetParams, + ConnectorListResponsesSinglePage, + Connectors, +} from './connectors'; export { GRETunnelCreateResponse, GRETunnelUpdateResponse, diff --git a/src/resources/magic-transit/magic-transit.ts b/src/resources/magic-transit/magic-transit.ts index 3489ec3379..1d29fb2d2e 100644 --- a/src/resources/magic-transit/magic-transit.ts +++ b/src/resources/magic-transit/magic-transit.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../resource'; import * as CfInterconnectsAPI from './cf-interconnects'; +import * as ConnectorsAPI from './connectors'; import * as GRETunnelsAPI from './gre-tunnels'; import * as IPSECTunnelsAPI from './ipsec-tunnels'; import * as RoutesAPI from './routes'; @@ -13,6 +14,7 @@ export class MagicTransit extends APIResource { ipsecTunnels: IPSECTunnelsAPI.IPSECTunnels = new IPSECTunnelsAPI.IPSECTunnels(this._client); routes: RoutesAPI.Routes = new RoutesAPI.Routes(this._client); sites: SitesAPI.Sites = new SitesAPI.Sites(this._client); + connectors: ConnectorsAPI.Connectors = new ConnectorsAPI.Connectors(this._client); } export interface HealthCheck { @@ -163,4 +165,14 @@ export namespace MagicTransit { export import SiteListParams = SitesAPI.SiteListParams; export import SiteDeleteParams = SitesAPI.SiteDeleteParams; export import SiteGetParams = SitesAPI.SiteGetParams; + export import Connectors = ConnectorsAPI.Connectors; + export import ConnectorUpdateResponse = ConnectorsAPI.ConnectorUpdateResponse; + export import ConnectorListResponse = ConnectorsAPI.ConnectorListResponse; + export import ConnectorEditResponse = ConnectorsAPI.ConnectorEditResponse; + export import ConnectorGetResponse = ConnectorsAPI.ConnectorGetResponse; + export import ConnectorListResponsesSinglePage = ConnectorsAPI.ConnectorListResponsesSinglePage; + export import ConnectorUpdateParams = ConnectorsAPI.ConnectorUpdateParams; + export import ConnectorListParams = ConnectorsAPI.ConnectorListParams; + export import ConnectorEditParams = ConnectorsAPI.ConnectorEditParams; + export import ConnectorGetParams = ConnectorsAPI.ConnectorGetParams; } diff --git a/src/resources/zero-trust/access/access.ts b/src/resources/zero-trust/access/access.ts index 21b968ae43..d45a705f08 100644 --- a/src/resources/zero-trust/access/access.ts +++ b/src/resources/zero-trust/access/access.ts @@ -781,6 +781,7 @@ export namespace Access { export import ServiceTokenUpdateParams = ServiceTokensAPI.ServiceTokenUpdateParams; export import ServiceTokenListParams = ServiceTokensAPI.ServiceTokenListParams; export import ServiceTokenDeleteParams = ServiceTokensAPI.ServiceTokenDeleteParams; + export import ServiceTokenGetParams = ServiceTokensAPI.ServiceTokenGetParams; export import Bookmarks = BookmarksAPI.Bookmarks; export import Bookmark = BookmarksAPI.Bookmark; export import BookmarkDeleteResponse = BookmarksAPI.BookmarkDeleteResponse; diff --git a/src/resources/zero-trust/access/index.ts b/src/resources/zero-trust/access/index.ts index a1740c63b5..c701f3e8c9 100644 --- a/src/resources/zero-trust/access/index.ts +++ b/src/resources/zero-trust/access/index.ts @@ -93,6 +93,7 @@ export { ServiceTokenUpdateParams, ServiceTokenListParams, ServiceTokenDeleteParams, + ServiceTokenGetParams, ServiceTokensSinglePage, ServiceTokens, } from './service-tokens'; diff --git a/src/resources/zero-trust/access/service-tokens.ts b/src/resources/zero-trust/access/service-tokens.ts index cd0725835e..6d1d0e7e30 100644 --- a/src/resources/zero-trust/access/service-tokens.ts +++ b/src/resources/zero-trust/access/service-tokens.ts @@ -156,6 +156,48 @@ export class ServiceTokens extends APIResource { )._thenUnwrap((obj) => obj.result); } + /** + * Fetches a single service token. + */ + get( + uuid: string, + params?: ServiceTokenGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise; + get(uuid: string, options?: Core.RequestOptions): Core.APIPromise; + get( + uuid: string, + params: ServiceTokenGetParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(params)) { + return this.get(uuid, {}, params); + } + const { account_id, zone_id } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.get( + `/${accountOrZone}/${accountOrZoneId}/access/service_tokens/${uuid}`, + options, + ) as Core.APIPromise<{ result: ServiceToken }> + )._thenUnwrap((obj) => obj.result); + } + /** * Refreshes the expiration of a service token. */ @@ -362,6 +404,18 @@ export interface ServiceTokenDeleteParams { zone_id?: string; } +export interface ServiceTokenGetParams { + /** + * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + */ + account_id?: string; + + /** + * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + */ + zone_id?: string; +} + export namespace ServiceTokens { export import ServiceToken = ServiceTokensAPI.ServiceToken; export import ServiceTokenCreateResponse = ServiceTokensAPI.ServiceTokenCreateResponse; @@ -371,4 +425,5 @@ export namespace ServiceTokens { export import ServiceTokenUpdateParams = ServiceTokensAPI.ServiceTokenUpdateParams; export import ServiceTokenListParams = ServiceTokensAPI.ServiceTokenListParams; export import ServiceTokenDeleteParams = ServiceTokensAPI.ServiceTokenDeleteParams; + export import ServiceTokenGetParams = ServiceTokensAPI.ServiceTokenGetParams; } diff --git a/tests/api-resources/magic-transit/connectors.test.ts b/tests/api-resources/magic-transit/connectors.test.ts new file mode 100644 index 0000000000..031e0cb122 --- /dev/null +++ b/tests/api-resources/magic-transit/connectors.test.ts @@ -0,0 +1,86 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource connectors', () => { + test('update: only required params', async () => { + const responsePromise = cloudflare.magicTransit.connectors.update('string', { account_id: 0 }); + 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('update: required and optional params', async () => { + const response = await cloudflare.magicTransit.connectors.update('string', { + account_id: 0, + activated: true, + interrupt_window_duration_hours: 0, + interrupt_window_hour_of_day: 0, + notes: 'string', + timezone: 'string', + }); + }); + + test('list: only required params', async () => { + const responsePromise = cloudflare.magicTransit.connectors.list({ account_id: 0 }); + 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('list: required and optional params', async () => { + const response = await cloudflare.magicTransit.connectors.list({ account_id: 0 }); + }); + + test('edit: only required params', async () => { + const responsePromise = cloudflare.magicTransit.connectors.edit('string', { account_id: 0 }); + 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('edit: required and optional params', async () => { + const response = await cloudflare.magicTransit.connectors.edit('string', { + account_id: 0, + activated: true, + interrupt_window_duration_hours: 0, + interrupt_window_hour_of_day: 0, + notes: 'string', + timezone: 'string', + }); + }); + + test('get: only required params', async () => { + const responsePromise = cloudflare.magicTransit.connectors.get('string', { account_id: 0 }); + 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('get: required and optional params', async () => { + const response = await cloudflare.magicTransit.connectors.get('string', { account_id: 0 }); + }); +}); diff --git a/tests/api-resources/zero-trust/access/service-tokens.test.ts b/tests/api-resources/zero-trust/access/service-tokens.test.ts index f457976e73..cdaa6d5da8 100644 --- a/tests/api-resources/zero-trust/access/service-tokens.test.ts +++ b/tests/api-resources/zero-trust/access/service-tokens.test.ts @@ -76,6 +76,21 @@ describe('resource serviceTokens', () => { expect(dataAndResponse.response).toBe(rawResponse); }); + // TODO: investigate broken test + test.skip('get', async () => { + const responsePromise = cloudflare.zeroTrust.access.serviceTokens.get( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: 'string' }, + ); + 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('refresh', async () => { const responsePromise = cloudflare.zeroTrust.access.serviceTokens.refresh( '023e105f4ecef8ad9ca31a8372d0c353', From e4ed6e16df101dda02cdee601efa96616cc2df72 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 09:07:41 +0000 Subject: [PATCH 025/473] feat(api): OpenAPI spec update via Stainless API (#522) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9c05255519..df7001ada9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9a8e3aedb1193065fd84ae0b74a4a4c2d217ff2a821096f825a7798bbb921d76.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-692cc74e438a991e1707d4b34506e3e8a0427a396d4d48be41f8cc979b2ac63b.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 0d1789a1ed5fefff3b104e0c0b37da8a48b4c9d9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 10:28:45 +0000 Subject: [PATCH 026/473] feat(api): OpenAPI spec update via Stainless API (#523) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index df7001ada9..7dfe322054 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-692cc74e438a991e1707d4b34506e3e8a0427a396d4d48be41f8cc979b2ac63b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-839600a13efe864362aeb0940c721ebf4bbace7a23853dc24da23e029dc06116.yml From 6f71eea2e07d05b1747f346439fed9af4f2157eb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 10:33:34 +0000 Subject: [PATCH 027/473] feat(api): OpenAPI spec update via Stainless API (#524) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 7dfe322054..df7001ada9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-839600a13efe864362aeb0940c721ebf4bbace7a23853dc24da23e029dc06116.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-692cc74e438a991e1707d4b34506e3e8a0427a396d4d48be41f8cc979b2ac63b.yml From bde283247ab73a73eadea69e27869fa4383c75d4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 10:56:58 +0000 Subject: [PATCH 028/473] feat(api): OpenAPI spec update via Stainless API (#525) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index df7001ada9..9c05255519 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-692cc74e438a991e1707d4b34506e3e8a0427a396d4d48be41f8cc979b2ac63b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9a8e3aedb1193065fd84ae0b74a4a4c2d217ff2a821096f825a7798bbb921d76.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 9845caaed5aa3f2ee1dbbf35884e47967093a8e4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 13:53:46 +0000 Subject: [PATCH 029/473] feat(api): OpenAPI spec update via Stainless API (#526) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9c05255519..35ae45dbcc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9a8e3aedb1193065fd84ae0b74a4a4c2d217ff2a821096f825a7798bbb921d76.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b643703b1659c3d33bcd4e748112bf350949fb6b15f6b6a8844785a8b938fd42.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From f3dcdfe4a0573253537ff4ef5cf849202454dc4b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 15:05:14 +0000 Subject: [PATCH 030/473] feat(api): OpenAPI spec update via Stainless API (#527) --- .github/workflows/ci.yml | 6 ++--- .stats.yml | 2 +- scripts/format | 8 +++++++ scripts/lint | 1 + scripts/test | 1 - .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 8 files changed, 33 insertions(+), 51 deletions(-) create mode 100755 scripts/format diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf0fa14841..bd75854513 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,12 +22,10 @@ jobs: node-version: '18' - name: Install dependencies - run: | - yarn install + run: yarn install - name: Check types - run: | - yarn build + run: ./scripts/lint test: name: test runs-on: ubuntu-latest diff --git a/.stats.yml b/.stats.yml index 35ae45dbcc..32196e3573 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b643703b1659c3d33bcd4e748112bf350949fb6b15f6b6a8844785a8b938fd42.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6629e066ac9e64b63617ec7ff5282f92c8ca3418ca069ab7cdc26786f14a7d96.yml diff --git a/scripts/format b/scripts/format new file mode 100755 index 0000000000..d297e762f6 --- /dev/null +++ b/scripts/format @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -e + +cd "$(dirname "$0")/.." + +echo "==> Running eslint --fix" +./node_modules/.bin/eslint --fix --ext ts,js . diff --git a/scripts/lint b/scripts/lint index 4f05d6609d..6b0e5dc3eb 100755 --- a/scripts/lint +++ b/scripts/lint @@ -4,4 +4,5 @@ set -e cd "$(dirname "$0")/.." +echo "==> Running eslint" ./node_modules/.bin/eslint --ext ts,js . diff --git a/scripts/test b/scripts/test index b62a7cccd5..2049e31b03 100755 --- a/scripts/test +++ b/scripts/test @@ -52,6 +52,5 @@ else echo fi -# Run tests echo "==> Running tests" ./node_modules/.bin/jest "$@" diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From e28cc5389374bef3e4a879dc58a1a4658418b91c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 15:47:10 +0000 Subject: [PATCH 031/473] feat(api): OpenAPI spec update via Stainless API (#528) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 32196e3573..9423f83587 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6629e066ac9e64b63617ec7ff5282f92c8ca3418ca069ab7cdc26786f14a7d96.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-69dd99f11f147729f5d95e3bcdee62057f64921f5f034ffac45948c8402697d2.yml From c5f26f280db9c6317194ad756a74957d523acd7f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 15:49:57 +0000 Subject: [PATCH 032/473] feat(api): OpenAPI spec update via Stainless API (#529) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9423f83587..17d7da2f44 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-69dd99f11f147729f5d95e3bcdee62057f64921f5f034ffac45948c8402697d2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5a44a591dcd3f86f8878df473e944d1aa38570cfd6fe4d3b0d2129daa5d94fb0.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 22bc28aa9e55ec7c08fe1390dd724a34529f4be2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 17:21:40 +0000 Subject: [PATCH 033/473] feat(api): OpenAPI spec update via Stainless API (#530) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 17d7da2f44..9423f83587 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5a44a591dcd3f86f8878df473e944d1aa38570cfd6fe4d3b0d2129daa5d94fb0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-69dd99f11f147729f5d95e3bcdee62057f64921f5f034ffac45948c8402697d2.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From fa5974e2b6262d2aaded536d5f85c930ee1e4fe2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 17:24:12 +0000 Subject: [PATCH 034/473] feat(api): OpenAPI spec update via Stainless API (#531) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9423f83587..17d7da2f44 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-69dd99f11f147729f5d95e3bcdee62057f64921f5f034ffac45948c8402697d2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5a44a591dcd3f86f8878df473e944d1aa38570cfd6fe4d3b0d2129daa5d94fb0.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 7d7b65f57c419844177f990b3f2b3c48f223527a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 17:34:14 +0000 Subject: [PATCH 035/473] feat(api): OpenAPI spec update via Stainless API (#532) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 17d7da2f44..60bf5d749b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5a44a591dcd3f86f8878df473e944d1aa38570cfd6fe4d3b0d2129daa5d94fb0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-52d9a2dc9d0868cab21ab7ca8255cacb967da100c31438203c397d7fefd5288c.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 12811c186aef52370d0bfa079628ef5b720c1275 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 18:13:14 +0000 Subject: [PATCH 036/473] feat(api): OpenAPI spec update via Stainless API (#533) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 60bf5d749b..91a7572bfc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-52d9a2dc9d0868cab21ab7ca8255cacb967da100c31438203c397d7fefd5288c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-99bd90b0a0f2472ad98f07bb87bf426278428a9891436afd8b355c8f57df5122.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 451f22a4d58ba24af0a8fbab87e1c21be351e264 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 18:52:10 +0000 Subject: [PATCH 037/473] feat(api): OpenAPI spec update via Stainless API (#534) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 91a7572bfc..60bf5d749b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-99bd90b0a0f2472ad98f07bb87bf426278428a9891436afd8b355c8f57df5122.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-52d9a2dc9d0868cab21ab7ca8255cacb967da100c31438203c397d7fefd5288c.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From f8741b3e97fae16f4a4499c1e4fe90f6b09d042a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 19:23:11 +0000 Subject: [PATCH 038/473] feat(api): OpenAPI spec update via Stainless API (#535) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 60bf5d749b..17d7da2f44 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-52d9a2dc9d0868cab21ab7ca8255cacb967da100c31438203c397d7fefd5288c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5a44a591dcd3f86f8878df473e944d1aa38570cfd6fe4d3b0d2129daa5d94fb0.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From d312f1279a891230832e90dabd26ded62c2cc10a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 19:25:41 +0000 Subject: [PATCH 039/473] feat(api): OpenAPI spec update via Stainless API (#536) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 17d7da2f44..60bf5d749b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5a44a591dcd3f86f8878df473e944d1aa38570cfd6fe4d3b0d2129daa5d94fb0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-52d9a2dc9d0868cab21ab7ca8255cacb967da100c31438203c397d7fefd5288c.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From fc14d77023ffae634d6f21c13f8334074be5a7d7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 21:48:44 +0000 Subject: [PATCH 040/473] feat(api): OpenAPI spec update via Stainless API (#537) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ src/resources/radar/ranking/ranking.ts | 2 +- 5 files changed, 47 insertions(+), 23 deletions(-) diff --git a/.stats.yml b/.stats.yml index 60bf5d749b..17d7da2f44 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-52d9a2dc9d0868cab21ab7ca8255cacb967da100c31438203c397d7fefd5288c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5a44a591dcd3f86f8878df473e944d1aa38570cfd6fe4d3b0d2129daa5d94fb0.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** diff --git a/src/resources/radar/ranking/ranking.ts b/src/resources/radar/ranking/ranking.ts index 6079302db6..3080e499bb 100644 --- a/src/resources/radar/ranking/ranking.ts +++ b/src/resources/radar/ranking/ranking.ts @@ -81,7 +81,7 @@ export namespace RankingTimeseriesGroupsResponse { export interface Serie0 { timestamps: Array; - [k: string]: Array; + [k: string]: Array | Array; } } From e7dbbb6d710158cb930e59ab8a847dab7695017f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 21:51:15 +0000 Subject: [PATCH 041/473] feat(api): OpenAPI spec update via Stainless API (#538) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 17d7da2f44..91a7572bfc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5a44a591dcd3f86f8878df473e944d1aa38570cfd6fe4d3b0d2129daa5d94fb0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-99bd90b0a0f2472ad98f07bb87bf426278428a9891436afd8b355c8f57df5122.yml From a5e9b2ea268dd228aeb44d29c6df27132814350c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 14:35:38 +0000 Subject: [PATCH 042/473] feat(api): OpenAPI spec update via Stainless API (#539) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 91a7572bfc..60bf5d749b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-99bd90b0a0f2472ad98f07bb87bf426278428a9891436afd8b355c8f57df5122.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-52d9a2dc9d0868cab21ab7ca8255cacb967da100c31438203c397d7fefd5288c.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 3b37f46df71b9d406a171a123606466545927273 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 16:29:17 +0000 Subject: [PATCH 043/473] feat(api): OpenAPI spec update via Stainless API (#540) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 60bf5d749b..9423f83587 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-52d9a2dc9d0868cab21ab7ca8255cacb967da100c31438203c397d7fefd5288c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-69dd99f11f147729f5d95e3bcdee62057f64921f5f034ffac45948c8402697d2.yml From f5a8e3341d095deceb500a583d863154ccd58bfb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 17:45:52 +0000 Subject: [PATCH 044/473] feat(api): OpenAPI spec update via Stainless API (#541) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9423f83587..17d7da2f44 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-69dd99f11f147729f5d95e3bcdee62057f64921f5f034ffac45948c8402697d2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5a44a591dcd3f86f8878df473e944d1aa38570cfd6fe4d3b0d2129daa5d94fb0.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 6da9804e2b8d2409b5c2a30e60e8919489b90559 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 22:33:43 +0000 Subject: [PATCH 045/473] feat(api): OpenAPI spec update via Stainless API (#542) --- .stats.yml | 2 +- src/resources/vectorize/indexes.ts | 9 +++++---- tests/api-resources/vectorize/indexes.test.ts | 10 +++++----- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.stats.yml b/.stats.yml index 17d7da2f44..91a7572bfc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5a44a591dcd3f86f8878df473e944d1aa38570cfd6fe4d3b0d2129daa5d94fb0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-99bd90b0a0f2472ad98f07bb87bf426278428a9891436afd8b355c8f57df5122.yml diff --git a/src/resources/vectorize/indexes.ts b/src/resources/vectorize/indexes.ts index 8a18ba2b10..011c123f3a 100644 --- a/src/resources/vectorize/indexes.ts +++ b/src/resources/vectorize/indexes.ts @@ -3,6 +3,7 @@ import * as Core from '../../core'; import { APIResource } from '../../resource'; import * as IndexesAPI from './indexes'; +import { type Uploadable } from '../../core'; import { SinglePage } from '../../pagination'; export class Indexes extends APIResource { @@ -395,9 +396,9 @@ export interface IndexInsertParams { account_id: string; /** - * Body param: + * Body param: ndjson file containing vectors to insert. */ - body: unknown; + body: Uploadable; } export interface IndexQueryParams { @@ -439,9 +440,9 @@ export interface IndexUpsertParams { account_id: string; /** - * Body param: + * Body param: ndjson file containing vectors to upsert. */ - body: unknown; + body: Uploadable; } export namespace Indexes { diff --git a/tests/api-resources/vectorize/indexes.test.ts b/tests/api-resources/vectorize/indexes.test.ts index 631970a993..3d08914333 100644 --- a/tests/api-resources/vectorize/indexes.test.ts +++ b/tests/api-resources/vectorize/indexes.test.ts @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import Cloudflare from 'cloudflare'; +import Cloudflare, { toFile } from 'cloudflare'; import { Response } from 'node-fetch'; const cloudflare = new Cloudflare({ @@ -156,7 +156,7 @@ describe('resource indexes', () => { test.skip('insert: only required params', async () => { const responsePromise = cloudflare.vectorize.indexes.insert('example-index', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', - body: {}, + body: await toFile(Buffer.from('# my file contents'), 'README.md'), }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -171,7 +171,7 @@ describe('resource indexes', () => { test.skip('insert: required and optional params', async () => { const response = await cloudflare.vectorize.indexes.insert('example-index', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', - body: {}, + body: await toFile(Buffer.from('# my file contents'), 'README.md'), }); }); @@ -204,7 +204,7 @@ describe('resource indexes', () => { test.skip('upsert: only required params', async () => { const responsePromise = cloudflare.vectorize.indexes.upsert('example-index', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', - body: {}, + body: await toFile(Buffer.from('# my file contents'), 'README.md'), }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -219,7 +219,7 @@ describe('resource indexes', () => { test.skip('upsert: required and optional params', async () => { const response = await cloudflare.vectorize.indexes.upsert('example-index', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', - body: {}, + body: await toFile(Buffer.from('# my file contents'), 'README.md'), }); }); }); From 7307accba8abf1f64359bb309c64c58a345141e8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 22:36:05 +0000 Subject: [PATCH 046/473] feat(api): OpenAPI spec update via Stainless API (#543) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 91a7572bfc..17d7da2f44 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-99bd90b0a0f2472ad98f07bb87bf426278428a9891436afd8b355c8f57df5122.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5a44a591dcd3f86f8878df473e944d1aa38570cfd6fe4d3b0d2129daa5d94fb0.yml From 78c8133a8432f6b92ebbf9a6d1ba702e7057c734 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 07:21:56 +0000 Subject: [PATCH 047/473] feat(api): OpenAPI spec update via Stainless API (#544) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 17d7da2f44..91a7572bfc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5a44a591dcd3f86f8878df473e944d1aa38570cfd6fe4d3b0d2129daa5d94fb0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-99bd90b0a0f2472ad98f07bb87bf426278428a9891436afd8b355c8f57df5122.yml From 0c24d4ba81d39ee03038cff9a69a3116b6bc18c7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 08:29:25 +0000 Subject: [PATCH 048/473] feat(api): OpenAPI spec update via Stainless API (#545) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- src/resources/radar/bgp/bgp.ts | 15 ++++++++++++- src/resources/radar/bgp/hijacks/events.ts | 2 +- src/resources/radar/bgp/routes.ts | 4 ++-- src/resources/radar/bgp/top/ases.ts | 15 ++++++++++++- tests/api-resources/radar/bgp/bgp.test.ts | 6 ++++- .../radar/bgp/hijacks/events.test.ts | 2 +- tests/api-resources/radar/bgp/routes.test.ts | 2 +- .../api-resources/radar/bgp/top/ases.test.ts | 6 ++++- 12 files changed, 65 insertions(+), 55 deletions(-) diff --git a/.stats.yml b/.stats.yml index 91a7572bfc..c9e1a8e746 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-99bd90b0a0f2472ad98f07bb87bf426278428a9891436afd8b355c8f57df5122.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e0c654af9fa84e81609b00c616ca5bbdcd5dc66ac4e5b2c185cc167ee6569d00.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** diff --git a/src/resources/radar/bgp/bgp.ts b/src/resources/radar/bgp/bgp.ts index d4adde08c7..2c9c162e1c 100644 --- a/src/resources/radar/bgp/bgp.ts +++ b/src/resources/radar/bgp/bgp.ts @@ -163,7 +163,7 @@ export interface BGPTimeseriesParams { /** * Array of BGP network prefixes. */ - prefix?: Array; + prefix?: Array; /** * Array of BGP update types. @@ -171,6 +171,19 @@ export interface BGPTimeseriesParams { updateType?: Array<'ANNOUNCEMENT' | 'WITHDRAWAL'>; } +export namespace BGPTimeseriesParams { + export interface Prefix { + location: string; + + name: string; + + /** + * Network prefix, IPv4 or IPv6. + */ + type?: string; + } +} + export namespace BGP { export import BGPTimeseriesResponse = BGPAPI.BGPTimeseriesResponse; export import BGPTimeseriesParams = BGPAPI.BGPTimeseriesParams; diff --git a/src/resources/radar/bgp/hijacks/events.ts b/src/resources/radar/bgp/hijacks/events.ts index 44e47c4a38..4ac85a0cfb 100644 --- a/src/resources/radar/bgp/hijacks/events.ts +++ b/src/resources/radar/bgp/hijacks/events.ts @@ -185,7 +185,7 @@ export interface EventListParams extends V4PagePaginationParams { minConfidence?: number; /** - * The prefix hijacked during a BGP hijack event + * Network prefix, IPv4 or IPv6. */ prefix?: string; diff --git a/src/resources/radar/bgp/routes.ts b/src/resources/radar/bgp/routes.ts index 7ac44ae33a..44fe6d3d7f 100644 --- a/src/resources/radar/bgp/routes.ts +++ b/src/resources/radar/bgp/routes.ts @@ -256,7 +256,7 @@ export interface RouteMoasParams { origin?: number; /** - * Lookup MOASes by prefix + * Network prefix, IPv4 or IPv6. */ prefix?: string; } @@ -279,7 +279,7 @@ export interface RoutePfx2asParams { origin?: number; /** - * Lookup origin ASNs of the given prefix + * Network prefix, IPv4 or IPv6. */ prefix?: string; diff --git a/src/resources/radar/bgp/top/ases.ts b/src/resources/radar/bgp/top/ases.ts index 1ea8b37ff2..e6c7311d4b 100644 --- a/src/resources/radar/bgp/top/ases.ts +++ b/src/resources/radar/bgp/top/ases.ts @@ -171,7 +171,7 @@ export interface AseGetParams { /** * Array of BGP network prefixes. */ - prefix?: Array; + prefix?: Array; /** * Array of BGP update types. @@ -179,6 +179,19 @@ export interface AseGetParams { updateType?: Array<'ANNOUNCEMENT' | 'WITHDRAWAL'>; } +export namespace AseGetParams { + export interface Prefix { + location: string; + + name: string; + + /** + * Network prefix, IPv4 or IPv6. + */ + type?: string; + } +} + export interface AsePrefixesParams { /** * Alpha-2 country code. diff --git a/tests/api-resources/radar/bgp/bgp.test.ts b/tests/api-resources/radar/bgp/bgp.test.ts index 8cc5c7a05d..265d6d3a20 100644 --- a/tests/api-resources/radar/bgp/bgp.test.ts +++ b/tests/api-resources/radar/bgp/bgp.test.ts @@ -40,7 +40,11 @@ describe('resource bgp', () => { dateStart: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], format: 'JSON', name: ['string', 'string', 'string'], - prefix: ['string', 'string', 'string'], + prefix: [ + { location: 'query', name: 'prefix', type: '1.1.1.0/24' }, + { location: 'query', name: 'prefix', type: '1.1.1.0/24' }, + { location: 'query', name: 'prefix', type: '1.1.1.0/24' }, + ], updateType: ['ANNOUNCEMENT', 'WITHDRAWAL'], }, { path: '/_stainless_unknown_path' }, diff --git a/tests/api-resources/radar/bgp/hijacks/events.test.ts b/tests/api-resources/radar/bgp/hijacks/events.test.ts index d3b013706a..bab02b0c98 100644 --- a/tests/api-resources/radar/bgp/hijacks/events.test.ts +++ b/tests/api-resources/radar/bgp/hijacks/events.test.ts @@ -45,7 +45,7 @@ describe('resource events', () => { minConfidence: 0, page: 0, per_page: 0, - prefix: 'string', + prefix: '1.1.1.0/24', sortBy: 'TIME', sortOrder: 'DESC', victimAsn: 0, diff --git a/tests/api-resources/radar/bgp/routes.test.ts b/tests/api-resources/radar/bgp/routes.test.ts index 8d655ff5ec..ff1762a7ad 100644 --- a/tests/api-resources/radar/bgp/routes.test.ts +++ b/tests/api-resources/radar/bgp/routes.test.ts @@ -32,7 +32,7 @@ describe('resource routes', () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( cloudflare.radar.bgp.routes.moas( - { format: 'JSON', invalid_only: true, origin: 0, prefix: 'string' }, + { format: 'JSON', invalid_only: true, origin: 0, prefix: '1.1.1.0/24' }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Cloudflare.NotFoundError); diff --git a/tests/api-resources/radar/bgp/top/ases.test.ts b/tests/api-resources/radar/bgp/top/ases.test.ts index e89f987a12..246b444528 100644 --- a/tests/api-resources/radar/bgp/top/ases.test.ts +++ b/tests/api-resources/radar/bgp/top/ases.test.ts @@ -40,7 +40,11 @@ describe('resource ases', () => { format: 'JSON', limit: 5, name: ['string', 'string', 'string'], - prefix: ['string', 'string', 'string'], + prefix: [ + { location: 'query', name: 'prefix', type: '1.1.1.0/24' }, + { location: 'query', name: 'prefix', type: '1.1.1.0/24' }, + { location: 'query', name: 'prefix', type: '1.1.1.0/24' }, + ], updateType: ['ANNOUNCEMENT', 'WITHDRAWAL'], }, { path: '/_stainless_unknown_path' }, From f60f57be47a63a555f3803553d1c641e92c7cba6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 09:12:41 +0000 Subject: [PATCH 049/473] feat(api): OpenAPI spec update via Stainless API (#546) --- .stats.yml | 2 +- src/resources/ai-gateway/logs.ts | 2 ++ .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 5 files changed, 48 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index c9e1a8e746..908d46bb7a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e0c654af9fa84e81609b00c616ca5bbdcd5dc66ac4e5b2c185cc167ee6569d00.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8ed1feaaa675343ade60163c51b1b39494c9bff519d1b15fa00c5ec0fe182abf.yml diff --git a/src/resources/ai-gateway/logs.ts b/src/resources/ai-gateway/logs.ts index 65ba8d9515..1b5b3552d1 100644 --- a/src/resources/ai-gateway/logs.ts +++ b/src/resources/ai-gateway/logs.ts @@ -46,6 +46,8 @@ export namespace LogGetResponse { tokens_in: number; tokens_out: number; + + status_code?: number; } } diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 721a6439a7e5b7e2cfb7b66cbc057204ee2d45a6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 10:02:18 +0000 Subject: [PATCH 050/473] feat(api): OpenAPI spec update via Stainless API (#547) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 908d46bb7a..c2219e29e5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8ed1feaaa675343ade60163c51b1b39494c9bff519d1b15fa00c5ec0fe182abf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-03573240641a2c0ec81ecd650a4e8be921d8cf797acfa5bcb504300e254a9ce3.yml From 8f4183b8ece1905fa1bbd93760bda6a02a9538e0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 10:44:58 +0000 Subject: [PATCH 051/473] feat(api): OpenAPI spec update via Stainless API (#548) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c2219e29e5..908d46bb7a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-03573240641a2c0ec81ecd650a4e8be921d8cf797acfa5bcb504300e254a9ce3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8ed1feaaa675343ade60163c51b1b39494c9bff519d1b15fa00c5ec0fe182abf.yml From 82cc2e6f66ec3916214784c4d28c00ee136192f2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 11:18:54 +0000 Subject: [PATCH 052/473] feat(api): OpenAPI spec update via Stainless API (#549) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 908d46bb7a..c2219e29e5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8ed1feaaa675343ade60163c51b1b39494c9bff519d1b15fa00c5ec0fe182abf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-03573240641a2c0ec81ecd650a4e8be921d8cf797acfa5bcb504300e254a9ce3.yml From 9c9c2345954beede113c3f87d326d2aeca110e88 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 11:21:53 +0000 Subject: [PATCH 053/473] feat(api): OpenAPI spec update via Stainless API (#550) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index c2219e29e5..91651da7fa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-03573240641a2c0ec81ecd650a4e8be921d8cf797acfa5bcb504300e254a9ce3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-191bc622535f6b2079b5b94b330df7766fc0940d9faf8adf4e3b6a185d2d1353.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From e6ea590af60084097ca0192ab953a05a3e6da5d7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 12:03:26 +0000 Subject: [PATCH 054/473] feat(api): OpenAPI spec update via Stainless API (#551) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 91651da7fa..c2219e29e5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-191bc622535f6b2079b5b94b330df7766fc0940d9faf8adf4e3b6a185d2d1353.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-03573240641a2c0ec81ecd650a4e8be921d8cf797acfa5bcb504300e254a9ce3.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 7e52950dbbabc68046491af27db6bad81ca76922 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 12:06:17 +0000 Subject: [PATCH 055/473] feat(api): OpenAPI spec update via Stainless API (#552) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c2219e29e5..908d46bb7a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-03573240641a2c0ec81ecd650a4e8be921d8cf797acfa5bcb504300e254a9ce3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8ed1feaaa675343ade60163c51b1b39494c9bff519d1b15fa00c5ec0fe182abf.yml From 505c623ba7442c60b6962f21e29c9b96947f1b25 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 13:20:33 +0000 Subject: [PATCH 056/473] feat(api): OpenAPI spec update via Stainless API (#553) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 908d46bb7a..c2219e29e5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8ed1feaaa675343ade60163c51b1b39494c9bff519d1b15fa00c5ec0fe182abf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-03573240641a2c0ec81ecd650a4e8be921d8cf797acfa5bcb504300e254a9ce3.yml From 64864ee2e9b3e1372ed624581bf19a1f1e90901a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 13:41:46 +0000 Subject: [PATCH 057/473] feat(api): OpenAPI spec update via Stainless API (#554) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c2219e29e5..908d46bb7a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-03573240641a2c0ec81ecd650a4e8be921d8cf797acfa5bcb504300e254a9ce3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8ed1feaaa675343ade60163c51b1b39494c9bff519d1b15fa00c5ec0fe182abf.yml From 83867d0ffe89902709e7d7d05b9a9c972c6a48f6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 13:47:52 +0000 Subject: [PATCH 058/473] feat(api): OpenAPI spec update via Stainless API (#555) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 908d46bb7a..6fc17c6d58 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8ed1feaaa675343ade60163c51b1b39494c9bff519d1b15fa00c5ec0fe182abf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9c9cdda0a86077d8bb70f538448d4cfc7558b40c55c7d1c28f68854b913f7c41.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 4262a9f76946514ba7b989eedfd53930f68dc4f7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 14:16:10 +0000 Subject: [PATCH 059/473] feat(api): OpenAPI spec update via Stainless API (#556) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6fc17c6d58..c2219e29e5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9c9cdda0a86077d8bb70f538448d4cfc7558b40c55c7d1c28f68854b913f7c41.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-03573240641a2c0ec81ecd650a4e8be921d8cf797acfa5bcb504300e254a9ce3.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 4a4999e4fd5b0ade83be83dc38a9a93b1662e9f6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 14:18:53 +0000 Subject: [PATCH 060/473] feat(api): OpenAPI spec update via Stainless API (#557) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index c2219e29e5..6fc17c6d58 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-03573240641a2c0ec81ecd650a4e8be921d8cf797acfa5bcb504300e254a9ce3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9c9cdda0a86077d8bb70f538448d4cfc7558b40c55c7d1c28f68854b913f7c41.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 8f101ff7079328a5c377525487f0184317025e61 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 14:21:43 +0000 Subject: [PATCH 061/473] feat(api): OpenAPI spec update via Stainless API (#558) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6fc17c6d58..c2219e29e5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9c9cdda0a86077d8bb70f538448d4cfc7558b40c55c7d1c28f68854b913f7c41.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-03573240641a2c0ec81ecd650a4e8be921d8cf797acfa5bcb504300e254a9ce3.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 07945c1783d33ea0fca20302c72172c5e7f8aaa0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 14:24:15 +0000 Subject: [PATCH 062/473] feat(api): OpenAPI spec update via Stainless API (#559) --- .stats.yml | 4 +- api.md | 5 -- .../cloudforce-one/requests/message.ts | 22 ++---- .../cloudforce-one/requests/priority.ts | 22 ++---- .../cloudforce-one/requests/requests.ts | 22 ++---- src/resources/d1/d1.ts | 3 - src/resources/d1/database.ts | 63 ---------------- src/resources/d1/index.ts | 3 - tests/api-resources/d1/database.test.ts | 71 ------------------- 9 files changed, 23 insertions(+), 192 deletions(-) diff --git a/.stats.yml b/.stats.yml index c2219e29e5..c136090cc3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1286 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-03573240641a2c0ec81ecd650a4e8be921d8cf797acfa5bcb504300e254a9ce3.yml +configured_endpoints: 1283 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-19826fa2034ab86674d8dfba6d0db4e84b60161e42867c90ca7e177751d28962.yml diff --git a/api.md b/api.md index 5216a7e507..5c421bf48e 100644 --- a/api.md +++ b/api.md @@ -3992,16 +3992,11 @@ Types: - QueryResult - DatabaseCreateResponse - DatabaseListResponse -- DatabaseDeleteResponse -- DatabaseQueryResponse Methods: - client.d1.database.create({ ...params }) -> DatabaseCreateResponse - client.d1.database.list({ ...params }) -> DatabaseListResponsesV4PagePaginationArray -- client.d1.database.delete(accountIdentifier, databaseIdentifier) -> DatabaseDeleteResponse -- client.d1.database.get(accountIdentifier, databaseIdentifier) -> D1 -- client.d1.database.query(accountIdentifier, databaseIdentifier, { ...params }) -> DatabaseQueryResponse # R2 diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** diff --git a/src/resources/d1/d1.ts b/src/resources/d1/d1.ts index 1835c57270..cc7ca3d91b 100644 --- a/src/resources/d1/d1.ts +++ b/src/resources/d1/d1.ts @@ -32,10 +32,7 @@ export namespace D1Resource { export import QueryResult = DatabaseAPI.QueryResult; export import DatabaseCreateResponse = DatabaseAPI.DatabaseCreateResponse; export import DatabaseListResponse = DatabaseAPI.DatabaseListResponse; - export import DatabaseDeleteResponse = DatabaseAPI.DatabaseDeleteResponse; - export import DatabaseQueryResponse = DatabaseAPI.DatabaseQueryResponse; export import DatabaseListResponsesV4PagePaginationArray = DatabaseAPI.DatabaseListResponsesV4PagePaginationArray; export import DatabaseCreateParams = DatabaseAPI.DatabaseCreateParams; export import DatabaseListParams = DatabaseAPI.DatabaseListParams; - export import DatabaseQueryParams = DatabaseAPI.DatabaseQueryParams; } diff --git a/src/resources/d1/database.ts b/src/resources/d1/database.ts index e412408868..d10994584e 100644 --- a/src/resources/d1/database.ts +++ b/src/resources/d1/database.ts @@ -3,7 +3,6 @@ import * as Core from '../../core'; import { APIResource } from '../../resource'; import * as DatabaseAPI from './database'; -import * as D1API from './d1'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class Database extends APIResource { @@ -36,55 +35,6 @@ export class Database extends APIResource { { query, ...options }, ); } - - /** - * Deletes the specified D1 database. - */ - delete( - accountIdentifier: string, - databaseIdentifier: string, - options?: Core.RequestOptions, - ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/d1/database/${databaseIdentifier}`, - options, - ) as Core.APIPromise<{ result: DatabaseDeleteResponse }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Returns the specified D1 database. - */ - get( - accountIdentifier: string, - databaseIdentifier: string, - options?: Core.RequestOptions, - ): Core.APIPromise { - return ( - this._client.get( - `/accounts/${accountIdentifier}/d1/database/${databaseIdentifier}`, - options, - ) as Core.APIPromise<{ result: D1API.D1 }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Returns the query result. - */ - query( - accountIdentifier: string, - databaseIdentifier: string, - body: DatabaseQueryParams, - options?: Core.RequestOptions, - ): Core.APIPromise { - return ( - this._client.post(`/accounts/${accountIdentifier}/d1/database/${databaseIdentifier}/query`, { - body, - ...options, - }) as Core.APIPromise<{ result: DatabaseQueryResponse }> - )._thenUnwrap((obj) => obj.result); - } } export class DatabaseListResponsesV4PagePaginationArray extends V4PagePaginationArray {} @@ -141,10 +91,6 @@ export interface DatabaseListResponse { version?: string; } -export type DatabaseDeleteResponse = unknown | string | null; - -export type DatabaseQueryResponse = Array; - export interface DatabaseCreateParams { /** * Path param: Account identifier tag. @@ -169,20 +115,11 @@ export interface DatabaseListParams extends V4PagePaginationArrayParams { name?: string; } -export interface DatabaseQueryParams { - sql: string; - - params?: Array; -} - export namespace Database { export import QueryResult = DatabaseAPI.QueryResult; export import DatabaseCreateResponse = DatabaseAPI.DatabaseCreateResponse; export import DatabaseListResponse = DatabaseAPI.DatabaseListResponse; - export import DatabaseDeleteResponse = DatabaseAPI.DatabaseDeleteResponse; - export import DatabaseQueryResponse = DatabaseAPI.DatabaseQueryResponse; export import DatabaseListResponsesV4PagePaginationArray = DatabaseAPI.DatabaseListResponsesV4PagePaginationArray; export import DatabaseCreateParams = DatabaseAPI.DatabaseCreateParams; export import DatabaseListParams = DatabaseAPI.DatabaseListParams; - export import DatabaseQueryParams = DatabaseAPI.DatabaseQueryParams; } diff --git a/src/resources/d1/index.ts b/src/resources/d1/index.ts index 2c80800a0c..7fe552b020 100644 --- a/src/resources/d1/index.ts +++ b/src/resources/d1/index.ts @@ -5,11 +5,8 @@ export { QueryResult, DatabaseCreateResponse, DatabaseListResponse, - DatabaseDeleteResponse, - DatabaseQueryResponse, DatabaseCreateParams, DatabaseListParams, - DatabaseQueryParams, DatabaseListResponsesV4PagePaginationArray, Database, } from './database'; diff --git a/tests/api-resources/d1/database.test.ts b/tests/api-resources/d1/database.test.ts index f0095b2e7b..8deb5aa1ea 100644 --- a/tests/api-resources/d1/database.test.ts +++ b/tests/api-resources/d1/database.test.ts @@ -50,75 +50,4 @@ describe('resource database', () => { per_page: 10, }); }); - - test('delete', async () => { - const responsePromise = cloudflare.d1.database.delete( - '023e105f4ecef8ad9ca31a8372d0c353', - 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', - ); - 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('delete: 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.d1.database.delete( - '023e105f4ecef8ad9ca31a8372d0c353', - 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); - - test('get', async () => { - const responsePromise = cloudflare.d1.database.get( - '023e105f4ecef8ad9ca31a8372d0c353', - 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', - ); - 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('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.d1.database.get('023e105f4ecef8ad9ca31a8372d0c353', 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', { - path: '/_stainless_unknown_path', - }), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); - - test('query: only required params', async () => { - const responsePromise = cloudflare.d1.database.query( - '023e105f4ecef8ad9ca31a8372d0c353', - 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', - { sql: 'SELECT * FROM myTable WHERE field = ? OR field = ?;' }, - ); - 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('query: required and optional params', async () => { - const response = await cloudflare.d1.database.query( - '023e105f4ecef8ad9ca31a8372d0c353', - 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', - { sql: 'SELECT * FROM myTable WHERE field = ? OR field = ?;', params: ['firstParam', 'secondParam'] }, - ); - }); }); From 109d9438d637daf4657630d92d83cc95f5da23d8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 14:41:27 +0000 Subject: [PATCH 063/473] feat(api): OpenAPI spec update via Stainless API (#560) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c136090cc3..a7778bce73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1283 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-19826fa2034ab86674d8dfba6d0db4e84b60161e42867c90ca7e177751d28962.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9641d27447b6a4a83ab5fbf33bbb75d5ac480bf84d636db5a2f613b6c29a664b.yml From ae18b8a109e7900d6c2a69a7214701b5c33c189b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 15:04:03 +0000 Subject: [PATCH 064/473] feat(api): OpenAPI spec update via Stainless API (#561) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index a7778bce73..d147eb1e67 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1283 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9641d27447b6a4a83ab5fbf33bbb75d5ac480bf84d636db5a2f613b6c29a664b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bb3bdb8322e9c9e14555e147429bc9616f83334e9eb3b5ff894ee1d8d6dd4644.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 9ed19174a423da9c2c2f16f304f5b89a885e04b6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 15:06:58 +0000 Subject: [PATCH 065/473] feat(api): OpenAPI spec update via Stainless API (#562) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index d147eb1e67..a7778bce73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1283 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bb3bdb8322e9c9e14555e147429bc9616f83334e9eb3b5ff894ee1d8d6dd4644.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9641d27447b6a4a83ab5fbf33bbb75d5ac480bf84d636db5a2f613b6c29a664b.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From d0e9ac18b6c2d80553fd28f3bfa3f2607670f6f9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 15:09:42 +0000 Subject: [PATCH 066/473] feat(api): OpenAPI spec update via Stainless API (#563) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index a7778bce73..d147eb1e67 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1283 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9641d27447b6a4a83ab5fbf33bbb75d5ac480bf84d636db5a2f613b6c29a664b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bb3bdb8322e9c9e14555e147429bc9616f83334e9eb3b5ff894ee1d8d6dd4644.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From f84e0b3a9e72ccbec762e35ff95ac215bf546128 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 15:12:16 +0000 Subject: [PATCH 067/473] feat(api): OpenAPI spec update via Stainless API (#564) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index d147eb1e67..c136090cc3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1283 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bb3bdb8322e9c9e14555e147429bc9616f83334e9eb3b5ff894ee1d8d6dd4644.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-19826fa2034ab86674d8dfba6d0db4e84b60161e42867c90ca7e177751d28962.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From bd5d112aad8576c2e3382b61605c28f0c024983c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 16:13:25 +0000 Subject: [PATCH 068/473] feat(api): OpenAPI spec update via Stainless API (#565) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c136090cc3..a7778bce73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1283 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-19826fa2034ab86674d8dfba6d0db4e84b60161e42867c90ca7e177751d28962.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9641d27447b6a4a83ab5fbf33bbb75d5ac480bf84d636db5a2f613b6c29a664b.yml From bda1adbd0df91b43bc48697b9f3e1c31d9d22442 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 17:54:46 +0000 Subject: [PATCH 069/473] feat(api): OpenAPI spec update via Stainless API (#566) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a7778bce73..c136090cc3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1283 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9641d27447b6a4a83ab5fbf33bbb75d5ac480bf84d636db5a2f613b6c29a664b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-19826fa2034ab86674d8dfba6d0db4e84b60161e42867c90ca7e177751d28962.yml From 661effb6556ad84c388337e97ed16b49f5018274 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 17:58:55 +0000 Subject: [PATCH 070/473] feat(api): OpenAPI spec update via Stainless API (#567) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index c136090cc3..d147eb1e67 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1283 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-19826fa2034ab86674d8dfba6d0db4e84b60161e42867c90ca7e177751d28962.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bb3bdb8322e9c9e14555e147429bc9616f83334e9eb3b5ff894ee1d8d6dd4644.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 19e91d6f0abb2f87315d8b8b5c6d3defc940401c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 18:41:57 +0000 Subject: [PATCH 071/473] feat(api): OpenAPI spec update via Stainless API (#568) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index d147eb1e67..1220b9bfc4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1283 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bb3bdb8322e9c9e14555e147429bc9616f83334e9eb3b5ff894ee1d8d6dd4644.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1dd056d9703c11b6fca49ee290875ea3affc22bf02b29a63959f64c669ada354.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 919df83358f53e8c17b0432503f3eb354cd8dc24 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 19:08:47 +0000 Subject: [PATCH 072/473] feat(api): OpenAPI spec update via Stainless API (#569) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1220b9bfc4..be95bf8bbf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1283 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1dd056d9703c11b6fca49ee290875ea3affc22bf02b29a63959f64c669ada354.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-241f970730129e553d466806420a1cf2f6d665abec11667004cb9cf070932a1e.yml From 509d5fb37fd6ecf61f90347d0d62d13709a55f6b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 19:11:27 +0000 Subject: [PATCH 073/473] feat(api): OpenAPI spec update via Stainless API (#570) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index be95bf8bbf..1220b9bfc4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1283 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-241f970730129e553d466806420a1cf2f6d665abec11667004cb9cf070932a1e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1dd056d9703c11b6fca49ee290875ea3affc22bf02b29a63959f64c669ada354.yml From cdc994dba349820a95f6b9752965415e567b749a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 19:22:03 +0000 Subject: [PATCH 074/473] feat(api): OpenAPI spec update via Stainless API (#571) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1220b9bfc4..be95bf8bbf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1283 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1dd056d9703c11b6fca49ee290875ea3affc22bf02b29a63959f64c669ada354.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-241f970730129e553d466806420a1cf2f6d665abec11667004cb9cf070932a1e.yml From fbcc6ef06d2ceee292cc53e09f4d3933a6f82b56 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 00:25:59 +0000 Subject: [PATCH 075/473] feat(api): update via SDK Studio (#572) --- .stats.yml | 2 +- api.md | 37 ++ src/resources/d1/d1.ts | 5 + src/resources/d1/database.ts | 90 +++++ src/resources/d1/index.ts | 5 + src/resources/magic-transit/index.ts | 1 + src/resources/magic-transit/magic-transit.ts | 1 + src/resources/magic-transit/sites/acls.ts | 59 ++++ src/resources/magic-transit/sites/index.ts | 4 + src/resources/magic-transit/sites/lans.ts | 59 ++++ src/resources/magic-transit/sites/sites.ts | 50 +++ src/resources/magic-transit/sites/wans.ts | 52 +++ .../zero-trust/risk-scoring/index.ts | 14 + .../risk-scoring/integrations/index.ts | 17 + .../risk-scoring/integrations/integrations.ts | 321 ++++++++++++++++++ .../risk-scoring/integrations/references.ts | 69 ++++ .../zero-trust/risk-scoring/risk-scoring.ts | 14 + tests/api-resources/d1/database.test.ts | 60 ++++ .../magic-transit/sites/acls.test.ts | 41 +++ .../magic-transit/sites/lans.test.ts | 46 +++ .../magic-transit/sites/sites.test.ts | 24 ++ .../magic-transit/sites/wans.test.ts | 34 ++ .../integrations/integrations.test.ts | 114 +++++++ .../integrations/references.test.ts | 31 ++ 24 files changed, 1149 insertions(+), 1 deletion(-) create mode 100644 src/resources/zero-trust/risk-scoring/integrations/index.ts create mode 100644 src/resources/zero-trust/risk-scoring/integrations/integrations.ts create mode 100644 src/resources/zero-trust/risk-scoring/integrations/references.ts create mode 100644 tests/api-resources/zero-trust/risk-scoring/integrations/integrations.test.ts create mode 100644 tests/api-resources/zero-trust/risk-scoring/integrations/references.test.ts diff --git a/.stats.yml b/.stats.yml index be95bf8bbf..0346a89ff9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1283 +configured_endpoints: 1296 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-241f970730129e553d466806420a1cf2f6d665abec11667004cb9cf070932a1e.yml diff --git a/api.md b/api.md index 5c421bf48e..d2ca83390e 100644 --- a/api.md +++ b/api.md @@ -3345,6 +3345,7 @@ Methods: - client.magicTransit.sites.update(siteId, { ...params }) -> Site - client.magicTransit.sites.list({ ...params }) -> SitesSinglePage - client.magicTransit.sites.delete(siteId, { ...params }) -> Site +- client.magicTransit.sites.edit(siteId, { ...params }) -> Site - client.magicTransit.sites.get(siteId, { ...params }) -> Site ### ACLs @@ -3362,6 +3363,7 @@ Methods: - client.magicTransit.sites.acls.update(siteId, aclIdentifier, { ...params }) -> ACL - client.magicTransit.sites.acls.list(siteId, { ...params }) -> ACLsSinglePage - client.magicTransit.sites.acls.delete(siteId, aclIdentifier, { ...params }) -> ACL +- client.magicTransit.sites.acls.edit(siteId, aclIdentifier, { ...params }) -> ACL - client.magicTransit.sites.acls.get(siteId, aclIdentifier, { ...params }) -> ACL ### LANs @@ -3382,6 +3384,7 @@ Methods: - client.magicTransit.sites.lans.update(siteId, lanId, { ...params }) -> LAN - client.magicTransit.sites.lans.list(siteId, { ...params }) -> LANsSinglePage - client.magicTransit.sites.lans.delete(siteId, lanId, { ...params }) -> LAN +- client.magicTransit.sites.lans.edit(siteId, lanId, { ...params }) -> LAN - client.magicTransit.sites.lans.get(siteId, lanId, { ...params }) -> LAN ### WANs @@ -3398,6 +3401,7 @@ Methods: - client.magicTransit.sites.wans.update(siteId, wanId, { ...params }) -> WAN - client.magicTransit.sites.wans.list(siteId, { ...params }) -> WANsSinglePage - client.magicTransit.sites.wans.delete(siteId, wanId, { ...params }) -> WAN +- client.magicTransit.sites.wans.edit(siteId, wanId, { ...params }) -> WAN - client.magicTransit.sites.wans.get(siteId, wanId, { ...params }) -> WAN ## Connectors @@ -3992,11 +3996,16 @@ Types: - QueryResult - DatabaseCreateResponse - DatabaseListResponse +- DatabaseDeleteResponse +- DatabaseQueryResponse Methods: - client.d1.database.create({ ...params }) -> DatabaseCreateResponse - client.d1.database.list({ ...params }) -> DatabaseListResponsesV4PagePaginationArray +- client.d1.database.delete(databaseId, { ...params }) -> DatabaseDeleteResponse +- client.d1.database.get(databaseId, { ...params }) -> D1 +- client.d1.database.query(databaseId, { ...params }) -> DatabaseQueryResponse # R2 @@ -5186,6 +5195,34 @@ Methods: - client.zeroTrust.riskScoring.summary.get(accountIdentifier, { ...params }) -> SummaryGetResponse +### Integrations + +Types: + +- IntegrationCreateResponse +- IntegrationUpdateResponse +- IntegrationListResponse +- IntegrationDeleteResponse +- IntegrationGetResponse + +Methods: + +- client.zeroTrust.riskScoring.integrations.create({ ...params }) -> IntegrationCreateResponse +- client.zeroTrust.riskScoring.integrations.update(integrationId, { ...params }) -> IntegrationUpdateResponse +- client.zeroTrust.riskScoring.integrations.list({ ...params }) -> IntegrationListResponsesSinglePage +- client.zeroTrust.riskScoring.integrations.delete(integrationId, { ...params }) -> IntegrationDeleteResponse +- client.zeroTrust.riskScoring.integrations.get(integrationId, { ...params }) -> IntegrationGetResponse + +#### References + +Types: + +- ReferenceGetResponse + +Methods: + +- client.zeroTrust.riskScoring.integrations.references.get(referenceId, { ...params }) -> ReferenceGetResponse + # Challenges ## Widgets diff --git a/src/resources/d1/d1.ts b/src/resources/d1/d1.ts index cc7ca3d91b..494b3c4ae2 100644 --- a/src/resources/d1/d1.ts +++ b/src/resources/d1/d1.ts @@ -32,7 +32,12 @@ export namespace D1Resource { export import QueryResult = DatabaseAPI.QueryResult; export import DatabaseCreateResponse = DatabaseAPI.DatabaseCreateResponse; export import DatabaseListResponse = DatabaseAPI.DatabaseListResponse; + export import DatabaseDeleteResponse = DatabaseAPI.DatabaseDeleteResponse; + export import DatabaseQueryResponse = DatabaseAPI.DatabaseQueryResponse; export import DatabaseListResponsesV4PagePaginationArray = DatabaseAPI.DatabaseListResponsesV4PagePaginationArray; export import DatabaseCreateParams = DatabaseAPI.DatabaseCreateParams; export import DatabaseListParams = DatabaseAPI.DatabaseListParams; + export import DatabaseDeleteParams = DatabaseAPI.DatabaseDeleteParams; + export import DatabaseGetParams = DatabaseAPI.DatabaseGetParams; + export import DatabaseQueryParams = DatabaseAPI.DatabaseQueryParams; } diff --git a/src/resources/d1/database.ts b/src/resources/d1/database.ts index d10994584e..f9a12d153e 100644 --- a/src/resources/d1/database.ts +++ b/src/resources/d1/database.ts @@ -3,6 +3,7 @@ import * as Core from '../../core'; import { APIResource } from '../../resource'; import * as DatabaseAPI from './database'; +import * as D1API from './d1'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class Database extends APIResource { @@ -35,6 +36,55 @@ export class Database extends APIResource { { query, ...options }, ); } + + /** + * Deletes the specified D1 database. + */ + delete( + databaseId: string, + params: DatabaseDeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.delete(`/accounts/${account_id}/d1/database/${databaseId}`, options) as Core.APIPromise<{ + result: DatabaseDeleteResponse; + }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Returns the specified D1 database. + */ + get( + databaseId: string, + params: DatabaseGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.get(`/accounts/${account_id}/d1/database/${databaseId}`, options) as Core.APIPromise<{ + result: D1API.D1; + }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Returns the query result. + */ + query( + databaseId: string, + params: DatabaseQueryParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.post(`/accounts/${account_id}/d1/database/${databaseId}/query`, { + body, + ...options, + }) as Core.APIPromise<{ result: DatabaseQueryResponse }> + )._thenUnwrap((obj) => obj.result); + } } export class DatabaseListResponsesV4PagePaginationArray extends V4PagePaginationArray {} @@ -91,6 +141,10 @@ export interface DatabaseListResponse { version?: string; } +export type DatabaseDeleteResponse = unknown | string | null; + +export type DatabaseQueryResponse = Array; + export interface DatabaseCreateParams { /** * Path param: Account identifier tag. @@ -115,11 +169,47 @@ export interface DatabaseListParams extends V4PagePaginationArrayParams { name?: string; } +export interface DatabaseDeleteParams { + /** + * Account identifier tag. + */ + account_id: string; +} + +export interface DatabaseGetParams { + /** + * Account identifier tag. + */ + account_id: string; +} + +export interface DatabaseQueryParams { + /** + * Path param: Account identifier tag. + */ + account_id: string; + + /** + * Body param: + */ + sql: string; + + /** + * Body param: + */ + params?: Array; +} + export namespace Database { export import QueryResult = DatabaseAPI.QueryResult; export import DatabaseCreateResponse = DatabaseAPI.DatabaseCreateResponse; export import DatabaseListResponse = DatabaseAPI.DatabaseListResponse; + export import DatabaseDeleteResponse = DatabaseAPI.DatabaseDeleteResponse; + export import DatabaseQueryResponse = DatabaseAPI.DatabaseQueryResponse; export import DatabaseListResponsesV4PagePaginationArray = DatabaseAPI.DatabaseListResponsesV4PagePaginationArray; export import DatabaseCreateParams = DatabaseAPI.DatabaseCreateParams; export import DatabaseListParams = DatabaseAPI.DatabaseListParams; + export import DatabaseDeleteParams = DatabaseAPI.DatabaseDeleteParams; + export import DatabaseGetParams = DatabaseAPI.DatabaseGetParams; + export import DatabaseQueryParams = DatabaseAPI.DatabaseQueryParams; } diff --git a/src/resources/d1/index.ts b/src/resources/d1/index.ts index 7fe552b020..13afa77f41 100644 --- a/src/resources/d1/index.ts +++ b/src/resources/d1/index.ts @@ -5,8 +5,13 @@ export { QueryResult, DatabaseCreateResponse, DatabaseListResponse, + DatabaseDeleteResponse, + DatabaseQueryResponse, DatabaseCreateParams, DatabaseListParams, + DatabaseDeleteParams, + DatabaseGetParams, + DatabaseQueryParams, DatabaseListResponsesV4PagePaginationArray, Database, } from './database'; diff --git a/src/resources/magic-transit/index.ts b/src/resources/magic-transit/index.ts index 1caa622a1e..7cf93a87f5 100644 --- a/src/resources/magic-transit/index.ts +++ b/src/resources/magic-transit/index.ts @@ -74,6 +74,7 @@ export { SiteUpdateParams, SiteListParams, SiteDeleteParams, + SiteEditParams, SiteGetParams, SitesSinglePage, Sites, diff --git a/src/resources/magic-transit/magic-transit.ts b/src/resources/magic-transit/magic-transit.ts index 1d29fb2d2e..85b272ab44 100644 --- a/src/resources/magic-transit/magic-transit.ts +++ b/src/resources/magic-transit/magic-transit.ts @@ -164,6 +164,7 @@ export namespace MagicTransit { export import SiteUpdateParams = SitesAPI.SiteUpdateParams; export import SiteListParams = SitesAPI.SiteListParams; export import SiteDeleteParams = SitesAPI.SiteDeleteParams; + export import SiteEditParams = SitesAPI.SiteEditParams; export import SiteGetParams = SitesAPI.SiteGetParams; export import Connectors = ConnectorsAPI.Connectors; export import ConnectorUpdateResponse = ConnectorsAPI.ConnectorUpdateResponse; diff --git a/src/resources/magic-transit/sites/acls.ts b/src/resources/magic-transit/sites/acls.ts index 8b370b2383..c044399a9c 100644 --- a/src/resources/magic-transit/sites/acls.ts +++ b/src/resources/magic-transit/sites/acls.ts @@ -71,6 +71,24 @@ export class ACLs extends APIResource { )._thenUnwrap((obj) => obj.result); } + /** + * Patch a specific Site ACL. + */ + edit( + siteId: string, + aclIdentifier: string, + params: ACLEditParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.patch(`/accounts/${account_id}/magic/sites/${siteId}/acls/${aclIdentifier}`, { + body, + ...options, + }) as Core.APIPromise<{ result: ACL }> + )._thenUnwrap((obj) => obj.result); + } + /** * Get a specific Site ACL. */ @@ -290,6 +308,46 @@ export interface ACLDeleteParams { account_id: string; } +export interface ACLEditParams { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: Description for the ACL. + */ + description?: string; + + /** + * Body param: The desired forwarding action for this ACL policy. If set to + * "false", the policy will forward traffic to Cloudflare. If set to "true", the + * policy will forward traffic locally on the Magic WAN Connector. If not included + * in request, will default to false. + */ + forward_locally?: boolean; + + /** + * Body param: + */ + lan_1?: ACLConfigurationParam; + + /** + * Body param: + */ + lan_2?: ACLConfigurationParam; + + /** + * Body param: The name of the ACL. + */ + name?: string; + + /** + * Body param: + */ + protocols?: Array; +} + export interface ACLGetParams { /** * Identifier @@ -307,5 +365,6 @@ export namespace ACLs { export import ACLUpdateParams = ACLsAPI.ACLUpdateParams; export import ACLListParams = ACLsAPI.ACLListParams; export import ACLDeleteParams = ACLsAPI.ACLDeleteParams; + export import ACLEditParams = ACLsAPI.ACLEditParams; export import ACLGetParams = ACLsAPI.ACLGetParams; } diff --git a/src/resources/magic-transit/sites/index.ts b/src/resources/magic-transit/sites/index.ts index d1a1a5a659..d401e52d54 100644 --- a/src/resources/magic-transit/sites/index.ts +++ b/src/resources/magic-transit/sites/index.ts @@ -9,6 +9,7 @@ export { ACLUpdateParams, ACLListParams, ACLDeleteParams, + ACLEditParams, ACLGetParams, ACLsSinglePage, ACLs, @@ -25,6 +26,7 @@ export { LANUpdateParams, LANListParams, LANDeleteParams, + LANEditParams, LANGetParams, LANsSinglePage, LANs, @@ -36,6 +38,7 @@ export { SiteUpdateParams, SiteListParams, SiteDeleteParams, + SiteEditParams, SiteGetParams, SitesSinglePage, Sites, @@ -48,6 +51,7 @@ export { WANUpdateParams, WANListParams, WANDeleteParams, + WANEditParams, WANGetParams, WANsSinglePage, WANs, diff --git a/src/resources/magic-transit/sites/lans.ts b/src/resources/magic-transit/sites/lans.ts index 944bc980bd..a84bb7d0cf 100644 --- a/src/resources/magic-transit/sites/lans.ts +++ b/src/resources/magic-transit/sites/lans.ts @@ -76,6 +76,24 @@ export class LANs extends APIResource { )._thenUnwrap((obj) => obj.result); } + /** + * Patch a specific LAN. + */ + edit( + siteId: string, + lanId: string, + params: LANEditParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.patch(`/accounts/${account_id}/magic/sites/${siteId}/lans/${lanId}`, { + body, + ...options, + }) as Core.APIPromise<{ result: LAN }> + )._thenUnwrap((obj) => obj.result); + } + /** * Get a specific LAN. */ @@ -389,6 +407,46 @@ export interface LANDeleteParams { account_id: string; } +export interface LANEditParams { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: + */ + name?: string; + + /** + * Body param: + */ + nat?: NatParam; + + /** + * Body param: + */ + physport?: number; + + /** + * Body param: + */ + routed_subnets?: Array; + + /** + * Body param: If the site is not configured in high availability mode, this + * configuration is optional (if omitted, use DHCP). However, if in high + * availability mode, static_address is required along with secondary and virtual + * address. + */ + static_addressing?: LANStaticAddressingParam; + + /** + * Body param: VLAN port number. + */ + vlan_tag?: number; +} + export interface LANGetParams { /** * Identifier @@ -409,5 +467,6 @@ export namespace LANs { export import LANUpdateParams = LANsAPI.LANUpdateParams; export import LANListParams = LANsAPI.LANListParams; export import LANDeleteParams = LANsAPI.LANDeleteParams; + export import LANEditParams = LANsAPI.LANEditParams; export import LANGetParams = LANsAPI.LANGetParams; } diff --git a/src/resources/magic-transit/sites/sites.ts b/src/resources/magic-transit/sites/sites.ts index a85ad5d8d0..36283bcca9 100644 --- a/src/resources/magic-transit/sites/sites.ts +++ b/src/resources/magic-transit/sites/sites.ts @@ -63,6 +63,19 @@ export class Sites extends APIResource { )._thenUnwrap((obj) => obj.result); } + /** + * Patch a specific Site. + */ + edit(siteId: string, params: SiteEditParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.patch(`/accounts/${account_id}/magic/sites/${siteId}`, { + body, + ...options, + }) as Core.APIPromise<{ result: Site }> + )._thenUnwrap((obj) => obj.result); + } + /** * Get a specific Site. */ @@ -234,6 +247,39 @@ export interface SiteDeleteParams { account_id: string; } +export interface SiteEditParams { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: Magic WAN Connector identifier tag. + */ + connector_id?: string; + + /** + * Body param: + */ + description?: string; + + /** + * Body param: Location of site in latitude and longitude. + */ + location?: SiteLocationParam; + + /** + * Body param: The name of the site. + */ + name?: string; + + /** + * Body param: Magic WAN Connector identifier tag. Used when high availability mode + * is on. + */ + secondary_connector_id?: string; +} + export interface SiteGetParams { /** * Identifier @@ -249,6 +295,7 @@ export namespace Sites { export import SiteUpdateParams = SitesAPI.SiteUpdateParams; export import SiteListParams = SitesAPI.SiteListParams; export import SiteDeleteParams = SitesAPI.SiteDeleteParams; + export import SiteEditParams = SitesAPI.SiteEditParams; export import SiteGetParams = SitesAPI.SiteGetParams; export import ACLs = ACLsAPI.ACLs; export import ACL = ACLsAPI.ACL; @@ -260,6 +307,7 @@ export namespace Sites { export import ACLUpdateParams = ACLsAPI.ACLUpdateParams; export import ACLListParams = ACLsAPI.ACLListParams; export import ACLDeleteParams = ACLsAPI.ACLDeleteParams; + export import ACLEditParams = ACLsAPI.ACLEditParams; export import ACLGetParams = ACLsAPI.ACLGetParams; export import LANs = LANsAPI.LANs; export import DHCPRelay = LANsAPI.DHCPRelay; @@ -274,6 +322,7 @@ export namespace Sites { export import LANUpdateParams = LANsAPI.LANUpdateParams; export import LANListParams = LANsAPI.LANListParams; export import LANDeleteParams = LANsAPI.LANDeleteParams; + export import LANEditParams = LANsAPI.LANEditParams; export import LANGetParams = LANsAPI.LANGetParams; export import WANs = WANsAPI.WANs; export import WAN = WANsAPI.WAN; @@ -284,5 +333,6 @@ export namespace Sites { export import WANUpdateParams = WANsAPI.WANUpdateParams; export import WANListParams = WANsAPI.WANListParams; export import WANDeleteParams = WANsAPI.WANDeleteParams; + export import WANEditParams = WANsAPI.WANEditParams; export import WANGetParams = WANsAPI.WANGetParams; } diff --git a/src/resources/magic-transit/sites/wans.ts b/src/resources/magic-transit/sites/wans.ts index 80ff42d5fb..d3d58d29bf 100644 --- a/src/resources/magic-transit/sites/wans.ts +++ b/src/resources/magic-transit/sites/wans.ts @@ -75,6 +75,24 @@ export class WANs extends APIResource { )._thenUnwrap((obj) => obj.result); } + /** + * Patch a specific WAN. + */ + edit( + siteId: string, + wanId: string, + params: WANEditParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.patch(`/accounts/${account_id}/magic/sites/${siteId}/wans/${wanId}`, { + body, + ...options, + }) as Core.APIPromise<{ result: WAN }> + )._thenUnwrap((obj) => obj.result); + } + /** * Get a specific WAN. */ @@ -252,6 +270,39 @@ export interface WANDeleteParams { account_id: string; } +export interface WANEditParams { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: + */ + name?: string; + + /** + * Body param: + */ + physport?: number; + + /** + * Body param: + */ + priority?: number; + + /** + * Body param: (optional) if omitted, use DHCP. Submit secondary_address when site + * is in high availability mode. + */ + static_addressing?: WANStaticAddressingParam; + + /** + * Body param: VLAN port number. + */ + vlan_tag?: number; +} + export interface WANGetParams { /** * Identifier @@ -268,5 +319,6 @@ export namespace WANs { export import WANUpdateParams = WANsAPI.WANUpdateParams; export import WANListParams = WANsAPI.WANListParams; export import WANDeleteParams = WANsAPI.WANDeleteParams; + export import WANEditParams = WANsAPI.WANEditParams; export import WANGetParams = WANsAPI.WANGetParams; } diff --git a/src/resources/zero-trust/risk-scoring/index.ts b/src/resources/zero-trust/risk-scoring/index.ts index a20f923015..97dfa937ea 100644 --- a/src/resources/zero-trust/risk-scoring/index.ts +++ b/src/resources/zero-trust/risk-scoring/index.ts @@ -6,6 +6,20 @@ export { BehaviourUpdateParams, Behaviours, } from './behaviours'; +export { + IntegrationCreateResponse, + IntegrationUpdateResponse, + IntegrationListResponse, + IntegrationDeleteResponse, + IntegrationGetResponse, + IntegrationCreateParams, + IntegrationUpdateParams, + IntegrationListParams, + IntegrationDeleteParams, + IntegrationGetParams, + IntegrationListResponsesSinglePage, + Integrations, +} from './integrations/index'; export { RiskScoringGetResponse, RiskScoringResetResponse, diff --git a/src/resources/zero-trust/risk-scoring/integrations/index.ts b/src/resources/zero-trust/risk-scoring/integrations/index.ts new file mode 100644 index 0000000000..f2630784e4 --- /dev/null +++ b/src/resources/zero-trust/risk-scoring/integrations/index.ts @@ -0,0 +1,17 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { + IntegrationCreateResponse, + IntegrationUpdateResponse, + IntegrationListResponse, + IntegrationDeleteResponse, + IntegrationGetResponse, + IntegrationCreateParams, + IntegrationUpdateParams, + IntegrationListParams, + IntegrationDeleteParams, + IntegrationGetParams, + IntegrationListResponsesSinglePage, + Integrations, +} from './integrations'; +export { ReferenceGetResponse, ReferenceGetParams, References } from './references'; diff --git a/src/resources/zero-trust/risk-scoring/integrations/integrations.ts b/src/resources/zero-trust/risk-scoring/integrations/integrations.ts new file mode 100644 index 0000000000..ac7e812e40 --- /dev/null +++ b/src/resources/zero-trust/risk-scoring/integrations/integrations.ts @@ -0,0 +1,321 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as IntegrationsAPI from './integrations'; +import * as ReferencesAPI from './references'; +import { SinglePage } from '../../../../pagination'; + +export class Integrations extends APIResource { + references: ReferencesAPI.References = new ReferencesAPI.References(this._client); + + /** + * Create new risk score integration. + */ + create( + params: IntegrationCreateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.post(`/accounts/${account_id}/zt_risk_scoring/integrations`, { + body, + ...options, + }) as Core.APIPromise<{ result: IntegrationCreateResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Update a risk score integration. + * + * Overwrite the reference_id, tenant_url, and active values with the ones provided + */ + update( + integrationId: string, + params: IntegrationUpdateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.put(`/accounts/${account_id}/zt_risk_scoring/integrations/${integrationId}`, { + body, + ...options, + }) as Core.APIPromise<{ result: IntegrationUpdateResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * List all risk score integrations for the account. + */ + list( + params: IntegrationListParams, + options?: Core.RequestOptions, + ): Core.PagePromise { + const { account_id } = params; + return this._client.getAPIList( + `/accounts/${account_id}/zt_risk_scoring/integrations`, + IntegrationListResponsesSinglePage, + options, + ); + } + + /** + * Delete a risk score integration. + */ + delete( + integrationId: string, + params: IntegrationDeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.delete( + `/accounts/${account_id}/zt_risk_scoring/integrations/${integrationId}`, + options, + ) as Core.APIPromise<{ result: IntegrationDeleteResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Get risk score integration by id. + */ + get( + integrationId: string, + params: IntegrationGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.get( + `/accounts/${account_id}/zt_risk_scoring/integrations/${integrationId}`, + options, + ) as Core.APIPromise<{ result: IntegrationGetResponse }> + )._thenUnwrap((obj) => obj.result); + } +} + +export class IntegrationListResponsesSinglePage extends SinglePage {} + +export interface IntegrationCreateResponse { + /** + * The id of the integration, a UUIDv4. + */ + id: string; + + /** + * The Cloudflare account tag. + */ + account_tag: string; + + /** + * Whether this integration is enabled and should export changes in risk score. + */ + active: boolean; + + /** + * When the integration was created in RFC3339 format. + */ + created_at: string; + + integration_type: 'Okta'; + + /** + * A reference ID defined by the client. Should be set to the Access-Okta IDP + * integration ID. Useful when the risk-score integration needs to be associated + * with a secondary asset and recalled using that ID. + */ + reference_id: string; + + /** + * The base URL for the tenant. E.g. "https://tenant.okta.com" + */ + tenant_url: string; +} + +export interface IntegrationUpdateResponse { + /** + * The id of the integration, a UUIDv4. + */ + id: string; + + /** + * The Cloudflare account tag. + */ + account_tag: string; + + /** + * Whether this integration is enabled and should export changes in risk score. + */ + active: boolean; + + /** + * When the integration was created in RFC3339 format. + */ + created_at: string; + + integration_type: 'Okta'; + + /** + * A reference ID defined by the client. Should be set to the Access-Okta IDP + * integration ID. Useful when the risk-score integration needs to be associated + * with a secondary asset and recalled using that ID. + */ + reference_id: string; + + /** + * The base URL for the tenant. E.g. "https://tenant.okta.com" + */ + tenant_url: string; +} + +export interface IntegrationListResponse { + /** + * The id of the integration, a UUIDv4. + */ + id: string; + + /** + * The Cloudflare account tag. + */ + account_tag: string; + + /** + * Whether this integration is enabled and should export changes in risk score. + */ + active: boolean; + + /** + * When the integration was created in RFC3339 format. + */ + created_at: string; + + integration_type: 'Okta'; + + /** + * A reference ID defined by the client. Should be set to the Access-Okta IDP + * integration ID. Useful when the risk-score integration needs to be associated + * with a secondary asset and recalled using that ID. + */ + reference_id: string; + + /** + * The base URL for the tenant. E.g. "https://tenant.okta.com" + */ + tenant_url: string; +} + +export type IntegrationDeleteResponse = unknown; + +export interface IntegrationGetResponse { + /** + * The id of the integration, a UUIDv4. + */ + id: string; + + /** + * The Cloudflare account tag. + */ + account_tag: string; + + /** + * Whether this integration is enabled and should export changes in risk score. + */ + active: boolean; + + /** + * When the integration was created in RFC3339 format. + */ + created_at: string; + + integration_type: 'Okta'; + + /** + * A reference ID defined by the client. Should be set to the Access-Okta IDP + * integration ID. Useful when the risk-score integration needs to be associated + * with a secondary asset and recalled using that ID. + */ + reference_id: string; + + /** + * The base URL for the tenant. E.g. "https://tenant.okta.com" + */ + tenant_url: string; +} + +export interface IntegrationCreateParams { + /** + * Path param: + */ + account_id: string; + + /** + * Body param: + */ + integration_type: 'Okta'; + + /** + * Body param: The base url of the tenant, e.g. "https://tenant.okta.com" + */ + tenant_url: string; + + /** + * Body param: A reference id that can be supplied by the client. Currently this + * should be set to the Access-Okta IDP ID (a UUIDv4). + * https://developers.cloudflare.com/api/operations/access-identity-providers-get-an-access-identity-provider + */ + reference_id?: string | null; +} + +export interface IntegrationUpdateParams { + /** + * Path param: + */ + account_id: string; + + /** + * Body param: Whether this integration is enabled. If disabled, no risk changes + * will be exported to the third-party. + */ + active: boolean; + + /** + * Body param: The base url of the tenant, e.g. "https://tenant.okta.com" + */ + tenant_url: string; + + /** + * Body param: A reference id that can be supplied by the client. Currently this + * should be set to the Access-Okta IDP ID (a UUIDv4). + * https://developers.cloudflare.com/api/operations/access-identity-providers-get-an-access-identity-provider + */ + reference_id?: string | null; +} + +export interface IntegrationListParams { + account_id: string; +} + +export interface IntegrationDeleteParams { + account_id: string; +} + +export interface IntegrationGetParams { + account_id: string; +} + +export namespace Integrations { + export import IntegrationCreateResponse = IntegrationsAPI.IntegrationCreateResponse; + export import IntegrationUpdateResponse = IntegrationsAPI.IntegrationUpdateResponse; + export import IntegrationListResponse = IntegrationsAPI.IntegrationListResponse; + export import IntegrationDeleteResponse = IntegrationsAPI.IntegrationDeleteResponse; + export import IntegrationGetResponse = IntegrationsAPI.IntegrationGetResponse; + export import IntegrationListResponsesSinglePage = IntegrationsAPI.IntegrationListResponsesSinglePage; + export import IntegrationCreateParams = IntegrationsAPI.IntegrationCreateParams; + export import IntegrationUpdateParams = IntegrationsAPI.IntegrationUpdateParams; + export import IntegrationListParams = IntegrationsAPI.IntegrationListParams; + export import IntegrationDeleteParams = IntegrationsAPI.IntegrationDeleteParams; + export import IntegrationGetParams = IntegrationsAPI.IntegrationGetParams; + export import References = ReferencesAPI.References; + export import ReferenceGetResponse = ReferencesAPI.ReferenceGetResponse; + export import ReferenceGetParams = ReferencesAPI.ReferenceGetParams; +} diff --git a/src/resources/zero-trust/risk-scoring/integrations/references.ts b/src/resources/zero-trust/risk-scoring/integrations/references.ts new file mode 100644 index 0000000000..54a8b84fb8 --- /dev/null +++ b/src/resources/zero-trust/risk-scoring/integrations/references.ts @@ -0,0 +1,69 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as ReferencesAPI from './references'; + +export class References extends APIResource { + /** + * Get risk score integration by reference id. + */ + get( + referenceId: string, + params: ReferenceGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.get( + `/accounts/${account_id}/zt_risk_scoring/integrations/reference_id/${referenceId}`, + options, + ) as Core.APIPromise<{ result: ReferenceGetResponse }> + )._thenUnwrap((obj) => obj.result); + } +} + +export interface ReferenceGetResponse { + /** + * The id of the integration, a UUIDv4. + */ + id: string; + + /** + * The Cloudflare account tag. + */ + account_tag: string; + + /** + * Whether this integration is enabled and should export changes in risk score. + */ + active: boolean; + + /** + * When the integration was created in RFC3339 format. + */ + created_at: string; + + integration_type: 'Okta'; + + /** + * A reference ID defined by the client. Should be set to the Access-Okta IDP + * integration ID. Useful when the risk-score integration needs to be associated + * with a secondary asset and recalled using that ID. + */ + reference_id: string; + + /** + * The base URL for the tenant. E.g. "https://tenant.okta.com" + */ + tenant_url: string; +} + +export interface ReferenceGetParams { + account_id: string; +} + +export namespace References { + export import ReferenceGetResponse = ReferencesAPI.ReferenceGetResponse; + export import ReferenceGetParams = ReferencesAPI.ReferenceGetParams; +} diff --git a/src/resources/zero-trust/risk-scoring/risk-scoring.ts b/src/resources/zero-trust/risk-scoring/risk-scoring.ts index 6f4e81aab3..5c3111b09a 100644 --- a/src/resources/zero-trust/risk-scoring/risk-scoring.ts +++ b/src/resources/zero-trust/risk-scoring/risk-scoring.ts @@ -6,10 +6,12 @@ import { isRequestOptions } from '../../../core'; import * as RiskScoringAPI from './risk-scoring'; import * as BehavioursAPI from './behaviours'; import * as SummaryAPI from './summary'; +import * as IntegrationsAPI from './integrations/integrations'; export class RiskScoring extends APIResource { behaviours: BehavioursAPI.Behaviours = new BehavioursAPI.Behaviours(this._client); summary: SummaryAPI.Summary = new SummaryAPI.Summary(this._client); + integrations: IntegrationsAPI.Integrations = new IntegrationsAPI.Integrations(this._client); /** * Get risk event/score information for a specific user @@ -108,4 +110,16 @@ export namespace RiskScoring { export import Summary = SummaryAPI.Summary; export import SummaryGetResponse = SummaryAPI.SummaryGetResponse; export import SummaryGetParams = SummaryAPI.SummaryGetParams; + export import Integrations = IntegrationsAPI.Integrations; + export import IntegrationCreateResponse = IntegrationsAPI.IntegrationCreateResponse; + export import IntegrationUpdateResponse = IntegrationsAPI.IntegrationUpdateResponse; + export import IntegrationListResponse = IntegrationsAPI.IntegrationListResponse; + export import IntegrationDeleteResponse = IntegrationsAPI.IntegrationDeleteResponse; + export import IntegrationGetResponse = IntegrationsAPI.IntegrationGetResponse; + export import IntegrationListResponsesSinglePage = IntegrationsAPI.IntegrationListResponsesSinglePage; + export import IntegrationCreateParams = IntegrationsAPI.IntegrationCreateParams; + export import IntegrationUpdateParams = IntegrationsAPI.IntegrationUpdateParams; + export import IntegrationListParams = IntegrationsAPI.IntegrationListParams; + export import IntegrationDeleteParams = IntegrationsAPI.IntegrationDeleteParams; + export import IntegrationGetParams = IntegrationsAPI.IntegrationGetParams; } diff --git a/tests/api-resources/d1/database.test.ts b/tests/api-resources/d1/database.test.ts index 8deb5aa1ea..c13216b1b2 100644 --- a/tests/api-resources/d1/database.test.ts +++ b/tests/api-resources/d1/database.test.ts @@ -50,4 +50,64 @@ describe('resource database', () => { per_page: 10, }); }); + + test('delete: only required params', async () => { + const responsePromise = cloudflare.d1.database.delete('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', { + account_id: '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); + }); + + test('delete: required and optional params', async () => { + const response = await cloudflare.d1.database.delete('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); + + test('get: only required params', async () => { + const responsePromise = cloudflare.d1.database.get('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', { + account_id: '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); + }); + + test('get: required and optional params', async () => { + const response = await cloudflare.d1.database.get('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); + + test('query: only required params', async () => { + const responsePromise = cloudflare.d1.database.query('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + sql: 'SELECT * FROM myTable WHERE field = ? OR field = ?;', + }); + 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('query: required and optional params', async () => { + const response = await cloudflare.d1.database.query('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + sql: 'SELECT * FROM myTable WHERE field = ? OR field = ?;', + params: ['firstParam', 'secondParam'], + }); + }); }); diff --git a/tests/api-resources/magic-transit/sites/acls.test.ts b/tests/api-resources/magic-transit/sites/acls.test.ts index f5468401e1..87763d424d 100644 --- a/tests/api-resources/magic-transit/sites/acls.test.ts +++ b/tests/api-resources/magic-transit/sites/acls.test.ts @@ -131,6 +131,47 @@ describe('resource acls', () => { ); }); + test('edit: only required params', async () => { + const responsePromise = cloudflare.magicTransit.sites.acls.edit( + '023e105f4ecef8ad9ca31a8372d0c353', + '023e105f4ecef8ad9ca31a8372d0c353', + { account_id: '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); + }); + + test('edit: required and optional params', async () => { + const response = await cloudflare.magicTransit.sites.acls.edit( + '023e105f4ecef8ad9ca31a8372d0c353', + '023e105f4ecef8ad9ca31a8372d0c353', + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + description: 'Allows local traffic between PIN pads and cash register.', + forward_locally: true, + lan_1: { + lan_id: 'string', + lan_name: 'string', + ports: [1, 1, 1], + subnets: ['192.0.2.1', '192.0.2.1', '192.0.2.1'], + }, + lan_2: { + lan_id: 'string', + lan_name: 'string', + ports: [1, 1, 1], + subnets: ['192.0.2.1', '192.0.2.1', '192.0.2.1'], + }, + name: 'PIN Pad - Cash Register', + protocols: ['tcp', 'udp', 'icmp'], + }, + ); + }); + test('get: only required params', async () => { const responsePromise = cloudflare.magicTransit.sites.acls.get( '023e105f4ecef8ad9ca31a8372d0c353', diff --git a/tests/api-resources/magic-transit/sites/lans.test.ts b/tests/api-resources/magic-transit/sites/lans.test.ts index 0cdc11012e..f4b5abda36 100644 --- a/tests/api-resources/magic-transit/sites/lans.test.ts +++ b/tests/api-resources/magic-transit/sites/lans.test.ts @@ -141,6 +141,52 @@ describe('resource lans', () => { ); }); + test('edit: only required params', async () => { + const responsePromise = cloudflare.magicTransit.sites.lans.edit( + '023e105f4ecef8ad9ca31a8372d0c353', + '023e105f4ecef8ad9ca31a8372d0c353', + { account_id: '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); + }); + + test('edit: required and optional params', async () => { + const response = await cloudflare.magicTransit.sites.lans.edit( + '023e105f4ecef8ad9ca31a8372d0c353', + '023e105f4ecef8ad9ca31a8372d0c353', + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + name: 'string', + nat: { static_prefix: '192.0.2.0/24' }, + physport: 1, + routed_subnets: [ + { nat: { static_prefix: '192.0.2.0/24' }, next_hop: '192.0.2.1', prefix: '192.0.2.0/24' }, + { nat: { static_prefix: '192.0.2.0/24' }, next_hop: '192.0.2.1', prefix: '192.0.2.0/24' }, + { nat: { static_prefix: '192.0.2.0/24' }, next_hop: '192.0.2.1', prefix: '192.0.2.0/24' }, + ], + static_addressing: { + address: '192.0.2.0/24', + dhcp_relay: { server_addresses: ['192.0.2.1', '192.0.2.1', '192.0.2.1'] }, + dhcp_server: { + dhcp_pool_end: '192.0.2.1', + dhcp_pool_start: '192.0.2.1', + dns_server: '192.0.2.1', + reservations: { '00:11:22:33:44:55': '192.0.2.100', 'AA:BB:CC:DD:EE:FF': '192.168.1.101' }, + }, + secondary_address: '192.0.2.0/24', + virtual_address: '192.0.2.0/24', + }, + vlan_tag: 0, + }, + ); + }); + test('get: only required params', async () => { const responsePromise = cloudflare.magicTransit.sites.lans.get( '023e105f4ecef8ad9ca31a8372d0c353', diff --git a/tests/api-resources/magic-transit/sites/sites.test.ts b/tests/api-resources/magic-transit/sites/sites.test.ts index 8f3288195d..3c5313d0b1 100644 --- a/tests/api-resources/magic-transit/sites/sites.test.ts +++ b/tests/api-resources/magic-transit/sites/sites.test.ts @@ -99,6 +99,30 @@ describe('resource sites', () => { }); }); + test('edit: only required params', async () => { + const responsePromise = cloudflare.magicTransit.sites.edit('023e105f4ecef8ad9ca31a8372d0c353', { + account_id: '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); + }); + + test('edit: required and optional params', async () => { + const response = await cloudflare.magicTransit.sites.edit('023e105f4ecef8ad9ca31a8372d0c353', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + connector_id: 'ac60d3d0435248289d446cedd870bcf4', + description: 'string', + location: { lat: '37.6192', lon: '122.3816' }, + name: 'site_1', + secondary_connector_id: '8d67040d3835dbcf46ce29da440dc482', + }); + }); + test('get: only required params', async () => { const responsePromise = cloudflare.magicTransit.sites.get('023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', diff --git a/tests/api-resources/magic-transit/sites/wans.test.ts b/tests/api-resources/magic-transit/sites/wans.test.ts index c6aaab40cc..335d1092da 100644 --- a/tests/api-resources/magic-transit/sites/wans.test.ts +++ b/tests/api-resources/magic-transit/sites/wans.test.ts @@ -116,6 +116,40 @@ describe('resource wans', () => { ); }); + test('edit: only required params', async () => { + const responsePromise = cloudflare.magicTransit.sites.wans.edit( + '023e105f4ecef8ad9ca31a8372d0c353', + '023e105f4ecef8ad9ca31a8372d0c353', + { account_id: '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); + }); + + test('edit: required and optional params', async () => { + const response = await cloudflare.magicTransit.sites.wans.edit( + '023e105f4ecef8ad9ca31a8372d0c353', + '023e105f4ecef8ad9ca31a8372d0c353', + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + name: 'string', + physport: 1, + priority: 0, + static_addressing: { + address: '192.0.2.0/24', + gateway_address: '192.0.2.1', + secondary_address: '192.0.2.0/24', + }, + vlan_tag: 0, + }, + ); + }); + test('get: only required params', async () => { const responsePromise = cloudflare.magicTransit.sites.wans.get( '023e105f4ecef8ad9ca31a8372d0c353', diff --git a/tests/api-resources/zero-trust/risk-scoring/integrations/integrations.test.ts b/tests/api-resources/zero-trust/risk-scoring/integrations/integrations.test.ts new file mode 100644 index 0000000000..d27a386214 --- /dev/null +++ b/tests/api-resources/zero-trust/risk-scoring/integrations/integrations.test.ts @@ -0,0 +1,114 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource integrations', () => { + test('create: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.riskScoring.integrations.create({ + account_id: 'string', + integration_type: 'Okta', + tenant_url: 'https://example.com', + }); + 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('create: required and optional params', async () => { + const response = await cloudflare.zeroTrust.riskScoring.integrations.create({ + account_id: 'string', + integration_type: 'Okta', + tenant_url: 'https://example.com', + reference_id: 'string', + }); + }); + + test('update: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.riskScoring.integrations.update( + '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + { account_id: 'string', active: true, tenant_url: 'https://example.com' }, + ); + 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('update: required and optional params', async () => { + const response = await cloudflare.zeroTrust.riskScoring.integrations.update( + '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + { account_id: 'string', active: true, tenant_url: 'https://example.com', reference_id: 'string' }, + ); + }); + + test('list: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.riskScoring.integrations.list({ account_id: 'string' }); + 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('list: required and optional params', async () => { + const response = await cloudflare.zeroTrust.riskScoring.integrations.list({ account_id: 'string' }); + }); + + test('delete: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.riskScoring.integrations.delete( + '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + { account_id: 'string' }, + ); + 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('delete: required and optional params', async () => { + const response = await cloudflare.zeroTrust.riskScoring.integrations.delete( + '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + { account_id: 'string' }, + ); + }); + + test('get: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.riskScoring.integrations.get( + '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + { account_id: 'string' }, + ); + 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('get: required and optional params', async () => { + const response = await cloudflare.zeroTrust.riskScoring.integrations.get( + '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + { account_id: 'string' }, + ); + }); +}); diff --git a/tests/api-resources/zero-trust/risk-scoring/integrations/references.test.ts b/tests/api-resources/zero-trust/risk-scoring/integrations/references.test.ts new file mode 100644 index 0000000000..e95f034e24 --- /dev/null +++ b/tests/api-resources/zero-trust/risk-scoring/integrations/references.test.ts @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource references', () => { + test('get: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.riskScoring.integrations.references.get('string', { + account_id: 'string', + }); + 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('get: required and optional params', async () => { + const response = await cloudflare.zeroTrust.riskScoring.integrations.references.get('string', { + account_id: 'string', + }); + }); +}); From d2a9cb933ae9eee72b7de272bdc96ba5d75c0189 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 10:41:03 +0000 Subject: [PATCH 076/473] feat(api): OpenAPI spec update via Stainless API (#573) --- .stats.yml | 2 +- src/resources/ai-gateway/ai-gateway.ts | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0346a89ff9..c6d377283f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-241f970730129e553d466806420a1cf2f6d665abec11667004cb9cf070932a1e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2bddc40a8ff2dca86129579a3be28dccb6e6376cde30e50c62641a366280395c.yml diff --git a/src/resources/ai-gateway/ai-gateway.ts b/src/resources/ai-gateway/ai-gateway.ts index 6d8a29cd23..6f4df4ccbb 100644 --- a/src/resources/ai-gateway/ai-gateway.ts +++ b/src/resources/ai-gateway/ai-gateway.ts @@ -98,7 +98,7 @@ export interface AIGatewayCreateResponse { export namespace AIGatewayCreateResponse { export interface Task { /** - * gateway slug + * gateway id */ id: string; @@ -122,7 +122,7 @@ export namespace AIGatewayCreateResponse { export interface AIGatewayUpdateResponse { /** - * gateway slug + * gateway id */ id: string; @@ -145,7 +145,7 @@ export interface AIGatewayUpdateResponse { export interface AIGatewayListResponse { /** - * gateway slug + * gateway id */ id: string; @@ -168,7 +168,7 @@ export interface AIGatewayListResponse { export interface AIGatewayDeleteResponse { /** - * gateway slug + * gateway id */ id: string; @@ -191,7 +191,7 @@ export interface AIGatewayDeleteResponse { export interface AIGatewayGetResponse { /** - * gateway slug + * gateway id */ id: string; @@ -219,7 +219,7 @@ export interface AIGatewayCreateParams { account_id: string; /** - * Body param: gateway slug + * Body param: gateway id */ id: string; @@ -298,7 +298,7 @@ export interface AIGatewayListParams extends V4PagePaginationArrayParams { account_id: string; /** - * Query param: gateway slug + * Query param: gateway id */ id?: string; From 278979651dc1ee30b0071640d7e53923bdb0c567 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 12:43:12 +0000 Subject: [PATCH 077/473] feat(api): OpenAPI spec update via Stainless API (#574) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index c6d377283f..b8ca6c43b4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2bddc40a8ff2dca86129579a3be28dccb6e6376cde30e50c62641a366280395c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f3f9d81bde471bad0925995e3daa241250e84a4312b56a83ae28196fb683cb77.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 02c9af2701da5e6fe032a239db400d3c43c958d1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 12:45:41 +0000 Subject: [PATCH 078/473] feat(api): OpenAPI spec update via Stainless API (#575) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index b8ca6c43b4..c6d377283f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f3f9d81bde471bad0925995e3daa241250e84a4312b56a83ae28196fb683cb77.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2bddc40a8ff2dca86129579a3be28dccb6e6376cde30e50c62641a366280395c.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From fae19b238ba84d86805ac7f2e8d68dbfe3b5b6c5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 14:03:09 +0000 Subject: [PATCH 079/473] feat(api): OpenAPI spec update via Stainless API (#576) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index c6d377283f..b8ca6c43b4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2bddc40a8ff2dca86129579a3be28dccb6e6376cde30e50c62641a366280395c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f3f9d81bde471bad0925995e3daa241250e84a4312b56a83ae28196fb683cb77.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From b66a81f9be4f77ee0aee35263d1acfc52e0b75de Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 15:14:37 +0000 Subject: [PATCH 080/473] feat(api): OpenAPI spec update via Stainless API (#577) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index b8ca6c43b4..785e840739 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f3f9d81bde471bad0925995e3daa241250e84a4312b56a83ae28196fb683cb77.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eac0a33bed194093caab0eee016a8225cbd4af5bf185da2242f444e73f279cc4.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From e7da0841ff97ddaeaa29c2e4a0117aa54cf717a4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 15:17:08 +0000 Subject: [PATCH 081/473] feat(api): OpenAPI spec update via Stainless API (#578) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 785e840739..c6d377283f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eac0a33bed194093caab0eee016a8225cbd4af5bf185da2242f444e73f279cc4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2bddc40a8ff2dca86129579a3be28dccb6e6376cde30e50c62641a366280395c.yml From 459420daaecbc886e56ab67c43630ff6f5cd7515 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 16:28:53 +0000 Subject: [PATCH 082/473] feat(api): OpenAPI spec update via Stainless API (#579) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index c6d377283f..ab6d60b97f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2bddc40a8ff2dca86129579a3be28dccb6e6376cde30e50c62641a366280395c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-89ee887e776dbd6a951c5ec86b7554f3f1eeb4862460b3242f23e1b6f33f6d3c.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 4e6cfbee45f9f99d1c208febaab843cf91fde5e9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 18:01:12 +0000 Subject: [PATCH 083/473] feat(api): OpenAPI spec update via Stainless API (#580) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index ab6d60b97f..7da1a9b0ce 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-89ee887e776dbd6a951c5ec86b7554f3f1eeb4862460b3242f23e1b6f33f6d3c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2c59ba17fb766d9e90a181533e4a331d5bd1f1bf9d2f4ede385e68a40eed3c15.yml From d9a5fa37ed84c6df5be7ddc7b227f0a890386945 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 19:17:06 +0000 Subject: [PATCH 084/473] feat(api): OpenAPI spec update via Stainless API (#581) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7da1a9b0ce..4d55a91598 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2c59ba17fb766d9e90a181533e4a331d5bd1f1bf9d2f4ede385e68a40eed3c15.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-da87625c4b73e80b854a5d9c24c950c288ffc20910e51369326afa5749108968.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From c4abdc3b24fa9b762c110dd2f2e8a4496f825d6d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 19:19:40 +0000 Subject: [PATCH 085/473] feat(api): OpenAPI spec update via Stainless API (#582) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4d55a91598..7da1a9b0ce 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-da87625c4b73e80b854a5d9c24c950c288ffc20910e51369326afa5749108968.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2c59ba17fb766d9e90a181533e4a331d5bd1f1bf9d2f4ede385e68a40eed3c15.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 476c53bafd1ae8f5191e33ba1608ed4a176ac98a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 20:07:42 +0000 Subject: [PATCH 086/473] feat(api): OpenAPI spec update via Stainless API (#583) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7da1a9b0ce..4d55a91598 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2c59ba17fb766d9e90a181533e4a331d5bd1f1bf9d2f4ede385e68a40eed3c15.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-da87625c4b73e80b854a5d9c24c950c288ffc20910e51369326afa5749108968.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From fb663dc6897f82b3dac6ebdf1b45f279650eb141 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 18 May 2024 03:25:01 +0000 Subject: [PATCH 087/473] feat(api): OpenAPI spec update via Stainless API (#584) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4d55a91598..7da1a9b0ce 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-da87625c4b73e80b854a5d9c24c950c288ffc20910e51369326afa5749108968.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2c59ba17fb766d9e90a181533e4a331d5bd1f1bf9d2f4ede385e68a40eed3c15.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 80086c772aeff53f15f9956f358e5a2be2b0fe09 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 18 May 2024 15:50:20 +0000 Subject: [PATCH 088/473] feat(api): OpenAPI spec update via Stainless API (#585) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 7da1a9b0ce..ab6d60b97f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2c59ba17fb766d9e90a181533e4a331d5bd1f1bf9d2f4ede385e68a40eed3c15.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-89ee887e776dbd6a951c5ec86b7554f3f1eeb4862460b3242f23e1b6f33f6d3c.yml From 0bfcee541e2a3c48d6546b13ab7ecc0ca517bf2a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 18 May 2024 22:34:53 +0000 Subject: [PATCH 089/473] feat(api): OpenAPI spec update via Stainless API (#586) --- .stats.yml | 2 +- src/resources/ai-gateway/logs.ts | 2 ++ .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 5 files changed, 24 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index ab6d60b97f..d9059b7583 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-89ee887e776dbd6a951c5ec86b7554f3f1eeb4862460b3242f23e1b6f33f6d3c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f7238fca4bd92278986ecff5ad03ddd7a3e5c7a2d314fcd127d8db2bbd561a13.yml diff --git a/src/resources/ai-gateway/logs.ts b/src/resources/ai-gateway/logs.ts index 1b5b3552d1..0aa5e7aa58 100644 --- a/src/resources/ai-gateway/logs.ts +++ b/src/resources/ai-gateway/logs.ts @@ -47,6 +47,8 @@ export namespace LogGetResponse { tokens_out: number; + metadata?: string; + status_code?: number; } } diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From cef712b9c6a569c6ef89a411b20a4fcf667d646d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 08:01:14 +0000 Subject: [PATCH 090/473] feat(api): OpenAPI spec update via Stainless API (#587) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d9059b7583..f77190ce8c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f7238fca4bd92278986ecff5ad03ddd7a3e5c7a2d314fcd127d8db2bbd561a13.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-89c1a9e0b56e471e0daa8305cfaed0fb3ef444411a6e93f115aa3de048e0cb41.yml From a3c2cd661584367faa9bf5ffe421ef69804b9cdf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 10:38:23 +0000 Subject: [PATCH 091/473] feat(api): OpenAPI spec update via Stainless API (#588) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index f77190ce8c..e1cbe685c9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-89c1a9e0b56e471e0daa8305cfaed0fb3ef444411a6e93f115aa3de048e0cb41.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5a370326545e1864f613b392685310d85216beb70c9bf625f19f929af4def53b.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 3a691e9cb857171f71ec7ae859a53a0bbd06d5fe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 10:42:22 +0000 Subject: [PATCH 092/473] feat(api): OpenAPI spec update via Stainless API (#589) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e1cbe685c9..19b959aea4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5a370326545e1864f613b392685310d85216beb70c9bf625f19f929af4def53b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-82a7004b51d1761f2cb3a5aaae83f56af924ab0c26564cfe294ad55734adf373.yml From 988885b64c1d23b04b601b959dede2cd2c8f7c44 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 12:52:53 +0000 Subject: [PATCH 093/473] feat(api): OpenAPI spec update via Stainless API (#590) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 19b959aea4..d9059b7583 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-82a7004b51d1761f2cb3a5aaae83f56af924ab0c26564cfe294ad55734adf373.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f7238fca4bd92278986ecff5ad03ddd7a3e5c7a2d314fcd127d8db2bbd561a13.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 1b224ab135f63e322b9d19425991410826d7c1ab Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 15:08:04 +0000 Subject: [PATCH 094/473] feat(api): OpenAPI spec update via Stainless API (#591) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ src/resources/stream/copy.ts | 4 ++-- src/resources/stream/direct-upload.ts | 5 ++++- src/resources/stream/stream.ts | 4 ++-- .../dispatch/namespaces/scripts/content.ts | 6 +++-- src/resources/workers/scripts/content.ts | 6 +++-- 9 files changed, 62 insertions(+), 31 deletions(-) diff --git a/.stats.yml b/.stats.yml index d9059b7583..e1cbe685c9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f7238fca4bd92278986ecff5ad03ddd7a3e5c7a2d314fcd127d8db2bbd561a13.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5a370326545e1864f613b392685310d85216beb70c9bf625f19f929af4def53b.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** diff --git a/src/resources/stream/copy.ts b/src/resources/stream/copy.ts index af4f2dc0a9..a21d605971 100644 --- a/src/resources/stream/copy.ts +++ b/src/resources/stream/copy.ts @@ -21,8 +21,8 @@ export class Copy extends APIResource { body, ...options, headers: { - 'Upload-Creator': uploadCreator || '', - 'Upload-Metadata': uploadMetadata || '', + ...(uploadCreator != null ? { 'Upload-Creator': uploadCreator } : undefined), + ...(uploadMetadata != null ? { 'Upload-Metadata': uploadMetadata } : undefined), ...options?.headers, }, }) as Core.APIPromise<{ result: StreamAPI.Video }> diff --git a/src/resources/stream/direct-upload.ts b/src/resources/stream/direct-upload.ts index b55c288ba6..b02c8f2424 100644 --- a/src/resources/stream/direct-upload.ts +++ b/src/resources/stream/direct-upload.ts @@ -19,7 +19,10 @@ export class DirectUpload extends APIResource { this._client.post(`/accounts/${account_id}/stream/direct_upload`, { body, ...options, - headers: { 'Upload-Creator': uploadCreator || '', ...options?.headers }, + headers: { + ...(uploadCreator != null ? { 'Upload-Creator': uploadCreator } : undefined), + ...options?.headers, + }, }) as Core.APIPromise<{ result: DirectUploadCreateResponse }> )._thenUnwrap((obj) => obj.result); } diff --git a/src/resources/stream/stream.ts b/src/resources/stream/stream.ts index 3805afcc5e..cccac4d14d 100644 --- a/src/resources/stream/stream.ts +++ b/src/resources/stream/stream.ts @@ -54,8 +54,8 @@ export class Stream extends APIResource { Accept: '*/*', 'Tus-Resumable': tusResumable.toString(), 'Upload-Length': uploadLength.toString(), - 'Upload-Creator': uploadCreator || '', - 'Upload-Metadata': uploadMetadata || '', + ...(uploadCreator != null ? { 'Upload-Creator': uploadCreator } : undefined), + ...(uploadMetadata != null ? { 'Upload-Metadata': uploadMetadata } : undefined), ...options?.headers, }, }); diff --git a/src/resources/workers-for-platforms/dispatch/namespaces/scripts/content.ts b/src/resources/workers-for-platforms/dispatch/namespaces/scripts/content.ts index 5ba04d7e15..e6f69eb8e1 100644 --- a/src/resources/workers-for-platforms/dispatch/namespaces/scripts/content.ts +++ b/src/resources/workers-for-platforms/dispatch/namespaces/scripts/content.ts @@ -31,8 +31,10 @@ export class Content extends APIResource { body, ...options, headers: { - 'CF-WORKER-BODY-PART': cfWorkerBodyPart || '', - 'CF-WORKER-MAIN-MODULE-PART': cfWorkerMainModulePart || '', + ...(cfWorkerBodyPart != null ? { 'CF-WORKER-BODY-PART': cfWorkerBodyPart } : undefined), + ...(cfWorkerMainModulePart != null ? + { 'CF-WORKER-MAIN-MODULE-PART': cfWorkerMainModulePart } + : undefined), ...options?.headers, }, }), diff --git a/src/resources/workers/scripts/content.ts b/src/resources/workers/scripts/content.ts index d13a80c486..c4c6210b75 100644 --- a/src/resources/workers/scripts/content.ts +++ b/src/resources/workers/scripts/content.ts @@ -30,8 +30,10 @@ export class Content extends APIResource { body, ...options, headers: { - 'CF-WORKER-BODY-PART': cfWorkerBodyPart || '', - 'CF-WORKER-MAIN-MODULE-PART': cfWorkerMainModulePart || '', + ...(cfWorkerBodyPart != null ? { 'CF-WORKER-BODY-PART': cfWorkerBodyPart } : undefined), + ...(cfWorkerMainModulePart != null ? + { 'CF-WORKER-MAIN-MODULE-PART': cfWorkerMainModulePart } + : undefined), ...options?.headers, }, }), From 07aa807ab99c6e6bba0e7ac947b92261de65f130 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 15:10:49 +0000 Subject: [PATCH 095/473] feat(api): OpenAPI spec update via Stainless API (#592) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e1cbe685c9..19b959aea4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5a370326545e1864f613b392685310d85216beb70c9bf625f19f929af4def53b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-82a7004b51d1761f2cb3a5aaae83f56af924ab0c26564cfe294ad55734adf373.yml From 5ac18b4c98d0d3a2cc22b118e8860a5e69ddb208 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 15:14:05 +0000 Subject: [PATCH 096/473] feat(api): OpenAPI spec update via Stainless API (#593) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 19b959aea4..f77190ce8c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-82a7004b51d1761f2cb3a5aaae83f56af924ab0c26564cfe294ad55734adf373.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-89c1a9e0b56e471e0daa8305cfaed0fb3ef444411a6e93f115aa3de048e0cb41.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 6870529b6615866ffbf17557bc3fe196b59c11ce Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 16:54:52 +0000 Subject: [PATCH 097/473] feat(api): OpenAPI spec update via Stainless API (#594) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index f77190ce8c..e1cbe685c9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-89c1a9e0b56e471e0daa8305cfaed0fb3ef444411a6e93f115aa3de048e0cb41.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5a370326545e1864f613b392685310d85216beb70c9bf625f19f929af4def53b.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 061ddd22e07a2fbbd0ec51075a4983f49dfaf947 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 17:04:22 +0000 Subject: [PATCH 098/473] feat(api): OpenAPI spec update via Stainless API (#595) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index e1cbe685c9..d9059b7583 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5a370326545e1864f613b392685310d85216beb70c9bf625f19f929af4def53b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f7238fca4bd92278986ecff5ad03ddd7a3e5c7a2d314fcd127d8db2bbd561a13.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 3ff928bc474a003be804c474daca8d49ba752554 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 17:08:00 +0000 Subject: [PATCH 099/473] feat(api): OpenAPI spec update via Stainless API (#596) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++++++----- .../cloudforce-one/requests/priority.ts | 22 ++++++++++----- .../cloudforce-one/requests/requests.ts | 22 ++++++++++----- src/resources/magic-transit/connectors.ts | 18 ++++++++---- .../magic-transit/connectors.test.ts | 28 +++++++++++++------ 6 files changed, 78 insertions(+), 36 deletions(-) diff --git a/.stats.yml b/.stats.yml index d9059b7583..ca2b4a1f25 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f7238fca4bd92278986ecff5ad03ddd7a3e5c7a2d314fcd127d8db2bbd561a13.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4661c57253723a62858ec11879e101250e22c7702521b0aedd61e852a5d6e4e9.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** diff --git a/src/resources/magic-transit/connectors.ts b/src/resources/magic-transit/connectors.ts index 638027f693..ba09bbf370 100644 --- a/src/resources/magic-transit/connectors.ts +++ b/src/resources/magic-transit/connectors.ts @@ -197,9 +197,9 @@ export namespace ConnectorGetResponse { export interface ConnectorUpdateParams { /** - * Path param: + * Path param: Account identifier */ - account_id: number; + account_id: string; /** * Body param: @@ -228,14 +228,17 @@ export interface ConnectorUpdateParams { } export interface ConnectorListParams { - account_id: number; + /** + * Account identifier + */ + account_id: string; } export interface ConnectorEditParams { /** - * Path param: + * Path param: Account identifier */ - account_id: number; + account_id: string; /** * Body param: @@ -264,7 +267,10 @@ export interface ConnectorEditParams { } export interface ConnectorGetParams { - account_id: number; + /** + * Account identifier + */ + account_id: string; } export namespace Connectors { diff --git a/tests/api-resources/magic-transit/connectors.test.ts b/tests/api-resources/magic-transit/connectors.test.ts index 031e0cb122..41d0c79094 100644 --- a/tests/api-resources/magic-transit/connectors.test.ts +++ b/tests/api-resources/magic-transit/connectors.test.ts @@ -11,7 +11,9 @@ const cloudflare = new Cloudflare({ describe('resource connectors', () => { test('update: only required params', async () => { - const responsePromise = cloudflare.magicTransit.connectors.update('string', { account_id: 0 }); + const responsePromise = cloudflare.magicTransit.connectors.update('string', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -23,7 +25,7 @@ describe('resource connectors', () => { test('update: required and optional params', async () => { const response = await cloudflare.magicTransit.connectors.update('string', { - account_id: 0, + account_id: '023e105f4ecef8ad9ca31a8372d0c353', activated: true, interrupt_window_duration_hours: 0, interrupt_window_hour_of_day: 0, @@ -33,7 +35,9 @@ describe('resource connectors', () => { }); test('list: only required params', async () => { - const responsePromise = cloudflare.magicTransit.connectors.list({ account_id: 0 }); + const responsePromise = cloudflare.magicTransit.connectors.list({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -44,11 +48,15 @@ describe('resource connectors', () => { }); test('list: required and optional params', async () => { - const response = await cloudflare.magicTransit.connectors.list({ account_id: 0 }); + const response = await cloudflare.magicTransit.connectors.list({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); }); test('edit: only required params', async () => { - const responsePromise = cloudflare.magicTransit.connectors.edit('string', { account_id: 0 }); + const responsePromise = cloudflare.magicTransit.connectors.edit('string', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -60,7 +68,7 @@ describe('resource connectors', () => { test('edit: required and optional params', async () => { const response = await cloudflare.magicTransit.connectors.edit('string', { - account_id: 0, + account_id: '023e105f4ecef8ad9ca31a8372d0c353', activated: true, interrupt_window_duration_hours: 0, interrupt_window_hour_of_day: 0, @@ -70,7 +78,9 @@ describe('resource connectors', () => { }); test('get: only required params', async () => { - const responsePromise = cloudflare.magicTransit.connectors.get('string', { account_id: 0 }); + const responsePromise = cloudflare.magicTransit.connectors.get('string', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -81,6 +91,8 @@ describe('resource connectors', () => { }); test('get: required and optional params', async () => { - const response = await cloudflare.magicTransit.connectors.get('string', { account_id: 0 }); + const response = await cloudflare.magicTransit.connectors.get('string', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); }); }); From ec25a8930a98e414d56099c44401f797e8602717 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 17:10:50 +0000 Subject: [PATCH 100/473] feat(api): OpenAPI spec update via Stainless API (#597) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++---------- .../cloudforce-one/requests/priority.ts | 22 +++++---------- .../cloudforce-one/requests/requests.ts | 22 +++++---------- src/resources/magic-transit/connectors.ts | 18 ++++-------- .../magic-transit/connectors.test.ts | 28 ++++++------------- 6 files changed, 36 insertions(+), 78 deletions(-) diff --git a/.stats.yml b/.stats.yml index ca2b4a1f25..d9059b7583 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4661c57253723a62858ec11879e101250e22c7702521b0aedd61e852a5d6e4e9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f7238fca4bd92278986ecff5ad03ddd7a3e5c7a2d314fcd127d8db2bbd561a13.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** diff --git a/src/resources/magic-transit/connectors.ts b/src/resources/magic-transit/connectors.ts index ba09bbf370..638027f693 100644 --- a/src/resources/magic-transit/connectors.ts +++ b/src/resources/magic-transit/connectors.ts @@ -197,9 +197,9 @@ export namespace ConnectorGetResponse { export interface ConnectorUpdateParams { /** - * Path param: Account identifier + * Path param: */ - account_id: string; + account_id: number; /** * Body param: @@ -228,17 +228,14 @@ export interface ConnectorUpdateParams { } export interface ConnectorListParams { - /** - * Account identifier - */ - account_id: string; + account_id: number; } export interface ConnectorEditParams { /** - * Path param: Account identifier + * Path param: */ - account_id: string; + account_id: number; /** * Body param: @@ -267,10 +264,7 @@ export interface ConnectorEditParams { } export interface ConnectorGetParams { - /** - * Account identifier - */ - account_id: string; + account_id: number; } export namespace Connectors { diff --git a/tests/api-resources/magic-transit/connectors.test.ts b/tests/api-resources/magic-transit/connectors.test.ts index 41d0c79094..031e0cb122 100644 --- a/tests/api-resources/magic-transit/connectors.test.ts +++ b/tests/api-resources/magic-transit/connectors.test.ts @@ -11,9 +11,7 @@ const cloudflare = new Cloudflare({ describe('resource connectors', () => { test('update: only required params', async () => { - const responsePromise = cloudflare.magicTransit.connectors.update('string', { - account_id: '023e105f4ecef8ad9ca31a8372d0c353', - }); + const responsePromise = cloudflare.magicTransit.connectors.update('string', { account_id: 0 }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -25,7 +23,7 @@ describe('resource connectors', () => { test('update: required and optional params', async () => { const response = await cloudflare.magicTransit.connectors.update('string', { - account_id: '023e105f4ecef8ad9ca31a8372d0c353', + account_id: 0, activated: true, interrupt_window_duration_hours: 0, interrupt_window_hour_of_day: 0, @@ -35,9 +33,7 @@ describe('resource connectors', () => { }); test('list: only required params', async () => { - const responsePromise = cloudflare.magicTransit.connectors.list({ - account_id: '023e105f4ecef8ad9ca31a8372d0c353', - }); + const responsePromise = cloudflare.magicTransit.connectors.list({ account_id: 0 }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -48,15 +44,11 @@ describe('resource connectors', () => { }); test('list: required and optional params', async () => { - const response = await cloudflare.magicTransit.connectors.list({ - account_id: '023e105f4ecef8ad9ca31a8372d0c353', - }); + const response = await cloudflare.magicTransit.connectors.list({ account_id: 0 }); }); test('edit: only required params', async () => { - const responsePromise = cloudflare.magicTransit.connectors.edit('string', { - account_id: '023e105f4ecef8ad9ca31a8372d0c353', - }); + const responsePromise = cloudflare.magicTransit.connectors.edit('string', { account_id: 0 }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -68,7 +60,7 @@ describe('resource connectors', () => { test('edit: required and optional params', async () => { const response = await cloudflare.magicTransit.connectors.edit('string', { - account_id: '023e105f4ecef8ad9ca31a8372d0c353', + account_id: 0, activated: true, interrupt_window_duration_hours: 0, interrupt_window_hour_of_day: 0, @@ -78,9 +70,7 @@ describe('resource connectors', () => { }); test('get: only required params', async () => { - const responsePromise = cloudflare.magicTransit.connectors.get('string', { - account_id: '023e105f4ecef8ad9ca31a8372d0c353', - }); + const responsePromise = cloudflare.magicTransit.connectors.get('string', { account_id: 0 }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -91,8 +81,6 @@ describe('resource connectors', () => { }); test('get: required and optional params', async () => { - const response = await cloudflare.magicTransit.connectors.get('string', { - account_id: '023e105f4ecef8ad9ca31a8372d0c353', - }); + const response = await cloudflare.magicTransit.connectors.get('string', { account_id: 0 }); }); }); From 2be559771dc92421b43a11aca12a27695d7c8238 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 17:43:35 +0000 Subject: [PATCH 101/473] feat(api): OpenAPI spec update via Stainless API (#598) --- .stats.yml | 2 +- src/resources/magic-transit/connectors.ts | 18 ++++++++---- .../magic-transit/connectors.test.ts | 28 +++++++++++++------ 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/.stats.yml b/.stats.yml index d9059b7583..c5ea563868 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f7238fca4bd92278986ecff5ad03ddd7a3e5c7a2d314fcd127d8db2bbd561a13.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5bbc085920edd5cffb5cccbc08ab3b94fcc458321144eb01c80c05a089fafafa.yml diff --git a/src/resources/magic-transit/connectors.ts b/src/resources/magic-transit/connectors.ts index 638027f693..ba09bbf370 100644 --- a/src/resources/magic-transit/connectors.ts +++ b/src/resources/magic-transit/connectors.ts @@ -197,9 +197,9 @@ export namespace ConnectorGetResponse { export interface ConnectorUpdateParams { /** - * Path param: + * Path param: Account identifier */ - account_id: number; + account_id: string; /** * Body param: @@ -228,14 +228,17 @@ export interface ConnectorUpdateParams { } export interface ConnectorListParams { - account_id: number; + /** + * Account identifier + */ + account_id: string; } export interface ConnectorEditParams { /** - * Path param: + * Path param: Account identifier */ - account_id: number; + account_id: string; /** * Body param: @@ -264,7 +267,10 @@ export interface ConnectorEditParams { } export interface ConnectorGetParams { - account_id: number; + /** + * Account identifier + */ + account_id: string; } export namespace Connectors { diff --git a/tests/api-resources/magic-transit/connectors.test.ts b/tests/api-resources/magic-transit/connectors.test.ts index 031e0cb122..41d0c79094 100644 --- a/tests/api-resources/magic-transit/connectors.test.ts +++ b/tests/api-resources/magic-transit/connectors.test.ts @@ -11,7 +11,9 @@ const cloudflare = new Cloudflare({ describe('resource connectors', () => { test('update: only required params', async () => { - const responsePromise = cloudflare.magicTransit.connectors.update('string', { account_id: 0 }); + const responsePromise = cloudflare.magicTransit.connectors.update('string', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -23,7 +25,7 @@ describe('resource connectors', () => { test('update: required and optional params', async () => { const response = await cloudflare.magicTransit.connectors.update('string', { - account_id: 0, + account_id: '023e105f4ecef8ad9ca31a8372d0c353', activated: true, interrupt_window_duration_hours: 0, interrupt_window_hour_of_day: 0, @@ -33,7 +35,9 @@ describe('resource connectors', () => { }); test('list: only required params', async () => { - const responsePromise = cloudflare.magicTransit.connectors.list({ account_id: 0 }); + const responsePromise = cloudflare.magicTransit.connectors.list({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -44,11 +48,15 @@ describe('resource connectors', () => { }); test('list: required and optional params', async () => { - const response = await cloudflare.magicTransit.connectors.list({ account_id: 0 }); + const response = await cloudflare.magicTransit.connectors.list({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); }); test('edit: only required params', async () => { - const responsePromise = cloudflare.magicTransit.connectors.edit('string', { account_id: 0 }); + const responsePromise = cloudflare.magicTransit.connectors.edit('string', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -60,7 +68,7 @@ describe('resource connectors', () => { test('edit: required and optional params', async () => { const response = await cloudflare.magicTransit.connectors.edit('string', { - account_id: 0, + account_id: '023e105f4ecef8ad9ca31a8372d0c353', activated: true, interrupt_window_duration_hours: 0, interrupt_window_hour_of_day: 0, @@ -70,7 +78,9 @@ describe('resource connectors', () => { }); test('get: only required params', async () => { - const responsePromise = cloudflare.magicTransit.connectors.get('string', { account_id: 0 }); + const responsePromise = cloudflare.magicTransit.connectors.get('string', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -81,6 +91,8 @@ describe('resource connectors', () => { }); test('get: required and optional params', async () => { - const response = await cloudflare.magicTransit.connectors.get('string', { account_id: 0 }); + const response = await cloudflare.magicTransit.connectors.get('string', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); }); }); From b74308b7188105ac7bce16857c8372796b96bb5f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 17:46:11 +0000 Subject: [PATCH 102/473] feat(api): OpenAPI spec update via Stainless API (#599) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index c5ea563868..30e0514e7c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5bbc085920edd5cffb5cccbc08ab3b94fcc458321144eb01c80c05a089fafafa.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-482840aef1f8d1525507e2ef2bc5ec68a6eb3c7eb4c089800265c12ef99121a0.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 3b0de124ba0ac7525ce2cbbf880015690c2c28f0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 18:14:37 +0000 Subject: [PATCH 103/473] feat(api): OpenAPI spec update via Stainless API (#600) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 30e0514e7c..3995c2b5d3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-482840aef1f8d1525507e2ef2bc5ec68a6eb3c7eb4c089800265c12ef99121a0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a470d9dc8fe965453aeed7fadf059de2e53e1b303e741cd0986e6bddf1fb2afc.yml From 6ac799eb37ae7da526cd7d4674d3f9b336dd75d7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 18:57:07 +0000 Subject: [PATCH 104/473] feat(api): OpenAPI spec update via Stainless API (#601) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 3995c2b5d3..30e0514e7c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a470d9dc8fe965453aeed7fadf059de2e53e1b303e741cd0986e6bddf1fb2afc.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-482840aef1f8d1525507e2ef2bc5ec68a6eb3c7eb4c089800265c12ef99121a0.yml From 3946aaee2fa61b81f943c79f40c9677b64e6827a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 20:00:17 +0000 Subject: [PATCH 105/473] feat(api): OpenAPI spec update via Stainless API (#602) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 30e0514e7c..3995c2b5d3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-482840aef1f8d1525507e2ef2bc5ec68a6eb3c7eb4c089800265c12ef99121a0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a470d9dc8fe965453aeed7fadf059de2e53e1b303e741cd0986e6bddf1fb2afc.yml From b01852a8a3f4f1d252c48dbedadcd60d45fd4e7e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 09:01:07 +0000 Subject: [PATCH 106/473] feat(api): OpenAPI spec update via Stainless API (#603) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 3995c2b5d3..30e0514e7c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a470d9dc8fe965453aeed7fadf059de2e53e1b303e741cd0986e6bddf1fb2afc.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-482840aef1f8d1525507e2ef2bc5ec68a6eb3c7eb4c089800265c12ef99121a0.yml From 02d126b1853971a4dd13373a52fae0787aee871e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 09:03:36 +0000 Subject: [PATCH 107/473] feat(api): OpenAPI spec update via Stainless API (#604) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 30e0514e7c..3995c2b5d3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-482840aef1f8d1525507e2ef2bc5ec68a6eb3c7eb4c089800265c12ef99121a0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a470d9dc8fe965453aeed7fadf059de2e53e1b303e741cd0986e6bddf1fb2afc.yml From 4c2bea753f64e6d0c31c4e4bdca8dffd8a4e077a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 09:50:10 +0000 Subject: [PATCH 108/473] feat(api): OpenAPI spec update via Stainless API (#605) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3995c2b5d3..c5ea563868 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a470d9dc8fe965453aeed7fadf059de2e53e1b303e741cd0986e6bddf1fb2afc.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5bbc085920edd5cffb5cccbc08ab3b94fcc458321144eb01c80c05a089fafafa.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From e517a6368b9d26cf59cc3f7cbbfc409e9cd7a75e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 11:01:01 +0000 Subject: [PATCH 109/473] feat(api): OpenAPI spec update via Stainless API (#606) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index c5ea563868..30e0514e7c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5bbc085920edd5cffb5cccbc08ab3b94fcc458321144eb01c80c05a089fafafa.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-482840aef1f8d1525507e2ef2bc5ec68a6eb3c7eb4c089800265c12ef99121a0.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 6f5b99d86520d5510d6a7f802e6fab45e398e09f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 13:17:43 +0000 Subject: [PATCH 110/473] feat(api): OpenAPI spec update via Stainless API (#607) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 30e0514e7c..cc4466d7bd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-482840aef1f8d1525507e2ef2bc5ec68a6eb3c7eb4c089800265c12ef99121a0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ae9c24759a71468298d37ae7aa05d4b1162e756e77597ba8fcd49c7ea2b4ac6b.yml From 40c93247b736061127fd36beabb17618af056a7a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 14:43:45 +0000 Subject: [PATCH 111/473] feat(api): OpenAPI spec update via Stainless API (#608) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index cc4466d7bd..747553e18c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ae9c24759a71468298d37ae7aa05d4b1162e756e77597ba8fcd49c7ea2b4ac6b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2182de20fb3bd47b4dca83f00f0dd21dcfc8b8c2d24ad81b9751011a4d94765d.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 2c1fab84f068a0b582b9a52aaa9e34a65f1efa03 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 15:06:17 +0000 Subject: [PATCH 112/473] feat(api): OpenAPI spec update via Stainless API (#609) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 747553e18c..cc4466d7bd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2182de20fb3bd47b4dca83f00f0dd21dcfc8b8c2d24ad81b9751011a4d94765d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ae9c24759a71468298d37ae7aa05d4b1162e756e77597ba8fcd49c7ea2b4ac6b.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From ca1178f1c07e27f52bf39c636db40ef9871fd3b3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 15:27:54 +0000 Subject: [PATCH 113/473] feat(api): OpenAPI spec update via Stainless API (#610) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index cc4466d7bd..747553e18c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ae9c24759a71468298d37ae7aa05d4b1162e756e77597ba8fcd49c7ea2b4ac6b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2182de20fb3bd47b4dca83f00f0dd21dcfc8b8c2d24ad81b9751011a4d94765d.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 63b587ae94024b030cd4461bf19a380d63f62483 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 17:03:25 +0000 Subject: [PATCH 114/473] feat(api): update via SDK Studio (#611) --- .../risk-scoring/integrations/integrations.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/api-resources/zero-trust/risk-scoring/integrations/integrations.test.ts b/tests/api-resources/zero-trust/risk-scoring/integrations/integrations.test.ts index d27a386214..687206d561 100644 --- a/tests/api-resources/zero-trust/risk-scoring/integrations/integrations.test.ts +++ b/tests/api-resources/zero-trust/risk-scoring/integrations/integrations.test.ts @@ -55,7 +55,8 @@ describe('resource integrations', () => { ); }); - test('list: only required params', async () => { + // bug in prism where it confuses this method with /zt_risk_scoring/{user_id} + test.skip('list: only required params', async () => { const responsePromise = cloudflare.zeroTrust.riskScoring.integrations.list({ account_id: 'string' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -66,7 +67,8 @@ describe('resource integrations', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('list: required and optional params', async () => { + // bug in prism where it confuses this method with /zt_risk_scoring/{user_id} + test.skip('list: required and optional params', async () => { const response = await cloudflare.zeroTrust.riskScoring.integrations.list({ account_id: 'string' }); }); From 4eb6f27633b572cf566f3f3d08c889c1ca651deb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 17:05:51 +0000 Subject: [PATCH 115/473] feat(api): OpenAPI spec update via Stainless API (#612) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 747553e18c..07056c3f90 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2182de20fb3bd47b4dca83f00f0dd21dcfc8b8c2d24ad81b9751011a4d94765d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b588da95601959bbe0269351d4f052408c11ecc10775f706606f58d33b570178.yml From 8bf1740d662d5162208c2917b9cb02c8f3e22eab Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 19:16:36 +0000 Subject: [PATCH 116/473] feat(api): OpenAPI spec update via Stainless API (#613) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 07056c3f90..6c10e0de57 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b588da95601959bbe0269351d4f052408c11ecc10775f706606f58d33b570178.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4693e2d401ae311fed0316cb1863e37dcaeb53a2ddf07371f8fa36c37e6e0057.yml From b391121451ce79f9fbc590966d7955d7568c8299 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 19:19:02 +0000 Subject: [PATCH 117/473] feat(api): OpenAPI spec update via Stainless API (#614) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6c10e0de57..50fc14c2b9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4693e2d401ae311fed0316cb1863e37dcaeb53a2ddf07371f8fa36c37e6e0057.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e43f1520a2b2216bc7dc46e06afd92de46884e56eceec212ea8b54bd99013ff3.yml From bc4d49772ea85e9e867e40bcf4498a2de2c4b709 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 19:23:21 +0000 Subject: [PATCH 118/473] feat(api): OpenAPI spec update via Stainless API (#615) --- .stats.yml | 2 +- src/resources/magic-transit/sites/acls.ts | 16 ++++++++-------- src/resources/magic-transit/sites/lans.ts | 14 +++++++------- src/resources/magic-transit/sites/sites.ts | 22 +++++++++++----------- src/resources/magic-transit/sites/wans.ts | 12 ++++++------ 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.stats.yml b/.stats.yml index 50fc14c2b9..6779bc250e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e43f1520a2b2216bc7dc46e06afd92de46884e56eceec212ea8b54bd99013ff3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0c0d163e334ea4aceb9155a993fcb36ab5edcb6de64052f81f3c9df94e0ef4b7.yml diff --git a/src/resources/magic-transit/sites/acls.ts b/src/resources/magic-transit/sites/acls.ts index c044399a9c..ea16639ea7 100644 --- a/src/resources/magic-transit/sites/acls.ts +++ b/src/resources/magic-transit/sites/acls.ts @@ -127,8 +127,8 @@ export interface ACL { /** * The desired forwarding action for this ACL policy. If set to "false", the policy * will forward traffic to Cloudflare. If set to "true", the policy will forward - * traffic locally on the Magic WAN Connector. If not included in request, will - * default to false. + * traffic locally on the Magic Connector. If not included in request, will default + * to false. */ forward_locally?: boolean; @@ -243,8 +243,8 @@ export interface ACLCreateParams { /** * Body param: The desired forwarding action for this ACL policy. If set to * "false", the policy will forward traffic to Cloudflare. If set to "true", the - * policy will forward traffic locally on the Magic WAN Connector. If not included - * in request, will default to false. + * policy will forward traffic locally on the Magic Connector. If not included in + * request, will default to false. */ forward_locally?: boolean; @@ -268,8 +268,8 @@ export interface ACLUpdateParams { /** * Body param: The desired forwarding action for this ACL policy. If set to * "false", the policy will forward traffic to Cloudflare. If set to "true", the - * policy will forward traffic locally on the Magic WAN Connector. If not included - * in request, will default to false. + * policy will forward traffic locally on the Magic Connector. If not included in + * request, will default to false. */ forward_locally?: boolean; @@ -322,8 +322,8 @@ export interface ACLEditParams { /** * Body param: The desired forwarding action for this ACL policy. If set to * "false", the policy will forward traffic to Cloudflare. If set to "true", the - * policy will forward traffic locally on the Magic WAN Connector. If not included - * in request, will default to false. + * policy will forward traffic locally on the Magic Connector. If not included in + * request, will default to false. */ forward_locally?: boolean; diff --git a/src/resources/magic-transit/sites/lans.ts b/src/resources/magic-transit/sites/lans.ts index a84bb7d0cf..53ac68fc12 100644 --- a/src/resources/magic-transit/sites/lans.ts +++ b/src/resources/magic-transit/sites/lans.ts @@ -7,8 +7,8 @@ import { SinglePage } from '../../../pagination'; export class LANs extends APIResource { /** - * Creates a new LAN. If the site is in high availability mode, static_addressing - * is required along with secondary and virtual address. + * Creates a new Site LAN. If the site is in high availability mode, + * static_addressing is required along with secondary and virtual address. */ create( siteId: string, @@ -25,7 +25,7 @@ export class LANs extends APIResource { } /** - * Update a specific LAN. + * Update a specific Site LAN. */ update( siteId: string, @@ -43,7 +43,7 @@ export class LANs extends APIResource { } /** - * Lists LANs associated with an account and site. + * Lists Site LANs associated with an account. */ list( siteId: string, @@ -59,7 +59,7 @@ export class LANs extends APIResource { } /** - * Remove a specific LAN. + * Remove a specific Site LAN. */ delete( siteId: string, @@ -77,7 +77,7 @@ export class LANs extends APIResource { } /** - * Patch a specific LAN. + * Patch a specific Site LAN. */ edit( siteId: string, @@ -95,7 +95,7 @@ export class LANs extends APIResource { } /** - * Get a specific LAN. + * Get a specific Site LAN. */ get( siteId: string, diff --git a/src/resources/magic-transit/sites/sites.ts b/src/resources/magic-transit/sites/sites.ts index 36283bcca9..033e1da674 100644 --- a/src/resources/magic-transit/sites/sites.ts +++ b/src/resources/magic-transit/sites/sites.ts @@ -98,7 +98,7 @@ export interface Site { id?: string; /** - * Magic WAN Connector identifier tag. + * Magic Connector identifier tag. */ connector_id?: string; @@ -121,7 +121,7 @@ export interface Site { name?: string; /** - * Magic WAN Connector identifier tag. Used when high availability mode is on. + * Magic Connector identifier tag. Used when high availability mode is on. */ secondary_connector_id?: string; } @@ -168,7 +168,7 @@ export interface SiteCreateParams { name: string; /** - * Body param: Magic WAN Connector identifier tag. + * Body param: Magic Connector identifier tag. */ connector_id?: string; @@ -189,8 +189,8 @@ export interface SiteCreateParams { location?: SiteLocationParam; /** - * Body param: Magic WAN Connector identifier tag. Used when high availability mode - * is on. + * Body param: Magic Connector identifier tag. Used when high availability mode is + * on. */ secondary_connector_id?: string; } @@ -202,7 +202,7 @@ export interface SiteUpdateParams { account_id: string; /** - * Body param: Magic WAN Connector identifier tag. + * Body param: Magic Connector identifier tag. */ connector_id?: string; @@ -222,8 +222,8 @@ export interface SiteUpdateParams { name?: string; /** - * Body param: Magic WAN Connector identifier tag. Used when high availability mode - * is on. + * Body param: Magic Connector identifier tag. Used when high availability mode is + * on. */ secondary_connector_id?: string; } @@ -254,7 +254,7 @@ export interface SiteEditParams { account_id: string; /** - * Body param: Magic WAN Connector identifier tag. + * Body param: Magic Connector identifier tag. */ connector_id?: string; @@ -274,8 +274,8 @@ export interface SiteEditParams { name?: string; /** - * Body param: Magic WAN Connector identifier tag. Used when high availability mode - * is on. + * Body param: Magic Connector identifier tag. Used when high availability mode is + * on. */ secondary_connector_id?: string; } diff --git a/src/resources/magic-transit/sites/wans.ts b/src/resources/magic-transit/sites/wans.ts index d3d58d29bf..abe38707d4 100644 --- a/src/resources/magic-transit/sites/wans.ts +++ b/src/resources/magic-transit/sites/wans.ts @@ -7,7 +7,7 @@ import { SinglePage } from '../../../pagination'; export class WANs extends APIResource { /** - * Creates a new WAN. + * Creates a new Site WAN. */ create( siteId: string, @@ -24,7 +24,7 @@ export class WANs extends APIResource { } /** - * Update a specific WAN. + * Update a specific Site WAN. */ update( siteId: string, @@ -42,7 +42,7 @@ export class WANs extends APIResource { } /** - * Lists WANs associated with an account and site. + * Lists Site WANs associated with an account. */ list( siteId: string, @@ -58,7 +58,7 @@ export class WANs extends APIResource { } /** - * Remove a specific WAN. + * Remove a specific Site WAN. */ delete( siteId: string, @@ -76,7 +76,7 @@ export class WANs extends APIResource { } /** - * Patch a specific WAN. + * Patch a specific Site WAN. */ edit( siteId: string, @@ -94,7 +94,7 @@ export class WANs extends APIResource { } /** - * Get a specific WAN. + * Get a specific Site WAN. */ get( siteId: string, From 3e70815c752891c28c9693b1da363d64e471831b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 19:34:33 +0000 Subject: [PATCH 119/473] feat(api): OpenAPI spec update via Stainless API (#616) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6779bc250e..b4149f716f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0c0d163e334ea4aceb9155a993fcb36ab5edcb6de64052f81f3c9df94e0ef4b7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a92aac1d4f64b4091bcaf32937d80b8472644ca7bba0dc719804e71425ecf067.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 5c258e6e710e3b6534143e20aab8a6ec988f99ab Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 20:23:20 +0000 Subject: [PATCH 120/473] feat(api): OpenAPI spec update via Stainless API (#617) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index b4149f716f..98e89bff3c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a92aac1d4f64b4091bcaf32937d80b8472644ca7bba0dc719804e71425ecf067.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-870afafa5e40263ba51777cf8e8f58da3067f618dcf8b180fb2308b550a0aab6.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From a6c49f23d0a913aa4803adb6de4d09ab4ffaf588 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 20:52:31 +0000 Subject: [PATCH 121/473] feat(api): OpenAPI spec update via Stainless API (#618) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 98e89bff3c..6779bc250e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-870afafa5e40263ba51777cf8e8f58da3067f618dcf8b180fb2308b550a0aab6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0c0d163e334ea4aceb9155a993fcb36ab5edcb6de64052f81f3c9df94e0ef4b7.yml From 3e37ee11e6fe40cb3d59203a68aee0e1313bcf0c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 22:13:13 +0000 Subject: [PATCH 122/473] feat(api): OpenAPI spec update via Stainless API (#619) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6779bc250e..71ab827682 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0c0d163e334ea4aceb9155a993fcb36ab5edcb6de64052f81f3c9df94e0ef4b7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-878b75aba4994fe3a6a7f20b8c3cefe55489437b26641bd769ab30a71c7cf9cf.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From eb4ab20236b563e06f52a2f0c84fbf1b770df4e0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 10:03:18 +0000 Subject: [PATCH 123/473] feat(api): OpenAPI spec update via Stainless API (#620) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 71ab827682..b4149f716f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-878b75aba4994fe3a6a7f20b8c3cefe55489437b26641bd769ab30a71c7cf9cf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a92aac1d4f64b4091bcaf32937d80b8472644ca7bba0dc719804e71425ecf067.yml From 6b6409996af4df175ba793a91e9aa332099c7747 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 11:32:56 +0000 Subject: [PATCH 124/473] feat(api): OpenAPI spec update via Stainless API (#621) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index b4149f716f..71ab827682 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a92aac1d4f64b4091bcaf32937d80b8472644ca7bba0dc719804e71425ecf067.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-878b75aba4994fe3a6a7f20b8c3cefe55489437b26641bd769ab30a71c7cf9cf.yml From f858aa72534be3394ba253841e276da875a68787 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 14:20:42 +0000 Subject: [PATCH 125/473] feat(api): OpenAPI spec update via Stainless API (#622) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 71ab827682..98e89bff3c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-878b75aba4994fe3a6a7f20b8c3cefe55489437b26641bd769ab30a71c7cf9cf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-870afafa5e40263ba51777cf8e8f58da3067f618dcf8b180fb2308b550a0aab6.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 2745d298edbdf609fa0c2f706c056a16fed942fa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 15:04:46 +0000 Subject: [PATCH 126/473] feat(api): OpenAPI spec update via Stainless API (#623) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 98e89bff3c..b4149f716f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-870afafa5e40263ba51777cf8e8f58da3067f618dcf8b180fb2308b550a0aab6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a92aac1d4f64b4091bcaf32937d80b8472644ca7bba0dc719804e71425ecf067.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 03450e220a160bba380fa0ad664879821d69990b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 15:21:19 +0000 Subject: [PATCH 127/473] feat(api): OpenAPI spec update via Stainless API (#624) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index b4149f716f..71ab827682 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a92aac1d4f64b4091bcaf32937d80b8472644ca7bba0dc719804e71425ecf067.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-878b75aba4994fe3a6a7f20b8c3cefe55489437b26641bd769ab30a71c7cf9cf.yml From 603c92132e4f7e106744e8e3254085df7c5ff2a0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 16:44:11 +0000 Subject: [PATCH 128/473] feat(api): OpenAPI spec update via Stainless API (#625) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 71ab827682..b4149f716f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-878b75aba4994fe3a6a7f20b8c3cefe55489437b26641bd769ab30a71c7cf9cf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a92aac1d4f64b4091bcaf32937d80b8472644ca7bba0dc719804e71425ecf067.yml From 39dfad74d6af4c18311f58ecc87487c989fcb38f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 17:15:02 +0000 Subject: [PATCH 129/473] feat(api): OpenAPI spec update via Stainless API (#626) --- .stats.yml | 2 +- src/resources/radar/attacks/layer3/timeseries-groups.ts | 6 +++--- src/resources/radar/attacks/layer7/timeseries-groups.ts | 4 ++-- src/resources/radar/http/timeseries-groups.ts | 6 +++--- src/resources/radar/ranking/ranking.ts | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.stats.yml b/.stats.yml index b4149f716f..71ab827682 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a92aac1d4f64b4091bcaf32937d80b8472644ca7bba0dc719804e71425ecf067.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-878b75aba4994fe3a6a7f20b8c3cefe55489437b26641bd769ab30a71c7cf9cf.yml diff --git a/src/resources/radar/attacks/layer3/timeseries-groups.ts b/src/resources/radar/attacks/layer3/timeseries-groups.ts index 62595ec8a8..707223acad 100644 --- a/src/resources/radar/attacks/layer3/timeseries-groups.ts +++ b/src/resources/radar/attacks/layer3/timeseries-groups.ts @@ -314,7 +314,7 @@ export interface TimeseriesGroupIndustryResponse { export namespace TimeseriesGroupIndustryResponse { export interface Serie0 { timestamps: Array; - [k: string]: Array; + [k: string]: Array | undefined; } } @@ -363,7 +363,7 @@ export interface TimeseriesGroupVectorResponse { export namespace TimeseriesGroupVectorResponse { export interface Serie0 { timestamps: Array; - [k: string]: Array; + [k: string]: Array | undefined; } } @@ -376,7 +376,7 @@ export interface TimeseriesGroupVerticalResponse { export namespace TimeseriesGroupVerticalResponse { export interface Serie0 { timestamps: Array; - [k: string]: Array; + [k: string]: Array | undefined; } } diff --git a/src/resources/radar/attacks/layer7/timeseries-groups.ts b/src/resources/radar/attacks/layer7/timeseries-groups.ts index f860aeac58..7a8945775b 100644 --- a/src/resources/radar/attacks/layer7/timeseries-groups.ts +++ b/src/resources/radar/attacks/layer7/timeseries-groups.ts @@ -302,7 +302,7 @@ export interface TimeseriesGroupIndustryResponse { export namespace TimeseriesGroupIndustryResponse { export interface Serie0 { timestamps: Array; - [k: string]: Array; + [k: string]: Array | undefined; } } @@ -359,7 +359,7 @@ export interface TimeseriesGroupVerticalResponse { export namespace TimeseriesGroupVerticalResponse { export interface Serie0 { timestamps: Array; - [k: string]: Array; + [k: string]: Array | undefined; } } diff --git a/src/resources/radar/http/timeseries-groups.ts b/src/resources/radar/http/timeseries-groups.ts index 1299d5b940..7def4e4a5a 100644 --- a/src/resources/radar/http/timeseries-groups.ts +++ b/src/resources/radar/http/timeseries-groups.ts @@ -268,7 +268,7 @@ export interface TimeseriesGroupBrowserResponse { export namespace TimeseriesGroupBrowserResponse { export interface Serie0 { timestamps: Array; - [k: string]: Array; + [k: string]: Array | undefined; } } @@ -281,7 +281,7 @@ export interface TimeseriesGroupBrowserFamilyResponse { export namespace TimeseriesGroupBrowserFamilyResponse { export interface Serie0 { timestamps: Array; - [k: string]: Array; + [k: string]: Array | undefined; } } @@ -362,7 +362,7 @@ export interface TimeseriesGroupOSResponse { export namespace TimeseriesGroupOSResponse { export interface Serie0 { timestamps: Array; - [k: string]: Array; + [k: string]: Array | undefined; } } diff --git a/src/resources/radar/ranking/ranking.ts b/src/resources/radar/ranking/ranking.ts index 3080e499bb..2dcab53b29 100644 --- a/src/resources/radar/ranking/ranking.ts +++ b/src/resources/radar/ranking/ranking.ts @@ -81,7 +81,7 @@ export namespace RankingTimeseriesGroupsResponse { export interface Serie0 { timestamps: Array; - [k: string]: Array | Array; + [k: string]: Array | Array | undefined; } } From 4e1441c87d35c48731122c3f0a046ed89639d303 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 17:50:38 +0000 Subject: [PATCH 130/473] feat(api): OpenAPI spec update via Stainless API (#627) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 71ab827682..98e89bff3c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-878b75aba4994fe3a6a7f20b8c3cefe55489437b26641bd769ab30a71c7cf9cf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-870afafa5e40263ba51777cf8e8f58da3067f618dcf8b180fb2308b550a0aab6.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 722d106eafaec91a77cca7ab4589574e6372baa9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 18:48:35 +0000 Subject: [PATCH 131/473] feat(api): OpenAPI spec update via Stainless API (#628) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++- .../cloudforce-one/requests/priority.ts | 22 ++- .../cloudforce-one/requests/requests.ts | 22 ++- .../access/applications/applications.ts | 126 +++++++++++++++++- 5 files changed, 165 insertions(+), 29 deletions(-) diff --git a/.stats.yml b/.stats.yml index 98e89bff3c..a594a05134 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-870afafa5e40263ba51777cf8e8f58da3067f618dcf8b180fb2308b550a0aab6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ec9f8eaec2fb4d1843f2a2ffc2c6ebaf8c45275c9a18f8ece252fd7fe4a7c946.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** diff --git a/src/resources/zero-trust/access/applications/applications.ts b/src/resources/zero-trust/access/applications/applications.ts index 56183ebce2..8d204506da 100644 --- a/src/resources/zero-trust/access/applications/applications.ts +++ b/src/resources/zero-trust/access/applications/applications.ts @@ -826,13 +826,17 @@ export namespace Application { /** * The OIDC flows supported by this application */ - grant_types?: Array<'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens'>; + grant_types?: Array< + 'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens' | 'hybrid' | 'implicit' + >; /** * A regex to filter Cloudflare groups returned in ID token and userinfo endpoint. */ group_filter_regex?: string; + hybrid_and_implicit_options?: AccessSchemasOIDCSaaSApp.HybridAndImplicitOptions; + /** * The Access public certificate that will be used to verify your identity. */ @@ -889,6 +893,18 @@ export namespace Application { } } + export interface HybridAndImplicitOptions { + /** + * If an Access Token should be returned from the OIDC Authorization endpoint + */ + return_access_token_from_authorization_endpoint?: boolean; + + /** + * If an ID Token should be returned from the OIDC Authorization endpoint + */ + return_id_token_from_authorization_endpoint?: boolean; + } + export interface RefreshTokenOptions { /** * How long a refresh token will be valid for after creation. Valid units are @@ -3657,13 +3673,17 @@ export namespace ApplicationCreateResponse { /** * The OIDC flows supported by this application */ - grant_types?: Array<'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens'>; + grant_types?: Array< + 'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens' | 'hybrid' | 'implicit' + >; /** * A regex to filter Cloudflare groups returned in ID token and userinfo endpoint */ group_filter_regex?: string; + hybrid_and_implicit_options?: AccessOIDCSaaSApp.HybridAndImplicitOptions; + /** * The Access public certificate that will be used to verify your identity. */ @@ -3720,6 +3740,18 @@ export namespace ApplicationCreateResponse { } } + export interface HybridAndImplicitOptions { + /** + * If an Access Token should be returned from the OIDC Authorization endpoint + */ + return_access_token_from_authorization_endpoint?: boolean; + + /** + * If an ID Token should be returned from the OIDC Authorization endpoint + */ + return_id_token_from_authorization_endpoint?: boolean; + } + export interface RefreshTokenOptions { /** * How long a refresh token will be valid for after creation. Valid units are @@ -6500,13 +6532,17 @@ export namespace ApplicationUpdateResponse { /** * The OIDC flows supported by this application */ - grant_types?: Array<'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens'>; + grant_types?: Array< + 'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens' | 'hybrid' | 'implicit' + >; /** * A regex to filter Cloudflare groups returned in ID token and userinfo endpoint */ group_filter_regex?: string; + hybrid_and_implicit_options?: AccessOIDCSaaSApp.HybridAndImplicitOptions; + /** * The Access public certificate that will be used to verify your identity. */ @@ -6563,6 +6599,18 @@ export namespace ApplicationUpdateResponse { } } + export interface HybridAndImplicitOptions { + /** + * If an Access Token should be returned from the OIDC Authorization endpoint + */ + return_access_token_from_authorization_endpoint?: boolean; + + /** + * If an ID Token should be returned from the OIDC Authorization endpoint + */ + return_id_token_from_authorization_endpoint?: boolean; + } + export interface RefreshTokenOptions { /** * How long a refresh token will be valid for after creation. Valid units are @@ -9343,13 +9391,17 @@ export namespace ApplicationListResponse { /** * The OIDC flows supported by this application */ - grant_types?: Array<'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens'>; + grant_types?: Array< + 'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens' | 'hybrid' | 'implicit' + >; /** * A regex to filter Cloudflare groups returned in ID token and userinfo endpoint */ group_filter_regex?: string; + hybrid_and_implicit_options?: AccessOIDCSaaSApp.HybridAndImplicitOptions; + /** * The Access public certificate that will be used to verify your identity. */ @@ -9406,6 +9458,18 @@ export namespace ApplicationListResponse { } } + export interface HybridAndImplicitOptions { + /** + * If an Access Token should be returned from the OIDC Authorization endpoint + */ + return_access_token_from_authorization_endpoint?: boolean; + + /** + * If an ID Token should be returned from the OIDC Authorization endpoint + */ + return_id_token_from_authorization_endpoint?: boolean; + } + export interface RefreshTokenOptions { /** * How long a refresh token will be valid for after creation. Valid units are @@ -12193,13 +12257,17 @@ export namespace ApplicationGetResponse { /** * The OIDC flows supported by this application */ - grant_types?: Array<'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens'>; + grant_types?: Array< + 'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens' | 'hybrid' | 'implicit' + >; /** * A regex to filter Cloudflare groups returned in ID token and userinfo endpoint */ group_filter_regex?: string; + hybrid_and_implicit_options?: AccessOIDCSaaSApp.HybridAndImplicitOptions; + /** * The Access public certificate that will be used to verify your identity. */ @@ -12256,6 +12324,18 @@ export namespace ApplicationGetResponse { } } + export interface HybridAndImplicitOptions { + /** + * If an Access Token should be returned from the OIDC Authorization endpoint + */ + return_access_token_from_authorization_endpoint?: boolean; + + /** + * If an ID Token should be returned from the OIDC Authorization endpoint + */ + return_id_token_from_authorization_endpoint?: boolean; + } + export interface RefreshTokenOptions { /** * How long a refresh token will be valid for after creation. Valid units are @@ -15076,13 +15156,17 @@ export namespace ApplicationCreateParams { /** * The OIDC flows supported by this application */ - grant_types?: Array<'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens'>; + grant_types?: Array< + 'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens' | 'hybrid' | 'implicit' + >; /** * A regex to filter Cloudflare groups returned in ID token and userinfo endpoint */ group_filter_regex?: string; + hybrid_and_implicit_options?: AccessOIDCSaaSApp.HybridAndImplicitOptions; + /** * The Access public certificate that will be used to verify your identity. */ @@ -15137,6 +15221,18 @@ export namespace ApplicationCreateParams { } } + export interface HybridAndImplicitOptions { + /** + * If an Access Token should be returned from the OIDC Authorization endpoint + */ + return_access_token_from_authorization_endpoint?: boolean; + + /** + * If an ID Token should be returned from the OIDC Authorization endpoint + */ + return_id_token_from_authorization_endpoint?: boolean; + } + export interface RefreshTokenOptions { /** * How long a refresh token will be valid for after creation. Valid units are @@ -18007,13 +18103,17 @@ export namespace ApplicationUpdateParams { /** * The OIDC flows supported by this application */ - grant_types?: Array<'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens'>; + grant_types?: Array< + 'authorization_code' | 'authorization_code_with_pkce' | 'refresh_tokens' | 'hybrid' | 'implicit' + >; /** * A regex to filter Cloudflare groups returned in ID token and userinfo endpoint */ group_filter_regex?: string; + hybrid_and_implicit_options?: AccessOIDCSaaSApp.HybridAndImplicitOptions; + /** * The Access public certificate that will be used to verify your identity. */ @@ -18068,6 +18168,18 @@ export namespace ApplicationUpdateParams { } } + export interface HybridAndImplicitOptions { + /** + * If an Access Token should be returned from the OIDC Authorization endpoint + */ + return_access_token_from_authorization_endpoint?: boolean; + + /** + * If an ID Token should be returned from the OIDC Authorization endpoint + */ + return_id_token_from_authorization_endpoint?: boolean; + } + export interface RefreshTokenOptions { /** * How long a refresh token will be valid for after creation. Valid units are From 6c2943d729ee3c0d446becfee323a27038f5b0d1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 20:11:39 +0000 Subject: [PATCH 132/473] feat(api): OpenAPI spec update via Stainless API (#629) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a594a05134..e7efc646ca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ec9f8eaec2fb4d1843f2a2ffc2c6ebaf8c45275c9a18f8ece252fd7fe4a7c946.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1dd55b6debca850e444007b69ca08d589239860ed608c18ea0df7fc359f8a4b4.yml From e011abe7bea926c384d4b215bf9ae1a02e8c2ee5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 00:41:14 +0000 Subject: [PATCH 133/473] feat(api): OpenAPI spec update via Stainless API (#630) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index e7efc646ca..e469f2d6d7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1dd55b6debca850e444007b69ca08d589239860ed608c18ea0df7fc359f8a4b4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-11bbd045a344c1971dd533e157e71576ddd513fa22b13187a2bc2bf72a3c5164.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 795605e2c6a7f32de647e2f9046652bc948376b8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 01:09:10 +0000 Subject: [PATCH 134/473] feat(api): OpenAPI spec update via Stainless API (#631) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index e469f2d6d7..a594a05134 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-11bbd045a344c1971dd533e157e71576ddd513fa22b13187a2bc2bf72a3c5164.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ec9f8eaec2fb4d1843f2a2ffc2c6ebaf8c45275c9a18f8ece252fd7fe4a7c946.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 3b21ea1ab61ea1846a6a31d3475530f9333617ca Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 02:50:13 +0000 Subject: [PATCH 135/473] feat(api): OpenAPI spec update via Stainless API (#632) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index a594a05134..e469f2d6d7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ec9f8eaec2fb4d1843f2a2ffc2c6ebaf8c45275c9a18f8ece252fd7fe4a7c946.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-11bbd045a344c1971dd533e157e71576ddd513fa22b13187a2bc2bf72a3c5164.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 7e46aa77b43e721adf3eab3a88b3a43666ab3771 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 09:40:50 +0000 Subject: [PATCH 136/473] feat(api): OpenAPI spec update via Stainless API (#633) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index e469f2d6d7..a594a05134 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-11bbd045a344c1971dd533e157e71576ddd513fa22b13187a2bc2bf72a3c5164.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ec9f8eaec2fb4d1843f2a2ffc2c6ebaf8c45275c9a18f8ece252fd7fe4a7c946.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 9d63b5820463ddcdb167e7d91f481d0223acecb2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 11:07:28 +0000 Subject: [PATCH 137/473] feat(api): OpenAPI spec update via Stainless API (#634) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index a594a05134..d815e5acaf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ec9f8eaec2fb4d1843f2a2ffc2c6ebaf8c45275c9a18f8ece252fd7fe4a7c946.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ccc4d0cef46244cffd7a8d06b4ae14a936e2c0c4ed40a5af409f183d4fd60eb9.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 48e4813a2f3730f54066d480f1450abaa37eaf45 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 13:18:09 +0000 Subject: [PATCH 138/473] feat(api): OpenAPI spec update via Stainless API (#635) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index d815e5acaf..a594a05134 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ccc4d0cef46244cffd7a8d06b4ae14a936e2c0c4ed40a5af409f183d4fd60eb9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ec9f8eaec2fb4d1843f2a2ffc2c6ebaf8c45275c9a18f8ece252fd7fe4a7c946.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 1a9339997c8573cafaa191027cef2d6e009f7679 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 13:20:15 +0000 Subject: [PATCH 139/473] feat(api): OpenAPI spec update via Stainless API (#636) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index a594a05134..d815e5acaf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ec9f8eaec2fb4d1843f2a2ffc2c6ebaf8c45275c9a18f8ece252fd7fe4a7c946.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ccc4d0cef46244cffd7a8d06b4ae14a936e2c0c4ed40a5af409f183d4fd60eb9.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From fda8cf6aa596a0c1cc2bb5a4e75bcce7cc5b1fc7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 14:07:56 +0000 Subject: [PATCH 140/473] feat(api): OpenAPI spec update via Stainless API (#637) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index d815e5acaf..a594a05134 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ccc4d0cef46244cffd7a8d06b4ae14a936e2c0c4ed40a5af409f183d4fd60eb9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ec9f8eaec2fb4d1843f2a2ffc2c6ebaf8c45275c9a18f8ece252fd7fe4a7c946.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 97637221e3949878e4a1943b4e189de33698978e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 14:10:37 +0000 Subject: [PATCH 141/473] feat(api): OpenAPI spec update via Stainless API (#638) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a594a05134..e7efc646ca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ec9f8eaec2fb4d1843f2a2ffc2c6ebaf8c45275c9a18f8ece252fd7fe4a7c946.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1dd55b6debca850e444007b69ca08d589239860ed608c18ea0df7fc359f8a4b4.yml From 55239b22ec837144c67774bca75c8c395419a763 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 16:19:23 +0000 Subject: [PATCH 142/473] feat(api): OpenAPI spec update via Stainless API (#639) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e7efc646ca..a594a05134 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1dd55b6debca850e444007b69ca08d589239860ed608c18ea0df7fc359f8a4b4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ec9f8eaec2fb4d1843f2a2ffc2c6ebaf8c45275c9a18f8ece252fd7fe4a7c946.yml From ff0aeb8051d41d0609859992f2ed596f44190be9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 16:29:56 +0000 Subject: [PATCH 143/473] feat(api): OpenAPI spec update via Stainless API (#640) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a594a05134..e7efc646ca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ec9f8eaec2fb4d1843f2a2ffc2c6ebaf8c45275c9a18f8ece252fd7fe4a7c946.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1dd55b6debca850e444007b69ca08d589239860ed608c18ea0df7fc359f8a4b4.yml From 321e9cdbb681786c967a50941a8daedcaaeaa749 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 16:57:01 +0000 Subject: [PATCH 144/473] feat(api): OpenAPI spec update via Stainless API (#641) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e7efc646ca..a594a05134 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1dd55b6debca850e444007b69ca08d589239860ed608c18ea0df7fc359f8a4b4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ec9f8eaec2fb4d1843f2a2ffc2c6ebaf8c45275c9a18f8ece252fd7fe4a7c946.yml From 5ab46f847a6cd9241cca483bab775ad69919e183 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 17:27:55 +0000 Subject: [PATCH 145/473] feat(api): OpenAPI spec update via Stainless API (#642) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a594a05134..e7efc646ca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ec9f8eaec2fb4d1843f2a2ffc2c6ebaf8c45275c9a18f8ece252fd7fe4a7c946.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1dd55b6debca850e444007b69ca08d589239860ed608c18ea0df7fc359f8a4b4.yml From e93d58bcb046cc1c5dfa2c04c0e14eba6422823c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 17:29:59 +0000 Subject: [PATCH 146/473] feat(api): OpenAPI spec update via Stainless API (#643) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index e7efc646ca..d815e5acaf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1dd55b6debca850e444007b69ca08d589239860ed608c18ea0df7fc359f8a4b4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ccc4d0cef46244cffd7a8d06b4ae14a936e2c0c4ed40a5af409f183d4fd60eb9.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 030c5ddacecca83469c275c4fa8f32da8a664d6c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 17:32:04 +0000 Subject: [PATCH 147/473] feat(api): OpenAPI spec update via Stainless API (#644) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index d815e5acaf..a594a05134 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ccc4d0cef46244cffd7a8d06b4ae14a936e2c0c4ed40a5af409f183d4fd60eb9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ec9f8eaec2fb4d1843f2a2ffc2c6ebaf8c45275c9a18f8ece252fd7fe4a7c946.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From ceda958e2045ad293ce3d1168745f6aa9090d50b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 17:55:01 +0000 Subject: [PATCH 148/473] feat(api): OpenAPI spec update via Stainless API (#645) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index a594a05134..d815e5acaf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ec9f8eaec2fb4d1843f2a2ffc2c6ebaf8c45275c9a18f8ece252fd7fe4a7c946.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ccc4d0cef46244cffd7a8d06b4ae14a936e2c0c4ed40a5af409f183d4fd60eb9.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From a2fca4dc82a8d3aa44400bbaf5574eff34268a5f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 20:56:34 +0000 Subject: [PATCH 149/473] feat(api): OpenAPI spec update via Stainless API (#646) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index d815e5acaf..a594a05134 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ccc4d0cef46244cffd7a8d06b4ae14a936e2c0c4ed40a5af409f183d4fd60eb9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ec9f8eaec2fb4d1843f2a2ffc2c6ebaf8c45275c9a18f8ece252fd7fe4a7c946.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 8faf074acb9ba8ab657506e2dcc2bfd22341ff90 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 21:00:46 +0000 Subject: [PATCH 150/473] feat(api): OpenAPI spec update via Stainless API (#647) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index a594a05134..d815e5acaf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ec9f8eaec2fb4d1843f2a2ffc2c6ebaf8c45275c9a18f8ece252fd7fe4a7c946.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ccc4d0cef46244cffd7a8d06b4ae14a936e2c0c4ed40a5af409f183d4fd60eb9.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From d72753d17f63d40eb2c9c8e71ffdbb8f8b67dade Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 21:19:50 +0000 Subject: [PATCH 151/473] feat(api): OpenAPI spec update via Stainless API (#648) --- .stats.yml | 2 +- src/resources/argo/tiered-caching.ts | 44 +++++++++++- src/resources/cache/smart-tiered-cache.ts | 68 +++++++++++++++++-- .../cloudforce-one/requests/message.ts | 22 ++++-- .../cloudforce-one/requests/priority.ts | 22 ++++-- .../cloudforce-one/requests/requests.ts | 22 ++++-- 6 files changed, 152 insertions(+), 28 deletions(-) diff --git a/.stats.yml b/.stats.yml index d815e5acaf..2be7711494 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ccc4d0cef46244cffd7a8d06b4ae14a936e2c0c4ed40a5af409f183d4fd60eb9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9473145ec14267d5f88d6db81fe3b2cfb80d5331f22d58caf929a4baeed8e7c1.yml diff --git a/src/resources/argo/tiered-caching.ts b/src/resources/argo/tiered-caching.ts index 7f11c38a0c..d86e29efe3 100644 --- a/src/resources/argo/tiered-caching.ts +++ b/src/resources/argo/tiered-caching.ts @@ -36,9 +36,49 @@ export class TieredCaching extends APIResource { } } -export type TieredCachingEditResponse = unknown | string | null; +export interface TieredCachingEditResponse { + /** + * The identifier of the caching setting + */ + id: string; + + /** + * Whether the setting is editable + */ + editable: boolean; + + /** + * The time when the setting was last modified + */ + modified_on: string; + + /** + * The status of the feature being on / off + */ + value: 'on' | 'off'; +} -export type TieredCachingGetResponse = unknown | string | null; +export interface TieredCachingGetResponse { + /** + * The identifier of the caching setting + */ + id: string; + + /** + * Whether the setting is editable + */ + editable: boolean; + + /** + * The time when the setting was last modified + */ + modified_on: string; + + /** + * The status of the feature being on / off + */ + value: 'on' | 'off'; +} export interface TieredCachingEditParams { /** diff --git a/src/resources/cache/smart-tiered-cache.ts b/src/resources/cache/smart-tiered-cache.ts index 46d43237c0..5f0ce808d7 100644 --- a/src/resources/cache/smart-tiered-cache.ts +++ b/src/resources/cache/smart-tiered-cache.ts @@ -54,11 +54,71 @@ export class SmartTieredCache extends APIResource { } } -export type SmartTieredCacheDeleteResponse = unknown | string | null; +export interface SmartTieredCacheDeleteResponse { + /** + * The identifier of the caching setting + */ + id: string; + + /** + * Whether the setting is editable + */ + editable: boolean; + + /** + * The time when the setting was last modified + */ + modified_on: string; + + /** + * The status of the feature being on / off + */ + value: 'on' | 'off'; +} + +export interface SmartTieredCacheEditResponse { + /** + * The identifier of the caching setting + */ + id: string; -export type SmartTieredCacheEditResponse = unknown | string | null; + /** + * Whether the setting is editable + */ + editable: boolean; -export type SmartTieredCacheGetResponse = unknown | string | null; + /** + * The time when the setting was last modified + */ + modified_on: string; + + /** + * The status of the feature being on / off + */ + value: 'on' | 'off'; +} + +export interface SmartTieredCacheGetResponse { + /** + * The identifier of the caching setting + */ + id: string; + + /** + * Whether the setting is editable + */ + editable: boolean; + + /** + * The time when the setting was last modified + */ + modified_on: string; + + /** + * The status of the feature being on / off + */ + value: 'on' | 'off'; +} export interface SmartTieredCacheDeleteParams { /** @@ -74,7 +134,7 @@ export interface SmartTieredCacheEditParams { zone_id: string; /** - * Body param: Enables Tiered Cache. + * Body param: Enable or disable the Smart Tiered Cache */ value: 'on' | 'off'; } diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 1dfe45bb1dae17b42f77378df09f98c8754e5642 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 21:51:46 +0000 Subject: [PATCH 152/473] feat(api): OpenAPI spec update via Stainless API (#649) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 2be7711494..dae202bcb1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9473145ec14267d5f88d6db81fe3b2cfb80d5331f22d58caf929a4baeed8e7c1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1b52b16bff8ec1d2a907464ad0923ecf4dcb16c4d7c4e36396aeb24fd2cea99a.yml From c66d7c2996979c6b420d48b4d32d40a866ef5563 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 22:11:51 +0000 Subject: [PATCH 153/473] feat(api): OpenAPI spec update via Stainless API (#650) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index dae202bcb1..407e404c66 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1b52b16bff8ec1d2a907464ad0923ecf4dcb16c4d7c4e36396aeb24fd2cea99a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4a62091d8e29b52ee985f4746fdea2431c2de10049c0b60256eca36ab75164a8.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From e9245ff519dc827fc1b75e5a96f5c8dd34df8b75 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 08:31:33 +0000 Subject: [PATCH 154/473] feat(api): OpenAPI spec update via Stainless API (#651) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 407e404c66..2be7711494 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4a62091d8e29b52ee985f4746fdea2431c2de10049c0b60256eca36ab75164a8.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9473145ec14267d5f88d6db81fe3b2cfb80d5331f22d58caf929a4baeed8e7c1.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 4686c3282a58edb2981d8a0c4f103386e6c982b1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 08:33:35 +0000 Subject: [PATCH 155/473] feat(api): OpenAPI spec update via Stainless API (#652) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 2be7711494..dae202bcb1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9473145ec14267d5f88d6db81fe3b2cfb80d5331f22d58caf929a4baeed8e7c1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1b52b16bff8ec1d2a907464ad0923ecf4dcb16c4d7c4e36396aeb24fd2cea99a.yml From 962f28945a52bcc071989b2ddc210693ea43461d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 08:35:50 +0000 Subject: [PATCH 156/473] feat(api): OpenAPI spec update via Stainless API (#653) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index dae202bcb1..407e404c66 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1b52b16bff8ec1d2a907464ad0923ecf4dcb16c4d7c4e36396aeb24fd2cea99a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4a62091d8e29b52ee985f4746fdea2431c2de10049c0b60256eca36ab75164a8.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 60ad5dccab0ccf65baf0619834330f7443780d74 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 08:37:55 +0000 Subject: [PATCH 157/473] feat(api): OpenAPI spec update via Stainless API (#654) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 407e404c66..dae202bcb1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4a62091d8e29b52ee985f4746fdea2431c2de10049c0b60256eca36ab75164a8.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1b52b16bff8ec1d2a907464ad0923ecf4dcb16c4d7c4e36396aeb24fd2cea99a.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 9d6f57c7f6f3b623d90a8f88de5ab02636a74c28 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 09:02:00 +0000 Subject: [PATCH 158/473] feat(api): OpenAPI spec update via Stainless API (#655) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index dae202bcb1..407e404c66 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1b52b16bff8ec1d2a907464ad0923ecf4dcb16c4d7c4e36396aeb24fd2cea99a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4a62091d8e29b52ee985f4746fdea2431c2de10049c0b60256eca36ab75164a8.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 45463f37b4672df60643d34e072e7993fcd87f5e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 09:41:10 +0000 Subject: [PATCH 159/473] feat(api): OpenAPI spec update via Stainless API (#656) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 407e404c66..dae202bcb1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4a62091d8e29b52ee985f4746fdea2431c2de10049c0b60256eca36ab75164a8.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1b52b16bff8ec1d2a907464ad0923ecf4dcb16c4d7c4e36396aeb24fd2cea99a.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 7bed1620cb2a1de2feb6107a5b63cbf5499847c3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 09:43:12 +0000 Subject: [PATCH 160/473] feat(api): OpenAPI spec update via Stainless API (#657) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index dae202bcb1..407e404c66 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1b52b16bff8ec1d2a907464ad0923ecf4dcb16c4d7c4e36396aeb24fd2cea99a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4a62091d8e29b52ee985f4746fdea2431c2de10049c0b60256eca36ab75164a8.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 0b79549873f2dac7b141e117b3137c0183e40120 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 09:45:14 +0000 Subject: [PATCH 161/473] feat(api): OpenAPI spec update via Stainless API (#658) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 407e404c66..dae202bcb1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4a62091d8e29b52ee985f4746fdea2431c2de10049c0b60256eca36ab75164a8.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1b52b16bff8ec1d2a907464ad0923ecf4dcb16c4d7c4e36396aeb24fd2cea99a.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From dcfb1cad309c2fbcccaf7c1af3f14928b4df148b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 11:15:04 +0000 Subject: [PATCH 162/473] feat(api): OpenAPI spec update via Stainless API (#659) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index dae202bcb1..2be7711494 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1b52b16bff8ec1d2a907464ad0923ecf4dcb16c4d7c4e36396aeb24fd2cea99a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9473145ec14267d5f88d6db81fe3b2cfb80d5331f22d58caf929a4baeed8e7c1.yml From 48c1bf7fd37d680d57628036e4013b780fb84b5e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 11:19:33 +0000 Subject: [PATCH 163/473] feat(api): OpenAPI spec update via Stainless API (#660) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2be7711494..407e404c66 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9473145ec14267d5f88d6db81fe3b2cfb80d5331f22d58caf929a4baeed8e7c1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4a62091d8e29b52ee985f4746fdea2431c2de10049c0b60256eca36ab75164a8.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 398b62db3b021824e9adc93d282aee33118fbd6f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 11:21:37 +0000 Subject: [PATCH 164/473] feat(api): OpenAPI spec update via Stainless API (#661) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 407e404c66..2be7711494 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4a62091d8e29b52ee985f4746fdea2431c2de10049c0b60256eca36ab75164a8.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9473145ec14267d5f88d6db81fe3b2cfb80d5331f22d58caf929a4baeed8e7c1.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From fdf20690de807c62ba2ea1a9ec47ebc133f57241 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 11:37:11 +0000 Subject: [PATCH 165/473] feat(api): OpenAPI spec update via Stainless API (#662) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2be7711494..407e404c66 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9473145ec14267d5f88d6db81fe3b2cfb80d5331f22d58caf929a4baeed8e7c1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4a62091d8e29b52ee985f4746fdea2431c2de10049c0b60256eca36ab75164a8.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From c72056c9d34be8560b939143bdd61a92acbfb38e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 11:39:16 +0000 Subject: [PATCH 166/473] feat(api): OpenAPI spec update via Stainless API (#663) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 407e404c66..dae202bcb1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4a62091d8e29b52ee985f4746fdea2431c2de10049c0b60256eca36ab75164a8.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1b52b16bff8ec1d2a907464ad0923ecf4dcb16c4d7c4e36396aeb24fd2cea99a.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 2fb6235dc7e00d5e7489fa0d1de2539a4a3e7b7a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 00:44:12 +0000 Subject: [PATCH 167/473] feat(api): update via SDK Studio (#664) --- .stats.yml | 2 +- api.md | 16 ++---- src/resources/alerting/alerting.ts | 7 --- src/resources/alerting/available-alerts.ts | 34 +++++++++++- .../alerting/destinations/eligible.ts | 26 ++++++++- .../alerting/destinations/pagerduty.ts | 54 +++++++++++++----- .../alerting/destinations/webhooks.ts | 50 ++++++++++++++--- src/resources/alerting/policies.ts | 55 +++++++++++++++---- src/resources/pages/projects/projects.ts | 20 +++++++ src/resources/shared.ts | 6 +- .../pages/projects/projects.test.ts | 4 +- 11 files changed, 211 insertions(+), 63 deletions(-) diff --git a/.stats.yml b/.stats.yml index dae202bcb1..10d7615110 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1296 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1b52b16bff8ec1d2a907464ad0923ecf4dcb16c4d7c4e36396aeb24fd2cea99a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eaf3cf93b4b0566484405b918a65aeca6e5ad4cc194989298a633601684fa0c1.yml diff --git a/api.md b/api.md index d2ca83390e..a0e39118fd 100644 --- a/api.md +++ b/api.md @@ -3894,10 +3894,6 @@ Methods: # Alerting -Types: - -- Alert - ## AvailableAlerts Types: @@ -3906,7 +3902,7 @@ Types: Methods: -- client.alerting.availableAlerts.list({ ...params }) -> AvailableAlertListResponse | null +- client.alerting.availableAlerts.list({ ...params }) -> AvailableAlertListResponse ## Destinations @@ -3918,7 +3914,7 @@ Types: Methods: -- client.alerting.destinations.eligible.get({ ...params }) -> EligibleGetResponse | null +- client.alerting.destinations.eligible.get({ ...params }) -> EligibleGetResponse ### Pagerduty @@ -3933,8 +3929,8 @@ Types: Methods: - client.alerting.destinations.pagerduty.create({ ...params }) -> PagerdutyCreateResponse -- client.alerting.destinations.pagerduty.delete({ ...params }) -> PagerdutyDeleteResponse | null -- client.alerting.destinations.pagerduty.get({ ...params }) -> PagerdutyGetResponse | null +- client.alerting.destinations.pagerduty.delete({ ...params }) -> PagerdutyDeleteResponse +- client.alerting.destinations.pagerduty.get({ ...params }) -> PagerdutyGetResponse - client.alerting.destinations.pagerduty.link(tokenId, { ...params }) -> PagerdutyLinkResponse ### Webhooks @@ -3951,7 +3947,7 @@ Methods: - client.alerting.destinations.webhooks.create({ ...params }) -> WebhookCreateResponse - client.alerting.destinations.webhooks.update(webhookId, { ...params }) -> WebhookUpdateResponse - client.alerting.destinations.webhooks.list({ ...params }) -> WebhooksSinglePage -- client.alerting.destinations.webhooks.delete(webhookId, { ...params }) -> WebhookDeleteResponse | null +- client.alerting.destinations.webhooks.delete(webhookId, { ...params }) -> WebhookDeleteResponse - client.alerting.destinations.webhooks.get(webhookId, { ...params }) -> Webhooks ## History @@ -3980,7 +3976,7 @@ Methods: - client.alerting.policies.create({ ...params }) -> PolicyCreateResponse - client.alerting.policies.update(policyId, { ...params }) -> PolicyUpdateResponse - client.alerting.policies.list({ ...params }) -> PoliciesSinglePage -- client.alerting.policies.delete(policyId, { ...params }) -> PolicyDeleteResponse | null +- client.alerting.policies.delete(policyId, { ...params }) -> PolicyDeleteResponse - client.alerting.policies.get(policyId, { ...params }) -> Policy # D1 diff --git a/src/resources/alerting/alerting.ts b/src/resources/alerting/alerting.ts index 54d8d325d9..031e5284d9 100644 --- a/src/resources/alerting/alerting.ts +++ b/src/resources/alerting/alerting.ts @@ -13,13 +13,6 @@ export class Alerting extends APIResource { policies: PoliciesAPI.Policies = new PoliciesAPI.Policies(this._client); } -export interface Alert { - /** - * UUID - */ - id?: string; -} - export namespace Alerting { export import AvailableAlerts = AvailableAlertsAPI.AvailableAlerts; export import AvailableAlertListResponse = AvailableAlertsAPI.AvailableAlertListResponse; diff --git a/src/resources/alerting/available-alerts.ts b/src/resources/alerting/available-alerts.ts index 4e16567d9f..8b0066ab23 100644 --- a/src/resources/alerting/available-alerts.ts +++ b/src/resources/alerting/available-alerts.ts @@ -11,17 +11,45 @@ export class AvailableAlerts extends APIResource { list( params: AvailableAlertListParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.get(`/accounts/${account_id}/alerting/v3/available_alerts`, options) as Core.APIPromise<{ - result: AvailableAlertListResponse | null; + result: AvailableAlertListResponse; }> )._thenUnwrap((obj) => obj.result); } } -export type AvailableAlertListResponse = unknown | Array | string; +export type AvailableAlertListResponse = Record< + string, + Array +>; + +export namespace AvailableAlertListResponse { + export interface UnnamedSchemaWithMapParent1 { + /** + * Describes the alert type. + */ + description?: string; + + /** + * Alert type name. + */ + display_name?: string; + + /** + * Format of additional configuration options (filters) for the alert type. Data + * type of filters during policy creation: Array of strings. + */ + filter_options?: Array; + + /** + * Use this value when creating and updating a notification policy. + */ + type?: string; + } +} export interface AvailableAlertListParams { /** diff --git a/src/resources/alerting/destinations/eligible.ts b/src/resources/alerting/destinations/eligible.ts index bcd81a3582..92655de029 100644 --- a/src/resources/alerting/destinations/eligible.ts +++ b/src/resources/alerting/destinations/eligible.ts @@ -8,18 +8,38 @@ export class Eligible extends APIResource { /** * Get a list of all delivery mechanism types for which an account is eligible. */ - get(params: EligibleGetParams, options?: Core.RequestOptions): Core.APIPromise { + get(params: EligibleGetParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id } = params; return ( this._client.get( `/accounts/${account_id}/alerting/v3/destinations/eligible`, options, - ) as Core.APIPromise<{ result: EligibleGetResponse | null }> + ) as Core.APIPromise<{ result: EligibleGetResponse }> )._thenUnwrap((obj) => obj.result); } } -export type EligibleGetResponse = unknown | Array | string; +export type EligibleGetResponse = Record>; + +export namespace EligibleGetResponse { + export interface UnnamedSchemaWithMapParent2 { + /** + * Determines whether or not the account is eligible for the delivery mechanism. + */ + eligible?: boolean; + + /** + * Beta flag. Users can create a policy with a mechanism that is not ready, but we + * cannot guarantee successful delivery of notifications. + */ + ready?: boolean; + + /** + * Determines type of delivery mechanism. + */ + type?: 'email' | 'pagerduty' | 'webhook'; + } +} export interface EligibleGetParams { /** diff --git a/src/resources/alerting/destinations/pagerduty.ts b/src/resources/alerting/destinations/pagerduty.ts index 5e4b4d3ae8..5677937f95 100644 --- a/src/resources/alerting/destinations/pagerduty.ts +++ b/src/resources/alerting/destinations/pagerduty.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PagerdutyAPI from './pagerduty'; +import * as Shared from '../../shared'; export class PagerdutyResource extends APIResource { /** @@ -27,29 +28,21 @@ export class PagerdutyResource extends APIResource { delete( params: PagerdutyDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; - return ( - this._client.delete( - `/accounts/${account_id}/alerting/v3/destinations/pagerduty`, - options, - ) as Core.APIPromise<{ result: PagerdutyDeleteResponse | null }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete(`/accounts/${account_id}/alerting/v3/destinations/pagerduty`, options); } /** * Get a list of all configured PagerDuty services. */ - get( - params: PagerdutyGetParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + get(params: PagerdutyGetParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id } = params; return ( this._client.get( `/accounts/${account_id}/alerting/v3/destinations/pagerduty`, options, - ) as Core.APIPromise<{ result: PagerdutyGetResponse | null }> + ) as Core.APIPromise<{ result: PagerdutyGetResponse }> )._thenUnwrap((obj) => obj.result); } @@ -90,7 +83,42 @@ export interface PagerdutyCreateResponse { id?: string; } -export type PagerdutyDeleteResponse = unknown | Array | string; +export interface PagerdutyDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; + + result_info?: PagerdutyDeleteResponse.ResultInfo; +} + +export namespace PagerdutyDeleteResponse { + export interface ResultInfo { + /** + * Total number of results for the requested service + */ + count?: number; + + /** + * Current page within paginated list of results + */ + page?: number; + + /** + * Number of results per page of results + */ + per_page?: number; + + /** + * Total results available without any search parameters + */ + total_count?: number; + } +} export type PagerdutyGetResponse = Array; diff --git a/src/resources/alerting/destinations/webhooks.ts b/src/resources/alerting/destinations/webhooks.ts index bda4a02561..5413103a2c 100644 --- a/src/resources/alerting/destinations/webhooks.ts +++ b/src/resources/alerting/destinations/webhooks.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as WebhooksAPI from './webhooks'; +import * as Shared from '../../shared'; import { SinglePage } from '../../../pagination'; export class Webhooks extends APIResource { @@ -58,14 +59,12 @@ export class Webhooks extends APIResource { webhookId: string, params: WebhookDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; - return ( - this._client.delete( - `/accounts/${account_id}/alerting/v3/destinations/webhooks/${webhookId}`, - options, - ) as Core.APIPromise<{ result: WebhookDeleteResponse | null }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${account_id}/alerting/v3/destinations/webhooks/${webhookId}`, + options, + ); } /** @@ -145,7 +144,42 @@ export interface WebhookUpdateResponse { id?: string; } -export type WebhookDeleteResponse = unknown | Array | string; +export interface WebhookDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; + + result_info?: WebhookDeleteResponse.ResultInfo; +} + +export namespace WebhookDeleteResponse { + export interface ResultInfo { + /** + * Total number of results for the requested service + */ + count?: number; + + /** + * Current page within paginated list of results + */ + page?: number; + + /** + * Number of results per page of results + */ + per_page?: number; + + /** + * Total results available without any search parameters + */ + total_count?: number; + } +} export interface WebhookCreateParams { /** diff --git a/src/resources/alerting/policies.ts b/src/resources/alerting/policies.ts index 9e09ffbc1a..691df60d0e 100644 --- a/src/resources/alerting/policies.ts +++ b/src/resources/alerting/policies.ts @@ -3,6 +3,7 @@ import * as Core from '../../core'; import { APIResource } from '../../resource'; import * as PoliciesAPI from './policies'; +import * as Shared from '../shared'; import { SinglePage } from '../../pagination'; export class Policies extends APIResource { @@ -58,14 +59,9 @@ export class Policies extends APIResource { policyId: string, params: PolicyDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; - return ( - this._client.delete( - `/accounts/${account_id}/alerting/v3/policies/${policyId}`, - options, - ) as Core.APIPromise<{ result: PolicyDeleteResponse | null }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete(`/accounts/${account_id}/alerting/v3/policies/${policyId}`, options); } /** @@ -88,10 +84,10 @@ export class PoliciesSinglePage extends SinglePage {} * List of IDs that will be used when dispatching a notification. IDs for email * type will be the email address. */ -export type Mechanism = Record>; +export type Mechanism = Record>; export namespace Mechanism { - export interface UnnamedSchemaWithMapParent1 { + export interface UnnamedSchemaWithMapParent3 { /** * UUID */ @@ -103,10 +99,10 @@ export namespace Mechanism { * List of IDs that will be used when dispatching a notification. IDs for email * type will be the email address. */ -export type MechanismParam = Record>; +export type MechanismParam = Record>; export namespace MechanismParam { - export interface UnnamedSchemaWithMapParent1 { + export interface UnnamedSchemaWithMapParent3 { /** * UUID */ @@ -649,7 +645,42 @@ export interface PolicyUpdateResponse { id?: string; } -export type PolicyDeleteResponse = unknown | Array | string; +export interface PolicyDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; + + result_info?: PolicyDeleteResponse.ResultInfo; +} + +export namespace PolicyDeleteResponse { + export interface ResultInfo { + /** + * Total number of results for the requested service + */ + count?: number; + + /** + * Current page within paginated list of results + */ + page?: number; + + /** + * Number of results per page of results + */ + per_page?: number; + + /** + * Total results available without any search parameters + */ + total_count?: number; + } +} export interface PolicyCreateParams { /** diff --git a/src/resources/pages/projects/projects.ts b/src/resources/pages/projects/projects.ts index 5f0424380a..162e65ecf5 100644 --- a/src/resources/pages/projects/projects.ts +++ b/src/resources/pages/projects/projects.ts @@ -627,6 +627,11 @@ export namespace Project { * R2 binding. */ export interface R2Binding { + /** + * Jurisdiction of the R2 bucket. + */ + jurisdiction?: string | null; + /** * Name of the R2 bucket. */ @@ -1001,6 +1006,11 @@ export namespace Project { * R2 binding. */ export interface R2Binding { + /** + * Jurisdiction of the R2 bucket. + */ + jurisdiction?: string | null; + /** * Name of the R2 bucket. */ @@ -1510,6 +1520,11 @@ export namespace ProjectCreateParams { * R2 binding. */ export interface R2Binding { + /** + * Jurisdiction of the R2 bucket. + */ + jurisdiction?: string | null; + /** * Name of the R2 bucket. */ @@ -1884,6 +1899,11 @@ export namespace ProjectCreateParams { * R2 binding. */ export interface R2Binding { + /** + * Jurisdiction of the R2 bucket. + */ + jurisdiction?: string | null; + /** * Name of the R2 bucket. */ diff --git a/src/resources/shared.ts b/src/resources/shared.ts index b853366647..5cc66b3e7f 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -406,9 +406,9 @@ export type Result = Result.UnionMember0 | Result.AaaAPIResponseCommon; export namespace Result { export interface UnionMember0 { - errors?: unknown | null; + errors?: Array; - messages?: Array; + messages?: Array; result?: Array; @@ -420,8 +420,6 @@ export namespace Result { messages: Array; - result: unknown | Array | string; - /** * Whether the API call was successful */ diff --git a/tests/api-resources/pages/projects/projects.test.ts b/tests/api-resources/pages/projects/projects.test.ts index c2c912dc7f..fddeda4c67 100644 --- a/tests/api-resources/pages/projects/projects.test.ts +++ b/tests/api-resources/pages/projects/projects.test.ts @@ -50,7 +50,7 @@ describe('resource projects', () => { mtls_certificates: { MTLS: { certificate_id: 'd7cdd17c-916f-4cb7-aabe-585eb382ec4e' } }, placement: { mode: 'smart' }, queue_producers: { QUEUE_PRODUCER_BINDING: { name: 'some-queue' } }, - r2_buckets: { R2_BINDING: { name: 'some-bucket' } }, + r2_buckets: { R2_BINDING: { jurisdiction: 'eu', name: 'some-bucket' } }, services: { SERVICE_BINDING: { entrypoint: 'MyHandler', @@ -74,7 +74,7 @@ describe('resource projects', () => { mtls_certificates: { MTLS: { certificate_id: 'd7cdd17c-916f-4cb7-aabe-585eb382ec4e' } }, placement: { mode: 'smart' }, queue_producers: { QUEUE_PRODUCER_BINDING: { name: 'some-queue' } }, - r2_buckets: { R2_BINDING: { name: 'some-bucket' } }, + r2_buckets: { R2_BINDING: { jurisdiction: 'eu', name: 'some-bucket' } }, services: { SERVICE_BINDING: { entrypoint: 'MyHandler', From 5455c3fbcc36d7425b40326075dd5ea71a15050e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 01:21:57 +0000 Subject: [PATCH 168/473] feat(api): update via SDK Studio (#665) --- .stats.yml | 2 +- api.md | 3 - src/resources/zero-trust/access/access.ts | 1 - .../access/applications/applications.ts | 3 - .../zero-trust/access/applications/index.ts | 3 - .../access/applications/policies.ts | 137 ------------------ .../zero-trust/access/custom-pages.ts | 39 ----- src/resources/zero-trust/access/index.ts | 1 - .../access/applications/policies.test.ts | 15 -- .../zero-trust/access/custom-pages.test.ts | 30 ---- 10 files changed, 1 insertion(+), 233 deletions(-) diff --git a/.stats.yml b/.stats.yml index 10d7615110..1dd9e3f2e2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1296 +configured_endpoints: 1294 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eaf3cf93b4b0566484405b918a65aeca6e5ad4cc194989298a633601684fa0c1.yml diff --git a/api.md b/api.md index a0e39118fd..d85fee37c7 100644 --- a/api.md +++ b/api.md @@ -4482,7 +4482,6 @@ Types: - Policy - PolicyCreateResponse - PolicyUpdateResponse -- PolicyListResponse - PolicyDeleteResponse - PolicyGetResponse @@ -4490,7 +4489,6 @@ Methods: - client.zeroTrust.access.applications.policies.create(uuid, { ...params }) -> PolicyCreateResponse - client.zeroTrust.access.applications.policies.update(uuid1, uuid, { ...params }) -> PolicyUpdateResponse -- client.zeroTrust.access.applications.policies.list(uuid, { ...params }) -> PolicyListResponsesSinglePage - client.zeroTrust.access.applications.policies.delete(uuid1, uuid, { ...params }) -> PolicyDeleteResponse - client.zeroTrust.access.applications.policies.get(uuid1, uuid, { ...params }) -> PolicyGetResponse @@ -4650,7 +4648,6 @@ Types: Methods: -- client.zeroTrust.access.customPages.create(identifier, { ...params }) -> CustomPageWithoutHTML - client.zeroTrust.access.customPages.update(identifier, uuid, { ...params }) -> CustomPageWithoutHTML - client.zeroTrust.access.customPages.list(identifier) -> CustomPageWithoutHTMLsSinglePage - client.zeroTrust.access.customPages.delete(identifier, uuid) -> CustomPageDeleteResponse diff --git a/src/resources/zero-trust/access/access.ts b/src/resources/zero-trust/access/access.ts index d45a705f08..ab5d991ecd 100644 --- a/src/resources/zero-trust/access/access.ts +++ b/src/resources/zero-trust/access/access.ts @@ -802,7 +802,6 @@ export namespace Access { export import CustomPageWithoutHTML = CustomPagesAPI.CustomPageWithoutHTML; export import CustomPageDeleteResponse = CustomPagesAPI.CustomPageDeleteResponse; export import CustomPageWithoutHTMLsSinglePage = CustomPagesAPI.CustomPageWithoutHTMLsSinglePage; - export import CustomPageCreateParams = CustomPagesAPI.CustomPageCreateParams; export import CustomPageUpdateParams = CustomPagesAPI.CustomPageUpdateParams; export import Tags = TagsAPI.Tags; export import Tag = TagsAPI.Tag; diff --git a/src/resources/zero-trust/access/applications/applications.ts b/src/resources/zero-trust/access/applications/applications.ts index 8d204506da..983f61fbf4 100644 --- a/src/resources/zero-trust/access/applications/applications.ts +++ b/src/resources/zero-trust/access/applications/applications.ts @@ -20509,13 +20509,10 @@ export namespace Applications { export import Policy = PoliciesAPI.Policy; export import PolicyCreateResponse = PoliciesAPI.PolicyCreateResponse; export import PolicyUpdateResponse = PoliciesAPI.PolicyUpdateResponse; - export import PolicyListResponse = PoliciesAPI.PolicyListResponse; export import PolicyDeleteResponse = PoliciesAPI.PolicyDeleteResponse; export import PolicyGetResponse = PoliciesAPI.PolicyGetResponse; - export import PolicyListResponsesSinglePage = PoliciesAPI.PolicyListResponsesSinglePage; export import PolicyCreateParams = PoliciesAPI.PolicyCreateParams; export import PolicyUpdateParams = PoliciesAPI.PolicyUpdateParams; - export import PolicyListParams = PoliciesAPI.PolicyListParams; export import PolicyDeleteParams = PoliciesAPI.PolicyDeleteParams; export import PolicyGetParams = PoliciesAPI.PolicyGetParams; } diff --git a/src/resources/zero-trust/access/applications/index.ts b/src/resources/zero-trust/access/applications/index.ts index ed76c33146..a15ae797a3 100644 --- a/src/resources/zero-trust/access/applications/index.ts +++ b/src/resources/zero-trust/access/applications/index.ts @@ -35,15 +35,12 @@ export { Policy, PolicyCreateResponse, PolicyUpdateResponse, - PolicyListResponse, PolicyDeleteResponse, PolicyGetResponse, PolicyCreateParams, PolicyUpdateParams, - PolicyListParams, PolicyDeleteParams, PolicyGetParams, - PolicyListResponsesSinglePage, Policies, } from './policies'; export { diff --git a/src/resources/zero-trust/access/applications/policies.ts b/src/resources/zero-trust/access/applications/policies.ts index 014e628827..63cbef336c 100644 --- a/src/resources/zero-trust/access/applications/policies.ts +++ b/src/resources/zero-trust/access/applications/policies.ts @@ -7,7 +7,6 @@ import { CloudflareError } from '../../../../error'; import * as PoliciesAPI from './policies'; import * as AccessAPI from '../access'; import * as ApplicationsAPI from './applications'; -import { SinglePage } from '../../../../pagination'; export class Policies extends APIResource { /** @@ -81,51 +80,6 @@ export class Policies extends APIResource { )._thenUnwrap((obj) => obj.result); } - /** - * Lists Access policies configured for an application. Returns both exclusively - * scoped and reusable policies used by the application. - */ - list( - uuid: string, - params?: PolicyListParams, - options?: Core.RequestOptions, - ): Core.PagePromise; - list( - uuid: string, - options?: Core.RequestOptions, - ): Core.PagePromise; - list( - uuid: string, - params: PolicyListParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.PagePromise { - if (isRequestOptions(params)) { - return this.list(uuid, {}, params); - } - const { account_id, zone_id } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return this._client.getAPIList( - `/${accountOrZone}/${accountOrZoneId}/access/apps/${uuid}/policies`, - PolicyListResponsesSinglePage, - options, - ); - } - /** * Deletes an Access policy specific to an application. To delete a reusable * policy, use the /account or zones/{identifier}/policies/{uid} endpoint. @@ -217,8 +171,6 @@ export class Policies extends APIResource { } } -export class PolicyListResponsesSinglePage extends SinglePage {} - /** * A group of email addresses that can approve a temporary authentication request. */ @@ -500,80 +452,6 @@ export interface PolicyUpdateResponse { updated_at?: string; } -export interface PolicyListResponse { - /** - * UUID - */ - id?: string; - - /** - * Administrators who can approve a temporary authentication request. - */ - approval_groups?: Array; - - /** - * Requires the user to request access from an administrator at the start of each - * session. - */ - approval_required?: boolean; - - created_at?: string; - - /** - * The action Access will take if a user matches this policy. - */ - decision?: ApplicationsAPI.Decision; - - /** - * Rules evaluated with a NOT logical operator. To match the policy, a user cannot - * meet any of the Exclude rules. - */ - exclude?: Array; - - /** - * Rules evaluated with an OR logical operator. A user needs to meet only one of - * the Include rules. - */ - include?: Array; - - /** - * Require this application to be served in an isolated browser for users matching - * this policy. 'Client Web Isolation' must be on for the account in order to use - * this feature. - */ - isolation_required?: boolean; - - /** - * The name of the Access policy. - */ - name?: string; - - /** - * A custom message that will appear on the purpose justification screen. - */ - purpose_justification_prompt?: string; - - /** - * Require users to enter a justification when they log in to the application. - */ - purpose_justification_required?: boolean; - - /** - * Rules evaluated with an AND logical operator. To match the policy, a user must - * meet all of the Require rules. - */ - require?: Array; - - /** - * The amount of time that tokens issued for the application will be valid. Must be - * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, - * m, h. - */ - session_duration?: string; - - updated_at?: string; -} - export interface PolicyDeleteResponse { /** * UUID @@ -825,18 +703,6 @@ export interface PolicyUpdateParams { session_duration?: string; } -export interface PolicyListParams { - /** - * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - */ - account_id?: string; - - /** - * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - */ - zone_id?: string; -} - export interface PolicyDeleteParams { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. @@ -866,13 +732,10 @@ export namespace Policies { export import Policy = PoliciesAPI.Policy; export import PolicyCreateResponse = PoliciesAPI.PolicyCreateResponse; export import PolicyUpdateResponse = PoliciesAPI.PolicyUpdateResponse; - export import PolicyListResponse = PoliciesAPI.PolicyListResponse; export import PolicyDeleteResponse = PoliciesAPI.PolicyDeleteResponse; export import PolicyGetResponse = PoliciesAPI.PolicyGetResponse; - export import PolicyListResponsesSinglePage = PoliciesAPI.PolicyListResponsesSinglePage; export import PolicyCreateParams = PoliciesAPI.PolicyCreateParams; export import PolicyUpdateParams = PoliciesAPI.PolicyUpdateParams; - export import PolicyListParams = PoliciesAPI.PolicyListParams; export import PolicyDeleteParams = PoliciesAPI.PolicyDeleteParams; export import PolicyGetParams = PoliciesAPI.PolicyGetParams; } diff --git a/src/resources/zero-trust/access/custom-pages.ts b/src/resources/zero-trust/access/custom-pages.ts index f599bbe114..f2a5fc9942 100644 --- a/src/resources/zero-trust/access/custom-pages.ts +++ b/src/resources/zero-trust/access/custom-pages.ts @@ -6,22 +6,6 @@ import * as CustomPagesAPI from './custom-pages'; import { SinglePage } from '../../../pagination'; export class CustomPages extends APIResource { - /** - * Create a custom page - */ - create( - identifier: string, - body: CustomPageCreateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { - return ( - this._client.post(`/accounts/${identifier}/access/custom_pages`, { - body, - ...options, - }) as Core.APIPromise<{ result: CustomPageWithoutHTML }> - )._thenUnwrap((obj) => obj.result); - } - /** * Update a custom page */ @@ -146,28 +130,6 @@ export interface CustomPageDeleteResponse { id?: string; } -export interface CustomPageCreateParams { - /** - * Custom page HTML. - */ - custom_html: string; - - /** - * Custom page name. - */ - name: string; - - /** - * Custom page type. - */ - type: 'identity_denied' | 'forbidden'; - - /** - * Number of apps the custom page is assigned to. - */ - app_count?: number; -} - export interface CustomPageUpdateParams { /** * Custom page HTML. @@ -195,6 +157,5 @@ export namespace CustomPages { export import CustomPageWithoutHTML = CustomPagesAPI.CustomPageWithoutHTML; export import CustomPageDeleteResponse = CustomPagesAPI.CustomPageDeleteResponse; export import CustomPageWithoutHTMLsSinglePage = CustomPagesAPI.CustomPageWithoutHTMLsSinglePage; - export import CustomPageCreateParams = CustomPagesAPI.CustomPageCreateParams; export import CustomPageUpdateParams = CustomPagesAPI.CustomPageUpdateParams; } diff --git a/src/resources/zero-trust/access/index.ts b/src/resources/zero-trust/access/index.ts index c701f3e8c9..5850a192d3 100644 --- a/src/resources/zero-trust/access/index.ts +++ b/src/resources/zero-trust/access/index.ts @@ -78,7 +78,6 @@ export { CustomPage, CustomPageWithoutHTML, CustomPageDeleteResponse, - CustomPageCreateParams, CustomPageUpdateParams, CustomPageWithoutHTMLsSinglePage, CustomPages, diff --git a/tests/api-resources/zero-trust/access/applications/policies.test.ts b/tests/api-resources/zero-trust/access/applications/policies.test.ts index a9e9830136..2ed6144fa1 100644 --- a/tests/api-resources/zero-trust/access/applications/policies.test.ts +++ b/tests/api-resources/zero-trust/access/applications/policies.test.ts @@ -150,21 +150,6 @@ describe('resource policies', () => { ); }); - // TODO: investigate broken test - test.skip('list', async () => { - const responsePromise = cloudflare.zeroTrust.access.applications.policies.list( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: 'string' }, - ); - 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); - }); - // TODO: investigate broken test test.skip('delete', async () => { const responsePromise = cloudflare.zeroTrust.access.applications.policies.delete( diff --git a/tests/api-resources/zero-trust/access/custom-pages.test.ts b/tests/api-resources/zero-trust/access/custom-pages.test.ts index 6c50153ce9..cb7090843e 100644 --- a/tests/api-resources/zero-trust/access/custom-pages.test.ts +++ b/tests/api-resources/zero-trust/access/custom-pages.test.ts @@ -10,36 +10,6 @@ const cloudflare = new Cloudflare({ }); describe('resource customPages', () => { - test('create: only required params', async () => { - const responsePromise = cloudflare.zeroTrust.access.customPages.create( - '023e105f4ecef8ad9ca31a8372d0c353', - { - custom_html: '

Access Denied

', - name: 'string', - type: 'identity_denied', - }, - ); - 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('create: required and optional params', async () => { - const response = await cloudflare.zeroTrust.access.customPages.create( - '023e105f4ecef8ad9ca31a8372d0c353', - { - custom_html: '

Access Denied

', - name: 'string', - type: 'identity_denied', - app_count: 0, - }, - ); - }); - test('update: only required params', async () => { const responsePromise = cloudflare.zeroTrust.access.customPages.update( '023e105f4ecef8ad9ca31a8372d0c353', From 0b64c3302adcc3fb15588d9fbeed2887a52f0151 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 01:28:34 +0000 Subject: [PATCH 169/473] feat(api): update via SDK Studio (#666) --- .stats.yml | 2 +- api.md | 3 + src/resources/zero-trust/access/access.ts | 1 + .../access/applications/applications.ts | 3 + .../zero-trust/access/applications/index.ts | 3 + .../access/applications/policies.ts | 137 ++++++++++++++++++ .../zero-trust/access/custom-pages.ts | 39 +++++ src/resources/zero-trust/access/index.ts | 1 + .../access/applications/policies.test.ts | 15 ++ .../zero-trust/access/custom-pages.test.ts | 30 ++++ 10 files changed, 233 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1dd9e3f2e2..10d7615110 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1294 +configured_endpoints: 1296 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eaf3cf93b4b0566484405b918a65aeca6e5ad4cc194989298a633601684fa0c1.yml diff --git a/api.md b/api.md index d85fee37c7..a0e39118fd 100644 --- a/api.md +++ b/api.md @@ -4482,6 +4482,7 @@ Types: - Policy - PolicyCreateResponse - PolicyUpdateResponse +- PolicyListResponse - PolicyDeleteResponse - PolicyGetResponse @@ -4489,6 +4490,7 @@ Methods: - client.zeroTrust.access.applications.policies.create(uuid, { ...params }) -> PolicyCreateResponse - client.zeroTrust.access.applications.policies.update(uuid1, uuid, { ...params }) -> PolicyUpdateResponse +- client.zeroTrust.access.applications.policies.list(uuid, { ...params }) -> PolicyListResponsesSinglePage - client.zeroTrust.access.applications.policies.delete(uuid1, uuid, { ...params }) -> PolicyDeleteResponse - client.zeroTrust.access.applications.policies.get(uuid1, uuid, { ...params }) -> PolicyGetResponse @@ -4648,6 +4650,7 @@ Types: Methods: +- client.zeroTrust.access.customPages.create(identifier, { ...params }) -> CustomPageWithoutHTML - client.zeroTrust.access.customPages.update(identifier, uuid, { ...params }) -> CustomPageWithoutHTML - client.zeroTrust.access.customPages.list(identifier) -> CustomPageWithoutHTMLsSinglePage - client.zeroTrust.access.customPages.delete(identifier, uuid) -> CustomPageDeleteResponse diff --git a/src/resources/zero-trust/access/access.ts b/src/resources/zero-trust/access/access.ts index ab5d991ecd..d45a705f08 100644 --- a/src/resources/zero-trust/access/access.ts +++ b/src/resources/zero-trust/access/access.ts @@ -802,6 +802,7 @@ export namespace Access { export import CustomPageWithoutHTML = CustomPagesAPI.CustomPageWithoutHTML; export import CustomPageDeleteResponse = CustomPagesAPI.CustomPageDeleteResponse; export import CustomPageWithoutHTMLsSinglePage = CustomPagesAPI.CustomPageWithoutHTMLsSinglePage; + export import CustomPageCreateParams = CustomPagesAPI.CustomPageCreateParams; export import CustomPageUpdateParams = CustomPagesAPI.CustomPageUpdateParams; export import Tags = TagsAPI.Tags; export import Tag = TagsAPI.Tag; diff --git a/src/resources/zero-trust/access/applications/applications.ts b/src/resources/zero-trust/access/applications/applications.ts index 983f61fbf4..8d204506da 100644 --- a/src/resources/zero-trust/access/applications/applications.ts +++ b/src/resources/zero-trust/access/applications/applications.ts @@ -20509,10 +20509,13 @@ export namespace Applications { export import Policy = PoliciesAPI.Policy; export import PolicyCreateResponse = PoliciesAPI.PolicyCreateResponse; export import PolicyUpdateResponse = PoliciesAPI.PolicyUpdateResponse; + export import PolicyListResponse = PoliciesAPI.PolicyListResponse; export import PolicyDeleteResponse = PoliciesAPI.PolicyDeleteResponse; export import PolicyGetResponse = PoliciesAPI.PolicyGetResponse; + export import PolicyListResponsesSinglePage = PoliciesAPI.PolicyListResponsesSinglePage; export import PolicyCreateParams = PoliciesAPI.PolicyCreateParams; export import PolicyUpdateParams = PoliciesAPI.PolicyUpdateParams; + export import PolicyListParams = PoliciesAPI.PolicyListParams; export import PolicyDeleteParams = PoliciesAPI.PolicyDeleteParams; export import PolicyGetParams = PoliciesAPI.PolicyGetParams; } diff --git a/src/resources/zero-trust/access/applications/index.ts b/src/resources/zero-trust/access/applications/index.ts index a15ae797a3..ed76c33146 100644 --- a/src/resources/zero-trust/access/applications/index.ts +++ b/src/resources/zero-trust/access/applications/index.ts @@ -35,12 +35,15 @@ export { Policy, PolicyCreateResponse, PolicyUpdateResponse, + PolicyListResponse, PolicyDeleteResponse, PolicyGetResponse, PolicyCreateParams, PolicyUpdateParams, + PolicyListParams, PolicyDeleteParams, PolicyGetParams, + PolicyListResponsesSinglePage, Policies, } from './policies'; export { diff --git a/src/resources/zero-trust/access/applications/policies.ts b/src/resources/zero-trust/access/applications/policies.ts index 63cbef336c..014e628827 100644 --- a/src/resources/zero-trust/access/applications/policies.ts +++ b/src/resources/zero-trust/access/applications/policies.ts @@ -7,6 +7,7 @@ import { CloudflareError } from '../../../../error'; import * as PoliciesAPI from './policies'; import * as AccessAPI from '../access'; import * as ApplicationsAPI from './applications'; +import { SinglePage } from '../../../../pagination'; export class Policies extends APIResource { /** @@ -80,6 +81,51 @@ export class Policies extends APIResource { )._thenUnwrap((obj) => obj.result); } + /** + * Lists Access policies configured for an application. Returns both exclusively + * scoped and reusable policies used by the application. + */ + list( + uuid: string, + params?: PolicyListParams, + options?: Core.RequestOptions, + ): Core.PagePromise; + list( + uuid: string, + options?: Core.RequestOptions, + ): Core.PagePromise; + list( + uuid: string, + params: PolicyListParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.PagePromise { + if (isRequestOptions(params)) { + return this.list(uuid, {}, params); + } + const { account_id, zone_id } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return this._client.getAPIList( + `/${accountOrZone}/${accountOrZoneId}/access/apps/${uuid}/policies`, + PolicyListResponsesSinglePage, + options, + ); + } + /** * Deletes an Access policy specific to an application. To delete a reusable * policy, use the /account or zones/{identifier}/policies/{uid} endpoint. @@ -171,6 +217,8 @@ export class Policies extends APIResource { } } +export class PolicyListResponsesSinglePage extends SinglePage {} + /** * A group of email addresses that can approve a temporary authentication request. */ @@ -452,6 +500,80 @@ export interface PolicyUpdateResponse { updated_at?: string; } +export interface PolicyListResponse { + /** + * UUID + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: ApplicationsAPI.Decision; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; +} + export interface PolicyDeleteResponse { /** * UUID @@ -703,6 +825,18 @@ export interface PolicyUpdateParams { session_duration?: string; } +export interface PolicyListParams { + /** + * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + */ + account_id?: string; + + /** + * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + */ + zone_id?: string; +} + export interface PolicyDeleteParams { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. @@ -732,10 +866,13 @@ export namespace Policies { export import Policy = PoliciesAPI.Policy; export import PolicyCreateResponse = PoliciesAPI.PolicyCreateResponse; export import PolicyUpdateResponse = PoliciesAPI.PolicyUpdateResponse; + export import PolicyListResponse = PoliciesAPI.PolicyListResponse; export import PolicyDeleteResponse = PoliciesAPI.PolicyDeleteResponse; export import PolicyGetResponse = PoliciesAPI.PolicyGetResponse; + export import PolicyListResponsesSinglePage = PoliciesAPI.PolicyListResponsesSinglePage; export import PolicyCreateParams = PoliciesAPI.PolicyCreateParams; export import PolicyUpdateParams = PoliciesAPI.PolicyUpdateParams; + export import PolicyListParams = PoliciesAPI.PolicyListParams; export import PolicyDeleteParams = PoliciesAPI.PolicyDeleteParams; export import PolicyGetParams = PoliciesAPI.PolicyGetParams; } diff --git a/src/resources/zero-trust/access/custom-pages.ts b/src/resources/zero-trust/access/custom-pages.ts index f2a5fc9942..f599bbe114 100644 --- a/src/resources/zero-trust/access/custom-pages.ts +++ b/src/resources/zero-trust/access/custom-pages.ts @@ -6,6 +6,22 @@ import * as CustomPagesAPI from './custom-pages'; import { SinglePage } from '../../../pagination'; export class CustomPages extends APIResource { + /** + * Create a custom page + */ + create( + identifier: string, + body: CustomPageCreateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + return ( + this._client.post(`/accounts/${identifier}/access/custom_pages`, { + body, + ...options, + }) as Core.APIPromise<{ result: CustomPageWithoutHTML }> + )._thenUnwrap((obj) => obj.result); + } + /** * Update a custom page */ @@ -130,6 +146,28 @@ export interface CustomPageDeleteResponse { id?: string; } +export interface CustomPageCreateParams { + /** + * Custom page HTML. + */ + custom_html: string; + + /** + * Custom page name. + */ + name: string; + + /** + * Custom page type. + */ + type: 'identity_denied' | 'forbidden'; + + /** + * Number of apps the custom page is assigned to. + */ + app_count?: number; +} + export interface CustomPageUpdateParams { /** * Custom page HTML. @@ -157,5 +195,6 @@ export namespace CustomPages { export import CustomPageWithoutHTML = CustomPagesAPI.CustomPageWithoutHTML; export import CustomPageDeleteResponse = CustomPagesAPI.CustomPageDeleteResponse; export import CustomPageWithoutHTMLsSinglePage = CustomPagesAPI.CustomPageWithoutHTMLsSinglePage; + export import CustomPageCreateParams = CustomPagesAPI.CustomPageCreateParams; export import CustomPageUpdateParams = CustomPagesAPI.CustomPageUpdateParams; } diff --git a/src/resources/zero-trust/access/index.ts b/src/resources/zero-trust/access/index.ts index 5850a192d3..c701f3e8c9 100644 --- a/src/resources/zero-trust/access/index.ts +++ b/src/resources/zero-trust/access/index.ts @@ -78,6 +78,7 @@ export { CustomPage, CustomPageWithoutHTML, CustomPageDeleteResponse, + CustomPageCreateParams, CustomPageUpdateParams, CustomPageWithoutHTMLsSinglePage, CustomPages, diff --git a/tests/api-resources/zero-trust/access/applications/policies.test.ts b/tests/api-resources/zero-trust/access/applications/policies.test.ts index 2ed6144fa1..a9e9830136 100644 --- a/tests/api-resources/zero-trust/access/applications/policies.test.ts +++ b/tests/api-resources/zero-trust/access/applications/policies.test.ts @@ -150,6 +150,21 @@ describe('resource policies', () => { ); }); + // TODO: investigate broken test + test.skip('list', async () => { + const responsePromise = cloudflare.zeroTrust.access.applications.policies.list( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: 'string' }, + ); + 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); + }); + // TODO: investigate broken test test.skip('delete', async () => { const responsePromise = cloudflare.zeroTrust.access.applications.policies.delete( diff --git a/tests/api-resources/zero-trust/access/custom-pages.test.ts b/tests/api-resources/zero-trust/access/custom-pages.test.ts index cb7090843e..6c50153ce9 100644 --- a/tests/api-resources/zero-trust/access/custom-pages.test.ts +++ b/tests/api-resources/zero-trust/access/custom-pages.test.ts @@ -10,6 +10,36 @@ const cloudflare = new Cloudflare({ }); describe('resource customPages', () => { + test('create: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.customPages.create( + '023e105f4ecef8ad9ca31a8372d0c353', + { + custom_html: '

Access Denied

', + name: 'string', + type: 'identity_denied', + }, + ); + 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('create: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.customPages.create( + '023e105f4ecef8ad9ca31a8372d0c353', + { + custom_html: '

Access Denied

', + name: 'string', + type: 'identity_denied', + app_count: 0, + }, + ); + }); + test('update: only required params', async () => { const responsePromise = cloudflare.zeroTrust.access.customPages.update( '023e105f4ecef8ad9ca31a8372d0c353', From 04463f745907719fa3ec850be0a70703cf3c15f5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 03:38:18 +0000 Subject: [PATCH 170/473] feat(api): update via SDK Studio (#667) --- api.md | 10 +++--- src/resources/logs/control/control.ts | 5 ++- src/resources/logs/control/index.ts | 2 +- .../{retention/flag.ts => retention.ts} | 32 +++++++++---------- src/resources/logs/control/retention/index.ts | 4 --- .../logs/control/retention/retention.ts | 15 --------- .../flag.test.ts => retention.test.ts} | 15 ++++----- 7 files changed, 32 insertions(+), 51 deletions(-) rename src/resources/logs/control/{retention/flag.ts => retention.ts} (51%) delete mode 100644 src/resources/logs/control/retention/index.ts delete mode 100644 src/resources/logs/control/retention/retention.ts rename tests/api-resources/logs/control/{retention/flag.test.ts => retention.test.ts} (77%) diff --git a/api.md b/api.md index a0e39118fd..10fb7ca81c 100644 --- a/api.md +++ b/api.md @@ -1843,17 +1843,15 @@ Methods: ### Retention -#### Flag - Types: -- FlagCreateResponse -- FlagGetResponse +- RetentionCreateResponse +- RetentionGetResponse Methods: -- client.logs.control.retention.flag.create(zoneIdentifier, { ...params }) -> FlagCreateResponse -- client.logs.control.retention.flag.get(zoneIdentifier) -> FlagGetResponse +- client.logs.control.retention.create(zoneIdentifier, { ...params }) -> RetentionCreateResponse +- client.logs.control.retention.get(zoneIdentifier) -> RetentionGetResponse ### Cmb diff --git a/src/resources/logs/control/control.ts b/src/resources/logs/control/control.ts index 47a0cc332f..5f5c1e3c0e 100644 --- a/src/resources/logs/control/control.ts +++ b/src/resources/logs/control/control.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../../resource'; +import * as RetentionAPI from './retention'; import * as CmbAPI from './cmb/cmb'; -import * as RetentionAPI from './retention/retention'; export class Control extends APIResource { retention: RetentionAPI.Retention = new RetentionAPI.Retention(this._client); @@ -11,5 +11,8 @@ export class Control extends APIResource { export namespace Control { export import Retention = RetentionAPI.Retention; + export import RetentionCreateResponse = RetentionAPI.RetentionCreateResponse; + export import RetentionGetResponse = RetentionAPI.RetentionGetResponse; + export import RetentionCreateParams = RetentionAPI.RetentionCreateParams; export import Cmb = CmbAPI.Cmb; } diff --git a/src/resources/logs/control/index.ts b/src/resources/logs/control/index.ts index 7aeda6d408..e431d52a6a 100644 --- a/src/resources/logs/control/index.ts +++ b/src/resources/logs/control/index.ts @@ -2,4 +2,4 @@ export { Cmb } from './cmb/index'; export { Control } from './control'; -export { Retention } from './retention/index'; +export { RetentionCreateResponse, RetentionGetResponse, RetentionCreateParams, Retention } from './retention'; diff --git a/src/resources/logs/control/retention/flag.ts b/src/resources/logs/control/retention.ts similarity index 51% rename from src/resources/logs/control/retention/flag.ts rename to src/resources/logs/control/retention.ts index b153a8c656..17c02455d5 100644 --- a/src/resources/logs/control/retention/flag.ts +++ b/src/resources/logs/control/retention.ts @@ -1,55 +1,55 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from '../../../../core'; -import { APIResource } from '../../../../resource'; -import * as FlagAPI from './flag'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as RetentionAPI from './retention'; -export class Flag extends APIResource { +export class Retention extends APIResource { /** * Updates log retention flag for Logpull API. */ create( zoneIdentifier: string, - body: FlagCreateParams, + body: RetentionCreateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.post(`/zones/${zoneIdentifier}/logs/control/retention/flag`, { body, ...options, - }) as Core.APIPromise<{ result: FlagCreateResponse }> + }) as Core.APIPromise<{ result: RetentionCreateResponse }> )._thenUnwrap((obj) => obj.result); } /** * Gets log retention flag for Logpull API. */ - get(zoneIdentifier: string, options?: Core.RequestOptions): Core.APIPromise { + get(zoneIdentifier: string, options?: Core.RequestOptions): Core.APIPromise { return ( this._client.get(`/zones/${zoneIdentifier}/logs/control/retention/flag`, options) as Core.APIPromise<{ - result: FlagGetResponse; + result: RetentionGetResponse; }> )._thenUnwrap((obj) => obj.result); } } -export interface FlagCreateResponse { +export interface RetentionCreateResponse { flag?: boolean; } -export interface FlagGetResponse { +export interface RetentionGetResponse { flag?: boolean; } -export interface FlagCreateParams { +export interface RetentionCreateParams { /** * The log retention flag for Logpull API. */ flag: boolean; } -export namespace Flag { - export import FlagCreateResponse = FlagAPI.FlagCreateResponse; - export import FlagGetResponse = FlagAPI.FlagGetResponse; - export import FlagCreateParams = FlagAPI.FlagCreateParams; +export namespace Retention { + export import RetentionCreateResponse = RetentionAPI.RetentionCreateResponse; + export import RetentionGetResponse = RetentionAPI.RetentionGetResponse; + export import RetentionCreateParams = RetentionAPI.RetentionCreateParams; } diff --git a/src/resources/logs/control/retention/index.ts b/src/resources/logs/control/retention/index.ts deleted file mode 100644 index 9929b0ea51..0000000000 --- a/src/resources/logs/control/retention/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -export { FlagCreateResponse, FlagGetResponse, FlagCreateParams, Flag } from './flag'; -export { Retention } from './retention'; diff --git a/src/resources/logs/control/retention/retention.ts b/src/resources/logs/control/retention/retention.ts deleted file mode 100644 index 79e8195280..0000000000 --- a/src/resources/logs/control/retention/retention.ts +++ /dev/null @@ -1,15 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../../resource'; -import * as FlagAPI from './flag'; - -export class Retention extends APIResource { - flag: FlagAPI.Flag = new FlagAPI.Flag(this._client); -} - -export namespace Retention { - export import Flag = FlagAPI.Flag; - export import FlagCreateResponse = FlagAPI.FlagCreateResponse; - export import FlagGetResponse = FlagAPI.FlagGetResponse; - export import FlagCreateParams = FlagAPI.FlagCreateParams; -} diff --git a/tests/api-resources/logs/control/retention/flag.test.ts b/tests/api-resources/logs/control/retention.test.ts similarity index 77% rename from tests/api-resources/logs/control/retention/flag.test.ts rename to tests/api-resources/logs/control/retention.test.ts index 22939ad804..97094f9ca3 100644 --- a/tests/api-resources/logs/control/retention/flag.test.ts +++ b/tests/api-resources/logs/control/retention.test.ts @@ -9,12 +9,11 @@ const cloudflare = new Cloudflare({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); -describe('resource flag', () => { +describe('resource retention', () => { test('create: only required params', async () => { - const responsePromise = cloudflare.logs.control.retention.flag.create( - '023e105f4ecef8ad9ca31a8372d0c353', - { flag: true }, - ); + const responsePromise = cloudflare.logs.control.retention.create('023e105f4ecef8ad9ca31a8372d0c353', { + flag: true, + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -25,13 +24,13 @@ describe('resource flag', () => { }); test('create: required and optional params', async () => { - const response = await cloudflare.logs.control.retention.flag.create('023e105f4ecef8ad9ca31a8372d0c353', { + const response = await cloudflare.logs.control.retention.create('023e105f4ecef8ad9ca31a8372d0c353', { flag: true, }); }); test('get', async () => { - const responsePromise = cloudflare.logs.control.retention.flag.get('023e105f4ecef8ad9ca31a8372d0c353'); + const responsePromise = cloudflare.logs.control.retention.get('023e105f4ecef8ad9ca31a8372d0c353'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -44,7 +43,7 @@ describe('resource flag', () => { test('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.logs.control.retention.flag.get('023e105f4ecef8ad9ca31a8372d0c353', { + cloudflare.logs.control.retention.get('023e105f4ecef8ad9ca31a8372d0c353', { path: '/_stainless_unknown_path', }), ).rejects.toThrow(Cloudflare.NotFoundError); From f87cfc58c9e8880cb3f85d72ec3dbab1939b1b90 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 03:41:42 +0000 Subject: [PATCH 171/473] feat(api): update via SDK Studio (#668) --- .stats.yml | 2 +- api.md | 11 ++ src/resources/r2/index.ts | 6 + src/resources/r2/r2.ts | 7 ++ src/resources/r2/temporary-credentials.ts | 116 ++++++++++++++++++ .../r2/temporary-credentials.test.ts | 41 +++++++ 6 files changed, 182 insertions(+), 1 deletion(-) create mode 100644 src/resources/r2/temporary-credentials.ts create mode 100644 tests/api-resources/r2/temporary-credentials.test.ts diff --git a/.stats.yml b/.stats.yml index 10d7615110..5e1891fd45 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1296 +configured_endpoints: 1297 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eaf3cf93b4b0566484405b918a65aeca6e5ad4cc194989298a633601684fa0c1.yml diff --git a/api.md b/api.md index 10fb7ca81c..8c35ac629b 100644 --- a/api.md +++ b/api.md @@ -4031,6 +4031,17 @@ Methods: - client.r2.sippy.delete(bucketName, { ...params }) -> SippyDeleteResponse - client.r2.sippy.get(bucketName, { ...params }) -> Sippy +## TemporaryCredentials + +Types: + +- TemporaryCredential +- TemporaryCredentialCreateResponse + +Methods: + +- client.r2.temporaryCredentials.create({ ...params }) -> TemporaryCredentialCreateResponse + # WARPConnector Types: diff --git a/src/resources/r2/index.ts b/src/resources/r2/index.ts index 287e987bd4..724fbdfd2e 100644 --- a/src/resources/r2/index.ts +++ b/src/resources/r2/index.ts @@ -20,3 +20,9 @@ export { SippyResource, } from './sippy'; export { R2 } from './r2'; +export { + TemporaryCredential, + TemporaryCredentialCreateResponse, + TemporaryCredentialCreateParams, + TemporaryCredentials, +} from './temporary-credentials'; diff --git a/src/resources/r2/r2.ts b/src/resources/r2/r2.ts index d02124af22..1765a725d6 100644 --- a/src/resources/r2/r2.ts +++ b/src/resources/r2/r2.ts @@ -3,10 +3,13 @@ import { APIResource } from '../../resource'; import * as BucketsAPI from './buckets'; import * as SippyAPI from './sippy'; +import * as TemporaryCredentialsAPI from './temporary-credentials'; export class R2 extends APIResource { buckets: BucketsAPI.Buckets = new BucketsAPI.Buckets(this._client); sippy: SippyAPI.SippyResource = new SippyAPI.SippyResource(this._client); + temporaryCredentials: TemporaryCredentialsAPI.TemporaryCredentials = + new TemporaryCredentialsAPI.TemporaryCredentials(this._client); } export namespace R2 { @@ -25,4 +28,8 @@ export namespace R2 { export import SippyUpdateParams = SippyAPI.SippyUpdateParams; export import SippyDeleteParams = SippyAPI.SippyDeleteParams; export import SippyGetParams = SippyAPI.SippyGetParams; + export import TemporaryCredentials = TemporaryCredentialsAPI.TemporaryCredentials; + export import TemporaryCredential = TemporaryCredentialsAPI.TemporaryCredential; + export import TemporaryCredentialCreateResponse = TemporaryCredentialsAPI.TemporaryCredentialCreateResponse; + export import TemporaryCredentialCreateParams = TemporaryCredentialsAPI.TemporaryCredentialCreateParams; } diff --git a/src/resources/r2/temporary-credentials.ts b/src/resources/r2/temporary-credentials.ts new file mode 100644 index 0000000000..786929807f --- /dev/null +++ b/src/resources/r2/temporary-credentials.ts @@ -0,0 +1,116 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as TemporaryCredentialsAPI from './temporary-credentials'; + +export class TemporaryCredentials extends APIResource { + /** + * Creates temporary access credentials on a bucket that can be optionally scoped + * to prefixes or objects. + */ + create( + params: TemporaryCredentialCreateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.post(`/accounts/${account_id}/r2/temp-access-credentials`, { + body, + ...options, + }) as Core.APIPromise<{ result: TemporaryCredentialCreateResponse }> + )._thenUnwrap((obj) => obj.result); + } +} + +export interface TemporaryCredential { + /** + * Name of the GCS bucket + */ + bucket: string; + + /** + * The parent access key id to use for signing + */ + parentAccessKeyId: string; + + /** + * Permissions allowed on the credentials + */ + permission: 'admin-read-write' | 'admin-read-only' | 'object-read-write' | 'object-read-only'; + + /** + * How long the credentials will live for in seconds + */ + ttlSeconds: number; + + /** + * Optional object paths to scope the credentials to + */ + objects?: Array; + + /** + * Optional prefix paths to scope the credentials to + */ + prefixes?: Array; +} + +export interface TemporaryCredentialCreateResponse { + /** + * ID for new access key + */ + accessKeyId?: string; + + /** + * Secret access key + */ + secretAccessKey?: string; + + /** + * Security token + */ + sessionToken?: string; +} + +export interface TemporaryCredentialCreateParams { + /** + * Path param: Account ID + */ + account_id: string; + + /** + * Body param: Name of the GCS bucket + */ + bucket: string; + + /** + * Body param: The parent access key id to use for signing + */ + parentAccessKeyId: string; + + /** + * Body param: Permissions allowed on the credentials + */ + permission: 'admin-read-write' | 'admin-read-only' | 'object-read-write' | 'object-read-only'; + + /** + * Body param: How long the credentials will live for in seconds + */ + ttlSeconds: number; + + /** + * Body param: Optional object paths to scope the credentials to + */ + objects?: Array; + + /** + * Body param: Optional prefix paths to scope the credentials to + */ + prefixes?: Array; +} + +export namespace TemporaryCredentials { + export import TemporaryCredential = TemporaryCredentialsAPI.TemporaryCredential; + export import TemporaryCredentialCreateResponse = TemporaryCredentialsAPI.TemporaryCredentialCreateResponse; + export import TemporaryCredentialCreateParams = TemporaryCredentialsAPI.TemporaryCredentialCreateParams; +} diff --git a/tests/api-resources/r2/temporary-credentials.test.ts b/tests/api-resources/r2/temporary-credentials.test.ts new file mode 100644 index 0000000000..0128865754 --- /dev/null +++ b/tests/api-resources/r2/temporary-credentials.test.ts @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource temporaryCredentials', () => { + test('create: only required params', async () => { + const responsePromise = cloudflare.r2.temporaryCredentials.create({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + bucket: 'example-bucket', + parentAccessKeyId: 'example-access-key-id', + permission: 'object-read-write', + ttlSeconds: 3600, + }); + 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('create: required and optional params', async () => { + const response = await cloudflare.r2.temporaryCredentials.create({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + bucket: 'example-bucket', + parentAccessKeyId: 'example-access-key-id', + permission: 'object-read-write', + ttlSeconds: 3600, + objects: ['example-object'], + prefixes: ['example-prefix/'], + }); + }); +}); From bcfa71fba939fed054f3e45af6f3eb9162baf7be Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 04:16:50 +0000 Subject: [PATCH 172/473] feat(api): update via SDK Studio (#669) --- src/resources/filters.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/resources/filters.ts b/src/resources/filters.ts index 7cdc8488a4..462b37df82 100644 --- a/src/resources/filters.ts +++ b/src/resources/filters.ts @@ -8,6 +8,8 @@ import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../pagi export class Filters extends APIResource { /** * Creates one or more filters. + * + * @deprecated Filters are being deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. */ create( zoneIdentifier: string, @@ -23,6 +25,8 @@ export class Filters extends APIResource { /** * Updates an existing filter. + * + * @deprecated Filters are being deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. */ update( zoneIdentifier: string, @@ -40,6 +44,8 @@ export class Filters extends APIResource { /** * Fetches filters in a zone. You can filter the results using several optional * parameters. + * + * @deprecated Filters are being deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. */ list( zoneIdentifier: string, @@ -66,6 +72,8 @@ export class Filters extends APIResource { /** * Deletes an existing filter. + * + * @deprecated Filters are being deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. */ delete(zoneIdentifier: string, id: string, options?: Core.RequestOptions): Core.APIPromise { return ( @@ -77,6 +85,8 @@ export class Filters extends APIResource { /** * Fetches the details of a filter. + * + * @deprecated Filters are being deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. */ get(zoneIdentifier: string, id: string, options?: Core.RequestOptions): Core.APIPromise { return ( From 14f40c3cddaec0aff0e66e2db74840b362c70e22 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 04:30:16 +0000 Subject: [PATCH 173/473] feat(api): update via SDK Studio (#670) --- src/resources/filters.ts | 10 +++++----- src/resources/firewall/rules.ts | 12 ++++++++++++ src/resources/pagerules/pagerules.ts | 12 ++++++++++++ src/resources/rate-limits.ts | 10 ++++++++++ 4 files changed, 39 insertions(+), 5 deletions(-) diff --git a/src/resources/filters.ts b/src/resources/filters.ts index 462b37df82..ed101ebf6e 100644 --- a/src/resources/filters.ts +++ b/src/resources/filters.ts @@ -9,7 +9,7 @@ export class Filters extends APIResource { /** * Creates one or more filters. * - * @deprecated Filters are being deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. + * @deprecated The Filters API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. */ create( zoneIdentifier: string, @@ -26,7 +26,7 @@ export class Filters extends APIResource { /** * Updates an existing filter. * - * @deprecated Filters are being deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. + * @deprecated The Filters API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. */ update( zoneIdentifier: string, @@ -45,7 +45,7 @@ export class Filters extends APIResource { * Fetches filters in a zone. You can filter the results using several optional * parameters. * - * @deprecated Filters are being deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. + * @deprecated The Filters API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. */ list( zoneIdentifier: string, @@ -73,7 +73,7 @@ export class Filters extends APIResource { /** * Deletes an existing filter. * - * @deprecated Filters are being deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. + * @deprecated The Filters API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. */ delete(zoneIdentifier: string, id: string, options?: Core.RequestOptions): Core.APIPromise { return ( @@ -86,7 +86,7 @@ export class Filters extends APIResource { /** * Fetches the details of a filter. * - * @deprecated Filters are being deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. + * @deprecated The Filters API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. */ get(zoneIdentifier: string, id: string, options?: Core.RequestOptions): Core.APIPromise { return ( diff --git a/src/resources/firewall/rules.ts b/src/resources/firewall/rules.ts index e9c77d6904..c0de87d54c 100644 --- a/src/resources/firewall/rules.ts +++ b/src/resources/firewall/rules.ts @@ -11,6 +11,8 @@ import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../p export class Rules extends APIResource { /** * Create one or more firewall rules. + * + * @deprecated The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. */ create( zoneIdentifier: string, @@ -26,6 +28,8 @@ export class Rules extends APIResource { /** * Updates an existing firewall rule. + * + * @deprecated The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. */ update( zoneIdentifier: string, @@ -44,6 +48,8 @@ export class Rules extends APIResource { /** * Fetches firewall rules in a zone. You can filter the results using several * optional parameters. + * + * @deprecated The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. */ list( zoneIdentifier: string, @@ -71,6 +77,8 @@ export class Rules extends APIResource { /** * Deletes an existing firewall rule. + * + * @deprecated The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. */ delete(zoneIdentifier: string, id: string, options?: Core.RequestOptions): Core.APIPromise { return ( @@ -82,6 +90,8 @@ export class Rules extends APIResource { /** * Updates the priority of an existing firewall rule. + * + * @deprecated The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. */ edit( zoneIdentifier: string, @@ -99,6 +109,8 @@ export class Rules extends APIResource { /** * Fetches the details of a firewall rule. + * + * @deprecated The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details. */ get( zoneIdentifier: string, diff --git a/src/resources/pagerules/pagerules.ts b/src/resources/pagerules/pagerules.ts index 94e89efba9..2484ccac42 100644 --- a/src/resources/pagerules/pagerules.ts +++ b/src/resources/pagerules/pagerules.ts @@ -9,6 +9,8 @@ export class Pagerules extends APIResource { /** * Creates a new Page Rule. + * + * @deprecated The Page Rules API is deprecated in favour of the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#page-rules for full details. */ create( params: PageruleCreateParams, @@ -25,6 +27,8 @@ export class Pagerules extends APIResource { /** * Replaces the configuration of an existing Page Rule. The configuration of the * updated Page Rule will exactly match the data passed in the API request. + * + * @deprecated The Page Rules API is deprecated in favour of the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#page-rules for full details. */ update( pageruleId: string, @@ -41,6 +45,8 @@ export class Pagerules extends APIResource { /** * Fetches Page Rules in a zone. + * + * @deprecated The Page Rules API is deprecated in favour of the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#page-rules for full details. */ list(params: PageruleListParams, options?: Core.RequestOptions): Core.APIPromise { const { zone_id, ...query } = params; @@ -53,6 +59,8 @@ export class Pagerules extends APIResource { /** * Deletes an existing Page Rule. + * + * @deprecated The Page Rules API is deprecated in favour of the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#page-rules for full details. */ delete( pageruleId: string, @@ -69,6 +77,8 @@ export class Pagerules extends APIResource { /** * Updates one or more fields of an existing Page Rule. + * + * @deprecated The Page Rules API is deprecated in favour of the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#page-rules for full details. */ edit( pageruleId: string, @@ -86,6 +96,8 @@ export class Pagerules extends APIResource { /** * Fetches the details of a Page Rule. + * + * @deprecated The Page Rules API is deprecated in favour of the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#page-rules for full details. */ get( pageruleId: string, diff --git a/src/resources/rate-limits.ts b/src/resources/rate-limits.ts index e4d965db89..d36f1bba46 100644 --- a/src/resources/rate-limits.ts +++ b/src/resources/rate-limits.ts @@ -10,6 +10,8 @@ export class RateLimits extends APIResource { /** * Creates a new rate limit for a zone. Refer to the object definition for a list * of required attributes. + * + * @deprecated Rate limiting API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#rate-limiting-api-previous-version for full details. */ create( zoneIdentifier: string, @@ -25,6 +27,8 @@ export class RateLimits extends APIResource { /** * Fetches the rate limits for a zone. + * + * @deprecated Rate limiting API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#rate-limiting-api-previous-version for full details. */ list( zoneIdentifier: string, @@ -51,6 +55,8 @@ export class RateLimits extends APIResource { /** * Deletes an existing rate limit. + * + * @deprecated Rate limiting API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#rate-limiting-api-previous-version for full details. */ delete( zoneIdentifier: string, @@ -66,6 +72,8 @@ export class RateLimits extends APIResource { /** * Updates an existing rate limit. + * + * @deprecated Rate limiting API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#rate-limiting-api-previous-version for full details. */ edit( zoneIdentifier: string, @@ -83,6 +91,8 @@ export class RateLimits extends APIResource { /** * Fetches the details of a rate limit. + * + * @deprecated Rate limiting API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#rate-limiting-api-previous-version for full details. */ get( zoneIdentifier: string, From 9ea20ebfed3a21c10d2b1d6a7134d438f2957bad Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 05:28:57 +0000 Subject: [PATCH 174/473] feat(api): update via SDK Studio (#671) --- api.md | 2 +- src/resources/firewall/firewall.ts | 2 +- src/resources/firewall/index.ts | 2 +- src/resources/firewall/rules.ts | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/api.md b/api.md index 8c35ac629b..af422d6e1c 100644 --- a/api.md +++ b/api.md @@ -1596,7 +1596,7 @@ Methods: Types: - FirewallRule -- Products +- Product - DeletedFilter - RuleCreateResponse - RuleEditResponse diff --git a/src/resources/firewall/firewall.ts b/src/resources/firewall/firewall.ts index 54a99d9d8c..fa985578dd 100644 --- a/src/resources/firewall/firewall.ts +++ b/src/resources/firewall/firewall.ts @@ -29,7 +29,7 @@ export namespace Firewall { export import LockdownListParams = LockdownsAPI.LockdownListParams; export import Rules = RulesAPI.Rules; export import FirewallRule = RulesAPI.FirewallRule; - export import Products = RulesAPI.Products; + export import Product = RulesAPI.Product; export import DeletedFilter = RulesAPI.DeletedFilter; export import RuleCreateResponse = RulesAPI.RuleCreateResponse; export import RuleEditResponse = RulesAPI.RuleEditResponse; diff --git a/src/resources/firewall/index.ts b/src/resources/firewall/index.ts index 6f8517c23f..82bb6e88f4 100644 --- a/src/resources/firewall/index.ts +++ b/src/resources/firewall/index.ts @@ -35,7 +35,7 @@ export { export { Firewall } from './firewall'; export { FirewallRule, - Products, + Product, DeletedFilter, RuleCreateResponse, RuleEditResponse, diff --git a/src/resources/firewall/rules.ts b/src/resources/firewall/rules.ts index c0de87d54c..f4b33d8765 100644 --- a/src/resources/firewall/rules.ts +++ b/src/resources/firewall/rules.ts @@ -160,7 +160,7 @@ export interface FirewallRule { */ priority?: number; - products?: Array; + products?: Array; /** * A short reference tag. Allows you to select related firewall rules. @@ -171,7 +171,7 @@ export interface FirewallRule { /** * A list of products to bypass for a request when using the `bypass` action. */ -export type Products = 'zoneLockdown' | 'uaBlock' | 'bic' | 'hot' | 'securityLevel' | 'rateLimit' | 'waf'; +export type Product = 'zoneLockdown' | 'uaBlock' | 'bic' | 'hot' | 'securityLevel' | 'rateLimit' | 'waf'; export interface DeletedFilter { /** @@ -231,7 +231,7 @@ export interface RuleGetParams { export namespace Rules { export import FirewallRule = RulesAPI.FirewallRule; - export import Products = RulesAPI.Products; + export import Product = RulesAPI.Product; export import DeletedFilter = RulesAPI.DeletedFilter; export import RuleCreateResponse = RulesAPI.RuleCreateResponse; export import RuleEditResponse = RulesAPI.RuleEditResponse; From 858154b8ca1c0c5a1b50f88c133b3c0baacbdce9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 09:50:39 +0000 Subject: [PATCH 175/473] feat(api): OpenAPI spec update via Stainless API (#672) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5e1891fd45..497b4379ea 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1297 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eaf3cf93b4b0566484405b918a65aeca6e5ad4cc194989298a633601684fa0c1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e58dd5f372a5541a8dc05fb00967feee663eb81b0a8a1eb23e4318335bdb98a8.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From dc44f09d580c6e0dfaf484b0ac44f8512900e6a5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 09:53:14 +0000 Subject: [PATCH 176/473] feat(api): OpenAPI spec update via Stainless API (#673) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 497b4379ea..2c80d1ccf1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1297 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e58dd5f372a5541a8dc05fb00967feee663eb81b0a8a1eb23e4318335bdb98a8.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d798919f06fdb766d1e047f3a387fa78bdee979130963b425176a00429b842b9.yml From 575807cdb6e3b1623e5550f5845d3ed7fa91403c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 13:27:57 +0000 Subject: [PATCH 177/473] feat(api): OpenAPI spec update via Stainless API (#674) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2c80d1ccf1..719796ae24 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1297 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d798919f06fdb766d1e047f3a387fa78bdee979130963b425176a00429b842b9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5cc7607a4825bf9606463ee28fc976b8498b237c981bcb896211b60b6fe5c146.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 49be1e68e70ad9dd104c9decf3553e33dbb934a4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 May 2024 02:53:41 +0000 Subject: [PATCH 178/473] feat(api): update via SDK Studio (#675) --- api.md | 6 ++---- .../uuid.ts => dcv-delegation.ts} | 16 +++++----------- src/resources/dcv-delegation/dcv-delegation.ts | 14 -------------- src/resources/dcv-delegation/index.ts | 4 ---- src/resources/index.ts | 2 +- .../uuid.test.ts => dcv-delegation.test.ts} | 8 +++----- 6 files changed, 11 insertions(+), 39 deletions(-) rename src/resources/{dcv-delegation/uuid.ts => dcv-delegation.ts} (58%) delete mode 100644 src/resources/dcv-delegation/dcv-delegation.ts delete mode 100644 src/resources/dcv-delegation/index.ts rename tests/api-resources/{dcv-delegation/uuid.test.ts => dcv-delegation.test.ts} (76%) diff --git a/api.md b/api.md index af422d6e1c..024a8b4445 100644 --- a/api.md +++ b/api.md @@ -6366,15 +6366,13 @@ Methods: # DCVDelegation -## UUID - Types: -- DCVDelegationUUID +- DCVDelegationUUID Methods: -- client.dcvDelegation.uuid.get({ ...params }) -> DCVDelegationUUID +- client.dcvDelegation.get({ ...params }) -> DCVDelegationUUID # Hostnames diff --git a/src/resources/dcv-delegation/uuid.ts b/src/resources/dcv-delegation.ts similarity index 58% rename from src/resources/dcv-delegation/uuid.ts rename to src/resources/dcv-delegation.ts index c9bc988842..72977cda39 100644 --- a/src/resources/dcv-delegation/uuid.ts +++ b/src/resources/dcv-delegation.ts @@ -1,15 +1,14 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from '../../core'; -import { APIResource } from '../../resource'; -import * as UUIDAPI from './uuid'; +import * as Core from '../core'; +import { APIResource } from '../resource'; -export class UUID extends APIResource { +export class DCVDelegation extends APIResource { /** * Retrieve the account and zone specific unique identifier used as part of the * CNAME target for DCV Delegation. */ - get(params: UUIDGetParams, options?: Core.RequestOptions): Core.APIPromise { + get(params: DCVDelegationGetParams, options?: Core.RequestOptions): Core.APIPromise { const { zone_id } = params; return ( this._client.get(`/zones/${zone_id}/dcv_delegation/uuid`, options) as Core.APIPromise<{ @@ -26,14 +25,9 @@ export interface DCVDelegationUUID { uuid?: string; } -export interface UUIDGetParams { +export interface DCVDelegationGetParams { /** * Identifier */ zone_id: string; } - -export namespace UUID { - export import DCVDelegationUUID = UUIDAPI.DCVDelegationUUID; - export import UUIDGetParams = UUIDAPI.UUIDGetParams; -} diff --git a/src/resources/dcv-delegation/dcv-delegation.ts b/src/resources/dcv-delegation/dcv-delegation.ts deleted file mode 100644 index 01943a8bf0..0000000000 --- a/src/resources/dcv-delegation/dcv-delegation.ts +++ /dev/null @@ -1,14 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../resource'; -import * as UUIDAPI from './uuid'; - -export class DCVDelegation extends APIResource { - uuid: UUIDAPI.UUID = new UUIDAPI.UUID(this._client); -} - -export namespace DCVDelegation { - export import UUID = UUIDAPI.UUID; - export import DCVDelegationUUID = UUIDAPI.DCVDelegationUUID; - export import UUIDGetParams = UUIDAPI.UUIDGetParams; -} diff --git a/src/resources/dcv-delegation/index.ts b/src/resources/dcv-delegation/index.ts deleted file mode 100644 index a0b45971d0..0000000000 --- a/src/resources/dcv-delegation/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -export { DCVDelegation } from './dcv-delegation'; -export { DCVDelegationUUID, UUIDGetParams, UUID } from './uuid'; diff --git a/src/resources/index.ts b/src/resources/index.ts index 37791955af..96daa41565 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -21,7 +21,7 @@ export { CustomCertificates } from './custom-certificates/custom-certificates'; export { CustomHostnames } from './custom-hostnames/custom-hostnames'; export { CustomNameservers } from './custom-nameservers'; export { D1Resource } from './d1/d1'; -export { DCVDelegation } from './dcv-delegation/dcv-delegation'; +export { DCVDelegation } from './dcv-delegation'; export { DNS } from './dns/dns'; export { DNSSECResource } from './dnssec'; export { Diagnostics } from './diagnostics/diagnostics'; diff --git a/tests/api-resources/dcv-delegation/uuid.test.ts b/tests/api-resources/dcv-delegation.test.ts similarity index 76% rename from tests/api-resources/dcv-delegation/uuid.test.ts rename to tests/api-resources/dcv-delegation.test.ts index 65d413dba0..1b8f950ff6 100644 --- a/tests/api-resources/dcv-delegation/uuid.test.ts +++ b/tests/api-resources/dcv-delegation.test.ts @@ -9,11 +9,9 @@ const cloudflare = new Cloudflare({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); -describe('resource uuid', () => { +describe('resource dcvDelegation', () => { test('get: only required params', async () => { - const responsePromise = cloudflare.dcvDelegation.uuid.get({ - zone_id: '023e105f4ecef8ad9ca31a8372d0c353', - }); + const responsePromise = cloudflare.dcvDelegation.get({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -24,6 +22,6 @@ describe('resource uuid', () => { }); test('get: required and optional params', async () => { - const response = await cloudflare.dcvDelegation.uuid.get({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }); + const response = await cloudflare.dcvDelegation.get({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }); }); }); From 1fd5e47cf08fbdd84f031d9ecb018567d5df6d70 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 00:55:37 +0000 Subject: [PATCH 179/473] feat(api): update via SDK Studio (#676) --- .stats.yml | 4 +- README.md | 2 +- api.md | 248 ++-- src/index.ts | 3 + src/resources/ai-gateway/ai-gateway.ts | 56 +- src/resources/api-gateway/api-gateway.ts | 60 + src/resources/api-gateway/configurations.ts | 154 +++ .../api-gateway/discovery/discovery.ts | 114 ++ src/resources/api-gateway/discovery/index.ts | 10 + .../api-gateway/discovery/operations.ts | 145 +++ src/resources/api-gateway/index.ts | 44 + src/resources/api-gateway/operations/index.ts | 22 + .../api-gateway/operations/operations.ts | 326 +++++ .../operations/schema-validation.ts | 176 +++ .../api-gateway/schema-validation.ts | 59 + src/resources/api-gateway/schemas.ts | 49 + src/resources/api-gateway/settings/index.ts | 9 + .../api-gateway/settings/schema-validation.ts | 92 ++ .../api-gateway/settings/settings.ts | 17 + .../api-gateway/user-schemas/index.ts | 21 + .../api-gateway/user-schemas/operations.ts | 105 ++ .../api-gateway/user-schemas/user-schemas.ts | 265 ++++ src/resources/cache/cache.ts | 95 +- src/resources/d1/d1.ts | 2 + src/resources/d1/database.ts | 75 +- src/resources/d1/index.ts | 2 + src/resources/index.ts | 1 + src/resources/kv/index.ts | 1 + src/resources/kv/kv.ts | 1 + src/resources/kv/namespaces/index.ts | 1 + src/resources/kv/namespaces/namespaces.ts | 25 + src/resources/r2/buckets.ts | 11 + src/resources/radar/bgp/bgp.ts | 7 +- src/resources/radar/bgp/index.ts | 3 +- src/resources/radar/bgp/ips.ts | 138 +++ src/resources/radar/bgp/routes.ts | 118 -- src/resources/zero-trust/access/access.ts | 29 - .../access/applications/applications.ts | 17 - .../zero-trust/access/applications/cas.ts | 175 --- .../zero-trust/access/applications/index.ts | 30 +- .../access/applications/policies.ts | 734 +---------- src/resources/zero-trust/access/bookmarks.ts | 88 +- .../access/certificates/certificates.ts | 176 --- .../zero-trust/access/certificates/index.ts | 4 - .../zero-trust/access/custom-pages.ts | 134 +- src/resources/zero-trust/access/groups.ts | 190 --- src/resources/zero-trust/access/index.ts | 37 +- src/resources/zero-trust/access/keys.ts | 61 +- .../zero-trust/access/logs/access-requests.ts | 17 +- src/resources/zero-trust/access/logs/index.ts | 2 +- src/resources/zero-trust/access/logs/logs.ts | 1 - .../zero-trust/access/service-tokens.ts | 234 ---- src/resources/zero-trust/access/tags.ts | 92 +- .../access/users/active-sessions.ts | 172 +-- .../zero-trust/access/users/failed-logins.ts | 33 +- .../zero-trust/access/users/index.ts | 11 +- .../access/users/last-seen-identity.ts | 15 +- .../zero-trust/access/users/users.ts | 20 - .../zero-trust/identity-providers.ts | 1091 ----------------- src/resources/zero-trust/index.ts | 6 +- src/resources/zero-trust/seats.ts | 39 +- src/resources/zero-trust/zero-trust.ts | 6 - .../ai-gateway/ai-gateway.test.ts | 14 +- .../api-gateway/configurations.test.ts | 52 + .../discovery/discovery.test.ts} | 19 +- .../api-gateway/discovery/operations.test.ts | 62 + .../api-gateway/operations/operations.test.ts | 107 ++ .../operations/schema-validation.test.ts | 81 ++ .../schema-validation.test.ts} | 23 +- .../api-resources/api-gateway/schemas.test.ts | 33 + .../settings/schema-validation.test.ts | 53 + .../user-schemas/operations.test.ts} | 31 +- .../user-schemas/user-schemas.test.ts | 119 ++ tests/api-resources/cache/cache.test.ts | 5 +- tests/api-resources/d1/database.test.ts | 22 + .../kv/namespaces/namespaces.test.ts | 19 + tests/api-resources/r2/buckets.test.ts | 1 + .../bgp/ips.test.ts} | 32 +- tests/api-resources/radar/bgp/routes.test.ts | 36 - .../access/applications/cas.test.ts | 45 - .../access/applications/policies.test.ts | 199 --- .../zero-trust/access/bookmarks.test.ts | 128 -- .../access/certificates/certificates.test.ts | 60 - .../zero-trust/access/custom-pages.test.ts | 144 --- .../zero-trust/access/groups.test.ts | 76 -- .../zero-trust/access/keys.test.ts | 71 -- .../zero-trust/access/service-tokens.test.ts | 95 -- .../zero-trust/access/tags.test.ts | 120 -- .../access/users/active-sessions.test.ts | 64 - .../zero-trust/identity-providers.test.ts | 74 -- tests/api-resources/zero-trust/seats.test.ts | 37 - 91 files changed, 2819 insertions(+), 4878 deletions(-) create mode 100644 src/resources/api-gateway/api-gateway.ts create mode 100644 src/resources/api-gateway/configurations.ts create mode 100644 src/resources/api-gateway/discovery/discovery.ts create mode 100644 src/resources/api-gateway/discovery/index.ts create mode 100644 src/resources/api-gateway/discovery/operations.ts create mode 100644 src/resources/api-gateway/index.ts create mode 100644 src/resources/api-gateway/operations/index.ts create mode 100644 src/resources/api-gateway/operations/operations.ts create mode 100644 src/resources/api-gateway/operations/schema-validation.ts create mode 100644 src/resources/api-gateway/schema-validation.ts create mode 100644 src/resources/api-gateway/schemas.ts create mode 100644 src/resources/api-gateway/settings/index.ts create mode 100644 src/resources/api-gateway/settings/schema-validation.ts create mode 100644 src/resources/api-gateway/settings/settings.ts create mode 100644 src/resources/api-gateway/user-schemas/index.ts create mode 100644 src/resources/api-gateway/user-schemas/operations.ts create mode 100644 src/resources/api-gateway/user-schemas/user-schemas.ts create mode 100644 src/resources/radar/bgp/ips.ts create mode 100644 tests/api-resources/api-gateway/configurations.test.ts rename tests/api-resources/{zero-trust/access/users/users.test.ts => api-gateway/discovery/discovery.test.ts} (56%) create mode 100644 tests/api-resources/api-gateway/discovery/operations.test.ts create mode 100644 tests/api-resources/api-gateway/operations/operations.test.ts create mode 100644 tests/api-resources/api-gateway/operations/schema-validation.test.ts rename tests/api-resources/{zero-trust/access/logs/access-requests.test.ts => api-gateway/schema-validation.test.ts} (54%) create mode 100644 tests/api-resources/api-gateway/schemas.test.ts create mode 100644 tests/api-resources/api-gateway/settings/schema-validation.test.ts rename tests/api-resources/{zero-trust/access/users/failed-logins.test.ts => api-gateway/user-schemas/operations.test.ts} (54%) create mode 100644 tests/api-resources/api-gateway/user-schemas/user-schemas.test.ts rename tests/api-resources/{zero-trust/access/users/last-seen-identity.test.ts => radar/bgp/ips.test.ts} (52%) delete mode 100644 tests/api-resources/zero-trust/access/applications/policies.test.ts delete mode 100644 tests/api-resources/zero-trust/access/bookmarks.test.ts delete mode 100644 tests/api-resources/zero-trust/access/custom-pages.test.ts delete mode 100644 tests/api-resources/zero-trust/access/keys.test.ts delete mode 100644 tests/api-resources/zero-trust/access/tags.test.ts delete mode 100644 tests/api-resources/zero-trust/access/users/active-sessions.test.ts delete mode 100644 tests/api-resources/zero-trust/seats.test.ts diff --git a/.stats.yml b/.stats.yml index 719796ae24..30e67c9adb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1297 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5cc7607a4825bf9606463ee28fc976b8498b237c981bcb896211b60b6fe5c146.yml +configured_endpoints: 1274 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-14c9c9adbd65eee546c4f54d95b7627f10b02185348e334a68cbebbe3442733e.yml diff --git a/README.md b/README.md index addc89963b..7b768a83bc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Cloudflare Typescript API Library -[![NPM version](https://img.shields.io/npm/v/cloudflare.svg)](https://npmjs.org/package/cloudflare) +[![NPM version](https://img.shields.io/npm/v/cloudflare.svg)](https://npmjs.org/package/cloudflare) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/cloudflare) This library provides convenient access to the Cloudflare REST API from server-side TypeScript or JavaScript. diff --git a/api.md b/api.md index 024a8b4445..900c76fa41 100644 --- a/api.md +++ b/api.md @@ -2422,6 +2422,7 @@ Methods: - client.kv.namespaces.update(namespaceId, { ...params }) -> NamespaceUpdateResponse - client.kv.namespaces.list({ ...params }) -> NamespacesV4PagePaginationArray - client.kv.namespaces.delete(namespaceId, { ...params }) -> NamespaceDeleteResponse +- client.kv.namespaces.get(namespaceId, { ...params }) -> Namespace ### Bulk @@ -2537,6 +2538,127 @@ Methods: - client.queues.messages.ack(queueId, { ...params }) -> MessageAckResponse | null - client.queues.messages.pull(queueId, { ...params }) -> MessagePullResponse | null +# APIGateway + +## Configurations + +Types: + +- Configuration +- ConfigurationUpdateResponse + +Methods: + +- client.apiGateway.configurations.update({ ...params }) -> ConfigurationUpdateResponse +- client.apiGateway.configurations.get({ ...params }) -> Configuration + +## Discovery + +Types: + +- DiscoveryOperation +- DiscoveryGetResponse + +Methods: + +- client.apiGateway.discovery.get({ ...params }) -> DiscoveryGetResponse + +### Operations + +Types: + +- OperationEditResponse + +Methods: + +- client.apiGateway.discovery.operations.list({ ...params }) -> DiscoveryOperationsSinglePage +- client.apiGateway.discovery.operations.edit(operationId, { ...params }) -> OperationEditResponse + +## Operations + +Types: + +- APIShield +- OperationCreateResponse +- OperationDeleteResponse + +Methods: + +- client.apiGateway.operations.create([ ...body ]) -> OperationCreateResponse | null +- client.apiGateway.operations.list({ ...params }) -> APIShieldsSinglePage +- client.apiGateway.operations.delete(operationId, { ...params }) -> OperationDeleteResponse +- client.apiGateway.operations.get(operationId, { ...params }) -> APIShield + +### SchemaValidation + +Types: + +- SettingsMultipleRequest +- SchemaValidationUpdateResponse +- SchemaValidationGetResponse + +Methods: + +- client.apiGateway.operations.schemaValidation.update(operationId, { ...params }) -> SchemaValidationUpdateResponse +- client.apiGateway.operations.schemaValidation.edit({ ...params }) -> SettingsMultipleRequest +- client.apiGateway.operations.schemaValidation.get(operationId, { ...params }) -> SchemaValidationGetResponse + +## Schemas + +Types: + +- SchemaListResponse + +Methods: + +- client.apiGateway.schemas.list({ ...params }) -> SchemaListResponse + +## Settings + +### SchemaValidation + +Types: + +- Settings + +Methods: + +- client.apiGateway.settings.schemaValidation.update({ ...params }) -> Settings +- client.apiGateway.settings.schemaValidation.get({ ...params }) -> Settings + +## UserSchemas + +Types: + +- Message +- PublicSchema +- SchemaUpload +- UserSchemaDeleteResponse + +Methods: + +- client.apiGateway.userSchemas.create({ ...params }) -> SchemaUpload +- client.apiGateway.userSchemas.list({ ...params }) -> PublicSchemasSinglePage +- client.apiGateway.userSchemas.delete(schemaId, { ...params }) -> UserSchemaDeleteResponse +- client.apiGateway.userSchemas.edit(schemaId, { ...params }) -> PublicSchema +- client.apiGateway.userSchemas.get(schemaId, { ...params }) -> PublicSchema + +### Operations + +Types: + +- OperationListResponse + +Methods: + +- client.apiGateway.userSchemas.operations.list(schemaId, { ...params }) -> OperationListResponsesSinglePage + +## SchemaValidation + +Methods: + +- client.apiGateway.schemaValidation.edit({ ...params }) -> Settings + # ManagedHeaders Types: @@ -3992,6 +4114,7 @@ Types: - DatabaseListResponse - DatabaseDeleteResponse - DatabaseQueryResponse +- DatabaseRawResponse Methods: @@ -4000,6 +4123,7 @@ Methods: - client.d1.database.delete(databaseId, { ...params }) -> DatabaseDeleteResponse - client.d1.database.get(databaseId, { ...params }) -> D1 - client.d1.database.query(databaseId, { ...params }) -> DatabaseQueryResponse +- client.d1.database.raw(databaseId, { ...params }) -> DatabaseRawResponse # R2 @@ -4361,15 +4485,11 @@ Types: - IdentityProviderType - ScimConfig - IdentityProviderListResponse -- IdentityProviderDeleteResponse Methods: - client.zeroTrust.identityProviders.create({ ...params }) -> IdentityProvider -- client.zeroTrust.identityProviders.update(uuid, { ...params }) -> IdentityProvider - client.zeroTrust.identityProviders.list({ ...params }) -> IdentityProviderListResponsesSinglePage -- client.zeroTrust.identityProviders.delete(uuid, { ...params }) -> IdentityProviderDeleteResponse -- client.zeroTrust.identityProviders.get(uuid, { ...params }) -> IdentityProvider ## Organizations @@ -4391,11 +4511,6 @@ Methods: Types: - Seat -- SeatEditResponse - -Methods: - -- client.zeroTrust.seats.edit(identifier, [ ...body ]) -> SeatEditResponse | null ## Access @@ -4461,16 +4576,10 @@ Methods: Types: - CA -- CACreateResponse -- CADeleteResponse -- CAGetResponse Methods: -- client.zeroTrust.access.applications.cas.create(uuid, { ...params }) -> CACreateResponse - client.zeroTrust.access.applications.cas.list({ ...params }) -> CAsSinglePage -- client.zeroTrust.access.applications.cas.delete(uuid, { ...params }) -> CADeleteResponse -- client.zeroTrust.access.applications.cas.get(uuid, { ...params }) -> CAGetResponse #### UserPolicyChecks @@ -4489,19 +4598,6 @@ Types: - ApprovalGroup - Policy -- PolicyCreateResponse -- PolicyUpdateResponse -- PolicyListResponse -- PolicyDeleteResponse -- PolicyGetResponse - -Methods: - -- client.zeroTrust.access.applications.policies.create(uuid, { ...params }) -> PolicyCreateResponse -- client.zeroTrust.access.applications.policies.update(uuid1, uuid, { ...params }) -> PolicyUpdateResponse -- client.zeroTrust.access.applications.policies.list(uuid, { ...params }) -> PolicyListResponsesSinglePage -- client.zeroTrust.access.applications.policies.delete(uuid1, uuid, { ...params }) -> PolicyDeleteResponse -- client.zeroTrust.access.applications.policies.get(uuid1, uuid, { ...params }) -> PolicyGetResponse ### Certificates @@ -4509,15 +4605,11 @@ Types: - AssociatedHostnames - Certificate -- CertificateDeleteResponse Methods: - client.zeroTrust.access.certificates.create({ ...params }) -> Certificate -- client.zeroTrust.access.certificates.update(uuid, { ...params }) -> Certificate - client.zeroTrust.access.certificates.list({ ...params }) -> CertificatesSinglePage -- client.zeroTrust.access.certificates.delete(uuid, { ...params }) -> CertificateDeleteResponse -- client.zeroTrust.access.certificates.get(uuid, { ...params }) -> Certificate #### Settings @@ -4537,15 +4629,11 @@ Methods: Types: - ZeroTrustGroup -- GroupDeleteResponse Methods: - client.zeroTrust.access.groups.create({ ...params }) -> ZeroTrustGroup -- client.zeroTrust.access.groups.update(uuid, { ...params }) -> ZeroTrustGroup - client.zeroTrust.access.groups.list({ ...params }) -> ZeroTrustGroupsSinglePage -- client.zeroTrust.access.groups.delete(uuid, { ...params }) -> GroupDeleteResponse -- client.zeroTrust.access.groups.get(uuid, { ...params }) -> ZeroTrustGroup ### ServiceTokens @@ -4553,47 +4641,20 @@ Types: - ServiceToken - ServiceTokenCreateResponse -- ServiceTokenRotateResponse Methods: - client.zeroTrust.access.serviceTokens.create({ ...params }) -> ServiceTokenCreateResponse -- client.zeroTrust.access.serviceTokens.update(uuid, { ...params }) -> ServiceToken - client.zeroTrust.access.serviceTokens.list({ ...params }) -> ServiceTokensSinglePage -- client.zeroTrust.access.serviceTokens.delete(uuid, { ...params }) -> ServiceToken -- client.zeroTrust.access.serviceTokens.get(uuid, { ...params }) -> ServiceToken -- client.zeroTrust.access.serviceTokens.refresh(identifier, uuid) -> ServiceToken -- client.zeroTrust.access.serviceTokens.rotate(identifier, uuid) -> ServiceTokenRotateResponse ### Bookmarks Types: - Bookmark -- BookmarkDeleteResponse - -Methods: - -- client.zeroTrust.access.bookmarks.create(identifier, uuid, { ...params }) -> Bookmark -- client.zeroTrust.access.bookmarks.update(identifier, uuid, { ...params }) -> Bookmark -- client.zeroTrust.access.bookmarks.list(identifier) -> BookmarksSinglePage -- client.zeroTrust.access.bookmarks.delete(identifier, uuid) -> BookmarkDeleteResponse -- client.zeroTrust.access.bookmarks.get(identifier, uuid) -> Bookmark ### Keys -Types: - -- KeyUpdateResponse -- KeyGetResponse -- KeyRotateResponse - -Methods: - -- client.zeroTrust.access.keys.update(identifier, { ...params }) -> KeyUpdateResponse -- client.zeroTrust.access.keys.get(identifier) -> KeyGetResponse -- client.zeroTrust.access.keys.rotate(identifier) -> KeyRotateResponse - ### Logs #### AccessRequests @@ -4601,11 +4662,6 @@ Methods: Types: - AccessRequests -- AccessRequestListResponse - -Methods: - -- client.zeroTrust.access.logs.accessRequests.list(identifier) -> AccessRequestListResponse | null ### Users @@ -4613,72 +4669,28 @@ Types: - AccessUser -Methods: - -- client.zeroTrust.access.users.list(identifier) -> AccessUsersSinglePage - #### ActiveSessions -Types: - -- ActiveSessionListResponse -- ActiveSessionGetResponse - -Methods: - -- client.zeroTrust.access.users.activeSessions.list(identifier, id) -> ActiveSessionListResponsesSinglePage -- client.zeroTrust.access.users.activeSessions.get(identifier, id, nonce) -> ActiveSessionGetResponse - #### LastSeenIdentity Types: - Identity -Methods: - -- client.zeroTrust.access.users.lastSeenIdentity.get(identifier, id) -> Identity - #### FailedLogins -Types: - -- FailedLoginListResponse - -Methods: - -- client.zeroTrust.access.users.failedLogins.list(identifier, id) -> FailedLoginListResponsesSinglePage - ### CustomPages Types: - CustomPage - CustomPageWithoutHTML -- CustomPageDeleteResponse - -Methods: - -- client.zeroTrust.access.customPages.create(identifier, { ...params }) -> CustomPageWithoutHTML -- client.zeroTrust.access.customPages.update(identifier, uuid, { ...params }) -> CustomPageWithoutHTML -- client.zeroTrust.access.customPages.list(identifier) -> CustomPageWithoutHTMLsSinglePage -- client.zeroTrust.access.customPages.delete(identifier, uuid) -> CustomPageDeleteResponse -- client.zeroTrust.access.customPages.get(identifier, uuid) -> CustomPage ### Tags Types: - Tag -- TagDeleteResponse - -Methods: - -- client.zeroTrust.access.tags.create(identifier, { ...params }) -> Tag -- client.zeroTrust.access.tags.update(identifier, tagName, { ...params }) -> Tag -- client.zeroTrust.access.tags.list(identifier) -> TagsSinglePage -- client.zeroTrust.access.tags.delete(identifier, name) -> TagDeleteResponse -- client.zeroTrust.access.tags.get(identifier, name) -> Tag ## DEX @@ -5435,14 +5447,22 @@ Types: - RouteMoasResponse - RoutePfx2asResponse - RouteStatsResponse -- RouteTimeseriesResponse Methods: - client.radar.bgp.routes.moas({ ...params }) -> RouteMoasResponse - client.radar.bgp.routes.pfx2as({ ...params }) -> RoutePfx2asResponse - client.radar.bgp.routes.stats({ ...params }) -> RouteStatsResponse -- client.radar.bgp.routes.timeseries({ ...params }) -> RouteTimeseriesResponse + +### IPs + +Types: + +- IPTimeseriesResponse + +Methods: + +- client.radar.bgp.ips.timeseries({ ...params }) -> IPTimeseriesResponse ## Datasets diff --git a/src/index.ts b/src/index.ts index db392dfd87..10f30a6964 100644 --- a/src/index.ts +++ b/src/index.ts @@ -180,6 +180,7 @@ export class Cloudflare extends Core.APIClient { kv: API.KV = new API.KV(this); durableObjects: API.DurableObjects = new API.DurableObjects(this); queues: API.Queues = new API.Queues(this); + apiGateway: API.APIGateway = new API.APIGateway(this); managedHeaders: API.ManagedHeaders = new API.ManagedHeaders(this); pageShield: API.PageShield = new API.PageShield(this); rulesets: API.Rulesets = new API.Rulesets(this); @@ -466,6 +467,8 @@ export namespace Cloudflare { export import Queues = API.Queues; + export import APIGateway = API.APIGateway; + export import ManagedHeaders = API.ManagedHeaders; export import PageShield = API.PageShield; diff --git a/src/resources/ai-gateway/ai-gateway.ts b/src/resources/ai-gateway/ai-gateway.ts index 6f4df4ccbb..55f8da923e 100644 --- a/src/resources/ai-gateway/ai-gateway.ts +++ b/src/resources/ai-gateway/ai-gateway.ts @@ -104,7 +104,7 @@ export namespace AIGatewayCreateResponse { cache_invalidate_on_update: boolean; - cache_ttl: number; + cache_ttl: number | null; collect_logs: boolean; @@ -112,11 +112,11 @@ export namespace AIGatewayCreateResponse { modified_at: string; - rate_limiting_interval?: number; + rate_limiting_interval: number | null; - rate_limiting_limit?: number; + rate_limiting_limit: number | null; - rate_limiting_technique?: string; + rate_limiting_technique: 'fixed' | 'sliding'; } } @@ -128,7 +128,7 @@ export interface AIGatewayUpdateResponse { cache_invalidate_on_update: boolean; - cache_ttl: number; + cache_ttl: number | null; collect_logs: boolean; @@ -136,11 +136,11 @@ export interface AIGatewayUpdateResponse { modified_at: string; - rate_limiting_interval?: number; + rate_limiting_interval: number | null; - rate_limiting_limit?: number; + rate_limiting_limit: number | null; - rate_limiting_technique?: string; + rate_limiting_technique: 'fixed' | 'sliding'; } export interface AIGatewayListResponse { @@ -151,7 +151,7 @@ export interface AIGatewayListResponse { cache_invalidate_on_update: boolean; - cache_ttl: number; + cache_ttl: number | null; collect_logs: boolean; @@ -159,11 +159,11 @@ export interface AIGatewayListResponse { modified_at: string; - rate_limiting_interval?: number; + rate_limiting_interval: number | null; - rate_limiting_limit?: number; + rate_limiting_limit: number | null; - rate_limiting_technique?: string; + rate_limiting_technique: 'fixed' | 'sliding'; } export interface AIGatewayDeleteResponse { @@ -174,7 +174,7 @@ export interface AIGatewayDeleteResponse { cache_invalidate_on_update: boolean; - cache_ttl: number; + cache_ttl: number | null; collect_logs: boolean; @@ -182,11 +182,11 @@ export interface AIGatewayDeleteResponse { modified_at: string; - rate_limiting_interval?: number; + rate_limiting_interval: number | null; - rate_limiting_limit?: number; + rate_limiting_limit: number | null; - rate_limiting_technique?: string; + rate_limiting_technique: 'fixed' | 'sliding'; } export interface AIGatewayGetResponse { @@ -197,7 +197,7 @@ export interface AIGatewayGetResponse { cache_invalidate_on_update: boolean; - cache_ttl: number; + cache_ttl: number | null; collect_logs: boolean; @@ -205,11 +205,11 @@ export interface AIGatewayGetResponse { modified_at: string; - rate_limiting_interval?: number; + rate_limiting_interval: number | null; - rate_limiting_limit?: number; + rate_limiting_limit: number | null; - rate_limiting_technique?: string; + rate_limiting_technique: 'fixed' | 'sliding'; } export interface AIGatewayCreateParams { @@ -231,7 +231,7 @@ export interface AIGatewayCreateParams { /** * Body param: */ - cache_ttl: number; + cache_ttl: number | null; /** * Body param: @@ -241,17 +241,17 @@ export interface AIGatewayCreateParams { /** * Body param: */ - rate_limiting_interval?: number; + rate_limiting_interval: number | null; /** * Body param: */ - rate_limiting_limit?: number; + rate_limiting_limit: number | null; /** * Body param: */ - rate_limiting_technique?: string; + rate_limiting_technique: 'fixed' | 'sliding'; } export interface AIGatewayUpdateParams { @@ -268,7 +268,7 @@ export interface AIGatewayUpdateParams { /** * Body param: */ - cache_ttl: number; + cache_ttl: number | null; /** * Body param: @@ -278,17 +278,17 @@ export interface AIGatewayUpdateParams { /** * Body param: */ - rate_limiting_interval?: number; + rate_limiting_interval: number | null; /** * Body param: */ - rate_limiting_limit?: number; + rate_limiting_limit: number | null; /** * Body param: */ - rate_limiting_technique?: string; + rate_limiting_technique: 'fixed' | 'sliding'; } export interface AIGatewayListParams extends V4PagePaginationArrayParams { diff --git a/src/resources/api-gateway/api-gateway.ts b/src/resources/api-gateway/api-gateway.ts new file mode 100644 index 0000000000..0957813e97 --- /dev/null +++ b/src/resources/api-gateway/api-gateway.ts @@ -0,0 +1,60 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../resource'; +import * as ConfigurationsAPI from './configurations'; +import * as SchemaValidationAPI from './schema-validation'; +import * as SchemasAPI from './schemas'; +import * as DiscoveryAPI from './discovery/discovery'; +import * as OperationsAPI from './operations/operations'; +import * as SettingsAPI from './settings/settings'; +import * as UserSchemasAPI from './user-schemas/user-schemas'; + +export class APIGateway extends APIResource { + configurations: ConfigurationsAPI.Configurations = new ConfigurationsAPI.Configurations(this._client); + discovery: DiscoveryAPI.Discovery = new DiscoveryAPI.Discovery(this._client); + operations: OperationsAPI.Operations = new OperationsAPI.Operations(this._client); + schemas: SchemasAPI.Schemas = new SchemasAPI.Schemas(this._client); + settings: SettingsAPI.Settings = new SettingsAPI.Settings(this._client); + userSchemas: UserSchemasAPI.UserSchemas = new UserSchemasAPI.UserSchemas(this._client); + schemaValidation: SchemaValidationAPI.SchemaValidation = new SchemaValidationAPI.SchemaValidation( + this._client, + ); +} + +export namespace APIGateway { + export import Configurations = ConfigurationsAPI.Configurations; + export import Configuration = ConfigurationsAPI.Configuration; + export import ConfigurationUpdateResponse = ConfigurationsAPI.ConfigurationUpdateResponse; + export import ConfigurationUpdateParams = ConfigurationsAPI.ConfigurationUpdateParams; + export import ConfigurationGetParams = ConfigurationsAPI.ConfigurationGetParams; + export import Discovery = DiscoveryAPI.Discovery; + export import DiscoveryOperation = DiscoveryAPI.DiscoveryOperation; + export import DiscoveryGetResponse = DiscoveryAPI.DiscoveryGetResponse; + export import DiscoveryGetParams = DiscoveryAPI.DiscoveryGetParams; + export import Operations = OperationsAPI.Operations; + export import APIShield = OperationsAPI.APIShield; + export import OperationCreateResponse = OperationsAPI.OperationCreateResponse; + export import OperationDeleteResponse = OperationsAPI.OperationDeleteResponse; + export import APIShieldsSinglePage = OperationsAPI.APIShieldsSinglePage; + export import OperationCreateParams = OperationsAPI.OperationCreateParams; + export import OperationListParams = OperationsAPI.OperationListParams; + export import OperationDeleteParams = OperationsAPI.OperationDeleteParams; + export import OperationGetParams = OperationsAPI.OperationGetParams; + export import Schemas = SchemasAPI.Schemas; + export import SchemaListResponse = SchemasAPI.SchemaListResponse; + export import SchemaListParams = SchemasAPI.SchemaListParams; + export import Settings = SettingsAPI.Settings; + export import UserSchemas = UserSchemasAPI.UserSchemas; + export import Message = UserSchemasAPI.Message; + export import PublicSchema = UserSchemasAPI.PublicSchema; + export import SchemaUpload = UserSchemasAPI.SchemaUpload; + export import UserSchemaDeleteResponse = UserSchemasAPI.UserSchemaDeleteResponse; + export import PublicSchemasSinglePage = UserSchemasAPI.PublicSchemasSinglePage; + export import UserSchemaCreateParams = UserSchemasAPI.UserSchemaCreateParams; + export import UserSchemaListParams = UserSchemasAPI.UserSchemaListParams; + export import UserSchemaDeleteParams = UserSchemasAPI.UserSchemaDeleteParams; + export import UserSchemaEditParams = UserSchemasAPI.UserSchemaEditParams; + export import UserSchemaGetParams = UserSchemasAPI.UserSchemaGetParams; + export import SchemaValidation = SchemaValidationAPI.SchemaValidation; + export import SchemaValidationEditParams = SchemaValidationAPI.SchemaValidationEditParams; +} diff --git a/src/resources/api-gateway/configurations.ts b/src/resources/api-gateway/configurations.ts new file mode 100644 index 0000000000..58a49bcd0e --- /dev/null +++ b/src/resources/api-gateway/configurations.ts @@ -0,0 +1,154 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as ConfigurationsAPI from './configurations'; + +export class Configurations extends APIResource { + /** + * Set configuration properties + */ + update( + params: ConfigurationUpdateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id, ...body } = params; + return ( + this._client.put(`/zones/${zone_id}/api_gateway/configuration`, { + body, + ...options, + }) as Core.APIPromise<{ result: ConfigurationUpdateResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Retrieve information about specific configuration properties + */ + get(params: ConfigurationGetParams, options?: Core.RequestOptions): Core.APIPromise { + const { zone_id, ...query } = params; + return ( + this._client.get(`/zones/${zone_id}/api_gateway/configuration`, { + query, + ...options, + }) as Core.APIPromise<{ result: Configuration }> + )._thenUnwrap((obj) => obj.result); + } +} + +export interface Configuration { + auth_id_characteristics?: Array< + Configuration.APIShieldAuthIDCharacteristic | Configuration.APIShieldAuthIDCharacteristicJwtClaim + >; +} + +export namespace Configuration { + /** + * Auth ID Characteristic + */ + export interface APIShieldAuthIDCharacteristic { + /** + * The name of the characteristic field, i.e., the header or cookie name. + */ + name: string; + + /** + * The type of characteristic. + */ + type: 'header' | 'cookie'; + } + + /** + * Auth ID Characteristic extracted from JWT Token Claims + */ + export interface APIShieldAuthIDCharacteristicJwtClaim { + /** + * Claim location expressed as `$(token_config_id):$(json_path)`, where + * `token_config_id` is the ID of the token configuration used in validating the + * JWT, and `json_path` is a RFC 9535 JSONPath + * (https://goessner.net/articles/JsonPath/, + * https://www.rfc-editor.org/rfc/rfc9535.html). The JSONPath expression may be in + * dot or bracket notation, may only specify literal keys or array indexes, and + * must return a singleton value, which will be interpreted as a string. + */ + name: string; + + /** + * The type of characteristic. + */ + type: 'jwt'; + } +} + +export type ConfigurationUpdateResponse = unknown | string | null; + +export interface ConfigurationUpdateParams { + /** + * Path param: Identifier + */ + zone_id: string; + + /** + * Body param: + */ + auth_id_characteristics?: Array< + | ConfigurationUpdateParams.APIShieldAuthIDCharacteristic + | ConfigurationUpdateParams.APIShieldAuthIDCharacteristicJwtClaim + >; +} + +export namespace ConfigurationUpdateParams { + /** + * Auth ID Characteristic + */ + export interface APIShieldAuthIDCharacteristic { + /** + * The name of the characteristic field, i.e., the header or cookie name. + */ + name: string; + + /** + * The type of characteristic. + */ + type: 'header' | 'cookie'; + } + + /** + * Auth ID Characteristic extracted from JWT Token Claims + */ + export interface APIShieldAuthIDCharacteristicJwtClaim { + /** + * Claim location expressed as `$(token_config_id):$(json_path)`, where + * `token_config_id` is the ID of the token configuration used in validating the + * JWT, and `json_path` is a RFC 9535 JSONPath + * (https://goessner.net/articles/JsonPath/, + * https://www.rfc-editor.org/rfc/rfc9535.html). The JSONPath expression may be in + * dot or bracket notation, may only specify literal keys or array indexes, and + * must return a singleton value, which will be interpreted as a string. + */ + name: string; + + /** + * The type of characteristic. + */ + type: 'jwt'; + } +} + +export interface ConfigurationGetParams { + /** + * Path param: Identifier + */ + zone_id: string; + + /** + * Query param: Requests information about certain properties. + */ + properties?: Array<'auth_id_characteristics'>; +} + +export namespace Configurations { + export import Configuration = ConfigurationsAPI.Configuration; + export import ConfigurationUpdateResponse = ConfigurationsAPI.ConfigurationUpdateResponse; + export import ConfigurationUpdateParams = ConfigurationsAPI.ConfigurationUpdateParams; + export import ConfigurationGetParams = ConfigurationsAPI.ConfigurationGetParams; +} diff --git a/src/resources/api-gateway/discovery/discovery.ts b/src/resources/api-gateway/discovery/discovery.ts new file mode 100644 index 0000000000..6652c760d9 --- /dev/null +++ b/src/resources/api-gateway/discovery/discovery.ts @@ -0,0 +1,114 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as DiscoveryAPI from './discovery'; +import * as OperationsAPI from './operations'; +import { SinglePage } from '../../../pagination'; + +export class Discovery extends APIResource { + operations: OperationsAPI.Operations = new OperationsAPI.Operations(this._client); + + /** + * Retrieve the most up to date view of discovered operations, rendered as OpenAPI + * schemas + */ + get(params: DiscoveryGetParams, options?: Core.RequestOptions): Core.APIPromise { + const { zone_id } = params; + return ( + this._client.get(`/zones/${zone_id}/api_gateway/discovery`, options) as Core.APIPromise<{ + result: DiscoveryGetResponse; + }> + )._thenUnwrap((obj) => obj.result); + } +} + +export class DiscoveryOperationsSinglePage extends SinglePage {} + +export interface DiscoveryOperation { + /** + * UUID identifier + */ + id: string; + + /** + * The endpoint which can contain path parameter templates in curly braces, each + * will be replaced from left to right with {varN}, starting with {var1}, during + * insertion. This will further be Cloudflare-normalized upon insertion. See: + * https://developers.cloudflare.com/rules/normalization/how-it-works/. + */ + endpoint: string; + + /** + * RFC3986-compliant host. + */ + host: string; + + last_updated: string; + + /** + * The HTTP method used to access the endpoint. + */ + method: 'GET' | 'POST' | 'HEAD' | 'OPTIONS' | 'PUT' | 'DELETE' | 'CONNECT' | 'PATCH' | 'TRACE'; + + /** + * API discovery engine(s) that discovered this operation + */ + origin: Array<'ML' | 'SessionIdentifier'>; + + /** + * State of operation in API Discovery + * + * - `review` - Operation is not saved into API Shield Endpoint Management + * - `saved` - Operation is saved into API Shield Endpoint Management + * - `ignored` - Operation is marked as ignored + */ + state: 'review' | 'saved' | 'ignored'; + + features?: DiscoveryOperation.Features; +} + +export namespace DiscoveryOperation { + export interface Features { + traffic_stats?: Features.TrafficStats; + } + + export namespace Features { + export interface TrafficStats { + last_updated: string; + + /** + * The period in seconds these statistics were computed over + */ + period_seconds: number; + + /** + * The average number of requests seen during this period + */ + requests: number; + } + } +} + +export interface DiscoveryGetResponse { + schemas?: Array; + + timestamp?: string; +} + +export interface DiscoveryGetParams { + /** + * Identifier + */ + zone_id: string; +} + +export namespace Discovery { + export import DiscoveryOperation = DiscoveryAPI.DiscoveryOperation; + export import DiscoveryGetResponse = DiscoveryAPI.DiscoveryGetResponse; + export import DiscoveryGetParams = DiscoveryAPI.DiscoveryGetParams; + export import Operations = OperationsAPI.Operations; + export import OperationEditResponse = OperationsAPI.OperationEditResponse; + export import OperationListParams = OperationsAPI.OperationListParams; + export import OperationEditParams = OperationsAPI.OperationEditParams; +} diff --git a/src/resources/api-gateway/discovery/index.ts b/src/resources/api-gateway/discovery/index.ts new file mode 100644 index 0000000000..d9a28a8a0f --- /dev/null +++ b/src/resources/api-gateway/discovery/index.ts @@ -0,0 +1,10 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { + DiscoveryOperation, + DiscoveryGetResponse, + DiscoveryGetParams, + DiscoveryOperationsSinglePage, + Discovery, +} from './discovery'; +export { OperationEditResponse, OperationListParams, OperationEditParams, Operations } from './operations'; diff --git a/src/resources/api-gateway/discovery/operations.ts b/src/resources/api-gateway/discovery/operations.ts new file mode 100644 index 0000000000..92b4d50ec8 --- /dev/null +++ b/src/resources/api-gateway/discovery/operations.ts @@ -0,0 +1,145 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as OperationsAPI from './operations'; +import * as DiscoveryAPI from './discovery'; +import { DiscoveryOperationsSinglePage } from './discovery'; + +export class Operations extends APIResource { + /** + * Retrieve the most up to date view of discovered operations + */ + list( + params: OperationListParams, + options?: Core.RequestOptions, + ): Core.PagePromise { + const { zone_id, ...query } = params; + return this._client.getAPIList( + `/zones/${zone_id}/api_gateway/discovery/operations`, + DiscoveryOperationsSinglePage, + { query, ...options }, + ); + } + + /** + * Update the `state` on a discovered operation + */ + edit( + operationId: string, + params: OperationEditParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id, ...body } = params; + return ( + this._client.patch(`/zones/${zone_id}/api_gateway/discovery/operations/${operationId}`, { + body, + ...options, + }) as Core.APIPromise<{ result: OperationEditResponse }> + )._thenUnwrap((obj) => obj.result); + } +} + +export interface OperationEditResponse { + /** + * State of operation in API Discovery + * + * - `review` - Operation is not saved into API Shield Endpoint Management + * - `saved` - Operation is saved into API Shield Endpoint Management + * - `ignored` - Operation is marked as ignored + */ + state?: 'review' | 'saved' | 'ignored'; +} + +export interface OperationListParams { + /** + * Path param: Identifier + */ + zone_id: string; + + /** + * Query param: When `true`, only return API Discovery results that are not saved + * into API Shield Endpoint Management + */ + diff?: boolean; + + /** + * Query param: Direction to order results. + */ + direction?: 'asc' | 'desc'; + + /** + * Query param: Filter results to only include endpoints containing this pattern. + */ + endpoint?: string; + + /** + * Query param: Filter results to only include the specified hosts. + */ + host?: Array; + + /** + * Query param: Filter results to only include the specified HTTP methods. + */ + method?: Array; + + /** + * Query param: Field to order by + */ + order?: 'host' | 'method' | 'endpoint' | 'traffic_stats.requests' | 'traffic_stats.last_updated'; + + /** + * Query param: Filter results to only include discovery results sourced from a + * particular discovery engine + * + * - `ML` - Discovered operations that were sourced using ML API Discovery + * - `SessionIdentifier` - Discovered operations that were sourced using Session + * Identifier API Discovery + */ + origin?: 'ML' | 'SessionIdentifier'; + + /** + * Query param: Page number of paginated results. + */ + page?: unknown; + + /** + * Query param: Maximum number of results per page. + */ + per_page?: unknown; + + /** + * Query param: Filter results to only include discovery results in a particular + * state. States are as follows + * + * - `review` - Discovered operations that are not saved into API Shield Endpoint + * Management + * - `saved` - Discovered operations that are already saved into API Shield + * Endpoint Management + * - `ignored` - Discovered operations that have been marked as ignored + */ + state?: 'review' | 'saved' | 'ignored'; +} + +export interface OperationEditParams { + /** + * Path param: Identifier + */ + zone_id: string; + + /** + * Body param: Mark state of operation in API Discovery + * + * - `review` - Mark operation as for review + * - `ignored` - Mark operation as ignored + */ + state?: 'review' | 'ignored'; +} + +export namespace Operations { + export import OperationEditResponse = OperationsAPI.OperationEditResponse; + export import OperationListParams = OperationsAPI.OperationListParams; + export import OperationEditParams = OperationsAPI.OperationEditParams; +} + +export { DiscoveryOperationsSinglePage }; diff --git a/src/resources/api-gateway/index.ts b/src/resources/api-gateway/index.ts new file mode 100644 index 0000000000..80ea14c8e8 --- /dev/null +++ b/src/resources/api-gateway/index.ts @@ -0,0 +1,44 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { APIGateway } from './api-gateway'; +export { + APIShield, + OperationCreateResponse, + OperationDeleteResponse, + OperationCreateParams, + OperationListParams, + OperationDeleteParams, + OperationGetParams, + APIShieldsSinglePage, + Operations, +} from './operations/index'; +export { + Configuration, + ConfigurationUpdateResponse, + ConfigurationUpdateParams, + ConfigurationGetParams, + Configurations, +} from './configurations'; +export { + DiscoveryOperation, + DiscoveryGetResponse, + DiscoveryGetParams, + DiscoveryOperationsSinglePage, + Discovery, +} from './discovery/index'; +export { + Message, + PublicSchema, + SchemaUpload, + UserSchemaDeleteResponse, + UserSchemaCreateParams, + UserSchemaListParams, + UserSchemaDeleteParams, + UserSchemaEditParams, + UserSchemaGetParams, + PublicSchemasSinglePage, + UserSchemas, +} from './user-schemas/index'; +export { SchemaListResponse, SchemaListParams, Schemas } from './schemas'; +export { SchemaValidationEditParams, SchemaValidation } from './schema-validation'; +export { Settings } from './settings/index'; diff --git a/src/resources/api-gateway/operations/index.ts b/src/resources/api-gateway/operations/index.ts new file mode 100644 index 0000000000..b1d264f242 --- /dev/null +++ b/src/resources/api-gateway/operations/index.ts @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { + APIShield, + OperationCreateResponse, + OperationDeleteResponse, + OperationCreateParams, + OperationListParams, + OperationDeleteParams, + OperationGetParams, + APIShieldsSinglePage, + Operations, +} from './operations'; +export { + SettingsMultipleRequest, + SchemaValidationUpdateResponse, + SchemaValidationGetResponse, + SchemaValidationUpdateParams, + SchemaValidationEditParams, + SchemaValidationGetParams, + SchemaValidation, +} from './schema-validation'; diff --git a/src/resources/api-gateway/operations/operations.ts b/src/resources/api-gateway/operations/operations.ts new file mode 100644 index 0000000000..2f57455e78 --- /dev/null +++ b/src/resources/api-gateway/operations/operations.ts @@ -0,0 +1,326 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as OperationsAPI from './operations'; +import * as SchemaValidationAPI from './schema-validation'; +import { SinglePage } from '../../../pagination'; + +export class Operations extends APIResource { + schemaValidation: SchemaValidationAPI.SchemaValidation = new SchemaValidationAPI.SchemaValidation( + this._client, + ); + + /** + * Add one or more operations to a zone. Endpoints can contain path variables. + * Host, method, endpoint will be normalized to a canoncial form when creating an + * operation and must be unique on the zone. Inserting an operation that matches an + * existing one will return the record of the already existing operation and update + * its last_updated date. + */ + create( + params: OperationCreateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id, body } = params; + return ( + this._client.post(`/zones/${zone_id}/api_gateway/operations`, { + body: body, + ...options, + }) as Core.APIPromise<{ result: OperationCreateResponse | null }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Retrieve information about all operations on a zone + */ + list( + params: OperationListParams, + options?: Core.RequestOptions, + ): Core.PagePromise { + const { zone_id, ...query } = params; + return this._client.getAPIList(`/zones/${zone_id}/api_gateway/operations`, APIShieldsSinglePage, { + query, + ...options, + }); + } + + /** + * Delete an operation + */ + delete( + operationId: string, + params: OperationDeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id } = params; + return ( + this._client.delete( + `/zones/${zone_id}/api_gateway/operations/${operationId}`, + options, + ) as Core.APIPromise<{ result: OperationDeleteResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Retrieve information about an operation + */ + get( + operationId: string, + params: OperationGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id, ...query } = params; + return ( + this._client.get(`/zones/${zone_id}/api_gateway/operations/${operationId}`, { + query, + ...options, + }) as Core.APIPromise<{ result: APIShield }> + )._thenUnwrap((obj) => obj.result); + } +} + +export class APIShieldsSinglePage extends SinglePage {} + +export interface APIShield { + /** + * The endpoint which can contain path parameter templates in curly braces, each + * will be replaced from left to right with {varN}, starting with {var1}, during + * insertion. This will further be Cloudflare-normalized upon insertion. See: + * https://developers.cloudflare.com/rules/normalization/how-it-works/. + */ + endpoint: string; + + /** + * RFC3986-compliant host. + */ + host: string; + + last_updated: string; + + /** + * The HTTP method used to access the endpoint. + */ + method: 'GET' | 'POST' | 'HEAD' | 'OPTIONS' | 'PUT' | 'DELETE' | 'CONNECT' | 'PATCH' | 'TRACE'; + + /** + * UUID identifier + */ + operation_id: string; + + features?: + | APIShield.APIShieldOperationFeatureThresholds + | APIShield.APIShieldOperationFeatureParameterSchemas; +} + +export namespace APIShield { + export interface APIShieldOperationFeatureThresholds { + thresholds?: APIShieldOperationFeatureThresholds.Thresholds; + } + + export namespace APIShieldOperationFeatureThresholds { + export interface Thresholds { + /** + * The total number of auth-ids seen across this calculation. + */ + auth_id_tokens?: number; + + /** + * The number of data points used for the threshold suggestion calculation. + */ + data_points?: number; + + last_updated?: string; + + /** + * The p50 quantile of requests (in period_seconds). + */ + p50?: number; + + /** + * The p90 quantile of requests (in period_seconds). + */ + p90?: number; + + /** + * The p99 quantile of requests (in period_seconds). + */ + p99?: number; + + /** + * The period over which this threshold is suggested. + */ + period_seconds?: number; + + /** + * The estimated number of requests covered by these calculations. + */ + requests?: number; + + /** + * The suggested threshold in requests done by the same auth_id or period_seconds. + */ + suggested_threshold?: number; + } + } + + export interface APIShieldOperationFeatureParameterSchemas { + parameter_schemas: APIShieldOperationFeatureParameterSchemas.ParameterSchemas; + } + + export namespace APIShieldOperationFeatureParameterSchemas { + export interface ParameterSchemas { + last_updated?: string; + + /** + * An operation schema object containing a response. + */ + parameter_schemas?: ParameterSchemas.ParameterSchemas; + } + + export namespace ParameterSchemas { + /** + * An operation schema object containing a response. + */ + export interface ParameterSchemas { + /** + * An array containing the learned parameter schemas. + */ + parameters?: Array; + + /** + * An empty response object. This field is required to yield a valid operation + * schema. + */ + responses?: unknown | null; + } + } + } +} + +export type OperationCreateResponse = Array; + +export type OperationDeleteResponse = unknown | string | null; + +export interface OperationCreateParams { + /** + * Path param: Identifier + */ + zone_id: string; + + /** + * Body param: + */ + body: Array; +} + +export namespace OperationCreateParams { + export interface Body { + /** + * The endpoint which can contain path parameter templates in curly braces, each + * will be replaced from left to right with {varN}, starting with {var1}, during + * insertion. This will further be Cloudflare-normalized upon insertion. See: + * https://developers.cloudflare.com/rules/normalization/how-it-works/. + */ + endpoint: string; + + /** + * RFC3986-compliant host. + */ + host: string; + + /** + * The HTTP method used to access the endpoint. + */ + method: 'GET' | 'POST' | 'HEAD' | 'OPTIONS' | 'PUT' | 'DELETE' | 'CONNECT' | 'PATCH' | 'TRACE'; + } +} + +export interface OperationListParams { + /** + * Path param: Identifier + */ + zone_id: string; + + /** + * Query param: Direction to order results. + */ + direction?: 'asc' | 'desc'; + + /** + * Query param: Filter results to only include endpoints containing this pattern. + */ + endpoint?: string; + + /** + * Query param: Add feature(s) to the results. The feature name that is given here + * corresponds to the resulting feature object. Have a look at the top-level object + * description for more details on the specific meaning. + */ + feature?: Array<'thresholds' | 'parameter_schemas' | 'schema_info'>; + + /** + * Query param: Filter results to only include the specified hosts. + */ + host?: Array; + + /** + * Query param: Filter results to only include the specified HTTP methods. + */ + method?: Array; + + /** + * Query param: Field to order by. When requesting a feature, the feature keys are + * available for ordering as well, e.g., `thresholds.suggested_threshold`. + */ + order?: 'method' | 'host' | 'endpoint' | 'thresholds.$key'; + + /** + * Query param: Page number of paginated results. + */ + page?: unknown; + + /** + * Query param: Number of results to return per page + */ + per_page?: number; +} + +export interface OperationDeleteParams { + /** + * Identifier + */ + zone_id: string; +} + +export interface OperationGetParams { + /** + * Path param: Identifier + */ + zone_id: string; + + /** + * Query param: Add feature(s) to the results. The feature name that is given here + * corresponds to the resulting feature object. Have a look at the top-level object + * description for more details on the specific meaning. + */ + feature?: Array<'thresholds' | 'parameter_schemas' | 'schema_info'>; +} + +export namespace Operations { + export import APIShield = OperationsAPI.APIShield; + export import OperationCreateResponse = OperationsAPI.OperationCreateResponse; + export import OperationDeleteResponse = OperationsAPI.OperationDeleteResponse; + export import APIShieldsSinglePage = OperationsAPI.APIShieldsSinglePage; + export import OperationCreateParams = OperationsAPI.OperationCreateParams; + export import OperationListParams = OperationsAPI.OperationListParams; + export import OperationDeleteParams = OperationsAPI.OperationDeleteParams; + export import OperationGetParams = OperationsAPI.OperationGetParams; + export import SchemaValidation = SchemaValidationAPI.SchemaValidation; + export import SettingsMultipleRequest = SchemaValidationAPI.SettingsMultipleRequest; + export import SchemaValidationUpdateResponse = SchemaValidationAPI.SchemaValidationUpdateResponse; + export import SchemaValidationGetResponse = SchemaValidationAPI.SchemaValidationGetResponse; + export import SchemaValidationUpdateParams = SchemaValidationAPI.SchemaValidationUpdateParams; + export import SchemaValidationEditParams = SchemaValidationAPI.SchemaValidationEditParams; + export import SchemaValidationGetParams = SchemaValidationAPI.SchemaValidationGetParams; +} diff --git a/src/resources/api-gateway/operations/schema-validation.ts b/src/resources/api-gateway/operations/schema-validation.ts new file mode 100644 index 0000000000..967cfd4148 --- /dev/null +++ b/src/resources/api-gateway/operations/schema-validation.ts @@ -0,0 +1,176 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as SchemaValidationAPI from './schema-validation'; + +export class SchemaValidation extends APIResource { + /** + * Updates operation-level schema validation settings on the zone + */ + update( + operationId: string, + params: SchemaValidationUpdateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id, ...body } = params; + return this._client.put(`/zones/${zone_id}/api_gateway/operations/${operationId}/schema_validation`, { + body, + ...options, + }); + } + + /** + * Updates multiple operation-level schema validation settings on the zone + */ + edit( + params: SchemaValidationEditParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id, settings_multiple_request } = params; + return ( + this._client.patch(`/zones/${zone_id}/api_gateway/operations/schema_validation`, { + body: settings_multiple_request, + ...options, + }) as Core.APIPromise<{ result: SettingsMultipleRequest }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Retrieves operation-level schema validation settings on the zone + */ + get( + operationId: string, + params: SchemaValidationGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id } = params; + return this._client.get( + `/zones/${zone_id}/api_gateway/operations/${operationId}/schema_validation`, + options, + ); + } +} + +export type SettingsMultipleRequest = Record< + string, + SettingsMultipleRequest.api_shield_operation_schema_validation_settings_multiple_request_entry +>; + +export namespace SettingsMultipleRequest { + /** + * Operation ID to mitigation action mappings + */ + export interface api_shield_operation_schema_validation_settings_multiple_request_entry { + /** + * When set, this applies a mitigation action to this operation + * + * - `log` log request when request does not conform to schema for this operation + * - `block` deny access to the site when request does not conform to schema for + * this operation + * - `none` will skip mitigation for this operation + * - `null` indicates that no operation level mitigation is in place, see Zone + * Level Schema Validation Settings for mitigation action that will be applied + */ + mitigation_action?: 'log' | 'block' | 'none' | null; + } +} + +export type SettingsMultipleRequestParam = Record< + string, + SettingsMultipleRequestParam.api_shield_operation_schema_validation_settings_multiple_request_entry +>; + +export namespace SettingsMultipleRequestParam { + /** + * Operation ID to mitigation action mappings + */ + export interface api_shield_operation_schema_validation_settings_multiple_request_entry { + /** + * When set, this applies a mitigation action to this operation + * + * - `log` log request when request does not conform to schema for this operation + * - `block` deny access to the site when request does not conform to schema for + * this operation + * - `none` will skip mitigation for this operation + * - `null` indicates that no operation level mitigation is in place, see Zone + * Level Schema Validation Settings for mitigation action that will be applied + */ + mitigation_action?: 'log' | 'block' | 'none' | null; + } +} + +export interface SchemaValidationUpdateResponse { + /** + * When set, this applies a mitigation action to this operation + * + * - `log` log request when request does not conform to schema for this operation + * - `block` deny access to the site when request does not conform to schema for + * this operation + * - `none` will skip mitigation for this operation + * - `null` indicates that no operation level mitigation is in place, see Zone + * Level Schema Validation Settings for mitigation action that will be applied + */ + mitigation_action?: 'log' | 'block' | 'none' | null; +} + +export interface SchemaValidationGetResponse { + /** + * When set, this applies a mitigation action to this operation + * + * - `log` log request when request does not conform to schema for this operation + * - `block` deny access to the site when request does not conform to schema for + * this operation + * - `none` will skip mitigation for this operation + * - `null` indicates that no operation level mitigation is in place, see Zone + * Level Schema Validation Settings for mitigation action that will be applied + */ + mitigation_action?: 'log' | 'block' | 'none' | null; +} + +export interface SchemaValidationUpdateParams { + /** + * Path param: Identifier + */ + zone_id: string; + + /** + * Body param: When set, this applies a mitigation action to this operation + * + * - `log` log request when request does not conform to schema for this operation + * - `block` deny access to the site when request does not conform to schema for + * this operation + * - `none` will skip mitigation for this operation + * - `null` indicates that no operation level mitigation is in place, see Zone + * Level Schema Validation Settings for mitigation action that will be applied + */ + mitigation_action?: 'log' | 'block' | 'none' | null; +} + +export interface SchemaValidationEditParams { + /** + * Path param: Identifier + */ + zone_id: string; + + /** + * Body param: + */ + settings_multiple_request: SettingsMultipleRequestParam; +} + +export interface SchemaValidationGetParams { + /** + * Identifier + */ + zone_id: string; +} + +export namespace SchemaValidation { + export import SettingsMultipleRequest = SchemaValidationAPI.SettingsMultipleRequest; + export import SchemaValidationUpdateResponse = SchemaValidationAPI.SchemaValidationUpdateResponse; + export import SchemaValidationGetResponse = SchemaValidationAPI.SchemaValidationGetResponse; + export import SchemaValidationUpdateParams = SchemaValidationAPI.SchemaValidationUpdateParams; + export import SchemaValidationEditParams = SchemaValidationAPI.SchemaValidationEditParams; + export import SchemaValidationGetParams = SchemaValidationAPI.SchemaValidationGetParams; +} diff --git a/src/resources/api-gateway/schema-validation.ts b/src/resources/api-gateway/schema-validation.ts new file mode 100644 index 0000000000..cc8b8d52dd --- /dev/null +++ b/src/resources/api-gateway/schema-validation.ts @@ -0,0 +1,59 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as SchemaValidationAPI from './schema-validation'; +import * as SettingsSchemaValidationAPI from './settings/schema-validation'; + +export class SchemaValidation extends APIResource { + /** + * Updates zone level schema validation settings on the zone + */ + edit( + params: SchemaValidationEditParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id, ...body } = params; + return this._client.patch(`/zones/${zone_id}/api_gateway/settings/schema_validation`, { + body, + ...options, + }); + } +} + +export interface SchemaValidationEditParams { + /** + * Path param: Identifier + */ + zone_id: string; + + /** + * Body param: The default mitigation action used when there is no mitigation + * action defined on the operation Mitigation actions are as follows: + * + * - `log` - log request when request does not conform to schema + * - `block` - deny access to the site when request does not conform to schema + * + * A special value of of `none` will skip running schema validation entirely for + * the request when there is no mitigation action defined on the operation + * + * `null` will have no effect. + */ + validation_default_mitigation_action?: 'none' | 'log' | 'block' | null; + + /** + * Body param: When set, this overrides both zone level and operation level + * mitigation actions. + * + * - `none` will skip running schema validation entirely for the request + * + * To clear any override, use the special value `disable_override` + * + * `null` will have no effect. + */ + validation_override_mitigation_action?: 'none' | 'disable_override' | null; +} + +export namespace SchemaValidation { + export import SchemaValidationEditParams = SchemaValidationAPI.SchemaValidationEditParams; +} diff --git a/src/resources/api-gateway/schemas.ts b/src/resources/api-gateway/schemas.ts new file mode 100644 index 0000000000..329a24094e --- /dev/null +++ b/src/resources/api-gateway/schemas.ts @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as SchemasAPI from './schemas'; + +export class Schemas extends APIResource { + /** + * Retrieve operations and features as OpenAPI schemas + */ + list(params: SchemaListParams, options?: Core.RequestOptions): Core.APIPromise { + const { zone_id, ...query } = params; + return ( + this._client.get(`/zones/${zone_id}/api_gateway/schemas`, { query, ...options }) as Core.APIPromise<{ + result: SchemaListResponse; + }> + )._thenUnwrap((obj) => obj.result); + } +} + +export interface SchemaListResponse { + schemas?: Array; + + timestamp?: string; +} + +export interface SchemaListParams { + /** + * Path param: Identifier + */ + zone_id: string; + + /** + * Query param: Add feature(s) to the results. The feature name that is given here + * corresponds to the resulting feature object. Have a look at the top-level object + * description for more details on the specific meaning. + */ + feature?: Array<'thresholds' | 'parameter_schemas' | 'schema_info'>; + + /** + * Query param: Receive schema only for the given host(s). + */ + host?: Array; +} + +export namespace Schemas { + export import SchemaListResponse = SchemasAPI.SchemaListResponse; + export import SchemaListParams = SchemasAPI.SchemaListParams; +} diff --git a/src/resources/api-gateway/settings/index.ts b/src/resources/api-gateway/settings/index.ts new file mode 100644 index 0000000000..dd78b487cc --- /dev/null +++ b/src/resources/api-gateway/settings/index.ts @@ -0,0 +1,9 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { Settings } from './settings'; +export { + Settings, + SchemaValidationUpdateParams, + SchemaValidationGetParams, + SchemaValidation, +} from './schema-validation'; diff --git a/src/resources/api-gateway/settings/schema-validation.ts b/src/resources/api-gateway/settings/schema-validation.ts new file mode 100644 index 0000000000..ef00ebf503 --- /dev/null +++ b/src/resources/api-gateway/settings/schema-validation.ts @@ -0,0 +1,92 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as SchemaValidationAPI from './schema-validation'; + +export class SchemaValidation extends APIResource { + /** + * Updates zone level schema validation settings on the zone + */ + update(params: SchemaValidationUpdateParams, options?: Core.RequestOptions): Core.APIPromise { + const { zone_id, ...body } = params; + return this._client.put(`/zones/${zone_id}/api_gateway/settings/schema_validation`, { body, ...options }); + } + + /** + * Retrieves zone level schema validation settings currently set on the zone + */ + get(params: SchemaValidationGetParams, options?: Core.RequestOptions): Core.APIPromise { + const { zone_id } = params; + return this._client.get(`/zones/${zone_id}/api_gateway/settings/schema_validation`, options); + } +} + +export interface Settings { + /** + * The default mitigation action used when there is no mitigation action defined on + * the operation + * + * Mitigation actions are as follows: + * + * - `log` - log request when request does not conform to schema + * - `block` - deny access to the site when request does not conform to schema + * + * A special value of of `none` will skip running schema validation entirely for + * the request when there is no mitigation action defined on the operation + */ + validation_default_mitigation_action?: 'none' | 'log' | 'block'; + + /** + * When set, this overrides both zone level and operation level mitigation actions. + * + * - `none` will skip running schema validation entirely for the request + * - `null` indicates that no override is in place + */ + validation_override_mitigation_action?: 'none' | null; +} + +export interface SchemaValidationUpdateParams { + /** + * Path param: Identifier + */ + zone_id: string; + + /** + * Body param: The default mitigation action used when there is no mitigation + * action defined on the operation + * + * Mitigation actions are as follows: + * + * - `log` - log request when request does not conform to schema + * - `block` - deny access to the site when request does not conform to schema + * + * A special value of of `none` will skip running schema validation entirely for + * the request when there is no mitigation action defined on the operation + */ + validation_default_mitigation_action: 'none' | 'log' | 'block'; + + /** + * Body param: When set, this overrides both zone level and operation level + * mitigation actions. + * + * - `none` will skip running schema validation entirely for the request + * - `null` indicates that no override is in place + * + * To clear any override, use the special value `disable_override` or `null` + */ + validation_override_mitigation_action?: 'none' | 'disable_override' | null; +} + +export interface SchemaValidationGetParams { + /** + * Identifier + */ + zone_id: string; +} + +export namespace SchemaValidation { + export import Settings = SchemaValidationAPI.Settings; + export import SchemaValidationUpdateParams = SchemaValidationAPI.SchemaValidationUpdateParams; + export import SchemaValidationGetParams = SchemaValidationAPI.SchemaValidationGetParams; +} diff --git a/src/resources/api-gateway/settings/settings.ts b/src/resources/api-gateway/settings/settings.ts new file mode 100644 index 0000000000..ce174db515 --- /dev/null +++ b/src/resources/api-gateway/settings/settings.ts @@ -0,0 +1,17 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../../resource'; +import * as SchemaValidationAPI from './schema-validation'; + +export class Settings extends APIResource { + schemaValidation: SchemaValidationAPI.SchemaValidation = new SchemaValidationAPI.SchemaValidation( + this._client, + ); +} + +export namespace Settings { + export import SchemaValidation = SchemaValidationAPI.SchemaValidation; + export import Settings = SchemaValidationAPI.Settings; + export import SchemaValidationUpdateParams = SchemaValidationAPI.SchemaValidationUpdateParams; + export import SchemaValidationGetParams = SchemaValidationAPI.SchemaValidationGetParams; +} diff --git a/src/resources/api-gateway/user-schemas/index.ts b/src/resources/api-gateway/user-schemas/index.ts new file mode 100644 index 0000000000..65baad7b56 --- /dev/null +++ b/src/resources/api-gateway/user-schemas/index.ts @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { + Message, + PublicSchema, + SchemaUpload, + UserSchemaDeleteResponse, + UserSchemaCreateParams, + UserSchemaListParams, + UserSchemaDeleteParams, + UserSchemaEditParams, + UserSchemaGetParams, + PublicSchemasSinglePage, + UserSchemas, +} from './user-schemas'; +export { + OperationListResponse, + OperationListParams, + OperationListResponsesSinglePage, + Operations, +} from './operations'; diff --git a/src/resources/api-gateway/user-schemas/operations.ts b/src/resources/api-gateway/user-schemas/operations.ts new file mode 100644 index 0000000000..cb39482eca --- /dev/null +++ b/src/resources/api-gateway/user-schemas/operations.ts @@ -0,0 +1,105 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as UserSchemasOperationsAPI from './operations'; +import * as OperationsAPI from '../operations/operations'; +import { SinglePage } from '../../../pagination'; + +export class Operations extends APIResource { + /** + * Retrieves all operations from the schema. Operations that already exist in API + * Shield Endpoint Management will be returned as full operations. + */ + list( + schemaId: string, + params: OperationListParams, + options?: Core.RequestOptions, + ): Core.PagePromise { + const { zone_id, ...query } = params; + return this._client.getAPIList( + `/zones/${zone_id}/api_gateway/user_schemas/${schemaId}/operations`, + OperationListResponsesSinglePage, + { query, ...options }, + ); + } +} + +export class OperationListResponsesSinglePage extends SinglePage {} + +export type OperationListResponse = OperationsAPI.APIShield | OperationListResponse.APIShieldBasicOperation; + +export namespace OperationListResponse { + export interface APIShieldBasicOperation { + /** + * The endpoint which can contain path parameter templates in curly braces, each + * will be replaced from left to right with {varN}, starting with {var1}, during + * insertion. This will further be Cloudflare-normalized upon insertion. See: + * https://developers.cloudflare.com/rules/normalization/how-it-works/. + */ + endpoint: string; + + /** + * RFC3986-compliant host. + */ + host: string; + + /** + * The HTTP method used to access the endpoint. + */ + method: 'GET' | 'POST' | 'HEAD' | 'OPTIONS' | 'PUT' | 'DELETE' | 'CONNECT' | 'PATCH' | 'TRACE'; + } +} + +export interface OperationListParams { + /** + * Path param: Identifier + */ + zone_id: string; + + /** + * Query param: Filter results to only include endpoints containing this pattern. + */ + endpoint?: string; + + /** + * Query param: Add feature(s) to the results. The feature name that is given here + * corresponds to the resulting feature object. Have a look at the top-level object + * description for more details on the specific meaning. + */ + feature?: Array<'thresholds' | 'parameter_schemas' | 'schema_info'>; + + /** + * Query param: Filter results to only include the specified hosts. + */ + host?: Array; + + /** + * Query param: Filter results to only include the specified HTTP methods. + */ + method?: Array; + + /** + * Query param: Filter results by whether operations exist in API Shield Endpoint + * Management or not. `new` will just return operations from the schema that do not + * exist in API Shield Endpoint Management. `existing` will just return operations + * from the schema that already exist in API Shield Endpoint Management. + */ + operation_status?: 'new' | 'existing'; + + /** + * Query param: Page number of paginated results. + */ + page?: unknown; + + /** + * Query param: Maximum number of results per page. + */ + per_page?: unknown; +} + +export namespace Operations { + export import OperationListResponse = UserSchemasOperationsAPI.OperationListResponse; + export import OperationListResponsesSinglePage = UserSchemasOperationsAPI.OperationListResponsesSinglePage; + export import OperationListParams = UserSchemasOperationsAPI.OperationListParams; +} diff --git a/src/resources/api-gateway/user-schemas/user-schemas.ts b/src/resources/api-gateway/user-schemas/user-schemas.ts new file mode 100644 index 0000000000..8f8e2f3070 --- /dev/null +++ b/src/resources/api-gateway/user-schemas/user-schemas.ts @@ -0,0 +1,265 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as UserSchemasAPI from './user-schemas'; +import * as Shared from '../../shared'; +import * as OperationsAPI from './operations'; +import { type Uploadable, multipartFormRequestOptions } from '../../../core'; +import { SinglePage } from '../../../pagination'; + +export class UserSchemas extends APIResource { + operations: OperationsAPI.Operations = new OperationsAPI.Operations(this._client); + + /** + * Upload a schema to a zone + */ + create(params: UserSchemaCreateParams, options?: Core.RequestOptions): Core.APIPromise { + const { zone_id, ...body } = params; + return ( + this._client.post( + `/zones/${zone_id}/api_gateway/user_schemas`, + multipartFormRequestOptions({ body, ...options }), + ) as Core.APIPromise<{ result: SchemaUpload }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Retrieve information about all schemas on a zone + */ + list( + params: UserSchemaListParams, + options?: Core.RequestOptions, + ): Core.PagePromise { + const { zone_id, ...query } = params; + return this._client.getAPIList(`/zones/${zone_id}/api_gateway/user_schemas`, PublicSchemasSinglePage, { + query, + ...options, + }); + } + + /** + * Delete a schema + */ + delete( + schemaId: string, + params: UserSchemaDeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id } = params; + return ( + this._client.delete( + `/zones/${zone_id}/api_gateway/user_schemas/${schemaId}`, + options, + ) as Core.APIPromise<{ result: UserSchemaDeleteResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Enable validation for a schema + */ + edit( + schemaId: string, + params: UserSchemaEditParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id, ...body } = params; + return ( + this._client.patch(`/zones/${zone_id}/api_gateway/user_schemas/${schemaId}`, { + body, + ...options, + }) as Core.APIPromise<{ result: PublicSchema }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Retrieve information about a specific schema on a zone + */ + get( + schemaId: string, + params: UserSchemaGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id, ...query } = params; + return ( + this._client.get(`/zones/${zone_id}/api_gateway/user_schemas/${schemaId}`, { + query, + ...options, + }) as Core.APIPromise<{ result: PublicSchema }> + )._thenUnwrap((obj) => obj.result); + } +} + +export class PublicSchemasSinglePage extends SinglePage {} + +export type Message = Array; + +export interface PublicSchema { + created_at: string; + + /** + * Kind of schema + */ + kind: 'openapi_v3'; + + /** + * Name of the schema + */ + name: string; + + /** + * UUID identifier + */ + schema_id: string; + + /** + * Source of the schema + */ + source?: string; + + /** + * Flag whether schema is enabled for validation. + */ + validation_enabled?: boolean; +} + +export interface SchemaUpload { + schema: PublicSchema; + + upload_details?: SchemaUpload.UploadDetails; +} + +export namespace SchemaUpload { + export interface UploadDetails { + /** + * Diagnostic warning events that occurred during processing. These events are + * non-critical errors found within the schema. + */ + warnings?: Array; + } + + export namespace UploadDetails { + export interface Warning { + /** + * Code that identifies the event that occurred. + */ + code: number; + + /** + * JSONPath location(s) in the schema where these events were encountered. See + * [https://goessner.net/articles/JsonPath/](https://goessner.net/articles/JsonPath/) + * for JSONPath specification. + */ + locations?: Array; + + /** + * Diagnostic message that describes the event. + */ + message?: string; + } + } +} + +export type UserSchemaDeleteResponse = unknown | string | null; + +export interface UserSchemaCreateParams { + /** + * Path param: Identifier + */ + zone_id: string; + + /** + * Body param: Schema file bytes + */ + file: Uploadable; + + /** + * Body param: Kind of schema + */ + kind: 'openapi_v3'; + + /** + * Body param: Name of the schema + */ + name?: string; + + /** + * Body param: Flag whether schema is enabled for validation. + */ + validation_enabled?: 'true' | 'false'; +} + +export interface UserSchemaListParams { + /** + * Path param: Identifier + */ + zone_id: string; + + /** + * Query param: Omit the source-files of schemas and only retrieve their meta-data. + */ + omit_source?: boolean; + + /** + * Query param: Page number of paginated results. + */ + page?: unknown; + + /** + * Query param: Maximum number of results per page. + */ + per_page?: unknown; + + /** + * Query param: Flag whether schema is enabled for validation. + */ + validation_enabled?: boolean; +} + +export interface UserSchemaDeleteParams { + /** + * Identifier + */ + zone_id: string; +} + +export interface UserSchemaEditParams { + /** + * Path param: Identifier + */ + zone_id: string; + + /** + * Body param: Flag whether schema is enabled for validation. + */ + validation_enabled?: true; +} + +export interface UserSchemaGetParams { + /** + * Path param: Identifier + */ + zone_id: string; + + /** + * Query param: Omit the source-files of schemas and only retrieve their meta-data. + */ + omit_source?: boolean; +} + +export namespace UserSchemas { + export import Message = UserSchemasAPI.Message; + export import PublicSchema = UserSchemasAPI.PublicSchema; + export import SchemaUpload = UserSchemasAPI.SchemaUpload; + export import UserSchemaDeleteResponse = UserSchemasAPI.UserSchemaDeleteResponse; + export import PublicSchemasSinglePage = UserSchemasAPI.PublicSchemasSinglePage; + export import UserSchemaCreateParams = UserSchemasAPI.UserSchemaCreateParams; + export import UserSchemaListParams = UserSchemasAPI.UserSchemaListParams; + export import UserSchemaDeleteParams = UserSchemasAPI.UserSchemaDeleteParams; + export import UserSchemaEditParams = UserSchemasAPI.UserSchemaEditParams; + export import UserSchemaGetParams = UserSchemasAPI.UserSchemaGetParams; + export import Operations = OperationsAPI.Operations; + export import OperationListResponse = OperationsAPI.OperationListResponse; + export import OperationListResponsesSinglePage = OperationsAPI.OperationListResponsesSinglePage; + export import OperationListParams = OperationsAPI.OperationListParams; +} diff --git a/src/resources/cache/cache.ts b/src/resources/cache/cache.ts index db60985692..cfe0b40aac 100644 --- a/src/resources/cache/cache.ts +++ b/src/resources/cache/cache.ts @@ -21,6 +21,10 @@ export class Cache extends APIResource { * * Removes ALL files from Cloudflare's cache. All tiers can purge everything. * + * ``` + * {"purge_everything": true} + * ``` + * * ### Purge Cached Content by URL * * Granularly removes one or more files from Cloudflare's cache by specifying URLs. @@ -33,9 +37,23 @@ export class Cache extends APIResource { * * **NB:** When including the Origin header, be sure to include the **scheme** and * **hostname**. The port number can be omitted if it is the default port (80 for - * http, 443 for https), but must be included otherwise. **NB:** For Zones on - * Free/Pro/Business plan, you may purge up to 30 URLs in one API call. For Zones - * on Enterprise plan, you may purge up to 500 URLs in one API call. + * http, 443 for https), but must be included otherwise. + * + * **NB:** For Zones on Free/Pro/Business plan, you may purge up to 30 URLs in one + * API call. For Zones on Enterprise plan, you may purge up to 500 URLs in one API + * call. + * + * Single file purge example with files: + * + * ``` + * {"files": ["http://www.example.com/css/styles.css", "http://www.example.com/js/index.js"]} + * ``` + * + * Single file purge example with url and header pairs: + * + * ``` + * {"files": [{url: "http://www.example.com/cat_picture.jpg", headers: { "CF-IPCountry": "US", "CF-Device-Type": "desktop", "Accept-Language": "zh-CN" }}, {url: "http://www.example.com/dog_picture.jpg", headers: { "CF-IPCountry": "EU", "CF-Device-Type": "mobile", "Accept-Language": "en-US" }}]} + * ``` * * ### Purge Cached Content by Tag, Host or Prefix * @@ -47,6 +65,24 @@ export class Cache extends APIResource { * purge API calls in every 24 hour period. You may purge up to 30 tags, hosts, or * prefixes in one API call. This rate limit can be raised for customers who need * to purge at higher volume. + * + * Flex purge with tags: + * + * ``` + * {"tags": ["a-cache-tag", "another-cache-tag"]} + * ``` + * + * Flex purge with hosts: + * + * ``` + * {"hosts": ["www.example.com", "images.example.com"]} + * ``` + * + * Flex purge with prefixes: + * + * ``` + * {"prefixes": ["www.example.com/foo", "images.example.com/bar/baz"]} + * ``` */ purge(params: CachePurgeParams, options?: Core.RequestOptions): Core.APIPromise { const { zone_id, ...body } = params; @@ -66,45 +102,50 @@ export interface CachePurgeResponse { } export type CachePurgeParams = - | CachePurgeParams.CachePurgeTags - | CachePurgeParams.CachePurgeHosts - | CachePurgeParams.CachePurgePrefixes + | CachePurgeParams.CachePurgeFlexPurgeByTags + | CachePurgeParams.CachePurgeFlexPurgeByHostnames + | CachePurgeParams.CachePurgeFlexPurgeByPrefixes | CachePurgeParams.CachePurgeEverything - | CachePurgeParams.CachePurgeFiles; + | CachePurgeParams.CachePurgeSingleFile + | CachePurgeParams.CachePurgeSingleFileWithURLAndHeaders; export namespace CachePurgeParams { - export interface CachePurgeTags { + export interface CachePurgeFlexPurgeByTags { /** * Path param: */ zone_id: string; /** - * Body param: + * Body param: For more information on cache tags and purging by tags, please refer + * to + * [purge by cache-tags documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-tags/#purge-cache-by-cache-tags-enterprise-only). */ tags?: Array; } - export interface CachePurgeHosts { + export interface CachePurgeFlexPurgeByHostnames { /** * Path param: */ zone_id: string; /** - * Body param: + * Body param: For more information purging by hostnames, please refer to + * [purge by hostname documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-hostname/). */ hosts?: Array; } - export interface CachePurgePrefixes { + export interface CachePurgeFlexPurgeByPrefixes { /** * Path param: */ zone_id: string; /** - * Body param: + * Body param: For more information on purging by prefixes, please refer to + * [purge by prefix documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge_by_prefix/). */ prefixes?: Array; } @@ -116,25 +157,41 @@ export namespace CachePurgeParams { zone_id: string; /** - * Body param: + * Body param: For more information, please refer to + * [purge everything documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-everything/). */ purge_everything?: boolean; } - export interface CachePurgeFiles { + export interface CachePurgeSingleFile { + /** + * Path param: + */ + zone_id: string; + + /** + * Body param: For more information on purging files, please refer to + * [purge by single-file documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-single-file/). + */ + files?: Array; + } + + export interface CachePurgeSingleFileWithURLAndHeaders { /** * Path param: */ zone_id: string; /** - * Body param: + * Body param: For more information on purging files with URL and headers, please + * refer to + * [purge by single-file documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-single-file/). */ - files?: Array; + files?: Array; } - export namespace CachePurgeFiles { - export interface CachePurgeURLAndHeaders { + export namespace CachePurgeSingleFileWithURLAndHeaders { + export interface File { headers?: unknown; url?: string; diff --git a/src/resources/d1/d1.ts b/src/resources/d1/d1.ts index 494b3c4ae2..b8f1fa2253 100644 --- a/src/resources/d1/d1.ts +++ b/src/resources/d1/d1.ts @@ -34,10 +34,12 @@ export namespace D1Resource { export import DatabaseListResponse = DatabaseAPI.DatabaseListResponse; export import DatabaseDeleteResponse = DatabaseAPI.DatabaseDeleteResponse; export import DatabaseQueryResponse = DatabaseAPI.DatabaseQueryResponse; + export import DatabaseRawResponse = DatabaseAPI.DatabaseRawResponse; export import DatabaseListResponsesV4PagePaginationArray = DatabaseAPI.DatabaseListResponsesV4PagePaginationArray; export import DatabaseCreateParams = DatabaseAPI.DatabaseCreateParams; export import DatabaseListParams = DatabaseAPI.DatabaseListParams; export import DatabaseDeleteParams = DatabaseAPI.DatabaseDeleteParams; export import DatabaseGetParams = DatabaseAPI.DatabaseGetParams; export import DatabaseQueryParams = DatabaseAPI.DatabaseQueryParams; + export import DatabaseRawParams = DatabaseAPI.DatabaseRawParams; } diff --git a/src/resources/d1/database.ts b/src/resources/d1/database.ts index f9a12d153e..1d9c04b6cf 100644 --- a/src/resources/d1/database.ts +++ b/src/resources/d1/database.ts @@ -70,7 +70,7 @@ export class Database extends APIResource { } /** - * Returns the query result. + * Returns the query result as an object. */ query( databaseId: string, @@ -85,6 +85,24 @@ export class Database extends APIResource { }) as Core.APIPromise<{ result: DatabaseQueryResponse }> )._thenUnwrap((obj) => obj.result); } + + /** + * Returns the query result rows as arrays rather than objects. This is a + * performance-optimized version of the /query endpoint. + */ + raw( + databaseId: string, + params: DatabaseRawParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.post(`/accounts/${account_id}/d1/database/${databaseId}/raw`, { + body, + ...options, + }) as Core.APIPromise<{ result: DatabaseRawResponse }> + )._thenUnwrap((obj) => obj.result); + } } export class DatabaseListResponsesV4PagePaginationArray extends V4PagePaginationArray {} @@ -145,6 +163,42 @@ export type DatabaseDeleteResponse = unknown | string | null; export type DatabaseQueryResponse = Array; +export type DatabaseRawResponse = Array; + +export namespace DatabaseRawResponse { + export interface DatabaseRawResponseItem { + meta?: DatabaseRawResponseItem.Meta; + + results?: DatabaseRawResponseItem.Results; + + success?: boolean; + } + + export namespace DatabaseRawResponseItem { + export interface Meta { + changed_db?: boolean; + + changes?: number; + + duration?: number; + + last_row_id?: number; + + rows_read?: number; + + rows_written?: number; + + size_after?: number; + } + + export interface Results { + columns?: Array; + + rows?: Array>; + } + } +} + export interface DatabaseCreateParams { /** * Path param: Account identifier tag. @@ -200,16 +254,35 @@ export interface DatabaseQueryParams { params?: Array; } +export interface DatabaseRawParams { + /** + * Path param: Account identifier tag. + */ + account_id: string; + + /** + * Body param: + */ + sql: string; + + /** + * Body param: + */ + params?: Array; +} + export namespace Database { export import QueryResult = DatabaseAPI.QueryResult; export import DatabaseCreateResponse = DatabaseAPI.DatabaseCreateResponse; export import DatabaseListResponse = DatabaseAPI.DatabaseListResponse; export import DatabaseDeleteResponse = DatabaseAPI.DatabaseDeleteResponse; export import DatabaseQueryResponse = DatabaseAPI.DatabaseQueryResponse; + export import DatabaseRawResponse = DatabaseAPI.DatabaseRawResponse; export import DatabaseListResponsesV4PagePaginationArray = DatabaseAPI.DatabaseListResponsesV4PagePaginationArray; export import DatabaseCreateParams = DatabaseAPI.DatabaseCreateParams; export import DatabaseListParams = DatabaseAPI.DatabaseListParams; export import DatabaseDeleteParams = DatabaseAPI.DatabaseDeleteParams; export import DatabaseGetParams = DatabaseAPI.DatabaseGetParams; export import DatabaseQueryParams = DatabaseAPI.DatabaseQueryParams; + export import DatabaseRawParams = DatabaseAPI.DatabaseRawParams; } diff --git a/src/resources/d1/index.ts b/src/resources/d1/index.ts index 13afa77f41..90d4c26d23 100644 --- a/src/resources/d1/index.ts +++ b/src/resources/d1/index.ts @@ -7,11 +7,13 @@ export { DatabaseListResponse, DatabaseDeleteResponse, DatabaseQueryResponse, + DatabaseRawResponse, DatabaseCreateParams, DatabaseListParams, DatabaseDeleteParams, DatabaseGetParams, DatabaseQueryParams, + DatabaseRawParams, DatabaseListResponsesV4PagePaginationArray, Database, } from './database'; diff --git a/src/resources/index.ts b/src/resources/index.ts index 96daa41565..96d932eeed 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -3,6 +3,7 @@ export * from './shared'; export { ACM } from './acm/acm'; export { AIGateway } from './ai-gateway/ai-gateway'; +export { APIGateway } from './api-gateway/api-gateway'; export { Accounts } from './accounts/accounts'; export { Addressing } from './addressing/addressing'; export { Alerting } from './alerting/alerting'; diff --git a/src/resources/kv/index.ts b/src/resources/kv/index.ts index e54fea2b0d..ecc5cc36fe 100644 --- a/src/resources/kv/index.ts +++ b/src/resources/kv/index.ts @@ -9,6 +9,7 @@ export { NamespaceUpdateParams, NamespaceListParams, NamespaceDeleteParams, + NamespaceGetParams, NamespacesV4PagePaginationArray, Namespaces, } from './namespaces/index'; diff --git a/src/resources/kv/kv.ts b/src/resources/kv/kv.ts index 581d6ef2ed..d68cc9a01c 100644 --- a/src/resources/kv/kv.ts +++ b/src/resources/kv/kv.ts @@ -17,4 +17,5 @@ export namespace KV { export import NamespaceUpdateParams = NamespacesAPI.NamespaceUpdateParams; export import NamespaceListParams = NamespacesAPI.NamespaceListParams; export import NamespaceDeleteParams = NamespacesAPI.NamespaceDeleteParams; + export import NamespaceGetParams = NamespacesAPI.NamespaceGetParams; } diff --git a/src/resources/kv/namespaces/index.ts b/src/resources/kv/namespaces/index.ts index be0e4ed221..aae9be09ec 100644 --- a/src/resources/kv/namespaces/index.ts +++ b/src/resources/kv/namespaces/index.ts @@ -11,6 +11,7 @@ export { NamespaceUpdateParams, NamespaceListParams, NamespaceDeleteParams, + NamespaceGetParams, NamespacesV4PagePaginationArray, Namespaces, } from './namespaces'; diff --git a/src/resources/kv/namespaces/namespaces.ts b/src/resources/kv/namespaces/namespaces.ts index 8450b03859..71856898cb 100644 --- a/src/resources/kv/namespaces/namespaces.ts +++ b/src/resources/kv/namespaces/namespaces.ts @@ -78,6 +78,23 @@ export class Namespaces extends APIResource { ) as Core.APIPromise<{ result: NamespaceDeleteResponse }> )._thenUnwrap((obj) => obj.result); } + + /** + * Get the namespace corresponding to the given ID. + */ + get( + namespaceId: string, + params: NamespaceGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.get( + `/accounts/${account_id}/storage/kv/namespaces/${namespaceId}`, + options, + ) as Core.APIPromise<{ result: Namespace }> + )._thenUnwrap((obj) => obj.result); + } } export class NamespacesV4PagePaginationArray extends V4PagePaginationArray {} @@ -152,6 +169,13 @@ export interface NamespaceDeleteParams { account_id: string; } +export interface NamespaceGetParams { + /** + * Identifier + */ + account_id: string; +} + export namespace Namespaces { export import Namespace = NamespacesAPI.Namespace; export import NamespaceUpdateResponse = NamespacesAPI.NamespaceUpdateResponse; @@ -161,6 +185,7 @@ export namespace Namespaces { export import NamespaceUpdateParams = NamespacesAPI.NamespaceUpdateParams; export import NamespaceListParams = NamespacesAPI.NamespaceListParams; export import NamespaceDeleteParams = NamespacesAPI.NamespaceDeleteParams; + export import NamespaceGetParams = NamespacesAPI.NamespaceGetParams; export import Bulk = BulkAPI.Bulk; export import BulkUpdateResponse = BulkAPI.BulkUpdateResponse; export import BulkDeleteResponse = BulkAPI.BulkDeleteResponse; diff --git a/src/resources/r2/buckets.ts b/src/resources/r2/buckets.ts index 1096ec550b..e0473b5016 100644 --- a/src/resources/r2/buckets.ts +++ b/src/resources/r2/buckets.ts @@ -81,6 +81,11 @@ export interface Bucket { * Name of the bucket */ name?: string; + + /** + * Storage class for newly uploaded objects, unless specified otherwise. + */ + storage_class?: 'Standard' | 'InfrequentAccess'; } export type BucketDeleteResponse = unknown; @@ -100,6 +105,12 @@ export interface BucketCreateParams { * Body param: Location of the bucket */ locationHint?: 'apac' | 'eeur' | 'enam' | 'weur' | 'wnam'; + + /** + * Body param: Storage class for newly uploaded objects, unless specified + * otherwise. + */ + storageClass?: 'Standard' | 'InfrequentAccess'; } export interface BucketListParams extends CursorPaginationParams { diff --git a/src/resources/radar/bgp/bgp.ts b/src/resources/radar/bgp/bgp.ts index 2c9c162e1c..0ac07d0f39 100644 --- a/src/resources/radar/bgp/bgp.ts +++ b/src/resources/radar/bgp/bgp.ts @@ -4,6 +4,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import { isRequestOptions } from '../../../core'; import * as BGPAPI from './bgp'; +import * as IPsAPI from './ips'; import * as RoutesAPI from './routes'; import * as HijacksAPI from './hijacks/hijacks'; import * as LeaksAPI from './leaks/leaks'; @@ -14,6 +15,7 @@ export class BGP extends APIResource { top: TopAPI.Top = new TopAPI.Top(this._client); hijacks: HijacksAPI.Hijacks = new HijacksAPI.Hijacks(this._client); routes: RoutesAPI.Routes = new RoutesAPI.Routes(this._client); + ips: IPsAPI.IPs = new IPsAPI.IPs(this._client); /** * Gets BGP updates change over time. Raw values are returned. When requesting @@ -196,9 +198,10 @@ export namespace BGP { export import RouteMoasResponse = RoutesAPI.RouteMoasResponse; export import RoutePfx2asResponse = RoutesAPI.RoutePfx2asResponse; export import RouteStatsResponse = RoutesAPI.RouteStatsResponse; - export import RouteTimeseriesResponse = RoutesAPI.RouteTimeseriesResponse; export import RouteMoasParams = RoutesAPI.RouteMoasParams; export import RoutePfx2asParams = RoutesAPI.RoutePfx2asParams; export import RouteStatsParams = RoutesAPI.RouteStatsParams; - export import RouteTimeseriesParams = RoutesAPI.RouteTimeseriesParams; + export import IPs = IPsAPI.IPs; + export import IPTimeseriesResponse = IPsAPI.IPTimeseriesResponse; + export import IPTimeseriesParams = IPsAPI.IPTimeseriesParams; } diff --git a/src/resources/radar/bgp/index.ts b/src/resources/radar/bgp/index.ts index 3e0332b321..8942af9a1b 100644 --- a/src/resources/radar/bgp/index.ts +++ b/src/resources/radar/bgp/index.ts @@ -2,16 +2,15 @@ export { BGPTimeseriesResponse, BGPTimeseriesParams, BGP } from './bgp'; export { Hijacks } from './hijacks/index'; +export { IPTimeseriesResponse, IPTimeseriesParams, IPs } from './ips'; export { Leaks } from './leaks/index'; export { RouteMoasResponse, RoutePfx2asResponse, RouteStatsResponse, - RouteTimeseriesResponse, RouteMoasParams, RoutePfx2asParams, RouteStatsParams, - RouteTimeseriesParams, Routes, } from './routes'; export { TopPrefixesResponse, TopPrefixesParams, Top } from './top/index'; diff --git a/src/resources/radar/bgp/ips.ts b/src/resources/radar/bgp/ips.ts new file mode 100644 index 0000000000..e6df7b4951 --- /dev/null +++ b/src/resources/radar/bgp/ips.ts @@ -0,0 +1,138 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as IPsAPI from './ips'; + +export class IPs extends APIResource { + /** + * Gets time-series data for the announced IP space count, represented as the + * number of IPv4 /24s and IPv6 /48s, for a given ASN. + */ + timeseries( + query?: IPTimeseriesParams, + options?: Core.RequestOptions, + ): Core.APIPromise; + timeseries(options?: Core.RequestOptions): Core.APIPromise; + timeseries( + query: IPTimeseriesParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(query)) { + return this.timeseries({}, query); + } + return ( + this._client.get('/radar/bgp/ips/timeseries', { query, ...options }) as Core.APIPromise<{ + result: IPTimeseriesResponse; + }> + )._thenUnwrap((obj) => obj.result); + } +} + +export interface IPTimeseriesResponse { + meta: IPTimeseriesResponse.Meta; + + serie_174: IPTimeseriesResponse.Serie174; + + serie_cn: IPTimeseriesResponse.SerieCn; +} + +export namespace IPTimeseriesResponse { + export interface Meta { + dateRange: Array; + } + + export namespace Meta { + export interface DateRange { + /** + * Adjusted end of date range. + */ + endTime: string; + + /** + * Adjusted start of date range. + */ + startTime: string; + } + } + + export interface Serie174 { + ipv4: Array; + + ipv6: Array; + + timestamps: Array; + } + + export interface SerieCn { + ipv4: Array; + + ipv6: Array; + + timestamps: Array; + } +} + +export interface IPTimeseriesParams { + /** + * Comma separated list of ASNs. + */ + asn?: string; + + /** + * End of the date range (inclusive). + */ + dateEnd?: string; + + /** + * Shorthand date ranges for the last X days - use when you don't need specific + * start and end dates. + */ + dateRange?: + | '1d' + | '2d' + | '7d' + | '14d' + | '28d' + | '12w' + | '24w' + | '52w' + | '1dControl' + | '2dControl' + | '7dControl' + | '14dControl' + | '28dControl' + | '12wControl' + | '24wControl'; + + /** + * Start of the date range (inclusive). + */ + dateStart?: string; + + /** + * Format results are returned in. + */ + format?: 'JSON' | 'CSV'; + + /** + * Include data delay meta information + */ + includeDelay?: boolean; + + /** + * Comma separated list of locations. + */ + location?: string; + + /** + * Array of names that will be used to name the series in responses. + */ + name?: Array; +} + +export namespace IPs { + export import IPTimeseriesResponse = IPsAPI.IPTimeseriesResponse; + export import IPTimeseriesParams = IPsAPI.IPTimeseriesParams; +} diff --git a/src/resources/radar/bgp/routes.ts b/src/resources/radar/bgp/routes.ts index 44fe6d3d7f..8a2da6adf5 100644 --- a/src/resources/radar/bgp/routes.ts +++ b/src/resources/radar/bgp/routes.ts @@ -62,29 +62,6 @@ export class Routes extends APIResource { }> )._thenUnwrap((obj) => obj.result); } - - /** - * Gets time-series data for the announced IP space count, represented as the - * number of IPv4 /24s and IPv6 /48s, for a given ASN. - */ - timeseries( - query?: RouteTimeseriesParams, - options?: Core.RequestOptions, - ): Core.APIPromise; - timeseries(options?: Core.RequestOptions): Core.APIPromise; - timeseries( - query: RouteTimeseriesParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(query)) { - return this.timeseries({}, query); - } - return ( - this._client.get('/radar/bgp/routes/timeseries', { query, ...options }) as Core.APIPromise<{ - result: RouteTimeseriesResponse; - }> - )._thenUnwrap((obj) => obj.result); - } } export interface RouteMoasResponse { @@ -199,46 +176,6 @@ export namespace RouteStatsResponse { } } -export interface RouteTimeseriesResponse { - meta: RouteTimeseriesResponse.Meta; - - serie_ipv4_24s: RouteTimeseriesResponse.SerieIPV4_24s; - - serie_ipv6_48s: RouteTimeseriesResponse.SerieIPV6_48s; -} - -export namespace RouteTimeseriesResponse { - export interface Meta { - dateRange: Array; - } - - export namespace Meta { - export interface DateRange { - /** - * Adjusted end of date range. - */ - endTime: string; - - /** - * Adjusted start of date range. - */ - startTime: string; - } - } - - export interface SerieIPV4_24s { - timestamps: Array; - - values: Array; - } - - export interface SerieIPV6_48s { - timestamps: Array; - - values: Array; - } -} - export interface RouteMoasParams { /** * Format results are returned in. @@ -306,66 +243,11 @@ export interface RouteStatsParams { location?: string; } -export interface RouteTimeseriesParams { - /** - * Single ASN as integer. - */ - asn?: number; - - /** - * End of the date range (inclusive). - */ - dateEnd?: string; - - /** - * Shorthand date ranges for the last X days - use when you don't need specific - * start and end dates. - */ - dateRange?: - | '1d' - | '2d' - | '7d' - | '14d' - | '28d' - | '12w' - | '24w' - | '52w' - | '1dControl' - | '2dControl' - | '7dControl' - | '14dControl' - | '28dControl' - | '12wControl' - | '24wControl'; - - /** - * Start of the date range (inclusive). - */ - dateStart?: string; - - /** - * Format results are returned in. - */ - format?: 'JSON' | 'CSV'; - - /** - * Include data delay meta information - */ - includeDelay?: boolean; - - /** - * Location Alpha2 code. - */ - location?: string; -} - export namespace Routes { export import RouteMoasResponse = RoutesAPI.RouteMoasResponse; export import RoutePfx2asResponse = RoutesAPI.RoutePfx2asResponse; export import RouteStatsResponse = RoutesAPI.RouteStatsResponse; - export import RouteTimeseriesResponse = RoutesAPI.RouteTimeseriesResponse; export import RouteMoasParams = RoutesAPI.RouteMoasParams; export import RoutePfx2asParams = RoutesAPI.RoutePfx2asParams; export import RouteStatsParams = RoutesAPI.RouteStatsParams; - export import RouteTimeseriesParams = RoutesAPI.RouteTimeseriesParams; } diff --git a/src/resources/zero-trust/access/access.ts b/src/resources/zero-trust/access/access.ts index d45a705f08..50d7ed5610 100644 --- a/src/resources/zero-trust/access/access.ts +++ b/src/resources/zero-trust/access/access.ts @@ -756,58 +756,29 @@ export namespace Access { export import Certificates = CertificatesAPI.Certificates; export import AssociatedHostnames = CertificatesAPI.AssociatedHostnames; export import Certificate = CertificatesAPI.Certificate; - export import CertificateDeleteResponse = CertificatesAPI.CertificateDeleteResponse; export import CertificatesSinglePage = CertificatesAPI.CertificatesSinglePage; export import CertificateCreateParams = CertificatesAPI.CertificateCreateParams; - export import CertificateUpdateParams = CertificatesAPI.CertificateUpdateParams; export import CertificateListParams = CertificatesAPI.CertificateListParams; - export import CertificateDeleteParams = CertificatesAPI.CertificateDeleteParams; - export import CertificateGetParams = CertificatesAPI.CertificateGetParams; export import Groups = GroupsAPI.Groups; export import ZeroTrustGroup = GroupsAPI.ZeroTrustGroup; - export import GroupDeleteResponse = GroupsAPI.GroupDeleteResponse; export import ZeroTrustGroupsSinglePage = GroupsAPI.ZeroTrustGroupsSinglePage; export import GroupCreateParams = GroupsAPI.GroupCreateParams; - export import GroupUpdateParams = GroupsAPI.GroupUpdateParams; export import GroupListParams = GroupsAPI.GroupListParams; - export import GroupDeleteParams = GroupsAPI.GroupDeleteParams; - export import GroupGetParams = GroupsAPI.GroupGetParams; export import ServiceTokens = ServiceTokensAPI.ServiceTokens; export import ServiceToken = ServiceTokensAPI.ServiceToken; export import ServiceTokenCreateResponse = ServiceTokensAPI.ServiceTokenCreateResponse; - export import ServiceTokenRotateResponse = ServiceTokensAPI.ServiceTokenRotateResponse; export import ServiceTokensSinglePage = ServiceTokensAPI.ServiceTokensSinglePage; export import ServiceTokenCreateParams = ServiceTokensAPI.ServiceTokenCreateParams; - export import ServiceTokenUpdateParams = ServiceTokensAPI.ServiceTokenUpdateParams; export import ServiceTokenListParams = ServiceTokensAPI.ServiceTokenListParams; - export import ServiceTokenDeleteParams = ServiceTokensAPI.ServiceTokenDeleteParams; - export import ServiceTokenGetParams = ServiceTokensAPI.ServiceTokenGetParams; export import Bookmarks = BookmarksAPI.Bookmarks; export import Bookmark = BookmarksAPI.Bookmark; - export import BookmarkDeleteResponse = BookmarksAPI.BookmarkDeleteResponse; - export import BookmarksSinglePage = BookmarksAPI.BookmarksSinglePage; - export import BookmarkCreateParams = BookmarksAPI.BookmarkCreateParams; - export import BookmarkUpdateParams = BookmarksAPI.BookmarkUpdateParams; export import Keys = KeysAPI.Keys; - export import KeyUpdateResponse = KeysAPI.KeyUpdateResponse; - export import KeyGetResponse = KeysAPI.KeyGetResponse; - export import KeyRotateResponse = KeysAPI.KeyRotateResponse; - export import KeyUpdateParams = KeysAPI.KeyUpdateParams; export import Logs = LogsAPI.Logs; export import Users = UsersAPI.Users; export import AccessUser = UsersAPI.AccessUser; - export import AccessUsersSinglePage = UsersAPI.AccessUsersSinglePage; export import CustomPages = CustomPagesAPI.CustomPages; export import CustomPage = CustomPagesAPI.CustomPage; export import CustomPageWithoutHTML = CustomPagesAPI.CustomPageWithoutHTML; - export import CustomPageDeleteResponse = CustomPagesAPI.CustomPageDeleteResponse; - export import CustomPageWithoutHTMLsSinglePage = CustomPagesAPI.CustomPageWithoutHTMLsSinglePage; - export import CustomPageCreateParams = CustomPagesAPI.CustomPageCreateParams; - export import CustomPageUpdateParams = CustomPagesAPI.CustomPageUpdateParams; export import Tags = TagsAPI.Tags; export import Tag = TagsAPI.Tag; - export import TagDeleteResponse = TagsAPI.TagDeleteResponse; - export import TagsSinglePage = TagsAPI.TagsSinglePage; - export import TagCreateParams = TagsAPI.TagCreateParams; - export import TagUpdateParams = TagsAPI.TagUpdateParams; } diff --git a/src/resources/zero-trust/access/applications/applications.ts b/src/resources/zero-trust/access/applications/applications.ts index 8d204506da..aca1a2fa97 100644 --- a/src/resources/zero-trust/access/applications/applications.ts +++ b/src/resources/zero-trust/access/applications/applications.ts @@ -20492,14 +20492,8 @@ export namespace Applications { export import ApplicationRevokeTokensParams = ApplicationsAPI.ApplicationRevokeTokensParams; export import CAs = CAsAPI.CAs; export import CA = CAsAPI.CA; - export import CACreateResponse = CAsAPI.CACreateResponse; - export import CADeleteResponse = CAsAPI.CADeleteResponse; - export import CAGetResponse = CAsAPI.CAGetResponse; export import CAsSinglePage = CAsAPI.CAsSinglePage; - export import CACreateParams = CAsAPI.CACreateParams; export import CAListParams = CAsAPI.CAListParams; - export import CADeleteParams = CAsAPI.CADeleteParams; - export import CAGetParams = CAsAPI.CAGetParams; export import UserPolicyChecks = UserPolicyChecksAPI.UserPolicyChecks; export import UserPolicyCheckGeo = UserPolicyChecksAPI.UserPolicyCheckGeo; export import UserPolicyCheckListResponse = UserPolicyChecksAPI.UserPolicyCheckListResponse; @@ -20507,15 +20501,4 @@ export namespace Applications { export import Policies = PoliciesAPI.Policies; export import ApprovalGroup = PoliciesAPI.ApprovalGroup; export import Policy = PoliciesAPI.Policy; - export import PolicyCreateResponse = PoliciesAPI.PolicyCreateResponse; - export import PolicyUpdateResponse = PoliciesAPI.PolicyUpdateResponse; - export import PolicyListResponse = PoliciesAPI.PolicyListResponse; - export import PolicyDeleteResponse = PoliciesAPI.PolicyDeleteResponse; - export import PolicyGetResponse = PoliciesAPI.PolicyGetResponse; - export import PolicyListResponsesSinglePage = PoliciesAPI.PolicyListResponsesSinglePage; - export import PolicyCreateParams = PoliciesAPI.PolicyCreateParams; - export import PolicyUpdateParams = PoliciesAPI.PolicyUpdateParams; - export import PolicyListParams = PoliciesAPI.PolicyListParams; - export import PolicyDeleteParams = PoliciesAPI.PolicyDeleteParams; - export import PolicyGetParams = PoliciesAPI.PolicyGetParams; } diff --git a/src/resources/zero-trust/access/applications/cas.ts b/src/resources/zero-trust/access/applications/cas.ts index 02aef3098d..3a6193c6d1 100644 --- a/src/resources/zero-trust/access/applications/cas.ts +++ b/src/resources/zero-trust/access/applications/cas.ts @@ -8,48 +8,6 @@ import * as CAsAPI from './cas'; import { SinglePage } from '../../../../pagination'; export class CAs extends APIResource { - /** - * Generates a new short-lived certificate CA and public key. - */ - create( - uuid: string, - params?: CACreateParams, - options?: Core.RequestOptions, - ): Core.APIPromise; - create(uuid: string, options?: Core.RequestOptions): Core.APIPromise; - create( - uuid: string, - params: CACreateParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(params)) { - return this.create(uuid, {}, params); - } - const { account_id, zone_id } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return ( - this._client.post( - `/${accountOrZone}/${accountOrZoneId}/access/apps/${uuid}/ca`, - options, - ) as Core.APIPromise<{ result: CACreateResponse }> - )._thenUnwrap((obj) => obj.result); - } - /** * Lists short-lived certificate CAs and their public keys. */ @@ -85,86 +43,6 @@ export class CAs extends APIResource { options, ); } - - /** - * Deletes a short-lived certificate CA. - */ - delete( - uuid: string, - params?: CADeleteParams, - options?: Core.RequestOptions, - ): Core.APIPromise; - delete(uuid: string, options?: Core.RequestOptions): Core.APIPromise; - delete( - uuid: string, - params: CADeleteParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(params)) { - return this.delete(uuid, {}, params); - } - const { account_id, zone_id } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return ( - this._client.delete( - `/${accountOrZone}/${accountOrZoneId}/access/apps/${uuid}/ca`, - options, - ) as Core.APIPromise<{ result: CADeleteResponse }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Fetches a short-lived certificate CA and its public key. - */ - get(uuid: string, params?: CAGetParams, options?: Core.RequestOptions): Core.APIPromise; - get(uuid: string, options?: Core.RequestOptions): Core.APIPromise; - get( - uuid: string, - params: CAGetParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(params)) { - return this.get(uuid, {}, params); - } - const { account_id, zone_id } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return ( - this._client.get( - `/${accountOrZone}/${accountOrZoneId}/access/apps/${uuid}/ca`, - options, - ) as Core.APIPromise<{ result: CAGetResponse }> - )._thenUnwrap((obj) => obj.result); - } } export class CAsSinglePage extends SinglePage {} @@ -187,29 +65,6 @@ export interface CA { public_key?: string; } -export type CACreateResponse = unknown | string | null; - -export interface CADeleteResponse { - /** - * The ID of the CA. - */ - id?: string; -} - -export type CAGetResponse = unknown | string | null; - -export interface CACreateParams { - /** - * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - */ - account_id?: string; - - /** - * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - */ - zone_id?: string; -} - export interface CAListParams { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. @@ -222,38 +77,8 @@ export interface CAListParams { zone_id?: string; } -export interface CADeleteParams { - /** - * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - */ - account_id?: string; - - /** - * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - */ - zone_id?: string; -} - -export interface CAGetParams { - /** - * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - */ - account_id?: string; - - /** - * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - */ - zone_id?: string; -} - export namespace CAs { export import CA = CAsAPI.CA; - export import CACreateResponse = CAsAPI.CACreateResponse; - export import CADeleteResponse = CAsAPI.CADeleteResponse; - export import CAGetResponse = CAsAPI.CAGetResponse; export import CAsSinglePage = CAsAPI.CAsSinglePage; - export import CACreateParams = CAsAPI.CACreateParams; export import CAListParams = CAsAPI.CAListParams; - export import CADeleteParams = CAsAPI.CADeleteParams; - export import CAGetParams = CAsAPI.CAGetParams; } diff --git a/src/resources/zero-trust/access/applications/index.ts b/src/resources/zero-trust/access/applications/index.ts index ed76c33146..f9cc6f8b23 100644 --- a/src/resources/zero-trust/access/applications/index.ts +++ b/src/resources/zero-trust/access/applications/index.ts @@ -30,34 +30,8 @@ export { ApplicationListResponsesSinglePage, Applications, } from './applications'; -export { - ApprovalGroup, - Policy, - PolicyCreateResponse, - PolicyUpdateResponse, - PolicyListResponse, - PolicyDeleteResponse, - PolicyGetResponse, - PolicyCreateParams, - PolicyUpdateParams, - PolicyListParams, - PolicyDeleteParams, - PolicyGetParams, - PolicyListResponsesSinglePage, - Policies, -} from './policies'; -export { - CA, - CACreateResponse, - CADeleteResponse, - CAGetResponse, - CACreateParams, - CAListParams, - CADeleteParams, - CAGetParams, - CAsSinglePage, - CAs, -} from './cas'; +export { ApprovalGroup, Policy, Policies } from './policies'; +export { CA, CAListParams, CAsSinglePage, CAs } from './cas'; export { UserPolicyCheckGeo, UserPolicyCheckListResponse, diff --git a/src/resources/zero-trust/access/applications/policies.ts b/src/resources/zero-trust/access/applications/policies.ts index 014e628827..502dfc2cb5 100644 --- a/src/resources/zero-trust/access/applications/policies.ts +++ b/src/resources/zero-trust/access/applications/policies.ts @@ -1,223 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from '../../../../core'; import { APIResource } from '../../../../resource'; -import { isRequestOptions } from '../../../../core'; -import { CloudflareError } from '../../../../error'; import * as PoliciesAPI from './policies'; import * as AccessAPI from '../access'; import * as ApplicationsAPI from './applications'; -import { SinglePage } from '../../../../pagination'; -export class Policies extends APIResource { - /** - * Creates a policy applying exclusive to a single application that defines the - * users or groups who can reach it. We recommend creating a reusable policy - * instead and subsequently referencing its ID in the application's 'policies' - * array. - */ - create( - uuid: string, - params: PolicyCreateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { - const { account_id, zone_id, ...body } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return ( - this._client.post(`/${accountOrZone}/${accountOrZoneId}/access/apps/${uuid}/policies`, { - body, - ...options, - }) as Core.APIPromise<{ result: PolicyCreateResponse }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Updates an Access policy specific to an application. To update a reusable - * policy, use the /account or zones/{identifier}/policies/{uid} endpoint. - */ - update( - uuid1: string, - uuid: string, - params: PolicyUpdateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { - const { account_id, zone_id, ...body } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return ( - this._client.put(`/${accountOrZone}/${accountOrZoneId}/access/apps/${uuid1}/policies/${uuid}`, { - body, - ...options, - }) as Core.APIPromise<{ result: PolicyUpdateResponse }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Lists Access policies configured for an application. Returns both exclusively - * scoped and reusable policies used by the application. - */ - list( - uuid: string, - params?: PolicyListParams, - options?: Core.RequestOptions, - ): Core.PagePromise; - list( - uuid: string, - options?: Core.RequestOptions, - ): Core.PagePromise; - list( - uuid: string, - params: PolicyListParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.PagePromise { - if (isRequestOptions(params)) { - return this.list(uuid, {}, params); - } - const { account_id, zone_id } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return this._client.getAPIList( - `/${accountOrZone}/${accountOrZoneId}/access/apps/${uuid}/policies`, - PolicyListResponsesSinglePage, - options, - ); - } - - /** - * Deletes an Access policy specific to an application. To delete a reusable - * policy, use the /account or zones/{identifier}/policies/{uid} endpoint. - */ - delete( - uuid1: string, - uuid: string, - params?: PolicyDeleteParams, - options?: Core.RequestOptions, - ): Core.APIPromise; - delete(uuid1: string, uuid: string, options?: Core.RequestOptions): Core.APIPromise; - delete( - uuid1: string, - uuid: string, - params: PolicyDeleteParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(params)) { - return this.delete(uuid1, uuid, {}, params); - } - const { account_id, zone_id } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return ( - this._client.delete( - `/${accountOrZone}/${accountOrZoneId}/access/apps/${uuid1}/policies/${uuid}`, - options, - ) as Core.APIPromise<{ result: PolicyDeleteResponse }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Fetches a single Access policy configured for an application. Returns both - * exclusively owned and reusable policies used by the application. - */ - get( - uuid1: string, - uuid: string, - params?: PolicyGetParams, - options?: Core.RequestOptions, - ): Core.APIPromise; - get(uuid1: string, uuid: string, options?: Core.RequestOptions): Core.APIPromise; - get( - uuid1: string, - uuid: string, - params: PolicyGetParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(params)) { - return this.get(uuid1, uuid, {}, params); - } - const { account_id, zone_id } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return ( - this._client.get( - `/${accountOrZone}/${accountOrZoneId}/access/apps/${uuid1}/policies/${uuid}`, - options, - ) as Core.APIPromise<{ result: PolicyGetResponse }> - )._thenUnwrap((obj) => obj.result); - } -} - -export class PolicyListResponsesSinglePage extends SinglePage {} +export class Policies extends APIResource {} /** * A group of email addresses that can approve a temporary authentication request. @@ -352,527 +140,7 @@ export namespace Policy { } } -export interface PolicyCreateResponse { - /** - * UUID - */ - id?: string; - - /** - * Administrators who can approve a temporary authentication request. - */ - approval_groups?: Array; - - /** - * Requires the user to request access from an administrator at the start of each - * session. - */ - approval_required?: boolean; - - created_at?: string; - - /** - * The action Access will take if a user matches this policy. - */ - decision?: ApplicationsAPI.Decision; - - /** - * Rules evaluated with a NOT logical operator. To match the policy, a user cannot - * meet any of the Exclude rules. - */ - exclude?: Array; - - /** - * Rules evaluated with an OR logical operator. A user needs to meet only one of - * the Include rules. - */ - include?: Array; - - /** - * Require this application to be served in an isolated browser for users matching - * this policy. 'Client Web Isolation' must be on for the account in order to use - * this feature. - */ - isolation_required?: boolean; - - /** - * The name of the Access policy. - */ - name?: string; - - /** - * A custom message that will appear on the purpose justification screen. - */ - purpose_justification_prompt?: string; - - /** - * Require users to enter a justification when they log in to the application. - */ - purpose_justification_required?: boolean; - - /** - * Rules evaluated with an AND logical operator. To match the policy, a user must - * meet all of the Require rules. - */ - require?: Array; - - /** - * The amount of time that tokens issued for the application will be valid. Must be - * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, - * m, h. - */ - session_duration?: string; - - updated_at?: string; -} - -export interface PolicyUpdateResponse { - /** - * UUID - */ - id?: string; - - /** - * Administrators who can approve a temporary authentication request. - */ - approval_groups?: Array; - - /** - * Requires the user to request access from an administrator at the start of each - * session. - */ - approval_required?: boolean; - - created_at?: string; - - /** - * The action Access will take if a user matches this policy. - */ - decision?: ApplicationsAPI.Decision; - - /** - * Rules evaluated with a NOT logical operator. To match the policy, a user cannot - * meet any of the Exclude rules. - */ - exclude?: Array; - - /** - * Rules evaluated with an OR logical operator. A user needs to meet only one of - * the Include rules. - */ - include?: Array; - - /** - * Require this application to be served in an isolated browser for users matching - * this policy. 'Client Web Isolation' must be on for the account in order to use - * this feature. - */ - isolation_required?: boolean; - - /** - * The name of the Access policy. - */ - name?: string; - - /** - * A custom message that will appear on the purpose justification screen. - */ - purpose_justification_prompt?: string; - - /** - * Require users to enter a justification when they log in to the application. - */ - purpose_justification_required?: boolean; - - /** - * Rules evaluated with an AND logical operator. To match the policy, a user must - * meet all of the Require rules. - */ - require?: Array; - - /** - * The amount of time that tokens issued for the application will be valid. Must be - * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, - * m, h. - */ - session_duration?: string; - - updated_at?: string; -} - -export interface PolicyListResponse { - /** - * UUID - */ - id?: string; - - /** - * Administrators who can approve a temporary authentication request. - */ - approval_groups?: Array; - - /** - * Requires the user to request access from an administrator at the start of each - * session. - */ - approval_required?: boolean; - - created_at?: string; - - /** - * The action Access will take if a user matches this policy. - */ - decision?: ApplicationsAPI.Decision; - - /** - * Rules evaluated with a NOT logical operator. To match the policy, a user cannot - * meet any of the Exclude rules. - */ - exclude?: Array; - - /** - * Rules evaluated with an OR logical operator. A user needs to meet only one of - * the Include rules. - */ - include?: Array; - - /** - * Require this application to be served in an isolated browser for users matching - * this policy. 'Client Web Isolation' must be on for the account in order to use - * this feature. - */ - isolation_required?: boolean; - - /** - * The name of the Access policy. - */ - name?: string; - - /** - * A custom message that will appear on the purpose justification screen. - */ - purpose_justification_prompt?: string; - - /** - * Require users to enter a justification when they log in to the application. - */ - purpose_justification_required?: boolean; - - /** - * Rules evaluated with an AND logical operator. To match the policy, a user must - * meet all of the Require rules. - */ - require?: Array; - - /** - * The amount of time that tokens issued for the application will be valid. Must be - * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, - * m, h. - */ - session_duration?: string; - - updated_at?: string; -} - -export interface PolicyDeleteResponse { - /** - * UUID - */ - id?: string; -} - -export interface PolicyGetResponse { - /** - * UUID - */ - id?: string; - - /** - * Administrators who can approve a temporary authentication request. - */ - approval_groups?: Array; - - /** - * Requires the user to request access from an administrator at the start of each - * session. - */ - approval_required?: boolean; - - created_at?: string; - - /** - * The action Access will take if a user matches this policy. - */ - decision?: ApplicationsAPI.Decision; - - /** - * Rules evaluated with a NOT logical operator. To match the policy, a user cannot - * meet any of the Exclude rules. - */ - exclude?: Array; - - /** - * Rules evaluated with an OR logical operator. A user needs to meet only one of - * the Include rules. - */ - include?: Array; - - /** - * Require this application to be served in an isolated browser for users matching - * this policy. 'Client Web Isolation' must be on for the account in order to use - * this feature. - */ - isolation_required?: boolean; - - /** - * The name of the Access policy. - */ - name?: string; - - /** - * A custom message that will appear on the purpose justification screen. - */ - purpose_justification_prompt?: string; - - /** - * Require users to enter a justification when they log in to the application. - */ - purpose_justification_required?: boolean; - - /** - * Rules evaluated with an AND logical operator. To match the policy, a user must - * meet all of the Require rules. - */ - require?: Array; - - /** - * The amount of time that tokens issued for the application will be valid. Must be - * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, - * m, h. - */ - session_duration?: string; - - updated_at?: string; -} - -export interface PolicyCreateParams { - /** - * Body param: The action Access will take if a user matches this policy. - */ - decision: ApplicationsAPI.DecisionParam; - - /** - * Body param: Rules evaluated with an OR logical operator. A user needs to meet - * only one of the Include rules. - */ - include: Array; - - /** - * Body param: The name of the Access policy. - */ - name: string; - - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: Administrators who can approve a temporary authentication request. - */ - approval_groups?: Array; - - /** - * Body param: Requires the user to request access from an administrator at the - * start of each session. - */ - approval_required?: boolean; - - /** - * Body param: Rules evaluated with a NOT logical operator. To match the policy, a - * user cannot meet any of the Exclude rules. - */ - exclude?: Array; - - /** - * Body param: Require this application to be served in an isolated browser for - * users matching this policy. 'Client Web Isolation' must be on for the account in - * order to use this feature. - */ - isolation_required?: boolean; - - /** - * Body param: The order of execution for this policy. Must be unique for each - * policy within an app. - */ - precedence?: number; - - /** - * Body param: A custom message that will appear on the purpose justification - * screen. - */ - purpose_justification_prompt?: string; - - /** - * Body param: Require users to enter a justification when they log in to the - * application. - */ - purpose_justification_required?: boolean; - - /** - * Body param: Rules evaluated with an AND logical operator. To match the policy, a - * user must meet all of the Require rules. - */ - require?: Array; - - /** - * Body param: The amount of time that tokens issued for the application will be - * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us - * (or µs), ms, s, m, h. - */ - session_duration?: string; -} - -export interface PolicyUpdateParams { - /** - * Body param: The action Access will take if a user matches this policy. - */ - decision: ApplicationsAPI.DecisionParam; - - /** - * Body param: Rules evaluated with an OR logical operator. A user needs to meet - * only one of the Include rules. - */ - include: Array; - - /** - * Body param: The name of the Access policy. - */ - name: string; - - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: Administrators who can approve a temporary authentication request. - */ - approval_groups?: Array; - - /** - * Body param: Requires the user to request access from an administrator at the - * start of each session. - */ - approval_required?: boolean; - - /** - * Body param: Rules evaluated with a NOT logical operator. To match the policy, a - * user cannot meet any of the Exclude rules. - */ - exclude?: Array; - - /** - * Body param: Require this application to be served in an isolated browser for - * users matching this policy. 'Client Web Isolation' must be on for the account in - * order to use this feature. - */ - isolation_required?: boolean; - - /** - * Body param: The order of execution for this policy. Must be unique for each - * policy within an app. - */ - precedence?: number; - - /** - * Body param: A custom message that will appear on the purpose justification - * screen. - */ - purpose_justification_prompt?: string; - - /** - * Body param: Require users to enter a justification when they log in to the - * application. - */ - purpose_justification_required?: boolean; - - /** - * Body param: Rules evaluated with an AND logical operator. To match the policy, a - * user must meet all of the Require rules. - */ - require?: Array; - - /** - * Body param: The amount of time that tokens issued for the application will be - * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us - * (or µs), ms, s, m, h. - */ - session_duration?: string; -} - -export interface PolicyListParams { - /** - * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - */ - account_id?: string; - - /** - * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - */ - zone_id?: string; -} - -export interface PolicyDeleteParams { - /** - * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - */ - account_id?: string; - - /** - * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - */ - zone_id?: string; -} - -export interface PolicyGetParams { - /** - * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - */ - account_id?: string; - - /** - * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - */ - zone_id?: string; -} - export namespace Policies { export import ApprovalGroup = PoliciesAPI.ApprovalGroup; export import Policy = PoliciesAPI.Policy; - export import PolicyCreateResponse = PoliciesAPI.PolicyCreateResponse; - export import PolicyUpdateResponse = PoliciesAPI.PolicyUpdateResponse; - export import PolicyListResponse = PoliciesAPI.PolicyListResponse; - export import PolicyDeleteResponse = PoliciesAPI.PolicyDeleteResponse; - export import PolicyGetResponse = PoliciesAPI.PolicyGetResponse; - export import PolicyListResponsesSinglePage = PoliciesAPI.PolicyListResponsesSinglePage; - export import PolicyCreateParams = PoliciesAPI.PolicyCreateParams; - export import PolicyUpdateParams = PoliciesAPI.PolicyUpdateParams; - export import PolicyListParams = PoliciesAPI.PolicyListParams; - export import PolicyDeleteParams = PoliciesAPI.PolicyDeleteParams; - export import PolicyGetParams = PoliciesAPI.PolicyGetParams; } diff --git a/src/resources/zero-trust/access/bookmarks.ts b/src/resources/zero-trust/access/bookmarks.ts index a26571b47f..c832d6f4f7 100644 --- a/src/resources/zero-trust/access/bookmarks.ts +++ b/src/resources/zero-trust/access/bookmarks.ts @@ -1,80 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as BookmarksAPI from './bookmarks'; -import { SinglePage } from '../../../pagination'; -export class Bookmarks extends APIResource { - /** - * Create a new Bookmark application. - */ - create( - identifier: string, - uuid: string, - body: BookmarkCreateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { - return ( - this._client.post(`/accounts/${identifier}/access/bookmarks/${uuid}`, { - body, - ...options, - }) as Core.APIPromise<{ result: Bookmark }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Updates a configured Bookmark application. - */ - update( - identifier: string, - uuid: string, - body: BookmarkUpdateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { - return ( - this._client.put(`/accounts/${identifier}/access/bookmarks/${uuid}`, { - body, - ...options, - }) as Core.APIPromise<{ result: Bookmark }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Lists Bookmark applications. - */ - list(identifier: string, options?: Core.RequestOptions): Core.PagePromise { - return this._client.getAPIList(`/accounts/${identifier}/access/bookmarks`, BookmarksSinglePage, options); - } - - /** - * Deletes a Bookmark application. - */ - delete( - identifier: string, - uuid: string, - options?: Core.RequestOptions, - ): Core.APIPromise { - return ( - this._client.delete(`/accounts/${identifier}/access/bookmarks/${uuid}`, options) as Core.APIPromise<{ - result: BookmarkDeleteResponse; - }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Fetches a single Bookmark application. - */ - get(identifier: string, uuid: string, options?: Core.RequestOptions): Core.APIPromise { - return ( - this._client.get(`/accounts/${identifier}/access/bookmarks/${uuid}`, options) as Core.APIPromise<{ - result: Bookmark; - }> - )._thenUnwrap((obj) => obj.result); - } -} - -export class BookmarksSinglePage extends SinglePage {} +export class Bookmarks extends APIResource {} export interface Bookmark { /** @@ -107,21 +36,6 @@ export interface Bookmark { updated_at?: string; } -export interface BookmarkDeleteResponse { - /** - * UUID - */ - id?: string; -} - -export type BookmarkCreateParams = unknown; - -export type BookmarkUpdateParams = unknown; - export namespace Bookmarks { export import Bookmark = BookmarksAPI.Bookmark; - export import BookmarkDeleteResponse = BookmarksAPI.BookmarkDeleteResponse; - export import BookmarksSinglePage = BookmarksAPI.BookmarksSinglePage; - export import BookmarkCreateParams = BookmarksAPI.BookmarkCreateParams; - export import BookmarkUpdateParams = BookmarksAPI.BookmarkUpdateParams; } diff --git a/src/resources/zero-trust/access/certificates/certificates.ts b/src/resources/zero-trust/access/certificates/certificates.ts index 2a6c13cb42..ddf4e02c77 100644 --- a/src/resources/zero-trust/access/certificates/certificates.ts +++ b/src/resources/zero-trust/access/certificates/certificates.ts @@ -40,39 +40,6 @@ export class Certificates extends APIResource { )._thenUnwrap((obj) => obj.result); } - /** - * Updates a configured mTLS certificate. - */ - update( - uuid: string, - params: CertificateUpdateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { - const { account_id, zone_id, ...body } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return ( - this._client.put(`/${accountOrZone}/${accountOrZoneId}/access/certificates/${uuid}`, { - body, - ...options, - }) as Core.APIPromise<{ result: Certificate }> - )._thenUnwrap((obj) => obj.result); - } - /** * Lists all mTLS root certificates. */ @@ -111,90 +78,6 @@ export class Certificates extends APIResource { options, ); } - - /** - * Deletes an mTLS certificate. - */ - delete( - uuid: string, - params?: CertificateDeleteParams, - options?: Core.RequestOptions, - ): Core.APIPromise; - delete(uuid: string, options?: Core.RequestOptions): Core.APIPromise; - delete( - uuid: string, - params: CertificateDeleteParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(params)) { - return this.delete(uuid, {}, params); - } - const { account_id, zone_id } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return ( - this._client.delete( - `/${accountOrZone}/${accountOrZoneId}/access/certificates/${uuid}`, - options, - ) as Core.APIPromise<{ result: CertificateDeleteResponse }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Fetches a single mTLS certificate. - */ - get( - uuid: string, - params?: CertificateGetParams, - options?: Core.RequestOptions, - ): Core.APIPromise; - get(uuid: string, options?: Core.RequestOptions): Core.APIPromise; - get( - uuid: string, - params: CertificateGetParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(params)) { - return this.get(uuid, {}, params); - } - const { account_id, zone_id } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return ( - this._client.get( - `/${accountOrZone}/${accountOrZoneId}/access/certificates/${uuid}`, - options, - ) as Core.APIPromise<{ result: Certificate }> - )._thenUnwrap((obj) => obj.result); - } } export class CertificatesSinglePage extends SinglePage {} @@ -237,13 +120,6 @@ export interface Certificate { updated_at?: string; } -export interface CertificateDeleteResponse { - /** - * UUID - */ - id?: string; -} - export interface CertificateCreateParams { /** * Body param: The certificate content. @@ -273,30 +149,6 @@ export interface CertificateCreateParams { associated_hostnames?: Array; } -export interface CertificateUpdateParams { - /** - * Body param: The hostnames of the applications that will use this certificate. - */ - associated_hostnames: Array; - - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: The name of the certificate. - */ - name?: string; -} - export interface CertificateListParams { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. @@ -309,40 +161,12 @@ export interface CertificateListParams { zone_id?: string; } -export interface CertificateDeleteParams { - /** - * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - */ - account_id?: string; - - /** - * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - */ - zone_id?: string; -} - -export interface CertificateGetParams { - /** - * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - */ - account_id?: string; - - /** - * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - */ - zone_id?: string; -} - export namespace Certificates { export import AssociatedHostnames = CertificatesAPI.AssociatedHostnames; export import Certificate = CertificatesAPI.Certificate; - export import CertificateDeleteResponse = CertificatesAPI.CertificateDeleteResponse; export import CertificatesSinglePage = CertificatesAPI.CertificatesSinglePage; export import CertificateCreateParams = CertificatesAPI.CertificateCreateParams; - export import CertificateUpdateParams = CertificatesAPI.CertificateUpdateParams; export import CertificateListParams = CertificatesAPI.CertificateListParams; - export import CertificateDeleteParams = CertificatesAPI.CertificateDeleteParams; - export import CertificateGetParams = CertificatesAPI.CertificateGetParams; export import Settings = SettingsAPI.Settings; export import CertificateSettings = SettingsAPI.CertificateSettings; export import SettingUpdateResponse = SettingsAPI.SettingUpdateResponse; diff --git a/src/resources/zero-trust/access/certificates/index.ts b/src/resources/zero-trust/access/certificates/index.ts index 3c2abc1cbf..848e3341be 100644 --- a/src/resources/zero-trust/access/certificates/index.ts +++ b/src/resources/zero-trust/access/certificates/index.ts @@ -3,12 +3,8 @@ export { AssociatedHostnames, Certificate, - CertificateDeleteResponse, CertificateCreateParams, - CertificateUpdateParams, CertificateListParams, - CertificateDeleteParams, - CertificateGetParams, CertificatesSinglePage, Certificates, } from './certificates'; diff --git a/src/resources/zero-trust/access/custom-pages.ts b/src/resources/zero-trust/access/custom-pages.ts index f599bbe114..dc101f810f 100644 --- a/src/resources/zero-trust/access/custom-pages.ts +++ b/src/resources/zero-trust/access/custom-pages.ts @@ -1,86 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as CustomPagesAPI from './custom-pages'; -import { SinglePage } from '../../../pagination'; -export class CustomPages extends APIResource { - /** - * Create a custom page - */ - create( - identifier: string, - body: CustomPageCreateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { - return ( - this._client.post(`/accounts/${identifier}/access/custom_pages`, { - body, - ...options, - }) as Core.APIPromise<{ result: CustomPageWithoutHTML }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Update a custom page - */ - update( - identifier: string, - uuid: string, - body: CustomPageUpdateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { - return ( - this._client.put(`/accounts/${identifier}/access/custom_pages/${uuid}`, { - body, - ...options, - }) as Core.APIPromise<{ result: CustomPageWithoutHTML }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * List custom pages - */ - list( - identifier: string, - options?: Core.RequestOptions, - ): Core.PagePromise { - return this._client.getAPIList( - `/accounts/${identifier}/access/custom_pages`, - CustomPageWithoutHTMLsSinglePage, - options, - ); - } - - /** - * Delete a custom page - */ - delete( - identifier: string, - uuid: string, - options?: Core.RequestOptions, - ): Core.APIPromise { - return ( - this._client.delete(`/accounts/${identifier}/access/custom_pages/${uuid}`, options) as Core.APIPromise<{ - result: CustomPageDeleteResponse; - }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Fetches a custom page and also returns its HTML. - */ - get(identifier: string, uuid: string, options?: Core.RequestOptions): Core.APIPromise { - return ( - this._client.get(`/accounts/${identifier}/access/custom_pages/${uuid}`, options) as Core.APIPromise<{ - result: CustomPage; - }> - )._thenUnwrap((obj) => obj.result); - } -} - -export class CustomPageWithoutHTMLsSinglePage extends SinglePage {} +export class CustomPages extends APIResource {} export interface CustomPage { /** @@ -139,62 +62,7 @@ export interface CustomPageWithoutHTML { updated_at?: string; } -export interface CustomPageDeleteResponse { - /** - * UUID - */ - id?: string; -} - -export interface CustomPageCreateParams { - /** - * Custom page HTML. - */ - custom_html: string; - - /** - * Custom page name. - */ - name: string; - - /** - * Custom page type. - */ - type: 'identity_denied' | 'forbidden'; - - /** - * Number of apps the custom page is assigned to. - */ - app_count?: number; -} - -export interface CustomPageUpdateParams { - /** - * Custom page HTML. - */ - custom_html: string; - - /** - * Custom page name. - */ - name: string; - - /** - * Custom page type. - */ - type: 'identity_denied' | 'forbidden'; - - /** - * Number of apps the custom page is assigned to. - */ - app_count?: number; -} - export namespace CustomPages { export import CustomPage = CustomPagesAPI.CustomPage; export import CustomPageWithoutHTML = CustomPagesAPI.CustomPageWithoutHTML; - export import CustomPageDeleteResponse = CustomPagesAPI.CustomPageDeleteResponse; - export import CustomPageWithoutHTMLsSinglePage = CustomPagesAPI.CustomPageWithoutHTMLsSinglePage; - export import CustomPageCreateParams = CustomPagesAPI.CustomPageCreateParams; - export import CustomPageUpdateParams = CustomPagesAPI.CustomPageUpdateParams; } diff --git a/src/resources/zero-trust/access/groups.ts b/src/resources/zero-trust/access/groups.ts index 5d135d10a5..9cc298c02a 100644 --- a/src/resources/zero-trust/access/groups.ts +++ b/src/resources/zero-trust/access/groups.ts @@ -38,39 +38,6 @@ export class Groups extends APIResource { )._thenUnwrap((obj) => obj.result); } - /** - * Updates a configured Access group. - */ - update( - uuid: string, - params: GroupUpdateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { - const { account_id, zone_id, ...body } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return ( - this._client.put(`/${accountOrZone}/${accountOrZoneId}/access/groups/${uuid}`, { - body, - ...options, - }) as Core.APIPromise<{ result: ZeroTrustGroup }> - )._thenUnwrap((obj) => obj.result); - } - /** * Lists all Access groups. */ @@ -109,86 +76,6 @@ export class Groups extends APIResource { options, ); } - - /** - * Deletes an Access group. - */ - delete( - uuid: string, - params?: GroupDeleteParams, - options?: Core.RequestOptions, - ): Core.APIPromise; - delete(uuid: string, options?: Core.RequestOptions): Core.APIPromise; - delete( - uuid: string, - params: GroupDeleteParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(params)) { - return this.delete(uuid, {}, params); - } - const { account_id, zone_id } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return ( - this._client.delete( - `/${accountOrZone}/${accountOrZoneId}/access/groups/${uuid}`, - options, - ) as Core.APIPromise<{ result: GroupDeleteResponse }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Fetches a single Access group. - */ - get(uuid: string, params?: GroupGetParams, options?: Core.RequestOptions): Core.APIPromise; - get(uuid: string, options?: Core.RequestOptions): Core.APIPromise; - get( - uuid: string, - params: GroupGetParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(params)) { - return this.get(uuid, {}, params); - } - const { account_id, zone_id } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return ( - this._client.get( - `/${accountOrZone}/${accountOrZoneId}/access/groups/${uuid}`, - options, - ) as Core.APIPromise<{ result: ZeroTrustGroup }> - )._thenUnwrap((obj) => obj.result); - } } export class ZeroTrustGroupsSinglePage extends SinglePage {} @@ -233,13 +120,6 @@ export interface ZeroTrustGroup { updated_at?: string; } -export interface GroupDeleteResponse { - /** - * UUID - */ - id?: string; -} - export interface GroupCreateParams { /** * Body param: Rules evaluated with an OR logical operator. A user needs to meet @@ -282,48 +162,6 @@ export interface GroupCreateParams { require?: Array; } -export interface GroupUpdateParams { - /** - * Body param: Rules evaluated with an OR logical operator. A user needs to meet - * only one of the Include rules. - */ - include: Array; - - /** - * Body param: The name of the Access group. - */ - name: string; - - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: Rules evaluated with a NOT logical operator. To match a policy, a - * user cannot meet any of the Exclude rules. - */ - exclude?: Array; - - /** - * Body param: Whether this is the default group - */ - is_default?: boolean; - - /** - * Body param: Rules evaluated with an AND logical operator. To match a policy, a - * user must meet all of the Require rules. - */ - require?: Array; -} - export interface GroupListParams { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. @@ -336,37 +174,9 @@ export interface GroupListParams { zone_id?: string; } -export interface GroupDeleteParams { - /** - * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - */ - account_id?: string; - - /** - * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - */ - zone_id?: string; -} - -export interface GroupGetParams { - /** - * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - */ - account_id?: string; - - /** - * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - */ - zone_id?: string; -} - export namespace Groups { export import ZeroTrustGroup = GroupsAPI.ZeroTrustGroup; - export import GroupDeleteResponse = GroupsAPI.GroupDeleteResponse; export import ZeroTrustGroupsSinglePage = GroupsAPI.ZeroTrustGroupsSinglePage; export import GroupCreateParams = GroupsAPI.GroupCreateParams; - export import GroupUpdateParams = GroupsAPI.GroupUpdateParams; export import GroupListParams = GroupsAPI.GroupListParams; - export import GroupDeleteParams = GroupsAPI.GroupDeleteParams; - export import GroupGetParams = GroupsAPI.GroupGetParams; } diff --git a/src/resources/zero-trust/access/index.ts b/src/resources/zero-trust/access/index.ts index c701f3e8c9..3360ad649d 100644 --- a/src/resources/zero-trust/access/index.ts +++ b/src/resources/zero-trust/access/index.ts @@ -23,7 +23,7 @@ export { ServiceTokenRule, Access, } from './access'; -export { AccessUser, AccessUsersSinglePage, Users } from './users/index'; +export { AccessUser, Users } from './users/index'; export { AllowedHeaders, AllowedIdPs, @@ -57,55 +57,28 @@ export { export { AssociatedHostnames, Certificate, - CertificateDeleteResponse, CertificateCreateParams, - CertificateUpdateParams, CertificateListParams, - CertificateDeleteParams, - CertificateGetParams, CertificatesSinglePage, Certificates, } from './certificates/index'; -export { - Bookmark, - BookmarkDeleteResponse, - BookmarkCreateParams, - BookmarkUpdateParams, - BookmarksSinglePage, - Bookmarks, -} from './bookmarks'; -export { - CustomPage, - CustomPageWithoutHTML, - CustomPageDeleteResponse, - CustomPageCreateParams, - CustomPageUpdateParams, - CustomPageWithoutHTMLsSinglePage, - CustomPages, -} from './custom-pages'; -export { KeyUpdateResponse, KeyGetResponse, KeyRotateResponse, KeyUpdateParams, Keys } from './keys'; +export { Bookmark, Bookmarks } from './bookmarks'; +export { CustomPage, CustomPageWithoutHTML, CustomPages } from './custom-pages'; +export { Keys } from './keys'; export { Logs } from './logs/index'; export { ServiceToken, ServiceTokenCreateResponse, - ServiceTokenRotateResponse, ServiceTokenCreateParams, - ServiceTokenUpdateParams, ServiceTokenListParams, - ServiceTokenDeleteParams, - ServiceTokenGetParams, ServiceTokensSinglePage, ServiceTokens, } from './service-tokens'; -export { Tag, TagDeleteResponse, TagCreateParams, TagUpdateParams, TagsSinglePage, Tags } from './tags'; +export { Tag, Tags } from './tags'; export { ZeroTrustGroup, - GroupDeleteResponse, GroupCreateParams, - GroupUpdateParams, GroupListParams, - GroupDeleteParams, - GroupGetParams, ZeroTrustGroupsSinglePage, Groups, } from './groups'; diff --git a/src/resources/zero-trust/access/keys.ts b/src/resources/zero-trust/access/keys.ts index 70c8151b19..2bb90ee421 100644 --- a/src/resources/zero-trust/access/keys.ts +++ b/src/resources/zero-trust/access/keys.ts @@ -1,64 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from '../../../core'; import { APIResource } from '../../../resource'; -import * as KeysAPI from './keys'; -export class Keys extends APIResource { - /** - * Updates the Access key rotation settings for an account. - */ - update( - identifier: string, - body: KeyUpdateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { - return ( - this._client.put(`/accounts/${identifier}/access/keys`, { body, ...options }) as Core.APIPromise<{ - result: KeyUpdateResponse; - }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Gets the Access key rotation settings for an account. - */ - get(identifier: string, options?: Core.RequestOptions): Core.APIPromise { - return ( - this._client.get(`/accounts/${identifier}/access/keys`, options) as Core.APIPromise<{ - result: KeyGetResponse; - }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Perfoms a key rotation for an account. - */ - rotate(identifier: string, options?: Core.RequestOptions): Core.APIPromise { - return ( - this._client.post(`/accounts/${identifier}/access/keys/rotate`, options) as Core.APIPromise<{ - result: KeyRotateResponse; - }> - )._thenUnwrap((obj) => obj.result); - } -} - -export type KeyUpdateResponse = unknown | string; - -export type KeyGetResponse = unknown | string; - -export type KeyRotateResponse = unknown | string; - -export interface KeyUpdateParams { - /** - * The number of days between key rotations. - */ - key_rotation_interval_days: number; -} - -export namespace Keys { - export import KeyUpdateResponse = KeysAPI.KeyUpdateResponse; - export import KeyGetResponse = KeysAPI.KeyGetResponse; - export import KeyRotateResponse = KeysAPI.KeyRotateResponse; - export import KeyUpdateParams = KeysAPI.KeyUpdateParams; -} +export class Keys extends APIResource {} diff --git a/src/resources/zero-trust/access/logs/access-requests.ts b/src/resources/zero-trust/access/logs/access-requests.ts index b1fe770657..57f919e34d 100644 --- a/src/resources/zero-trust/access/logs/access-requests.ts +++ b/src/resources/zero-trust/access/logs/access-requests.ts @@ -1,21 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from '../../../../core'; import { APIResource } from '../../../../resource'; import * as AccessRequestsAPI from './access-requests'; -export class AccessRequests extends APIResource { - /** - * Gets a list of Access authentication audit logs for an account. - */ - list(identifier: string, options?: Core.RequestOptions): Core.APIPromise { - return ( - this._client.get(`/accounts/${identifier}/access/logs/access_requests`, options) as Core.APIPromise<{ - result: AccessRequestListResponse | null; - }> - )._thenUnwrap((obj) => obj.result); - } -} +export class AccessRequests extends APIResource {} export interface AccessRequests { /** @@ -61,9 +49,6 @@ export interface AccessRequests { user_email?: string; } -export type AccessRequestListResponse = Array; - export namespace AccessRequests { export import AccessRequests = AccessRequestsAPI.AccessRequests; - export import AccessRequestListResponse = AccessRequestsAPI.AccessRequestListResponse; } diff --git a/src/resources/zero-trust/access/logs/index.ts b/src/resources/zero-trust/access/logs/index.ts index ec9c1f634a..b454fdb4b4 100644 --- a/src/resources/zero-trust/access/logs/index.ts +++ b/src/resources/zero-trust/access/logs/index.ts @@ -1,4 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { AccessRequests, AccessRequestListResponse } from './access-requests'; +export { AccessRequests } from './access-requests'; export { Logs } from './logs'; diff --git a/src/resources/zero-trust/access/logs/logs.ts b/src/resources/zero-trust/access/logs/logs.ts index 7480ab283e..fa67d65b57 100644 --- a/src/resources/zero-trust/access/logs/logs.ts +++ b/src/resources/zero-trust/access/logs/logs.ts @@ -9,5 +9,4 @@ export class Logs extends APIResource { export namespace Logs { export import AccessRequests = AccessRequestsAPI.AccessRequests; - export import AccessRequestListResponse = AccessRequestsAPI.AccessRequestListResponse; } diff --git a/src/resources/zero-trust/access/service-tokens.ts b/src/resources/zero-trust/access/service-tokens.ts index 6d1d0e7e30..0c52f8696a 100644 --- a/src/resources/zero-trust/access/service-tokens.ts +++ b/src/resources/zero-trust/access/service-tokens.ts @@ -42,39 +42,6 @@ export class ServiceTokens extends APIResource { )._thenUnwrap((obj) => obj.result); } - /** - * Updates a configured service token. - */ - update( - uuid: string, - params: ServiceTokenUpdateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { - const { account_id, zone_id, ...body } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return ( - this._client.put(`/${accountOrZone}/${accountOrZoneId}/access/service_tokens/${uuid}`, { - body, - ...options, - }) as Core.APIPromise<{ result: ServiceToken }> - )._thenUnwrap((obj) => obj.result); - } - /** * Lists all service tokens. */ @@ -113,118 +80,6 @@ export class ServiceTokens extends APIResource { options, ); } - - /** - * Deletes a service token. - */ - delete( - uuid: string, - params?: ServiceTokenDeleteParams, - options?: Core.RequestOptions, - ): Core.APIPromise; - delete(uuid: string, options?: Core.RequestOptions): Core.APIPromise; - delete( - uuid: string, - params: ServiceTokenDeleteParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(params)) { - return this.delete(uuid, {}, params); - } - const { account_id, zone_id } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return ( - this._client.delete( - `/${accountOrZone}/${accountOrZoneId}/access/service_tokens/${uuid}`, - options, - ) as Core.APIPromise<{ result: ServiceToken }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Fetches a single service token. - */ - get( - uuid: string, - params?: ServiceTokenGetParams, - options?: Core.RequestOptions, - ): Core.APIPromise; - get(uuid: string, options?: Core.RequestOptions): Core.APIPromise; - get( - uuid: string, - params: ServiceTokenGetParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(params)) { - return this.get(uuid, {}, params); - } - const { account_id, zone_id } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return ( - this._client.get( - `/${accountOrZone}/${accountOrZoneId}/access/service_tokens/${uuid}`, - options, - ) as Core.APIPromise<{ result: ServiceToken }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Refreshes the expiration of a service token. - */ - refresh(identifier: string, uuid: string, options?: Core.RequestOptions): Core.APIPromise { - return ( - this._client.post( - `/accounts/${identifier}/access/service_tokens/${uuid}/refresh`, - options, - ) as Core.APIPromise<{ result: ServiceToken }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Generates a new Client Secret for a service token and revokes the old one. - */ - rotate( - identifier: string, - uuid: string, - options?: Core.RequestOptions, - ): Core.APIPromise { - return ( - this._client.post( - `/accounts/${identifier}/access/service_tokens/${uuid}/rotate`, - options, - ) as Core.APIPromise<{ result: ServiceTokenRotateResponse }> - )._thenUnwrap((obj) => obj.result); - } } export class ServiceTokensSinglePage extends SinglePage {} @@ -293,41 +148,6 @@ export interface ServiceTokenCreateResponse { updated_at?: string; } -export interface ServiceTokenRotateResponse { - /** - * The ID of the service token. - */ - id?: string; - - /** - * The Client ID for the service token. Access will check for this value in the - * `CF-Access-Client-ID` request header. - */ - client_id?: string; - - /** - * The Client Secret for the service token. Access will check for this value in the - * `CF-Access-Client-Secret` request header. - */ - client_secret?: string; - - created_at?: string; - - /** - * The duration for how long the service token will be valid. Must be in the format - * `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h. The - * default is 1 year in hours (8760h). - */ - duration?: string; - - /** - * The name of the service token. - */ - name?: string; - - updated_at?: string; -} - export interface ServiceTokenCreateParams { /** * Body param: The name of the service token. @@ -354,32 +174,6 @@ export interface ServiceTokenCreateParams { duration?: string; } -export interface ServiceTokenUpdateParams { - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: The duration for how long the service token will be valid. Must be - * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, - * m, h. The default is 1 year in hours (8760h). - */ - duration?: string; - - /** - * Body param: The name of the service token. - */ - name?: string; -} - export interface ServiceTokenListParams { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. @@ -392,38 +186,10 @@ export interface ServiceTokenListParams { zone_id?: string; } -export interface ServiceTokenDeleteParams { - /** - * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - */ - account_id?: string; - - /** - * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - */ - zone_id?: string; -} - -export interface ServiceTokenGetParams { - /** - * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - */ - account_id?: string; - - /** - * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - */ - zone_id?: string; -} - export namespace ServiceTokens { export import ServiceToken = ServiceTokensAPI.ServiceToken; export import ServiceTokenCreateResponse = ServiceTokensAPI.ServiceTokenCreateResponse; - export import ServiceTokenRotateResponse = ServiceTokensAPI.ServiceTokenRotateResponse; export import ServiceTokensSinglePage = ServiceTokensAPI.ServiceTokensSinglePage; export import ServiceTokenCreateParams = ServiceTokensAPI.ServiceTokenCreateParams; - export import ServiceTokenUpdateParams = ServiceTokensAPI.ServiceTokenUpdateParams; export import ServiceTokenListParams = ServiceTokensAPI.ServiceTokenListParams; - export import ServiceTokenDeleteParams = ServiceTokensAPI.ServiceTokenDeleteParams; - export import ServiceTokenGetParams = ServiceTokensAPI.ServiceTokenGetParams; } diff --git a/src/resources/zero-trust/access/tags.ts b/src/resources/zero-trust/access/tags.ts index 9a47c958b2..b719c5b274 100644 --- a/src/resources/zero-trust/access/tags.ts +++ b/src/resources/zero-trust/access/tags.ts @@ -1,74 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as TagsAPI from './tags'; -import { SinglePage } from '../../../pagination'; -export class Tags extends APIResource { - /** - * Create a tag - */ - create(identifier: string, body: TagCreateParams, options?: Core.RequestOptions): Core.APIPromise { - return ( - this._client.post(`/accounts/${identifier}/access/tags`, { body, ...options }) as Core.APIPromise<{ - result: Tag; - }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Update a tag - */ - update( - identifier: string, - tagName: string, - body: TagUpdateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { - return ( - this._client.put(`/accounts/${identifier}/access/tags/${tagName}`, { - body, - ...options, - }) as Core.APIPromise<{ result: Tag }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * List tags - */ - list(identifier: string, options?: Core.RequestOptions): Core.PagePromise { - return this._client.getAPIList(`/accounts/${identifier}/access/tags`, TagsSinglePage, options); - } - - /** - * Delete a tag - */ - delete( - identifier: string, - name: string, - options?: Core.RequestOptions, - ): Core.APIPromise { - return ( - this._client.delete(`/accounts/${identifier}/access/tags/${name}`, options) as Core.APIPromise<{ - result: TagDeleteResponse; - }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Get a tag - */ - get(identifier: string, name: string, options?: Core.RequestOptions): Core.APIPromise { - return ( - this._client.get(`/accounts/${identifier}/access/tags/${name}`, options) as Core.APIPromise<{ - result: Tag; - }> - )._thenUnwrap((obj) => obj.result); - } -} - -export class TagsSinglePage extends SinglePage {} +export class Tags extends APIResource {} /** * A tag @@ -89,31 +24,6 @@ export interface Tag { updated_at?: string; } -export interface TagDeleteResponse { - /** - * The name of the tag - */ - name?: string; -} - -export interface TagCreateParams { - /** - * The name of the tag - */ - name: string; -} - -export interface TagUpdateParams { - /** - * The name of the tag - */ - name: string; -} - export namespace Tags { export import Tag = TagsAPI.Tag; - export import TagDeleteResponse = TagsAPI.TagDeleteResponse; - export import TagsSinglePage = TagsAPI.TagsSinglePage; - export import TagCreateParams = TagsAPI.TagCreateParams; - export import TagUpdateParams = TagsAPI.TagUpdateParams; } diff --git a/src/resources/zero-trust/access/users/active-sessions.ts b/src/resources/zero-trust/access/users/active-sessions.ts index 31178910e7..354017c029 100644 --- a/src/resources/zero-trust/access/users/active-sessions.ts +++ b/src/resources/zero-trust/access/users/active-sessions.ts @@ -1,175 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from '../../../../core'; import { APIResource } from '../../../../resource'; -import * as ActiveSessionsAPI from './active-sessions'; -import * as UserPolicyChecksAPI from '../applications/user-policy-checks'; -import { SinglePage } from '../../../../pagination'; -export class ActiveSessions extends APIResource { - /** - * Get active sessions for a single user. - */ - list( - identifier: string, - id: string, - options?: Core.RequestOptions, - ): Core.PagePromise { - return this._client.getAPIList( - `/accounts/${identifier}/access/users/${id}/active_sessions`, - ActiveSessionListResponsesSinglePage, - options, - ); - } - - /** - * Get an active session for a single user. - */ - get( - identifier: string, - id: string, - nonce: string, - options?: Core.RequestOptions, - ): Core.APIPromise { - return ( - this._client.get( - `/accounts/${identifier}/access/users/${id}/active_sessions/${nonce}`, - options, - ) as Core.APIPromise<{ result: ActiveSessionGetResponse }> - )._thenUnwrap((obj) => obj.result); - } -} - -export class ActiveSessionListResponsesSinglePage extends SinglePage {} - -export interface ActiveSessionListResponse { - expiration?: number; - - metadata?: ActiveSessionListResponse.Metadata; - - name?: string; -} - -export namespace ActiveSessionListResponse { - export interface Metadata { - apps?: Record; - - expires?: number; - - iat?: number; - - nonce?: string; - - ttl?: number; - } - - export namespace Metadata { - export interface Apps { - hostname?: string; - - name?: string; - - type?: string; - - uid?: string; - } - } -} - -export interface ActiveSessionGetResponse { - account_id?: string; - - auth_status?: string; - - common_name?: string; - - device_id?: string; - - device_sessions?: Record; - - devicePosture?: Record; - - email?: string; - - geo?: UserPolicyChecksAPI.UserPolicyCheckGeo; - - iat?: number; - - idp?: ActiveSessionGetResponse.IdP; - - ip?: string; - - is_gateway?: boolean; - - is_warp?: boolean; - - isActive?: boolean; - - mtls_auth?: ActiveSessionGetResponse.MTLSAuth; - - service_token_id?: string; - - service_token_status?: boolean; - - user_uuid?: string; - - version?: number; -} - -export namespace ActiveSessionGetResponse { - export interface DeviceSessions { - last_authenticated?: number; - } - - export interface DevicePosture { - id?: string; - - check?: DevicePosture.Check; - - data?: unknown; - - description?: string; - - error?: string; - - rule_name?: string; - - success?: boolean; - - timestamp?: string; - - type?: string; - } - - export namespace DevicePosture { - export interface Check { - exists?: boolean; - - path?: string; - } - } - - export interface IdP { - id?: string; - - type?: string; - } - - export interface MTLSAuth { - auth_status?: string; - - cert_issuer_dn?: string; - - cert_issuer_ski?: string; - - cert_presented?: boolean; - - cert_serial?: string; - } -} - -export namespace ActiveSessions { - export import ActiveSessionListResponse = ActiveSessionsAPI.ActiveSessionListResponse; - export import ActiveSessionGetResponse = ActiveSessionsAPI.ActiveSessionGetResponse; - export import ActiveSessionListResponsesSinglePage = ActiveSessionsAPI.ActiveSessionListResponsesSinglePage; -} +export class ActiveSessions extends APIResource {} diff --git a/src/resources/zero-trust/access/users/failed-logins.ts b/src/resources/zero-trust/access/users/failed-logins.ts index fcd3137144..296de81891 100644 --- a/src/resources/zero-trust/access/users/failed-logins.ts +++ b/src/resources/zero-trust/access/users/failed-logins.ts @@ -1,36 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from '../../../../core'; import { APIResource } from '../../../../resource'; -import * as FailedLoginsAPI from './failed-logins'; -import { SinglePage } from '../../../../pagination'; -export class FailedLogins extends APIResource { - /** - * Get all failed login attempts for a single user. - */ - list( - identifier: string, - id: string, - options?: Core.RequestOptions, - ): Core.PagePromise { - return this._client.getAPIList( - `/accounts/${identifier}/access/users/${id}/failed_logins`, - FailedLoginListResponsesSinglePage, - options, - ); - } -} - -export class FailedLoginListResponsesSinglePage extends SinglePage {} - -export interface FailedLoginListResponse { - expiration?: number; - - metadata?: unknown; -} - -export namespace FailedLogins { - export import FailedLoginListResponse = FailedLoginsAPI.FailedLoginListResponse; - export import FailedLoginListResponsesSinglePage = FailedLoginsAPI.FailedLoginListResponsesSinglePage; -} +export class FailedLogins extends APIResource {} diff --git a/src/resources/zero-trust/access/users/index.ts b/src/resources/zero-trust/access/users/index.ts index abbf1fdd96..559dd2384e 100644 --- a/src/resources/zero-trust/access/users/index.ts +++ b/src/resources/zero-trust/access/users/index.ts @@ -1,11 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { AccessUser, AccessUsersSinglePage, Users } from './users'; -export { - ActiveSessionListResponse, - ActiveSessionGetResponse, - ActiveSessionListResponsesSinglePage, - ActiveSessions, -} from './active-sessions'; -export { FailedLoginListResponse, FailedLoginListResponsesSinglePage, FailedLogins } from './failed-logins'; +export { AccessUser, Users } from './users'; +export { ActiveSessions } from './active-sessions'; +export { FailedLogins } from './failed-logins'; export { Identity, LastSeenIdentity } from './last-seen-identity'; diff --git a/src/resources/zero-trust/access/users/last-seen-identity.ts b/src/resources/zero-trust/access/users/last-seen-identity.ts index 7186509ed3..653416254e 100644 --- a/src/resources/zero-trust/access/users/last-seen-identity.ts +++ b/src/resources/zero-trust/access/users/last-seen-identity.ts @@ -1,23 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from '../../../../core'; import { APIResource } from '../../../../resource'; import * as LastSeenIdentityAPI from './last-seen-identity'; import * as UserPolicyChecksAPI from '../applications/user-policy-checks'; -export class LastSeenIdentity extends APIResource { - /** - * Get last seen identity for a single user. - */ - get(identifier: string, id: string, options?: Core.RequestOptions): Core.APIPromise { - return ( - this._client.get( - `/accounts/${identifier}/access/users/${id}/last_seen_identity`, - options, - ) as Core.APIPromise<{ result: Identity }> - )._thenUnwrap((obj) => obj.result); - } -} +export class LastSeenIdentity extends APIResource {} export interface Identity { account_id?: string; diff --git a/src/resources/zero-trust/access/users/users.ts b/src/resources/zero-trust/access/users/users.ts index f9471e943d..b004cadefb 100644 --- a/src/resources/zero-trust/access/users/users.ts +++ b/src/resources/zero-trust/access/users/users.ts @@ -1,12 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from '../../../../core'; import { APIResource } from '../../../../resource'; import * as UsersAPI from './users'; import * as ActiveSessionsAPI from './active-sessions'; import * as FailedLoginsAPI from './failed-logins'; import * as LastSeenIdentityAPI from './last-seen-identity'; -import { SinglePage } from '../../../../pagination'; export class Users extends APIResource { activeSessions: ActiveSessionsAPI.ActiveSessions = new ActiveSessionsAPI.ActiveSessions(this._client); @@ -14,20 +12,8 @@ export class Users extends APIResource { this._client, ); failedLogins: FailedLoginsAPI.FailedLogins = new FailedLoginsAPI.FailedLogins(this._client); - - /** - * Gets a list of users for an account. - */ - list( - identifier: string, - options?: Core.RequestOptions, - ): Core.PagePromise { - return this._client.getAPIList(`/accounts/${identifier}/access/users`, AccessUsersSinglePage, options); - } } -export class AccessUsersSinglePage extends SinglePage {} - export interface AccessUser { /** * UUID @@ -81,14 +67,8 @@ export interface AccessUser { export namespace Users { export import AccessUser = UsersAPI.AccessUser; - export import AccessUsersSinglePage = UsersAPI.AccessUsersSinglePage; export import ActiveSessions = ActiveSessionsAPI.ActiveSessions; - export import ActiveSessionListResponse = ActiveSessionsAPI.ActiveSessionListResponse; - export import ActiveSessionGetResponse = ActiveSessionsAPI.ActiveSessionGetResponse; - export import ActiveSessionListResponsesSinglePage = ActiveSessionsAPI.ActiveSessionListResponsesSinglePage; export import LastSeenIdentity = LastSeenIdentityAPI.LastSeenIdentity; export import Identity = LastSeenIdentityAPI.Identity; export import FailedLogins = FailedLoginsAPI.FailedLogins; - export import FailedLoginListResponse = FailedLoginsAPI.FailedLoginListResponse; - export import FailedLoginListResponsesSinglePage = FailedLoginsAPI.FailedLoginListResponsesSinglePage; } diff --git a/src/resources/zero-trust/identity-providers.ts b/src/resources/zero-trust/identity-providers.ts index a3a547f1fd..c003f9afec 100644 --- a/src/resources/zero-trust/identity-providers.ts +++ b/src/resources/zero-trust/identity-providers.ts @@ -40,39 +40,6 @@ export class IdentityProviders extends APIResource { )._thenUnwrap((obj) => obj.result); } - /** - * Updates a configured identity provider. - */ - update( - uuid: string, - params: IdentityProviderUpdateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { - const { account_id, zone_id, ...body } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return ( - this._client.put(`/${accountOrZone}/${accountOrZoneId}/access/identity_providers/${uuid}`, { - body, - ...options, - }) as Core.APIPromise<{ result: IdentityProvider }> - )._thenUnwrap((obj) => obj.result); - } - /** * Lists all configured identity providers. */ @@ -113,90 +80,6 @@ export class IdentityProviders extends APIResource { options, ); } - - /** - * Deletes an identity provider from Access. - */ - delete( - uuid: string, - params?: IdentityProviderDeleteParams, - options?: Core.RequestOptions, - ): Core.APIPromise; - delete(uuid: string, options?: Core.RequestOptions): Core.APIPromise; - delete( - uuid: string, - params: IdentityProviderDeleteParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(params)) { - return this.delete(uuid, {}, params); - } - const { account_id, zone_id } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return ( - this._client.delete( - `/${accountOrZone}/${accountOrZoneId}/access/identity_providers/${uuid}`, - options, - ) as Core.APIPromise<{ result: IdentityProviderDeleteResponse }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Fetches a configured identity provider. - */ - get( - uuid: string, - params?: IdentityProviderGetParams, - options?: Core.RequestOptions, - ): Core.APIPromise; - get(uuid: string, options?: Core.RequestOptions): Core.APIPromise; - get( - uuid: string, - params: IdentityProviderGetParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(params)) { - return this.get(uuid, {}, params); - } - const { account_id, zone_id } = params; - if (!account_id && !zone_id) { - throw new CloudflareError('You must provide either account_id or zone_id.'); - } - if (account_id && zone_id) { - throw new CloudflareError('You cannot provide both account_id and zone_id.'); - } - const { accountOrZone, accountOrZoneId } = - account_id ? - { - accountOrZone: 'accounts', - accountOrZoneId: account_id, - } - : { - accountOrZone: 'zones', - accountOrZoneId: zone_id, - }; - return ( - this._client.get( - `/${accountOrZone}/${accountOrZoneId}/access/identity_providers/${uuid}`, - options, - ) as Core.APIPromise<{ result: IdentityProvider }> - )._thenUnwrap((obj) => obj.result); - } } export class IdentityProviderListResponsesSinglePage extends SinglePage {} @@ -1904,13 +1787,6 @@ export namespace IdentityProviderListResponse { } } -export interface IdentityProviderDeleteResponse { - /** - * UUID - */ - id?: string; -} - export type IdentityProviderCreateParams = | IdentityProviderCreateParams.AzureAD | IdentityProviderCreateParams.AccessCentrify @@ -2850,945 +2726,6 @@ export namespace IdentityProviderCreateParams { } } -export type IdentityProviderUpdateParams = - | IdentityProviderUpdateParams.AzureAD - | IdentityProviderUpdateParams.AccessCentrify - | IdentityProviderUpdateParams.AccessFacebook - | IdentityProviderUpdateParams.AccessGitHub - | IdentityProviderUpdateParams.AccessGoogle - | IdentityProviderUpdateParams.AccessGoogleApps - | IdentityProviderUpdateParams.AccessLinkedin - | IdentityProviderUpdateParams.AccessOIDC - | IdentityProviderUpdateParams.AccessOkta - | IdentityProviderUpdateParams.AccessOnelogin - | IdentityProviderUpdateParams.AccessPingone - | IdentityProviderUpdateParams.AccessSAML - | IdentityProviderUpdateParams.AccessYandex - | IdentityProviderUpdateParams.AccessOnetimepin; - -export namespace IdentityProviderUpdateParams { - export interface AzureAD { - /** - * Body param: The configuration parameters for the identity provider. To view the - * required parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - config: IdentityProviderUpdateParams.AzureAD.Config; - - /** - * Body param: The name of the identity provider, shown to users on the login page. - */ - name: string; - - /** - * Body param: The type of identity provider. To determine the value for a specific - * provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - type: IdentityProviderTypeParam; - - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: The configuration settings for enabling a System for Cross-Domain - * Identity Management (SCIM) with the identity provider. - */ - scim_config?: ScimConfigParam; - } - - export namespace AzureAD { - /** - * The configuration parameters for the identity provider. To view the required - * parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - export interface Config { - /** - * Custom claims - */ - claims?: Array; - - /** - * Your OAuth Client ID - */ - client_id?: string; - - /** - * Your OAuth Client Secret - */ - client_secret?: string; - - /** - * Should Cloudflare try to load authentication contexts from your account - */ - conditional_access_enabled?: boolean; - - /** - * Your Azure directory uuid - */ - directory_id?: string; - - /** - * The claim name for email in the id_token response. - */ - email_claim_name?: string; - - /** - * Indicates the type of user interaction that is required. prompt=login forces the - * user to enter their credentials on that request, negating single-sign on. - * prompt=none is the opposite. It ensures that the user isn't presented with any - * interactive prompt. If the request can't be completed silently by using - * single-sign on, the Microsoft identity platform returns an interaction_required - * error. prompt=select_account interrupts single sign-on providing account - * selection experience listing all the accounts either in session or any - * remembered account or an option to choose to use a different account altogether. - */ - prompt?: 'login' | 'select_account' | 'none'; - - /** - * Should Cloudflare try to load groups from your account - */ - support_groups?: boolean; - } - } - - export interface AccessCentrify { - /** - * Body param: The configuration parameters for the identity provider. To view the - * required parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - config: IdentityProviderUpdateParams.AccessCentrify.Config; - - /** - * Body param: The name of the identity provider, shown to users on the login page. - */ - name: string; - - /** - * Body param: The type of identity provider. To determine the value for a specific - * provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - type: IdentityProviderTypeParam; - - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: The configuration settings for enabling a System for Cross-Domain - * Identity Management (SCIM) with the identity provider. - */ - scim_config?: ScimConfigParam; - } - - export namespace AccessCentrify { - /** - * The configuration parameters for the identity provider. To view the required - * parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - export interface Config { - /** - * Your centrify account url - */ - centrify_account?: string; - - /** - * Your centrify app id - */ - centrify_app_id?: string; - - /** - * Custom claims - */ - claims?: Array; - - /** - * Your OAuth Client ID - */ - client_id?: string; - - /** - * Your OAuth Client Secret - */ - client_secret?: string; - - /** - * The claim name for email in the id_token response. - */ - email_claim_name?: string; - } - } - - export interface AccessFacebook { - /** - * Body param: The configuration parameters for the identity provider. To view the - * required parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - config: GenericOAuthConfigParam; - - /** - * Body param: The name of the identity provider, shown to users on the login page. - */ - name: string; - - /** - * Body param: The type of identity provider. To determine the value for a specific - * provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - type: IdentityProviderTypeParam; - - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: The configuration settings for enabling a System for Cross-Domain - * Identity Management (SCIM) with the identity provider. - */ - scim_config?: ScimConfigParam; - } - - export interface AccessGitHub { - /** - * Body param: The configuration parameters for the identity provider. To view the - * required parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - config: GenericOAuthConfigParam; - - /** - * Body param: The name of the identity provider, shown to users on the login page. - */ - name: string; - - /** - * Body param: The type of identity provider. To determine the value for a specific - * provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - type: IdentityProviderTypeParam; - - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: The configuration settings for enabling a System for Cross-Domain - * Identity Management (SCIM) with the identity provider. - */ - scim_config?: ScimConfigParam; - } - - export interface AccessGoogle { - /** - * Body param: The configuration parameters for the identity provider. To view the - * required parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - config: IdentityProviderUpdateParams.AccessGoogle.Config; - - /** - * Body param: The name of the identity provider, shown to users on the login page. - */ - name: string; - - /** - * Body param: The type of identity provider. To determine the value for a specific - * provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - type: IdentityProviderTypeParam; - - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: The configuration settings for enabling a System for Cross-Domain - * Identity Management (SCIM) with the identity provider. - */ - scim_config?: ScimConfigParam; - } - - export namespace AccessGoogle { - /** - * The configuration parameters for the identity provider. To view the required - * parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - export interface Config { - /** - * Custom claims - */ - claims?: Array; - - /** - * Your OAuth Client ID - */ - client_id?: string; - - /** - * Your OAuth Client Secret - */ - client_secret?: string; - - /** - * The claim name for email in the id_token response. - */ - email_claim_name?: string; - } - } - - export interface AccessGoogleApps { - /** - * Body param: The configuration parameters for the identity provider. To view the - * required parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - config: IdentityProviderUpdateParams.AccessGoogleApps.Config; - - /** - * Body param: The name of the identity provider, shown to users on the login page. - */ - name: string; - - /** - * Body param: The type of identity provider. To determine the value for a specific - * provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - type: IdentityProviderTypeParam; - - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: The configuration settings for enabling a System for Cross-Domain - * Identity Management (SCIM) with the identity provider. - */ - scim_config?: ScimConfigParam; - } - - export namespace AccessGoogleApps { - /** - * The configuration parameters for the identity provider. To view the required - * parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - export interface Config { - /** - * Your companies TLD - */ - apps_domain?: string; - - /** - * Custom claims - */ - claims?: Array; - - /** - * Your OAuth Client ID - */ - client_id?: string; - - /** - * Your OAuth Client Secret - */ - client_secret?: string; - - /** - * The claim name for email in the id_token response. - */ - email_claim_name?: string; - } - } - - export interface AccessLinkedin { - /** - * Body param: The configuration parameters for the identity provider. To view the - * required parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - config: GenericOAuthConfigParam; - - /** - * Body param: The name of the identity provider, shown to users on the login page. - */ - name: string; - - /** - * Body param: The type of identity provider. To determine the value for a specific - * provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - type: IdentityProviderTypeParam; - - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: The configuration settings for enabling a System for Cross-Domain - * Identity Management (SCIM) with the identity provider. - */ - scim_config?: ScimConfigParam; - } - - export interface AccessOIDC { - /** - * Body param: The configuration parameters for the identity provider. To view the - * required parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - config: IdentityProviderUpdateParams.AccessOIDC.Config; - - /** - * Body param: The name of the identity provider, shown to users on the login page. - */ - name: string; - - /** - * Body param: The type of identity provider. To determine the value for a specific - * provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - type: IdentityProviderTypeParam; - - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: The configuration settings for enabling a System for Cross-Domain - * Identity Management (SCIM) with the identity provider. - */ - scim_config?: ScimConfigParam; - } - - export namespace AccessOIDC { - /** - * The configuration parameters for the identity provider. To view the required - * parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - export interface Config { - /** - * The authorization_endpoint URL of your IdP - */ - auth_url?: string; - - /** - * The jwks_uri endpoint of your IdP to allow the IdP keys to sign the tokens - */ - certs_url?: string; - - /** - * Custom claims - */ - claims?: Array; - - /** - * Your OAuth Client ID - */ - client_id?: string; - - /** - * Your OAuth Client Secret - */ - client_secret?: string; - - /** - * The claim name for email in the id_token response. - */ - email_claim_name?: string; - - /** - * OAuth scopes - */ - scopes?: Array; - - /** - * The token_endpoint URL of your IdP - */ - token_url?: string; - } - } - - export interface AccessOkta { - /** - * Body param: The configuration parameters for the identity provider. To view the - * required parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - config: IdentityProviderUpdateParams.AccessOkta.Config; - - /** - * Body param: The name of the identity provider, shown to users on the login page. - */ - name: string; - - /** - * Body param: The type of identity provider. To determine the value for a specific - * provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - type: IdentityProviderTypeParam; - - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: The configuration settings for enabling a System for Cross-Domain - * Identity Management (SCIM) with the identity provider. - */ - scim_config?: ScimConfigParam; - } - - export namespace AccessOkta { - /** - * The configuration parameters for the identity provider. To view the required - * parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - export interface Config { - /** - * Your okta authorization server id - */ - authorization_server_id?: string; - - /** - * Custom claims - */ - claims?: Array; - - /** - * Your OAuth Client ID - */ - client_id?: string; - - /** - * Your OAuth Client Secret - */ - client_secret?: string; - - /** - * The claim name for email in the id_token response. - */ - email_claim_name?: string; - - /** - * Your okta account url - */ - okta_account?: string; - } - } - - export interface AccessOnelogin { - /** - * Body param: The configuration parameters for the identity provider. To view the - * required parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - config: IdentityProviderUpdateParams.AccessOnelogin.Config; - - /** - * Body param: The name of the identity provider, shown to users on the login page. - */ - name: string; - - /** - * Body param: The type of identity provider. To determine the value for a specific - * provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - type: IdentityProviderTypeParam; - - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: The configuration settings for enabling a System for Cross-Domain - * Identity Management (SCIM) with the identity provider. - */ - scim_config?: ScimConfigParam; - } - - export namespace AccessOnelogin { - /** - * The configuration parameters for the identity provider. To view the required - * parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - export interface Config { - /** - * Custom claims - */ - claims?: Array; - - /** - * Your OAuth Client ID - */ - client_id?: string; - - /** - * Your OAuth Client Secret - */ - client_secret?: string; - - /** - * The claim name for email in the id_token response. - */ - email_claim_name?: string; - - /** - * Your OneLogin account url - */ - onelogin_account?: string; - } - } - - export interface AccessPingone { - /** - * Body param: The configuration parameters for the identity provider. To view the - * required parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - config: IdentityProviderUpdateParams.AccessPingone.Config; - - /** - * Body param: The name of the identity provider, shown to users on the login page. - */ - name: string; - - /** - * Body param: The type of identity provider. To determine the value for a specific - * provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - type: IdentityProviderTypeParam; - - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: The configuration settings for enabling a System for Cross-Domain - * Identity Management (SCIM) with the identity provider. - */ - scim_config?: ScimConfigParam; - } - - export namespace AccessPingone { - /** - * The configuration parameters for the identity provider. To view the required - * parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - export interface Config { - /** - * Custom claims - */ - claims?: Array; - - /** - * Your OAuth Client ID - */ - client_id?: string; - - /** - * Your OAuth Client Secret - */ - client_secret?: string; - - /** - * The claim name for email in the id_token response. - */ - email_claim_name?: string; - - /** - * Your PingOne environment identifier - */ - ping_env_id?: string; - } - } - - export interface AccessSAML { - /** - * Body param: The configuration parameters for the identity provider. To view the - * required parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - config: IdentityProviderUpdateParams.AccessSAML.Config; - - /** - * Body param: The name of the identity provider, shown to users on the login page. - */ - name: string; - - /** - * Body param: The type of identity provider. To determine the value for a specific - * provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - type: IdentityProviderTypeParam; - - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: The configuration settings for enabling a System for Cross-Domain - * Identity Management (SCIM) with the identity provider. - */ - scim_config?: ScimConfigParam; - } - - export namespace AccessSAML { - /** - * The configuration parameters for the identity provider. To view the required - * parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - export interface Config { - /** - * A list of SAML attribute names that will be added to your signed JWT token and - * can be used in SAML policy rules. - */ - attributes?: Array; - - /** - * The attribute name for email in the SAML response. - */ - email_attribute_name?: string; - - /** - * Add a list of attribute names that will be returned in the response header from - * the Access callback. - */ - header_attributes?: Array; - - /** - * X509 certificate to verify the signature in the SAML authentication response - */ - idp_public_certs?: Array; - - /** - * IdP Entity ID or Issuer URL - */ - issuer_url?: string; - - /** - * Sign the SAML authentication request with Access credentials. To verify the - * signature, use the public key from the Access certs endpoints. - */ - sign_request?: boolean; - - /** - * URL to send the SAML authentication requests to - */ - sso_target_url?: string; - } - - export namespace Config { - export interface HeaderAttribute { - /** - * attribute name from the IDP - */ - attribute_name?: string; - - /** - * header that will be added on the request to the origin - */ - header_name?: string; - } - } - } - - export interface AccessYandex { - /** - * Body param: The configuration parameters for the identity provider. To view the - * required parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - config: GenericOAuthConfigParam; - - /** - * Body param: The name of the identity provider, shown to users on the login page. - */ - name: string; - - /** - * Body param: The type of identity provider. To determine the value for a specific - * provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - type: IdentityProviderTypeParam; - - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: The configuration settings for enabling a System for Cross-Domain - * Identity Management (SCIM) with the identity provider. - */ - scim_config?: ScimConfigParam; - } - - export interface AccessOnetimepin { - /** - * Body param: The configuration parameters for the identity provider. To view the - * required parameters for a specific provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - config: unknown; - - /** - * Body param: The name of the identity provider, shown to users on the login page. - */ - name: string; - - /** - * Body param: The type of identity provider. To determine the value for a specific - * provider, refer to our - * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - */ - type: IdentityProviderTypeParam; - - /** - * Path param: The Account ID to use for this endpoint. Mutually exclusive with the - * Zone ID. - */ - account_id?: string; - - /** - * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the - * Account ID. - */ - zone_id?: string; - - /** - * Body param: The configuration settings for enabling a System for Cross-Domain - * Identity Management (SCIM) with the identity provider. - */ - scim_config?: ScimConfigParam; - } -} - export interface IdentityProviderListParams { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. @@ -3801,30 +2738,6 @@ export interface IdentityProviderListParams { zone_id?: string; } -export interface IdentityProviderDeleteParams { - /** - * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - */ - account_id?: string; - - /** - * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - */ - zone_id?: string; -} - -export interface IdentityProviderGetParams { - /** - * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - */ - account_id?: string; - - /** - * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - */ - zone_id?: string; -} - export namespace IdentityProviders { export import AzureAD = IdentityProvidersAPI.AzureAD; export import GenericOAuthConfig = IdentityProvidersAPI.GenericOAuthConfig; @@ -3832,11 +2745,7 @@ export namespace IdentityProviders { export import IdentityProviderType = IdentityProvidersAPI.IdentityProviderType; export import ScimConfig = IdentityProvidersAPI.ScimConfig; export import IdentityProviderListResponse = IdentityProvidersAPI.IdentityProviderListResponse; - export import IdentityProviderDeleteResponse = IdentityProvidersAPI.IdentityProviderDeleteResponse; export import IdentityProviderListResponsesSinglePage = IdentityProvidersAPI.IdentityProviderListResponsesSinglePage; export import IdentityProviderCreateParams = IdentityProvidersAPI.IdentityProviderCreateParams; - export import IdentityProviderUpdateParams = IdentityProvidersAPI.IdentityProviderUpdateParams; export import IdentityProviderListParams = IdentityProvidersAPI.IdentityProviderListParams; - export import IdentityProviderDeleteParams = IdentityProvidersAPI.IdentityProviderDeleteParams; - export import IdentityProviderGetParams = IdentityProvidersAPI.IdentityProviderGetParams; } diff --git a/src/resources/zero-trust/index.ts b/src/resources/zero-trust/index.ts index acf3c1cdb3..ed61e8ff7b 100644 --- a/src/resources/zero-trust/index.ts +++ b/src/resources/zero-trust/index.ts @@ -30,12 +30,8 @@ export { IdentityProviderType, ScimConfig, IdentityProviderListResponse, - IdentityProviderDeleteResponse, IdentityProviderCreateParams, - IdentityProviderUpdateParams, IdentityProviderListParams, - IdentityProviderDeleteParams, - IdentityProviderGetParams, IdentityProviderListResponsesSinglePage, IdentityProviders, } from './identity-providers'; @@ -95,5 +91,5 @@ export { RiskScoringGetParams, RiskScoring, } from './risk-scoring/index'; -export { Seat, SeatEditResponse, SeatEditParams, Seats } from './seats'; +export { Seat, Seats } from './seats'; export { ZeroTrust } from './zero-trust'; diff --git a/src/resources/zero-trust/seats.ts b/src/resources/zero-trust/seats.ts index 387affcca8..84b0574957 100644 --- a/src/resources/zero-trust/seats.ts +++ b/src/resources/zero-trust/seats.ts @@ -1,26 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from '../../core'; import { APIResource } from '../../resource'; import * as SeatsAPI from './seats'; -export class Seats extends APIResource { - /** - * Removes a user from a Zero Trust seat when both `access_seat` and `gateway_seat` - * are set to false. - */ - edit( - identifier: string, - body: SeatEditParams, - options?: Core.RequestOptions, - ): Core.APIPromise { - return ( - this._client.patch(`/accounts/${identifier}/access/seats`, { body, ...options }) as Core.APIPromise<{ - result: SeatEditResponse | null; - }> - )._thenUnwrap((obj) => obj.result); - } -} +export class Seats extends APIResource {} export interface Seat { /** @@ -43,26 +26,6 @@ export interface Seat { updated_at?: string; } -export type SeatEditResponse = Array; - -export type SeatEditParams = Array; - -export namespace SeatEditParams { - export interface Body { - /** - * True if the seat is part of Access. - */ - access_seat: boolean; - - /** - * True if the seat is part of Gateway. - */ - gateway_seat: boolean; - } -} - export namespace Seats { export import Seat = SeatsAPI.Seat; - export import SeatEditResponse = SeatsAPI.SeatEditResponse; - export import SeatEditParams = SeatsAPI.SeatEditParams; } diff --git a/src/resources/zero-trust/zero-trust.ts b/src/resources/zero-trust/zero-trust.ts index 45f05d017f..4f91cd1dc2 100644 --- a/src/resources/zero-trust/zero-trust.ts +++ b/src/resources/zero-trust/zero-trust.ts @@ -46,13 +46,9 @@ export namespace ZeroTrust { export import IdentityProviderType = IdentityProvidersAPI.IdentityProviderType; export import ScimConfig = IdentityProvidersAPI.ScimConfig; export import IdentityProviderListResponse = IdentityProvidersAPI.IdentityProviderListResponse; - export import IdentityProviderDeleteResponse = IdentityProvidersAPI.IdentityProviderDeleteResponse; export import IdentityProviderListResponsesSinglePage = IdentityProvidersAPI.IdentityProviderListResponsesSinglePage; export import IdentityProviderCreateParams = IdentityProvidersAPI.IdentityProviderCreateParams; - export import IdentityProviderUpdateParams = IdentityProvidersAPI.IdentityProviderUpdateParams; export import IdentityProviderListParams = IdentityProvidersAPI.IdentityProviderListParams; - export import IdentityProviderDeleteParams = IdentityProvidersAPI.IdentityProviderDeleteParams; - export import IdentityProviderGetParams = IdentityProvidersAPI.IdentityProviderGetParams; export import Organizations = OrganizationsAPI.Organizations; export import LoginDesign = OrganizationsAPI.LoginDesign; export import Organization = OrganizationsAPI.Organization; @@ -63,8 +59,6 @@ export namespace ZeroTrust { export import OrganizationRevokeUsersParams = OrganizationsAPI.OrganizationRevokeUsersParams; export import Seats = SeatsAPI.Seats; export import Seat = SeatsAPI.Seat; - export import SeatEditResponse = SeatsAPI.SeatEditResponse; - export import SeatEditParams = SeatsAPI.SeatEditParams; export import Access = AccessAPI.Access; export import AccessDevicePostureRule = AccessAPI.AccessDevicePostureRule; export import AccessRule = AccessAPI.AccessRule; diff --git a/tests/api-resources/ai-gateway/ai-gateway.test.ts b/tests/api-resources/ai-gateway/ai-gateway.test.ts index 80304c3da7..252fd1276d 100644 --- a/tests/api-resources/ai-gateway/ai-gateway.test.ts +++ b/tests/api-resources/ai-gateway/ai-gateway.test.ts @@ -17,6 +17,9 @@ describe('resource aiGateway', () => { cache_invalidate_on_update: true, cache_ttl: 0, collect_logs: true, + rate_limiting_interval: 0, + rate_limiting_limit: 0, + rate_limiting_technique: 'fixed', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -36,7 +39,7 @@ describe('resource aiGateway', () => { collect_logs: true, rate_limiting_interval: 0, rate_limiting_limit: 0, - rate_limiting_technique: 'string', + rate_limiting_technique: 'fixed', }); }); @@ -46,6 +49,9 @@ describe('resource aiGateway', () => { cache_invalidate_on_update: true, cache_ttl: 0, collect_logs: true, + rate_limiting_interval: 0, + rate_limiting_limit: 0, + rate_limiting_technique: 'fixed', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -64,7 +70,7 @@ describe('resource aiGateway', () => { collect_logs: true, rate_limiting_interval: 0, rate_limiting_limit: 0, - rate_limiting_technique: 'string', + rate_limiting_technique: 'fixed', }); }); @@ -90,7 +96,7 @@ describe('resource aiGateway', () => { }); test('delete: only required params', async () => { - const responsePromise = cloudflare.aiGateway.delete('my-gateway', { + const responsePromise = cloudflare.aiGateway.delete('string', { account_id: '0d37909e38d3e99c29fa2cd343ac421a', }); const rawResponse = await responsePromise.asResponse(); @@ -103,7 +109,7 @@ describe('resource aiGateway', () => { }); test('delete: required and optional params', async () => { - const response = await cloudflare.aiGateway.delete('my-gateway', { + const response = await cloudflare.aiGateway.delete('string', { account_id: '0d37909e38d3e99c29fa2cd343ac421a', }); }); diff --git a/tests/api-resources/api-gateway/configurations.test.ts b/tests/api-resources/api-gateway/configurations.test.ts new file mode 100644 index 0000000000..6db1de3a07 --- /dev/null +++ b/tests/api-resources/api-gateway/configurations.test.ts @@ -0,0 +1,52 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource configurations', () => { + test('update: only required params', async () => { + const responsePromise = cloudflare.apiGateway.configurations.update({ + zone_id: '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); + }); + + test('update: required and optional params', async () => { + const response = await cloudflare.apiGateway.configurations.update({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + auth_id_characteristics: [{ name: 'authorization', type: 'header' }], + }); + }); + + test('get: only required params', async () => { + const responsePromise = cloudflare.apiGateway.configurations.get({ + zone_id: '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); + }); + + test('get: required and optional params', async () => { + const response = await cloudflare.apiGateway.configurations.get({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + properties: ['auth_id_characteristics'], + }); + }); +}); diff --git a/tests/api-resources/zero-trust/access/users/users.test.ts b/tests/api-resources/api-gateway/discovery/discovery.test.ts similarity index 56% rename from tests/api-resources/zero-trust/access/users/users.test.ts rename to tests/api-resources/api-gateway/discovery/discovery.test.ts index f795e8681f..e3d2829f59 100644 --- a/tests/api-resources/zero-trust/access/users/users.test.ts +++ b/tests/api-resources/api-gateway/discovery/discovery.test.ts @@ -9,9 +9,11 @@ const cloudflare = new Cloudflare({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); -describe('resource users', () => { - test('list', async () => { - const responsePromise = cloudflare.zeroTrust.access.users.list('023e105f4ecef8ad9ca31a8372d0c353'); +describe('resource discovery', () => { + test('get: only required params', async () => { + const responsePromise = cloudflare.apiGateway.discovery.get({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -21,12 +23,9 @@ describe('resource users', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('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.zeroTrust.access.users.list('023e105f4ecef8ad9ca31a8372d0c353', { - path: '/_stainless_unknown_path', - }), - ).rejects.toThrow(Cloudflare.NotFoundError); + test('get: required and optional params', async () => { + const response = await cloudflare.apiGateway.discovery.get({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); }); }); diff --git a/tests/api-resources/api-gateway/discovery/operations.test.ts b/tests/api-resources/api-gateway/discovery/operations.test.ts new file mode 100644 index 0000000000..e2d982e54b --- /dev/null +++ b/tests/api-resources/api-gateway/discovery/operations.test.ts @@ -0,0 +1,62 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource operations', () => { + test('list: only required params', async () => { + const responsePromise = cloudflare.apiGateway.discovery.operations.list({ + zone_id: '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); + }); + + test('list: required and optional params', async () => { + const response = await cloudflare.apiGateway.discovery.operations.list({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + diff: true, + direction: 'desc', + endpoint: '/api/v1', + host: ['api.cloudflare.com'], + method: ['GET'], + order: 'method', + origin: 'ML', + page: {}, + per_page: {}, + state: 'review', + }); + }); + + test('edit: only required params', async () => { + const responsePromise = cloudflare.apiGateway.discovery.operations.edit( + '0d9bf70c-92e1-4bb3-9411-34a3bcc59003', + { zone_id: '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); + }); + + test('edit: required and optional params', async () => { + const response = await cloudflare.apiGateway.discovery.operations.edit( + '0d9bf70c-92e1-4bb3-9411-34a3bcc59003', + { zone_id: '023e105f4ecef8ad9ca31a8372d0c353', state: 'review' }, + ); + }); +}); diff --git a/tests/api-resources/api-gateway/operations/operations.test.ts b/tests/api-resources/api-gateway/operations/operations.test.ts new file mode 100644 index 0000000000..1e56dff57d --- /dev/null +++ b/tests/api-resources/api-gateway/operations/operations.test.ts @@ -0,0 +1,107 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource operations', () => { + test('create: only required params', async () => { + const responsePromise = cloudflare.apiGateway.operations.create({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + body: [ + { endpoint: '/api/v1/users/{var1}', host: 'www.example.com', method: 'GET' }, + { endpoint: '/api/v1/users/{var1}', host: 'www.example.com', method: 'GET' }, + { endpoint: '/api/v1/users/{var1}', host: 'www.example.com', method: 'GET' }, + ], + }); + 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('create: required and optional params', async () => { + const response = await cloudflare.apiGateway.operations.create({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + body: [ + { endpoint: '/api/v1/users/{var1}', host: 'www.example.com', method: 'GET' }, + { endpoint: '/api/v1/users/{var1}', host: 'www.example.com', method: 'GET' }, + { endpoint: '/api/v1/users/{var1}', host: 'www.example.com', method: 'GET' }, + ], + }); + }); + + test('list: only required params', async () => { + const responsePromise = cloudflare.apiGateway.operations.list({ + zone_id: '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); + }); + + test('list: required and optional params', async () => { + const response = await cloudflare.apiGateway.operations.list({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + direction: 'desc', + endpoint: '/api/v1', + feature: ['thresholds'], + host: ['api.cloudflare.com'], + method: ['GET'], + order: 'method', + page: {}, + per_page: 5, + }); + }); + + test('delete: only required params', async () => { + const responsePromise = cloudflare.apiGateway.operations.delete('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { + zone_id: '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); + }); + + test('delete: required and optional params', async () => { + const response = await cloudflare.apiGateway.operations.delete('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); + + test('get: only required params', async () => { + const responsePromise = cloudflare.apiGateway.operations.get('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { + zone_id: '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); + }); + + test('get: required and optional params', async () => { + const response = await cloudflare.apiGateway.operations.get('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + feature: ['thresholds'], + }); + }); +}); diff --git a/tests/api-resources/api-gateway/operations/schema-validation.test.ts b/tests/api-resources/api-gateway/operations/schema-validation.test.ts new file mode 100644 index 0000000000..09209477dc --- /dev/null +++ b/tests/api-resources/api-gateway/operations/schema-validation.test.ts @@ -0,0 +1,81 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource schemaValidation', () => { + test('update: only required params', async () => { + const responsePromise = cloudflare.apiGateway.operations.schemaValidation.update( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { zone_id: '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); + }); + + test('update: required and optional params', async () => { + const response = await cloudflare.apiGateway.operations.schemaValidation.update( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { zone_id: '023e105f4ecef8ad9ca31a8372d0c353', mitigation_action: 'block' }, + ); + }); + + test('edit: only required params', async () => { + const responsePromise = cloudflare.apiGateway.operations.schemaValidation.edit({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + settings_multiple_request: { + '3818d821-5901-4147-a474-f5f5aec1d54e': {}, + 'b17c8043-99a0-4202-b7d9-8f7cdbee02cd': {}, + }, + }); + 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('edit: required and optional params', async () => { + const response = await cloudflare.apiGateway.operations.schemaValidation.edit({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + settings_multiple_request: { + '3818d821-5901-4147-a474-f5f5aec1d54e': { mitigation_action: 'log' }, + 'b17c8043-99a0-4202-b7d9-8f7cdbee02cd': { mitigation_action: 'block' }, + }, + }); + }); + + test('get: only required params', async () => { + const responsePromise = cloudflare.apiGateway.operations.schemaValidation.get( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { zone_id: '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); + }); + + test('get: required and optional params', async () => { + const response = await cloudflare.apiGateway.operations.schemaValidation.get( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, + ); + }); +}); diff --git a/tests/api-resources/zero-trust/access/logs/access-requests.test.ts b/tests/api-resources/api-gateway/schema-validation.test.ts similarity index 54% rename from tests/api-resources/zero-trust/access/logs/access-requests.test.ts rename to tests/api-resources/api-gateway/schema-validation.test.ts index 94214bddd9..fd0ea78112 100644 --- a/tests/api-resources/zero-trust/access/logs/access-requests.test.ts +++ b/tests/api-resources/api-gateway/schema-validation.test.ts @@ -9,11 +9,11 @@ const cloudflare = new Cloudflare({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); -describe('resource accessRequests', () => { - test('list', async () => { - const responsePromise = cloudflare.zeroTrust.access.logs.accessRequests.list( - '023e105f4ecef8ad9ca31a8372d0c353', - ); +describe('resource schemaValidation', () => { + test('edit: only required params', async () => { + const responsePromise = cloudflare.apiGateway.schemaValidation.edit({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -23,12 +23,11 @@ describe('resource accessRequests', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('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.zeroTrust.access.logs.accessRequests.list('023e105f4ecef8ad9ca31a8372d0c353', { - path: '/_stainless_unknown_path', - }), - ).rejects.toThrow(Cloudflare.NotFoundError); + test('edit: required and optional params', async () => { + const response = await cloudflare.apiGateway.schemaValidation.edit({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + validation_default_mitigation_action: 'block', + validation_override_mitigation_action: 'none', + }); }); }); diff --git a/tests/api-resources/api-gateway/schemas.test.ts b/tests/api-resources/api-gateway/schemas.test.ts new file mode 100644 index 0000000000..56d4e47af0 --- /dev/null +++ b/tests/api-resources/api-gateway/schemas.test.ts @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource schemas', () => { + test('list: only required params', async () => { + const responsePromise = cloudflare.apiGateway.schemas.list({ + zone_id: '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); + }); + + test('list: required and optional params', async () => { + const response = await cloudflare.apiGateway.schemas.list({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + feature: ['thresholds'], + host: ['www.example.com'], + }); + }); +}); diff --git a/tests/api-resources/api-gateway/settings/schema-validation.test.ts b/tests/api-resources/api-gateway/settings/schema-validation.test.ts new file mode 100644 index 0000000000..c57bcf2868 --- /dev/null +++ b/tests/api-resources/api-gateway/settings/schema-validation.test.ts @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource schemaValidation', () => { + test('update: only required params', async () => { + const responsePromise = cloudflare.apiGateway.settings.schemaValidation.update({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + validation_default_mitigation_action: 'block', + }); + 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('update: required and optional params', async () => { + const response = await cloudflare.apiGateway.settings.schemaValidation.update({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + validation_default_mitigation_action: 'block', + validation_override_mitigation_action: 'none', + }); + }); + + test('get: only required params', async () => { + const responsePromise = cloudflare.apiGateway.settings.schemaValidation.get({ + zone_id: '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); + }); + + test('get: required and optional params', async () => { + const response = await cloudflare.apiGateway.settings.schemaValidation.get({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); +}); diff --git a/tests/api-resources/zero-trust/access/users/failed-logins.test.ts b/tests/api-resources/api-gateway/user-schemas/operations.test.ts similarity index 54% rename from tests/api-resources/zero-trust/access/users/failed-logins.test.ts rename to tests/api-resources/api-gateway/user-schemas/operations.test.ts index ff222f220a..c0bd4403fb 100644 --- a/tests/api-resources/zero-trust/access/users/failed-logins.test.ts +++ b/tests/api-resources/api-gateway/user-schemas/operations.test.ts @@ -9,11 +9,11 @@ const cloudflare = new Cloudflare({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); -describe('resource failedLogins', () => { - test('list', async () => { - const responsePromise = cloudflare.zeroTrust.access.users.failedLogins.list( - '023e105f4ecef8ad9ca31a8372d0c353', +describe('resource operations', () => { + test('list: only required params', async () => { + const responsePromise = cloudflare.apiGateway.userSchemas.operations.list( 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -24,14 +24,19 @@ describe('resource failedLogins', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('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.zeroTrust.access.users.failedLogins.list( - '023e105f4ecef8ad9ca31a8372d0c353', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Cloudflare.NotFoundError); + test('list: required and optional params', async () => { + const response = await cloudflare.apiGateway.userSchemas.operations.list( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + endpoint: '/api/v1', + feature: ['thresholds'], + host: ['api.cloudflare.com'], + method: ['GET'], + operation_status: 'new', + page: {}, + per_page: {}, + }, + ); }); }); diff --git a/tests/api-resources/api-gateway/user-schemas/user-schemas.test.ts b/tests/api-resources/api-gateway/user-schemas/user-schemas.test.ts new file mode 100644 index 0000000000..55f16e3dec --- /dev/null +++ b/tests/api-resources/api-gateway/user-schemas/user-schemas.test.ts @@ -0,0 +1,119 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare, { toFile } from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource userSchemas', () => { + test('create: only required params', async () => { + const responsePromise = cloudflare.apiGateway.userSchemas.create({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + file: await toFile(Buffer.from('# my file contents'), 'README.md'), + kind: 'openapi_v3', + }); + 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('create: required and optional params', async () => { + const response = await cloudflare.apiGateway.userSchemas.create({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + file: await toFile(Buffer.from('# my file contents'), 'README.md'), + kind: 'openapi_v3', + name: 'petstore schema', + validation_enabled: 'true', + }); + }); + + test('list: only required params', async () => { + const responsePromise = cloudflare.apiGateway.userSchemas.list({ + zone_id: '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); + }); + + test('list: required and optional params', async () => { + const response = await cloudflare.apiGateway.userSchemas.list({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + omit_source: true, + page: {}, + per_page: {}, + validation_enabled: true, + }); + }); + + test('delete: only required params', async () => { + const responsePromise = cloudflare.apiGateway.userSchemas.delete('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { + zone_id: '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); + }); + + test('delete: required and optional params', async () => { + const response = await cloudflare.apiGateway.userSchemas.delete('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); + + test('edit: only required params', async () => { + const responsePromise = cloudflare.apiGateway.userSchemas.edit('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { + zone_id: '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); + }); + + test('edit: required and optional params', async () => { + const response = await cloudflare.apiGateway.userSchemas.edit('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + validation_enabled: true, + }); + }); + + test('get: only required params', async () => { + const responsePromise = cloudflare.apiGateway.userSchemas.get('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { + zone_id: '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); + }); + + test('get: required and optional params', async () => { + const response = await cloudflare.apiGateway.userSchemas.get('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + omit_source: true, + }); + }); +}); diff --git a/tests/api-resources/cache/cache.test.ts b/tests/api-resources/cache/cache.test.ts index df8a22b8c7..b99c19abde 100644 --- a/tests/api-resources/cache/cache.test.ts +++ b/tests/api-resources/cache/cache.test.ts @@ -22,6 +22,9 @@ describe('resource cache', () => { }); test('purge: required and optional params', async () => { - const response = await cloudflare.cache.purge({ zone_id: 'string', tags: ['some-tag', 'another-tag'] }); + const response = await cloudflare.cache.purge({ + zone_id: 'string', + tags: ['a-cache-tag', 'another-cache-tag'], + }); }); }); diff --git a/tests/api-resources/d1/database.test.ts b/tests/api-resources/d1/database.test.ts index c13216b1b2..4f36048f8a 100644 --- a/tests/api-resources/d1/database.test.ts +++ b/tests/api-resources/d1/database.test.ts @@ -110,4 +110,26 @@ describe('resource database', () => { params: ['firstParam', 'secondParam'], }); }); + + test('raw: only required params', async () => { + const responsePromise = cloudflare.d1.database.raw('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + sql: 'SELECT * FROM myTable WHERE field = ? OR field = ?;', + }); + 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('raw: required and optional params', async () => { + const response = await cloudflare.d1.database.raw('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + sql: 'SELECT * FROM myTable WHERE field = ? OR field = ?;', + params: ['firstParam', 'secondParam'], + }); + }); }); diff --git a/tests/api-resources/kv/namespaces/namespaces.test.ts b/tests/api-resources/kv/namespaces/namespaces.test.ts index 4c16d9b42d..1816b3f4f1 100644 --- a/tests/api-resources/kv/namespaces/namespaces.test.ts +++ b/tests/api-resources/kv/namespaces/namespaces.test.ts @@ -91,4 +91,23 @@ describe('resource namespaces', () => { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); }); + + test('get: only required params', async () => { + const responsePromise = cloudflare.kv.namespaces.get('0f2ac74b498b48028cb68387c421e279', { + account_id: '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); + }); + + test('get: required and optional params', async () => { + const response = await cloudflare.kv.namespaces.get('0f2ac74b498b48028cb68387c421e279', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); }); diff --git a/tests/api-resources/r2/buckets.test.ts b/tests/api-resources/r2/buckets.test.ts index 0dceadeb95..5ae4693ccd 100644 --- a/tests/api-resources/r2/buckets.test.ts +++ b/tests/api-resources/r2/buckets.test.ts @@ -29,6 +29,7 @@ describe('resource buckets', () => { account_id: '023e105f4ecef8ad9ca31a8372d0c353', name: 'example-bucket', locationHint: 'apac', + storageClass: 'Standard', }); }); diff --git a/tests/api-resources/zero-trust/access/users/last-seen-identity.test.ts b/tests/api-resources/radar/bgp/ips.test.ts similarity index 52% rename from tests/api-resources/zero-trust/access/users/last-seen-identity.test.ts rename to tests/api-resources/radar/bgp/ips.test.ts index 96b296c3d2..28dab69c29 100644 --- a/tests/api-resources/zero-trust/access/users/last-seen-identity.test.ts +++ b/tests/api-resources/radar/bgp/ips.test.ts @@ -9,12 +9,9 @@ const cloudflare = new Cloudflare({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); -describe('resource lastSeenIdentity', () => { - test('get', async () => { - const responsePromise = cloudflare.zeroTrust.access.users.lastSeenIdentity.get( - '023e105f4ecef8ad9ca31a8372d0c353', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - ); +describe('resource ips', () => { + test('timeseries', async () => { + const responsePromise = cloudflare.radar.bgp.ips.timeseries(); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -24,12 +21,27 @@ describe('resource lastSeenIdentity', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('get: request options instead of params are passed correctly', async () => { + test('timeseries: 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.radar.bgp.ips.timeseries({ path: '/_stainless_unknown_path' })).rejects.toThrow( + Cloudflare.NotFoundError, + ); + }); + + test('timeseries: 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.zeroTrust.access.users.lastSeenIdentity.get( - '023e105f4ecef8ad9ca31a8372d0c353', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + cloudflare.radar.bgp.ips.timeseries( + { + asn: '174,7922', + dateEnd: '2023-09-01T11:41:33.782Z', + dateRange: '7d', + dateStart: '2023-09-01T11:41:33.782Z', + format: 'JSON', + includeDelay: true, + location: 'US,CA', + name: ['string', 'string', 'string'], + }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Cloudflare.NotFoundError); diff --git a/tests/api-resources/radar/bgp/routes.test.ts b/tests/api-resources/radar/bgp/routes.test.ts index ff1762a7ad..62aa761ca5 100644 --- a/tests/api-resources/radar/bgp/routes.test.ts +++ b/tests/api-resources/radar/bgp/routes.test.ts @@ -93,40 +93,4 @@ describe('resource routes', () => { ), ).rejects.toThrow(Cloudflare.NotFoundError); }); - - test('timeseries', async () => { - const responsePromise = cloudflare.radar.bgp.routes.timeseries(); - 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('timeseries: 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.radar.bgp.routes.timeseries({ path: '/_stainless_unknown_path' }), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); - - test('timeseries: 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.radar.bgp.routes.timeseries( - { - asn: 174, - dateEnd: '2023-09-01T11:41:33.782Z', - dateRange: '7d', - dateStart: '2023-09-01T11:41:33.782Z', - format: 'JSON', - includeDelay: true, - location: 'US', - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); }); diff --git a/tests/api-resources/zero-trust/access/applications/cas.test.ts b/tests/api-resources/zero-trust/access/applications/cas.test.ts index 553c9af20e..6167d7fed3 100644 --- a/tests/api-resources/zero-trust/access/applications/cas.test.ts +++ b/tests/api-resources/zero-trust/access/applications/cas.test.ts @@ -10,21 +10,6 @@ const cloudflare = new Cloudflare({ }); describe('resource cas', () => { - // TODO: investigate broken test - test.skip('create', async () => { - const responsePromise = cloudflare.zeroTrust.access.applications.cas.create( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: 'string' }, - ); - 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); - }); - // TODO: investigate broken test test.skip('list', async () => { const responsePromise = cloudflare.zeroTrust.access.applications.cas.list({ account_id: 'string' }); @@ -36,34 +21,4 @@ describe('resource cas', () => { expect(dataAndResponse.data).toBe(response); expect(dataAndResponse.response).toBe(rawResponse); }); - - // TODO: investigate broken test - test.skip('delete', async () => { - const responsePromise = cloudflare.zeroTrust.access.applications.cas.delete( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: 'string' }, - ); - 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); - }); - - // TODO: investigate broken test - test.skip('get', async () => { - const responsePromise = cloudflare.zeroTrust.access.applications.cas.get( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: 'string' }, - ); - 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); - }); }); diff --git a/tests/api-resources/zero-trust/access/applications/policies.test.ts b/tests/api-resources/zero-trust/access/applications/policies.test.ts deleted file mode 100644 index a9e9830136..0000000000 --- a/tests/api-resources/zero-trust/access/applications/policies.test.ts +++ /dev/null @@ -1,199 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import Cloudflare from 'cloudflare'; -import { Response } from 'node-fetch'; - -const cloudflare = new Cloudflare({ - apiKey: '144c9defac04969c7bfad8efaa8ea194', - apiEmail: 'user@example.com', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); - -describe('resource policies', () => { - // TODO: investigate broken test - test.skip('create: only required params', async () => { - const responsePromise = cloudflare.zeroTrust.access.applications.policies.create( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { - decision: 'allow', - include: [ - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - ], - name: 'Allow devs', - account_id: 'string', - }, - ); - 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); - }); - - // TODO: investigate broken test - test.skip('create: required and optional params', async () => { - const response = await cloudflare.zeroTrust.access.applications.policies.create( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { - decision: 'allow', - include: [ - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - ], - name: 'Allow devs', - account_id: 'string', - approval_groups: [ - { - approvals_needed: 1, - email_addresses: ['test1@cloudflare.com', 'test2@cloudflare.com'], - email_list_uuid: 'string', - }, - { - approvals_needed: 3, - email_addresses: ['test@cloudflare.com', 'test2@cloudflare.com'], - email_list_uuid: '597147a1-976b-4ef2-9af0-81d5d007fc34', - }, - ], - approval_required: true, - exclude: [ - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - ], - isolation_required: false, - precedence: 0, - purpose_justification_prompt: 'Please enter a justification for entering this protected domain.', - purpose_justification_required: true, - require: [ - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - ], - session_duration: '24h', - }, - ); - }); - - // TODO: investigate broken test - test.skip('update: only required params', async () => { - const responsePromise = cloudflare.zeroTrust.access.applications.policies.update( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { - decision: 'allow', - include: [ - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - ], - name: 'Allow devs', - account_id: 'string', - }, - ); - 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); - }); - - // TODO: investigate broken test - test.skip('update: required and optional params', async () => { - const response = await cloudflare.zeroTrust.access.applications.policies.update( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { - decision: 'allow', - include: [ - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - ], - name: 'Allow devs', - account_id: 'string', - approval_groups: [ - { - approvals_needed: 1, - email_addresses: ['test1@cloudflare.com', 'test2@cloudflare.com'], - email_list_uuid: 'string', - }, - { - approvals_needed: 3, - email_addresses: ['test@cloudflare.com', 'test2@cloudflare.com'], - email_list_uuid: '597147a1-976b-4ef2-9af0-81d5d007fc34', - }, - ], - approval_required: true, - exclude: [ - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - ], - isolation_required: false, - precedence: 0, - purpose_justification_prompt: 'Please enter a justification for entering this protected domain.', - purpose_justification_required: true, - require: [ - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - ], - session_duration: '24h', - }, - ); - }); - - // TODO: investigate broken test - test.skip('list', async () => { - const responsePromise = cloudflare.zeroTrust.access.applications.policies.list( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: 'string' }, - ); - 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); - }); - - // TODO: investigate broken test - test.skip('delete', async () => { - const responsePromise = cloudflare.zeroTrust.access.applications.policies.delete( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: 'string' }, - ); - 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); - }); - - // TODO: investigate broken test - test.skip('get', async () => { - const responsePromise = cloudflare.zeroTrust.access.applications.policies.get( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: 'string' }, - ); - 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); - }); -}); diff --git a/tests/api-resources/zero-trust/access/bookmarks.test.ts b/tests/api-resources/zero-trust/access/bookmarks.test.ts deleted file mode 100644 index b4e309c381..0000000000 --- a/tests/api-resources/zero-trust/access/bookmarks.test.ts +++ /dev/null @@ -1,128 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import Cloudflare from 'cloudflare'; -import { Response } from 'node-fetch'; - -const cloudflare = new Cloudflare({ - apiKey: '144c9defac04969c7bfad8efaa8ea194', - apiEmail: 'user@example.com', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); - -describe('resource bookmarks', () => { - test('create: only required params', async () => { - const responsePromise = cloudflare.zeroTrust.access.bookmarks.create( - '699d98642c564d2e855e9661899b7252', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - {}, - ); - 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('create: required and optional params', async () => { - const response = await cloudflare.zeroTrust.access.bookmarks.create( - '699d98642c564d2e855e9661899b7252', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - {}, - ); - }); - - test('update: only required params', async () => { - const responsePromise = cloudflare.zeroTrust.access.bookmarks.update( - '699d98642c564d2e855e9661899b7252', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - {}, - ); - 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('update: required and optional params', async () => { - const response = await cloudflare.zeroTrust.access.bookmarks.update( - '699d98642c564d2e855e9661899b7252', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - {}, - ); - }); - - test('list', async () => { - const responsePromise = cloudflare.zeroTrust.access.bookmarks.list('699d98642c564d2e855e9661899b7252'); - 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('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.zeroTrust.access.bookmarks.list('699d98642c564d2e855e9661899b7252', { - path: '/_stainless_unknown_path', - }), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); - - test('delete', async () => { - const responsePromise = cloudflare.zeroTrust.access.bookmarks.delete( - '699d98642c564d2e855e9661899b7252', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - ); - 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('delete: 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.zeroTrust.access.bookmarks.delete( - '699d98642c564d2e855e9661899b7252', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); - - test('get', async () => { - const responsePromise = cloudflare.zeroTrust.access.bookmarks.get( - '699d98642c564d2e855e9661899b7252', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - ); - 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('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.zeroTrust.access.bookmarks.get( - '699d98642c564d2e855e9661899b7252', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); -}); diff --git a/tests/api-resources/zero-trust/access/certificates/certificates.test.ts b/tests/api-resources/zero-trust/access/certificates/certificates.test.ts index 1e779d2b5c..d07c9fa9f3 100644 --- a/tests/api-resources/zero-trust/access/certificates/certificates.test.ts +++ b/tests/api-resources/zero-trust/access/certificates/certificates.test.ts @@ -38,36 +38,6 @@ describe('resource certificates', () => { }); }); - // TODO: investigate broken test - test.skip('update: only required params', async () => { - const responsePromise = cloudflare.zeroTrust.access.certificates.update( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { - associated_hostnames: ['admin.example.com', 'admin.example.com', 'admin.example.com'], - account_id: 'string', - }, - ); - 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); - }); - - // TODO: investigate broken test - test.skip('update: required and optional params', async () => { - const response = await cloudflare.zeroTrust.access.certificates.update( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { - associated_hostnames: ['admin.example.com', 'admin.example.com', 'admin.example.com'], - account_id: 'string', - name: 'Allow devs', - }, - ); - }); - // TODO: investigate broken test test.skip('list', async () => { const responsePromise = cloudflare.zeroTrust.access.certificates.list({ account_id: 'string' }); @@ -79,34 +49,4 @@ describe('resource certificates', () => { expect(dataAndResponse.data).toBe(response); expect(dataAndResponse.response).toBe(rawResponse); }); - - // TODO: investigate broken test - test.skip('delete', async () => { - const responsePromise = cloudflare.zeroTrust.access.certificates.delete( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: 'string' }, - ); - 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); - }); - - // TODO: investigate broken test - test.skip('get', async () => { - const responsePromise = cloudflare.zeroTrust.access.certificates.get( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: 'string' }, - ); - 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); - }); }); diff --git a/tests/api-resources/zero-trust/access/custom-pages.test.ts b/tests/api-resources/zero-trust/access/custom-pages.test.ts deleted file mode 100644 index 6c50153ce9..0000000000 --- a/tests/api-resources/zero-trust/access/custom-pages.test.ts +++ /dev/null @@ -1,144 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import Cloudflare from 'cloudflare'; -import { Response } from 'node-fetch'; - -const cloudflare = new Cloudflare({ - apiKey: '144c9defac04969c7bfad8efaa8ea194', - apiEmail: 'user@example.com', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); - -describe('resource customPages', () => { - test('create: only required params', async () => { - const responsePromise = cloudflare.zeroTrust.access.customPages.create( - '023e105f4ecef8ad9ca31a8372d0c353', - { - custom_html: '

Access Denied

', - name: 'string', - type: 'identity_denied', - }, - ); - 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('create: required and optional params', async () => { - const response = await cloudflare.zeroTrust.access.customPages.create( - '023e105f4ecef8ad9ca31a8372d0c353', - { - custom_html: '

Access Denied

', - name: 'string', - type: 'identity_denied', - app_count: 0, - }, - ); - }); - - test('update: only required params', async () => { - const responsePromise = cloudflare.zeroTrust.access.customPages.update( - '023e105f4ecef8ad9ca31a8372d0c353', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { - custom_html: '

Access Denied

', - name: 'string', - type: 'identity_denied', - }, - ); - 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('update: required and optional params', async () => { - const response = await cloudflare.zeroTrust.access.customPages.update( - '023e105f4ecef8ad9ca31a8372d0c353', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { - custom_html: '

Access Denied

', - name: 'string', - type: 'identity_denied', - app_count: 0, - }, - ); - }); - - test('list', async () => { - const responsePromise = cloudflare.zeroTrust.access.customPages.list('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); - }); - - test('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.zeroTrust.access.customPages.list('023e105f4ecef8ad9ca31a8372d0c353', { - path: '/_stainless_unknown_path', - }), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); - - test('delete', async () => { - const responsePromise = cloudflare.zeroTrust.access.customPages.delete( - '023e105f4ecef8ad9ca31a8372d0c353', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - ); - 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('delete: 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.zeroTrust.access.customPages.delete( - '023e105f4ecef8ad9ca31a8372d0c353', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); - - test('get', async () => { - const responsePromise = cloudflare.zeroTrust.access.customPages.get( - '023e105f4ecef8ad9ca31a8372d0c353', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - ); - 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('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.zeroTrust.access.customPages.get( - '023e105f4ecef8ad9ca31a8372d0c353', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); -}); diff --git a/tests/api-resources/zero-trust/access/groups.test.ts b/tests/api-resources/zero-trust/access/groups.test.ts index 3f26bfeba1..6e4de3e912 100644 --- a/tests/api-resources/zero-trust/access/groups.test.ts +++ b/tests/api-resources/zero-trust/access/groups.test.ts @@ -54,53 +54,6 @@ describe('resource groups', () => { }); }); - // TODO: investigate broken test - test.skip('update: only required params', async () => { - const responsePromise = cloudflare.zeroTrust.access.groups.update( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { - include: [ - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - ], - name: 'Allow devs', - account_id: 'string', - }, - ); - 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); - }); - - // TODO: investigate broken test - test.skip('update: required and optional params', async () => { - const response = await cloudflare.zeroTrust.access.groups.update('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { - include: [ - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - ], - name: 'Allow devs', - account_id: 'string', - exclude: [ - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - ], - is_default: true, - require: [ - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - { email: { email: 'test@example.com' } }, - ], - }); - }); - // TODO: investigate broken test test.skip('list', async () => { const responsePromise = cloudflare.zeroTrust.access.groups.list({ account_id: 'string' }); @@ -112,33 +65,4 @@ describe('resource groups', () => { expect(dataAndResponse.data).toBe(response); expect(dataAndResponse.response).toBe(rawResponse); }); - - // TODO: investigate broken test - test.skip('delete', async () => { - const responsePromise = cloudflare.zeroTrust.access.groups.delete( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: 'string' }, - ); - 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); - }); - - // TODO: investigate broken test - test.skip('get', async () => { - const responsePromise = cloudflare.zeroTrust.access.groups.get('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { - account_id: 'string', - }); - 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); - }); }); diff --git a/tests/api-resources/zero-trust/access/keys.test.ts b/tests/api-resources/zero-trust/access/keys.test.ts deleted file mode 100644 index dacc709690..0000000000 --- a/tests/api-resources/zero-trust/access/keys.test.ts +++ /dev/null @@ -1,71 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import Cloudflare from 'cloudflare'; -import { Response } from 'node-fetch'; - -const cloudflare = new Cloudflare({ - apiKey: '144c9defac04969c7bfad8efaa8ea194', - apiEmail: 'user@example.com', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); - -describe('resource keys', () => { - test('update: only required params', async () => { - const responsePromise = cloudflare.zeroTrust.access.keys.update('023e105f4ecef8ad9ca31a8372d0c353', { - key_rotation_interval_days: 30, - }); - 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('update: required and optional params', async () => { - const response = await cloudflare.zeroTrust.access.keys.update('023e105f4ecef8ad9ca31a8372d0c353', { - key_rotation_interval_days: 30, - }); - }); - - test('get', async () => { - const responsePromise = cloudflare.zeroTrust.access.keys.get('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); - }); - - test('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.zeroTrust.access.keys.get('023e105f4ecef8ad9ca31a8372d0c353', { - path: '/_stainless_unknown_path', - }), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); - - test('rotate', async () => { - const responsePromise = cloudflare.zeroTrust.access.keys.rotate('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); - }); - - test('rotate: 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.zeroTrust.access.keys.rotate('023e105f4ecef8ad9ca31a8372d0c353', { - path: '/_stainless_unknown_path', - }), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); -}); diff --git a/tests/api-resources/zero-trust/access/service-tokens.test.ts b/tests/api-resources/zero-trust/access/service-tokens.test.ts index cdaa6d5da8..deda8ffb7b 100644 --- a/tests/api-resources/zero-trust/access/service-tokens.test.ts +++ b/tests/api-resources/zero-trust/access/service-tokens.test.ts @@ -34,21 +34,6 @@ describe('resource serviceTokens', () => { }); }); - // TODO: investigate broken test - test.skip('update', async () => { - const responsePromise = cloudflare.zeroTrust.access.serviceTokens.update( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: 'string' }, - ); - 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); - }); - // TODO: investigate broken test test.skip('list', async () => { const responsePromise = cloudflare.zeroTrust.access.serviceTokens.list({ account_id: 'string' }); @@ -60,84 +45,4 @@ describe('resource serviceTokens', () => { expect(dataAndResponse.data).toBe(response); expect(dataAndResponse.response).toBe(rawResponse); }); - - // TODO: investigate broken test - test.skip('delete', async () => { - const responsePromise = cloudflare.zeroTrust.access.serviceTokens.delete( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: 'string' }, - ); - 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); - }); - - // TODO: investigate broken test - test.skip('get', async () => { - const responsePromise = cloudflare.zeroTrust.access.serviceTokens.get( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: 'string' }, - ); - 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('refresh', async () => { - const responsePromise = cloudflare.zeroTrust.access.serviceTokens.refresh( - '023e105f4ecef8ad9ca31a8372d0c353', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - ); - 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('refresh: 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.zeroTrust.access.serviceTokens.refresh( - '023e105f4ecef8ad9ca31a8372d0c353', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); - - test('rotate', async () => { - const responsePromise = cloudflare.zeroTrust.access.serviceTokens.rotate( - '023e105f4ecef8ad9ca31a8372d0c353', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - ); - 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('rotate: 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.zeroTrust.access.serviceTokens.rotate( - '023e105f4ecef8ad9ca31a8372d0c353', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); }); diff --git a/tests/api-resources/zero-trust/access/tags.test.ts b/tests/api-resources/zero-trust/access/tags.test.ts deleted file mode 100644 index 39200eb27b..0000000000 --- a/tests/api-resources/zero-trust/access/tags.test.ts +++ /dev/null @@ -1,120 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import Cloudflare from 'cloudflare'; -import { Response } from 'node-fetch'; - -const cloudflare = new Cloudflare({ - apiKey: '144c9defac04969c7bfad8efaa8ea194', - apiEmail: 'user@example.com', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); - -describe('resource tags', () => { - test('create: only required params', async () => { - const responsePromise = cloudflare.zeroTrust.access.tags.create('023e105f4ecef8ad9ca31a8372d0c353', { - name: 'engineers', - }); - 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('create: required and optional params', async () => { - const response = await cloudflare.zeroTrust.access.tags.create('023e105f4ecef8ad9ca31a8372d0c353', { - name: 'engineers', - }); - }); - - test('update: only required params', async () => { - const responsePromise = cloudflare.zeroTrust.access.tags.update( - '023e105f4ecef8ad9ca31a8372d0c353', - 'engineers', - { name: 'engineers' }, - ); - 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('update: required and optional params', async () => { - const response = await cloudflare.zeroTrust.access.tags.update( - '023e105f4ecef8ad9ca31a8372d0c353', - 'engineers', - { name: 'engineers' }, - ); - }); - - test('list', async () => { - const responsePromise = cloudflare.zeroTrust.access.tags.list('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); - }); - - test('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.zeroTrust.access.tags.list('023e105f4ecef8ad9ca31a8372d0c353', { - path: '/_stainless_unknown_path', - }), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); - - test('delete', async () => { - const responsePromise = cloudflare.zeroTrust.access.tags.delete( - '023e105f4ecef8ad9ca31a8372d0c353', - 'engineers', - ); - 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('delete: 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.zeroTrust.access.tags.delete('023e105f4ecef8ad9ca31a8372d0c353', 'engineers', { - path: '/_stainless_unknown_path', - }), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); - - test('get', async () => { - const responsePromise = cloudflare.zeroTrust.access.tags.get( - '023e105f4ecef8ad9ca31a8372d0c353', - 'engineers', - ); - 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('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.zeroTrust.access.tags.get('023e105f4ecef8ad9ca31a8372d0c353', 'engineers', { - path: '/_stainless_unknown_path', - }), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); -}); diff --git a/tests/api-resources/zero-trust/access/users/active-sessions.test.ts b/tests/api-resources/zero-trust/access/users/active-sessions.test.ts deleted file mode 100644 index a26699661a..0000000000 --- a/tests/api-resources/zero-trust/access/users/active-sessions.test.ts +++ /dev/null @@ -1,64 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import Cloudflare from 'cloudflare'; -import { Response } from 'node-fetch'; - -const cloudflare = new Cloudflare({ - apiKey: '144c9defac04969c7bfad8efaa8ea194', - apiEmail: 'user@example.com', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); - -describe('resource activeSessions', () => { - test('list', async () => { - const responsePromise = cloudflare.zeroTrust.access.users.activeSessions.list( - '023e105f4ecef8ad9ca31a8372d0c353', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - ); - 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('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.zeroTrust.access.users.activeSessions.list( - '023e105f4ecef8ad9ca31a8372d0c353', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); - - test('get', async () => { - const responsePromise = cloudflare.zeroTrust.access.users.activeSessions.get( - '023e105f4ecef8ad9ca31a8372d0c353', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - 'X1aXj1lFVcqqyoXF', - ); - 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('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.zeroTrust.access.users.activeSessions.get( - '023e105f4ecef8ad9ca31a8372d0c353', - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - 'X1aXj1lFVcqqyoXF', - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); -}); diff --git a/tests/api-resources/zero-trust/identity-providers.test.ts b/tests/api-resources/zero-trust/identity-providers.test.ts index e33eac6b01..09f40970c2 100644 --- a/tests/api-resources/zero-trust/identity-providers.test.ts +++ b/tests/api-resources/zero-trust/identity-providers.test.ts @@ -53,50 +53,6 @@ describe('resource identityProviders', () => { }); }); - // TODO: investigate broken test - test.skip('update: only required params', async () => { - const responsePromise = cloudflare.zeroTrust.identityProviders.update( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { config: {}, name: 'Widget Corps IDP', type: 'onetimepin', account_id: 'string' }, - ); - 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); - }); - - // TODO: investigate broken test - test.skip('update: required and optional params', async () => { - const response = await cloudflare.zeroTrust.identityProviders.update( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { - config: { - client_id: '', - client_secret: '', - claims: ['email_verified', 'preferred_username', 'custom_claim_name'], - email_claim_name: 'custom_claim_name', - conditional_access_enabled: true, - directory_id: '', - prompt: 'login', - support_groups: true, - }, - name: 'Widget Corps IDP', - type: 'onetimepin', - account_id: 'string', - scim_config: { - enabled: true, - group_member_deprovision: true, - seat_deprovision: true, - secret: 'string', - user_deprovision: true, - }, - }, - ); - }); - // TODO: investigate broken test test.skip('list', async () => { const responsePromise = cloudflare.zeroTrust.identityProviders.list({ account_id: 'string' }); @@ -108,34 +64,4 @@ describe('resource identityProviders', () => { expect(dataAndResponse.data).toBe(response); expect(dataAndResponse.response).toBe(rawResponse); }); - - // TODO: investigate broken test - test.skip('delete', async () => { - const responsePromise = cloudflare.zeroTrust.identityProviders.delete( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: 'string' }, - ); - 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); - }); - - // TODO: investigate broken test - test.skip('get', async () => { - const responsePromise = cloudflare.zeroTrust.identityProviders.get( - 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: 'string' }, - ); - 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); - }); }); diff --git a/tests/api-resources/zero-trust/seats.test.ts b/tests/api-resources/zero-trust/seats.test.ts deleted file mode 100644 index 47854f8f99..0000000000 --- a/tests/api-resources/zero-trust/seats.test.ts +++ /dev/null @@ -1,37 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import Cloudflare from 'cloudflare'; -import { Response } from 'node-fetch'; - -const cloudflare = new Cloudflare({ - apiKey: '144c9defac04969c7bfad8efaa8ea194', - apiEmail: 'user@example.com', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); - -describe('resource seats', () => { - // TODO: investigate broken test - test.skip('edit: only required params', async () => { - const responsePromise = cloudflare.zeroTrust.seats.edit('023e105f4ecef8ad9ca31a8372d0c353', [ - { access_seat: false, gateway_seat: false }, - { access_seat: false, gateway_seat: false }, - { access_seat: false, gateway_seat: false }, - ]); - 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); - }); - - // TODO: investigate broken test - test.skip('edit: required and optional params', async () => { - const response = await cloudflare.zeroTrust.seats.edit('023e105f4ecef8ad9ca31a8372d0c353', [ - { access_seat: false, gateway_seat: false }, - { access_seat: false, gateway_seat: false }, - { access_seat: false, gateway_seat: false }, - ]); - }); -}); From 04e284ce2a217eb22ae7f2e6da7c502822021335 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 01:26:49 +0000 Subject: [PATCH 180/473] feat(api): OpenAPI spec update via Stainless API (#677) --- .stats.yml | 4 +- api.md | 112 ++ .../cloudforce-one/requests/message.ts | 22 +- .../cloudforce-one/requests/priority.ts | 22 +- .../cloudforce-one/requests/requests.ts | 22 +- src/resources/rulesets/phases/phases.ts | 318 +++++ src/resources/rulesets/phases/versions.ts | 116 ++ src/resources/rulesets/rules.ts | 630 +++++++++- src/resources/rulesets/rulesets.ts | 520 ++++++++ src/resources/rulesets/versions/by-tag.ts | 116 ++ src/resources/rulesets/versions/versions.ts | 116 ++ src/resources/zero-trust/access/access.ts | 43 + .../access/applications/applications.ts | 213 +++- .../zero-trust/access/applications/cas.ts | 175 +++ .../zero-trust/access/applications/index.ts | 30 +- .../access/applications/policies.ts | 738 ++++++++++- src/resources/zero-trust/access/bookmarks.ts | 134 +- .../access/certificates/certificates.ts | 176 +++ .../zero-trust/access/certificates/index.ts | 4 + .../zero-trust/access/custom-pages.ts | 177 ++- src/resources/zero-trust/access/groups.ts | 194 +++ src/resources/zero-trust/access/index.ts | 63 +- src/resources/zero-trust/access/keys.ts | 81 +- .../zero-trust/access/logs/access-requests.ts | 29 +- src/resources/zero-trust/access/logs/index.ts | 2 +- src/resources/zero-trust/access/logs/logs.ts | 2 + .../zero-trust/access/service-tokens.ts | 256 ++++ src/resources/zero-trust/access/tags.ts | 126 +- .../access/users/active-sessions.ts | 190 ++- .../zero-trust/access/users/failed-logins.ts | 42 +- .../zero-trust/access/users/index.ts | 20 +- .../access/users/last-seen-identity.ts | 28 +- .../zero-trust/access/users/users.ts | 33 + .../zero-trust/identity-providers.ts | 1096 ++++++++++++++++- src/resources/zero-trust/index.ts | 6 +- src/resources/zero-trust/seats.ts | 47 +- src/resources/zero-trust/zero-trust.ts | 6 + .../access/applications/applications.test.ts | 12 +- .../access/applications/cas.test.ts | 45 + .../access/applications/policies.test.ts | 199 +++ .../zero-trust/access/bookmarks.test.ts | 114 ++ .../access/certificates/certificates.test.ts | 60 + .../zero-trust/access/custom-pages.test.ts | 131 ++ .../zero-trust/access/groups.test.ts | 76 ++ .../zero-trust/access/keys.test.ts | 71 ++ .../access/logs/access-requests.test.ts | 31 + .../zero-trust/access/service-tokens.test.ts | 87 ++ .../zero-trust/access/tags.test.ts | 111 ++ .../access/users/active-sessions.test.ts | 56 + .../access/users/failed-logins.test.ts | 33 + .../access/users/last-seen-identity.test.ts | 33 + .../zero-trust/access/users/users.test.ts | 31 + .../zero-trust/identity-providers.test.ts | 74 ++ tests/api-resources/zero-trust/seats.test.ts | 43 + 54 files changed, 6984 insertions(+), 132 deletions(-) create mode 100644 tests/api-resources/zero-trust/access/applications/policies.test.ts create mode 100644 tests/api-resources/zero-trust/access/bookmarks.test.ts create mode 100644 tests/api-resources/zero-trust/access/custom-pages.test.ts create mode 100644 tests/api-resources/zero-trust/access/keys.test.ts create mode 100644 tests/api-resources/zero-trust/access/logs/access-requests.test.ts create mode 100644 tests/api-resources/zero-trust/access/tags.test.ts create mode 100644 tests/api-resources/zero-trust/access/users/active-sessions.test.ts create mode 100644 tests/api-resources/zero-trust/access/users/failed-logins.test.ts create mode 100644 tests/api-resources/zero-trust/access/users/last-seen-identity.test.ts create mode 100644 tests/api-resources/zero-trust/access/users/users.test.ts create mode 100644 tests/api-resources/zero-trust/seats.test.ts diff --git a/.stats.yml b/.stats.yml index 30e67c9adb..fbcd944afc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1274 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-14c9c9adbd65eee546c4f54d95b7627f10b02185348e334a68cbebbe3442733e.yml +configured_endpoints: 1321 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15ceeb11cd4134501a557652ceaeacda4b60ea635ea5ac2e0d06974b130cc60a.yml diff --git a/api.md b/api.md index 900c76fa41..fb2fcf661d 100644 --- a/api.md +++ b/api.md @@ -4485,11 +4485,15 @@ Types: - IdentityProviderType - ScimConfig - IdentityProviderListResponse +- IdentityProviderDeleteResponse Methods: - client.zeroTrust.identityProviders.create({ ...params }) -> IdentityProvider +- client.zeroTrust.identityProviders.update(identityProviderId, { ...params }) -> IdentityProvider - client.zeroTrust.identityProviders.list({ ...params }) -> IdentityProviderListResponsesSinglePage +- client.zeroTrust.identityProviders.delete(identityProviderId, { ...params }) -> IdentityProviderDeleteResponse +- client.zeroTrust.identityProviders.get(identityProviderId, { ...params }) -> IdentityProvider ## Organizations @@ -4511,6 +4515,11 @@ Methods: Types: - Seat +- SeatEditResponse + +Methods: + +- client.zeroTrust.seats.edit([ ...body ]) -> SeatEditResponse | null ## Access @@ -4576,10 +4585,16 @@ Methods: Types: - CA +- CACreateResponse +- CADeleteResponse +- CAGetResponse Methods: +- client.zeroTrust.access.applications.cas.create(appId, { ...params }) -> CACreateResponse - client.zeroTrust.access.applications.cas.list({ ...params }) -> CAsSinglePage +- client.zeroTrust.access.applications.cas.delete(appId, { ...params }) -> CADeleteResponse +- client.zeroTrust.access.applications.cas.get(appId, { ...params }) -> CAGetResponse #### UserPolicyChecks @@ -4598,6 +4613,19 @@ Types: - ApprovalGroup - Policy +- PolicyCreateResponse +- PolicyUpdateResponse +- PolicyListResponse +- PolicyDeleteResponse +- PolicyGetResponse + +Methods: + +- client.zeroTrust.access.applications.policies.create(appId, { ...params }) -> PolicyCreateResponse +- client.zeroTrust.access.applications.policies.update(appId, policyId, { ...params }) -> PolicyUpdateResponse +- client.zeroTrust.access.applications.policies.list(appId, { ...params }) -> PolicyListResponsesSinglePage +- client.zeroTrust.access.applications.policies.delete(appId, policyId, { ...params }) -> PolicyDeleteResponse +- client.zeroTrust.access.applications.policies.get(appId, policyId, { ...params }) -> PolicyGetResponse ### Certificates @@ -4605,11 +4633,15 @@ Types: - AssociatedHostnames - Certificate +- CertificateDeleteResponse Methods: - client.zeroTrust.access.certificates.create({ ...params }) -> Certificate +- client.zeroTrust.access.certificates.update(certificateId, { ...params }) -> Certificate - client.zeroTrust.access.certificates.list({ ...params }) -> CertificatesSinglePage +- client.zeroTrust.access.certificates.delete(certificateId, { ...params }) -> CertificateDeleteResponse +- client.zeroTrust.access.certificates.get(certificateId, { ...params }) -> Certificate #### Settings @@ -4629,11 +4661,15 @@ Methods: Types: - ZeroTrustGroup +- GroupDeleteResponse Methods: - client.zeroTrust.access.groups.create({ ...params }) -> ZeroTrustGroup +- client.zeroTrust.access.groups.update(groupId, { ...params }) -> ZeroTrustGroup - client.zeroTrust.access.groups.list({ ...params }) -> ZeroTrustGroupsSinglePage +- client.zeroTrust.access.groups.delete(groupId, { ...params }) -> GroupDeleteResponse +- client.zeroTrust.access.groups.get(groupId, { ...params }) -> ZeroTrustGroup ### ServiceTokens @@ -4641,20 +4677,47 @@ Types: - ServiceToken - ServiceTokenCreateResponse +- ServiceTokenRotateResponse Methods: - client.zeroTrust.access.serviceTokens.create({ ...params }) -> ServiceTokenCreateResponse +- client.zeroTrust.access.serviceTokens.update(serviceTokenId, { ...params }) -> ServiceToken - client.zeroTrust.access.serviceTokens.list({ ...params }) -> ServiceTokensSinglePage +- client.zeroTrust.access.serviceTokens.delete(serviceTokenId, { ...params }) -> ServiceToken +- client.zeroTrust.access.serviceTokens.get(serviceTokenId, { ...params }) -> ServiceToken +- client.zeroTrust.access.serviceTokens.refresh(serviceTokenId, { ...params }) -> ServiceToken +- client.zeroTrust.access.serviceTokens.rotate(serviceTokenId, { ...params }) -> ServiceTokenRotateResponse ### Bookmarks Types: - Bookmark +- BookmarkDeleteResponse + +Methods: + +- client.zeroTrust.access.bookmarks.create(bookmarkId, { ...params }) -> Bookmark +- client.zeroTrust.access.bookmarks.update(bookmarkId, { ...params }) -> Bookmark +- client.zeroTrust.access.bookmarks.list({ ...params }) -> BookmarksSinglePage +- client.zeroTrust.access.bookmarks.delete(bookmarkId, { ...params }) -> BookmarkDeleteResponse +- client.zeroTrust.access.bookmarks.get(bookmarkId, { ...params }) -> Bookmark ### Keys +Types: + +- KeyUpdateResponse +- KeyGetResponse +- KeyRotateResponse + +Methods: + +- client.zeroTrust.access.keys.update({ ...params }) -> KeyUpdateResponse +- client.zeroTrust.access.keys.get({ ...params }) -> KeyGetResponse +- client.zeroTrust.access.keys.rotate({ ...params }) -> KeyRotateResponse + ### Logs #### AccessRequests @@ -4662,6 +4725,11 @@ Types: Types: - AccessRequests +- AccessRequestListResponse + +Methods: + +- client.zeroTrust.access.logs.accessRequests.list({ ...params }) -> AccessRequestListResponse | null ### Users @@ -4669,28 +4737,72 @@ Types: - AccessUser +Methods: + +- client.zeroTrust.access.users.list({ ...params }) -> AccessUsersSinglePage + #### ActiveSessions +Types: + +- ActiveSessionListResponse +- ActiveSessionGetResponse + +Methods: + +- client.zeroTrust.access.users.activeSessions.list(userId, { ...params }) -> ActiveSessionListResponsesSinglePage +- client.zeroTrust.access.users.activeSessions.get(userId, nonce, { ...params }) -> ActiveSessionGetResponse + #### LastSeenIdentity Types: - Identity +Methods: + +- client.zeroTrust.access.users.lastSeenIdentity.get(userId, { ...params }) -> Identity + #### FailedLogins +Types: + +- FailedLoginListResponse + +Methods: + +- client.zeroTrust.access.users.failedLogins.list(userId, { ...params }) -> FailedLoginListResponsesSinglePage + ### CustomPages Types: - CustomPage - CustomPageWithoutHTML +- CustomPageDeleteResponse + +Methods: + +- client.zeroTrust.access.customPages.create({ ...params }) -> CustomPageWithoutHTML +- client.zeroTrust.access.customPages.update(customPageId, { ...params }) -> CustomPageWithoutHTML +- client.zeroTrust.access.customPages.list({ ...params }) -> CustomPageWithoutHTMLsSinglePage +- client.zeroTrust.access.customPages.delete(customPageId, { ...params }) -> CustomPageDeleteResponse +- client.zeroTrust.access.customPages.get(customPageId, { ...params }) -> CustomPage ### Tags Types: - Tag +- TagDeleteResponse + +Methods: + +- client.zeroTrust.access.tags.create({ ...params }) -> Tag +- client.zeroTrust.access.tags.update(tagName, { ...params }) -> Tag +- client.zeroTrust.access.tags.list({ ...params }) -> TagsSinglePage +- client.zeroTrust.access.tags.delete(tagName, { ...params }) -> TagDeleteResponse +- client.zeroTrust.access.tags.get(tagName, { ...params }) -> Tag ## DEX diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** diff --git a/src/resources/rulesets/phases/phases.ts b/src/resources/rulesets/phases/phases.ts index e3a8719092..3f7651f973 100644 --- a/src/resources/rulesets/phases/phases.ts +++ b/src/resources/rulesets/phases/phases.ts @@ -138,6 +138,8 @@ export interface PhaseUpdateResponse { | RulesAPI.SkipRule | RulesAPI.SetCacheSettingsRule | PhaseUpdateResponse.RulesetsLogCustomFieldRule + | PhaseUpdateResponse.RulesetsDDoSDynamicRule + | PhaseUpdateResponse.RulesetsForceConnectionCloseRule >; /** @@ -262,6 +264,120 @@ export namespace PhaseUpdateResponse { } } } + + export interface RulesetsDDoSDynamicRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'ddos_dynamic'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export interface RulesetsForceConnectionCloseRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'force_connection_close'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } } /** @@ -313,6 +429,8 @@ export interface PhaseGetResponse { | RulesAPI.SkipRule | RulesAPI.SetCacheSettingsRule | PhaseGetResponse.RulesetsLogCustomFieldRule + | PhaseGetResponse.RulesetsDDoSDynamicRule + | PhaseGetResponse.RulesetsForceConnectionCloseRule >; /** @@ -437,6 +555,120 @@ export namespace PhaseGetResponse { } } } + + export interface RulesetsDDoSDynamicRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'ddos_dynamic'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export interface RulesetsForceConnectionCloseRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'force_connection_close'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } } export interface PhaseUpdateParams { @@ -460,6 +692,8 @@ export interface PhaseUpdateParams { | RulesAPI.SkipRuleParam | RulesAPI.SetCacheSettingsRuleParam | PhaseUpdateParams.RulesetsLogCustomFieldRule + | PhaseUpdateParams.RulesetsDDoSDynamicRule + | PhaseUpdateParams.RulesetsForceConnectionCloseRule >; /** @@ -591,6 +825,90 @@ export namespace PhaseUpdateParams { } } } + + export interface RulesetsDDoSDynamicRule { + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'ddos_dynamic'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.LoggingParam; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export interface RulesetsForceConnectionCloseRule { + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'force_connection_close'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.LoggingParam; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } } export interface PhaseGetParams { diff --git a/src/resources/rulesets/phases/versions.ts b/src/resources/rulesets/phases/versions.ts index 27be834baa..541d289ebb 100644 --- a/src/resources/rulesets/phases/versions.ts +++ b/src/resources/rulesets/phases/versions.ts @@ -152,6 +152,8 @@ export interface VersionGetResponse { | RulesAPI.SkipRule | RulesAPI.SetCacheSettingsRule | VersionGetResponse.RulesetsLogCustomFieldRule + | VersionGetResponse.RulesetsDDoSDynamicRule + | VersionGetResponse.RulesetsForceConnectionCloseRule >; /** @@ -276,6 +278,120 @@ export namespace VersionGetResponse { } } } + + export interface RulesetsDDoSDynamicRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'ddos_dynamic'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export interface RulesetsForceConnectionCloseRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'force_connection_close'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } } export interface VersionListParams { diff --git a/src/resources/rulesets/rules.ts b/src/resources/rulesets/rules.ts index caf33230d4..336270d463 100644 --- a/src/resources/rulesets/rules.ts +++ b/src/resources/rulesets/rules.ts @@ -3638,6 +3638,8 @@ export interface RuleCreateResponse { | SkipRule | SetCacheSettingsRule | RuleCreateResponse.RulesetsLogCustomFieldRule + | RuleCreateResponse.RulesetsDDoSDynamicRule + | RuleCreateResponse.RulesetsForceConnectionCloseRule >; /** @@ -3762,6 +3764,120 @@ export namespace RuleCreateResponse { } } } + + export interface RulesetsDDoSDynamicRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'ddos_dynamic'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export interface RulesetsForceConnectionCloseRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'force_connection_close'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } } /** @@ -3813,6 +3929,8 @@ export interface RuleDeleteResponse { | SkipRule | SetCacheSettingsRule | RuleDeleteResponse.RulesetsLogCustomFieldRule + | RuleDeleteResponse.RulesetsDDoSDynamicRule + | RuleDeleteResponse.RulesetsForceConnectionCloseRule >; /** @@ -3937,6 +4055,120 @@ export namespace RuleDeleteResponse { } } } + + export interface RulesetsDDoSDynamicRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'ddos_dynamic'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export interface RulesetsForceConnectionCloseRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'force_connection_close'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } } /** @@ -3988,6 +4220,8 @@ export interface RuleEditResponse { | SkipRule | SetCacheSettingsRule | RuleEditResponse.RulesetsLogCustomFieldRule + | RuleEditResponse.RulesetsDDoSDynamicRule + | RuleEditResponse.RulesetsForceConnectionCloseRule >; /** @@ -4080,37 +4314,151 @@ export namespace RuleEditResponse { response_fields?: Array; } - export namespace ActionParameters { - /** - * The cookie field to log. - */ - export interface CookieField { - /** - * The name of the field. - */ - name: string; - } + export namespace ActionParameters { + /** + * The cookie field to log. + */ + export interface CookieField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The request field to log. + */ + export interface RequestField { + /** + * The name of the field. + */ + name: string; + } + + /** + * The response field to log. + */ + export interface ResponseField { + /** + * The name of the field. + */ + name: string; + } + } + } + + export interface RulesetsDDoSDynamicRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'ddos_dynamic'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export interface RulesetsForceConnectionCloseRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'force_connection_close'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; - /** - * The request field to log. - */ - export interface RequestField { - /** - * The name of the field. - */ - name: string; - } + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; - /** - * The response field to log. - */ - export interface ResponseField { - /** - * The name of the field. - */ - name: string; - } - } + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; } } @@ -4130,7 +4478,9 @@ export type RuleCreateParams = | RuleCreateParams.SetConfigRule | RuleCreateParams.SkipRule | RuleCreateParams.SetCacheSettingsRule - | RuleCreateParams.RulesetsLogCustomFieldRule; + | RuleCreateParams.RulesetsLogCustomFieldRule + | RuleCreateParams.RulesetsDDoSDynamicRule + | RuleCreateParams.RulesetsForceConnectionCloseRule; export namespace RuleCreateParams { export interface BlockRule { @@ -5983,6 +6333,114 @@ export namespace RuleCreateParams { } } } + + export interface RulesetsDDoSDynamicRule { + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The unique ID of the rule. + */ + id?: string; + + /** + * Body param: The action to perform when the rule matches. + */ + action?: 'ddos_dynamic'; + + /** + * Body param: The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * Body param: An informative description of the rule. + */ + description?: string; + + /** + * Body param: Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * Body param: The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * Body param: An object configuring the rule's logging behavior. + */ + logging?: LoggingParam; + + /** + * Body param: The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export interface RulesetsForceConnectionCloseRule { + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The unique ID of the rule. + */ + id?: string; + + /** + * Body param: The action to perform when the rule matches. + */ + action?: 'force_connection_close'; + + /** + * Body param: The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * Body param: An informative description of the rule. + */ + description?: string; + + /** + * Body param: Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * Body param: The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * Body param: An object configuring the rule's logging behavior. + */ + logging?: LoggingParam; + + /** + * Body param: The reference of the rule (the rule ID by default). + */ + ref?: string; + } } export interface RuleDeleteParams { @@ -6013,7 +6471,9 @@ export type RuleEditParams = | RuleEditParams.SetConfigRule | RuleEditParams.SkipRule | RuleEditParams.SetCacheSettingsRule - | RuleEditParams.RulesetsLogCustomFieldRule; + | RuleEditParams.RulesetsLogCustomFieldRule + | RuleEditParams.RulesetsDDoSDynamicRule + | RuleEditParams.RulesetsForceConnectionCloseRule; export namespace RuleEditParams { export interface BlockRule { @@ -7866,6 +8326,114 @@ export namespace RuleEditParams { } } } + + export interface RulesetsDDoSDynamicRule { + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The unique ID of the rule. + */ + id?: string; + + /** + * Body param: The action to perform when the rule matches. + */ + action?: 'ddos_dynamic'; + + /** + * Body param: The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * Body param: An informative description of the rule. + */ + description?: string; + + /** + * Body param: Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * Body param: The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * Body param: An object configuring the rule's logging behavior. + */ + logging?: LoggingParam; + + /** + * Body param: The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export interface RulesetsForceConnectionCloseRule { + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The unique ID of the rule. + */ + id?: string; + + /** + * Body param: The action to perform when the rule matches. + */ + action?: 'force_connection_close'; + + /** + * Body param: The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * Body param: An informative description of the rule. + */ + description?: string; + + /** + * Body param: Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * Body param: The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * Body param: An object configuring the rule's logging behavior. + */ + logging?: LoggingParam; + + /** + * Body param: The reference of the rule (the rule ID by default). + */ + ref?: string; + } } export namespace Rules { diff --git a/src/resources/rulesets/rulesets.ts b/src/resources/rulesets/rulesets.ts index 91486846b9..e50d1052ed 100644 --- a/src/resources/rulesets/rulesets.ts +++ b/src/resources/rulesets/rulesets.ts @@ -355,6 +355,8 @@ export interface RulesetCreateResponse { | RulesAPI.SkipRule | RulesAPI.SetCacheSettingsRule | RulesetCreateResponse.RulesetsLogCustomFieldRule + | RulesetCreateResponse.RulesetsDDoSDynamicRule + | RulesetCreateResponse.RulesetsForceConnectionCloseRule >; /** @@ -479,6 +481,120 @@ export namespace RulesetCreateResponse { } } } + + export interface RulesetsDDoSDynamicRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'ddos_dynamic'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export interface RulesetsForceConnectionCloseRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'force_connection_close'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } } /** @@ -530,6 +646,8 @@ export interface RulesetUpdateResponse { | RulesAPI.SkipRule | RulesAPI.SetCacheSettingsRule | RulesetUpdateResponse.RulesetsLogCustomFieldRule + | RulesetUpdateResponse.RulesetsDDoSDynamicRule + | RulesetUpdateResponse.RulesetsForceConnectionCloseRule >; /** @@ -654,6 +772,120 @@ export namespace RulesetUpdateResponse { } } } + + export interface RulesetsDDoSDynamicRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'ddos_dynamic'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export interface RulesetsForceConnectionCloseRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'force_connection_close'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } } /** @@ -705,6 +937,8 @@ export interface RulesetGetResponse { | RulesAPI.SkipRule | RulesAPI.SetCacheSettingsRule | RulesetGetResponse.RulesetsLogCustomFieldRule + | RulesetGetResponse.RulesetsDDoSDynamicRule + | RulesetGetResponse.RulesetsForceConnectionCloseRule >; /** @@ -829,6 +1063,120 @@ export namespace RulesetGetResponse { } } } + + export interface RulesetsDDoSDynamicRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'ddos_dynamic'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export interface RulesetsForceConnectionCloseRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'force_connection_close'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } } export interface RulesetCreateParams { @@ -867,6 +1215,8 @@ export interface RulesetCreateParams { | RulesAPI.SkipRuleParam | RulesAPI.SetCacheSettingsRuleParam | RulesetCreateParams.RulesetsLogCustomFieldRule + | RulesetCreateParams.RulesetsDDoSDynamicRule + | RulesetCreateParams.RulesetsForceConnectionCloseRule >; /** @@ -983,6 +1333,90 @@ export namespace RulesetCreateParams { } } } + + export interface RulesetsDDoSDynamicRule { + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'ddos_dynamic'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.LoggingParam; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export interface RulesetsForceConnectionCloseRule { + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'force_connection_close'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.LoggingParam; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } } export interface RulesetUpdateParams { @@ -1006,6 +1440,8 @@ export interface RulesetUpdateParams { | RulesAPI.SkipRuleParam | RulesAPI.SetCacheSettingsRuleParam | RulesetUpdateParams.RulesetsLogCustomFieldRule + | RulesetUpdateParams.RulesetsDDoSDynamicRule + | RulesetUpdateParams.RulesetsForceConnectionCloseRule >; /** @@ -1137,6 +1573,90 @@ export namespace RulesetUpdateParams { } } } + + export interface RulesetsDDoSDynamicRule { + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'ddos_dynamic'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.LoggingParam; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export interface RulesetsForceConnectionCloseRule { + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'force_connection_close'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.LoggingParam; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } } export interface RulesetListParams { diff --git a/src/resources/rulesets/versions/by-tag.ts b/src/resources/rulesets/versions/by-tag.ts index cc42060c78..7adcba2a7f 100644 --- a/src/resources/rulesets/versions/by-tag.ts +++ b/src/resources/rulesets/versions/by-tag.ts @@ -76,6 +76,8 @@ export interface ByTagGetResponse { | RulesAPI.SkipRule | RulesAPI.SetCacheSettingsRule | ByTagGetResponse.RulesetsLogCustomFieldRule + | ByTagGetResponse.RulesetsDDoSDynamicRule + | ByTagGetResponse.RulesetsForceConnectionCloseRule >; /** @@ -200,6 +202,120 @@ export namespace ByTagGetResponse { } } } + + export interface RulesetsDDoSDynamicRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'ddos_dynamic'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export interface RulesetsForceConnectionCloseRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'force_connection_close'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } } export interface ByTagGetParams { diff --git a/src/resources/rulesets/versions/versions.ts b/src/resources/rulesets/versions/versions.ts index d79224f50d..c831e38ef7 100644 --- a/src/resources/rulesets/versions/versions.ts +++ b/src/resources/rulesets/versions/versions.ts @@ -197,6 +197,8 @@ export interface VersionGetResponse { | RulesAPI.SkipRule | RulesAPI.SetCacheSettingsRule | VersionGetResponse.RulesetsLogCustomFieldRule + | VersionGetResponse.RulesetsDDoSDynamicRule + | VersionGetResponse.RulesetsForceConnectionCloseRule >; /** @@ -321,6 +323,120 @@ export namespace VersionGetResponse { } } } + + export interface RulesetsDDoSDynamicRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'ddos_dynamic'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } + + export interface RulesetsForceConnectionCloseRule { + /** + * The timestamp of when the rule was last modified. + */ + last_updated: string; + + /** + * The version of the rule. + */ + version: string; + + /** + * The unique ID of the rule. + */ + id?: string; + + /** + * The action to perform when the rule matches. + */ + action?: 'force_connection_close'; + + /** + * The parameters configuring the rule's action. + */ + action_parameters?: unknown; + + /** + * The categories of the rule. + */ + categories?: Array; + + /** + * An informative description of the rule. + */ + description?: string; + + /** + * Whether the rule should be executed. + */ + enabled?: boolean; + + /** + * The expression defining which traffic will match the rule. + */ + expression?: string; + + /** + * An object configuring the rule's logging behavior. + */ + logging?: RulesAPI.Logging; + + /** + * The reference of the rule (the rule ID by default). + */ + ref?: string; + } } export interface VersionListParams { diff --git a/src/resources/zero-trust/access/access.ts b/src/resources/zero-trust/access/access.ts index 50d7ed5610..b0a817d781 100644 --- a/src/resources/zero-trust/access/access.ts +++ b/src/resources/zero-trust/access/access.ts @@ -756,29 +756,72 @@ export namespace Access { export import Certificates = CertificatesAPI.Certificates; export import AssociatedHostnames = CertificatesAPI.AssociatedHostnames; export import Certificate = CertificatesAPI.Certificate; + export import CertificateDeleteResponse = CertificatesAPI.CertificateDeleteResponse; export import CertificatesSinglePage = CertificatesAPI.CertificatesSinglePage; export import CertificateCreateParams = CertificatesAPI.CertificateCreateParams; + export import CertificateUpdateParams = CertificatesAPI.CertificateUpdateParams; export import CertificateListParams = CertificatesAPI.CertificateListParams; + export import CertificateDeleteParams = CertificatesAPI.CertificateDeleteParams; + export import CertificateGetParams = CertificatesAPI.CertificateGetParams; export import Groups = GroupsAPI.Groups; export import ZeroTrustGroup = GroupsAPI.ZeroTrustGroup; + export import GroupDeleteResponse = GroupsAPI.GroupDeleteResponse; export import ZeroTrustGroupsSinglePage = GroupsAPI.ZeroTrustGroupsSinglePage; export import GroupCreateParams = GroupsAPI.GroupCreateParams; + export import GroupUpdateParams = GroupsAPI.GroupUpdateParams; export import GroupListParams = GroupsAPI.GroupListParams; + export import GroupDeleteParams = GroupsAPI.GroupDeleteParams; + export import GroupGetParams = GroupsAPI.GroupGetParams; export import ServiceTokens = ServiceTokensAPI.ServiceTokens; export import ServiceToken = ServiceTokensAPI.ServiceToken; export import ServiceTokenCreateResponse = ServiceTokensAPI.ServiceTokenCreateResponse; + export import ServiceTokenRotateResponse = ServiceTokensAPI.ServiceTokenRotateResponse; export import ServiceTokensSinglePage = ServiceTokensAPI.ServiceTokensSinglePage; export import ServiceTokenCreateParams = ServiceTokensAPI.ServiceTokenCreateParams; + export import ServiceTokenUpdateParams = ServiceTokensAPI.ServiceTokenUpdateParams; export import ServiceTokenListParams = ServiceTokensAPI.ServiceTokenListParams; + export import ServiceTokenDeleteParams = ServiceTokensAPI.ServiceTokenDeleteParams; + export import ServiceTokenGetParams = ServiceTokensAPI.ServiceTokenGetParams; + export import ServiceTokenRefreshParams = ServiceTokensAPI.ServiceTokenRefreshParams; + export import ServiceTokenRotateParams = ServiceTokensAPI.ServiceTokenRotateParams; export import Bookmarks = BookmarksAPI.Bookmarks; export import Bookmark = BookmarksAPI.Bookmark; + export import BookmarkDeleteResponse = BookmarksAPI.BookmarkDeleteResponse; + export import BookmarksSinglePage = BookmarksAPI.BookmarksSinglePage; + export import BookmarkCreateParams = BookmarksAPI.BookmarkCreateParams; + export import BookmarkUpdateParams = BookmarksAPI.BookmarkUpdateParams; + export import BookmarkListParams = BookmarksAPI.BookmarkListParams; + export import BookmarkDeleteParams = BookmarksAPI.BookmarkDeleteParams; + export import BookmarkGetParams = BookmarksAPI.BookmarkGetParams; export import Keys = KeysAPI.Keys; + export import KeyUpdateResponse = KeysAPI.KeyUpdateResponse; + export import KeyGetResponse = KeysAPI.KeyGetResponse; + export import KeyRotateResponse = KeysAPI.KeyRotateResponse; + export import KeyUpdateParams = KeysAPI.KeyUpdateParams; + export import KeyGetParams = KeysAPI.KeyGetParams; + export import KeyRotateParams = KeysAPI.KeyRotateParams; export import Logs = LogsAPI.Logs; export import Users = UsersAPI.Users; export import AccessUser = UsersAPI.AccessUser; + export import AccessUsersSinglePage = UsersAPI.AccessUsersSinglePage; + export import UserListParams = UsersAPI.UserListParams; export import CustomPages = CustomPagesAPI.CustomPages; export import CustomPage = CustomPagesAPI.CustomPage; export import CustomPageWithoutHTML = CustomPagesAPI.CustomPageWithoutHTML; + export import CustomPageDeleteResponse = CustomPagesAPI.CustomPageDeleteResponse; + export import CustomPageWithoutHTMLsSinglePage = CustomPagesAPI.CustomPageWithoutHTMLsSinglePage; + export import CustomPageCreateParams = CustomPagesAPI.CustomPageCreateParams; + export import CustomPageUpdateParams = CustomPagesAPI.CustomPageUpdateParams; + export import CustomPageListParams = CustomPagesAPI.CustomPageListParams; + export import CustomPageDeleteParams = CustomPagesAPI.CustomPageDeleteParams; + export import CustomPageGetParams = CustomPagesAPI.CustomPageGetParams; export import Tags = TagsAPI.Tags; export import Tag = TagsAPI.Tag; + export import TagDeleteResponse = TagsAPI.TagDeleteResponse; + export import TagsSinglePage = TagsAPI.TagsSinglePage; + export import TagCreateParams = TagsAPI.TagCreateParams; + export import TagUpdateParams = TagsAPI.TagUpdateParams; + export import TagListParams = TagsAPI.TagListParams; + export import TagDeleteParams = TagsAPI.TagDeleteParams; + export import TagGetParams = TagsAPI.TagGetParams; } diff --git a/src/resources/zero-trust/access/applications/applications.ts b/src/resources/zero-trust/access/applications/applications.ts index aca1a2fa97..94df7faafc 100644 --- a/src/resources/zero-trust/access/applications/applications.ts +++ b/src/resources/zero-trust/access/applications/applications.ts @@ -3242,7 +3242,7 @@ export namespace ApplicationCreateResponse { export namespace SelfHostedApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -3566,7 +3566,7 @@ export namespace ApplicationCreateResponse { export namespace SaaSApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -4097,7 +4097,7 @@ export namespace ApplicationCreateResponse { export namespace BrowserSSHApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -4505,7 +4505,7 @@ export namespace ApplicationCreateResponse { export namespace BrowserVncApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -4819,7 +4819,7 @@ export namespace ApplicationCreateResponse { export namespace AppLauncherApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -5133,7 +5133,7 @@ export namespace ApplicationCreateResponse { export namespace DeviceEnrollmentPermissionsApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -5447,7 +5447,7 @@ export namespace ApplicationCreateResponse { export namespace BrowserIsolationPermissionsApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -6101,7 +6101,7 @@ export namespace ApplicationUpdateResponse { export namespace SelfHostedApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -6425,7 +6425,7 @@ export namespace ApplicationUpdateResponse { export namespace SaaSApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -6956,7 +6956,7 @@ export namespace ApplicationUpdateResponse { export namespace BrowserSSHApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -7364,7 +7364,7 @@ export namespace ApplicationUpdateResponse { export namespace BrowserVncApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -7678,7 +7678,7 @@ export namespace ApplicationUpdateResponse { export namespace AppLauncherApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -7992,7 +7992,7 @@ export namespace ApplicationUpdateResponse { export namespace DeviceEnrollmentPermissionsApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -8306,7 +8306,7 @@ export namespace ApplicationUpdateResponse { export namespace BrowserIsolationPermissionsApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -8960,7 +8960,7 @@ export namespace ApplicationListResponse { export namespace SelfHostedApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -9284,7 +9284,7 @@ export namespace ApplicationListResponse { export namespace SaaSApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -9815,7 +9815,7 @@ export namespace ApplicationListResponse { export namespace BrowserSSHApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -10223,7 +10223,7 @@ export namespace ApplicationListResponse { export namespace BrowserVncApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -10537,7 +10537,7 @@ export namespace ApplicationListResponse { export namespace AppLauncherApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -10851,7 +10851,7 @@ export namespace ApplicationListResponse { export namespace DeviceEnrollmentPermissionsApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -11165,7 +11165,7 @@ export namespace ApplicationListResponse { export namespace BrowserIsolationPermissionsApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -11826,7 +11826,7 @@ export namespace ApplicationGetResponse { export namespace SelfHostedApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -12150,7 +12150,7 @@ export namespace ApplicationGetResponse { export namespace SaaSApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -12681,7 +12681,7 @@ export namespace ApplicationGetResponse { export namespace BrowserSSHApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -13089,7 +13089,7 @@ export namespace ApplicationGetResponse { export namespace BrowserVncApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -13403,7 +13403,7 @@ export namespace ApplicationGetResponse { export namespace AppLauncherApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -13717,7 +13717,7 @@ export namespace ApplicationGetResponse { export namespace DeviceEnrollmentPermissionsApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -14031,7 +14031,7 @@ export namespace ApplicationGetResponse { export namespace BrowserIsolationPermissionsApplication { export interface Policy { /** - * UUID + * The UUID of the policy */ id?: string; @@ -14702,6 +14702,11 @@ export namespace ApplicationCreateParams { * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { + /** + * The UUID of the policy + */ + id?: string; + /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -14726,6 +14731,11 @@ export namespace ApplicationCreateParams { */ name: string; + /** + * The UUID of the policy + */ + id?: string; + /** * Administrators who can approve a temporary authentication request. */ @@ -15045,6 +15055,11 @@ export namespace ApplicationCreateParams { * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { + /** + * The UUID of the policy + */ + id?: string; + /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -15069,6 +15084,11 @@ export namespace ApplicationCreateParams { */ name: string; + /** + * The UUID of the policy + */ + id?: string; + /** * Administrators who can approve a temporary authentication request. */ @@ -15593,6 +15613,11 @@ export namespace ApplicationCreateParams { * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { + /** + * The UUID of the policy + */ + id?: string; + /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -15617,6 +15642,11 @@ export namespace ApplicationCreateParams { */ name: string; + /** + * The UUID of the policy + */ + id?: string; + /** * Administrators who can approve a temporary authentication request. */ @@ -16022,6 +16052,11 @@ export namespace ApplicationCreateParams { * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { + /** + * The UUID of the policy + */ + id?: string; + /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -16046,6 +16081,11 @@ export namespace ApplicationCreateParams { */ name: string; + /** + * The UUID of the policy + */ + id?: string; + /** * Administrators who can approve a temporary authentication request. */ @@ -16340,6 +16380,11 @@ export namespace ApplicationCreateParams { * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { + /** + * The UUID of the policy + */ + id?: string; + /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -16364,6 +16409,11 @@ export namespace ApplicationCreateParams { */ name: string; + /** + * The UUID of the policy + */ + id?: string; + /** * Administrators who can approve a temporary authentication request. */ @@ -16658,6 +16708,11 @@ export namespace ApplicationCreateParams { * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { + /** + * The UUID of the policy + */ + id?: string; + /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -16682,6 +16737,11 @@ export namespace ApplicationCreateParams { */ name: string; + /** + * The UUID of the policy + */ + id?: string; + /** * Administrators who can approve a temporary authentication request. */ @@ -16976,6 +17036,11 @@ export namespace ApplicationCreateParams { * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { + /** + * The UUID of the policy + */ + id?: string; + /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -17000,6 +17065,11 @@ export namespace ApplicationCreateParams { */ name: string; + /** + * The UUID of the policy + */ + id?: string; + /** * Administrators who can approve a temporary authentication request. */ @@ -17649,6 +17719,11 @@ export namespace ApplicationUpdateParams { * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { + /** + * The UUID of the policy + */ + id?: string; + /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -17673,6 +17748,11 @@ export namespace ApplicationUpdateParams { */ name: string; + /** + * The UUID of the policy + */ + id?: string; + /** * Administrators who can approve a temporary authentication request. */ @@ -17992,6 +18072,11 @@ export namespace ApplicationUpdateParams { * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { + /** + * The UUID of the policy + */ + id?: string; + /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -18016,6 +18101,11 @@ export namespace ApplicationUpdateParams { */ name: string; + /** + * The UUID of the policy + */ + id?: string; + /** * Administrators who can approve a temporary authentication request. */ @@ -18540,6 +18630,11 @@ export namespace ApplicationUpdateParams { * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { + /** + * The UUID of the policy + */ + id?: string; + /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -18564,6 +18659,11 @@ export namespace ApplicationUpdateParams { */ name: string; + /** + * The UUID of the policy + */ + id?: string; + /** * Administrators who can approve a temporary authentication request. */ @@ -18969,6 +19069,11 @@ export namespace ApplicationUpdateParams { * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { + /** + * The UUID of the policy + */ + id?: string; + /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -18993,6 +19098,11 @@ export namespace ApplicationUpdateParams { */ name: string; + /** + * The UUID of the policy + */ + id?: string; + /** * Administrators who can approve a temporary authentication request. */ @@ -19287,6 +19397,11 @@ export namespace ApplicationUpdateParams { * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { + /** + * The UUID of the policy + */ + id?: string; + /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -19311,6 +19426,11 @@ export namespace ApplicationUpdateParams { */ name: string; + /** + * The UUID of the policy + */ + id?: string; + /** * Administrators who can approve a temporary authentication request. */ @@ -19605,6 +19725,11 @@ export namespace ApplicationUpdateParams { * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { + /** + * The UUID of the policy + */ + id?: string; + /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -19629,6 +19754,11 @@ export namespace ApplicationUpdateParams { */ name: string; + /** + * The UUID of the policy + */ + id?: string; + /** * Administrators who can approve a temporary authentication request. */ @@ -19923,6 +20053,11 @@ export namespace ApplicationUpdateParams { * A JSON that links a reusable policy to an application. */ export interface AccessAppPolicyLink { + /** + * The UUID of the policy + */ + id?: string; + /** * The order of execution for this policy. Must be unique for each policy within an * app. @@ -19947,6 +20082,11 @@ export namespace ApplicationUpdateParams { */ name: string; + /** + * The UUID of the policy + */ + id?: string; + /** * Administrators who can approve a temporary authentication request. */ @@ -20492,8 +20632,14 @@ export namespace Applications { export import ApplicationRevokeTokensParams = ApplicationsAPI.ApplicationRevokeTokensParams; export import CAs = CAsAPI.CAs; export import CA = CAsAPI.CA; + export import CACreateResponse = CAsAPI.CACreateResponse; + export import CADeleteResponse = CAsAPI.CADeleteResponse; + export import CAGetResponse = CAsAPI.CAGetResponse; export import CAsSinglePage = CAsAPI.CAsSinglePage; + export import CACreateParams = CAsAPI.CACreateParams; export import CAListParams = CAsAPI.CAListParams; + export import CADeleteParams = CAsAPI.CADeleteParams; + export import CAGetParams = CAsAPI.CAGetParams; export import UserPolicyChecks = UserPolicyChecksAPI.UserPolicyChecks; export import UserPolicyCheckGeo = UserPolicyChecksAPI.UserPolicyCheckGeo; export import UserPolicyCheckListResponse = UserPolicyChecksAPI.UserPolicyCheckListResponse; @@ -20501,4 +20647,15 @@ export namespace Applications { export import Policies = PoliciesAPI.Policies; export import ApprovalGroup = PoliciesAPI.ApprovalGroup; export import Policy = PoliciesAPI.Policy; + export import PolicyCreateResponse = PoliciesAPI.PolicyCreateResponse; + export import PolicyUpdateResponse = PoliciesAPI.PolicyUpdateResponse; + export import PolicyListResponse = PoliciesAPI.PolicyListResponse; + export import PolicyDeleteResponse = PoliciesAPI.PolicyDeleteResponse; + export import PolicyGetResponse = PoliciesAPI.PolicyGetResponse; + export import PolicyListResponsesSinglePage = PoliciesAPI.PolicyListResponsesSinglePage; + export import PolicyCreateParams = PoliciesAPI.PolicyCreateParams; + export import PolicyUpdateParams = PoliciesAPI.PolicyUpdateParams; + export import PolicyListParams = PoliciesAPI.PolicyListParams; + export import PolicyDeleteParams = PoliciesAPI.PolicyDeleteParams; + export import PolicyGetParams = PoliciesAPI.PolicyGetParams; } diff --git a/src/resources/zero-trust/access/applications/cas.ts b/src/resources/zero-trust/access/applications/cas.ts index 3a6193c6d1..2906d9e17f 100644 --- a/src/resources/zero-trust/access/applications/cas.ts +++ b/src/resources/zero-trust/access/applications/cas.ts @@ -8,6 +8,48 @@ import * as CAsAPI from './cas'; import { SinglePage } from '../../../../pagination'; export class CAs extends APIResource { + /** + * Generates a new short-lived certificate CA and public key. + */ + create( + appId: string, + params?: CACreateParams, + options?: Core.RequestOptions, + ): Core.APIPromise; + create(appId: string, options?: Core.RequestOptions): Core.APIPromise; + create( + appId: string, + params: CACreateParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(params)) { + return this.create(appId, {}, params); + } + const { account_id, zone_id } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.post( + `/${accountOrZone}/${accountOrZoneId}/access/apps/${appId}/ca`, + options, + ) as Core.APIPromise<{ result: CACreateResponse }> + )._thenUnwrap((obj) => obj.result); + } + /** * Lists short-lived certificate CAs and their public keys. */ @@ -43,6 +85,86 @@ export class CAs extends APIResource { options, ); } + + /** + * Deletes a short-lived certificate CA. + */ + delete( + appId: string, + params?: CADeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise; + delete(appId: string, options?: Core.RequestOptions): Core.APIPromise; + delete( + appId: string, + params: CADeleteParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(params)) { + return this.delete(appId, {}, params); + } + const { account_id, zone_id } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.delete( + `/${accountOrZone}/${accountOrZoneId}/access/apps/${appId}/ca`, + options, + ) as Core.APIPromise<{ result: CADeleteResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Fetches a short-lived certificate CA and its public key. + */ + get(appId: string, params?: CAGetParams, options?: Core.RequestOptions): Core.APIPromise; + get(appId: string, options?: Core.RequestOptions): Core.APIPromise; + get( + appId: string, + params: CAGetParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(params)) { + return this.get(appId, {}, params); + } + const { account_id, zone_id } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.get( + `/${accountOrZone}/${accountOrZoneId}/access/apps/${appId}/ca`, + options, + ) as Core.APIPromise<{ result: CAGetResponse }> + )._thenUnwrap((obj) => obj.result); + } } export class CAsSinglePage extends SinglePage {} @@ -65,6 +187,29 @@ export interface CA { public_key?: string; } +export type CACreateResponse = unknown | string | null; + +export interface CADeleteResponse { + /** + * The ID of the CA. + */ + id?: string; +} + +export type CAGetResponse = unknown | string | null; + +export interface CACreateParams { + /** + * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + */ + account_id?: string; + + /** + * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + */ + zone_id?: string; +} + export interface CAListParams { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. @@ -77,8 +222,38 @@ export interface CAListParams { zone_id?: string; } +export interface CADeleteParams { + /** + * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + */ + account_id?: string; + + /** + * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + */ + zone_id?: string; +} + +export interface CAGetParams { + /** + * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + */ + account_id?: string; + + /** + * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + */ + zone_id?: string; +} + export namespace CAs { export import CA = CAsAPI.CA; + export import CACreateResponse = CAsAPI.CACreateResponse; + export import CADeleteResponse = CAsAPI.CADeleteResponse; + export import CAGetResponse = CAsAPI.CAGetResponse; export import CAsSinglePage = CAsAPI.CAsSinglePage; + export import CACreateParams = CAsAPI.CACreateParams; export import CAListParams = CAsAPI.CAListParams; + export import CADeleteParams = CAsAPI.CADeleteParams; + export import CAGetParams = CAsAPI.CAGetParams; } diff --git a/src/resources/zero-trust/access/applications/index.ts b/src/resources/zero-trust/access/applications/index.ts index f9cc6f8b23..ed76c33146 100644 --- a/src/resources/zero-trust/access/applications/index.ts +++ b/src/resources/zero-trust/access/applications/index.ts @@ -30,8 +30,34 @@ export { ApplicationListResponsesSinglePage, Applications, } from './applications'; -export { ApprovalGroup, Policy, Policies } from './policies'; -export { CA, CAListParams, CAsSinglePage, CAs } from './cas'; +export { + ApprovalGroup, + Policy, + PolicyCreateResponse, + PolicyUpdateResponse, + PolicyListResponse, + PolicyDeleteResponse, + PolicyGetResponse, + PolicyCreateParams, + PolicyUpdateParams, + PolicyListParams, + PolicyDeleteParams, + PolicyGetParams, + PolicyListResponsesSinglePage, + Policies, +} from './policies'; +export { + CA, + CACreateResponse, + CADeleteResponse, + CAGetResponse, + CACreateParams, + CAListParams, + CADeleteParams, + CAGetParams, + CAsSinglePage, + CAs, +} from './cas'; export { UserPolicyCheckGeo, UserPolicyCheckListResponse, diff --git a/src/resources/zero-trust/access/applications/policies.ts b/src/resources/zero-trust/access/applications/policies.ts index 502dfc2cb5..9841ee708e 100644 --- a/src/resources/zero-trust/access/applications/policies.ts +++ b/src/resources/zero-trust/access/applications/policies.ts @@ -1,11 +1,227 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import * as Core from '../../../../core'; import { APIResource } from '../../../../resource'; +import { isRequestOptions } from '../../../../core'; +import { CloudflareError } from '../../../../error'; import * as PoliciesAPI from './policies'; import * as AccessAPI from '../access'; import * as ApplicationsAPI from './applications'; +import { SinglePage } from '../../../../pagination'; -export class Policies extends APIResource {} +export class Policies extends APIResource { + /** + * Creates a policy applying exclusive to a single application that defines the + * users or groups who can reach it. We recommend creating a reusable policy + * instead and subsequently referencing its ID in the application's 'policies' + * array. + */ + create( + appId: string, + params: PolicyCreateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, zone_id, ...body } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.post(`/${accountOrZone}/${accountOrZoneId}/access/apps/${appId}/policies`, { + body, + ...options, + }) as Core.APIPromise<{ result: PolicyCreateResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Updates an Access policy specific to an application. To update a reusable + * policy, use the /account or zones/{account or zone_id}/policies/{uid} endpoint. + */ + update( + appId: string, + policyId: string, + params: PolicyUpdateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, zone_id, ...body } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.put(`/${accountOrZone}/${accountOrZoneId}/access/apps/${appId}/policies/${policyId}`, { + body, + ...options, + }) as Core.APIPromise<{ result: PolicyUpdateResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Lists Access policies configured for an application. Returns both exclusively + * scoped and reusable policies used by the application. + */ + list( + appId: string, + params?: PolicyListParams, + options?: Core.RequestOptions, + ): Core.PagePromise; + list( + appId: string, + options?: Core.RequestOptions, + ): Core.PagePromise; + list( + appId: string, + params: PolicyListParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.PagePromise { + if (isRequestOptions(params)) { + return this.list(appId, {}, params); + } + const { account_id, zone_id } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return this._client.getAPIList( + `/${accountOrZone}/${accountOrZoneId}/access/apps/${appId}/policies`, + PolicyListResponsesSinglePage, + options, + ); + } + + /** + * Deletes an Access policy specific to an application. To delete a reusable + * policy, use the /account or zones/{account or zone_id}/policies/{uid} endpoint. + */ + delete( + appId: string, + policyId: string, + params?: PolicyDeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise; + delete( + appId: string, + policyId: string, + options?: Core.RequestOptions, + ): Core.APIPromise; + delete( + appId: string, + policyId: string, + params: PolicyDeleteParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(params)) { + return this.delete(appId, policyId, {}, params); + } + const { account_id, zone_id } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.delete( + `/${accountOrZone}/${accountOrZoneId}/access/apps/${appId}/policies/${policyId}`, + options, + ) as Core.APIPromise<{ result: PolicyDeleteResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Fetches a single Access policy configured for an application. Returns both + * exclusively owned and reusable policies used by the application. + */ + get( + appId: string, + policyId: string, + params?: PolicyGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise; + get(appId: string, policyId: string, options?: Core.RequestOptions): Core.APIPromise; + get( + appId: string, + policyId: string, + params: PolicyGetParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(params)) { + return this.get(appId, policyId, {}, params); + } + const { account_id, zone_id } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.get( + `/${accountOrZone}/${accountOrZoneId}/access/apps/${appId}/policies/${policyId}`, + options, + ) as Core.APIPromise<{ result: PolicyGetResponse }> + )._thenUnwrap((obj) => obj.result); + } +} + +export class PolicyListResponsesSinglePage extends SinglePage {} /** * A group of email addresses that can approve a temporary authentication request. @@ -140,7 +356,527 @@ export namespace Policy { } } +export interface PolicyCreateResponse { + /** + * The UUID of the policy + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: ApplicationsAPI.Decision; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; +} + +export interface PolicyUpdateResponse { + /** + * The UUID of the policy + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: ApplicationsAPI.Decision; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; +} + +export interface PolicyListResponse { + /** + * The UUID of the policy + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: ApplicationsAPI.Decision; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; +} + +export interface PolicyDeleteResponse { + /** + * UUID + */ + id?: string; +} + +export interface PolicyGetResponse { + /** + * The UUID of the policy + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: ApplicationsAPI.Decision; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; +} + +export interface PolicyCreateParams { + /** + * Body param: The action Access will take if a user matches this policy. + */ + decision: ApplicationsAPI.DecisionParam; + + /** + * Body param: Rules evaluated with an OR logical operator. A user needs to meet + * only one of the Include rules. + */ + include: Array; + + /** + * Body param: The name of the Access policy. + */ + name: string; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Body param: Requires the user to request access from an administrator at the + * start of each session. + */ + approval_required?: boolean; + + /** + * Body param: Rules evaluated with a NOT logical operator. To match the policy, a + * user cannot meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Body param: Require this application to be served in an isolated browser for + * users matching this policy. 'Client Web Isolation' must be on for the account in + * order to use this feature. + */ + isolation_required?: boolean; + + /** + * Body param: The order of execution for this policy. Must be unique for each + * policy within an app. + */ + precedence?: number; + + /** + * Body param: A custom message that will appear on the purpose justification + * screen. + */ + purpose_justification_prompt?: string; + + /** + * Body param: Require users to enter a justification when they log in to the + * application. + */ + purpose_justification_required?: boolean; + + /** + * Body param: Rules evaluated with an AND logical operator. To match the policy, a + * user must meet all of the Require rules. + */ + require?: Array; + + /** + * Body param: The amount of time that tokens issued for the application will be + * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us + * (or µs), ms, s, m, h. + */ + session_duration?: string; +} + +export interface PolicyUpdateParams { + /** + * Body param: The action Access will take if a user matches this policy. + */ + decision: ApplicationsAPI.DecisionParam; + + /** + * Body param: Rules evaluated with an OR logical operator. A user needs to meet + * only one of the Include rules. + */ + include: Array; + + /** + * Body param: The name of the Access policy. + */ + name: string; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Body param: Requires the user to request access from an administrator at the + * start of each session. + */ + approval_required?: boolean; + + /** + * Body param: Rules evaluated with a NOT logical operator. To match the policy, a + * user cannot meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Body param: Require this application to be served in an isolated browser for + * users matching this policy. 'Client Web Isolation' must be on for the account in + * order to use this feature. + */ + isolation_required?: boolean; + + /** + * Body param: The order of execution for this policy. Must be unique for each + * policy within an app. + */ + precedence?: number; + + /** + * Body param: A custom message that will appear on the purpose justification + * screen. + */ + purpose_justification_prompt?: string; + + /** + * Body param: Require users to enter a justification when they log in to the + * application. + */ + purpose_justification_required?: boolean; + + /** + * Body param: Rules evaluated with an AND logical operator. To match the policy, a + * user must meet all of the Require rules. + */ + require?: Array; + + /** + * Body param: The amount of time that tokens issued for the application will be + * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us + * (or µs), ms, s, m, h. + */ + session_duration?: string; +} + +export interface PolicyListParams { + /** + * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + */ + account_id?: string; + + /** + * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + */ + zone_id?: string; +} + +export interface PolicyDeleteParams { + /** + * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + */ + account_id?: string; + + /** + * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + */ + zone_id?: string; +} + +export interface PolicyGetParams { + /** + * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + */ + account_id?: string; + + /** + * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + */ + zone_id?: string; +} + export namespace Policies { export import ApprovalGroup = PoliciesAPI.ApprovalGroup; export import Policy = PoliciesAPI.Policy; + export import PolicyCreateResponse = PoliciesAPI.PolicyCreateResponse; + export import PolicyUpdateResponse = PoliciesAPI.PolicyUpdateResponse; + export import PolicyListResponse = PoliciesAPI.PolicyListResponse; + export import PolicyDeleteResponse = PoliciesAPI.PolicyDeleteResponse; + export import PolicyGetResponse = PoliciesAPI.PolicyGetResponse; + export import PolicyListResponsesSinglePage = PoliciesAPI.PolicyListResponsesSinglePage; + export import PolicyCreateParams = PoliciesAPI.PolicyCreateParams; + export import PolicyUpdateParams = PoliciesAPI.PolicyUpdateParams; + export import PolicyListParams = PoliciesAPI.PolicyListParams; + export import PolicyDeleteParams = PoliciesAPI.PolicyDeleteParams; + export import PolicyGetParams = PoliciesAPI.PolicyGetParams; } diff --git a/src/resources/zero-trust/access/bookmarks.ts b/src/resources/zero-trust/access/bookmarks.ts index c832d6f4f7..b3d326a36c 100644 --- a/src/resources/zero-trust/access/bookmarks.ts +++ b/src/resources/zero-trust/access/bookmarks.ts @@ -1,9 +1,91 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as BookmarksAPI from './bookmarks'; +import { SinglePage } from '../../../pagination'; -export class Bookmarks extends APIResource {} +export class Bookmarks extends APIResource { + /** + * Create a new Bookmark application. + */ + create( + bookmarkId: string, + params: BookmarkCreateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, body } = params; + return ( + this._client.post(`/accounts/${account_id}/access/bookmarks/${bookmarkId}`, { + body: body, + ...options, + }) as Core.APIPromise<{ result: Bookmark }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Updates a configured Bookmark application. + */ + update( + bookmarkId: string, + params: BookmarkUpdateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, body } = params; + return ( + this._client.put(`/accounts/${account_id}/access/bookmarks/${bookmarkId}`, { + body: body, + ...options, + }) as Core.APIPromise<{ result: Bookmark }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Lists Bookmark applications. + */ + list( + params: BookmarkListParams, + options?: Core.RequestOptions, + ): Core.PagePromise { + const { account_id } = params; + return this._client.getAPIList(`/accounts/${account_id}/access/bookmarks`, BookmarksSinglePage, options); + } + + /** + * Deletes a Bookmark application. + */ + delete( + bookmarkId: string, + params: BookmarkDeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.delete( + `/accounts/${account_id}/access/bookmarks/${bookmarkId}`, + options, + ) as Core.APIPromise<{ result: BookmarkDeleteResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Fetches a single Bookmark application. + */ + get( + bookmarkId: string, + params: BookmarkGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.get(`/accounts/${account_id}/access/bookmarks/${bookmarkId}`, options) as Core.APIPromise<{ + result: Bookmark; + }> + )._thenUnwrap((obj) => obj.result); + } +} + +export class BookmarksSinglePage extends SinglePage {} export interface Bookmark { /** @@ -36,6 +118,56 @@ export interface Bookmark { updated_at?: string; } +export interface BookmarkDeleteResponse { + /** + * UUID + */ + id?: string; +} + +export interface BookmarkCreateParams { + /** + * Path param: + */ + account_id: string; + + /** + * Body param: + */ + body: unknown; +} + +export interface BookmarkUpdateParams { + /** + * Path param: + */ + account_id: string; + + /** + * Body param: + */ + body: unknown; +} + +export interface BookmarkListParams { + account_id: string; +} + +export interface BookmarkDeleteParams { + account_id: string; +} + +export interface BookmarkGetParams { + account_id: string; +} + export namespace Bookmarks { export import Bookmark = BookmarksAPI.Bookmark; + export import BookmarkDeleteResponse = BookmarksAPI.BookmarkDeleteResponse; + export import BookmarksSinglePage = BookmarksAPI.BookmarksSinglePage; + export import BookmarkCreateParams = BookmarksAPI.BookmarkCreateParams; + export import BookmarkUpdateParams = BookmarksAPI.BookmarkUpdateParams; + export import BookmarkListParams = BookmarksAPI.BookmarkListParams; + export import BookmarkDeleteParams = BookmarksAPI.BookmarkDeleteParams; + export import BookmarkGetParams = BookmarksAPI.BookmarkGetParams; } diff --git a/src/resources/zero-trust/access/certificates/certificates.ts b/src/resources/zero-trust/access/certificates/certificates.ts index ddf4e02c77..4b3ae2fa10 100644 --- a/src/resources/zero-trust/access/certificates/certificates.ts +++ b/src/resources/zero-trust/access/certificates/certificates.ts @@ -40,6 +40,39 @@ export class Certificates extends APIResource { )._thenUnwrap((obj) => obj.result); } + /** + * Updates a configured mTLS certificate. + */ + update( + certificateId: string, + params: CertificateUpdateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, zone_id, ...body } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.put(`/${accountOrZone}/${accountOrZoneId}/access/certificates/${certificateId}`, { + body, + ...options, + }) as Core.APIPromise<{ result: Certificate }> + )._thenUnwrap((obj) => obj.result); + } + /** * Lists all mTLS root certificates. */ @@ -78,6 +111,90 @@ export class Certificates extends APIResource { options, ); } + + /** + * Deletes an mTLS certificate. + */ + delete( + certificateId: string, + params?: CertificateDeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise; + delete(certificateId: string, options?: Core.RequestOptions): Core.APIPromise; + delete( + certificateId: string, + params: CertificateDeleteParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(params)) { + return this.delete(certificateId, {}, params); + } + const { account_id, zone_id } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.delete( + `/${accountOrZone}/${accountOrZoneId}/access/certificates/${certificateId}`, + options, + ) as Core.APIPromise<{ result: CertificateDeleteResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Fetches a single mTLS certificate. + */ + get( + certificateId: string, + params?: CertificateGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise; + get(certificateId: string, options?: Core.RequestOptions): Core.APIPromise; + get( + certificateId: string, + params: CertificateGetParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(params)) { + return this.get(certificateId, {}, params); + } + const { account_id, zone_id } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.get( + `/${accountOrZone}/${accountOrZoneId}/access/certificates/${certificateId}`, + options, + ) as Core.APIPromise<{ result: Certificate }> + )._thenUnwrap((obj) => obj.result); + } } export class CertificatesSinglePage extends SinglePage {} @@ -120,6 +237,13 @@ export interface Certificate { updated_at?: string; } +export interface CertificateDeleteResponse { + /** + * UUID + */ + id?: string; +} + export interface CertificateCreateParams { /** * Body param: The certificate content. @@ -149,6 +273,30 @@ export interface CertificateCreateParams { associated_hostnames?: Array; } +export interface CertificateUpdateParams { + /** + * Body param: The hostnames of the applications that will use this certificate. + */ + associated_hostnames: Array; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The name of the certificate. + */ + name?: string; +} + export interface CertificateListParams { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. @@ -161,12 +309,40 @@ export interface CertificateListParams { zone_id?: string; } +export interface CertificateDeleteParams { + /** + * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + */ + account_id?: string; + + /** + * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + */ + zone_id?: string; +} + +export interface CertificateGetParams { + /** + * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + */ + account_id?: string; + + /** + * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + */ + zone_id?: string; +} + export namespace Certificates { export import AssociatedHostnames = CertificatesAPI.AssociatedHostnames; export import Certificate = CertificatesAPI.Certificate; + export import CertificateDeleteResponse = CertificatesAPI.CertificateDeleteResponse; export import CertificatesSinglePage = CertificatesAPI.CertificatesSinglePage; export import CertificateCreateParams = CertificatesAPI.CertificateCreateParams; + export import CertificateUpdateParams = CertificatesAPI.CertificateUpdateParams; export import CertificateListParams = CertificatesAPI.CertificateListParams; + export import CertificateDeleteParams = CertificatesAPI.CertificateDeleteParams; + export import CertificateGetParams = CertificatesAPI.CertificateGetParams; export import Settings = SettingsAPI.Settings; export import CertificateSettings = SettingsAPI.CertificateSettings; export import SettingUpdateResponse = SettingsAPI.SettingUpdateResponse; diff --git a/src/resources/zero-trust/access/certificates/index.ts b/src/resources/zero-trust/access/certificates/index.ts index 848e3341be..3c2abc1cbf 100644 --- a/src/resources/zero-trust/access/certificates/index.ts +++ b/src/resources/zero-trust/access/certificates/index.ts @@ -3,8 +3,12 @@ export { AssociatedHostnames, Certificate, + CertificateDeleteResponse, CertificateCreateParams, + CertificateUpdateParams, CertificateListParams, + CertificateDeleteParams, + CertificateGetParams, CertificatesSinglePage, Certificates, } from './certificates'; diff --git a/src/resources/zero-trust/access/custom-pages.ts b/src/resources/zero-trust/access/custom-pages.ts index dc101f810f..bbf630968d 100644 --- a/src/resources/zero-trust/access/custom-pages.ts +++ b/src/resources/zero-trust/access/custom-pages.ts @@ -1,9 +1,95 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as CustomPagesAPI from './custom-pages'; +import { SinglePage } from '../../../pagination'; -export class CustomPages extends APIResource {} +export class CustomPages extends APIResource { + /** + * Create a custom page + */ + create( + params: CustomPageCreateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.post(`/accounts/${account_id}/access/custom_pages`, { + body, + ...options, + }) as Core.APIPromise<{ result: CustomPageWithoutHTML }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Update a custom page + */ + update( + customPageId: string, + params: CustomPageUpdateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.put(`/accounts/${account_id}/access/custom_pages/${customPageId}`, { + body, + ...options, + }) as Core.APIPromise<{ result: CustomPageWithoutHTML }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * List custom pages + */ + list( + params: CustomPageListParams, + options?: Core.RequestOptions, + ): Core.PagePromise { + const { account_id } = params; + return this._client.getAPIList( + `/accounts/${account_id}/access/custom_pages`, + CustomPageWithoutHTMLsSinglePage, + options, + ); + } + + /** + * Delete a custom page + */ + delete( + customPageId: string, + params: CustomPageDeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.delete( + `/accounts/${account_id}/access/custom_pages/${customPageId}`, + options, + ) as Core.APIPromise<{ result: CustomPageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Fetches a custom page and also returns its HTML. + */ + get( + customPageId: string, + params: CustomPageGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.get( + `/accounts/${account_id}/access/custom_pages/${customPageId}`, + options, + ) as Core.APIPromise<{ result: CustomPage }> + )._thenUnwrap((obj) => obj.result); + } +} + +export class CustomPageWithoutHTMLsSinglePage extends SinglePage {} export interface CustomPage { /** @@ -62,7 +148,96 @@ export interface CustomPageWithoutHTML { updated_at?: string; } +export interface CustomPageDeleteResponse { + /** + * UUID + */ + id?: string; +} + +export interface CustomPageCreateParams { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: Custom page HTML. + */ + custom_html: string; + + /** + * Body param: Custom page name. + */ + name: string; + + /** + * Body param: Custom page type. + */ + type: 'identity_denied' | 'forbidden'; + + /** + * Body param: Number of apps the custom page is assigned to. + */ + app_count?: number; +} + +export interface CustomPageUpdateParams { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: Custom page HTML. + */ + custom_html: string; + + /** + * Body param: Custom page name. + */ + name: string; + + /** + * Body param: Custom page type. + */ + type: 'identity_denied' | 'forbidden'; + + /** + * Body param: Number of apps the custom page is assigned to. + */ + app_count?: number; +} + +export interface CustomPageListParams { + /** + * Identifier + */ + account_id: string; +} + +export interface CustomPageDeleteParams { + /** + * Identifier + */ + account_id: string; +} + +export interface CustomPageGetParams { + /** + * Identifier + */ + account_id: string; +} + export namespace CustomPages { export import CustomPage = CustomPagesAPI.CustomPage; export import CustomPageWithoutHTML = CustomPagesAPI.CustomPageWithoutHTML; + export import CustomPageDeleteResponse = CustomPagesAPI.CustomPageDeleteResponse; + export import CustomPageWithoutHTMLsSinglePage = CustomPagesAPI.CustomPageWithoutHTMLsSinglePage; + export import CustomPageCreateParams = CustomPagesAPI.CustomPageCreateParams; + export import CustomPageUpdateParams = CustomPagesAPI.CustomPageUpdateParams; + export import CustomPageListParams = CustomPagesAPI.CustomPageListParams; + export import CustomPageDeleteParams = CustomPagesAPI.CustomPageDeleteParams; + export import CustomPageGetParams = CustomPagesAPI.CustomPageGetParams; } diff --git a/src/resources/zero-trust/access/groups.ts b/src/resources/zero-trust/access/groups.ts index 9cc298c02a..5f0814d296 100644 --- a/src/resources/zero-trust/access/groups.ts +++ b/src/resources/zero-trust/access/groups.ts @@ -38,6 +38,39 @@ export class Groups extends APIResource { )._thenUnwrap((obj) => obj.result); } + /** + * Updates a configured Access group. + */ + update( + groupId: string, + params: GroupUpdateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, zone_id, ...body } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.put(`/${accountOrZone}/${accountOrZoneId}/access/groups/${groupId}`, { + body, + ...options, + }) as Core.APIPromise<{ result: ZeroTrustGroup }> + )._thenUnwrap((obj) => obj.result); + } + /** * Lists all Access groups. */ @@ -76,6 +109,90 @@ export class Groups extends APIResource { options, ); } + + /** + * Deletes an Access group. + */ + delete( + groupId: string, + params?: GroupDeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise; + delete(groupId: string, options?: Core.RequestOptions): Core.APIPromise; + delete( + groupId: string, + params: GroupDeleteParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(params)) { + return this.delete(groupId, {}, params); + } + const { account_id, zone_id } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.delete( + `/${accountOrZone}/${accountOrZoneId}/access/groups/${groupId}`, + options, + ) as Core.APIPromise<{ result: GroupDeleteResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Fetches a single Access group. + */ + get( + groupId: string, + params?: GroupGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise; + get(groupId: string, options?: Core.RequestOptions): Core.APIPromise; + get( + groupId: string, + params: GroupGetParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(params)) { + return this.get(groupId, {}, params); + } + const { account_id, zone_id } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.get( + `/${accountOrZone}/${accountOrZoneId}/access/groups/${groupId}`, + options, + ) as Core.APIPromise<{ result: ZeroTrustGroup }> + )._thenUnwrap((obj) => obj.result); + } } export class ZeroTrustGroupsSinglePage extends SinglePage {} @@ -120,6 +237,13 @@ export interface ZeroTrustGroup { updated_at?: string; } +export interface GroupDeleteResponse { + /** + * UUID + */ + id?: string; +} + export interface GroupCreateParams { /** * Body param: Rules evaluated with an OR logical operator. A user needs to meet @@ -162,6 +286,48 @@ export interface GroupCreateParams { require?: Array; } +export interface GroupUpdateParams { + /** + * Body param: Rules evaluated with an OR logical operator. A user needs to meet + * only one of the Include rules. + */ + include: Array; + + /** + * Body param: The name of the Access group. + */ + name: string; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: Rules evaluated with a NOT logical operator. To match a policy, a + * user cannot meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Body param: Whether this is the default group + */ + is_default?: boolean; + + /** + * Body param: Rules evaluated with an AND logical operator. To match a policy, a + * user must meet all of the Require rules. + */ + require?: Array; +} + export interface GroupListParams { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. @@ -174,9 +340,37 @@ export interface GroupListParams { zone_id?: string; } +export interface GroupDeleteParams { + /** + * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + */ + account_id?: string; + + /** + * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + */ + zone_id?: string; +} + +export interface GroupGetParams { + /** + * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + */ + account_id?: string; + + /** + * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + */ + zone_id?: string; +} + export namespace Groups { export import ZeroTrustGroup = GroupsAPI.ZeroTrustGroup; + export import GroupDeleteResponse = GroupsAPI.GroupDeleteResponse; export import ZeroTrustGroupsSinglePage = GroupsAPI.ZeroTrustGroupsSinglePage; export import GroupCreateParams = GroupsAPI.GroupCreateParams; + export import GroupUpdateParams = GroupsAPI.GroupUpdateParams; export import GroupListParams = GroupsAPI.GroupListParams; + export import GroupDeleteParams = GroupsAPI.GroupDeleteParams; + export import GroupGetParams = GroupsAPI.GroupGetParams; } diff --git a/src/resources/zero-trust/access/index.ts b/src/resources/zero-trust/access/index.ts index 3360ad649d..3998f345b4 100644 --- a/src/resources/zero-trust/access/index.ts +++ b/src/resources/zero-trust/access/index.ts @@ -23,7 +23,7 @@ export { ServiceTokenRule, Access, } from './access'; -export { AccessUser, Users } from './users/index'; +export { AccessUser, UserListParams, AccessUsersSinglePage, Users } from './users/index'; export { AllowedHeaders, AllowedIdPs, @@ -57,28 +57,81 @@ export { export { AssociatedHostnames, Certificate, + CertificateDeleteResponse, CertificateCreateParams, + CertificateUpdateParams, CertificateListParams, + CertificateDeleteParams, + CertificateGetParams, CertificatesSinglePage, Certificates, } from './certificates/index'; -export { Bookmark, Bookmarks } from './bookmarks'; -export { CustomPage, CustomPageWithoutHTML, CustomPages } from './custom-pages'; -export { Keys } from './keys'; +export { + Bookmark, + BookmarkDeleteResponse, + BookmarkCreateParams, + BookmarkUpdateParams, + BookmarkListParams, + BookmarkDeleteParams, + BookmarkGetParams, + BookmarksSinglePage, + Bookmarks, +} from './bookmarks'; +export { + CustomPage, + CustomPageWithoutHTML, + CustomPageDeleteResponse, + CustomPageCreateParams, + CustomPageUpdateParams, + CustomPageListParams, + CustomPageDeleteParams, + CustomPageGetParams, + CustomPageWithoutHTMLsSinglePage, + CustomPages, +} from './custom-pages'; +export { + KeyUpdateResponse, + KeyGetResponse, + KeyRotateResponse, + KeyUpdateParams, + KeyGetParams, + KeyRotateParams, + Keys, +} from './keys'; export { Logs } from './logs/index'; export { ServiceToken, ServiceTokenCreateResponse, + ServiceTokenRotateResponse, ServiceTokenCreateParams, + ServiceTokenUpdateParams, ServiceTokenListParams, + ServiceTokenDeleteParams, + ServiceTokenGetParams, + ServiceTokenRefreshParams, + ServiceTokenRotateParams, ServiceTokensSinglePage, ServiceTokens, } from './service-tokens'; -export { Tag, Tags } from './tags'; +export { + Tag, + TagDeleteResponse, + TagCreateParams, + TagUpdateParams, + TagListParams, + TagDeleteParams, + TagGetParams, + TagsSinglePage, + Tags, +} from './tags'; export { ZeroTrustGroup, + GroupDeleteResponse, GroupCreateParams, + GroupUpdateParams, GroupListParams, + GroupDeleteParams, + GroupGetParams, ZeroTrustGroupsSinglePage, Groups, } from './groups'; diff --git a/src/resources/zero-trust/access/keys.ts b/src/resources/zero-trust/access/keys.ts index 2bb90ee421..d07be19c11 100644 --- a/src/resources/zero-trust/access/keys.ts +++ b/src/resources/zero-trust/access/keys.ts @@ -1,5 +1,84 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import * as Core from '../../../core'; import { APIResource } from '../../../resource'; +import * as KeysAPI from './keys'; -export class Keys extends APIResource {} +export class Keys extends APIResource { + /** + * Updates the Access key rotation settings for an account. + */ + update(params: KeyUpdateParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.put(`/accounts/${account_id}/access/keys`, { body, ...options }) as Core.APIPromise<{ + result: KeyUpdateResponse; + }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Gets the Access key rotation settings for an account. + */ + get(params: KeyGetParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id } = params; + return ( + this._client.get(`/accounts/${account_id}/access/keys`, options) as Core.APIPromise<{ + result: KeyGetResponse; + }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Perfoms a key rotation for an account. + */ + rotate(params: KeyRotateParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id } = params; + return ( + this._client.post(`/accounts/${account_id}/access/keys/rotate`, options) as Core.APIPromise<{ + result: KeyRotateResponse; + }> + )._thenUnwrap((obj) => obj.result); + } +} + +export type KeyUpdateResponse = unknown | string; + +export type KeyGetResponse = unknown | string; + +export type KeyRotateResponse = unknown | string; + +export interface KeyUpdateParams { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: The number of days between key rotations. + */ + key_rotation_interval_days: number; +} + +export interface KeyGetParams { + /** + * Identifier + */ + account_id: string; +} + +export interface KeyRotateParams { + /** + * Identifier + */ + account_id: string; +} + +export namespace Keys { + export import KeyUpdateResponse = KeysAPI.KeyUpdateResponse; + export import KeyGetResponse = KeysAPI.KeyGetResponse; + export import KeyRotateResponse = KeysAPI.KeyRotateResponse; + export import KeyUpdateParams = KeysAPI.KeyUpdateParams; + export import KeyGetParams = KeysAPI.KeyGetParams; + export import KeyRotateParams = KeysAPI.KeyRotateParams; +} diff --git a/src/resources/zero-trust/access/logs/access-requests.ts b/src/resources/zero-trust/access/logs/access-requests.ts index 57f919e34d..cb33e40c30 100644 --- a/src/resources/zero-trust/access/logs/access-requests.ts +++ b/src/resources/zero-trust/access/logs/access-requests.ts @@ -1,9 +1,25 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import * as Core from '../../../../core'; import { APIResource } from '../../../../resource'; import * as AccessRequestsAPI from './access-requests'; -export class AccessRequests extends APIResource {} +export class AccessRequests extends APIResource { + /** + * Gets a list of Access authentication audit logs for an account. + */ + list( + params: AccessRequestListParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.get(`/accounts/${account_id}/access/logs/access_requests`, options) as Core.APIPromise<{ + result: AccessRequestListResponse | null; + }> + )._thenUnwrap((obj) => obj.result); + } +} export interface AccessRequests { /** @@ -49,6 +65,17 @@ export interface AccessRequests { user_email?: string; } +export type AccessRequestListResponse = Array; + +export interface AccessRequestListParams { + /** + * Identifier + */ + account_id: string; +} + export namespace AccessRequests { export import AccessRequests = AccessRequestsAPI.AccessRequests; + export import AccessRequestListResponse = AccessRequestsAPI.AccessRequestListResponse; + export import AccessRequestListParams = AccessRequestsAPI.AccessRequestListParams; } diff --git a/src/resources/zero-trust/access/logs/index.ts b/src/resources/zero-trust/access/logs/index.ts index b454fdb4b4..3ccda1b1ea 100644 --- a/src/resources/zero-trust/access/logs/index.ts +++ b/src/resources/zero-trust/access/logs/index.ts @@ -1,4 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { AccessRequests } from './access-requests'; +export { AccessRequests, AccessRequestListResponse, AccessRequestListParams } from './access-requests'; export { Logs } from './logs'; diff --git a/src/resources/zero-trust/access/logs/logs.ts b/src/resources/zero-trust/access/logs/logs.ts index fa67d65b57..58f51aa461 100644 --- a/src/resources/zero-trust/access/logs/logs.ts +++ b/src/resources/zero-trust/access/logs/logs.ts @@ -9,4 +9,6 @@ export class Logs extends APIResource { export namespace Logs { export import AccessRequests = AccessRequestsAPI.AccessRequests; + export import AccessRequestListResponse = AccessRequestsAPI.AccessRequestListResponse; + export import AccessRequestListParams = AccessRequestsAPI.AccessRequestListParams; } diff --git a/src/resources/zero-trust/access/service-tokens.ts b/src/resources/zero-trust/access/service-tokens.ts index 0c52f8696a..8e9b69d0e7 100644 --- a/src/resources/zero-trust/access/service-tokens.ts +++ b/src/resources/zero-trust/access/service-tokens.ts @@ -42,6 +42,39 @@ export class ServiceTokens extends APIResource { )._thenUnwrap((obj) => obj.result); } + /** + * Updates a configured service token. + */ + update( + serviceTokenId: string, + params: ServiceTokenUpdateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, zone_id, ...body } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.put(`/${accountOrZone}/${accountOrZoneId}/access/service_tokens/${serviceTokenId}`, { + body, + ...options, + }) as Core.APIPromise<{ result: ServiceToken }> + )._thenUnwrap((obj) => obj.result); + } + /** * Lists all service tokens. */ @@ -80,6 +113,124 @@ export class ServiceTokens extends APIResource { options, ); } + + /** + * Deletes a service token. + */ + delete( + serviceTokenId: string, + params?: ServiceTokenDeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise; + delete(serviceTokenId: string, options?: Core.RequestOptions): Core.APIPromise; + delete( + serviceTokenId: string, + params: ServiceTokenDeleteParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(params)) { + return this.delete(serviceTokenId, {}, params); + } + const { account_id, zone_id } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.delete( + `/${accountOrZone}/${accountOrZoneId}/access/service_tokens/${serviceTokenId}`, + options, + ) as Core.APIPromise<{ result: ServiceToken }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Fetches a single service token. + */ + get( + serviceTokenId: string, + params?: ServiceTokenGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise; + get(serviceTokenId: string, options?: Core.RequestOptions): Core.APIPromise; + get( + serviceTokenId: string, + params: ServiceTokenGetParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(params)) { + return this.get(serviceTokenId, {}, params); + } + const { account_id, zone_id } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.get( + `/${accountOrZone}/${accountOrZoneId}/access/service_tokens/${serviceTokenId}`, + options, + ) as Core.APIPromise<{ result: ServiceToken }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Refreshes the expiration of a service token. + */ + refresh( + serviceTokenId: string, + params: ServiceTokenRefreshParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.post( + `/accounts/${account_id}/access/service_tokens/${serviceTokenId}/refresh`, + options, + ) as Core.APIPromise<{ result: ServiceToken }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Generates a new Client Secret for a service token and revokes the old one. + */ + rotate( + serviceTokenId: string, + params: ServiceTokenRotateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.post( + `/accounts/${account_id}/access/service_tokens/${serviceTokenId}/rotate`, + options, + ) as Core.APIPromise<{ result: ServiceTokenRotateResponse }> + )._thenUnwrap((obj) => obj.result); + } } export class ServiceTokensSinglePage extends SinglePage {} @@ -148,6 +299,41 @@ export interface ServiceTokenCreateResponse { updated_at?: string; } +export interface ServiceTokenRotateResponse { + /** + * The ID of the service token. + */ + id?: string; + + /** + * The Client ID for the service token. Access will check for this value in the + * `CF-Access-Client-ID` request header. + */ + client_id?: string; + + /** + * The Client Secret for the service token. Access will check for this value in the + * `CF-Access-Client-Secret` request header. + */ + client_secret?: string; + + created_at?: string; + + /** + * The duration for how long the service token will be valid. Must be in the format + * `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h. The + * default is 1 year in hours (8760h). + */ + duration?: string; + + /** + * The name of the service token. + */ + name?: string; + + updated_at?: string; +} + export interface ServiceTokenCreateParams { /** * Body param: The name of the service token. @@ -174,6 +360,32 @@ export interface ServiceTokenCreateParams { duration?: string; } +export interface ServiceTokenUpdateParams { + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The duration for how long the service token will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. The default is 1 year in hours (8760h). + */ + duration?: string; + + /** + * Body param: The name of the service token. + */ + name?: string; +} + export interface ServiceTokenListParams { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. @@ -186,10 +398,54 @@ export interface ServiceTokenListParams { zone_id?: string; } +export interface ServiceTokenDeleteParams { + /** + * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + */ + account_id?: string; + + /** + * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + */ + zone_id?: string; +} + +export interface ServiceTokenGetParams { + /** + * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + */ + account_id?: string; + + /** + * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + */ + zone_id?: string; +} + +export interface ServiceTokenRefreshParams { + /** + * Identifier + */ + account_id: string; +} + +export interface ServiceTokenRotateParams { + /** + * Identifier + */ + account_id: string; +} + export namespace ServiceTokens { export import ServiceToken = ServiceTokensAPI.ServiceToken; export import ServiceTokenCreateResponse = ServiceTokensAPI.ServiceTokenCreateResponse; + export import ServiceTokenRotateResponse = ServiceTokensAPI.ServiceTokenRotateResponse; export import ServiceTokensSinglePage = ServiceTokensAPI.ServiceTokensSinglePage; export import ServiceTokenCreateParams = ServiceTokensAPI.ServiceTokenCreateParams; + export import ServiceTokenUpdateParams = ServiceTokensAPI.ServiceTokenUpdateParams; export import ServiceTokenListParams = ServiceTokensAPI.ServiceTokenListParams; + export import ServiceTokenDeleteParams = ServiceTokensAPI.ServiceTokenDeleteParams; + export import ServiceTokenGetParams = ServiceTokensAPI.ServiceTokenGetParams; + export import ServiceTokenRefreshParams = ServiceTokensAPI.ServiceTokenRefreshParams; + export import ServiceTokenRotateParams = ServiceTokensAPI.ServiceTokenRotateParams; } diff --git a/src/resources/zero-trust/access/tags.ts b/src/resources/zero-trust/access/tags.ts index b719c5b274..9b5986b1c5 100644 --- a/src/resources/zero-trust/access/tags.ts +++ b/src/resources/zero-trust/access/tags.ts @@ -1,9 +1,74 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as TagsAPI from './tags'; +import { SinglePage } from '../../../pagination'; -export class Tags extends APIResource {} +export class Tags extends APIResource { + /** + * Create a tag + */ + create(params: TagCreateParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.post(`/accounts/${account_id}/access/tags`, { body, ...options }) as Core.APIPromise<{ + result: Tag; + }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Update a tag + */ + update(tagName: string, params: TagUpdateParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.put(`/accounts/${account_id}/access/tags/${tagName}`, { + body, + ...options, + }) as Core.APIPromise<{ result: Tag }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * List tags + */ + list(params: TagListParams, options?: Core.RequestOptions): Core.PagePromise { + const { account_id } = params; + return this._client.getAPIList(`/accounts/${account_id}/access/tags`, TagsSinglePage, options); + } + + /** + * Delete a tag + */ + delete( + tagName: string, + params: TagDeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.delete(`/accounts/${account_id}/access/tags/${tagName}`, options) as Core.APIPromise<{ + result: TagDeleteResponse; + }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Get a tag + */ + get(tagName: string, params: TagGetParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id } = params; + return ( + this._client.get(`/accounts/${account_id}/access/tags/${tagName}`, options) as Core.APIPromise<{ + result: Tag; + }> + )._thenUnwrap((obj) => obj.result); + } +} + +export class TagsSinglePage extends SinglePage {} /** * A tag @@ -24,6 +89,65 @@ export interface Tag { updated_at?: string; } +export interface TagDeleteResponse { + /** + * The name of the tag + */ + name?: string; +} + +export interface TagCreateParams { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: The name of the tag + */ + name: string; +} + +export interface TagUpdateParams { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: The name of the tag + */ + name: string; +} + +export interface TagListParams { + /** + * Identifier + */ + account_id: string; +} + +export interface TagDeleteParams { + /** + * Identifier + */ + account_id: string; +} + +export interface TagGetParams { + /** + * Identifier + */ + account_id: string; +} + export namespace Tags { export import Tag = TagsAPI.Tag; + export import TagDeleteResponse = TagsAPI.TagDeleteResponse; + export import TagsSinglePage = TagsAPI.TagsSinglePage; + export import TagCreateParams = TagsAPI.TagCreateParams; + export import TagUpdateParams = TagsAPI.TagUpdateParams; + export import TagListParams = TagsAPI.TagListParams; + export import TagDeleteParams = TagsAPI.TagDeleteParams; + export import TagGetParams = TagsAPI.TagGetParams; } diff --git a/src/resources/zero-trust/access/users/active-sessions.ts b/src/resources/zero-trust/access/users/active-sessions.ts index 354017c029..229cd61dff 100644 --- a/src/resources/zero-trust/access/users/active-sessions.ts +++ b/src/resources/zero-trust/access/users/active-sessions.ts @@ -1,5 +1,193 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import * as Core from '../../../../core'; import { APIResource } from '../../../../resource'; +import * as ActiveSessionsAPI from './active-sessions'; +import * as UserPolicyChecksAPI from '../applications/user-policy-checks'; +import { SinglePage } from '../../../../pagination'; -export class ActiveSessions extends APIResource {} +export class ActiveSessions extends APIResource { + /** + * Get active sessions for a single user. + */ + list( + userId: string, + params: ActiveSessionListParams, + options?: Core.RequestOptions, + ): Core.PagePromise { + const { account_id } = params; + return this._client.getAPIList( + `/accounts/${account_id}/access/users/${userId}/active_sessions`, + ActiveSessionListResponsesSinglePage, + options, + ); + } + + /** + * Get an active session for a single user. + */ + get( + userId: string, + nonce: string, + params: ActiveSessionGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.get( + `/accounts/${account_id}/access/users/${userId}/active_sessions/${nonce}`, + options, + ) as Core.APIPromise<{ result: ActiveSessionGetResponse }> + )._thenUnwrap((obj) => obj.result); + } +} + +export class ActiveSessionListResponsesSinglePage extends SinglePage {} + +export interface ActiveSessionListResponse { + expiration?: number; + + metadata?: ActiveSessionListResponse.Metadata; + + name?: string; +} + +export namespace ActiveSessionListResponse { + export interface Metadata { + apps?: Record; + + expires?: number; + + iat?: number; + + nonce?: string; + + ttl?: number; + } + + export namespace Metadata { + export interface Apps { + hostname?: string; + + name?: string; + + type?: string; + + uid?: string; + } + } +} + +export interface ActiveSessionGetResponse { + account_id?: string; + + auth_status?: string; + + common_name?: string; + + device_id?: string; + + device_sessions?: Record; + + devicePosture?: Record; + + email?: string; + + geo?: UserPolicyChecksAPI.UserPolicyCheckGeo; + + iat?: number; + + idp?: ActiveSessionGetResponse.IdP; + + ip?: string; + + is_gateway?: boolean; + + is_warp?: boolean; + + isActive?: boolean; + + mtls_auth?: ActiveSessionGetResponse.MTLSAuth; + + service_token_id?: string; + + service_token_status?: boolean; + + user_uuid?: string; + + version?: number; +} + +export namespace ActiveSessionGetResponse { + export interface DeviceSessions { + last_authenticated?: number; + } + + export interface DevicePosture { + id?: string; + + check?: DevicePosture.Check; + + data?: unknown; + + description?: string; + + error?: string; + + rule_name?: string; + + success?: boolean; + + timestamp?: string; + + type?: string; + } + + export namespace DevicePosture { + export interface Check { + exists?: boolean; + + path?: string; + } + } + + export interface IdP { + id?: string; + + type?: string; + } + + export interface MTLSAuth { + auth_status?: string; + + cert_issuer_dn?: string; + + cert_issuer_ski?: string; + + cert_presented?: boolean; + + cert_serial?: string; + } +} + +export interface ActiveSessionListParams { + /** + * Identifier + */ + account_id: string; +} + +export interface ActiveSessionGetParams { + /** + * Identifier + */ + account_id: string; +} + +export namespace ActiveSessions { + export import ActiveSessionListResponse = ActiveSessionsAPI.ActiveSessionListResponse; + export import ActiveSessionGetResponse = ActiveSessionsAPI.ActiveSessionGetResponse; + export import ActiveSessionListResponsesSinglePage = ActiveSessionsAPI.ActiveSessionListResponsesSinglePage; + export import ActiveSessionListParams = ActiveSessionsAPI.ActiveSessionListParams; + export import ActiveSessionGetParams = ActiveSessionsAPI.ActiveSessionGetParams; +} diff --git a/src/resources/zero-trust/access/users/failed-logins.ts b/src/resources/zero-trust/access/users/failed-logins.ts index 296de81891..4605a036ac 100644 --- a/src/resources/zero-trust/access/users/failed-logins.ts +++ b/src/resources/zero-trust/access/users/failed-logins.ts @@ -1,5 +1,45 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import * as Core from '../../../../core'; import { APIResource } from '../../../../resource'; +import * as FailedLoginsAPI from './failed-logins'; +import { SinglePage } from '../../../../pagination'; -export class FailedLogins extends APIResource {} +export class FailedLogins extends APIResource { + /** + * Get all failed login attempts for a single user. + */ + list( + userId: string, + params: FailedLoginListParams, + options?: Core.RequestOptions, + ): Core.PagePromise { + const { account_id } = params; + return this._client.getAPIList( + `/accounts/${account_id}/access/users/${userId}/failed_logins`, + FailedLoginListResponsesSinglePage, + options, + ); + } +} + +export class FailedLoginListResponsesSinglePage extends SinglePage {} + +export interface FailedLoginListResponse { + expiration?: number; + + metadata?: unknown; +} + +export interface FailedLoginListParams { + /** + * Identifier + */ + account_id: string; +} + +export namespace FailedLogins { + export import FailedLoginListResponse = FailedLoginsAPI.FailedLoginListResponse; + export import FailedLoginListResponsesSinglePage = FailedLoginsAPI.FailedLoginListResponsesSinglePage; + export import FailedLoginListParams = FailedLoginsAPI.FailedLoginListParams; +} diff --git a/src/resources/zero-trust/access/users/index.ts b/src/resources/zero-trust/access/users/index.ts index 559dd2384e..f3226f721e 100644 --- a/src/resources/zero-trust/access/users/index.ts +++ b/src/resources/zero-trust/access/users/index.ts @@ -1,6 +1,18 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { AccessUser, Users } from './users'; -export { ActiveSessions } from './active-sessions'; -export { FailedLogins } from './failed-logins'; -export { Identity, LastSeenIdentity } from './last-seen-identity'; +export { AccessUser, UserListParams, AccessUsersSinglePage, Users } from './users'; +export { + ActiveSessionListResponse, + ActiveSessionGetResponse, + ActiveSessionListParams, + ActiveSessionGetParams, + ActiveSessionListResponsesSinglePage, + ActiveSessions, +} from './active-sessions'; +export { + FailedLoginListResponse, + FailedLoginListParams, + FailedLoginListResponsesSinglePage, + FailedLogins, +} from './failed-logins'; +export { Identity, LastSeenIdentityGetParams, LastSeenIdentity } from './last-seen-identity'; diff --git a/src/resources/zero-trust/access/users/last-seen-identity.ts b/src/resources/zero-trust/access/users/last-seen-identity.ts index 653416254e..7bbeb13dd2 100644 --- a/src/resources/zero-trust/access/users/last-seen-identity.ts +++ b/src/resources/zero-trust/access/users/last-seen-identity.ts @@ -1,10 +1,28 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import * as Core from '../../../../core'; import { APIResource } from '../../../../resource'; import * as LastSeenIdentityAPI from './last-seen-identity'; import * as UserPolicyChecksAPI from '../applications/user-policy-checks'; -export class LastSeenIdentity extends APIResource {} +export class LastSeenIdentity extends APIResource { + /** + * Get last seen identity for a single user. + */ + get( + userId: string, + params: LastSeenIdentityGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.get( + `/accounts/${account_id}/access/users/${userId}/last_seen_identity`, + options, + ) as Core.APIPromise<{ result: Identity }> + )._thenUnwrap((obj) => obj.result); + } +} export interface Identity { account_id?: string; @@ -96,6 +114,14 @@ export namespace Identity { } } +export interface LastSeenIdentityGetParams { + /** + * Identifier + */ + account_id: string; +} + export namespace LastSeenIdentity { export import Identity = LastSeenIdentityAPI.Identity; + export import LastSeenIdentityGetParams = LastSeenIdentityAPI.LastSeenIdentityGetParams; } diff --git a/src/resources/zero-trust/access/users/users.ts b/src/resources/zero-trust/access/users/users.ts index b004cadefb..6305f96991 100644 --- a/src/resources/zero-trust/access/users/users.ts +++ b/src/resources/zero-trust/access/users/users.ts @@ -1,10 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import * as Core from '../../../../core'; import { APIResource } from '../../../../resource'; import * as UsersAPI from './users'; import * as ActiveSessionsAPI from './active-sessions'; import * as FailedLoginsAPI from './failed-logins'; import * as LastSeenIdentityAPI from './last-seen-identity'; +import { SinglePage } from '../../../../pagination'; export class Users extends APIResource { activeSessions: ActiveSessionsAPI.ActiveSessions = new ActiveSessionsAPI.ActiveSessions(this._client); @@ -12,8 +14,21 @@ export class Users extends APIResource { this._client, ); failedLogins: FailedLoginsAPI.FailedLogins = new FailedLoginsAPI.FailedLogins(this._client); + + /** + * Gets a list of users for an account. + */ + list( + params: UserListParams, + options?: Core.RequestOptions, + ): Core.PagePromise { + const { account_id } = params; + return this._client.getAPIList(`/accounts/${account_id}/access/users`, AccessUsersSinglePage, options); + } } +export class AccessUsersSinglePage extends SinglePage {} + export interface AccessUser { /** * UUID @@ -65,10 +80,28 @@ export interface AccessUser { updated_at?: string; } +export interface UserListParams { + /** + * Identifier + */ + account_id: string; +} + export namespace Users { export import AccessUser = UsersAPI.AccessUser; + export import AccessUsersSinglePage = UsersAPI.AccessUsersSinglePage; + export import UserListParams = UsersAPI.UserListParams; export import ActiveSessions = ActiveSessionsAPI.ActiveSessions; + export import ActiveSessionListResponse = ActiveSessionsAPI.ActiveSessionListResponse; + export import ActiveSessionGetResponse = ActiveSessionsAPI.ActiveSessionGetResponse; + export import ActiveSessionListResponsesSinglePage = ActiveSessionsAPI.ActiveSessionListResponsesSinglePage; + export import ActiveSessionListParams = ActiveSessionsAPI.ActiveSessionListParams; + export import ActiveSessionGetParams = ActiveSessionsAPI.ActiveSessionGetParams; export import LastSeenIdentity = LastSeenIdentityAPI.LastSeenIdentity; export import Identity = LastSeenIdentityAPI.Identity; + export import LastSeenIdentityGetParams = LastSeenIdentityAPI.LastSeenIdentityGetParams; export import FailedLogins = FailedLoginsAPI.FailedLogins; + export import FailedLoginListResponse = FailedLoginsAPI.FailedLoginListResponse; + export import FailedLoginListResponsesSinglePage = FailedLoginsAPI.FailedLoginListResponsesSinglePage; + export import FailedLoginListParams = FailedLoginsAPI.FailedLoginListParams; } diff --git a/src/resources/zero-trust/identity-providers.ts b/src/resources/zero-trust/identity-providers.ts index c003f9afec..8b9e15dd00 100644 --- a/src/resources/zero-trust/identity-providers.ts +++ b/src/resources/zero-trust/identity-providers.ts @@ -40,6 +40,39 @@ export class IdentityProviders extends APIResource { )._thenUnwrap((obj) => obj.result); } + /** + * Updates a configured identity provider. + */ + update( + identityProviderId: string, + params: IdentityProviderUpdateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, zone_id, ...body } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.put( + `/${accountOrZone}/${accountOrZoneId}/access/identity_providers/${identityProviderId}`, + { body, ...options }, + ) as Core.APIPromise<{ result: IdentityProvider }> + )._thenUnwrap((obj) => obj.result); + } + /** * Lists all configured identity providers. */ @@ -80,6 +113,93 @@ export class IdentityProviders extends APIResource { options, ); } + + /** + * Deletes an identity provider from Access. + */ + delete( + identityProviderId: string, + params?: IdentityProviderDeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise; + delete( + identityProviderId: string, + options?: Core.RequestOptions, + ): Core.APIPromise; + delete( + identityProviderId: string, + params: IdentityProviderDeleteParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(params)) { + return this.delete(identityProviderId, {}, params); + } + const { account_id, zone_id } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.delete( + `/${accountOrZone}/${accountOrZoneId}/access/identity_providers/${identityProviderId}`, + options, + ) as Core.APIPromise<{ result: IdentityProviderDeleteResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Fetches a configured identity provider. + */ + get( + identityProviderId: string, + params?: IdentityProviderGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise; + get(identityProviderId: string, options?: Core.RequestOptions): Core.APIPromise; + get( + identityProviderId: string, + params: IdentityProviderGetParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(params)) { + return this.get(identityProviderId, {}, params); + } + const { account_id, zone_id } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.get( + `/${accountOrZone}/${accountOrZoneId}/access/identity_providers/${identityProviderId}`, + options, + ) as Core.APIPromise<{ result: IdentityProvider }> + )._thenUnwrap((obj) => obj.result); + } } export class IdentityProviderListResponsesSinglePage extends SinglePage {} @@ -1787,6 +1907,13 @@ export namespace IdentityProviderListResponse { } } +export interface IdentityProviderDeleteResponse { + /** + * UUID + */ + id?: string; +} + export type IdentityProviderCreateParams = | IdentityProviderCreateParams.AzureAD | IdentityProviderCreateParams.AccessCentrify @@ -2726,7 +2853,970 @@ export namespace IdentityProviderCreateParams { } } -export interface IdentityProviderListParams { +export type IdentityProviderUpdateParams = + | IdentityProviderUpdateParams.AzureAD + | IdentityProviderUpdateParams.AccessCentrify + | IdentityProviderUpdateParams.AccessFacebook + | IdentityProviderUpdateParams.AccessGitHub + | IdentityProviderUpdateParams.AccessGoogle + | IdentityProviderUpdateParams.AccessGoogleApps + | IdentityProviderUpdateParams.AccessLinkedin + | IdentityProviderUpdateParams.AccessOIDC + | IdentityProviderUpdateParams.AccessOkta + | IdentityProviderUpdateParams.AccessOnelogin + | IdentityProviderUpdateParams.AccessPingone + | IdentityProviderUpdateParams.AccessSAML + | IdentityProviderUpdateParams.AccessYandex + | IdentityProviderUpdateParams.AccessOnetimepin; + +export namespace IdentityProviderUpdateParams { + export interface AzureAD { + /** + * Body param: The configuration parameters for the identity provider. To view the + * required parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + config: IdentityProviderUpdateParams.AzureAD.Config; + + /** + * Body param: The name of the identity provider, shown to users on the login page. + */ + name: string; + + /** + * Body param: The type of identity provider. To determine the value for a specific + * provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + type: IdentityProviderTypeParam; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The configuration settings for enabling a System for Cross-Domain + * Identity Management (SCIM) with the identity provider. + */ + scim_config?: ScimConfigParam; + } + + export namespace AzureAD { + /** + * The configuration parameters for the identity provider. To view the required + * parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + export interface Config { + /** + * Custom claims + */ + claims?: Array; + + /** + * Your OAuth Client ID + */ + client_id?: string; + + /** + * Your OAuth Client Secret + */ + client_secret?: string; + + /** + * Should Cloudflare try to load authentication contexts from your account + */ + conditional_access_enabled?: boolean; + + /** + * Your Azure directory uuid + */ + directory_id?: string; + + /** + * The claim name for email in the id_token response. + */ + email_claim_name?: string; + + /** + * Indicates the type of user interaction that is required. prompt=login forces the + * user to enter their credentials on that request, negating single-sign on. + * prompt=none is the opposite. It ensures that the user isn't presented with any + * interactive prompt. If the request can't be completed silently by using + * single-sign on, the Microsoft identity platform returns an interaction_required + * error. prompt=select_account interrupts single sign-on providing account + * selection experience listing all the accounts either in session or any + * remembered account or an option to choose to use a different account altogether. + */ + prompt?: 'login' | 'select_account' | 'none'; + + /** + * Should Cloudflare try to load groups from your account + */ + support_groups?: boolean; + } + } + + export interface AccessCentrify { + /** + * Body param: The configuration parameters for the identity provider. To view the + * required parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + config: IdentityProviderUpdateParams.AccessCentrify.Config; + + /** + * Body param: The name of the identity provider, shown to users on the login page. + */ + name: string; + + /** + * Body param: The type of identity provider. To determine the value for a specific + * provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + type: IdentityProviderTypeParam; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The configuration settings for enabling a System for Cross-Domain + * Identity Management (SCIM) with the identity provider. + */ + scim_config?: ScimConfigParam; + } + + export namespace AccessCentrify { + /** + * The configuration parameters for the identity provider. To view the required + * parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + export interface Config { + /** + * Your centrify account url + */ + centrify_account?: string; + + /** + * Your centrify app id + */ + centrify_app_id?: string; + + /** + * Custom claims + */ + claims?: Array; + + /** + * Your OAuth Client ID + */ + client_id?: string; + + /** + * Your OAuth Client Secret + */ + client_secret?: string; + + /** + * The claim name for email in the id_token response. + */ + email_claim_name?: string; + } + } + + export interface AccessFacebook { + /** + * Body param: The configuration parameters for the identity provider. To view the + * required parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + config: GenericOAuthConfigParam; + + /** + * Body param: The name of the identity provider, shown to users on the login page. + */ + name: string; + + /** + * Body param: The type of identity provider. To determine the value for a specific + * provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + type: IdentityProviderTypeParam; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The configuration settings for enabling a System for Cross-Domain + * Identity Management (SCIM) with the identity provider. + */ + scim_config?: ScimConfigParam; + } + + export interface AccessGitHub { + /** + * Body param: The configuration parameters for the identity provider. To view the + * required parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + config: GenericOAuthConfigParam; + + /** + * Body param: The name of the identity provider, shown to users on the login page. + */ + name: string; + + /** + * Body param: The type of identity provider. To determine the value for a specific + * provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + type: IdentityProviderTypeParam; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The configuration settings for enabling a System for Cross-Domain + * Identity Management (SCIM) with the identity provider. + */ + scim_config?: ScimConfigParam; + } + + export interface AccessGoogle { + /** + * Body param: The configuration parameters for the identity provider. To view the + * required parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + config: IdentityProviderUpdateParams.AccessGoogle.Config; + + /** + * Body param: The name of the identity provider, shown to users on the login page. + */ + name: string; + + /** + * Body param: The type of identity provider. To determine the value for a specific + * provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + type: IdentityProviderTypeParam; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The configuration settings for enabling a System for Cross-Domain + * Identity Management (SCIM) with the identity provider. + */ + scim_config?: ScimConfigParam; + } + + export namespace AccessGoogle { + /** + * The configuration parameters for the identity provider. To view the required + * parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + export interface Config { + /** + * Custom claims + */ + claims?: Array; + + /** + * Your OAuth Client ID + */ + client_id?: string; + + /** + * Your OAuth Client Secret + */ + client_secret?: string; + + /** + * The claim name for email in the id_token response. + */ + email_claim_name?: string; + } + } + + export interface AccessGoogleApps { + /** + * Body param: The configuration parameters for the identity provider. To view the + * required parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + config: IdentityProviderUpdateParams.AccessGoogleApps.Config; + + /** + * Body param: The name of the identity provider, shown to users on the login page. + */ + name: string; + + /** + * Body param: The type of identity provider. To determine the value for a specific + * provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + type: IdentityProviderTypeParam; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The configuration settings for enabling a System for Cross-Domain + * Identity Management (SCIM) with the identity provider. + */ + scim_config?: ScimConfigParam; + } + + export namespace AccessGoogleApps { + /** + * The configuration parameters for the identity provider. To view the required + * parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + export interface Config { + /** + * Your companies TLD + */ + apps_domain?: string; + + /** + * Custom claims + */ + claims?: Array; + + /** + * Your OAuth Client ID + */ + client_id?: string; + + /** + * Your OAuth Client Secret + */ + client_secret?: string; + + /** + * The claim name for email in the id_token response. + */ + email_claim_name?: string; + } + } + + export interface AccessLinkedin { + /** + * Body param: The configuration parameters for the identity provider. To view the + * required parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + config: GenericOAuthConfigParam; + + /** + * Body param: The name of the identity provider, shown to users on the login page. + */ + name: string; + + /** + * Body param: The type of identity provider. To determine the value for a specific + * provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + type: IdentityProviderTypeParam; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The configuration settings for enabling a System for Cross-Domain + * Identity Management (SCIM) with the identity provider. + */ + scim_config?: ScimConfigParam; + } + + export interface AccessOIDC { + /** + * Body param: The configuration parameters for the identity provider. To view the + * required parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + config: IdentityProviderUpdateParams.AccessOIDC.Config; + + /** + * Body param: The name of the identity provider, shown to users on the login page. + */ + name: string; + + /** + * Body param: The type of identity provider. To determine the value for a specific + * provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + type: IdentityProviderTypeParam; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The configuration settings for enabling a System for Cross-Domain + * Identity Management (SCIM) with the identity provider. + */ + scim_config?: ScimConfigParam; + } + + export namespace AccessOIDC { + /** + * The configuration parameters for the identity provider. To view the required + * parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + export interface Config { + /** + * The authorization_endpoint URL of your IdP + */ + auth_url?: string; + + /** + * The jwks_uri endpoint of your IdP to allow the IdP keys to sign the tokens + */ + certs_url?: string; + + /** + * Custom claims + */ + claims?: Array; + + /** + * Your OAuth Client ID + */ + client_id?: string; + + /** + * Your OAuth Client Secret + */ + client_secret?: string; + + /** + * The claim name for email in the id_token response. + */ + email_claim_name?: string; + + /** + * OAuth scopes + */ + scopes?: Array; + + /** + * The token_endpoint URL of your IdP + */ + token_url?: string; + } + } + + export interface AccessOkta { + /** + * Body param: The configuration parameters for the identity provider. To view the + * required parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + config: IdentityProviderUpdateParams.AccessOkta.Config; + + /** + * Body param: The name of the identity provider, shown to users on the login page. + */ + name: string; + + /** + * Body param: The type of identity provider. To determine the value for a specific + * provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + type: IdentityProviderTypeParam; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The configuration settings for enabling a System for Cross-Domain + * Identity Management (SCIM) with the identity provider. + */ + scim_config?: ScimConfigParam; + } + + export namespace AccessOkta { + /** + * The configuration parameters for the identity provider. To view the required + * parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + export interface Config { + /** + * Your okta authorization server id + */ + authorization_server_id?: string; + + /** + * Custom claims + */ + claims?: Array; + + /** + * Your OAuth Client ID + */ + client_id?: string; + + /** + * Your OAuth Client Secret + */ + client_secret?: string; + + /** + * The claim name for email in the id_token response. + */ + email_claim_name?: string; + + /** + * Your okta account url + */ + okta_account?: string; + } + } + + export interface AccessOnelogin { + /** + * Body param: The configuration parameters for the identity provider. To view the + * required parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + config: IdentityProviderUpdateParams.AccessOnelogin.Config; + + /** + * Body param: The name of the identity provider, shown to users on the login page. + */ + name: string; + + /** + * Body param: The type of identity provider. To determine the value for a specific + * provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + type: IdentityProviderTypeParam; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The configuration settings for enabling a System for Cross-Domain + * Identity Management (SCIM) with the identity provider. + */ + scim_config?: ScimConfigParam; + } + + export namespace AccessOnelogin { + /** + * The configuration parameters for the identity provider. To view the required + * parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + export interface Config { + /** + * Custom claims + */ + claims?: Array; + + /** + * Your OAuth Client ID + */ + client_id?: string; + + /** + * Your OAuth Client Secret + */ + client_secret?: string; + + /** + * The claim name for email in the id_token response. + */ + email_claim_name?: string; + + /** + * Your OneLogin account url + */ + onelogin_account?: string; + } + } + + export interface AccessPingone { + /** + * Body param: The configuration parameters for the identity provider. To view the + * required parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + config: IdentityProviderUpdateParams.AccessPingone.Config; + + /** + * Body param: The name of the identity provider, shown to users on the login page. + */ + name: string; + + /** + * Body param: The type of identity provider. To determine the value for a specific + * provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + type: IdentityProviderTypeParam; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The configuration settings for enabling a System for Cross-Domain + * Identity Management (SCIM) with the identity provider. + */ + scim_config?: ScimConfigParam; + } + + export namespace AccessPingone { + /** + * The configuration parameters for the identity provider. To view the required + * parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + export interface Config { + /** + * Custom claims + */ + claims?: Array; + + /** + * Your OAuth Client ID + */ + client_id?: string; + + /** + * Your OAuth Client Secret + */ + client_secret?: string; + + /** + * The claim name for email in the id_token response. + */ + email_claim_name?: string; + + /** + * Your PingOne environment identifier + */ + ping_env_id?: string; + } + } + + export interface AccessSAML { + /** + * Body param: The configuration parameters for the identity provider. To view the + * required parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + config: IdentityProviderUpdateParams.AccessSAML.Config; + + /** + * Body param: The name of the identity provider, shown to users on the login page. + */ + name: string; + + /** + * Body param: The type of identity provider. To determine the value for a specific + * provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + type: IdentityProviderTypeParam; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The configuration settings for enabling a System for Cross-Domain + * Identity Management (SCIM) with the identity provider. + */ + scim_config?: ScimConfigParam; + } + + export namespace AccessSAML { + /** + * The configuration parameters for the identity provider. To view the required + * parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + export interface Config { + /** + * A list of SAML attribute names that will be added to your signed JWT token and + * can be used in SAML policy rules. + */ + attributes?: Array; + + /** + * The attribute name for email in the SAML response. + */ + email_attribute_name?: string; + + /** + * Add a list of attribute names that will be returned in the response header from + * the Access callback. + */ + header_attributes?: Array; + + /** + * X509 certificate to verify the signature in the SAML authentication response + */ + idp_public_certs?: Array; + + /** + * IdP Entity ID or Issuer URL + */ + issuer_url?: string; + + /** + * Sign the SAML authentication request with Access credentials. To verify the + * signature, use the public key from the Access certs endpoints. + */ + sign_request?: boolean; + + /** + * URL to send the SAML authentication requests to + */ + sso_target_url?: string; + } + + export namespace Config { + export interface HeaderAttribute { + /** + * attribute name from the IDP + */ + attribute_name?: string; + + /** + * header that will be added on the request to the origin + */ + header_name?: string; + } + } + } + + export interface AccessYandex { + /** + * Body param: The configuration parameters for the identity provider. To view the + * required parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + config: GenericOAuthConfigParam; + + /** + * Body param: The name of the identity provider, shown to users on the login page. + */ + name: string; + + /** + * Body param: The type of identity provider. To determine the value for a specific + * provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + type: IdentityProviderTypeParam; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The configuration settings for enabling a System for Cross-Domain + * Identity Management (SCIM) with the identity provider. + */ + scim_config?: ScimConfigParam; + } + + export interface AccessOnetimepin { + /** + * Body param: The configuration parameters for the identity provider. To view the + * required parameters for a specific provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + config: unknown; + + /** + * Body param: The name of the identity provider, shown to users on the login page. + */ + name: string; + + /** + * Body param: The type of identity provider. To determine the value for a specific + * provider, refer to our + * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + */ + type: IdentityProviderTypeParam; + + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: The configuration settings for enabling a System for Cross-Domain + * Identity Management (SCIM) with the identity provider. + */ + scim_config?: ScimConfigParam; + } +} + +export interface IdentityProviderListParams { + /** + * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + */ + account_id?: string; + + /** + * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + */ + zone_id?: string; +} + +export interface IdentityProviderDeleteParams { + /** + * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + */ + account_id?: string; + + /** + * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + */ + zone_id?: string; +} + +export interface IdentityProviderGetParams { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ @@ -2745,7 +3835,11 @@ export namespace IdentityProviders { export import IdentityProviderType = IdentityProvidersAPI.IdentityProviderType; export import ScimConfig = IdentityProvidersAPI.ScimConfig; export import IdentityProviderListResponse = IdentityProvidersAPI.IdentityProviderListResponse; + export import IdentityProviderDeleteResponse = IdentityProvidersAPI.IdentityProviderDeleteResponse; export import IdentityProviderListResponsesSinglePage = IdentityProvidersAPI.IdentityProviderListResponsesSinglePage; export import IdentityProviderCreateParams = IdentityProvidersAPI.IdentityProviderCreateParams; + export import IdentityProviderUpdateParams = IdentityProvidersAPI.IdentityProviderUpdateParams; export import IdentityProviderListParams = IdentityProvidersAPI.IdentityProviderListParams; + export import IdentityProviderDeleteParams = IdentityProvidersAPI.IdentityProviderDeleteParams; + export import IdentityProviderGetParams = IdentityProvidersAPI.IdentityProviderGetParams; } diff --git a/src/resources/zero-trust/index.ts b/src/resources/zero-trust/index.ts index ed61e8ff7b..acf3c1cdb3 100644 --- a/src/resources/zero-trust/index.ts +++ b/src/resources/zero-trust/index.ts @@ -30,8 +30,12 @@ export { IdentityProviderType, ScimConfig, IdentityProviderListResponse, + IdentityProviderDeleteResponse, IdentityProviderCreateParams, + IdentityProviderUpdateParams, IdentityProviderListParams, + IdentityProviderDeleteParams, + IdentityProviderGetParams, IdentityProviderListResponsesSinglePage, IdentityProviders, } from './identity-providers'; @@ -91,5 +95,5 @@ export { RiskScoringGetParams, RiskScoring, } from './risk-scoring/index'; -export { Seat, Seats } from './seats'; +export { Seat, SeatEditResponse, SeatEditParams, Seats } from './seats'; export { ZeroTrust } from './zero-trust'; diff --git a/src/resources/zero-trust/seats.ts b/src/resources/zero-trust/seats.ts index 84b0574957..4736555f14 100644 --- a/src/resources/zero-trust/seats.ts +++ b/src/resources/zero-trust/seats.ts @@ -1,9 +1,24 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import * as Core from '../../core'; import { APIResource } from '../../resource'; import * as SeatsAPI from './seats'; -export class Seats extends APIResource {} +export class Seats extends APIResource { + /** + * Removes a user from a Zero Trust seat when both `access_seat` and `gateway_seat` + * are set to false. + */ + edit(params: SeatEditParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id, body } = params; + return ( + this._client.patch(`/accounts/${account_id}/access/seats`, { + body: body, + ...options, + }) as Core.APIPromise<{ result: SeatEditResponse | null }> + )._thenUnwrap((obj) => obj.result); + } +} export interface Seat { /** @@ -26,6 +41,36 @@ export interface Seat { updated_at?: string; } +export type SeatEditResponse = Array; + +export interface SeatEditParams { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: + */ + body: Array; +} + +export namespace SeatEditParams { + export interface Body { + /** + * True if the seat is part of Access. + */ + access_seat: boolean; + + /** + * True if the seat is part of Gateway. + */ + gateway_seat: boolean; + } +} + export namespace Seats { export import Seat = SeatsAPI.Seat; + export import SeatEditResponse = SeatsAPI.SeatEditResponse; + export import SeatEditParams = SeatsAPI.SeatEditParams; } diff --git a/src/resources/zero-trust/zero-trust.ts b/src/resources/zero-trust/zero-trust.ts index 4f91cd1dc2..45f05d017f 100644 --- a/src/resources/zero-trust/zero-trust.ts +++ b/src/resources/zero-trust/zero-trust.ts @@ -46,9 +46,13 @@ export namespace ZeroTrust { export import IdentityProviderType = IdentityProvidersAPI.IdentityProviderType; export import ScimConfig = IdentityProvidersAPI.ScimConfig; export import IdentityProviderListResponse = IdentityProvidersAPI.IdentityProviderListResponse; + export import IdentityProviderDeleteResponse = IdentityProvidersAPI.IdentityProviderDeleteResponse; export import IdentityProviderListResponsesSinglePage = IdentityProvidersAPI.IdentityProviderListResponsesSinglePage; export import IdentityProviderCreateParams = IdentityProvidersAPI.IdentityProviderCreateParams; + export import IdentityProviderUpdateParams = IdentityProvidersAPI.IdentityProviderUpdateParams; export import IdentityProviderListParams = IdentityProvidersAPI.IdentityProviderListParams; + export import IdentityProviderDeleteParams = IdentityProvidersAPI.IdentityProviderDeleteParams; + export import IdentityProviderGetParams = IdentityProvidersAPI.IdentityProviderGetParams; export import Organizations = OrganizationsAPI.Organizations; export import LoginDesign = OrganizationsAPI.LoginDesign; export import Organization = OrganizationsAPI.Organization; @@ -59,6 +63,8 @@ export namespace ZeroTrust { export import OrganizationRevokeUsersParams = OrganizationsAPI.OrganizationRevokeUsersParams; export import Seats = SeatsAPI.Seats; export import Seat = SeatsAPI.Seat; + export import SeatEditResponse = SeatsAPI.SeatEditResponse; + export import SeatEditParams = SeatsAPI.SeatEditParams; export import Access = AccessAPI.Access; export import AccessDevicePostureRule = AccessAPI.AccessDevicePostureRule; export import AccessRule = AccessAPI.AccessRule; diff --git a/tests/api-resources/zero-trust/access/applications/applications.test.ts b/tests/api-resources/zero-trust/access/applications/applications.test.ts index a14a2fc5b9..daafc19275 100644 --- a/tests/api-resources/zero-trust/access/applications/applications.test.ts +++ b/tests/api-resources/zero-trust/access/applications/applications.test.ts @@ -64,7 +64,11 @@ describe('resource applications', () => { name: 'Admin Site', options_preflight_bypass: true, path_cookie_attribute: true, - policies: [{ precedence: 0 }, { precedence: 0 }, { precedence: 0 }], + policies: [ + { id: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', precedence: 0 }, + { id: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', precedence: 0 }, + { id: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', precedence: 0 }, + ], same_site_cookie_attribute: 'strict', scim_config: { authentication: { password: 'string', scheme: 'httpbasic', user: 'string' }, @@ -162,7 +166,11 @@ describe('resource applications', () => { name: 'Admin Site', options_preflight_bypass: true, path_cookie_attribute: true, - policies: [{ precedence: 0 }, { precedence: 0 }, { precedence: 0 }], + policies: [ + { id: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', precedence: 0 }, + { id: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', precedence: 0 }, + { id: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', precedence: 0 }, + ], same_site_cookie_attribute: 'strict', scim_config: { authentication: { password: 'string', scheme: 'httpbasic', user: 'string' }, diff --git a/tests/api-resources/zero-trust/access/applications/cas.test.ts b/tests/api-resources/zero-trust/access/applications/cas.test.ts index 6167d7fed3..553c9af20e 100644 --- a/tests/api-resources/zero-trust/access/applications/cas.test.ts +++ b/tests/api-resources/zero-trust/access/applications/cas.test.ts @@ -10,6 +10,21 @@ const cloudflare = new Cloudflare({ }); describe('resource cas', () => { + // TODO: investigate broken test + test.skip('create', async () => { + const responsePromise = cloudflare.zeroTrust.access.applications.cas.create( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: 'string' }, + ); + 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); + }); + // TODO: investigate broken test test.skip('list', async () => { const responsePromise = cloudflare.zeroTrust.access.applications.cas.list({ account_id: 'string' }); @@ -21,4 +36,34 @@ describe('resource cas', () => { expect(dataAndResponse.data).toBe(response); expect(dataAndResponse.response).toBe(rawResponse); }); + + // TODO: investigate broken test + test.skip('delete', async () => { + const responsePromise = cloudflare.zeroTrust.access.applications.cas.delete( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: 'string' }, + ); + 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); + }); + + // TODO: investigate broken test + test.skip('get', async () => { + const responsePromise = cloudflare.zeroTrust.access.applications.cas.get( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: 'string' }, + ); + 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); + }); }); diff --git a/tests/api-resources/zero-trust/access/applications/policies.test.ts b/tests/api-resources/zero-trust/access/applications/policies.test.ts new file mode 100644 index 0000000000..a9e9830136 --- /dev/null +++ b/tests/api-resources/zero-trust/access/applications/policies.test.ts @@ -0,0 +1,199 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource policies', () => { + // TODO: investigate broken test + test.skip('create: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.applications.policies.create( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { + decision: 'allow', + include: [ + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + ], + name: 'Allow devs', + account_id: 'string', + }, + ); + 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); + }); + + // TODO: investigate broken test + test.skip('create: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.applications.policies.create( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { + decision: 'allow', + include: [ + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + ], + name: 'Allow devs', + account_id: 'string', + approval_groups: [ + { + approvals_needed: 1, + email_addresses: ['test1@cloudflare.com', 'test2@cloudflare.com'], + email_list_uuid: 'string', + }, + { + approvals_needed: 3, + email_addresses: ['test@cloudflare.com', 'test2@cloudflare.com'], + email_list_uuid: '597147a1-976b-4ef2-9af0-81d5d007fc34', + }, + ], + approval_required: true, + exclude: [ + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + ], + isolation_required: false, + precedence: 0, + purpose_justification_prompt: 'Please enter a justification for entering this protected domain.', + purpose_justification_required: true, + require: [ + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + ], + session_duration: '24h', + }, + ); + }); + + // TODO: investigate broken test + test.skip('update: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.applications.policies.update( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { + decision: 'allow', + include: [ + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + ], + name: 'Allow devs', + account_id: 'string', + }, + ); + 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); + }); + + // TODO: investigate broken test + test.skip('update: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.applications.policies.update( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { + decision: 'allow', + include: [ + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + ], + name: 'Allow devs', + account_id: 'string', + approval_groups: [ + { + approvals_needed: 1, + email_addresses: ['test1@cloudflare.com', 'test2@cloudflare.com'], + email_list_uuid: 'string', + }, + { + approvals_needed: 3, + email_addresses: ['test@cloudflare.com', 'test2@cloudflare.com'], + email_list_uuid: '597147a1-976b-4ef2-9af0-81d5d007fc34', + }, + ], + approval_required: true, + exclude: [ + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + ], + isolation_required: false, + precedence: 0, + purpose_justification_prompt: 'Please enter a justification for entering this protected domain.', + purpose_justification_required: true, + require: [ + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + ], + session_duration: '24h', + }, + ); + }); + + // TODO: investigate broken test + test.skip('list', async () => { + const responsePromise = cloudflare.zeroTrust.access.applications.policies.list( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: 'string' }, + ); + 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); + }); + + // TODO: investigate broken test + test.skip('delete', async () => { + const responsePromise = cloudflare.zeroTrust.access.applications.policies.delete( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: 'string' }, + ); + 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); + }); + + // TODO: investigate broken test + test.skip('get', async () => { + const responsePromise = cloudflare.zeroTrust.access.applications.policies.get( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: 'string' }, + ); + 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); + }); +}); diff --git a/tests/api-resources/zero-trust/access/bookmarks.test.ts b/tests/api-resources/zero-trust/access/bookmarks.test.ts new file mode 100644 index 0000000000..7b0a573239 --- /dev/null +++ b/tests/api-resources/zero-trust/access/bookmarks.test.ts @@ -0,0 +1,114 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource bookmarks', () => { + test('create: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.bookmarks.create( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '699d98642c564d2e855e9661899b7252', body: {} }, + ); + 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('create: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.bookmarks.create( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '699d98642c564d2e855e9661899b7252', body: {} }, + ); + }); + + test('update: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.bookmarks.update( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '699d98642c564d2e855e9661899b7252', body: {} }, + ); + 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('update: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.bookmarks.update( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '699d98642c564d2e855e9661899b7252', body: {} }, + ); + }); + + test('list: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.bookmarks.list({ + account_id: '699d98642c564d2e855e9661899b7252', + }); + 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('list: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.bookmarks.list({ + account_id: '699d98642c564d2e855e9661899b7252', + }); + }); + + test('delete: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.bookmarks.delete( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '699d98642c564d2e855e9661899b7252' }, + ); + 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('delete: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.bookmarks.delete( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '699d98642c564d2e855e9661899b7252' }, + ); + }); + + test('get: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.bookmarks.get( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '699d98642c564d2e855e9661899b7252' }, + ); + 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('get: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.bookmarks.get('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { + account_id: '699d98642c564d2e855e9661899b7252', + }); + }); +}); diff --git a/tests/api-resources/zero-trust/access/certificates/certificates.test.ts b/tests/api-resources/zero-trust/access/certificates/certificates.test.ts index d07c9fa9f3..1e779d2b5c 100644 --- a/tests/api-resources/zero-trust/access/certificates/certificates.test.ts +++ b/tests/api-resources/zero-trust/access/certificates/certificates.test.ts @@ -38,6 +38,36 @@ describe('resource certificates', () => { }); }); + // TODO: investigate broken test + test.skip('update: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.certificates.update( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { + associated_hostnames: ['admin.example.com', 'admin.example.com', 'admin.example.com'], + account_id: 'string', + }, + ); + 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); + }); + + // TODO: investigate broken test + test.skip('update: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.certificates.update( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { + associated_hostnames: ['admin.example.com', 'admin.example.com', 'admin.example.com'], + account_id: 'string', + name: 'Allow devs', + }, + ); + }); + // TODO: investigate broken test test.skip('list', async () => { const responsePromise = cloudflare.zeroTrust.access.certificates.list({ account_id: 'string' }); @@ -49,4 +79,34 @@ describe('resource certificates', () => { expect(dataAndResponse.data).toBe(response); expect(dataAndResponse.response).toBe(rawResponse); }); + + // TODO: investigate broken test + test.skip('delete', async () => { + const responsePromise = cloudflare.zeroTrust.access.certificates.delete( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: 'string' }, + ); + 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); + }); + + // TODO: investigate broken test + test.skip('get', async () => { + const responsePromise = cloudflare.zeroTrust.access.certificates.get( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: 'string' }, + ); + 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); + }); }); diff --git a/tests/api-resources/zero-trust/access/custom-pages.test.ts b/tests/api-resources/zero-trust/access/custom-pages.test.ts new file mode 100644 index 0000000000..8c62d87678 --- /dev/null +++ b/tests/api-resources/zero-trust/access/custom-pages.test.ts @@ -0,0 +1,131 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource customPages', () => { + test('create: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.customPages.create({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + custom_html: '

Access Denied

', + name: 'string', + type: 'identity_denied', + }); + 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('create: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.customPages.create({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + custom_html: '

Access Denied

', + name: 'string', + type: 'identity_denied', + app_count: 0, + }); + }); + + test('update: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.customPages.update( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + custom_html: '

Access Denied

', + name: 'string', + type: 'identity_denied', + }, + ); + 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('update: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.customPages.update( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + custom_html: '

Access Denied

', + name: 'string', + type: 'identity_denied', + app_count: 0, + }, + ); + }); + + test('list: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.customPages.list({ + account_id: '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); + }); + + test('list: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.customPages.list({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); + + test('delete: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.customPages.delete( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '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); + }); + + test('delete: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.customPages.delete( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, + ); + }); + + test('get: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.customPages.get( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '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); + }); + + test('get: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.customPages.get( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, + ); + }); +}); diff --git a/tests/api-resources/zero-trust/access/groups.test.ts b/tests/api-resources/zero-trust/access/groups.test.ts index 6e4de3e912..3f26bfeba1 100644 --- a/tests/api-resources/zero-trust/access/groups.test.ts +++ b/tests/api-resources/zero-trust/access/groups.test.ts @@ -54,6 +54,53 @@ describe('resource groups', () => { }); }); + // TODO: investigate broken test + test.skip('update: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.groups.update( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { + include: [ + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + ], + name: 'Allow devs', + account_id: 'string', + }, + ); + 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); + }); + + // TODO: investigate broken test + test.skip('update: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.groups.update('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { + include: [ + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + ], + name: 'Allow devs', + account_id: 'string', + exclude: [ + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + ], + is_default: true, + require: [ + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + ], + }); + }); + // TODO: investigate broken test test.skip('list', async () => { const responsePromise = cloudflare.zeroTrust.access.groups.list({ account_id: 'string' }); @@ -65,4 +112,33 @@ describe('resource groups', () => { expect(dataAndResponse.data).toBe(response); expect(dataAndResponse.response).toBe(rawResponse); }); + + // TODO: investigate broken test + test.skip('delete', async () => { + const responsePromise = cloudflare.zeroTrust.access.groups.delete( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: 'string' }, + ); + 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); + }); + + // TODO: investigate broken test + test.skip('get', async () => { + const responsePromise = cloudflare.zeroTrust.access.groups.get('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { + account_id: 'string', + }); + 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); + }); }); diff --git a/tests/api-resources/zero-trust/access/keys.test.ts b/tests/api-resources/zero-trust/access/keys.test.ts new file mode 100644 index 0000000000..cff6093e45 --- /dev/null +++ b/tests/api-resources/zero-trust/access/keys.test.ts @@ -0,0 +1,71 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource keys', () => { + test('update: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.keys.update({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + key_rotation_interval_days: 30, + }); + 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('update: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.keys.update({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + key_rotation_interval_days: 30, + }); + }); + + test('get: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.keys.get({ + account_id: '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); + }); + + test('get: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.keys.get({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); + + test('rotate: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.keys.rotate({ + account_id: '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); + }); + + test('rotate: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.keys.rotate({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); +}); diff --git a/tests/api-resources/zero-trust/access/logs/access-requests.test.ts b/tests/api-resources/zero-trust/access/logs/access-requests.test.ts new file mode 100644 index 0000000000..7e68ae2985 --- /dev/null +++ b/tests/api-resources/zero-trust/access/logs/access-requests.test.ts @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource accessRequests', () => { + test('list: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.logs.accessRequests.list({ + account_id: '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); + }); + + test('list: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.logs.accessRequests.list({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); +}); diff --git a/tests/api-resources/zero-trust/access/service-tokens.test.ts b/tests/api-resources/zero-trust/access/service-tokens.test.ts index deda8ffb7b..9d42a92db7 100644 --- a/tests/api-resources/zero-trust/access/service-tokens.test.ts +++ b/tests/api-resources/zero-trust/access/service-tokens.test.ts @@ -34,6 +34,21 @@ describe('resource serviceTokens', () => { }); }); + // TODO: investigate broken test + test.skip('update', async () => { + const responsePromise = cloudflare.zeroTrust.access.serviceTokens.update( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: 'string' }, + ); + 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); + }); + // TODO: investigate broken test test.skip('list', async () => { const responsePromise = cloudflare.zeroTrust.access.serviceTokens.list({ account_id: 'string' }); @@ -45,4 +60,76 @@ describe('resource serviceTokens', () => { expect(dataAndResponse.data).toBe(response); expect(dataAndResponse.response).toBe(rawResponse); }); + + // TODO: investigate broken test + test.skip('delete', async () => { + const responsePromise = cloudflare.zeroTrust.access.serviceTokens.delete( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: 'string' }, + ); + 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); + }); + + // TODO: investigate broken test + test.skip('get', async () => { + const responsePromise = cloudflare.zeroTrust.access.serviceTokens.get( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: 'string' }, + ); + 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('refresh: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.serviceTokens.refresh( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '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); + }); + + test('refresh: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.serviceTokens.refresh( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, + ); + }); + + test('rotate: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.serviceTokens.rotate( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '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); + }); + + test('rotate: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.serviceTokens.rotate( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, + ); + }); }); diff --git a/tests/api-resources/zero-trust/access/tags.test.ts b/tests/api-resources/zero-trust/access/tags.test.ts new file mode 100644 index 0000000000..a9fa432de5 --- /dev/null +++ b/tests/api-resources/zero-trust/access/tags.test.ts @@ -0,0 +1,111 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource tags', () => { + test('create: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.tags.create({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + name: 'engineers', + }); + 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('create: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.tags.create({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + name: 'engineers', + }); + }); + + test('update: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.tags.update('engineers', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + name: 'engineers', + }); + 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('update: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.tags.update('engineers', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + name: 'engineers', + }); + }); + + test('list: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.tags.list({ + account_id: '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); + }); + + test('list: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.tags.list({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); + + test('delete: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.tags.delete('engineers', { + account_id: '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); + }); + + test('delete: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.tags.delete('engineers', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); + + test('get: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.tags.get('engineers', { + account_id: '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); + }); + + test('get: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.tags.get('engineers', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); +}); diff --git a/tests/api-resources/zero-trust/access/users/active-sessions.test.ts b/tests/api-resources/zero-trust/access/users/active-sessions.test.ts new file mode 100644 index 0000000000..5bcbb737b4 --- /dev/null +++ b/tests/api-resources/zero-trust/access/users/active-sessions.test.ts @@ -0,0 +1,56 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource activeSessions', () => { + test('list: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.users.activeSessions.list( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '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); + }); + + test('list: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.users.activeSessions.list( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, + ); + }); + + test('get: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.users.activeSessions.get( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + 'X1aXj1lFVcqqyoXF', + { account_id: '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); + }); + + test('get: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.users.activeSessions.get( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + 'X1aXj1lFVcqqyoXF', + { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, + ); + }); +}); diff --git a/tests/api-resources/zero-trust/access/users/failed-logins.test.ts b/tests/api-resources/zero-trust/access/users/failed-logins.test.ts new file mode 100644 index 0000000000..3a3cce93ca --- /dev/null +++ b/tests/api-resources/zero-trust/access/users/failed-logins.test.ts @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource failedLogins', () => { + test('list: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.users.failedLogins.list( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '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); + }); + + test('list: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.users.failedLogins.list( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, + ); + }); +}); diff --git a/tests/api-resources/zero-trust/access/users/last-seen-identity.test.ts b/tests/api-resources/zero-trust/access/users/last-seen-identity.test.ts new file mode 100644 index 0000000000..bddd9dac45 --- /dev/null +++ b/tests/api-resources/zero-trust/access/users/last-seen-identity.test.ts @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource lastSeenIdentity', () => { + test('get: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.users.lastSeenIdentity.get( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '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); + }); + + test('get: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.users.lastSeenIdentity.get( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, + ); + }); +}); diff --git a/tests/api-resources/zero-trust/access/users/users.test.ts b/tests/api-resources/zero-trust/access/users/users.test.ts new file mode 100644 index 0000000000..9bf7db152f --- /dev/null +++ b/tests/api-resources/zero-trust/access/users/users.test.ts @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource users', () => { + test('list: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.users.list({ + account_id: '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); + }); + + test('list: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.users.list({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); +}); diff --git a/tests/api-resources/zero-trust/identity-providers.test.ts b/tests/api-resources/zero-trust/identity-providers.test.ts index 09f40970c2..e33eac6b01 100644 --- a/tests/api-resources/zero-trust/identity-providers.test.ts +++ b/tests/api-resources/zero-trust/identity-providers.test.ts @@ -53,6 +53,50 @@ describe('resource identityProviders', () => { }); }); + // TODO: investigate broken test + test.skip('update: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.identityProviders.update( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { config: {}, name: 'Widget Corps IDP', type: 'onetimepin', account_id: 'string' }, + ); + 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); + }); + + // TODO: investigate broken test + test.skip('update: required and optional params', async () => { + const response = await cloudflare.zeroTrust.identityProviders.update( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { + config: { + client_id: '', + client_secret: '', + claims: ['email_verified', 'preferred_username', 'custom_claim_name'], + email_claim_name: 'custom_claim_name', + conditional_access_enabled: true, + directory_id: '', + prompt: 'login', + support_groups: true, + }, + name: 'Widget Corps IDP', + type: 'onetimepin', + account_id: 'string', + scim_config: { + enabled: true, + group_member_deprovision: true, + seat_deprovision: true, + secret: 'string', + user_deprovision: true, + }, + }, + ); + }); + // TODO: investigate broken test test.skip('list', async () => { const responsePromise = cloudflare.zeroTrust.identityProviders.list({ account_id: 'string' }); @@ -64,4 +108,34 @@ describe('resource identityProviders', () => { expect(dataAndResponse.data).toBe(response); expect(dataAndResponse.response).toBe(rawResponse); }); + + // TODO: investigate broken test + test.skip('delete', async () => { + const responsePromise = cloudflare.zeroTrust.identityProviders.delete( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: 'string' }, + ); + 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); + }); + + // TODO: investigate broken test + test.skip('get', async () => { + const responsePromise = cloudflare.zeroTrust.identityProviders.get( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: 'string' }, + ); + 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); + }); }); diff --git a/tests/api-resources/zero-trust/seats.test.ts b/tests/api-resources/zero-trust/seats.test.ts new file mode 100644 index 0000000000..07e137fee7 --- /dev/null +++ b/tests/api-resources/zero-trust/seats.test.ts @@ -0,0 +1,43 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource seats', () => { + // TODO: investigate broken test + test.skip('edit: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.seats.edit({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + body: [ + { access_seat: false, gateway_seat: false }, + { access_seat: false, gateway_seat: false }, + { access_seat: false, gateway_seat: false }, + ], + }); + 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); + }); + + // TODO: investigate broken test + test.skip('edit: required and optional params', async () => { + const response = await cloudflare.zeroTrust.seats.edit({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + body: [ + { access_seat: false, gateway_seat: false }, + { access_seat: false, gateway_seat: false }, + { access_seat: false, gateway_seat: false }, + ], + }); + }); +}); From 2aa640256f123e08f57c6e5ce245524e55ebfac4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 01:29:11 +0000 Subject: [PATCH 181/473] feat(api): OpenAPI spec update via Stainless API (#678) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index fbcd944afc..a157cc5cf6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15ceeb11cd4134501a557652ceaeacda4b60ea635ea5ac2e0d06974b130cc60a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faaa81dda06d091c58d19e3aba3fc1609f647c8af561f2aa645b484412805084.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 63a34c742a8329b4454f234d6e37f3353e4439dd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 09:18:14 +0000 Subject: [PATCH 182/473] feat(api): OpenAPI spec update via Stainless API (#679) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index a157cc5cf6..fbcd944afc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faaa81dda06d091c58d19e3aba3fc1609f647c8af561f2aa645b484412805084.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15ceeb11cd4134501a557652ceaeacda4b60ea635ea5ac2e0d06974b130cc60a.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From ba4f0aef9c6303b0d1fe0b2d3e404cfbf2538588 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 09:20:29 +0000 Subject: [PATCH 183/473] feat(api): OpenAPI spec update via Stainless API (#680) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index fbcd944afc..ab79704ed9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15ceeb11cd4134501a557652ceaeacda4b60ea635ea5ac2e0d06974b130cc60a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a3b3746ec899f1aabc177d0170340930e90ba7ef87a13c9dd510f5232a3611de.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 6ad36b31101f9e12f44c41443845583388844578 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 11:11:19 +0000 Subject: [PATCH 184/473] feat(api): OpenAPI spec update via Stainless API (#681) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index ab79704ed9..a157cc5cf6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a3b3746ec899f1aabc177d0170340930e90ba7ef87a13c9dd510f5232a3611de.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faaa81dda06d091c58d19e3aba3fc1609f647c8af561f2aa645b484412805084.yml From 150631d581a10272732326b9c5a8ad435a5c696b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 11:13:36 +0000 Subject: [PATCH 185/473] feat(api): OpenAPI spec update via Stainless API (#682) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index a157cc5cf6..9a6098c023 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faaa81dda06d091c58d19e3aba3fc1609f647c8af561f2aa645b484412805084.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d96bf16635986ad2cf00e1d6b6e108e3c6a069d19ef1285400b28af9d958af3.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 49ec0a7e984a5ebd69eb9b205ab2ad5f01384356 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 11:20:46 +0000 Subject: [PATCH 186/473] feat(api): OpenAPI spec update via Stainless API (#683) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9a6098c023..ab79704ed9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d96bf16635986ad2cf00e1d6b6e108e3c6a069d19ef1285400b28af9d958af3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a3b3746ec899f1aabc177d0170340930e90ba7ef87a13c9dd510f5232a3611de.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From ff8b6ad90a844671d04ee25a9ab5200ca9702321 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 11:25:12 +0000 Subject: [PATCH 187/473] feat(api): OpenAPI spec update via Stainless API (#684) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index ab79704ed9..9a6098c023 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a3b3746ec899f1aabc177d0170340930e90ba7ef87a13c9dd510f5232a3611de.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d96bf16635986ad2cf00e1d6b6e108e3c6a069d19ef1285400b28af9d958af3.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 46b7bd87c7653566e3e553d6d66505a4b8aba1b1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 11:27:27 +0000 Subject: [PATCH 188/473] feat(api): OpenAPI spec update via Stainless API (#685) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9a6098c023..a157cc5cf6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d96bf16635986ad2cf00e1d6b6e108e3c6a069d19ef1285400b28af9d958af3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faaa81dda06d091c58d19e3aba3fc1609f647c8af561f2aa645b484412805084.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 90d16b85ff017c5e3658ca98de563379866df869 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 12:03:04 +0000 Subject: [PATCH 189/473] feat(api): OpenAPI spec update via Stainless API (#686) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index a157cc5cf6..9a6098c023 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faaa81dda06d091c58d19e3aba3fc1609f647c8af561f2aa645b484412805084.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d96bf16635986ad2cf00e1d6b6e108e3c6a069d19ef1285400b28af9d958af3.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 3c7a7e6882d391759e0f9c62897ec76c5557cef1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 14:55:44 +0000 Subject: [PATCH 190/473] feat(api): OpenAPI spec update via Stainless API (#687) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9a6098c023..fbcd944afc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d96bf16635986ad2cf00e1d6b6e108e3c6a069d19ef1285400b28af9d958af3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15ceeb11cd4134501a557652ceaeacda4b60ea635ea5ac2e0d06974b130cc60a.yml From 97303642008b7a6b95f4c764c7b7e61b3526c954 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 14:58:00 +0000 Subject: [PATCH 191/473] feat(api): OpenAPI spec update via Stainless API (#688) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index fbcd944afc..9a6098c023 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15ceeb11cd4134501a557652ceaeacda4b60ea635ea5ac2e0d06974b130cc60a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d96bf16635986ad2cf00e1d6b6e108e3c6a069d19ef1285400b28af9d958af3.yml From d1d864634c37b4ff5ecb7a5761fbfdbfc0d7e11a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 15:19:21 +0000 Subject: [PATCH 192/473] feat(api): OpenAPI spec update via Stainless API (#689) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9a6098c023..ab79704ed9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d96bf16635986ad2cf00e1d6b6e108e3c6a069d19ef1285400b28af9d958af3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a3b3746ec899f1aabc177d0170340930e90ba7ef87a13c9dd510f5232a3611de.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 493ce1a87a32a2e75c189e22eccd86e0f542b26b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 15:21:32 +0000 Subject: [PATCH 193/473] feat(api): OpenAPI spec update via Stainless API (#690) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index ab79704ed9..fbcd944afc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a3b3746ec899f1aabc177d0170340930e90ba7ef87a13c9dd510f5232a3611de.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15ceeb11cd4134501a557652ceaeacda4b60ea635ea5ac2e0d06974b130cc60a.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 0086d7b314caebe2f98041891413d4b081b3d8b3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 15:50:50 +0000 Subject: [PATCH 194/473] feat(api): OpenAPI spec update via Stainless API (#691) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index fbcd944afc..9a6098c023 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15ceeb11cd4134501a557652ceaeacda4b60ea635ea5ac2e0d06974b130cc60a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d96bf16635986ad2cf00e1d6b6e108e3c6a069d19ef1285400b28af9d958af3.yml From df1b9128606c5ac0b4f1f460d114ae68f93dd2d5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 16:24:11 +0000 Subject: [PATCH 195/473] feat(api): OpenAPI spec update via Stainless API (#692) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9a6098c023..fbcd944afc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d96bf16635986ad2cf00e1d6b6e108e3c6a069d19ef1285400b28af9d958af3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15ceeb11cd4134501a557652ceaeacda4b60ea635ea5ac2e0d06974b130cc60a.yml From b67ed67f6279b7751c171d2c112c5486da1f6ff1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 16:33:23 +0000 Subject: [PATCH 196/473] feat(api): OpenAPI spec update via Stainless API (#693) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index fbcd944afc..a157cc5cf6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15ceeb11cd4134501a557652ceaeacda4b60ea635ea5ac2e0d06974b130cc60a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faaa81dda06d091c58d19e3aba3fc1609f647c8af561f2aa645b484412805084.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 04895d549bbd0adac97a3dfe41eda352c2e9813b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 16:35:33 +0000 Subject: [PATCH 197/473] feat(api): OpenAPI spec update via Stainless API (#694) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index a157cc5cf6..fbcd944afc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faaa81dda06d091c58d19e3aba3fc1609f647c8af561f2aa645b484412805084.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15ceeb11cd4134501a557652ceaeacda4b60ea635ea5ac2e0d06974b130cc60a.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 4284502e5afe423a979846a27c5bfd4b0382a53c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 18:59:49 +0000 Subject: [PATCH 198/473] feat(api): OpenAPI spec update via Stainless API (#695) --- .stats.yml | 2 +- package.json | 1 - .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 5 files changed, 46 insertions(+), 23 deletions(-) diff --git a/.stats.yml b/.stats.yml index fbcd944afc..a157cc5cf6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15ceeb11cd4134501a557652ceaeacda4b60ea635ea5ac2e0d06974b130cc60a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faaa81dda06d091c58d19e3aba3fc1609f647c8af561f2aa645b484412805084.yml diff --git a/package.json b/package.json index 2baec207dc..30955ec5bd 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,6 @@ "scripts": { "test": "./scripts/test", "build": "./scripts/build", - "prepack": "echo 'to pack, run yarn build && (cd dist; yarn pack)' && exit 1", "prepublishOnly": "echo 'to publish, run yarn build && (cd dist; yarn publish)' && exit 1", "format": "prettier --write --cache --cache-strategy metadata . !dist", "prepare": "if ./scripts/utils/check-is-in-git-install.sh; then ./scripts/build; fi", diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From bfd14168e9303529adf7189a00bacc89aae77fa2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 19:01:59 +0000 Subject: [PATCH 199/473] feat(api): OpenAPI spec update via Stainless API (#696) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index a157cc5cf6..fbcd944afc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-faaa81dda06d091c58d19e3aba3fc1609f647c8af561f2aa645b484412805084.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15ceeb11cd4134501a557652ceaeacda4b60ea635ea5ac2e0d06974b130cc60a.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 868a9d53bc418ba2088088565161ddcc96224f2e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 20:08:16 +0000 Subject: [PATCH 200/473] feat(api): OpenAPI spec update via Stainless API (#697) --- .stats.yml | 2 +- api.md | 5 ++-- src/resources/zero-trust/gateway/gateway.ts | 2 +- src/resources/zero-trust/gateway/index.ts | 2 +- .../zero-trust/gateway/proxy-endpoints.ts | 30 ++++++++----------- 5 files changed, 19 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index fbcd944afc..35ba879867 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-15ceeb11cd4134501a557652ceaeacda4b60ea635ea5ac2e0d06974b130cc60a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1f68e176f43592631364d94df7670824a599296f6734ca70ffa94454c58da466.yml diff --git a/api.md b/api.md index fb2fcf661d..23f8e7f453 100644 --- a/api.md +++ b/api.md @@ -5214,14 +5214,15 @@ Types: - GatewayIPs - ProxyEndpoint - ProxyEndpointDeleteResponse +- ProxyEndpointGetResponse Methods: - client.zeroTrust.gateway.proxyEndpoints.create({ ...params }) -> ProxyEndpoint -- client.zeroTrust.gateway.proxyEndpoints.list({ ...params }) -> ProxyEndpointsSinglePage +- client.zeroTrust.gateway.proxyEndpoints.list({ ...params }) -> ProxyEndpoint - client.zeroTrust.gateway.proxyEndpoints.delete(proxyEndpointId, { ...params }) -> ProxyEndpointDeleteResponse - client.zeroTrust.gateway.proxyEndpoints.edit(proxyEndpointId, { ...params }) -> ProxyEndpoint -- client.zeroTrust.gateway.proxyEndpoints.get(proxyEndpointId, { ...params }) -> ProxyEndpoint +- client.zeroTrust.gateway.proxyEndpoints.get(proxyEndpointId, { ...params }) -> ProxyEndpointGetResponse | null ### Rules diff --git a/src/resources/zero-trust/gateway/gateway.ts b/src/resources/zero-trust/gateway/gateway.ts index 25360eff0f..780054ef90 100644 --- a/src/resources/zero-trust/gateway/gateway.ts +++ b/src/resources/zero-trust/gateway/gateway.ts @@ -159,7 +159,7 @@ export namespace Gateway { export import GatewayIPs = ProxyEndpointsAPI.GatewayIPs; export import ProxyEndpoint = ProxyEndpointsAPI.ProxyEndpoint; export import ProxyEndpointDeleteResponse = ProxyEndpointsAPI.ProxyEndpointDeleteResponse; - export import ProxyEndpointsSinglePage = ProxyEndpointsAPI.ProxyEndpointsSinglePage; + export import ProxyEndpointGetResponse = ProxyEndpointsAPI.ProxyEndpointGetResponse; export import ProxyEndpointCreateParams = ProxyEndpointsAPI.ProxyEndpointCreateParams; export import ProxyEndpointListParams = ProxyEndpointsAPI.ProxyEndpointListParams; export import ProxyEndpointDeleteParams = ProxyEndpointsAPI.ProxyEndpointDeleteParams; diff --git a/src/resources/zero-trust/gateway/index.ts b/src/resources/zero-trust/gateway/index.ts index 8a2d6d42a3..7feb128bfa 100644 --- a/src/resources/zero-trust/gateway/index.ts +++ b/src/resources/zero-trust/gateway/index.ts @@ -50,12 +50,12 @@ export { GatewayIPs, ProxyEndpoint, ProxyEndpointDeleteResponse, + ProxyEndpointGetResponse, ProxyEndpointCreateParams, ProxyEndpointListParams, ProxyEndpointDeleteParams, ProxyEndpointEditParams, ProxyEndpointGetParams, - ProxyEndpointsSinglePage, ProxyEndpoints, } from './proxy-endpoints'; export { diff --git a/src/resources/zero-trust/gateway/proxy-endpoints.ts b/src/resources/zero-trust/gateway/proxy-endpoints.ts index 7aa87a10ca..b356c6bfa8 100644 --- a/src/resources/zero-trust/gateway/proxy-endpoints.ts +++ b/src/resources/zero-trust/gateway/proxy-endpoints.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as ProxyEndpointsAPI from './proxy-endpoints'; -import { SinglePage } from '../../../pagination'; export class ProxyEndpoints extends APIResource { /** @@ -20,18 +19,15 @@ export class ProxyEndpoints extends APIResource { } /** - * Fetches a single Zero Trust Gateway proxy endpoint. + * Fetches all Zero Trust Gateway proxy endpoints for an account. */ - list( - params: ProxyEndpointListParams, - options?: Core.RequestOptions, - ): Core.PagePromise { + list(params: ProxyEndpointListParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id } = params; - return this._client.getAPIList( - `/accounts/${account_id}/gateway/proxy_endpoints`, - ProxyEndpointsSinglePage, - options, - ); + return ( + this._client.get(`/accounts/${account_id}/gateway/proxy_endpoints`, options) as Core.APIPromise<{ + result: ProxyEndpoint; + }> + )._thenUnwrap((obj) => obj.result); } /** @@ -69,25 +65,23 @@ export class ProxyEndpoints extends APIResource { } /** - * Fetches all Zero Trust Gateway proxy endpoints for an account. + * Fetches a single Zero Trust Gateway proxy endpoint. */ get( proxyEndpointId: string, params: ProxyEndpointGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.get( `/accounts/${account_id}/gateway/proxy_endpoints/${proxyEndpointId}`, options, - ) as Core.APIPromise<{ result: ProxyEndpoint }> + ) as Core.APIPromise<{ result: ProxyEndpointGetResponse | null }> )._thenUnwrap((obj) => obj.result); } } -export class ProxyEndpointsSinglePage extends SinglePage {} - /** * The IPv4 CIDR or IPv6 CIDR. IPv6 CIDRs are limited to a maximum of /109. IPv4 * CIDRs are limited to a maximum of /25. @@ -125,6 +119,8 @@ export interface ProxyEndpoint { export type ProxyEndpointDeleteResponse = unknown | string | null; +export type ProxyEndpointGetResponse = Array; + export interface ProxyEndpointCreateParams { /** * Path param: @@ -175,7 +171,7 @@ export namespace ProxyEndpoints { export import GatewayIPs = ProxyEndpointsAPI.GatewayIPs; export import ProxyEndpoint = ProxyEndpointsAPI.ProxyEndpoint; export import ProxyEndpointDeleteResponse = ProxyEndpointsAPI.ProxyEndpointDeleteResponse; - export import ProxyEndpointsSinglePage = ProxyEndpointsAPI.ProxyEndpointsSinglePage; + export import ProxyEndpointGetResponse = ProxyEndpointsAPI.ProxyEndpointGetResponse; export import ProxyEndpointCreateParams = ProxyEndpointsAPI.ProxyEndpointCreateParams; export import ProxyEndpointListParams = ProxyEndpointsAPI.ProxyEndpointListParams; export import ProxyEndpointDeleteParams = ProxyEndpointsAPI.ProxyEndpointDeleteParams; From 710b48437c4c802a59625d130436e9588aac0858 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 20:15:59 +0000 Subject: [PATCH 201/473] feat(api): OpenAPI spec update via Stainless API (#698) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 35ba879867..2ff6fd3a13 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1f68e176f43592631364d94df7670824a599296f6734ca70ffa94454c58da466.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0560036bc26f789658066e3350d9d3e6d0d4168f1a4f8ba0e7f55ca889e3ebfe.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 8bd527c4c09fd2b23a384d460d5a76f9f2b56324 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 20:19:25 +0000 Subject: [PATCH 202/473] feat(api): OpenAPI spec update via Stainless API (#699) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2ff6fd3a13..b3c2fa72c4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0560036bc26f789658066e3350d9d3e6d0d4168f1a4f8ba0e7f55ca889e3ebfe.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a18a8d7f1f80a39beb83a6541eb29dea4a69df37444aeb85493c94256c11d3a6.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From a1a291b42bb027115d5520172d884f21ba680002 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 20:21:35 +0000 Subject: [PATCH 203/473] feat(api): OpenAPI spec update via Stainless API (#700) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index b3c2fa72c4..2ff6fd3a13 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a18a8d7f1f80a39beb83a6541eb29dea4a69df37444aeb85493c94256c11d3a6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0560036bc26f789658066e3350d9d3e6d0d4168f1a4f8ba0e7f55ca889e3ebfe.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From adb0338e420356d38e945f7e539c68901006d6ec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 20:36:05 +0000 Subject: [PATCH 204/473] feat(api): OpenAPI spec update via Stainless API (#701) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2ff6fd3a13..b3c2fa72c4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0560036bc26f789658066e3350d9d3e6d0d4168f1a4f8ba0e7f55ca889e3ebfe.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a18a8d7f1f80a39beb83a6541eb29dea4a69df37444aeb85493c94256c11d3a6.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 4091c654594928c70dd2fb48dc773a33f2d0a0d5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 22:08:15 +0000 Subject: [PATCH 205/473] feat(api): OpenAPI spec update via Stainless API (#702) --- .stats.yml | 2 +- src/resources/zero-trust/dex/colos.ts | 8 ++--- .../zero-trust/dex/fleet-status/devices.ts | 13 ++++++-- .../dex/fleet-status/fleet-status.ts | 4 +-- .../zero-trust/dex/http-tests/http-tests.ts | 12 +++---- .../zero-trust/dex/http-tests/percentiles.ts | 8 ++--- .../traceroute-test-results/network-path.ts | 5 --- .../zero-trust/dex/traceroute-tests.ts | 32 +++++++++---------- .../zero-trust/dex/colos.test.ts | 8 ++--- .../dex/fleet-status/devices.test.ts | 10 +++--- .../dex/fleet-status/fleet-status.test.ts | 8 ++--- .../dex/http-tests/http-tests.test.ts | 8 ++--- .../dex/http-tests/percentiles.test.ts | 8 ++--- .../zero-trust/dex/traceroute-tests.test.ts | 24 +++++++------- 14 files changed, 78 insertions(+), 72 deletions(-) diff --git a/.stats.yml b/.stats.yml index b3c2fa72c4..62a18d0f9d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a18a8d7f1f80a39beb83a6541eb29dea4a69df37444aeb85493c94256c11d3a6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7080386fb1d04dafc80523803a44e41bab56e2907c13694ced938d02a3abb9d5.yml diff --git a/src/resources/zero-trust/dex/colos.ts b/src/resources/zero-trust/dex/colos.ts index 6b3118b3c4..fc346633b7 100644 --- a/src/resources/zero-trust/dex/colos.ts +++ b/src/resources/zero-trust/dex/colos.ts @@ -34,14 +34,14 @@ export interface ColoListParams { account_id: string; /** - * Query param: End time for connection period in RFC3339 (ISO 8601) format. + * Query param: Start time for connection period in RFC3339 (ISO 8601) format. */ - timeEnd: string; + from: string; /** - * Query param: Start time for connection period in RFC3339 (ISO 8601) format. + * Query param: End time for connection period in RFC3339 (ISO 8601) format. */ - timeStart: string; + to: string; /** * Query param: Type of usage that colos should be sorted by. If unspecified, diff --git a/src/resources/zero-trust/dex/fleet-status/devices.ts b/src/resources/zero-trust/dex/fleet-status/devices.ts index c00efc5891..56673bb399 100644 --- a/src/resources/zero-trust/dex/fleet-status/devices.ts +++ b/src/resources/zero-trust/dex/fleet-status/devices.ts @@ -70,12 +70,21 @@ export interface DeviceListParams extends V4PagePaginationArrayParams { /** * Query param: Timestamp in ISO format */ - time_end: string; + from: string; + + /** + * Query param: Source: + * + * - `hourly` - device details aggregated hourly, up to 7 days prior + * - `last_seen` - device details, up to 24 hours prior + * - `raw` - device details, up to 7 days prior + */ + source: 'last_seen' | 'hourly' | 'raw'; /** * Query param: Timestamp in ISO format */ - time_start: string; + to: string; /** * Query param: Cloudflare colo diff --git a/src/resources/zero-trust/dex/fleet-status/fleet-status.ts b/src/resources/zero-trust/dex/fleet-status/fleet-status.ts index e97748168c..375c6dad38 100644 --- a/src/resources/zero-trust/dex/fleet-status/fleet-status.ts +++ b/src/resources/zero-trust/dex/fleet-status/fleet-status.ts @@ -90,12 +90,12 @@ export interface FleetStatusOverTimeParams { /** * Query param: Timestamp in ISO format */ - time_end: string; + from: string; /** * Query param: Timestamp in ISO format */ - time_start: string; + to: string; /** * Query param: Cloudflare colo diff --git a/src/resources/zero-trust/dex/http-tests/http-tests.ts b/src/resources/zero-trust/dex/http-tests/http-tests.ts index a13d165644..67896668ab 100644 --- a/src/resources/zero-trust/dex/http-tests/http-tests.ts +++ b/src/resources/zero-trust/dex/http-tests/http-tests.ts @@ -187,19 +187,19 @@ export interface HTTPTestGetParams { account_id: string; /** - * Query param: Time interval for aggregate time slots. + * Query param: Start time for aggregate metrics in ISO ms */ - interval: 'minute' | 'hour'; + from: string; /** - * Query param: End time for aggregate metrics in ISO ms + * Query param: Time interval for aggregate time slots. */ - timeEnd: string; + interval: 'minute' | 'hour'; /** - * Query param: Start time for aggregate metrics in ISO ms + * Query param: End time for aggregate metrics in ISO ms */ - timeStart: string; + to: string; /** * Query param: Optionally filter result stats to a Cloudflare colo. Cannot be used diff --git a/src/resources/zero-trust/dex/http-tests/percentiles.ts b/src/resources/zero-trust/dex/http-tests/percentiles.ts index 338c444690..17da53d347 100644 --- a/src/resources/zero-trust/dex/http-tests/percentiles.ts +++ b/src/resources/zero-trust/dex/http-tests/percentiles.ts @@ -67,14 +67,14 @@ export interface PercentileGetParams { account_id: string; /** - * Query param: End time for aggregate metrics in ISO format + * Query param: Start time for aggregate metrics in ISO format */ - timeEnd: string; + from: string; /** - * Query param: Start time for aggregate metrics in ISO format + * Query param: End time for aggregate metrics in ISO format */ - timeStart: string; + to: string; /** * Query param: Optionally filter result stats to a Cloudflare colo. Cannot be used diff --git a/src/resources/zero-trust/dex/traceroute-test-results/network-path.ts b/src/resources/zero-trust/dex/traceroute-test-results/network-path.ts index 556051e047..8b9c96a598 100644 --- a/src/resources/zero-trust/dex/traceroute-test-results/network-path.ts +++ b/src/resources/zero-trust/dex/traceroute-test-results/network-path.ts @@ -35,11 +35,6 @@ export interface NetworkPathGetResponse { */ resultId: string; - /** - * date time of this traceroute test - */ - time_start: string; - /** * name of the device associated with this network path response */ diff --git a/src/resources/zero-trust/dex/traceroute-tests.ts b/src/resources/zero-trust/dex/traceroute-tests.ts index bc48c0494e..a8c705c63c 100644 --- a/src/resources/zero-trust/dex/traceroute-tests.ts +++ b/src/resources/zero-trust/dex/traceroute-tests.ts @@ -249,19 +249,19 @@ export interface TracerouteTestGetParams { account_id: string; /** - * Query param: Time interval for aggregate time slots. + * Query param: Start time for aggregate metrics in ISO ms */ - interval: 'minute' | 'hour'; + from: string; /** - * Query param: End time for aggregate metrics in ISO ms + * Query param: Time interval for aggregate time slots. */ - timeEnd: string; + interval: 'minute' | 'hour'; /** - * Query param: Start time for aggregate metrics in ISO ms + * Query param: End time for aggregate metrics in ISO ms */ - timeStart: string; + to: string; /** * Query param: Optionally filter result stats to a Cloudflare colo. Cannot be used @@ -288,19 +288,19 @@ export interface TracerouteTestNetworkPathParams { deviceId: string; /** - * Query param: Time interval for aggregate time slots. + * Query param: Start time for aggregate metrics in ISO ms */ - interval: 'minute' | 'hour'; + from: string; /** - * Query param: End time for aggregate metrics in ISO ms + * Query param: Time interval for aggregate time slots. */ - timeEnd: string; + interval: 'minute' | 'hour'; /** - * Query param: Start time for aggregate metrics in ISO ms + * Query param: End time for aggregate metrics in ISO ms */ - timeStart: string; + to: string; } export interface TracerouteTestPercentilesParams { @@ -310,14 +310,14 @@ export interface TracerouteTestPercentilesParams { account_id: string; /** - * Query param: End time for aggregate metrics in ISO format + * Query param: Start time for aggregate metrics in ISO format */ - timeEnd: string; + from: string; /** - * Query param: Start time for aggregate metrics in ISO format + * Query param: End time for aggregate metrics in ISO format */ - timeStart: string; + to: string; /** * Query param: Optionally filter result stats to a Cloudflare colo. Cannot be used diff --git a/tests/api-resources/zero-trust/dex/colos.test.ts b/tests/api-resources/zero-trust/dex/colos.test.ts index a581c19e97..bb9a5e195f 100644 --- a/tests/api-resources/zero-trust/dex/colos.test.ts +++ b/tests/api-resources/zero-trust/dex/colos.test.ts @@ -13,8 +13,8 @@ describe('resource colos', () => { test('list: only required params', async () => { const responsePromise = cloudflare.zeroTrust.dex.colos.list({ account_id: '01a7362d577a6c3019a474fd6f485823', - timeEnd: '2023-08-24T20:45:00Z', - timeStart: '2023-08-20T20:45:00Z', + from: '2023-08-20T20:45:00Z', + to: '2023-08-24T20:45:00Z', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -28,8 +28,8 @@ describe('resource colos', () => { test('list: required and optional params', async () => { const response = await cloudflare.zeroTrust.dex.colos.list({ account_id: '01a7362d577a6c3019a474fd6f485823', - timeEnd: '2023-08-24T20:45:00Z', - timeStart: '2023-08-20T20:45:00Z', + from: '2023-08-20T20:45:00Z', + to: '2023-08-24T20:45:00Z', sortBy: 'fleet-status-usage', }); }); diff --git a/tests/api-resources/zero-trust/dex/fleet-status/devices.test.ts b/tests/api-resources/zero-trust/dex/fleet-status/devices.test.ts index ccde92e202..56c104301e 100644 --- a/tests/api-resources/zero-trust/dex/fleet-status/devices.test.ts +++ b/tests/api-resources/zero-trust/dex/fleet-status/devices.test.ts @@ -14,10 +14,11 @@ describe('resource devices', () => { test.skip('list: only required params', async () => { const responsePromise = cloudflare.zeroTrust.dex.fleetStatus.devices.list({ account_id: '01a7362d577a6c3019a474fd6f485823', + from: '2023-10-11T00:00:00Z', page: 1, per_page: 10, - time_end: '2023-10-11T00:00:00Z', - time_start: '2023-10-11T00:00:00Z', + source: 'last_seen', + to: '2023-10-11T00:00:00Z', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -32,10 +33,11 @@ describe('resource devices', () => { test.skip('list: required and optional params', async () => { const response = await cloudflare.zeroTrust.dex.fleetStatus.devices.list({ account_id: '01a7362d577a6c3019a474fd6f485823', + from: '2023-10-11T00:00:00Z', page: 1, per_page: 10, - time_end: '2023-10-11T00:00:00Z', - time_start: '2023-10-11T00:00:00Z', + source: 'last_seen', + to: '2023-10-11T00:00:00Z', colo: 'SJC', device_id: 'cb49c27f-7f97-49c5-b6f3-f7c01ead0fd7', mode: 'proxy', diff --git a/tests/api-resources/zero-trust/dex/fleet-status/fleet-status.test.ts b/tests/api-resources/zero-trust/dex/fleet-status/fleet-status.test.ts index c2f6a67ffb..6dd8dbd1ee 100644 --- a/tests/api-resources/zero-trust/dex/fleet-status/fleet-status.test.ts +++ b/tests/api-resources/zero-trust/dex/fleet-status/fleet-status.test.ts @@ -34,8 +34,8 @@ describe('resource fleetStatus', () => { test('overTime: only required params', async () => { const responsePromise = cloudflare.zeroTrust.dex.fleetStatus.overTime({ account_id: '01a7362d577a6c3019a474fd6f485823', - time_end: '2023-10-11T00:00:00Z', - time_start: '2023-10-11T00:00:00Z', + from: '2023-10-11T00:00:00Z', + to: '2023-10-11T00:00:00Z', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -49,8 +49,8 @@ describe('resource fleetStatus', () => { test('overTime: required and optional params', async () => { const response = await cloudflare.zeroTrust.dex.fleetStatus.overTime({ account_id: '01a7362d577a6c3019a474fd6f485823', - time_end: '2023-10-11T00:00:00Z', - time_start: '2023-10-11T00:00:00Z', + from: '2023-10-11T00:00:00Z', + to: '2023-10-11T00:00:00Z', colo: 'SJC', device_id: 'cb49c27f-7f97-49c5-b6f3-f7c01ead0fd7', }); diff --git a/tests/api-resources/zero-trust/dex/http-tests/http-tests.test.ts b/tests/api-resources/zero-trust/dex/http-tests/http-tests.test.ts index 1c99e460e3..97c2cf14b6 100644 --- a/tests/api-resources/zero-trust/dex/http-tests/http-tests.test.ts +++ b/tests/api-resources/zero-trust/dex/http-tests/http-tests.test.ts @@ -13,9 +13,9 @@ describe('resource httpTests', () => { test('get: only required params', async () => { const responsePromise = cloudflare.zeroTrust.dex.httpTests.get('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', + from: '1689520412000', interval: 'minute', - timeEnd: '1689606812000', - timeStart: '1689520412000', + to: '1689606812000', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -29,9 +29,9 @@ describe('resource httpTests', () => { test('get: required and optional params', async () => { const response = await cloudflare.zeroTrust.dex.httpTests.get('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', + from: '1689520412000', interval: 'minute', - timeEnd: '1689606812000', - timeStart: '1689520412000', + to: '1689606812000', colo: 'string', deviceId: ['string', 'string', 'string'], }); diff --git a/tests/api-resources/zero-trust/dex/http-tests/percentiles.test.ts b/tests/api-resources/zero-trust/dex/http-tests/percentiles.test.ts index ec7f21993a..323cdc1fb4 100644 --- a/tests/api-resources/zero-trust/dex/http-tests/percentiles.test.ts +++ b/tests/api-resources/zero-trust/dex/http-tests/percentiles.test.ts @@ -15,8 +15,8 @@ describe('resource percentiles', () => { 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', - timeEnd: '2023-09-20T17:00:00Z', - timeStart: '2023-09-20T17:00:00Z', + from: '2023-09-20T17:00:00Z', + to: '2023-09-20T17:00:00Z', }, ); const rawResponse = await responsePromise.asResponse(); @@ -33,8 +33,8 @@ describe('resource percentiles', () => { 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', - timeEnd: '2023-09-20T17:00:00Z', - timeStart: '2023-09-20T17:00:00Z', + from: '2023-09-20T17:00:00Z', + to: '2023-09-20T17:00:00Z', colo: 'string', deviceId: ['string', 'string', 'string'], }, diff --git a/tests/api-resources/zero-trust/dex/traceroute-tests.test.ts b/tests/api-resources/zero-trust/dex/traceroute-tests.test.ts index 44fdd4a7c9..d51cba88eb 100644 --- a/tests/api-resources/zero-trust/dex/traceroute-tests.test.ts +++ b/tests/api-resources/zero-trust/dex/traceroute-tests.test.ts @@ -15,9 +15,9 @@ describe('resource tracerouteTests', () => { 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', + from: '1689520412000', interval: 'minute', - timeEnd: '1689606812000', - timeStart: '1689520412000', + to: '1689606812000', }, ); const rawResponse = await responsePromise.asResponse(); @@ -34,9 +34,9 @@ describe('resource tracerouteTests', () => { 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', + from: '1689520412000', interval: 'minute', - timeEnd: '1689606812000', - timeStart: '1689520412000', + to: '1689606812000', colo: 'string', deviceId: ['string', 'string', 'string'], }, @@ -49,9 +49,9 @@ describe('resource tracerouteTests', () => { { account_id: '01a7362d577a6c3019a474fd6f485823', deviceId: 'string', + from: '1689520412000', interval: 'minute', - timeEnd: '1689606812000', - timeStart: '1689520412000', + to: '1689606812000', }, ); const rawResponse = await responsePromise.asResponse(); @@ -69,9 +69,9 @@ describe('resource tracerouteTests', () => { { account_id: '01a7362d577a6c3019a474fd6f485823', deviceId: 'string', + from: '1689520412000', interval: 'minute', - timeEnd: '1689606812000', - timeStart: '1689520412000', + to: '1689606812000', }, ); }); @@ -81,8 +81,8 @@ describe('resource tracerouteTests', () => { 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', - timeEnd: '2023-09-20T17:00:00Z', - timeStart: '2023-09-20T17:00:00Z', + from: '2023-09-20T17:00:00Z', + to: '2023-09-20T17:00:00Z', }, ); const rawResponse = await responsePromise.asResponse(); @@ -99,8 +99,8 @@ describe('resource tracerouteTests', () => { 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', - timeEnd: '2023-09-20T17:00:00Z', - timeStart: '2023-09-20T17:00:00Z', + from: '2023-09-20T17:00:00Z', + to: '2023-09-20T17:00:00Z', colo: 'string', deviceId: ['string', 'string', 'string'], }, From 2ff4dd31dffbd4e13dfbe4294d2494ad4d8ecf6e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 22:10:23 +0000 Subject: [PATCH 206/473] feat(api): OpenAPI spec update via Stainless API (#703) --- .stats.yml | 2 +- src/resources/zero-trust/dex/colos.ts | 8 ++--- .../zero-trust/dex/fleet-status/devices.ts | 13 ++------ .../dex/fleet-status/fleet-status.ts | 4 +-- .../zero-trust/dex/http-tests/http-tests.ts | 12 +++---- .../zero-trust/dex/http-tests/percentiles.ts | 8 ++--- .../traceroute-test-results/network-path.ts | 5 +++ .../zero-trust/dex/traceroute-tests.ts | 32 +++++++++---------- .../zero-trust/dex/colos.test.ts | 8 ++--- .../dex/fleet-status/devices.test.ts | 10 +++--- .../dex/fleet-status/fleet-status.test.ts | 8 ++--- .../dex/http-tests/http-tests.test.ts | 8 ++--- .../dex/http-tests/percentiles.test.ts | 8 ++--- .../zero-trust/dex/traceroute-tests.test.ts | 24 +++++++------- 14 files changed, 72 insertions(+), 78 deletions(-) diff --git a/.stats.yml b/.stats.yml index 62a18d0f9d..b3c2fa72c4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7080386fb1d04dafc80523803a44e41bab56e2907c13694ced938d02a3abb9d5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a18a8d7f1f80a39beb83a6541eb29dea4a69df37444aeb85493c94256c11d3a6.yml diff --git a/src/resources/zero-trust/dex/colos.ts b/src/resources/zero-trust/dex/colos.ts index fc346633b7..6b3118b3c4 100644 --- a/src/resources/zero-trust/dex/colos.ts +++ b/src/resources/zero-trust/dex/colos.ts @@ -34,14 +34,14 @@ export interface ColoListParams { account_id: string; /** - * Query param: Start time for connection period in RFC3339 (ISO 8601) format. + * Query param: End time for connection period in RFC3339 (ISO 8601) format. */ - from: string; + timeEnd: string; /** - * Query param: End time for connection period in RFC3339 (ISO 8601) format. + * Query param: Start time for connection period in RFC3339 (ISO 8601) format. */ - to: string; + timeStart: string; /** * Query param: Type of usage that colos should be sorted by. If unspecified, diff --git a/src/resources/zero-trust/dex/fleet-status/devices.ts b/src/resources/zero-trust/dex/fleet-status/devices.ts index 56673bb399..c00efc5891 100644 --- a/src/resources/zero-trust/dex/fleet-status/devices.ts +++ b/src/resources/zero-trust/dex/fleet-status/devices.ts @@ -70,21 +70,12 @@ export interface DeviceListParams extends V4PagePaginationArrayParams { /** * Query param: Timestamp in ISO format */ - from: string; - - /** - * Query param: Source: - * - * - `hourly` - device details aggregated hourly, up to 7 days prior - * - `last_seen` - device details, up to 24 hours prior - * - `raw` - device details, up to 7 days prior - */ - source: 'last_seen' | 'hourly' | 'raw'; + time_end: string; /** * Query param: Timestamp in ISO format */ - to: string; + time_start: string; /** * Query param: Cloudflare colo diff --git a/src/resources/zero-trust/dex/fleet-status/fleet-status.ts b/src/resources/zero-trust/dex/fleet-status/fleet-status.ts index 375c6dad38..e97748168c 100644 --- a/src/resources/zero-trust/dex/fleet-status/fleet-status.ts +++ b/src/resources/zero-trust/dex/fleet-status/fleet-status.ts @@ -90,12 +90,12 @@ export interface FleetStatusOverTimeParams { /** * Query param: Timestamp in ISO format */ - from: string; + time_end: string; /** * Query param: Timestamp in ISO format */ - to: string; + time_start: string; /** * Query param: Cloudflare colo diff --git a/src/resources/zero-trust/dex/http-tests/http-tests.ts b/src/resources/zero-trust/dex/http-tests/http-tests.ts index 67896668ab..a13d165644 100644 --- a/src/resources/zero-trust/dex/http-tests/http-tests.ts +++ b/src/resources/zero-trust/dex/http-tests/http-tests.ts @@ -186,11 +186,6 @@ export interface HTTPTestGetParams { */ account_id: string; - /** - * Query param: Start time for aggregate metrics in ISO ms - */ - from: string; - /** * Query param: Time interval for aggregate time slots. */ @@ -199,7 +194,12 @@ export interface HTTPTestGetParams { /** * Query param: End time for aggregate metrics in ISO ms */ - to: string; + timeEnd: string; + + /** + * Query param: Start time for aggregate metrics in ISO ms + */ + timeStart: string; /** * Query param: Optionally filter result stats to a Cloudflare colo. Cannot be used diff --git a/src/resources/zero-trust/dex/http-tests/percentiles.ts b/src/resources/zero-trust/dex/http-tests/percentiles.ts index 17da53d347..338c444690 100644 --- a/src/resources/zero-trust/dex/http-tests/percentiles.ts +++ b/src/resources/zero-trust/dex/http-tests/percentiles.ts @@ -67,14 +67,14 @@ export interface PercentileGetParams { account_id: string; /** - * Query param: Start time for aggregate metrics in ISO format + * Query param: End time for aggregate metrics in ISO format */ - from: string; + timeEnd: string; /** - * Query param: End time for aggregate metrics in ISO format + * Query param: Start time for aggregate metrics in ISO format */ - to: string; + timeStart: string; /** * Query param: Optionally filter result stats to a Cloudflare colo. Cannot be used diff --git a/src/resources/zero-trust/dex/traceroute-test-results/network-path.ts b/src/resources/zero-trust/dex/traceroute-test-results/network-path.ts index 8b9c96a598..556051e047 100644 --- a/src/resources/zero-trust/dex/traceroute-test-results/network-path.ts +++ b/src/resources/zero-trust/dex/traceroute-test-results/network-path.ts @@ -35,6 +35,11 @@ export interface NetworkPathGetResponse { */ resultId: string; + /** + * date time of this traceroute test + */ + time_start: string; + /** * name of the device associated with this network path response */ diff --git a/src/resources/zero-trust/dex/traceroute-tests.ts b/src/resources/zero-trust/dex/traceroute-tests.ts index a8c705c63c..bc48c0494e 100644 --- a/src/resources/zero-trust/dex/traceroute-tests.ts +++ b/src/resources/zero-trust/dex/traceroute-tests.ts @@ -248,11 +248,6 @@ export interface TracerouteTestGetParams { */ account_id: string; - /** - * Query param: Start time for aggregate metrics in ISO ms - */ - from: string; - /** * Query param: Time interval for aggregate time slots. */ @@ -261,7 +256,12 @@ export interface TracerouteTestGetParams { /** * Query param: End time for aggregate metrics in ISO ms */ - to: string; + timeEnd: string; + + /** + * Query param: Start time for aggregate metrics in ISO ms + */ + timeStart: string; /** * Query param: Optionally filter result stats to a Cloudflare colo. Cannot be used @@ -287,11 +287,6 @@ export interface TracerouteTestNetworkPathParams { */ deviceId: string; - /** - * Query param: Start time for aggregate metrics in ISO ms - */ - from: string; - /** * Query param: Time interval for aggregate time slots. */ @@ -300,7 +295,12 @@ export interface TracerouteTestNetworkPathParams { /** * Query param: End time for aggregate metrics in ISO ms */ - to: string; + timeEnd: string; + + /** + * Query param: Start time for aggregate metrics in ISO ms + */ + timeStart: string; } export interface TracerouteTestPercentilesParams { @@ -310,14 +310,14 @@ export interface TracerouteTestPercentilesParams { account_id: string; /** - * Query param: Start time for aggregate metrics in ISO format + * Query param: End time for aggregate metrics in ISO format */ - from: string; + timeEnd: string; /** - * Query param: End time for aggregate metrics in ISO format + * Query param: Start time for aggregate metrics in ISO format */ - to: string; + timeStart: string; /** * Query param: Optionally filter result stats to a Cloudflare colo. Cannot be used diff --git a/tests/api-resources/zero-trust/dex/colos.test.ts b/tests/api-resources/zero-trust/dex/colos.test.ts index bb9a5e195f..a581c19e97 100644 --- a/tests/api-resources/zero-trust/dex/colos.test.ts +++ b/tests/api-resources/zero-trust/dex/colos.test.ts @@ -13,8 +13,8 @@ describe('resource colos', () => { test('list: only required params', async () => { const responsePromise = cloudflare.zeroTrust.dex.colos.list({ account_id: '01a7362d577a6c3019a474fd6f485823', - from: '2023-08-20T20:45:00Z', - to: '2023-08-24T20:45:00Z', + timeEnd: '2023-08-24T20:45:00Z', + timeStart: '2023-08-20T20:45:00Z', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -28,8 +28,8 @@ describe('resource colos', () => { test('list: required and optional params', async () => { const response = await cloudflare.zeroTrust.dex.colos.list({ account_id: '01a7362d577a6c3019a474fd6f485823', - from: '2023-08-20T20:45:00Z', - to: '2023-08-24T20:45:00Z', + timeEnd: '2023-08-24T20:45:00Z', + timeStart: '2023-08-20T20:45:00Z', sortBy: 'fleet-status-usage', }); }); diff --git a/tests/api-resources/zero-trust/dex/fleet-status/devices.test.ts b/tests/api-resources/zero-trust/dex/fleet-status/devices.test.ts index 56c104301e..ccde92e202 100644 --- a/tests/api-resources/zero-trust/dex/fleet-status/devices.test.ts +++ b/tests/api-resources/zero-trust/dex/fleet-status/devices.test.ts @@ -14,11 +14,10 @@ describe('resource devices', () => { test.skip('list: only required params', async () => { const responsePromise = cloudflare.zeroTrust.dex.fleetStatus.devices.list({ account_id: '01a7362d577a6c3019a474fd6f485823', - from: '2023-10-11T00:00:00Z', page: 1, per_page: 10, - source: 'last_seen', - to: '2023-10-11T00:00:00Z', + time_end: '2023-10-11T00:00:00Z', + time_start: '2023-10-11T00:00:00Z', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -33,11 +32,10 @@ describe('resource devices', () => { test.skip('list: required and optional params', async () => { const response = await cloudflare.zeroTrust.dex.fleetStatus.devices.list({ account_id: '01a7362d577a6c3019a474fd6f485823', - from: '2023-10-11T00:00:00Z', page: 1, per_page: 10, - source: 'last_seen', - to: '2023-10-11T00:00:00Z', + time_end: '2023-10-11T00:00:00Z', + time_start: '2023-10-11T00:00:00Z', colo: 'SJC', device_id: 'cb49c27f-7f97-49c5-b6f3-f7c01ead0fd7', mode: 'proxy', diff --git a/tests/api-resources/zero-trust/dex/fleet-status/fleet-status.test.ts b/tests/api-resources/zero-trust/dex/fleet-status/fleet-status.test.ts index 6dd8dbd1ee..c2f6a67ffb 100644 --- a/tests/api-resources/zero-trust/dex/fleet-status/fleet-status.test.ts +++ b/tests/api-resources/zero-trust/dex/fleet-status/fleet-status.test.ts @@ -34,8 +34,8 @@ describe('resource fleetStatus', () => { test('overTime: only required params', async () => { const responsePromise = cloudflare.zeroTrust.dex.fleetStatus.overTime({ account_id: '01a7362d577a6c3019a474fd6f485823', - from: '2023-10-11T00:00:00Z', - to: '2023-10-11T00:00:00Z', + time_end: '2023-10-11T00:00:00Z', + time_start: '2023-10-11T00:00:00Z', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -49,8 +49,8 @@ describe('resource fleetStatus', () => { test('overTime: required and optional params', async () => { const response = await cloudflare.zeroTrust.dex.fleetStatus.overTime({ account_id: '01a7362d577a6c3019a474fd6f485823', - from: '2023-10-11T00:00:00Z', - to: '2023-10-11T00:00:00Z', + time_end: '2023-10-11T00:00:00Z', + time_start: '2023-10-11T00:00:00Z', colo: 'SJC', device_id: 'cb49c27f-7f97-49c5-b6f3-f7c01ead0fd7', }); diff --git a/tests/api-resources/zero-trust/dex/http-tests/http-tests.test.ts b/tests/api-resources/zero-trust/dex/http-tests/http-tests.test.ts index 97c2cf14b6..1c99e460e3 100644 --- a/tests/api-resources/zero-trust/dex/http-tests/http-tests.test.ts +++ b/tests/api-resources/zero-trust/dex/http-tests/http-tests.test.ts @@ -13,9 +13,9 @@ describe('resource httpTests', () => { test('get: only required params', async () => { const responsePromise = cloudflare.zeroTrust.dex.httpTests.get('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', - from: '1689520412000', interval: 'minute', - to: '1689606812000', + timeEnd: '1689606812000', + timeStart: '1689520412000', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -29,9 +29,9 @@ describe('resource httpTests', () => { test('get: required and optional params', async () => { const response = await cloudflare.zeroTrust.dex.httpTests.get('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', - from: '1689520412000', interval: 'minute', - to: '1689606812000', + timeEnd: '1689606812000', + timeStart: '1689520412000', colo: 'string', deviceId: ['string', 'string', 'string'], }); diff --git a/tests/api-resources/zero-trust/dex/http-tests/percentiles.test.ts b/tests/api-resources/zero-trust/dex/http-tests/percentiles.test.ts index 323cdc1fb4..ec7f21993a 100644 --- a/tests/api-resources/zero-trust/dex/http-tests/percentiles.test.ts +++ b/tests/api-resources/zero-trust/dex/http-tests/percentiles.test.ts @@ -15,8 +15,8 @@ describe('resource percentiles', () => { 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', - from: '2023-09-20T17:00:00Z', - to: '2023-09-20T17:00:00Z', + timeEnd: '2023-09-20T17:00:00Z', + timeStart: '2023-09-20T17:00:00Z', }, ); const rawResponse = await responsePromise.asResponse(); @@ -33,8 +33,8 @@ describe('resource percentiles', () => { 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', - from: '2023-09-20T17:00:00Z', - to: '2023-09-20T17:00:00Z', + timeEnd: '2023-09-20T17:00:00Z', + timeStart: '2023-09-20T17:00:00Z', colo: 'string', deviceId: ['string', 'string', 'string'], }, diff --git a/tests/api-resources/zero-trust/dex/traceroute-tests.test.ts b/tests/api-resources/zero-trust/dex/traceroute-tests.test.ts index d51cba88eb..44fdd4a7c9 100644 --- a/tests/api-resources/zero-trust/dex/traceroute-tests.test.ts +++ b/tests/api-resources/zero-trust/dex/traceroute-tests.test.ts @@ -15,9 +15,9 @@ describe('resource tracerouteTests', () => { 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', - from: '1689520412000', interval: 'minute', - to: '1689606812000', + timeEnd: '1689606812000', + timeStart: '1689520412000', }, ); const rawResponse = await responsePromise.asResponse(); @@ -34,9 +34,9 @@ describe('resource tracerouteTests', () => { 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', - from: '1689520412000', interval: 'minute', - to: '1689606812000', + timeEnd: '1689606812000', + timeStart: '1689520412000', colo: 'string', deviceId: ['string', 'string', 'string'], }, @@ -49,9 +49,9 @@ describe('resource tracerouteTests', () => { { account_id: '01a7362d577a6c3019a474fd6f485823', deviceId: 'string', - from: '1689520412000', interval: 'minute', - to: '1689606812000', + timeEnd: '1689606812000', + timeStart: '1689520412000', }, ); const rawResponse = await responsePromise.asResponse(); @@ -69,9 +69,9 @@ describe('resource tracerouteTests', () => { { account_id: '01a7362d577a6c3019a474fd6f485823', deviceId: 'string', - from: '1689520412000', interval: 'minute', - to: '1689606812000', + timeEnd: '1689606812000', + timeStart: '1689520412000', }, ); }); @@ -81,8 +81,8 @@ describe('resource tracerouteTests', () => { 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', - from: '2023-09-20T17:00:00Z', - to: '2023-09-20T17:00:00Z', + timeEnd: '2023-09-20T17:00:00Z', + timeStart: '2023-09-20T17:00:00Z', }, ); const rawResponse = await responsePromise.asResponse(); @@ -99,8 +99,8 @@ describe('resource tracerouteTests', () => { 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', - from: '2023-09-20T17:00:00Z', - to: '2023-09-20T17:00:00Z', + timeEnd: '2023-09-20T17:00:00Z', + timeStart: '2023-09-20T17:00:00Z', colo: 'string', deviceId: ['string', 'string', 'string'], }, From f4300ab95a042741a67cb919eff12ab0ea7afc4d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 23:20:30 +0000 Subject: [PATCH 207/473] feat(api): OpenAPI spec update via Stainless API (#704) --- .stats.yml | 2 +- src/resources/zero-trust/dex/colos.ts | 8 ++--- .../zero-trust/dex/fleet-status/devices.ts | 13 ++++++-- .../dex/fleet-status/fleet-status.ts | 4 +-- .../zero-trust/dex/http-tests/http-tests.ts | 12 +++---- .../zero-trust/dex/http-tests/percentiles.ts | 8 ++--- .../traceroute-test-results/network-path.ts | 5 --- .../zero-trust/dex/traceroute-tests.ts | 32 +++++++++---------- .../zero-trust/dex/colos.test.ts | 8 ++--- .../dex/fleet-status/devices.test.ts | 10 +++--- .../dex/fleet-status/fleet-status.test.ts | 8 ++--- .../dex/http-tests/http-tests.test.ts | 8 ++--- .../dex/http-tests/percentiles.test.ts | 8 ++--- .../zero-trust/dex/traceroute-tests.test.ts | 24 +++++++------- 14 files changed, 78 insertions(+), 72 deletions(-) diff --git a/.stats.yml b/.stats.yml index b3c2fa72c4..62a18d0f9d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a18a8d7f1f80a39beb83a6541eb29dea4a69df37444aeb85493c94256c11d3a6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7080386fb1d04dafc80523803a44e41bab56e2907c13694ced938d02a3abb9d5.yml diff --git a/src/resources/zero-trust/dex/colos.ts b/src/resources/zero-trust/dex/colos.ts index 6b3118b3c4..fc346633b7 100644 --- a/src/resources/zero-trust/dex/colos.ts +++ b/src/resources/zero-trust/dex/colos.ts @@ -34,14 +34,14 @@ export interface ColoListParams { account_id: string; /** - * Query param: End time for connection period in RFC3339 (ISO 8601) format. + * Query param: Start time for connection period in RFC3339 (ISO 8601) format. */ - timeEnd: string; + from: string; /** - * Query param: Start time for connection period in RFC3339 (ISO 8601) format. + * Query param: End time for connection period in RFC3339 (ISO 8601) format. */ - timeStart: string; + to: string; /** * Query param: Type of usage that colos should be sorted by. If unspecified, diff --git a/src/resources/zero-trust/dex/fleet-status/devices.ts b/src/resources/zero-trust/dex/fleet-status/devices.ts index c00efc5891..56673bb399 100644 --- a/src/resources/zero-trust/dex/fleet-status/devices.ts +++ b/src/resources/zero-trust/dex/fleet-status/devices.ts @@ -70,12 +70,21 @@ export interface DeviceListParams extends V4PagePaginationArrayParams { /** * Query param: Timestamp in ISO format */ - time_end: string; + from: string; + + /** + * Query param: Source: + * + * - `hourly` - device details aggregated hourly, up to 7 days prior + * - `last_seen` - device details, up to 24 hours prior + * - `raw` - device details, up to 7 days prior + */ + source: 'last_seen' | 'hourly' | 'raw'; /** * Query param: Timestamp in ISO format */ - time_start: string; + to: string; /** * Query param: Cloudflare colo diff --git a/src/resources/zero-trust/dex/fleet-status/fleet-status.ts b/src/resources/zero-trust/dex/fleet-status/fleet-status.ts index e97748168c..375c6dad38 100644 --- a/src/resources/zero-trust/dex/fleet-status/fleet-status.ts +++ b/src/resources/zero-trust/dex/fleet-status/fleet-status.ts @@ -90,12 +90,12 @@ export interface FleetStatusOverTimeParams { /** * Query param: Timestamp in ISO format */ - time_end: string; + from: string; /** * Query param: Timestamp in ISO format */ - time_start: string; + to: string; /** * Query param: Cloudflare colo diff --git a/src/resources/zero-trust/dex/http-tests/http-tests.ts b/src/resources/zero-trust/dex/http-tests/http-tests.ts index a13d165644..67896668ab 100644 --- a/src/resources/zero-trust/dex/http-tests/http-tests.ts +++ b/src/resources/zero-trust/dex/http-tests/http-tests.ts @@ -187,19 +187,19 @@ export interface HTTPTestGetParams { account_id: string; /** - * Query param: Time interval for aggregate time slots. + * Query param: Start time for aggregate metrics in ISO ms */ - interval: 'minute' | 'hour'; + from: string; /** - * Query param: End time for aggregate metrics in ISO ms + * Query param: Time interval for aggregate time slots. */ - timeEnd: string; + interval: 'minute' | 'hour'; /** - * Query param: Start time for aggregate metrics in ISO ms + * Query param: End time for aggregate metrics in ISO ms */ - timeStart: string; + to: string; /** * Query param: Optionally filter result stats to a Cloudflare colo. Cannot be used diff --git a/src/resources/zero-trust/dex/http-tests/percentiles.ts b/src/resources/zero-trust/dex/http-tests/percentiles.ts index 338c444690..17da53d347 100644 --- a/src/resources/zero-trust/dex/http-tests/percentiles.ts +++ b/src/resources/zero-trust/dex/http-tests/percentiles.ts @@ -67,14 +67,14 @@ export interface PercentileGetParams { account_id: string; /** - * Query param: End time for aggregate metrics in ISO format + * Query param: Start time for aggregate metrics in ISO format */ - timeEnd: string; + from: string; /** - * Query param: Start time for aggregate metrics in ISO format + * Query param: End time for aggregate metrics in ISO format */ - timeStart: string; + to: string; /** * Query param: Optionally filter result stats to a Cloudflare colo. Cannot be used diff --git a/src/resources/zero-trust/dex/traceroute-test-results/network-path.ts b/src/resources/zero-trust/dex/traceroute-test-results/network-path.ts index 556051e047..8b9c96a598 100644 --- a/src/resources/zero-trust/dex/traceroute-test-results/network-path.ts +++ b/src/resources/zero-trust/dex/traceroute-test-results/network-path.ts @@ -35,11 +35,6 @@ export interface NetworkPathGetResponse { */ resultId: string; - /** - * date time of this traceroute test - */ - time_start: string; - /** * name of the device associated with this network path response */ diff --git a/src/resources/zero-trust/dex/traceroute-tests.ts b/src/resources/zero-trust/dex/traceroute-tests.ts index bc48c0494e..a8c705c63c 100644 --- a/src/resources/zero-trust/dex/traceroute-tests.ts +++ b/src/resources/zero-trust/dex/traceroute-tests.ts @@ -249,19 +249,19 @@ export interface TracerouteTestGetParams { account_id: string; /** - * Query param: Time interval for aggregate time slots. + * Query param: Start time for aggregate metrics in ISO ms */ - interval: 'minute' | 'hour'; + from: string; /** - * Query param: End time for aggregate metrics in ISO ms + * Query param: Time interval for aggregate time slots. */ - timeEnd: string; + interval: 'minute' | 'hour'; /** - * Query param: Start time for aggregate metrics in ISO ms + * Query param: End time for aggregate metrics in ISO ms */ - timeStart: string; + to: string; /** * Query param: Optionally filter result stats to a Cloudflare colo. Cannot be used @@ -288,19 +288,19 @@ export interface TracerouteTestNetworkPathParams { deviceId: string; /** - * Query param: Time interval for aggregate time slots. + * Query param: Start time for aggregate metrics in ISO ms */ - interval: 'minute' | 'hour'; + from: string; /** - * Query param: End time for aggregate metrics in ISO ms + * Query param: Time interval for aggregate time slots. */ - timeEnd: string; + interval: 'minute' | 'hour'; /** - * Query param: Start time for aggregate metrics in ISO ms + * Query param: End time for aggregate metrics in ISO ms */ - timeStart: string; + to: string; } export interface TracerouteTestPercentilesParams { @@ -310,14 +310,14 @@ export interface TracerouteTestPercentilesParams { account_id: string; /** - * Query param: End time for aggregate metrics in ISO format + * Query param: Start time for aggregate metrics in ISO format */ - timeEnd: string; + from: string; /** - * Query param: Start time for aggregate metrics in ISO format + * Query param: End time for aggregate metrics in ISO format */ - timeStart: string; + to: string; /** * Query param: Optionally filter result stats to a Cloudflare colo. Cannot be used diff --git a/tests/api-resources/zero-trust/dex/colos.test.ts b/tests/api-resources/zero-trust/dex/colos.test.ts index a581c19e97..bb9a5e195f 100644 --- a/tests/api-resources/zero-trust/dex/colos.test.ts +++ b/tests/api-resources/zero-trust/dex/colos.test.ts @@ -13,8 +13,8 @@ describe('resource colos', () => { test('list: only required params', async () => { const responsePromise = cloudflare.zeroTrust.dex.colos.list({ account_id: '01a7362d577a6c3019a474fd6f485823', - timeEnd: '2023-08-24T20:45:00Z', - timeStart: '2023-08-20T20:45:00Z', + from: '2023-08-20T20:45:00Z', + to: '2023-08-24T20:45:00Z', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -28,8 +28,8 @@ describe('resource colos', () => { test('list: required and optional params', async () => { const response = await cloudflare.zeroTrust.dex.colos.list({ account_id: '01a7362d577a6c3019a474fd6f485823', - timeEnd: '2023-08-24T20:45:00Z', - timeStart: '2023-08-20T20:45:00Z', + from: '2023-08-20T20:45:00Z', + to: '2023-08-24T20:45:00Z', sortBy: 'fleet-status-usage', }); }); diff --git a/tests/api-resources/zero-trust/dex/fleet-status/devices.test.ts b/tests/api-resources/zero-trust/dex/fleet-status/devices.test.ts index ccde92e202..56c104301e 100644 --- a/tests/api-resources/zero-trust/dex/fleet-status/devices.test.ts +++ b/tests/api-resources/zero-trust/dex/fleet-status/devices.test.ts @@ -14,10 +14,11 @@ describe('resource devices', () => { test.skip('list: only required params', async () => { const responsePromise = cloudflare.zeroTrust.dex.fleetStatus.devices.list({ account_id: '01a7362d577a6c3019a474fd6f485823', + from: '2023-10-11T00:00:00Z', page: 1, per_page: 10, - time_end: '2023-10-11T00:00:00Z', - time_start: '2023-10-11T00:00:00Z', + source: 'last_seen', + to: '2023-10-11T00:00:00Z', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -32,10 +33,11 @@ describe('resource devices', () => { test.skip('list: required and optional params', async () => { const response = await cloudflare.zeroTrust.dex.fleetStatus.devices.list({ account_id: '01a7362d577a6c3019a474fd6f485823', + from: '2023-10-11T00:00:00Z', page: 1, per_page: 10, - time_end: '2023-10-11T00:00:00Z', - time_start: '2023-10-11T00:00:00Z', + source: 'last_seen', + to: '2023-10-11T00:00:00Z', colo: 'SJC', device_id: 'cb49c27f-7f97-49c5-b6f3-f7c01ead0fd7', mode: 'proxy', diff --git a/tests/api-resources/zero-trust/dex/fleet-status/fleet-status.test.ts b/tests/api-resources/zero-trust/dex/fleet-status/fleet-status.test.ts index c2f6a67ffb..6dd8dbd1ee 100644 --- a/tests/api-resources/zero-trust/dex/fleet-status/fleet-status.test.ts +++ b/tests/api-resources/zero-trust/dex/fleet-status/fleet-status.test.ts @@ -34,8 +34,8 @@ describe('resource fleetStatus', () => { test('overTime: only required params', async () => { const responsePromise = cloudflare.zeroTrust.dex.fleetStatus.overTime({ account_id: '01a7362d577a6c3019a474fd6f485823', - time_end: '2023-10-11T00:00:00Z', - time_start: '2023-10-11T00:00:00Z', + from: '2023-10-11T00:00:00Z', + to: '2023-10-11T00:00:00Z', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -49,8 +49,8 @@ describe('resource fleetStatus', () => { test('overTime: required and optional params', async () => { const response = await cloudflare.zeroTrust.dex.fleetStatus.overTime({ account_id: '01a7362d577a6c3019a474fd6f485823', - time_end: '2023-10-11T00:00:00Z', - time_start: '2023-10-11T00:00:00Z', + from: '2023-10-11T00:00:00Z', + to: '2023-10-11T00:00:00Z', colo: 'SJC', device_id: 'cb49c27f-7f97-49c5-b6f3-f7c01ead0fd7', }); diff --git a/tests/api-resources/zero-trust/dex/http-tests/http-tests.test.ts b/tests/api-resources/zero-trust/dex/http-tests/http-tests.test.ts index 1c99e460e3..97c2cf14b6 100644 --- a/tests/api-resources/zero-trust/dex/http-tests/http-tests.test.ts +++ b/tests/api-resources/zero-trust/dex/http-tests/http-tests.test.ts @@ -13,9 +13,9 @@ describe('resource httpTests', () => { test('get: only required params', async () => { const responsePromise = cloudflare.zeroTrust.dex.httpTests.get('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', + from: '1689520412000', interval: 'minute', - timeEnd: '1689606812000', - timeStart: '1689520412000', + to: '1689606812000', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -29,9 +29,9 @@ describe('resource httpTests', () => { test('get: required and optional params', async () => { const response = await cloudflare.zeroTrust.dex.httpTests.get('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', + from: '1689520412000', interval: 'minute', - timeEnd: '1689606812000', - timeStart: '1689520412000', + to: '1689606812000', colo: 'string', deviceId: ['string', 'string', 'string'], }); diff --git a/tests/api-resources/zero-trust/dex/http-tests/percentiles.test.ts b/tests/api-resources/zero-trust/dex/http-tests/percentiles.test.ts index ec7f21993a..323cdc1fb4 100644 --- a/tests/api-resources/zero-trust/dex/http-tests/percentiles.test.ts +++ b/tests/api-resources/zero-trust/dex/http-tests/percentiles.test.ts @@ -15,8 +15,8 @@ describe('resource percentiles', () => { 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', - timeEnd: '2023-09-20T17:00:00Z', - timeStart: '2023-09-20T17:00:00Z', + from: '2023-09-20T17:00:00Z', + to: '2023-09-20T17:00:00Z', }, ); const rawResponse = await responsePromise.asResponse(); @@ -33,8 +33,8 @@ describe('resource percentiles', () => { 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', - timeEnd: '2023-09-20T17:00:00Z', - timeStart: '2023-09-20T17:00:00Z', + from: '2023-09-20T17:00:00Z', + to: '2023-09-20T17:00:00Z', colo: 'string', deviceId: ['string', 'string', 'string'], }, diff --git a/tests/api-resources/zero-trust/dex/traceroute-tests.test.ts b/tests/api-resources/zero-trust/dex/traceroute-tests.test.ts index 44fdd4a7c9..d51cba88eb 100644 --- a/tests/api-resources/zero-trust/dex/traceroute-tests.test.ts +++ b/tests/api-resources/zero-trust/dex/traceroute-tests.test.ts @@ -15,9 +15,9 @@ describe('resource tracerouteTests', () => { 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', + from: '1689520412000', interval: 'minute', - timeEnd: '1689606812000', - timeStart: '1689520412000', + to: '1689606812000', }, ); const rawResponse = await responsePromise.asResponse(); @@ -34,9 +34,9 @@ describe('resource tracerouteTests', () => { 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', + from: '1689520412000', interval: 'minute', - timeEnd: '1689606812000', - timeStart: '1689520412000', + to: '1689606812000', colo: 'string', deviceId: ['string', 'string', 'string'], }, @@ -49,9 +49,9 @@ describe('resource tracerouteTests', () => { { account_id: '01a7362d577a6c3019a474fd6f485823', deviceId: 'string', + from: '1689520412000', interval: 'minute', - timeEnd: '1689606812000', - timeStart: '1689520412000', + to: '1689606812000', }, ); const rawResponse = await responsePromise.asResponse(); @@ -69,9 +69,9 @@ describe('resource tracerouteTests', () => { { account_id: '01a7362d577a6c3019a474fd6f485823', deviceId: 'string', + from: '1689520412000', interval: 'minute', - timeEnd: '1689606812000', - timeStart: '1689520412000', + to: '1689606812000', }, ); }); @@ -81,8 +81,8 @@ describe('resource tracerouteTests', () => { 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', - timeEnd: '2023-09-20T17:00:00Z', - timeStart: '2023-09-20T17:00:00Z', + from: '2023-09-20T17:00:00Z', + to: '2023-09-20T17:00:00Z', }, ); const rawResponse = await responsePromise.asResponse(); @@ -99,8 +99,8 @@ describe('resource tracerouteTests', () => { 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', - timeEnd: '2023-09-20T17:00:00Z', - timeStart: '2023-09-20T17:00:00Z', + from: '2023-09-20T17:00:00Z', + to: '2023-09-20T17:00:00Z', colo: 'string', deviceId: ['string', 'string', 'string'], }, From 1c3c2f41debc183f349f97889d0947d5bbb3f509 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 23:22:58 +0000 Subject: [PATCH 208/473] feat(api): OpenAPI spec update via Stainless API (#705) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 62a18d0f9d..f1f18364bf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7080386fb1d04dafc80523803a44e41bab56e2907c13694ced938d02a3abb9d5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b8c414b18922a386e73932ac947fcbc82fe780da9cdcd5212e3224ebbf6c4b4e.yml From 939fb9521b0ad21b90c1c572cd680e2a113f545c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 23:44:11 +0000 Subject: [PATCH 209/473] feat(api): OpenAPI spec update via Stainless API (#706) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f1f18364bf..62a18d0f9d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b8c414b18922a386e73932ac947fcbc82fe780da9cdcd5212e3224ebbf6c4b4e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7080386fb1d04dafc80523803a44e41bab56e2907c13694ced938d02a3abb9d5.yml From 06fe826c903bfc8d21c9a0d75963d165e29938b0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 23:46:34 +0000 Subject: [PATCH 210/473] feat(api): OpenAPI spec update via Stainless API (#707) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 62a18d0f9d..f1f18364bf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7080386fb1d04dafc80523803a44e41bab56e2907c13694ced938d02a3abb9d5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b8c414b18922a386e73932ac947fcbc82fe780da9cdcd5212e3224ebbf6c4b4e.yml From 27a30195c7f191db7de09fbe30e2837dda328aa5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 1 Jun 2024 03:21:46 +0000 Subject: [PATCH 211/473] feat(api): OpenAPI spec update via Stainless API (#708) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index f1f18364bf..8c596fd14f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b8c414b18922a386e73932ac947fcbc82fe780da9cdcd5212e3224ebbf6c4b4e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e58442197b639c81df6c79a12d873505a3be89908ae4a4567c1ac1a63e4c9309.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 54c13eba20660e1deebdca31d11b37fd40239307 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 09:26:24 +0000 Subject: [PATCH 212/473] feat(api): OpenAPI spec update via Stainless API (#709) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8c596fd14f..f1f18364bf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e58442197b639c81df6c79a12d873505a3be89908ae4a4567c1ac1a63e4c9309.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b8c414b18922a386e73932ac947fcbc82fe780da9cdcd5212e3224ebbf6c4b4e.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 85b58431bc92560bfeae49733f46ecae1b28c878 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 09:28:31 +0000 Subject: [PATCH 213/473] feat(api): OpenAPI spec update via Stainless API (#710) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index f1f18364bf..8c596fd14f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b8c414b18922a386e73932ac947fcbc82fe780da9cdcd5212e3224ebbf6c4b4e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e58442197b639c81df6c79a12d873505a3be89908ae4a4567c1ac1a63e4c9309.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 4b92567a0c71006e5206b99daa855785153cf71c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 13:42:59 +0000 Subject: [PATCH 214/473] feat(api): OpenAPI spec update via Stainless API (#711) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8c596fd14f..f1f18364bf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e58442197b639c81df6c79a12d873505a3be89908ae4a4567c1ac1a63e4c9309.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b8c414b18922a386e73932ac947fcbc82fe780da9cdcd5212e3224ebbf6c4b4e.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 9b0a424db49050cfa7041f9c43ec9bb75f712e10 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 13:45:04 +0000 Subject: [PATCH 215/473] feat(api): OpenAPI spec update via Stainless API (#712) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f1f18364bf..62a18d0f9d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b8c414b18922a386e73932ac947fcbc82fe780da9cdcd5212e3224ebbf6c4b4e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7080386fb1d04dafc80523803a44e41bab56e2907c13694ced938d02a3abb9d5.yml From d6d55af8bfd26a2868026e56fa4ab73d1e0eca85 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:16:39 +0000 Subject: [PATCH 216/473] feat(api): OpenAPI spec update via Stainless API (#713) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 62a18d0f9d..f1f18364bf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7080386fb1d04dafc80523803a44e41bab56e2907c13694ced938d02a3abb9d5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b8c414b18922a386e73932ac947fcbc82fe780da9cdcd5212e3224ebbf6c4b4e.yml From 4bbdc4a5cc19aa8ea3cfca0a94020bfb6ac15e52 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:23:57 +0000 Subject: [PATCH 217/473] feat(api): OpenAPI spec update via Stainless API (#714) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index f1f18364bf..8c596fd14f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b8c414b18922a386e73932ac947fcbc82fe780da9cdcd5212e3224ebbf6c4b4e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e58442197b639c81df6c79a12d873505a3be89908ae4a4567c1ac1a63e4c9309.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 21c874e9af23943e1e4357368915b67f99c2ccbe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:26:22 +0000 Subject: [PATCH 218/473] feat(api): OpenAPI spec update via Stainless API (#715) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8c596fd14f..f1f18364bf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e58442197b639c81df6c79a12d873505a3be89908ae4a4567c1ac1a63e4c9309.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b8c414b18922a386e73932ac947fcbc82fe780da9cdcd5212e3224ebbf6c4b4e.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From a02b4b8a810abfb8637ddbb026ecbf222268eb2e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:35:02 +0000 Subject: [PATCH 219/473] feat(api): OpenAPI spec update via Stainless API (#716) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index f1f18364bf..8c596fd14f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b8c414b18922a386e73932ac947fcbc82fe780da9cdcd5212e3224ebbf6c4b4e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e58442197b639c81df6c79a12d873505a3be89908ae4a4567c1ac1a63e4c9309.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 5900af37f8f068726f547ae2b4e6018510a1c16b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:37:08 +0000 Subject: [PATCH 220/473] feat(api): OpenAPI spec update via Stainless API (#717) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8c596fd14f..cc9f4c6f06 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e58442197b639c81df6c79a12d873505a3be89908ae4a4567c1ac1a63e4c9309.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-37d415099ac13348abf3f668e8a0a6817df7b8a481b26b98599af519074d86f8.yml From 6e4fdbe5b8d5c90ff93bdf4ebe0b945c9fa21143 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:39:38 +0000 Subject: [PATCH 221/473] feat(api): OpenAPI spec update via Stainless API (#718) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 ++++++------------- .../cloudforce-one/requests/priority.ts | 22 ++++++------------- .../cloudforce-one/requests/requests.ts | 22 ++++++------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index cc9f4c6f06..f1f18364bf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-37d415099ac13348abf3f668e8a0a6817df7b8a481b26b98599af519074d86f8.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b8c414b18922a386e73932ac947fcbc82fe780da9cdcd5212e3224ebbf6c4b4e.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4110845178..4d90803811 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; -import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -52,10 +51,12 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ) as Core.APIPromise<{ result: MessageDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -108,16 +109,7 @@ export interface Message { created?: string; } -export interface MessageDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type MessageDeleteResponse = unknown | Array | string; export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 02215eaa59..575a01e0d1 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; -import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ) as Core.APIPromise<{ result: PriorityDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -146,16 +147,7 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export interface PriorityDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type PriorityDeleteResponse = unknown | Array | string; export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 25e6b08f46..af74a7b056 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,7 +3,6 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; -import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -72,10 +71,12 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ); + return ( + this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ) as Core.APIPromise<{ result: RequestDeleteResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -279,16 +280,7 @@ export interface RequestConstants { export type RequestTypes = Array; -export interface RequestDeleteResponse { - errors: Array; - - messages: Array; - - /** - * Whether the API call was successful - */ - success: true; -} +export type RequestDeleteResponse = unknown | Array | string; export interface RequestCreateParams { /** From 629604bb4a616729cad288d43a72fa2c66b6153f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:42:08 +0000 Subject: [PATCH 222/473] feat(api): OpenAPI spec update via Stainless API (#719) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f1f18364bf..0388cd2ff8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b8c414b18922a386e73932ac947fcbc82fe780da9cdcd5212e3224ebbf6c4b4e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-16683743b1ebefab596c0a119ad133113f5ce61fbf58de4f5f734244ca6e4a42.yml From 852d2427e4ccd3fdebc52dd6319ac63019a2f183 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 16:32:45 +0000 Subject: [PATCH 223/473] feat(api): OpenAPI spec update via Stainless API (#720) --- .stats.yml | 2 +- .../cloudforce-one/requests/message.ts | 22 +++++++++++++------ .../cloudforce-one/requests/priority.ts | 22 +++++++++++++------ .../cloudforce-one/requests/requests.ts | 22 +++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0388cd2ff8..f158bfce94 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-16683743b1ebefab596c0a119ad133113f5ce61fbf58de4f5f734244ca6e4a42.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea05ad3e371ed604d6458ca4465044806be7e860ab44c6c7ddc24dc4a778bad7.yml diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 4d90803811..4110845178 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as MessageAPI from './message'; +import * as Shared from '../../shared'; export class MessageResource extends APIResource { /** @@ -51,12 +52,10 @@ export class MessageResource extends APIResource { messageIdentifer: number, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, - options, - ) as Core.APIPromise<{ result: MessageDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, + options, + ); } /** @@ -109,7 +108,16 @@ export interface Message { created?: string; } -export type MessageDeleteResponse = unknown | Array | string; +export interface MessageDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export type MessageGetResponse = Array; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 575a01e0d1..02215eaa59 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as PriorityAPI from './priority'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -47,12 +48,10 @@ export class PriorityResource extends APIResource { priorityIdentifer: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, - options, - ) as Core.APIPromise<{ result: PriorityDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, + options, + ); } /** @@ -147,7 +146,16 @@ export interface PriorityEdit { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export type PriorityDeleteResponse = unknown | Array | string; +export interface PriorityDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface PriorityCreateParams { /** diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index af74a7b056..25e6b08f46 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -3,6 +3,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as RequestsAPI from './requests'; +import * as Shared from '../../shared'; import * as MessageAPI from './message'; import * as PriorityAPI from './priority'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination'; @@ -71,12 +72,10 @@ export class Requests extends APIResource { requestIdentifier: string, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.delete( - `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, - options, - ) as Core.APIPromise<{ result: RequestDeleteResponse }> - )._thenUnwrap((obj) => obj.result); + return this._client.delete( + `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, + options, + ); } /** @@ -280,7 +279,16 @@ export interface RequestConstants { export type RequestTypes = Array; -export type RequestDeleteResponse = unknown | Array | string; +export interface RequestDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} export interface RequestCreateParams { /** From 7a6896cdbb686cbc7afc82504c1011164afa1085 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 16:36:27 +0000 Subject: [PATCH 224/473] feat(api): OpenAPI spec update via Stainless API (#721) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f158bfce94..eeba1c5bbd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea05ad3e371ed604d6458ca4465044806be7e860ab44c6c7ddc24dc4a778bad7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-308736efdeaf86206b8eaa2fbb4612d7f8762e86e58e795c3c6168f2976d27dd.yml From 4ce432058ff795144059a6e76a3352818b801a1d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 16:38:45 +0000 Subject: [PATCH 225/473] feat(api): OpenAPI spec update via Stainless API (#722) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index eeba1c5bbd..f158bfce94 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-308736efdeaf86206b8eaa2fbb4612d7f8762e86e58e795c3c6168f2976d27dd.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea05ad3e371ed604d6458ca4465044806be7e860ab44c6c7ddc24dc4a778bad7.yml From 8a7d1c0b01603930fe60e5b20d3370bb574dd212 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 16:59:55 +0000 Subject: [PATCH 226/473] feat(api): OpenAPI spec update via Stainless API (#723) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f158bfce94..eeba1c5bbd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea05ad3e371ed604d6458ca4465044806be7e860ab44c6c7ddc24dc4a778bad7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-308736efdeaf86206b8eaa2fbb4612d7f8762e86e58e795c3c6168f2976d27dd.yml From daab27fbbba18d06760b3071c817bd532836cc3c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 17:02:20 +0000 Subject: [PATCH 227/473] feat(api): OpenAPI spec update via Stainless API (#724) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index eeba1c5bbd..542148c66a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-308736efdeaf86206b8eaa2fbb4612d7f8762e86e58e795c3c6168f2976d27dd.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-37f8ef45564cc53a10e9cf5077b50db2e28318175f0920357a687f0f38c9f56b.yml From b4736dcea4cec8a1ab6c5872a0f34bfe45a8667c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 18:15:59 +0000 Subject: [PATCH 228/473] feat(api): OpenAPI spec update via Stainless API (#725) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 542148c66a..c690d87695 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-37f8ef45564cc53a10e9cf5077b50db2e28318175f0920357a687f0f38c9f56b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ac33a501d722d88a0ebf590d74e32c77066a57b327cb3a2fae156558b6e7b75c.yml From 893477c4fc17f424db289aa28c4f04cd24e1b271 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 19:06:20 +0000 Subject: [PATCH 229/473] feat(api): OpenAPI spec update via Stainless API (#726) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c690d87695..adcfcc1753 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ac33a501d722d88a0ebf590d74e32c77066a57b327cb3a2fae156558b6e7b75c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-43fc0da59774d780049ce01bf912d858e1cae3e870568caba48a27759aac198c.yml From 155c5770c7ee22beb42ef67f048874574e8e8562 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 20:42:36 +0000 Subject: [PATCH 230/473] feat(api): OpenAPI spec update via Stainless API (#727) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index adcfcc1753..c690d87695 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-43fc0da59774d780049ce01bf912d858e1cae3e870568caba48a27759aac198c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ac33a501d722d88a0ebf590d74e32c77066a57b327cb3a2fae156558b6e7b75c.yml From a554c294b01754df3c66e8605bc7c1ca96742dbc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 22:02:03 +0000 Subject: [PATCH 231/473] feat(api): OpenAPI spec update via Stainless API (#728) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c690d87695..0dc472c023 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ac33a501d722d88a0ebf590d74e32c77066a57b327cb3a2fae156558b6e7b75c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e83b5eb5706ca8b525141f506338cd1d465eb133815b9ddc53df612ea4a2ecef.yml From fdbb4d5df1d2b7c146df8e9da6c182a6b7c009bc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 22:34:17 +0000 Subject: [PATCH 232/473] feat(api): update via SDK Studio (#729) --- .stats.yml | 4 +- api.md | 62 ++++ src/resources/addressing/addressing.ts | 16 + src/resources/addressing/index.ts | 14 + .../addressing/regional-hostnames/index.ts | 17 + .../regional-hostnames/regional-hostnames.ts | 247 +++++++++++++ .../addressing/regional-hostnames/regions.ts | 50 +++ src/resources/magic-transit/apps.ts | 333 +++++++++++++++++ src/resources/magic-transit/index.ts | 12 + src/resources/magic-transit/magic-transit.ts | 12 + src/resources/magic-transit/sites/index.ts | 1 + src/resources/magic-transit/sites/sites.ts | 4 + .../sites/sites/app-configuration.ts | 335 ++++++++++++++++++ .../magic-transit/sites/sites/index.ts | 15 + .../magic-transit/sites/sites/sites.ts | 23 ++ .../regional-hostnames.test.ts | 113 ++++++ .../regional-hostnames/regions.test.ts | 31 ++ .../api-resources/magic-transit/apps.test.ts | 92 +++++ .../sites/sites/app-configuration.test.ts | 100 ++++++ 19 files changed, 1479 insertions(+), 2 deletions(-) create mode 100644 src/resources/addressing/regional-hostnames/index.ts create mode 100644 src/resources/addressing/regional-hostnames/regional-hostnames.ts create mode 100644 src/resources/addressing/regional-hostnames/regions.ts create mode 100644 src/resources/magic-transit/apps.ts create mode 100644 src/resources/magic-transit/sites/sites/app-configuration.ts create mode 100644 src/resources/magic-transit/sites/sites/index.ts create mode 100644 src/resources/magic-transit/sites/sites/sites.ts create mode 100644 tests/api-resources/addressing/regional-hostnames/regional-hostnames.test.ts create mode 100644 tests/api-resources/addressing/regional-hostnames/regions.test.ts create mode 100644 tests/api-resources/magic-transit/apps.test.ts create mode 100644 tests/api-resources/magic-transit/sites/sites/app-configuration.test.ts diff --git a/.stats.yml b/.stats.yml index 0dc472c023..b1ee01299a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e83b5eb5706ca8b525141f506338cd1d465eb133815b9ddc53df612ea4a2ecef.yml +configured_endpoints: 1335 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ac33a501d722d88a0ebf590d74e32c77066a57b327cb3a2fae156558b6e7b75c.yml diff --git a/api.md b/api.md index 23f8e7f453..4c954d6e0b 100644 --- a/api.md +++ b/api.md @@ -2898,6 +2898,34 @@ Methods: # Addressing +## RegionalHostnames + +Types: + +- RegionalHostnameCreateResponse +- RegionalHostnameListResponse +- RegionalHostnameDeleteResponse +- RegionalHostnameEditResponse +- RegionalHostnameGetResponse + +Methods: + +- client.addressing.regionalHostnames.create({ ...params }) -> RegionalHostnameCreateResponse +- client.addressing.regionalHostnames.list({ ...params }) -> RegionalHostnameListResponsesSinglePage +- client.addressing.regionalHostnames.delete(hostname, { ...params }) -> RegionalHostnameDeleteResponse +- client.addressing.regionalHostnames.edit(hostname, { ...params }) -> RegionalHostnameEditResponse +- client.addressing.regionalHostnames.get(hostname, { ...params }) -> RegionalHostnameGetResponse + +### Regions + +Types: + +- RegionListResponse + +Methods: + +- client.addressing.regionalHostnames.regions.list({ ...params }) -> RegionListResponsesSinglePage + ## Services Types: @@ -3378,6 +3406,22 @@ Types: - HealthCheckRate - HealthCheckType +## Apps + +Types: + +- AppCreateResponse +- AppUpdateResponse +- AppListResponse +- AppDeleteResponse + +Methods: + +- client.magicTransit.apps.create({ ...params }) -> AppCreateResponse | null +- client.magicTransit.apps.update(accountAppId, { ...params }) -> AppUpdateResponse | null +- client.magicTransit.apps.list({ ...params }) -> AppListResponsesSinglePage +- client.magicTransit.apps.delete(accountAppId, { ...params }) -> AppDeleteResponse | null + ## CfInterconnects Types: @@ -3524,6 +3568,24 @@ Methods: - client.magicTransit.sites.wans.edit(siteId, wanId, { ...params }) -> WAN - client.magicTransit.sites.wans.get(siteId, wanId, { ...params }) -> WAN +### Sites + +#### AppConfiguration + +Types: + +- AppConfigurationCreateResponse +- AppConfigurationUpdateResponse +- AppConfigurationListResponse +- AppConfigurationDeleteResponse + +Methods: + +- client.magicTransit.sites.sites.appConfiguration.create(siteId, { ...params }) -> AppConfigurationCreateResponse | null +- client.magicTransit.sites.sites.appConfiguration.update(siteId, appConfigId, { ...params }) -> AppConfigurationUpdateResponse | null +- client.magicTransit.sites.sites.appConfiguration.list(siteId, { ...params }) -> AppConfigurationListResponsesSinglePage +- client.magicTransit.sites.sites.appConfiguration.delete(siteId, appConfigId, { ...params }) -> AppConfigurationDeleteResponse | null + ## Connectors Types: diff --git a/src/resources/addressing/addressing.ts b/src/resources/addressing/addressing.ts index 7d979781a8..475a0d7a7d 100644 --- a/src/resources/addressing/addressing.ts +++ b/src/resources/addressing/addressing.ts @@ -5,8 +5,12 @@ import * as ServicesAPI from './services'; import * as AddressMapsAPI from './address-maps/address-maps'; import * as LOADocumentsAPI from './loa-documents/loa-documents'; import * as PrefixesAPI from './prefixes/prefixes'; +import * as RegionalHostnamesAPI from './regional-hostnames/regional-hostnames'; export class Addressing extends APIResource { + regionalHostnames: RegionalHostnamesAPI.RegionalHostnames = new RegionalHostnamesAPI.RegionalHostnames( + this._client, + ); services: ServicesAPI.Services = new ServicesAPI.Services(this._client); addressMaps: AddressMapsAPI.AddressMaps = new AddressMapsAPI.AddressMaps(this._client); loaDocuments: LOADocumentsAPI.LOADocuments = new LOADocumentsAPI.LOADocuments(this._client); @@ -14,6 +18,18 @@ export class Addressing extends APIResource { } export namespace Addressing { + export import RegionalHostnames = RegionalHostnamesAPI.RegionalHostnames; + export import RegionalHostnameCreateResponse = RegionalHostnamesAPI.RegionalHostnameCreateResponse; + export import RegionalHostnameListResponse = RegionalHostnamesAPI.RegionalHostnameListResponse; + export import RegionalHostnameDeleteResponse = RegionalHostnamesAPI.RegionalHostnameDeleteResponse; + export import RegionalHostnameEditResponse = RegionalHostnamesAPI.RegionalHostnameEditResponse; + export import RegionalHostnameGetResponse = RegionalHostnamesAPI.RegionalHostnameGetResponse; + export import RegionalHostnameListResponsesSinglePage = RegionalHostnamesAPI.RegionalHostnameListResponsesSinglePage; + export import RegionalHostnameCreateParams = RegionalHostnamesAPI.RegionalHostnameCreateParams; + export import RegionalHostnameListParams = RegionalHostnamesAPI.RegionalHostnameListParams; + export import RegionalHostnameDeleteParams = RegionalHostnamesAPI.RegionalHostnameDeleteParams; + export import RegionalHostnameEditParams = RegionalHostnamesAPI.RegionalHostnameEditParams; + export import RegionalHostnameGetParams = RegionalHostnamesAPI.RegionalHostnameGetParams; export import Services = ServicesAPI.Services; export import ServiceListResponse = ServicesAPI.ServiceListResponse; export import ServiceListResponsesSinglePage = ServicesAPI.ServiceListResponsesSinglePage; diff --git a/src/resources/addressing/index.ts b/src/resources/addressing/index.ts index 8fd282796e..ce13d9565a 100644 --- a/src/resources/addressing/index.ts +++ b/src/resources/addressing/index.ts @@ -27,4 +27,18 @@ export { PrefixesSinglePage, Prefixes, } from './prefixes/index'; +export { + RegionalHostnameCreateResponse, + RegionalHostnameListResponse, + RegionalHostnameDeleteResponse, + RegionalHostnameEditResponse, + RegionalHostnameGetResponse, + RegionalHostnameCreateParams, + RegionalHostnameListParams, + RegionalHostnameDeleteParams, + RegionalHostnameEditParams, + RegionalHostnameGetParams, + RegionalHostnameListResponsesSinglePage, + RegionalHostnames, +} from './regional-hostnames/index'; export { ServiceListResponse, ServiceListParams, ServiceListResponsesSinglePage, Services } from './services'; diff --git a/src/resources/addressing/regional-hostnames/index.ts b/src/resources/addressing/regional-hostnames/index.ts new file mode 100644 index 0000000000..b283fd5c16 --- /dev/null +++ b/src/resources/addressing/regional-hostnames/index.ts @@ -0,0 +1,17 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { RegionListResponse, RegionListParams, RegionListResponsesSinglePage, Regions } from './regions'; +export { + RegionalHostnameCreateResponse, + RegionalHostnameListResponse, + RegionalHostnameDeleteResponse, + RegionalHostnameEditResponse, + RegionalHostnameGetResponse, + RegionalHostnameCreateParams, + RegionalHostnameListParams, + RegionalHostnameDeleteParams, + RegionalHostnameEditParams, + RegionalHostnameGetParams, + RegionalHostnameListResponsesSinglePage, + RegionalHostnames, +} from './regional-hostnames'; diff --git a/src/resources/addressing/regional-hostnames/regional-hostnames.ts b/src/resources/addressing/regional-hostnames/regional-hostnames.ts new file mode 100644 index 0000000000..4bb10e2ff2 --- /dev/null +++ b/src/resources/addressing/regional-hostnames/regional-hostnames.ts @@ -0,0 +1,247 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as RegionalHostnamesAPI from './regional-hostnames'; +import * as Shared from '../../shared'; +import * as RegionsAPI from './regions'; +import { SinglePage } from '../../../pagination'; + +export class RegionalHostnames extends APIResource { + regions: RegionsAPI.Regions = new RegionsAPI.Regions(this._client); + + /** + * Create a new Regional Hostname entry. Cloudflare will only use data centers that + * are physically located within the chosen region to decrypt and service HTTPS + * traffic. Learn more about + * [Regional Services](https://developers.cloudflare.com/data-localization/regional-services/get-started/). + */ + create( + params: RegionalHostnameCreateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id, ...body } = params; + return ( + this._client.post(`/zones/${zone_id}/addressing/regional_hostnames`, { + body, + ...options, + }) as Core.APIPromise<{ result: RegionalHostnameCreateResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * List all Regional Hostnames within a zone. + */ + list( + params: RegionalHostnameListParams, + options?: Core.RequestOptions, + ): Core.PagePromise { + const { zone_id } = params; + return this._client.getAPIList( + `/zones/${zone_id}/addressing/regional_hostnames`, + RegionalHostnameListResponsesSinglePage, + options, + ); + } + + /** + * Delete the region configuration for a specific Regional Hostname. + */ + delete( + hostname: string, + params: RegionalHostnameDeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id } = params; + return this._client.delete(`/zones/${zone_id}/addressing/regional_hostnames/${hostname}`, options); + } + + /** + * Update the configuration for a specific Regional Hostname. Only the region_key + * of a hostname is mutable. + */ + edit( + hostname: string, + params: RegionalHostnameEditParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id, ...body } = params; + return ( + this._client.patch(`/zones/${zone_id}/addressing/regional_hostnames/${hostname}`, { + body, + ...options, + }) as Core.APIPromise<{ result: RegionalHostnameEditResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Fetch the configuration for a specific Regional Hostname, within a zone. + */ + get( + hostname: string, + params: RegionalHostnameGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id } = params; + return ( + this._client.get( + `/zones/${zone_id}/addressing/regional_hostnames/${hostname}`, + options, + ) as Core.APIPromise<{ result: RegionalHostnameGetResponse }> + )._thenUnwrap((obj) => obj.result); + } +} + +export class RegionalHostnameListResponsesSinglePage extends SinglePage {} + +export interface RegionalHostnameCreateResponse { + /** + * When the regional hostname was created + */ + created_on: string; + + /** + * DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are + * supported for one level, e.g `*.example.com` + */ + hostname: string; + + /** + * Identifying key for the region + */ + region_key: string; +} + +export interface RegionalHostnameListResponse { + /** + * When the regional hostname was created + */ + created_on: string; + + /** + * DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are + * supported for one level, e.g `*.example.com` + */ + hostname: string; + + /** + * Identifying key for the region + */ + region_key: string; +} + +export interface RegionalHostnameDeleteResponse { + errors: Array; + + messages: Array; + + /** + * Whether the API call was successful + */ + success: true; +} + +export interface RegionalHostnameEditResponse { + /** + * When the regional hostname was created + */ + created_on: string; + + /** + * DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are + * supported for one level, e.g `*.example.com` + */ + hostname: string; + + /** + * Identifying key for the region + */ + region_key: string; +} + +export interface RegionalHostnameGetResponse { + /** + * When the regional hostname was created + */ + created_on: string; + + /** + * DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are + * supported for one level, e.g `*.example.com` + */ + hostname: string; + + /** + * Identifying key for the region + */ + region_key: string; +} + +export interface RegionalHostnameCreateParams { + /** + * Path param: Identifier + */ + zone_id: string; + + /** + * Body param: DNS hostname to be regionalized, must be a subdomain of the zone. + * Wildcards are supported for one level, e.g `*.example.com` + */ + hostname: string; + + /** + * Body param: Identifying key for the region + */ + region_key: string; +} + +export interface RegionalHostnameListParams { + /** + * Identifier + */ + zone_id: string; +} + +export interface RegionalHostnameDeleteParams { + /** + * Identifier + */ + zone_id: string; +} + +export interface RegionalHostnameEditParams { + /** + * Path param: Identifier + */ + zone_id: string; + + /** + * Body param: Identifying key for the region + */ + region_key: string; +} + +export interface RegionalHostnameGetParams { + /** + * Identifier + */ + zone_id: string; +} + +export namespace RegionalHostnames { + export import RegionalHostnameCreateResponse = RegionalHostnamesAPI.RegionalHostnameCreateResponse; + export import RegionalHostnameListResponse = RegionalHostnamesAPI.RegionalHostnameListResponse; + export import RegionalHostnameDeleteResponse = RegionalHostnamesAPI.RegionalHostnameDeleteResponse; + export import RegionalHostnameEditResponse = RegionalHostnamesAPI.RegionalHostnameEditResponse; + export import RegionalHostnameGetResponse = RegionalHostnamesAPI.RegionalHostnameGetResponse; + export import RegionalHostnameListResponsesSinglePage = RegionalHostnamesAPI.RegionalHostnameListResponsesSinglePage; + export import RegionalHostnameCreateParams = RegionalHostnamesAPI.RegionalHostnameCreateParams; + export import RegionalHostnameListParams = RegionalHostnamesAPI.RegionalHostnameListParams; + export import RegionalHostnameDeleteParams = RegionalHostnamesAPI.RegionalHostnameDeleteParams; + export import RegionalHostnameEditParams = RegionalHostnamesAPI.RegionalHostnameEditParams; + export import RegionalHostnameGetParams = RegionalHostnamesAPI.RegionalHostnameGetParams; + export import Regions = RegionsAPI.Regions; + export import RegionListResponse = RegionsAPI.RegionListResponse; + export import RegionListResponsesSinglePage = RegionsAPI.RegionListResponsesSinglePage; + export import RegionListParams = RegionsAPI.RegionListParams; +} diff --git a/src/resources/addressing/regional-hostnames/regions.ts b/src/resources/addressing/regional-hostnames/regions.ts new file mode 100644 index 0000000000..d69af2a393 --- /dev/null +++ b/src/resources/addressing/regional-hostnames/regions.ts @@ -0,0 +1,50 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as RegionsAPI from './regions'; +import { SinglePage } from '../../../pagination'; + +export class Regions extends APIResource { + /** + * List all Regional Services regions available for use by this account. + */ + list( + params: RegionListParams, + options?: Core.RequestOptions, + ): Core.PagePromise { + const { account_id } = params; + return this._client.getAPIList( + `/accounts/${account_id}/addressing/regional_hostnames/regions`, + RegionListResponsesSinglePage, + options, + ); + } +} + +export class RegionListResponsesSinglePage extends SinglePage {} + +export interface RegionListResponse { + /** + * Identifying key for the region + */ + key?: string; + + /** + * Human-readable text label for the region + */ + label?: string; +} + +export interface RegionListParams { + /** + * Identifier + */ + account_id: string; +} + +export namespace Regions { + export import RegionListResponse = RegionsAPI.RegionListResponse; + export import RegionListResponsesSinglePage = RegionsAPI.RegionListResponsesSinglePage; + export import RegionListParams = RegionsAPI.RegionListParams; +} diff --git a/src/resources/magic-transit/apps.ts b/src/resources/magic-transit/apps.ts new file mode 100644 index 0000000000..5c7f7df879 --- /dev/null +++ b/src/resources/magic-transit/apps.ts @@ -0,0 +1,333 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import * as AppsAPI from './apps'; +import { SinglePage } from '../../pagination'; + +export class Apps extends APIResource { + /** + * Creates a new App for an account + */ + create(params: AppCreateParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id, body } = params; + return ( + this._client.post(`/accounts/${account_id}/magic/apps`, { body: body, ...options }) as Core.APIPromise<{ + result: AppCreateResponse | null; + }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Updates an Account App + */ + update( + accountAppId: string, + params: AppUpdateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, body } = params; + return ( + this._client.put(`/accounts/${account_id}/magic/apps/${accountAppId}`, { + body: body, + ...options, + }) as Core.APIPromise<{ result: AppUpdateResponse | null }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Lists Apps associated with an account. + */ + list( + params: AppListParams, + options?: Core.RequestOptions, + ): Core.PagePromise { + const { account_id } = params; + return this._client.getAPIList(`/accounts/${account_id}/magic/apps`, AppListResponsesSinglePage, options); + } + + /** + * Deletes specific Account App. + */ + delete( + accountAppId: string, + params: AppDeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.delete(`/accounts/${account_id}/magic/apps/${accountAppId}`, options) as Core.APIPromise<{ + result: AppDeleteResponse | null; + }> + )._thenUnwrap((obj) => obj.result); + } +} + +export class AppListResponsesSinglePage extends SinglePage {} + +/** + * Custom app defined for an account. + */ +export interface AppCreateResponse { + /** + * Magic account app ID. + */ + account_app_id: string; + + /** + * FQDNs to associate with traffic decisions. + */ + hostnames?: Array; + + /** + * CIDRs to associate with traffic decisions. + */ + ip_subnets?: Array; + + /** + * Display name for the app. + */ + name?: string; + + /** + * Category of the app. + */ + type?: string; +} + +/** + * Custom app defined for an account. + */ +export interface AppUpdateResponse { + /** + * Magic account app ID. + */ + account_app_id: string; + + /** + * FQDNs to associate with traffic decisions. + */ + hostnames?: Array; + + /** + * CIDRs to associate with traffic decisions. + */ + ip_subnets?: Array; + + /** + * Display name for the app. + */ + name?: string; + + /** + * Category of the app. + */ + type?: string; +} + +/** + * Collection of Hostnames and/or IP Subnets to associate with traffic decisions. + */ +export type AppListResponse = AppListResponse.MagicAccountApp | AppListResponse.MagicManagedApp; + +export namespace AppListResponse { + /** + * Custom app defined for an account. + */ + export interface MagicAccountApp { + /** + * Magic account app ID. + */ + account_app_id: string; + + /** + * FQDNs to associate with traffic decisions. + */ + hostnames?: Array; + + /** + * CIDRs to associate with traffic decisions. + */ + ip_subnets?: Array; + + /** + * Display name for the app. + */ + name?: string; + + /** + * Category of the app. + */ + type?: string; + } + + /** + * Managed app defined by Cloudflare. + */ + export interface MagicManagedApp { + /** + * Managed app ID. + */ + managed_app_id: string; + + /** + * FQDNs to associate with traffic decisions. + */ + hostnames?: Array; + + /** + * CIDRs to associate with traffic decisions. + */ + ip_subnets?: Array; + + /** + * Display name for the app. + */ + name?: string; + + /** + * Category of the app. + */ + type?: string; + } +} + +/** + * Custom app defined for an account. + */ +export interface AppDeleteResponse { + /** + * Magic account app ID. + */ + account_app_id: string; + + /** + * FQDNs to associate with traffic decisions. + */ + hostnames?: Array; + + /** + * CIDRs to associate with traffic decisions. + */ + ip_subnets?: Array; + + /** + * Display name for the app. + */ + name?: string; + + /** + * Category of the app. + */ + type?: string; +} + +export type AppCreateParams = AppCreateParams.Hostnames | AppCreateParams.Subnets; + +export namespace AppCreateParams { + export interface Hostnames { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: + */ + body: unknown; + } + + export interface Subnets { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: + */ + body: unknown; + } +} + +export type AppUpdateParams = + | AppUpdateParams.UpdateAppName + | AppUpdateParams.UpdateAppType + | AppUpdateParams.UpdateAppHostnames + | AppUpdateParams.UpdateAppSubnets; + +export namespace AppUpdateParams { + export interface UpdateAppName { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: + */ + body: unknown; + } + + export interface UpdateAppType { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: + */ + body: unknown; + } + + export interface UpdateAppHostnames { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: + */ + body: unknown; + } + + export interface UpdateAppSubnets { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: + */ + body: unknown; + } +} + +export interface AppListParams { + /** + * Identifier + */ + account_id: string; +} + +export interface AppDeleteParams { + /** + * Identifier + */ + account_id: string; +} + +export namespace Apps { + export import AppCreateResponse = AppsAPI.AppCreateResponse; + export import AppUpdateResponse = AppsAPI.AppUpdateResponse; + export import AppListResponse = AppsAPI.AppListResponse; + export import AppDeleteResponse = AppsAPI.AppDeleteResponse; + export import AppListResponsesSinglePage = AppsAPI.AppListResponsesSinglePage; + export import AppCreateParams = AppsAPI.AppCreateParams; + export import AppUpdateParams = AppsAPI.AppUpdateParams; + export import AppListParams = AppsAPI.AppListParams; + export import AppDeleteParams = AppsAPI.AppDeleteParams; +} diff --git a/src/resources/magic-transit/index.ts b/src/resources/magic-transit/index.ts index 7cf93a87f5..e8710f4ca0 100644 --- a/src/resources/magic-transit/index.ts +++ b/src/resources/magic-transit/index.ts @@ -1,5 +1,17 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export { + AppCreateResponse, + AppUpdateResponse, + AppListResponse, + AppDeleteResponse, + AppCreateParams, + AppUpdateParams, + AppListParams, + AppDeleteParams, + AppListResponsesSinglePage, + Apps, +} from './apps'; export { CfInterconnectUpdateResponse, CfInterconnectListResponse, diff --git a/src/resources/magic-transit/magic-transit.ts b/src/resources/magic-transit/magic-transit.ts index 85b272ab44..91007679c4 100644 --- a/src/resources/magic-transit/magic-transit.ts +++ b/src/resources/magic-transit/magic-transit.ts @@ -1,6 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../resource'; +import * as AppsAPI from './apps'; import * as CfInterconnectsAPI from './cf-interconnects'; import * as ConnectorsAPI from './connectors'; import * as GRETunnelsAPI from './gre-tunnels'; @@ -9,6 +10,7 @@ import * as RoutesAPI from './routes'; import * as SitesAPI from './sites/sites'; export class MagicTransit extends APIResource { + apps: AppsAPI.Apps = new AppsAPI.Apps(this._client); cfInterconnects: CfInterconnectsAPI.CfInterconnects = new CfInterconnectsAPI.CfInterconnects(this._client); greTunnels: GRETunnelsAPI.GRETunnels = new GRETunnelsAPI.GRETunnels(this._client); ipsecTunnels: IPSECTunnelsAPI.IPSECTunnels = new IPSECTunnelsAPI.IPSECTunnels(this._client); @@ -110,6 +112,16 @@ export type HealthCheckType = 'reply' | 'request'; export type HealthCheckTypeParam = 'reply' | 'request'; export namespace MagicTransit { + export import Apps = AppsAPI.Apps; + export import AppCreateResponse = AppsAPI.AppCreateResponse; + export import AppUpdateResponse = AppsAPI.AppUpdateResponse; + export import AppListResponse = AppsAPI.AppListResponse; + export import AppDeleteResponse = AppsAPI.AppDeleteResponse; + export import AppListResponsesSinglePage = AppsAPI.AppListResponsesSinglePage; + export import AppCreateParams = AppsAPI.AppCreateParams; + export import AppUpdateParams = AppsAPI.AppUpdateParams; + export import AppListParams = AppsAPI.AppListParams; + export import AppDeleteParams = AppsAPI.AppDeleteParams; export import CfInterconnects = CfInterconnectsAPI.CfInterconnects; export import CfInterconnectUpdateResponse = CfInterconnectsAPI.CfInterconnectUpdateResponse; export import CfInterconnectListResponse = CfInterconnectsAPI.CfInterconnectListResponse; diff --git a/src/resources/magic-transit/sites/index.ts b/src/resources/magic-transit/sites/index.ts index d401e52d54..a99d8f9d96 100644 --- a/src/resources/magic-transit/sites/index.ts +++ b/src/resources/magic-transit/sites/index.ts @@ -43,6 +43,7 @@ export { SitesSinglePage, Sites, } from './sites'; +export { Sites } from './sites/index'; export { WAN, WANStaticAddressing, diff --git a/src/resources/magic-transit/sites/sites.ts b/src/resources/magic-transit/sites/sites.ts index 033e1da674..f6a2d1f12e 100644 --- a/src/resources/magic-transit/sites/sites.ts +++ b/src/resources/magic-transit/sites/sites.ts @@ -2,16 +2,19 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; +import { Sites } from './sites/sites'; import * as SitesAPI from './sites'; import * as ACLsAPI from './acls'; import * as LANsAPI from './lans'; import * as WANsAPI from './wans'; +import * as SitesSitesAPI from './sites/sites'; import { SinglePage } from '../../../pagination'; export class Sites extends APIResource { acls: ACLsAPI.ACLs = new ACLsAPI.ACLs(this._client); lans: LANsAPI.LANs = new LANsAPI.LANs(this._client); wans: WANsAPI.WANs = new WANsAPI.WANs(this._client); + sites: SitesSitesAPI.Sites = new SitesSitesAPI.Sites(this._client); /** * Creates a new Site @@ -335,4 +338,5 @@ export namespace Sites { export import WANDeleteParams = WANsAPI.WANDeleteParams; export import WANEditParams = WANsAPI.WANEditParams; export import WANGetParams = WANsAPI.WANGetParams; + export import Sites = SitesSitesAPI.Sites; } diff --git a/src/resources/magic-transit/sites/sites/app-configuration.ts b/src/resources/magic-transit/sites/sites/app-configuration.ts new file mode 100644 index 0000000000..1217bf84a3 --- /dev/null +++ b/src/resources/magic-transit/sites/sites/app-configuration.ts @@ -0,0 +1,335 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as AppConfigurationAPI from './app-configuration'; +import { SinglePage } from '../../../../pagination'; + +export class AppConfiguration extends APIResource { + /** + * Creates a new App Config for a site + */ + create( + siteId: string, + params: AppConfigurationCreateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.post(`/accounts/${account_id}/magic/sites/${siteId}/app_configs`, { + body, + ...options, + }) as Core.APIPromise<{ result: AppConfigurationCreateResponse | null }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Updates an App Config for a site + */ + update( + siteId: string, + appConfigId: string, + params: AppConfigurationUpdateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, body } = params; + return ( + this._client.put(`/accounts/${account_id}/magic/sites/${siteId}/app_configs/${appConfigId}`, { + body: body, + ...options, + }) as Core.APIPromise<{ result: AppConfigurationUpdateResponse | null }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Lists App Configs associated with a site. + */ + list( + siteId: string, + params: AppConfigurationListParams, + options?: Core.RequestOptions, + ): Core.PagePromise { + const { account_id } = params; + return this._client.getAPIList( + `/accounts/${account_id}/magic/sites/${siteId}/app_configs`, + AppConfigurationListResponsesSinglePage, + options, + ); + } + + /** + * Deletes specific App Config associated with a site. + */ + delete( + siteId: string, + appConfigId: string, + params: AppConfigurationDeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.delete( + `/accounts/${account_id}/magic/sites/${siteId}/app_configs/${appConfigId}`, + options, + ) as Core.APIPromise<{ result: AppConfigurationDeleteResponse | null }> + )._thenUnwrap((obj) => obj.result); + } +} + +export class AppConfigurationListResponsesSinglePage extends SinglePage {} + +/** + * Traffic decision configuration for an app. + */ +export interface AppConfigurationCreateResponse { + /** + * Identifier + */ + id: string; + + /** + * Identifier + */ + site_id: string; + + /** + * Whether to breakout traffic to the app's endpoints directly. Null preserves + * default behavior. + */ + breakout?: boolean; + + /** + * Priority of traffic. 0 is default, anything greater is prioritized. (Currently + * only 0 and 1 are supported) + */ + priority?: number; +} + +/** + * Traffic decision configuration for an app. + */ +export interface AppConfigurationUpdateResponse { + /** + * Identifier + */ + id: string; + + /** + * Identifier + */ + site_id: string; + + /** + * Whether to breakout traffic to the app's endpoints directly. Null preserves + * default behavior. + */ + breakout?: boolean; + + /** + * Priority of traffic. 0 is default, anything greater is prioritized. (Currently + * only 0 and 1 are supported) + */ + priority?: number; +} + +/** + * Traffic decision configuration for an app. + */ +export interface AppConfigurationListResponse { + /** + * Identifier + */ + id: string; + + /** + * Identifier + */ + site_id: string; + + /** + * Whether to breakout traffic to the app's endpoints directly. Null preserves + * default behavior. + */ + breakout?: boolean; + + /** + * Priority of traffic. 0 is default, anything greater is prioritized. (Currently + * only 0 and 1 are supported) + */ + priority?: number; +} + +/** + * Traffic decision configuration for an app. + */ +export interface AppConfigurationDeleteResponse { + /** + * Identifier + */ + id: string; + + /** + * Identifier + */ + site_id: string; + + /** + * Whether to breakout traffic to the app's endpoints directly. Null preserves + * default behavior. + */ + breakout?: boolean; + + /** + * Priority of traffic. 0 is default, anything greater is prioritized. (Currently + * only 0 and 1 are supported) + */ + priority?: number; +} + +export type AppConfigurationCreateParams = + | AppConfigurationCreateParams.AccountApp + | AppConfigurationCreateParams.ManagedApp; + +export namespace AppConfigurationCreateParams { + export interface AccountApp { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: Magic account app ID. + */ + account_app_id: string; + } + + export interface ManagedApp { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: Managed app ID. + */ + managed_app_id: string; + } +} + +export type AppConfigurationUpdateParams = + | AppConfigurationUpdateParams.ChangeBreakoutBehavior + | AppConfigurationUpdateParams.ChangePriority + | AppConfigurationUpdateParams.UpdateAccountAppID + | AppConfigurationUpdateParams.UpdateManagedAppID + | AppConfigurationUpdateParams.AccountAppManagedApp + | AppConfigurationUpdateParams.ManagedAppAccountApp; + +export namespace AppConfigurationUpdateParams { + export interface ChangeBreakoutBehavior { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: + */ + body: unknown; + } + + export interface ChangePriority { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: + */ + body: unknown; + } + + export interface UpdateAccountAppID { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: Magic account app ID. + */ + account_app_id: string; + } + + export interface UpdateManagedAppID { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: Managed app ID. + */ + managed_app_id: string; + } + + export interface AccountAppManagedApp { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: Magic account app ID. + */ + account_app_id: string; + + /** + * Body param: **Must be set to null** + */ + managed_app_id: string | null; + } + + export interface ManagedAppAccountApp { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: **Must be set to null** + */ + account_app_id: string | null; + + /** + * Body param: Managed app ID. + */ + managed_app_id: string; + } +} + +export interface AppConfigurationListParams { + /** + * Identifier + */ + account_id: string; +} + +export interface AppConfigurationDeleteParams { + /** + * Identifier + */ + account_id: string; +} + +export namespace AppConfiguration { + export import AppConfigurationCreateResponse = AppConfigurationAPI.AppConfigurationCreateResponse; + export import AppConfigurationUpdateResponse = AppConfigurationAPI.AppConfigurationUpdateResponse; + export import AppConfigurationListResponse = AppConfigurationAPI.AppConfigurationListResponse; + export import AppConfigurationDeleteResponse = AppConfigurationAPI.AppConfigurationDeleteResponse; + export import AppConfigurationListResponsesSinglePage = AppConfigurationAPI.AppConfigurationListResponsesSinglePage; + export import AppConfigurationCreateParams = AppConfigurationAPI.AppConfigurationCreateParams; + export import AppConfigurationUpdateParams = AppConfigurationAPI.AppConfigurationUpdateParams; + export import AppConfigurationListParams = AppConfigurationAPI.AppConfigurationListParams; + export import AppConfigurationDeleteParams = AppConfigurationAPI.AppConfigurationDeleteParams; +} diff --git a/src/resources/magic-transit/sites/sites/index.ts b/src/resources/magic-transit/sites/sites/index.ts new file mode 100644 index 0000000000..2c954e0962 --- /dev/null +++ b/src/resources/magic-transit/sites/sites/index.ts @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { + AppConfigurationCreateResponse, + AppConfigurationUpdateResponse, + AppConfigurationListResponse, + AppConfigurationDeleteResponse, + AppConfigurationCreateParams, + AppConfigurationUpdateParams, + AppConfigurationListParams, + AppConfigurationDeleteParams, + AppConfigurationListResponsesSinglePage, + AppConfiguration, +} from './app-configuration'; +export { Sites } from './sites'; diff --git a/src/resources/magic-transit/sites/sites/sites.ts b/src/resources/magic-transit/sites/sites/sites.ts new file mode 100644 index 0000000000..367a180879 --- /dev/null +++ b/src/resources/magic-transit/sites/sites/sites.ts @@ -0,0 +1,23 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../../../resource'; +import * as AppConfigurationAPI from './app-configuration'; + +export class Sites extends APIResource { + appConfiguration: AppConfigurationAPI.AppConfiguration = new AppConfigurationAPI.AppConfiguration( + this._client, + ); +} + +export namespace Sites { + export import AppConfiguration = AppConfigurationAPI.AppConfiguration; + export import AppConfigurationCreateResponse = AppConfigurationAPI.AppConfigurationCreateResponse; + export import AppConfigurationUpdateResponse = AppConfigurationAPI.AppConfigurationUpdateResponse; + export import AppConfigurationListResponse = AppConfigurationAPI.AppConfigurationListResponse; + export import AppConfigurationDeleteResponse = AppConfigurationAPI.AppConfigurationDeleteResponse; + export import AppConfigurationListResponsesSinglePage = AppConfigurationAPI.AppConfigurationListResponsesSinglePage; + export import AppConfigurationCreateParams = AppConfigurationAPI.AppConfigurationCreateParams; + export import AppConfigurationUpdateParams = AppConfigurationAPI.AppConfigurationUpdateParams; + export import AppConfigurationListParams = AppConfigurationAPI.AppConfigurationListParams; + export import AppConfigurationDeleteParams = AppConfigurationAPI.AppConfigurationDeleteParams; +} diff --git a/tests/api-resources/addressing/regional-hostnames/regional-hostnames.test.ts b/tests/api-resources/addressing/regional-hostnames/regional-hostnames.test.ts new file mode 100644 index 0000000000..3fddf66f0b --- /dev/null +++ b/tests/api-resources/addressing/regional-hostnames/regional-hostnames.test.ts @@ -0,0 +1,113 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource regionalHostnames', () => { + test('create: only required params', async () => { + const responsePromise = cloudflare.addressing.regionalHostnames.create({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + hostname: 'foo.example.com', + region_key: 'ca', + }); + 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('create: required and optional params', async () => { + const response = await cloudflare.addressing.regionalHostnames.create({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + hostname: 'foo.example.com', + region_key: 'ca', + }); + }); + + test('list: only required params', async () => { + const responsePromise = cloudflare.addressing.regionalHostnames.list({ + zone_id: '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); + }); + + test('list: required and optional params', async () => { + const response = await cloudflare.addressing.regionalHostnames.list({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); + + test('delete: only required params', async () => { + const responsePromise = cloudflare.addressing.regionalHostnames.delete('foo.example.com', { + zone_id: '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); + }); + + test('delete: required and optional params', async () => { + const response = await cloudflare.addressing.regionalHostnames.delete('foo.example.com', { + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); + + test('edit: only required params', async () => { + const responsePromise = cloudflare.addressing.regionalHostnames.edit('foo.example.com', { + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + region_key: 'ca', + }); + 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('edit: required and optional params', async () => { + const response = await cloudflare.addressing.regionalHostnames.edit('foo.example.com', { + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + region_key: 'ca', + }); + }); + + test('get: only required params', async () => { + const responsePromise = cloudflare.addressing.regionalHostnames.get('foo.example.com', { + zone_id: '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); + }); + + test('get: required and optional params', async () => { + const response = await cloudflare.addressing.regionalHostnames.get('foo.example.com', { + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); +}); diff --git a/tests/api-resources/addressing/regional-hostnames/regions.test.ts b/tests/api-resources/addressing/regional-hostnames/regions.test.ts new file mode 100644 index 0000000000..6118f5e872 --- /dev/null +++ b/tests/api-resources/addressing/regional-hostnames/regions.test.ts @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource regions', () => { + test('list: only required params', async () => { + const responsePromise = cloudflare.addressing.regionalHostnames.regions.list({ + account_id: '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); + }); + + test('list: required and optional params', async () => { + const response = await cloudflare.addressing.regionalHostnames.regions.list({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); +}); diff --git a/tests/api-resources/magic-transit/apps.test.ts b/tests/api-resources/magic-transit/apps.test.ts new file mode 100644 index 0000000000..5a400f3596 --- /dev/null +++ b/tests/api-resources/magic-transit/apps.test.ts @@ -0,0 +1,92 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource apps', () => { + test('create: only required params', async () => { + const responsePromise = cloudflare.magicTransit.apps.create({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + body: {}, + }); + 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('create: required and optional params', async () => { + const response = await cloudflare.magicTransit.apps.create({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + body: {}, + }); + }); + + test('update: only required params', async () => { + const responsePromise = cloudflare.magicTransit.apps.update('023e105f4ecef8ad9ca31a8372d0c353', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + body: {}, + }); + 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('update: required and optional params', async () => { + const response = await cloudflare.magicTransit.apps.update('023e105f4ecef8ad9ca31a8372d0c353', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + body: {}, + }); + }); + + test('list: only required params', async () => { + const responsePromise = cloudflare.magicTransit.apps.list({ + account_id: '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); + }); + + test('list: required and optional params', async () => { + const response = await cloudflare.magicTransit.apps.list({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); + + test('delete: only required params', async () => { + const responsePromise = cloudflare.magicTransit.apps.delete('023e105f4ecef8ad9ca31a8372d0c353', { + account_id: '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); + }); + + test('delete: required and optional params', async () => { + const response = await cloudflare.magicTransit.apps.delete('023e105f4ecef8ad9ca31a8372d0c353', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); +}); diff --git a/tests/api-resources/magic-transit/sites/sites/app-configuration.test.ts b/tests/api-resources/magic-transit/sites/sites/app-configuration.test.ts new file mode 100644 index 0000000000..665c24eaaa --- /dev/null +++ b/tests/api-resources/magic-transit/sites/sites/app-configuration.test.ts @@ -0,0 +1,100 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource appConfiguration', () => { + test('create: only required params', async () => { + const responsePromise = cloudflare.magicTransit.sites.sites.appConfiguration.create( + '023e105f4ecef8ad9ca31a8372d0c353', + { account_id: '023e105f4ecef8ad9ca31a8372d0c353', account_app_id: 'ac60d3d0435248289d446cedd870bcf4' }, + ); + 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('create: required and optional params', async () => { + const response = await cloudflare.magicTransit.sites.sites.appConfiguration.create( + '023e105f4ecef8ad9ca31a8372d0c353', + { account_id: '023e105f4ecef8ad9ca31a8372d0c353', account_app_id: 'ac60d3d0435248289d446cedd870bcf4' }, + ); + }); + + test('update: only required params', async () => { + const responsePromise = cloudflare.magicTransit.sites.sites.appConfiguration.update( + '023e105f4ecef8ad9ca31a8372d0c353', + '023e105f4ecef8ad9ca31a8372d0c353', + { account_id: '023e105f4ecef8ad9ca31a8372d0c353', body: {} }, + ); + 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('update: required and optional params', async () => { + const response = await cloudflare.magicTransit.sites.sites.appConfiguration.update( + '023e105f4ecef8ad9ca31a8372d0c353', + '023e105f4ecef8ad9ca31a8372d0c353', + { account_id: '023e105f4ecef8ad9ca31a8372d0c353', body: {} }, + ); + }); + + test('list: only required params', async () => { + const responsePromise = cloudflare.magicTransit.sites.sites.appConfiguration.list( + '023e105f4ecef8ad9ca31a8372d0c353', + { account_id: '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); + }); + + test('list: required and optional params', async () => { + const response = await cloudflare.magicTransit.sites.sites.appConfiguration.list( + '023e105f4ecef8ad9ca31a8372d0c353', + { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, + ); + }); + + test('delete: only required params', async () => { + const responsePromise = cloudflare.magicTransit.sites.sites.appConfiguration.delete( + '023e105f4ecef8ad9ca31a8372d0c353', + '023e105f4ecef8ad9ca31a8372d0c353', + { account_id: '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); + }); + + test('delete: required and optional params', async () => { + const response = await cloudflare.magicTransit.sites.sites.appConfiguration.delete( + '023e105f4ecef8ad9ca31a8372d0c353', + '023e105f4ecef8ad9ca31a8372d0c353', + { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, + ); + }); +}); From 707ac10b2153a05a7e0b70df5f4155b15f5101c6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 22:45:57 +0000 Subject: [PATCH 233/473] feat(api): OpenAPI spec update via Stainless API (#730) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index b1ee01299a..036bd6a320 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ac33a501d722d88a0ebf590d74e32c77066a57b327cb3a2fae156558b6e7b75c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e83b5eb5706ca8b525141f506338cd1d465eb133815b9ddc53df612ea4a2ecef.yml From d01e63370d89fd3b5db1811a5f5c8ecd14874076 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 22:48:08 +0000 Subject: [PATCH 234/473] feat(api): OpenAPI spec update via Stainless API (#731) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 036bd6a320..5d67bcc6bd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e83b5eb5706ca8b525141f506338cd1d465eb133815b9ddc53df612ea4a2ecef.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5be95789763c3b4b655f44e48b2d615e059cdfb5a52d62a7e084c84ffa039fe2.yml From b4a451dff830a9efbc917756d7f1070d98374e20 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 22:50:43 +0000 Subject: [PATCH 235/473] feat(api): update via SDK Studio (#732) --- .stats.yml | 2 +- api.md | 34 +++++++++---------- .../sites/{sites => }/app-configuration.ts | 6 ++-- src/resources/magic-transit/sites/index.ts | 13 ++++++- src/resources/magic-transit/sites/sites.ts | 18 +++++++--- .../magic-transit/sites/sites/index.ts | 15 -------- .../magic-transit/sites/sites/sites.ts | 23 ------------- .../{sites => }/app-configuration.test.ts | 16 ++++----- 8 files changed, 54 insertions(+), 73 deletions(-) rename src/resources/magic-transit/sites/{sites => }/app-configuration.ts (98%) delete mode 100644 src/resources/magic-transit/sites/sites/index.ts delete mode 100644 src/resources/magic-transit/sites/sites/sites.ts rename tests/api-resources/magic-transit/sites/{sites => }/app-configuration.test.ts (83%) diff --git a/.stats.yml b/.stats.yml index 5d67bcc6bd..036bd6a320 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5be95789763c3b4b655f44e48b2d615e059cdfb5a52d62a7e084c84ffa039fe2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e83b5eb5706ca8b525141f506338cd1d465eb133815b9ddc53df612ea4a2ecef.yml diff --git a/api.md b/api.md index 4c954d6e0b..c63d989b54 100644 --- a/api.md +++ b/api.md @@ -3512,6 +3512,22 @@ Methods: - client.magicTransit.sites.edit(siteId, { ...params }) -> Site - client.magicTransit.sites.get(siteId, { ...params }) -> Site +### AppConfiguration + +Types: + +- AppConfigurationCreateResponse +- AppConfigurationUpdateResponse +- AppConfigurationListResponse +- AppConfigurationDeleteResponse + +Methods: + +- client.magicTransit.sites.appConfiguration.create(siteId, { ...params }) -> AppConfigurationCreateResponse | null +- client.magicTransit.sites.appConfiguration.update(siteId, appConfigId, { ...params }) -> AppConfigurationUpdateResponse | null +- client.magicTransit.sites.appConfiguration.list(siteId, { ...params }) -> AppConfigurationListResponsesSinglePage +- client.magicTransit.sites.appConfiguration.delete(siteId, appConfigId, { ...params }) -> AppConfigurationDeleteResponse | null + ### ACLs Types: @@ -3568,24 +3584,6 @@ Methods: - client.magicTransit.sites.wans.edit(siteId, wanId, { ...params }) -> WAN - client.magicTransit.sites.wans.get(siteId, wanId, { ...params }) -> WAN -### Sites - -#### AppConfiguration - -Types: - -- AppConfigurationCreateResponse -- AppConfigurationUpdateResponse -- AppConfigurationListResponse -- AppConfigurationDeleteResponse - -Methods: - -- client.magicTransit.sites.sites.appConfiguration.create(siteId, { ...params }) -> AppConfigurationCreateResponse | null -- client.magicTransit.sites.sites.appConfiguration.update(siteId, appConfigId, { ...params }) -> AppConfigurationUpdateResponse | null -- client.magicTransit.sites.sites.appConfiguration.list(siteId, { ...params }) -> AppConfigurationListResponsesSinglePage -- client.magicTransit.sites.sites.appConfiguration.delete(siteId, appConfigId, { ...params }) -> AppConfigurationDeleteResponse | null - ## Connectors Types: diff --git a/src/resources/magic-transit/sites/sites/app-configuration.ts b/src/resources/magic-transit/sites/app-configuration.ts similarity index 98% rename from src/resources/magic-transit/sites/sites/app-configuration.ts rename to src/resources/magic-transit/sites/app-configuration.ts index 1217bf84a3..b533c02fee 100644 --- a/src/resources/magic-transit/sites/sites/app-configuration.ts +++ b/src/resources/magic-transit/sites/app-configuration.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from '../../../../core'; -import { APIResource } from '../../../../resource'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; import * as AppConfigurationAPI from './app-configuration'; -import { SinglePage } from '../../../../pagination'; +import { SinglePage } from '../../../pagination'; export class AppConfiguration extends APIResource { /** diff --git a/src/resources/magic-transit/sites/index.ts b/src/resources/magic-transit/sites/index.ts index a99d8f9d96..379bf35680 100644 --- a/src/resources/magic-transit/sites/index.ts +++ b/src/resources/magic-transit/sites/index.ts @@ -14,6 +14,18 @@ export { ACLsSinglePage, ACLs, } from './acls'; +export { + AppConfigurationCreateResponse, + AppConfigurationUpdateResponse, + AppConfigurationListResponse, + AppConfigurationDeleteResponse, + AppConfigurationCreateParams, + AppConfigurationUpdateParams, + AppConfigurationListParams, + AppConfigurationDeleteParams, + AppConfigurationListResponsesSinglePage, + AppConfiguration, +} from './app-configuration'; export { DHCPRelay, DHCPServer, @@ -43,7 +55,6 @@ export { SitesSinglePage, Sites, } from './sites'; -export { Sites } from './sites/index'; export { WAN, WANStaticAddressing, diff --git a/src/resources/magic-transit/sites/sites.ts b/src/resources/magic-transit/sites/sites.ts index f6a2d1f12e..57ca1d554b 100644 --- a/src/resources/magic-transit/sites/sites.ts +++ b/src/resources/magic-transit/sites/sites.ts @@ -2,19 +2,20 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; -import { Sites } from './sites/sites'; import * as SitesAPI from './sites'; import * as ACLsAPI from './acls'; +import * as AppConfigurationAPI from './app-configuration'; import * as LANsAPI from './lans'; import * as WANsAPI from './wans'; -import * as SitesSitesAPI from './sites/sites'; import { SinglePage } from '../../../pagination'; export class Sites extends APIResource { + appConfiguration: AppConfigurationAPI.AppConfiguration = new AppConfigurationAPI.AppConfiguration( + this._client, + ); acls: ACLsAPI.ACLs = new ACLsAPI.ACLs(this._client); lans: LANsAPI.LANs = new LANsAPI.LANs(this._client); wans: WANsAPI.WANs = new WANsAPI.WANs(this._client); - sites: SitesSitesAPI.Sites = new SitesSitesAPI.Sites(this._client); /** * Creates a new Site @@ -300,6 +301,16 @@ export namespace Sites { export import SiteDeleteParams = SitesAPI.SiteDeleteParams; export import SiteEditParams = SitesAPI.SiteEditParams; export import SiteGetParams = SitesAPI.SiteGetParams; + export import AppConfiguration = AppConfigurationAPI.AppConfiguration; + export import AppConfigurationCreateResponse = AppConfigurationAPI.AppConfigurationCreateResponse; + export import AppConfigurationUpdateResponse = AppConfigurationAPI.AppConfigurationUpdateResponse; + export import AppConfigurationListResponse = AppConfigurationAPI.AppConfigurationListResponse; + export import AppConfigurationDeleteResponse = AppConfigurationAPI.AppConfigurationDeleteResponse; + export import AppConfigurationListResponsesSinglePage = AppConfigurationAPI.AppConfigurationListResponsesSinglePage; + export import AppConfigurationCreateParams = AppConfigurationAPI.AppConfigurationCreateParams; + export import AppConfigurationUpdateParams = AppConfigurationAPI.AppConfigurationUpdateParams; + export import AppConfigurationListParams = AppConfigurationAPI.AppConfigurationListParams; + export import AppConfigurationDeleteParams = AppConfigurationAPI.AppConfigurationDeleteParams; export import ACLs = ACLsAPI.ACLs; export import ACL = ACLsAPI.ACL; export import ACLConfiguration = ACLsAPI.ACLConfiguration; @@ -338,5 +349,4 @@ export namespace Sites { export import WANDeleteParams = WANsAPI.WANDeleteParams; export import WANEditParams = WANsAPI.WANEditParams; export import WANGetParams = WANsAPI.WANGetParams; - export import Sites = SitesSitesAPI.Sites; } diff --git a/src/resources/magic-transit/sites/sites/index.ts b/src/resources/magic-transit/sites/sites/index.ts deleted file mode 100644 index 2c954e0962..0000000000 --- a/src/resources/magic-transit/sites/sites/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -export { - AppConfigurationCreateResponse, - AppConfigurationUpdateResponse, - AppConfigurationListResponse, - AppConfigurationDeleteResponse, - AppConfigurationCreateParams, - AppConfigurationUpdateParams, - AppConfigurationListParams, - AppConfigurationDeleteParams, - AppConfigurationListResponsesSinglePage, - AppConfiguration, -} from './app-configuration'; -export { Sites } from './sites'; diff --git a/src/resources/magic-transit/sites/sites/sites.ts b/src/resources/magic-transit/sites/sites/sites.ts deleted file mode 100644 index 367a180879..0000000000 --- a/src/resources/magic-transit/sites/sites/sites.ts +++ /dev/null @@ -1,23 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../../resource'; -import * as AppConfigurationAPI from './app-configuration'; - -export class Sites extends APIResource { - appConfiguration: AppConfigurationAPI.AppConfiguration = new AppConfigurationAPI.AppConfiguration( - this._client, - ); -} - -export namespace Sites { - export import AppConfiguration = AppConfigurationAPI.AppConfiguration; - export import AppConfigurationCreateResponse = AppConfigurationAPI.AppConfigurationCreateResponse; - export import AppConfigurationUpdateResponse = AppConfigurationAPI.AppConfigurationUpdateResponse; - export import AppConfigurationListResponse = AppConfigurationAPI.AppConfigurationListResponse; - export import AppConfigurationDeleteResponse = AppConfigurationAPI.AppConfigurationDeleteResponse; - export import AppConfigurationListResponsesSinglePage = AppConfigurationAPI.AppConfigurationListResponsesSinglePage; - export import AppConfigurationCreateParams = AppConfigurationAPI.AppConfigurationCreateParams; - export import AppConfigurationUpdateParams = AppConfigurationAPI.AppConfigurationUpdateParams; - export import AppConfigurationListParams = AppConfigurationAPI.AppConfigurationListParams; - export import AppConfigurationDeleteParams = AppConfigurationAPI.AppConfigurationDeleteParams; -} diff --git a/tests/api-resources/magic-transit/sites/sites/app-configuration.test.ts b/tests/api-resources/magic-transit/sites/app-configuration.test.ts similarity index 83% rename from tests/api-resources/magic-transit/sites/sites/app-configuration.test.ts rename to tests/api-resources/magic-transit/sites/app-configuration.test.ts index 665c24eaaa..3c270f0b77 100644 --- a/tests/api-resources/magic-transit/sites/sites/app-configuration.test.ts +++ b/tests/api-resources/magic-transit/sites/app-configuration.test.ts @@ -11,7 +11,7 @@ const cloudflare = new Cloudflare({ describe('resource appConfiguration', () => { test('create: only required params', async () => { - const responsePromise = cloudflare.magicTransit.sites.sites.appConfiguration.create( + const responsePromise = cloudflare.magicTransit.sites.appConfiguration.create( '023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', account_app_id: 'ac60d3d0435248289d446cedd870bcf4' }, ); @@ -25,14 +25,14 @@ describe('resource appConfiguration', () => { }); test('create: required and optional params', async () => { - const response = await cloudflare.magicTransit.sites.sites.appConfiguration.create( + const response = await cloudflare.magicTransit.sites.appConfiguration.create( '023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', account_app_id: 'ac60d3d0435248289d446cedd870bcf4' }, ); }); test('update: only required params', async () => { - const responsePromise = cloudflare.magicTransit.sites.sites.appConfiguration.update( + const responsePromise = cloudflare.magicTransit.sites.appConfiguration.update( '023e105f4ecef8ad9ca31a8372d0c353', '023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', body: {} }, @@ -47,7 +47,7 @@ describe('resource appConfiguration', () => { }); test('update: required and optional params', async () => { - const response = await cloudflare.magicTransit.sites.sites.appConfiguration.update( + const response = await cloudflare.magicTransit.sites.appConfiguration.update( '023e105f4ecef8ad9ca31a8372d0c353', '023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', body: {} }, @@ -55,7 +55,7 @@ describe('resource appConfiguration', () => { }); test('list: only required params', async () => { - const responsePromise = cloudflare.magicTransit.sites.sites.appConfiguration.list( + const responsePromise = cloudflare.magicTransit.sites.appConfiguration.list( '023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); @@ -69,14 +69,14 @@ describe('resource appConfiguration', () => { }); test('list: required and optional params', async () => { - const response = await cloudflare.magicTransit.sites.sites.appConfiguration.list( + const response = await cloudflare.magicTransit.sites.appConfiguration.list( '023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); }); test('delete: only required params', async () => { - const responsePromise = cloudflare.magicTransit.sites.sites.appConfiguration.delete( + const responsePromise = cloudflare.magicTransit.sites.appConfiguration.delete( '023e105f4ecef8ad9ca31a8372d0c353', '023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, @@ -91,7 +91,7 @@ describe('resource appConfiguration', () => { }); test('delete: required and optional params', async () => { - const response = await cloudflare.magicTransit.sites.sites.appConfiguration.delete( + const response = await cloudflare.magicTransit.sites.appConfiguration.delete( '023e105f4ecef8ad9ca31a8372d0c353', '023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, From d9a15e6c006752c628ef3eec3904833e1b1151ed Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 22:59:13 +0000 Subject: [PATCH 236/473] feat(api): OpenAPI spec update via Stainless API (#733) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 036bd6a320..5d67bcc6bd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e83b5eb5706ca8b525141f506338cd1d465eb133815b9ddc53df612ea4a2ecef.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5be95789763c3b4b655f44e48b2d615e059cdfb5a52d62a7e084c84ffa039fe2.yml From 37a500ab7fe378d2c5c6b21c64f58b914ab8127c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 23:01:31 +0000 Subject: [PATCH 237/473] feat(api): OpenAPI spec update via Stainless API (#734) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 5d67bcc6bd..036bd6a320 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5be95789763c3b4b655f44e48b2d615e059cdfb5a52d62a7e084c84ffa039fe2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e83b5eb5706ca8b525141f506338cd1d465eb133815b9ddc53df612ea4a2ecef.yml From 3660d44f661c5540979986e8bcd5e046f33ae19b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 23:45:32 +0000 Subject: [PATCH 238/473] feat(api): OpenAPI spec update via Stainless API (#735) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 036bd6a320..3050b50ac7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e83b5eb5706ca8b525141f506338cd1d465eb133815b9ddc53df612ea4a2ecef.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dcd6da6d54ab84199b2a5a342783a5388aa6ea0f460f8ad821f5b5dc60b3726e.yml From 8529ec04394abce63ab8d1d66cbd584db72870d2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 02:39:55 +0000 Subject: [PATCH 239/473] feat(api): update via SDK Studio (#736) --- .../alerting/destinations/pagerduty.test.ts | 12 ++++++++---- .../alerting/destinations/webhooks.test.ts | 12 ++++++++---- tests/api-resources/alerting/policies.test.ts | 12 ++++++++---- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/tests/api-resources/alerting/destinations/pagerduty.test.ts b/tests/api-resources/alerting/destinations/pagerduty.test.ts index 8d5c347619..fd79dddf45 100644 --- a/tests/api-resources/alerting/destinations/pagerduty.test.ts +++ b/tests/api-resources/alerting/destinations/pagerduty.test.ts @@ -10,7 +10,8 @@ const cloudflare = new Cloudflare({ }); describe('resource pagerduty', () => { - test('create: only required params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4285 + test.skip('create: only required params', async () => { const responsePromise = cloudflare.alerting.destinations.pagerduty.create({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); @@ -23,7 +24,8 @@ describe('resource pagerduty', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('create: required and optional params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4285 + test.skip('create: required and optional params', async () => { const response = await cloudflare.alerting.destinations.pagerduty.create({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); @@ -67,7 +69,8 @@ describe('resource pagerduty', () => { }); }); - test('link: only required params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4285 + test.skip('link: only required params', async () => { const responsePromise = cloudflare.alerting.destinations.pagerduty.link( '8c71e667571b4f61b94d9e4b12158038', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, @@ -81,7 +84,8 @@ describe('resource pagerduty', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('link: required and optional params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4285 + test.skip('link: required and optional params', async () => { const response = await cloudflare.alerting.destinations.pagerduty.link( '8c71e667571b4f61b94d9e4b12158038', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, diff --git a/tests/api-resources/alerting/destinations/webhooks.test.ts b/tests/api-resources/alerting/destinations/webhooks.test.ts index beb2110c55..f6e4ef2ec6 100644 --- a/tests/api-resources/alerting/destinations/webhooks.test.ts +++ b/tests/api-resources/alerting/destinations/webhooks.test.ts @@ -10,7 +10,8 @@ const cloudflare = new Cloudflare({ }); describe('resource webhooks', () => { - test('create: only required params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4291 + test.skip('create: only required params', async () => { const responsePromise = cloudflare.alerting.destinations.webhooks.create({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', name: 'Slack Webhook', @@ -25,7 +26,8 @@ describe('resource webhooks', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('create: required and optional params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4291 + test.skip('create: required and optional params', async () => { const response = await cloudflare.alerting.destinations.webhooks.create({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', name: 'Slack Webhook', @@ -34,7 +36,8 @@ describe('resource webhooks', () => { }); }); - test('update: only required params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4291 + test.skip('update: only required params', async () => { const responsePromise = cloudflare.alerting.destinations.webhooks.update( 'b115d5ec-15c6-41ee-8b76-92c449b5227b', { @@ -52,7 +55,8 @@ describe('resource webhooks', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('update: required and optional params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4291 + test.skip('update: required and optional params', async () => { const response = await cloudflare.alerting.destinations.webhooks.update( 'b115d5ec-15c6-41ee-8b76-92c449b5227b', { diff --git a/tests/api-resources/alerting/policies.test.ts b/tests/api-resources/alerting/policies.test.ts index 963a58a4af..538b26356b 100644 --- a/tests/api-resources/alerting/policies.test.ts +++ b/tests/api-resources/alerting/policies.test.ts @@ -10,7 +10,8 @@ const cloudflare = new Cloudflare({ }); describe('resource policies', () => { - test('create: only required params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4274 + test.skip('create: only required params', async () => { const responsePromise = cloudflare.alerting.policies.create({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', alert_type: 'universal_ssl_event_type', @@ -27,7 +28,8 @@ describe('resource policies', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('create: required and optional params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4274 + test.skip('create: required and optional params', async () => { const response = await cloudflare.alerting.policies.create({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', alert_type: 'universal_ssl_event_type', @@ -84,7 +86,8 @@ describe('resource policies', () => { }); }); - test('update: only required params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4274 + test.skip('update: only required params', async () => { const responsePromise = cloudflare.alerting.policies.update('0da2b59e-f118-439d-8097-bdfb215203c9', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); @@ -97,7 +100,8 @@ describe('resource policies', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('update: required and optional params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4274 + test.skip('update: required and optional params', async () => { const response = await cloudflare.alerting.policies.update('0da2b59e-f118-439d-8097-bdfb215203c9', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', alert_type: 'universal_ssl_event_type', From 05bcd55d40a1dc97f6b93d806a45f8b2c440d770 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 02:52:47 +0000 Subject: [PATCH 240/473] feat(api): update via SDK Studio (#737) --- .../alerting/destinations/webhooks.test.ts | 6 ++++-- tests/api-resources/magic-transit/apps.test.ts | 18 ++++++++++++------ .../sites/app-configuration.test.ts | 12 ++++++++---- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/tests/api-resources/alerting/destinations/webhooks.test.ts b/tests/api-resources/alerting/destinations/webhooks.test.ts index f6e4ef2ec6..16dfff33b1 100644 --- a/tests/api-resources/alerting/destinations/webhooks.test.ts +++ b/tests/api-resources/alerting/destinations/webhooks.test.ts @@ -108,7 +108,8 @@ describe('resource webhooks', () => { ); }); - test('get: only required params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4291 + test.skip('get: only required params', async () => { const responsePromise = cloudflare.alerting.destinations.webhooks.get( 'b115d5ec-15c6-41ee-8b76-92c449b5227b', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, @@ -122,7 +123,8 @@ describe('resource webhooks', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('get: required and optional params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4291 + test.skip('get: required and optional params', async () => { const response = await cloudflare.alerting.destinations.webhooks.get( 'b115d5ec-15c6-41ee-8b76-92c449b5227b', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, diff --git a/tests/api-resources/magic-transit/apps.test.ts b/tests/api-resources/magic-transit/apps.test.ts index 5a400f3596..3bb8780091 100644 --- a/tests/api-resources/magic-transit/apps.test.ts +++ b/tests/api-resources/magic-transit/apps.test.ts @@ -10,7 +10,8 @@ const cloudflare = new Cloudflare({ }); describe('resource apps', () => { - test('create: only required params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9360388260/job/25765690361?pr=482#step:5:7212 + test.skip('create: only required params', async () => { const responsePromise = cloudflare.magicTransit.apps.create({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', body: {}, @@ -24,14 +25,16 @@ describe('resource apps', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('create: required and optional params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9360388260/job/25765690361?pr=482#step:5:7212 + test.skip('create: required and optional params', async () => { const response = await cloudflare.magicTransit.apps.create({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', body: {}, }); }); - test('update: only required params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9360388260/job/25765690361?pr=482#step:5:7212 + test.skip('update: only required params', async () => { const responsePromise = cloudflare.magicTransit.apps.update('023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', body: {}, @@ -45,14 +48,16 @@ describe('resource apps', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('update: required and optional params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9360388260/job/25765690361?pr=482#step:5:7212 + test.skip('update: required and optional params', async () => { const response = await cloudflare.magicTransit.apps.update('023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', body: {}, }); }); - test('list: only required params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9360388260/job/25765690361?pr=482#step:5:7212 + test.skip('list: only required params', async () => { const responsePromise = cloudflare.magicTransit.apps.list({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); @@ -65,7 +70,8 @@ describe('resource apps', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('list: required and optional params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9360388260/job/25765690361?pr=482#step:5:7212 + test.skip('list: required and optional params', async () => { const response = await cloudflare.magicTransit.apps.list({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); diff --git a/tests/api-resources/magic-transit/sites/app-configuration.test.ts b/tests/api-resources/magic-transit/sites/app-configuration.test.ts index 3c270f0b77..2ce56e1339 100644 --- a/tests/api-resources/magic-transit/sites/app-configuration.test.ts +++ b/tests/api-resources/magic-transit/sites/app-configuration.test.ts @@ -10,7 +10,8 @@ const cloudflare = new Cloudflare({ }); describe('resource appConfiguration', () => { - test('create: only required params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9360388260/job/25765690361?pr=482#step:5:7212 + test.skip('create: only required params', async () => { const responsePromise = cloudflare.magicTransit.sites.appConfiguration.create( '023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', account_app_id: 'ac60d3d0435248289d446cedd870bcf4' }, @@ -24,14 +25,16 @@ describe('resource appConfiguration', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('create: required and optional params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9360388260/job/25765690361?pr=482#step:5:7212 + test.skip('create: required and optional params', async () => { const response = await cloudflare.magicTransit.sites.appConfiguration.create( '023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', account_app_id: 'ac60d3d0435248289d446cedd870bcf4' }, ); }); - test('update: only required params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9360388260/job/25765690361?pr=482#step:5:7212 + test.skip('update: only required params', async () => { const responsePromise = cloudflare.magicTransit.sites.appConfiguration.update( '023e105f4ecef8ad9ca31a8372d0c353', '023e105f4ecef8ad9ca31a8372d0c353', @@ -46,7 +49,8 @@ describe('resource appConfiguration', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('update: required and optional params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9360388260/job/25765690361?pr=482#step:5:7212 + test.skip('update: required and optional params', async () => { const response = await cloudflare.magicTransit.sites.appConfiguration.update( '023e105f4ecef8ad9ca31a8372d0c353', '023e105f4ecef8ad9ca31a8372d0c353', From 1867957e97a522f1162b096af9b126f99573018e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 03:07:13 +0000 Subject: [PATCH 241/473] feat(api): update via SDK Studio (#738) --- tests/api-resources/alerting/policies.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/api-resources/alerting/policies.test.ts b/tests/api-resources/alerting/policies.test.ts index 538b26356b..1caae47476 100644 --- a/tests/api-resources/alerting/policies.test.ts +++ b/tests/api-resources/alerting/policies.test.ts @@ -196,7 +196,8 @@ describe('resource policies', () => { }); }); - test('get: only required params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4274 + test.skip('get: only required params', async () => { const responsePromise = cloudflare.alerting.policies.get('0da2b59e-f118-439d-8097-bdfb215203c9', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); @@ -209,7 +210,8 @@ describe('resource policies', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('get: required and optional params', async () => { + // prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4274 + test.skip('get: required and optional params', async () => { const response = await cloudflare.alerting.policies.get('0da2b59e-f118-439d-8097-bdfb215203c9', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); From c5f71c47797e5f71d5e05121751e17bcf3f54e40 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 08:49:37 +0000 Subject: [PATCH 242/473] feat(api): OpenAPI spec update via Stainless API (#739) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 3050b50ac7..036bd6a320 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dcd6da6d54ab84199b2a5a342783a5388aa6ea0f460f8ad821f5b5dc60b3726e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e83b5eb5706ca8b525141f506338cd1d465eb133815b9ddc53df612ea4a2ecef.yml From 2758d0a3c54578e8b6140b0ccd0012757fce7555 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 08:51:59 +0000 Subject: [PATCH 243/473] feat(api): OpenAPI spec update via Stainless API (#740) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 036bd6a320..3050b50ac7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e83b5eb5706ca8b525141f506338cd1d465eb133815b9ddc53df612ea4a2ecef.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dcd6da6d54ab84199b2a5a342783a5388aa6ea0f460f8ad821f5b5dc60b3726e.yml From 461995b081039ac109f9800de5abec89140504fb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 08:57:44 +0000 Subject: [PATCH 244/473] feat(api): OpenAPI spec update via Stainless API (#741) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 3050b50ac7..036bd6a320 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dcd6da6d54ab84199b2a5a342783a5388aa6ea0f460f8ad821f5b5dc60b3726e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e83b5eb5706ca8b525141f506338cd1d465eb133815b9ddc53df612ea4a2ecef.yml From 787aa308c9805c8cc47fbf2c842ec6a3f7b53c12 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 08:59:56 +0000 Subject: [PATCH 245/473] feat(api): OpenAPI spec update via Stainless API (#742) --- .stats.yml | 2 +- api.md | 9 ++- src/resources/rulesets/index.ts | 2 + src/resources/rulesets/phases/index.ts | 9 ++- src/resources/rulesets/phases/phases.ts | 7 +-- src/resources/rulesets/phases/versions.ts | 56 +++++++++++++++--- src/resources/rulesets/rulesets.ts | 57 +++++++++++++++---- src/resources/rulesets/versions/index.ts | 2 + src/resources/rulesets/versions/versions.ts | 56 +++++++++++++++--- .../rulesets/phases/phases.test.ts | 1 - 10 files changed, 166 insertions(+), 35 deletions(-) diff --git a/.stats.yml b/.stats.yml index 036bd6a320..4d1193a3b2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e83b5eb5706ca8b525141f506338cd1d465eb133815b9ddc53df612ea4a2ecef.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0be7a22d1cc24a2a63cf7c7d9324fa078990d35e80629e2cbd28b9838940d75d.yml diff --git a/api.md b/api.md index c63d989b54..e6ea0dc39b 100644 --- a/api.md +++ b/api.md @@ -2730,13 +2730,14 @@ Types: - Ruleset - RulesetCreateResponse - RulesetUpdateResponse +- RulesetListResponse - RulesetGetResponse Methods: - client.rulesets.create({ ...params }) -> RulesetCreateResponse - client.rulesets.update(rulesetId, { ...params }) -> RulesetUpdateResponse -- client.rulesets.list({ ...params }) -> RulesetsSinglePage +- client.rulesets.list({ ...params }) -> RulesetListResponsesSinglePage - client.rulesets.delete(rulesetId, { ...params }) -> void - client.rulesets.get(rulesetId, { ...params }) -> RulesetGetResponse @@ -2756,11 +2757,12 @@ Methods: Types: +- VersionListResponse - VersionGetResponse Methods: -- client.rulesets.phases.versions.list(rulesetPhase, { ...params }) -> RulesetsSinglePage +- client.rulesets.phases.versions.list(rulesetPhase, { ...params }) -> VersionListResponsesSinglePage - client.rulesets.phases.versions.get(rulesetPhase, rulesetVersion, { ...params }) -> VersionGetResponse ## Rules @@ -2799,11 +2801,12 @@ Methods: Types: +- VersionListResponse - VersionGetResponse Methods: -- client.rulesets.versions.list(rulesetId, { ...params }) -> RulesetsSinglePage +- client.rulesets.versions.list(rulesetId, { ...params }) -> VersionListResponsesSinglePage - client.rulesets.versions.delete(rulesetId, rulesetVersion, { ...params }) -> void - client.rulesets.versions.get(rulesetId, rulesetVersion, { ...params }) -> VersionGetResponse diff --git a/src/resources/rulesets/index.ts b/src/resources/rulesets/index.ts index 4c6a8f453c..1422ae1008 100644 --- a/src/resources/rulesets/index.ts +++ b/src/resources/rulesets/index.ts @@ -36,9 +36,11 @@ export { } from './phases/index'; export { Rulesets } from './rulesets'; export { + VersionListResponse, VersionGetResponse, VersionListParams, VersionDeleteParams, VersionGetParams, + VersionListResponsesSinglePage, Versions, } from './versions/index'; diff --git a/src/resources/rulesets/phases/index.ts b/src/resources/rulesets/phases/index.ts index d93a45f21f..048dff1de6 100644 --- a/src/resources/rulesets/phases/index.ts +++ b/src/resources/rulesets/phases/index.ts @@ -1,4 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { PhaseUpdateResponse, PhaseGetResponse, PhaseUpdateParams, PhaseGetParams, Phases } from './phases'; -export { VersionGetResponse, VersionListParams, VersionGetParams, Versions } from './versions'; +export { + VersionListResponse, + VersionGetResponse, + VersionListParams, + VersionGetParams, + VersionListResponsesSinglePage, + Versions, +} from './versions'; diff --git a/src/resources/rulesets/phases/phases.ts b/src/resources/rulesets/phases/phases.ts index 3f7651f973..6d5af19145 100644 --- a/src/resources/rulesets/phases/phases.ts +++ b/src/resources/rulesets/phases/phases.ts @@ -713,11 +713,6 @@ export interface PhaseUpdateParams { */ description?: string; - /** - * Body param: The kind of the ruleset. - */ - kind?: RulesetsAPI.KindParam; - /** * Body param: The human-readable name of the ruleset. */ @@ -929,7 +924,9 @@ export namespace Phases { export import PhaseUpdateParams = PhasesAPI.PhaseUpdateParams; export import PhaseGetParams = PhasesAPI.PhaseGetParams; export import Versions = VersionsAPI.Versions; + export import VersionListResponse = VersionsAPI.VersionListResponse; export import VersionGetResponse = VersionsAPI.VersionGetResponse; + export import VersionListResponsesSinglePage = VersionsAPI.VersionListResponsesSinglePage; export import VersionListParams = VersionsAPI.VersionListParams; export import VersionGetParams = VersionsAPI.VersionGetParams; } diff --git a/src/resources/rulesets/phases/versions.ts b/src/resources/rulesets/phases/versions.ts index 541d289ebb..fa312b84fe 100644 --- a/src/resources/rulesets/phases/versions.ts +++ b/src/resources/rulesets/phases/versions.ts @@ -7,7 +7,7 @@ import { CloudflareError } from '../../../error'; import * as VersionsAPI from './versions'; import * as RulesAPI from '../rules'; import * as RulesetsAPI from '../rulesets'; -import { RulesetsSinglePage } from '../rulesets'; +import { SinglePage } from '../../../pagination'; export class Versions extends APIResource { /** @@ -17,16 +17,16 @@ export class Versions extends APIResource { rulesetPhase: RulesetsAPI.PhaseParam, params?: VersionListParams, options?: Core.RequestOptions, - ): Core.PagePromise; + ): Core.PagePromise; list( rulesetPhase: RulesetsAPI.PhaseParam, options?: Core.RequestOptions, - ): Core.PagePromise; + ): Core.PagePromise; list( rulesetPhase: RulesetsAPI.PhaseParam, params: VersionListParams | Core.RequestOptions = {}, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { if (isRequestOptions(params)) { return this.list(rulesetPhase, {}, params); } @@ -49,7 +49,7 @@ export class Versions extends APIResource { }; return this._client.getAPIList( `/${accountOrZone}/${accountOrZoneId}/rulesets/phases/${rulesetPhase}/entrypoint/versions`, - RulesetsSinglePage, + VersionListResponsesSinglePage, options, ); } @@ -103,6 +103,48 @@ export class Versions extends APIResource { } } +export class VersionListResponsesSinglePage extends SinglePage {} + +/** + * A ruleset object. + */ +export interface VersionListResponse { + /** + * The unique ID of the ruleset. + */ + id: string; + + /** + * The kind of the ruleset. + */ + kind: RulesetsAPI.Kind; + + /** + * The timestamp of when the ruleset was last modified. + */ + last_updated: string; + + /** + * The human-readable name of the ruleset. + */ + name: string; + + /** + * The phase of the ruleset. + */ + phase: RulesetsAPI.Phase; + + /** + * The version of the ruleset. + */ + version: string; + + /** + * An informative description of the ruleset. + */ + description?: string; +} + /** * A ruleset object. */ @@ -419,9 +461,9 @@ export interface VersionGetParams { } export namespace Versions { + export import VersionListResponse = VersionsAPI.VersionListResponse; export import VersionGetResponse = VersionsAPI.VersionGetResponse; + export import VersionListResponsesSinglePage = VersionsAPI.VersionListResponsesSinglePage; export import VersionListParams = VersionsAPI.VersionListParams; export import VersionGetParams = VersionsAPI.VersionGetParams; } - -export { RulesetsSinglePage }; diff --git a/src/resources/rulesets/rulesets.ts b/src/resources/rulesets/rulesets.ts index e50d1052ed..5b91cb15f2 100644 --- a/src/resources/rulesets/rulesets.ts +++ b/src/resources/rulesets/rulesets.ts @@ -82,12 +82,12 @@ export class Rulesets extends APIResource { list( params?: RulesetListParams, options?: Core.RequestOptions, - ): Core.PagePromise; - list(options?: Core.RequestOptions): Core.PagePromise; + ): Core.PagePromise; + list(options?: Core.RequestOptions): Core.PagePromise; list( params: RulesetListParams | Core.RequestOptions = {}, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { if (isRequestOptions(params)) { return this.list({}, params); } @@ -110,7 +110,7 @@ export class Rulesets extends APIResource { }; return this._client.getAPIList( `/${accountOrZone}/${accountOrZoneId}/rulesets`, - RulesetsSinglePage, + RulesetListResponsesSinglePage, options, ); } @@ -198,7 +198,7 @@ export class Rulesets extends APIResource { } } -export class RulesetsSinglePage extends SinglePage {} +export class RulesetListResponsesSinglePage extends SinglePage {} /** * The kind of the ruleset. @@ -290,11 +290,6 @@ export interface Ruleset { */ description?: string; - /** - * The kind of the ruleset. - */ - kind?: Kind; - /** * The human-readable name of the ruleset. */ @@ -888,6 +883,46 @@ export namespace RulesetUpdateResponse { } } +/** + * A ruleset object. + */ +export interface RulesetListResponse { + /** + * The unique ID of the ruleset. + */ + id: string; + + /** + * The kind of the ruleset. + */ + kind: Kind; + + /** + * The timestamp of when the ruleset was last modified. + */ + last_updated: string; + + /** + * The human-readable name of the ruleset. + */ + name: string; + + /** + * The phase of the ruleset. + */ + phase: Phase; + + /** + * The version of the ruleset. + */ + version: string; + + /** + * An informative description of the ruleset. + */ + description?: string; +} + /** * A ruleset object. */ @@ -1727,7 +1762,9 @@ export namespace Rulesets { export import RuleDeleteParams = RulesAPI.RuleDeleteParams; export import RuleEditParams = RulesAPI.RuleEditParams; export import Versions = VersionsAPI.Versions; + export import VersionListResponse = VersionsAPI.VersionListResponse; export import VersionGetResponse = VersionsAPI.VersionGetResponse; + export import VersionListResponsesSinglePage = VersionsAPI.VersionListResponsesSinglePage; export import VersionListParams = VersionsAPI.VersionListParams; export import VersionDeleteParams = VersionsAPI.VersionDeleteParams; export import VersionGetParams = VersionsAPI.VersionGetParams; diff --git a/src/resources/rulesets/versions/index.ts b/src/resources/rulesets/versions/index.ts index 698f3efbd1..b5ad4ccbba 100644 --- a/src/resources/rulesets/versions/index.ts +++ b/src/resources/rulesets/versions/index.ts @@ -2,9 +2,11 @@ export { ByTagGetResponse, ByTagGetParams, ByTag } from './by-tag'; export { + VersionListResponse, VersionGetResponse, VersionListParams, VersionDeleteParams, VersionGetParams, + VersionListResponsesSinglePage, Versions, } from './versions'; diff --git a/src/resources/rulesets/versions/versions.ts b/src/resources/rulesets/versions/versions.ts index c831e38ef7..25243265ca 100644 --- a/src/resources/rulesets/versions/versions.ts +++ b/src/resources/rulesets/versions/versions.ts @@ -7,8 +7,8 @@ import { CloudflareError } from '../../../error'; import * as VersionsAPI from './versions'; import * as RulesAPI from '../rules'; import * as RulesetsAPI from '../rulesets'; -import { RulesetsSinglePage } from '../rulesets'; import * as ByTagAPI from './by-tag'; +import { SinglePage } from '../../../pagination'; export class Versions extends APIResource { byTag: ByTagAPI.ByTag = new ByTagAPI.ByTag(this._client); @@ -20,16 +20,16 @@ export class Versions extends APIResource { rulesetId: string, params?: VersionListParams, options?: Core.RequestOptions, - ): Core.PagePromise; + ): Core.PagePromise; list( rulesetId: string, options?: Core.RequestOptions, - ): Core.PagePromise; + ): Core.PagePromise; list( rulesetId: string, params: VersionListParams | Core.RequestOptions = {}, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { if (isRequestOptions(params)) { return this.list(rulesetId, {}, params); } @@ -52,7 +52,7 @@ export class Versions extends APIResource { }; return this._client.getAPIList( `/${accountOrZone}/${accountOrZoneId}/rulesets/${rulesetId}/versions`, - RulesetsSinglePage, + VersionListResponsesSinglePage, options, ); } @@ -148,6 +148,48 @@ export class Versions extends APIResource { } } +export class VersionListResponsesSinglePage extends SinglePage {} + +/** + * A ruleset object. + */ +export interface VersionListResponse { + /** + * The unique ID of the ruleset. + */ + id: string; + + /** + * The kind of the ruleset. + */ + kind: RulesetsAPI.Kind; + + /** + * The timestamp of when the ruleset was last modified. + */ + last_updated: string; + + /** + * The human-readable name of the ruleset. + */ + name: string; + + /** + * The phase of the ruleset. + */ + phase: RulesetsAPI.Phase; + + /** + * The version of the ruleset. + */ + version: string; + + /** + * An informative description of the ruleset. + */ + description?: string; +} + /** * A ruleset object. */ @@ -476,7 +518,9 @@ export interface VersionGetParams { } export namespace Versions { + export import VersionListResponse = VersionsAPI.VersionListResponse; export import VersionGetResponse = VersionsAPI.VersionGetResponse; + export import VersionListResponsesSinglePage = VersionsAPI.VersionListResponsesSinglePage; export import VersionListParams = VersionsAPI.VersionListParams; export import VersionDeleteParams = VersionsAPI.VersionDeleteParams; export import VersionGetParams = VersionsAPI.VersionGetParams; @@ -484,5 +528,3 @@ export namespace Versions { export import ByTagGetResponse = ByTagAPI.ByTagGetResponse; export import ByTagGetParams = ByTagAPI.ByTagGetParams; } - -export { RulesetsSinglePage }; diff --git a/tests/api-resources/rulesets/phases/phases.test.ts b/tests/api-resources/rulesets/phases/phases.test.ts index 9573b9b583..9b0485aa85 100644 --- a/tests/api-resources/rulesets/phases/phases.test.ts +++ b/tests/api-resources/rulesets/phases/phases.test.ts @@ -80,7 +80,6 @@ describe('resource phases', () => { ], account_id: 'string', description: 'My ruleset to execute managed rulesets', - kind: 'root', name: 'My ruleset', phase: 'http_request_firewall_custom', }); From 0bfe15b6a16edc25df953b0b1cf0f9979eab877a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 10:09:04 +0000 Subject: [PATCH 246/473] feat(api): OpenAPI spec update via Stainless API (#743) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4d1193a3b2..d588055877 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0be7a22d1cc24a2a63cf7c7d9324fa078990d35e80629e2cbd28b9838940d75d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3b4dbcd29fdd5e0f88ee4097d3c58c446c6876505a522503afa704ebf51b8281.yml From 9814bce526c828fe71d681557112370f6c5eda52 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 10:15:00 +0000 Subject: [PATCH 247/473] feat(api): OpenAPI spec update via Stainless API (#744) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d588055877..26cd9a85be 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3b4dbcd29fdd5e0f88ee4097d3c58c446c6876505a522503afa704ebf51b8281.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5dfb65a0436eec37b104ed913220b8182ddfe1336e6639f62077fa92501290a4.yml From 728c5d6a35a499f407fd723927de0a4cdd0c6782 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 11:38:10 +0000 Subject: [PATCH 248/473] feat(api): OpenAPI spec update via Stainless API (#745) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 26cd9a85be..d588055877 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5dfb65a0436eec37b104ed913220b8182ddfe1336e6639f62077fa92501290a4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3b4dbcd29fdd5e0f88ee4097d3c58c446c6876505a522503afa704ebf51b8281.yml From 55dd2374dd7adb01226cc3bf4c4f056fdaef591f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 14:02:23 +0000 Subject: [PATCH 249/473] feat(api): OpenAPI spec update via Stainless API (#746) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d588055877..baa541eb78 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3b4dbcd29fdd5e0f88ee4097d3c58c446c6876505a522503afa704ebf51b8281.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-69d898fa65a89862112ce6db33086cc239868954ed54f1fae9a2784395899977.yml From fadef81a90f887a5298e80c4ec03db149f22b801 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 14:04:53 +0000 Subject: [PATCH 250/473] feat(api): OpenAPI spec update via Stainless API (#747) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index baa541eb78..d588055877 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-69d898fa65a89862112ce6db33086cc239868954ed54f1fae9a2784395899977.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3b4dbcd29fdd5e0f88ee4097d3c58c446c6876505a522503afa704ebf51b8281.yml From 86fa695596f7760a26d6e77579844cf3f848ca3e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 14:53:49 +0000 Subject: [PATCH 251/473] feat(api): OpenAPI spec update via Stainless API (#748) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d588055877..baa541eb78 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3b4dbcd29fdd5e0f88ee4097d3c58c446c6876505a522503afa704ebf51b8281.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-69d898fa65a89862112ce6db33086cc239868954ed54f1fae9a2784395899977.yml From e3ca8ab38cc11170a3bbfef7f8ec626bc3d98146 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 14:55:57 +0000 Subject: [PATCH 252/473] feat(api): OpenAPI spec update via Stainless API (#749) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index baa541eb78..d588055877 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-69d898fa65a89862112ce6db33086cc239868954ed54f1fae9a2784395899977.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3b4dbcd29fdd5e0f88ee4097d3c58c446c6876505a522503afa704ebf51b8281.yml From f75453d0b2cb5d1789bcd4a3eb9a3569fb30cb15 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 15:42:00 +0000 Subject: [PATCH 253/473] feat(api): OpenAPI spec update via Stainless API (#750) --- .stats.yml | 2 +- .../risk-scoring/integrations/integrations.ts | 28 +++++++++++++++++++ .../risk-scoring/integrations/references.ts | 7 +++++ 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d588055877..d3fe501a32 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3b4dbcd29fdd5e0f88ee4097d3c58c446c6876505a522503afa704ebf51b8281.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-909b9ecb3be7ec2f54817533e4ea551d1eac37c0df72ec91b5c9179f9e8195c1.yml diff --git a/src/resources/zero-trust/risk-scoring/integrations/integrations.ts b/src/resources/zero-trust/risk-scoring/integrations/integrations.ts index ac7e812e40..0d7145e919 100644 --- a/src/resources/zero-trust/risk-scoring/integrations/integrations.ts +++ b/src/resources/zero-trust/risk-scoring/integrations/integrations.ts @@ -130,6 +130,13 @@ export interface IntegrationCreateResponse { * The base URL for the tenant. E.g. "https://tenant.okta.com" */ tenant_url: string; + + /** + * The URL for the Shared Signals Framework configuration, e.g. + * "/.well-known/sse-configuration/{integration_uuid}/". + * https://openid.net/specs/openid-sse-framework-1_0.html#rfc.section.6.2.1 + */ + well_known_url: string; } export interface IntegrationUpdateResponse { @@ -166,6 +173,13 @@ export interface IntegrationUpdateResponse { * The base URL for the tenant. E.g. "https://tenant.okta.com" */ tenant_url: string; + + /** + * The URL for the Shared Signals Framework configuration, e.g. + * "/.well-known/sse-configuration/{integration_uuid}/". + * https://openid.net/specs/openid-sse-framework-1_0.html#rfc.section.6.2.1 + */ + well_known_url: string; } export interface IntegrationListResponse { @@ -202,6 +216,13 @@ export interface IntegrationListResponse { * The base URL for the tenant. E.g. "https://tenant.okta.com" */ tenant_url: string; + + /** + * The URL for the Shared Signals Framework configuration, e.g. + * "/.well-known/sse-configuration/{integration_uuid}/". + * https://openid.net/specs/openid-sse-framework-1_0.html#rfc.section.6.2.1 + */ + well_known_url: string; } export type IntegrationDeleteResponse = unknown; @@ -240,6 +261,13 @@ export interface IntegrationGetResponse { * The base URL for the tenant. E.g. "https://tenant.okta.com" */ tenant_url: string; + + /** + * The URL for the Shared Signals Framework configuration, e.g. + * "/.well-known/sse-configuration/{integration_uuid}/". + * https://openid.net/specs/openid-sse-framework-1_0.html#rfc.section.6.2.1 + */ + well_known_url: string; } export interface IntegrationCreateParams { diff --git a/src/resources/zero-trust/risk-scoring/integrations/references.ts b/src/resources/zero-trust/risk-scoring/integrations/references.ts index 54a8b84fb8..82d67c3339 100644 --- a/src/resources/zero-trust/risk-scoring/integrations/references.ts +++ b/src/resources/zero-trust/risk-scoring/integrations/references.ts @@ -57,6 +57,13 @@ export interface ReferenceGetResponse { * The base URL for the tenant. E.g. "https://tenant.okta.com" */ tenant_url: string; + + /** + * The URL for the Shared Signals Framework configuration, e.g. + * "/.well-known/sse-configuration/{integration_uuid}/". + * https://openid.net/specs/openid-sse-framework-1_0.html#rfc.section.6.2.1 + */ + well_known_url: string; } export interface ReferenceGetParams { From 8af14dab6a226687b0fbe01edbcbeb09d79b6c2b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 16:36:47 +0000 Subject: [PATCH 254/473] feat(api): OpenAPI spec update via Stainless API (#751) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d3fe501a32..4d42c2df93 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-909b9ecb3be7ec2f54817533e4ea551d1eac37c0df72ec91b5c9179f9e8195c1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b42f6e29f4883eca878ffd5b8350978562a313e526be526c1a5518e74b80c595.yml From 0d7579e542358f2d5fa43c55a5612e6198dbb2b3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 16:46:28 +0000 Subject: [PATCH 255/473] feat(api): OpenAPI spec update via Stainless API (#752) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4d42c2df93..06c14e7d75 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b42f6e29f4883eca878ffd5b8350978562a313e526be526c1a5518e74b80c595.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-478c3ece48209201bc7501936e087ab7892159f70746853b84daf689eb0f1a82.yml From cb86c54470dddd232405152fb4b2a7e389accd17 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 17:33:07 +0000 Subject: [PATCH 256/473] feat(api): OpenAPI spec update via Stainless API (#753) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 06c14e7d75..d3fe501a32 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-478c3ece48209201bc7501936e087ab7892159f70746853b84daf689eb0f1a82.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-909b9ecb3be7ec2f54817533e4ea551d1eac37c0df72ec91b5c9179f9e8195c1.yml From 430b7fd5ab79f5afe7a5b08f181072a22bb3f852 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 17:42:12 +0000 Subject: [PATCH 257/473] feat(api): OpenAPI spec update via Stainless API (#754) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d3fe501a32..4d42c2df93 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-909b9ecb3be7ec2f54817533e4ea551d1eac37c0df72ec91b5c9179f9e8195c1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b42f6e29f4883eca878ffd5b8350978562a313e526be526c1a5518e74b80c595.yml From 2594393b441950e8998ca9269589e527400afed1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 17:44:29 +0000 Subject: [PATCH 258/473] feat(api): OpenAPI spec update via Stainless API (#755) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4d42c2df93..d3fe501a32 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b42f6e29f4883eca878ffd5b8350978562a313e526be526c1a5518e74b80c595.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-909b9ecb3be7ec2f54817533e4ea551d1eac37c0df72ec91b5c9179f9e8195c1.yml From 2b2723e11ac5da636cb59119736144f4a7d7621d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 17:59:23 +0000 Subject: [PATCH 259/473] feat(api): OpenAPI spec update via Stainless API (#756) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d3fe501a32..4d42c2df93 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-909b9ecb3be7ec2f54817533e4ea551d1eac37c0df72ec91b5c9179f9e8195c1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b42f6e29f4883eca878ffd5b8350978562a313e526be526c1a5518e74b80c595.yml From 52472076a570c58f8044894d4e1cfb1d0da22466 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 18:51:28 +0000 Subject: [PATCH 260/473] feat(api): OpenAPI spec update via Stainless API (#757) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4d42c2df93..d3fe501a32 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b42f6e29f4883eca878ffd5b8350978562a313e526be526c1a5518e74b80c595.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-909b9ecb3be7ec2f54817533e4ea551d1eac37c0df72ec91b5c9179f9e8195c1.yml From 1a2f80ec29f6ae7aba26906c2ea93df7f5970353 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 18:53:35 +0000 Subject: [PATCH 261/473] feat(api): OpenAPI spec update via Stainless API (#758) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d3fe501a32..4d42c2df93 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-909b9ecb3be7ec2f54817533e4ea551d1eac37c0df72ec91b5c9179f9e8195c1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b42f6e29f4883eca878ffd5b8350978562a313e526be526c1a5518e74b80c595.yml From 10fea31501d5d8387b2e1b71462a2fe218418bc2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 18:55:41 +0000 Subject: [PATCH 262/473] feat(api): OpenAPI spec update via Stainless API (#759) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4d42c2df93..d3fe501a32 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b42f6e29f4883eca878ffd5b8350978562a313e526be526c1a5518e74b80c595.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-909b9ecb3be7ec2f54817533e4ea551d1eac37c0df72ec91b5c9179f9e8195c1.yml From 13909311ba4ee1fff8180a740475462f909e98a6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 19:57:00 +0000 Subject: [PATCH 263/473] feat(api): OpenAPI spec update via Stainless API (#760) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d3fe501a32..4d42c2df93 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-909b9ecb3be7ec2f54817533e4ea551d1eac37c0df72ec91b5c9179f9e8195c1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b42f6e29f4883eca878ffd5b8350978562a313e526be526c1a5518e74b80c595.yml From 9c62fea6374fd473c5387ee2e9979fac9a95f2a8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 20:16:31 +0000 Subject: [PATCH 264/473] feat(api): OpenAPI spec update via Stainless API (#761) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4d42c2df93..e40f7f73c6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b42f6e29f4883eca878ffd5b8350978562a313e526be526c1a5518e74b80c595.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b64dab312fae2acb08a9d2db9bc5375a67ca3c3d735be7a33eb25fd1df289f8b.yml From 76fa49fc4d6cfef01ca7ffbd19f2e9ceec4a5bf6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 21:05:08 +0000 Subject: [PATCH 265/473] feat(api): OpenAPI spec update via Stainless API (#762) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e40f7f73c6..4d42c2df93 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b64dab312fae2acb08a9d2db9bc5375a67ca3c3d735be7a33eb25fd1df289f8b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b42f6e29f4883eca878ffd5b8350978562a313e526be526c1a5518e74b80c595.yml From 2c2ccb036a91e65831a4e9a662955b8f2e5b6a4f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 21:07:24 +0000 Subject: [PATCH 266/473] feat(api): OpenAPI spec update via Stainless API (#763) --- .stats.yml | 2 +- src/resources/healthchecks/healthchecks.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4d42c2df93..9794221f66 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b42f6e29f4883eca878ffd5b8350978562a313e526be526c1a5518e74b80c595.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e86b7715a3c49ac07162a99020f24e8ebe362cd2b6ace2d9d4f96e33bdec729d.yml diff --git a/src/resources/healthchecks/healthchecks.ts b/src/resources/healthchecks/healthchecks.ts index 5146e7a977..d7f9180bb6 100644 --- a/src/resources/healthchecks/healthchecks.ts +++ b/src/resources/healthchecks/healthchecks.ts @@ -273,7 +273,7 @@ export interface HTTPConfiguration { * The HTTP request headers to send in the health check. It is recommended you set * a Host header by default. The User-Agent header cannot be overridden. */ - header?: unknown | null; + header?: Record> | null; /** * The HTTP method to use for the health check. @@ -322,7 +322,7 @@ export interface HTTPConfigurationParam { * The HTTP request headers to send in the health check. It is recommended you set * a Host header by default. The User-Agent header cannot be overridden. */ - header?: unknown | null; + header?: Record> | null; /** * The HTTP method to use for the health check. From d268a6c299cb8c6ad0eed7b323c38fa03b285f7b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 03:56:54 +0000 Subject: [PATCH 267/473] feat(api): update via SDK Studio (#764) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9794221f66..c598bba4c5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e86b7715a3c49ac07162a99020f24e8ebe362cd2b6ace2d9d4f96e33bdec729d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9a251d357720416104482b5ef46e7fd51961fdaf6f3104d36b04f1bd51809cfb.yml From ec9e9939670aaf26536f2bd6dffdaf9833b2a167 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 07:46:56 +0000 Subject: [PATCH 268/473] feat(api): OpenAPI spec update via Stainless API (#765) --- .stats.yml | 2 +- src/resources/zero-trust/risk-scoring/behaviours.ts | 6 +++--- src/resources/zero-trust/risk-scoring/risk-scoring.ts | 2 +- src/resources/zero-trust/risk-scoring/summary.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index c598bba4c5..f97096b9f5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9a251d357720416104482b5ef46e7fd51961fdaf6f3104d36b04f1bd51809cfb.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4d641c65ec0fe43d3f8f3f2b13ec8ef70a7d9c4f4d2cb10679ccc140fdd143c3.yml diff --git a/src/resources/zero-trust/risk-scoring/behaviours.ts b/src/resources/zero-trust/risk-scoring/behaviours.ts index 6d291a3ff1..8838903943 100644 --- a/src/resources/zero-trust/risk-scoring/behaviours.ts +++ b/src/resources/zero-trust/risk-scoring/behaviours.ts @@ -46,7 +46,7 @@ export namespace BehaviourUpdateResponse { name?: string; - risk_level?: 'low' | 'medium' | 'high' | null; + risk_level?: 'low' | 'medium' | 'high'; } } @@ -62,7 +62,7 @@ export namespace BehaviourGetResponse { name?: string; - risk_level?: 'low' | 'medium' | 'high' | null; + risk_level?: 'low' | 'medium' | 'high'; } } @@ -74,7 +74,7 @@ export namespace BehaviourUpdateParams { export interface Behaviors { enabled: boolean; - risk_level: 'low' | 'medium' | 'high' | null; + risk_level: 'low' | 'medium' | 'high'; } } diff --git a/src/resources/zero-trust/risk-scoring/risk-scoring.ts b/src/resources/zero-trust/risk-scoring/risk-scoring.ts index 5c3111b09a..589617bb6a 100644 --- a/src/resources/zero-trust/risk-scoring/risk-scoring.ts +++ b/src/resources/zero-trust/risk-scoring/risk-scoring.ts @@ -79,7 +79,7 @@ export namespace RiskScoringGetResponse { name: string; - risk_level: 'low' | 'medium' | 'high' | null; + risk_level: 'low' | 'medium' | 'high'; timestamp: string; diff --git a/src/resources/zero-trust/risk-scoring/summary.ts b/src/resources/zero-trust/risk-scoring/summary.ts index 8ee7ec202b..cb1a5d9136 100644 --- a/src/resources/zero-trust/risk-scoring/summary.ts +++ b/src/resources/zero-trust/risk-scoring/summary.ts @@ -44,7 +44,7 @@ export namespace SummaryGetResponse { last_event: string; - max_risk_level: 'low' | 'medium' | 'high' | null; + max_risk_level: 'low' | 'medium' | 'high'; name: string; From 69578b3cdbf4daf604ddcc13cf1178a88cb0b035 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 07:49:19 +0000 Subject: [PATCH 269/473] feat(api): OpenAPI spec update via Stainless API (#766) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f97096b9f5..c598bba4c5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4d641c65ec0fe43d3f8f3f2b13ec8ef70a7d9c4f4d2cb10679ccc140fdd143c3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9a251d357720416104482b5ef46e7fd51961fdaf6f3104d36b04f1bd51809cfb.yml From 48223f5374a5b6b5a234bbfd090272461e369b86 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 09:12:35 +0000 Subject: [PATCH 270/473] feat(api): OpenAPI spec update via Stainless API (#767) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c598bba4c5..f97096b9f5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9a251d357720416104482b5ef46e7fd51961fdaf6f3104d36b04f1bd51809cfb.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4d641c65ec0fe43d3f8f3f2b13ec8ef70a7d9c4f4d2cb10679ccc140fdd143c3.yml From d64b8ce97e046264030ad9c62a69a72dd55db5d1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 09:14:57 +0000 Subject: [PATCH 271/473] feat(api): OpenAPI spec update via Stainless API (#768) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f97096b9f5..9794221f66 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4d641c65ec0fe43d3f8f3f2b13ec8ef70a7d9c4f4d2cb10679ccc140fdd143c3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e86b7715a3c49ac07162a99020f24e8ebe362cd2b6ace2d9d4f96e33bdec729d.yml From 382d3c417615131bb20151df959814dd0bea1ab4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 09:25:43 +0000 Subject: [PATCH 272/473] feat(api): OpenAPI spec update via Stainless API (#769) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9794221f66..c598bba4c5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e86b7715a3c49ac07162a99020f24e8ebe362cd2b6ace2d9d4f96e33bdec729d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9a251d357720416104482b5ef46e7fd51961fdaf6f3104d36b04f1bd51809cfb.yml From 2e61e3adaeff5227f012ec69bf033e239e496d16 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 09:27:49 +0000 Subject: [PATCH 273/473] feat(api): OpenAPI spec update via Stainless API (#770) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c598bba4c5..9794221f66 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9a251d357720416104482b5ef46e7fd51961fdaf6f3104d36b04f1bd51809cfb.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e86b7715a3c49ac07162a99020f24e8ebe362cd2b6ace2d9d4f96e33bdec729d.yml From aad656adb808fbfafa624bf28c40e534cf6ea0a9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 09:33:48 +0000 Subject: [PATCH 274/473] feat(api): OpenAPI spec update via Stainless API (#771) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9794221f66..1294b78948 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e86b7715a3c49ac07162a99020f24e8ebe362cd2b6ace2d9d4f96e33bdec729d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-04b940c9141154f42fa17e1b4eba14b56e9adf9ba62d92c1bb61ab180531b928.yml From 30b377751ce0098042617028b0e244c5d3f3d3fa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 09:36:03 +0000 Subject: [PATCH 275/473] feat(api): OpenAPI spec update via Stainless API (#772) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1294b78948..c598bba4c5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-04b940c9141154f42fa17e1b4eba14b56e9adf9ba62d92c1bb61ab180531b928.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9a251d357720416104482b5ef46e7fd51961fdaf6f3104d36b04f1bd51809cfb.yml From 826e0b23abc3b5698489c0151c8a45b964428401 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 10:41:43 +0000 Subject: [PATCH 276/473] feat(api): OpenAPI spec update via Stainless API (#773) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c598bba4c5..1294b78948 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9a251d357720416104482b5ef46e7fd51961fdaf6f3104d36b04f1bd51809cfb.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-04b940c9141154f42fa17e1b4eba14b56e9adf9ba62d92c1bb61ab180531b928.yml From e38e537d51fbb124b3e5f76da53813be65bede38 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 10:43:56 +0000 Subject: [PATCH 277/473] feat(api): OpenAPI spec update via Stainless API (#774) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1294b78948..4aee698a35 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-04b940c9141154f42fa17e1b4eba14b56e9adf9ba62d92c1bb61ab180531b928.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-21481e672b35bdfdd6e4482f28cd9a5ac58ddff62f5b8506a3de0d53d58572fe.yml From 54398cb23e1fad4b1c0308014959f88ebc4985a7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 10:53:07 +0000 Subject: [PATCH 278/473] feat(api): OpenAPI spec update via Stainless API (#775) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4aee698a35..8e47fa9598 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-21481e672b35bdfdd6e4482f28cd9a5ac58ddff62f5b8506a3de0d53d58572fe.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1a0beb27a59a3abb36f2931ebc3fc1bcbf0f91a8da100fc87d2254a85549879b.yml From 782d7400ce9b845dff770de9cbaf3ef95b47e9aa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 14:01:34 +0000 Subject: [PATCH 279/473] feat(api): OpenAPI spec update via Stainless API (#776) --- .stats.yml | 2 +- src/resources/zones/dns-settings.ts | 122 ++++++++++++++++++ .../api-resources/zones/dns-settings.test.ts | 11 ++ 3 files changed, 134 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8e47fa9598..389fe25173 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1a0beb27a59a3abb36f2931ebc3fc1bcbf0f91a8da100fc87d2254a85549879b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-13157b0171e236329a3811eedbce4e5b71b517be66de1126b5dcb6ac4b964ee6.yml diff --git a/src/resources/zones/dns-settings.ts b/src/resources/zones/dns-settings.ts index 1ec28d443a..59b9a98115 100644 --- a/src/resources/zones/dns-settings.ts +++ b/src/resources/zones/dns-settings.ts @@ -46,11 +46,72 @@ export interface DNSSetting { */ nameservers?: Nameserver; + /** + * The time to live (TTL) of the zone's nameserver (NS) records. + */ + ns_ttl?: number; + /** * Allows a Secondary DNS zone to use (proxied) override records and CNAME * flattening at the zone apex. */ secondary_overrides?: boolean; + + /** + * Components of the zone's SOA record. + */ + soa?: DNSSetting.Soa; + + /** + * Whether the zone mode is a regular or CDN/DNS only zone. + */ + zone_mode?: 'standard' | 'cdn_only' | 'dns_only'; +} + +export namespace DNSSetting { + /** + * Components of the zone's SOA record. + */ + export interface Soa { + /** + * Time in seconds of being unable to query the primary server after which + * secondary servers should stop serving the zone. + */ + expire: number; + + /** + * The time to live (TTL) for negative caching of records within the zone. + */ + min_ttl: number; + + /** + * The primary nameserver, which may be used for outbound zone transfers. + */ + mname: string; + + /** + * Time in seconds after which secondary servers should re-check the SOA record to + * see if the zone has been updated. + */ + refresh: number; + + /** + * Time in seconds after which secondary servers should retry queries after the + * primary server was unresponsive. + */ + retry: number; + + /** + * The email address of the zone administrator, with the first label representing + * the local part of the email address. + */ + rname: string; + + /** + * The time to live (TTL) of the SOA record itself. + */ + ttl: number; + } } /** @@ -97,11 +158,72 @@ export interface DNSSettingEditParams { */ nameservers?: NameserverParam; + /** + * Body param: The time to live (TTL) of the zone's nameserver (NS) records. + */ + ns_ttl?: number; + /** * Body param: Allows a Secondary DNS zone to use (proxied) override records and * CNAME flattening at the zone apex. */ secondary_overrides?: boolean; + + /** + * Body param: Components of the zone's SOA record. + */ + soa?: DNSSettingEditParams.Soa; + + /** + * Body param: Whether the zone mode is a regular or CDN/DNS only zone. + */ + zone_mode?: 'standard' | 'cdn_only' | 'dns_only'; +} + +export namespace DNSSettingEditParams { + /** + * Components of the zone's SOA record. + */ + export interface Soa { + /** + * Time in seconds of being unable to query the primary server after which + * secondary servers should stop serving the zone. + */ + expire: number; + + /** + * The time to live (TTL) for negative caching of records within the zone. + */ + min_ttl: number; + + /** + * The primary nameserver, which may be used for outbound zone transfers. + */ + mname: string; + + /** + * Time in seconds after which secondary servers should re-check the SOA record to + * see if the zone has been updated. + */ + refresh: number; + + /** + * Time in seconds after which secondary servers should retry queries after the + * primary server was unresponsive. + */ + retry: number; + + /** + * The email address of the zone administrator, with the first label representing + * the local part of the email address. + */ + rname: string; + + /** + * The time to live (TTL) of the SOA record itself. + */ + ttl: number; + } } export interface DNSSettingGetParams { diff --git a/tests/api-resources/zones/dns-settings.test.ts b/tests/api-resources/zones/dns-settings.test.ts index 6d06826982..ca11c478be 100644 --- a/tests/api-resources/zones/dns-settings.test.ts +++ b/tests/api-resources/zones/dns-settings.test.ts @@ -29,7 +29,18 @@ describe('resource dnsSettings', () => { foundation_dns: false, multi_provider: false, nameservers: { type: 'cloudflare.standard' }, + ns_ttl: 86400, secondary_overrides: false, + soa: { + expire: 604800, + min_ttl: 1800, + mname: 'kristina.ns.cloudflare.com', + refresh: 10000, + retry: 2400, + rname: 'admin.example.com', + ttl: 3600, + }, + zone_mode: 'dns_only', }); }); From 5b54285ede91af7b66f170a7b1822167d9deb1ee Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 14:14:08 +0000 Subject: [PATCH 280/473] feat(api): OpenAPI spec update via Stainless API (#777) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 389fe25173..3ef5620f3f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-13157b0171e236329a3811eedbce4e5b71b517be66de1126b5dcb6ac4b964ee6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e14af815e43a68175aaf8a216fcfa98f21d3c9112bd1f52cc4235fe2de4d9ab7.yml From 2e7319073446bf82223b8392984249708e6c39ba Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 14:16:25 +0000 Subject: [PATCH 281/473] feat(api): OpenAPI spec update via Stainless API (#778) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 3ef5620f3f..389fe25173 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e14af815e43a68175aaf8a216fcfa98f21d3c9112bd1f52cc4235fe2de4d9ab7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-13157b0171e236329a3811eedbce4e5b71b517be66de1126b5dcb6ac4b964ee6.yml From c16ac1a71deb18059e4ab416c3f51134caa12c58 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 14:32:19 +0000 Subject: [PATCH 282/473] feat(api): OpenAPI spec update via Stainless API (#779) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 389fe25173..3ef5620f3f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-13157b0171e236329a3811eedbce4e5b71b517be66de1126b5dcb6ac4b964ee6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e14af815e43a68175aaf8a216fcfa98f21d3c9112bd1f52cc4235fe2de4d9ab7.yml From fe0b242d5410ab1bfb169cbb659d6ee493d01b12 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 14:34:34 +0000 Subject: [PATCH 283/473] feat(api): OpenAPI spec update via Stainless API (#780) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 3ef5620f3f..7fa973bc0a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e14af815e43a68175aaf8a216fcfa98f21d3c9112bd1f52cc4235fe2de4d9ab7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e66e92d0687b69f40ef0b8d565b7922f58ff978707971ff52ab5125b6e9b624f.yml From 625cc2463b645d50544aba09100c3af9b4295074 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 15:08:46 +0000 Subject: [PATCH 284/473] feat(api): OpenAPI spec update via Stainless API (#781) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 7fa973bc0a..3ef5620f3f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e66e92d0687b69f40ef0b8d565b7922f58ff978707971ff52ab5125b6e9b624f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e14af815e43a68175aaf8a216fcfa98f21d3c9112bd1f52cc4235fe2de4d9ab7.yml From 1f12bd2de414c329b38370be33e4ef98bf32e920 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 15:49:53 +0000 Subject: [PATCH 285/473] feat(api): OpenAPI spec update via Stainless API (#782) --- .stats.yml | 2 +- src/resources/ai-gateway/logs.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 3ef5620f3f..ee7b1b5c5c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e14af815e43a68175aaf8a216fcfa98f21d3c9112bd1f52cc4235fe2de4d9ab7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a9fac2ac06a106ac7e616a6b77e657a85e0f9f5549ac2452a52fe4f25c4f3c2c.yml diff --git a/src/resources/ai-gateway/logs.ts b/src/resources/ai-gateway/logs.ts index 0aa5e7aa58..4601768b1b 100644 --- a/src/resources/ai-gateway/logs.ts +++ b/src/resources/ai-gateway/logs.ts @@ -49,7 +49,11 @@ export namespace LogGetResponse { metadata?: string; + request_type?: string; + status_code?: number; + + step?: number; } } From 9f3346e5224e17cbbb5f14bcdb456ee0e8f177a9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 15:53:38 +0000 Subject: [PATCH 286/473] feat(api): OpenAPI spec update via Stainless API (#783) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index ee7b1b5c5c..e98dfa2a0d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a9fac2ac06a106ac7e616a6b77e657a85e0f9f5549ac2452a52fe4f25c4f3c2c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0a2bc66945b61dcaf2a072fae9ef790ac10749897eb72a18cf5b761ce5d1b652.yml From 70cdd7cc0e970f762ebd7954f3925d5353ec0399 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 15:55:59 +0000 Subject: [PATCH 287/473] feat(api): OpenAPI spec update via Stainless API (#784) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e98dfa2a0d..ee7b1b5c5c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0a2bc66945b61dcaf2a072fae9ef790ac10749897eb72a18cf5b761ce5d1b652.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a9fac2ac06a106ac7e616a6b77e657a85e0f9f5549ac2452a52fe4f25c4f3c2c.yml From 57bf50a9165e940187373cce4c0facd21de78bd6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 17:23:04 +0000 Subject: [PATCH 288/473] feat(api): OpenAPI spec update via Stainless API (#785) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index ee7b1b5c5c..b2eb98d317 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a9fac2ac06a106ac7e616a6b77e657a85e0f9f5549ac2452a52fe4f25c4f3c2c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-010654edb215153d26f382879c3dc51793da44932d6330b6c5a3526f40cda19f.yml From 2a90d4b5412a56ad192696537e5ef12f00e72e89 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 19:10:39 +0000 Subject: [PATCH 289/473] feat(api): OpenAPI spec update via Stainless API (#786) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index b2eb98d317..9aab24e0fb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-010654edb215153d26f382879c3dc51793da44932d6330b6c5a3526f40cda19f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5829869c29e9a52d01f33a21128b7ddd518522ddc58198d588d898d53668d371.yml From f1c8fbb65e967c8933f6f9ee2c92f88083109d83 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 19:27:13 +0000 Subject: [PATCH 290/473] feat(api): OpenAPI spec update via Stainless API (#787) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9aab24e0fb..e98dfa2a0d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5829869c29e9a52d01f33a21128b7ddd518522ddc58198d588d898d53668d371.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0a2bc66945b61dcaf2a072fae9ef790ac10749897eb72a18cf5b761ce5d1b652.yml From fff410ff7b7c41287153b82d03c4dc32c1a23922 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 19:35:50 +0000 Subject: [PATCH 291/473] feat(api): OpenAPI spec update via Stainless API (#788) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e98dfa2a0d..ee7b1b5c5c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0a2bc66945b61dcaf2a072fae9ef790ac10749897eb72a18cf5b761ce5d1b652.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a9fac2ac06a106ac7e616a6b77e657a85e0f9f5549ac2452a52fe4f25c4f3c2c.yml From b9a4fb66117996fd4abea89f688502b9aac590d4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 21:43:34 +0000 Subject: [PATCH 292/473] feat(api): OpenAPI spec update via Stainless API (#789) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index ee7b1b5c5c..ba2298a701 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1335 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a9fac2ac06a106ac7e616a6b77e657a85e0f9f5549ac2452a52fe4f25c4f3c2c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-563da3da7347fb7ce5676737cc6a457de5da7c96aa7d44098a9db3b2fb8d6599.yml From 6d799746e0024e1e7c5d5c6cf18dd6ccb1f436b0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 22:43:17 +0000 Subject: [PATCH 293/473] feat(api): update via SDK Studio (#790) --- src/resources/zones/dns-settings.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/resources/zones/dns-settings.ts b/src/resources/zones/dns-settings.ts index 59b9a98115..ccf677bf5a 100644 --- a/src/resources/zones/dns-settings.ts +++ b/src/resources/zones/dns-settings.ts @@ -60,7 +60,7 @@ export interface DNSSetting { /** * Components of the zone's SOA record. */ - soa?: DNSSetting.Soa; + soa?: DNSSetting.SOA; /** * Whether the zone mode is a regular or CDN/DNS only zone. @@ -72,7 +72,7 @@ export namespace DNSSetting { /** * Components of the zone's SOA record. */ - export interface Soa { + export interface SOA { /** * Time in seconds of being unable to query the primary server after which * secondary servers should stop serving the zone. @@ -172,7 +172,7 @@ export interface DNSSettingEditParams { /** * Body param: Components of the zone's SOA record. */ - soa?: DNSSettingEditParams.Soa; + soa?: DNSSettingEditParams.SOA; /** * Body param: Whether the zone mode is a regular or CDN/DNS only zone. @@ -184,7 +184,7 @@ export namespace DNSSettingEditParams { /** * Components of the zone's SOA record. */ - export interface Soa { + export interface SOA { /** * Time in seconds of being unable to query the primary server after which * secondary servers should stop serving the zone. From 0113c9532ac94366a3a4d5cd39bf6390b5fda38b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 22:50:57 +0000 Subject: [PATCH 294/473] feat(api): update via SDK Studio (#791) --- .stats.yml | 2 +- api.md | 26 ++- src/resources/radar/bgp/bgp.ts | 2 + src/resources/radar/bgp/index.ts | 2 + src/resources/radar/bgp/routes.ts | 122 +++++++++++++ src/resources/radar/http/http.ts | 162 ++++++++++++++++++ src/resources/radar/http/index.ts | 2 +- src/resources/radar/index.ts | 2 +- src/resources/radar/radar.ts | 2 + src/resources/workers/{ => ai}/ai.ts | 10 +- src/resources/workers/ai/index.ts | 4 + src/resources/workers/ai/models/index.ts | 4 + src/resources/workers/ai/models/models.ts | 14 ++ src/resources/workers/ai/models/schema.ts | 38 ++++ src/resources/workers/index.ts | 2 +- src/resources/workers/workers.ts | 2 +- tests/api-resources/radar/bgp/routes.test.ts | 28 +++ tests/api-resources/radar/http/http.test.ts | 50 ++++++ .../api-resources/workers/{ => ai}/ai.test.ts | 0 .../workers/ai/models/schema.test.ts | 33 ++++ 20 files changed, 497 insertions(+), 10 deletions(-) rename src/resources/workers/{ => ai}/ai.ts (95%) create mode 100644 src/resources/workers/ai/index.ts create mode 100644 src/resources/workers/ai/models/index.ts create mode 100644 src/resources/workers/ai/models/models.ts create mode 100644 src/resources/workers/ai/models/schema.ts create mode 100644 tests/api-resources/radar/http/http.test.ts rename tests/api-resources/workers/{ => ai}/ai.test.ts (100%) create mode 100644 tests/api-resources/workers/ai/models/schema.test.ts diff --git a/.stats.yml b/.stats.yml index ba2298a701..c10a59bb09 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1335 +configured_endpoints: 1338 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-563da3da7347fb7ce5676737cc6a457de5da7c96aa7d44098a9db3b2fb8d6599.yml diff --git a/api.md b/api.md index e6ea0dc39b..1393887d66 100644 --- a/api.md +++ b/api.md @@ -2280,11 +2280,23 @@ Types: Types: -- AIRunResponse +- AIRunResponse Methods: -- client.workers.ai.run(modelName, { ...params }) -> AIRunResponse +- client.workers.ai.run(modelName, { ...params }) -> AIRunResponse + +### Models + +#### Schema + +Types: + +- SchemaGetResponse + +Methods: + +- client.workers.ai.models.schema.get({ ...params }) -> SchemaGetResponse ## Scripts @@ -5620,12 +5632,14 @@ Methods: Types: +- RouteAsesResponse - RouteMoasResponse - RoutePfx2asResponse - RouteStatsResponse Methods: +- client.radar.bgp.routes.ases({ ...params }) -> RouteAsesResponse - client.radar.bgp.routes.moas({ ...params }) -> RouteMoasResponse - client.radar.bgp.routes.pfx2as({ ...params }) -> RoutePfx2asResponse - client.radar.bgp.routes.stats({ ...params }) -> RouteStatsResponse @@ -6149,6 +6163,14 @@ Methods: ## HTTP +Types: + +- HTTPTimeseriesResponse + +Methods: + +- client.radar.http.timeseries({ ...params }) -> HTTPTimeseriesResponse + ### Top Types: diff --git a/src/resources/radar/bgp/bgp.ts b/src/resources/radar/bgp/bgp.ts index 0ac07d0f39..98ea78c8ed 100644 --- a/src/resources/radar/bgp/bgp.ts +++ b/src/resources/radar/bgp/bgp.ts @@ -195,9 +195,11 @@ export namespace BGP { export import TopPrefixesParams = TopAPI.TopPrefixesParams; export import Hijacks = HijacksAPI.Hijacks; export import Routes = RoutesAPI.Routes; + export import RouteAsesResponse = RoutesAPI.RouteAsesResponse; export import RouteMoasResponse = RoutesAPI.RouteMoasResponse; export import RoutePfx2asResponse = RoutesAPI.RoutePfx2asResponse; export import RouteStatsResponse = RoutesAPI.RouteStatsResponse; + export import RouteAsesParams = RoutesAPI.RouteAsesParams; export import RouteMoasParams = RoutesAPI.RouteMoasParams; export import RoutePfx2asParams = RoutesAPI.RoutePfx2asParams; export import RouteStatsParams = RoutesAPI.RouteStatsParams; diff --git a/src/resources/radar/bgp/index.ts b/src/resources/radar/bgp/index.ts index 8942af9a1b..f977cdd137 100644 --- a/src/resources/radar/bgp/index.ts +++ b/src/resources/radar/bgp/index.ts @@ -5,9 +5,11 @@ export { Hijacks } from './hijacks/index'; export { IPTimeseriesResponse, IPTimeseriesParams, IPs } from './ips'; export { Leaks } from './leaks/index'; export { + RouteAsesResponse, RouteMoasResponse, RoutePfx2asResponse, RouteStatsResponse, + RouteAsesParams, RouteMoasParams, RoutePfx2asParams, RouteStatsParams, diff --git a/src/resources/radar/bgp/routes.ts b/src/resources/radar/bgp/routes.ts index 8a2da6adf5..7665737fbd 100644 --- a/src/resources/radar/bgp/routes.ts +++ b/src/resources/radar/bgp/routes.ts @@ -6,6 +6,25 @@ import { isRequestOptions } from '../../../core'; import * as RoutesAPI from './routes'; export class Routes extends APIResource { + /** + * List all ASes on current global routing tables with routing statistics + */ + ases(query?: RouteAsesParams, options?: Core.RequestOptions): Core.APIPromise; + ases(options?: Core.RequestOptions): Core.APIPromise; + ases( + query: RouteAsesParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(query)) { + return this.ases({}, query); + } + return ( + this._client.get('/radar/bgp/routes/ases', { query, ...options }) as Core.APIPromise<{ + result: RouteAsesResponse; + }> + )._thenUnwrap((obj) => obj.result); + } + /** * List all Multi-origin AS (MOAS) prefixes on the global routing tables. */ @@ -64,6 +83,80 @@ export class Routes extends APIResource { } } +export interface RouteAsesResponse { + asns: Array; + + meta: RouteAsesResponse.Meta; +} + +export namespace RouteAsesResponse { + export interface ASN { + asn: number; + + /** + * AS's customer cone size + */ + coneSize: number; + + /** + * 2-letter country code for the AS's registration country + */ + country: string; + + /** + * number of IPv4 addresses originated by the AS + */ + ipv4Count: number; + + /** + * number of IPv6 addresses originated by the AS + */ + ipv6Count: string; + + /** + * name of the AS + */ + name: string; + + /** + * number of total IP prefixes originated by the AS + */ + pfxsCount: number; + + /** + * number of RPKI invalid prefixes originated by the AS + */ + rpkiInvalid: number; + + /** + * number of RPKI unknown prefixes originated by the AS + */ + rpkiUnknown: number; + + /** + * number of RPKI valid prefixes originated by the AS + */ + rpkiValid: number; + } + + export interface Meta { + /** + * the timestamp of when the data is generated + */ + dataTime: string; + + /** + * the timestamp of the query + */ + queryTime: string; + + /** + * total number of route collector peers used to generate this data + */ + totalPeers: number; + } +} + export interface RouteMoasResponse { meta: RouteMoasResponse.Meta; @@ -176,6 +269,33 @@ export namespace RouteStatsResponse { } } +export interface RouteAsesParams { + /** + * Format results are returned in. + */ + format?: 'JSON' | 'CSV'; + + /** + * Limit the number of objects in the response. + */ + limit?: number; + + /** + * Location Alpha2 code. + */ + location?: string; + + /** + * Return order results by given type + */ + sortBy?: 'cone' | 'pfxs' | 'ipv4' | 'ipv6' | 'rpki_valid' | 'rpki_invalid' | 'rpki_unknown'; + + /** + * Sort by value ascending or descending + */ + sortOrder?: 'asc' | 'desc'; +} + export interface RouteMoasParams { /** * Format results are returned in. @@ -244,9 +364,11 @@ export interface RouteStatsParams { } export namespace Routes { + export import RouteAsesResponse = RoutesAPI.RouteAsesResponse; export import RouteMoasResponse = RoutesAPI.RouteMoasResponse; export import RoutePfx2asResponse = RoutesAPI.RoutePfx2asResponse; export import RouteStatsResponse = RoutesAPI.RouteStatsResponse; + export import RouteAsesParams = RoutesAPI.RouteAsesParams; export import RouteMoasParams = RoutesAPI.RouteMoasParams; export import RoutePfx2asParams = RoutesAPI.RoutePfx2asParams; export import RouteStatsParams = RoutesAPI.RouteStatsParams; diff --git a/src/resources/radar/http/http.ts b/src/resources/radar/http/http.ts index fd41dd113a..b52db2c5d0 100644 --- a/src/resources/radar/http/http.ts +++ b/src/resources/radar/http/http.ts @@ -1,6 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import * as Core from '../../../core'; import { APIResource } from '../../../resource'; +import { isRequestOptions } from '../../../core'; +import * as HTTPAPI from './http'; import * as SummaryAPI from './summary'; import * as TimeseriesGroupsAPI from './timeseries-groups'; import * as TopAPI from './top'; @@ -15,9 +18,168 @@ export class HTTP extends APIResource { timeseriesGroups: TimeseriesGroupsAPI.TimeseriesGroups = new TimeseriesGroupsAPI.TimeseriesGroups( this._client, ); + + /** + * Get HTTP requests over time. + */ + timeseries( + query?: HTTPTimeseriesParams, + options?: Core.RequestOptions, + ): Core.APIPromise; + timeseries(options?: Core.RequestOptions): Core.APIPromise; + timeseries( + query: HTTPTimeseriesParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(query)) { + return this.timeseries({}, query); + } + return ( + this._client.get('/radar/http/timeseries', { query, ...options }) as Core.APIPromise<{ + result: HTTPTimeseriesResponse; + }> + )._thenUnwrap((obj) => obj.result); + } +} + +export interface HTTPTimeseriesResponse { + meta: HTTPTimeseriesResponse.Meta; + + serie_0: HTTPTimeseriesResponse.Serie0; +} + +export namespace HTTPTimeseriesResponse { + export interface Meta { + aggInterval: string; + + dateRange: Array; + + lastUpdated: string; + + confidenceInfo?: Meta.ConfidenceInfo; + } + + export namespace Meta { + export interface DateRange { + /** + * Adjusted end of date range. + */ + endTime: string; + + /** + * Adjusted start of date range. + */ + startTime: string; + } + + export interface ConfidenceInfo { + annotations?: Array; + + level?: number; + } + + export namespace ConfidenceInfo { + export interface Annotation { + dataSource: string; + + description: string; + + eventType: string; + + isInstantaneous: unknown; + + endTime?: string; + + linkedUrl?: string; + + startTime?: string; + } + } + } + + export interface Serie0 { + timestamps: Array; + + values: Array; + } +} + +export interface HTTPTimeseriesParams { + /** + * Aggregation interval results should be returned in (for example, in 15 minutes + * or 1 hour intervals). Refer to + * [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + */ + aggInterval?: '15m' | '1h' | '1d' | '1w'; + + /** + * Array of comma separated list of ASNs, start with `-` to exclude from results. + * For example, `-174, 3356` excludes results from AS174, but includes results from + * AS3356. + */ + asn?: Array; + + /** + * Array of comma separated list of continents (alpha-2 continent codes). Start + * with `-` to exclude from results. For example, `-EU,NA` excludes results from + * Europe, but includes results from North America. + */ + continent?: Array; + + /** + * End of the date range (inclusive). + */ + dateEnd?: Array; + + /** + * For example, use `7d` and `7dControl` to compare this week with the previous + * week. Use this parameter or set specific start and end dates (`dateStart` and + * `dateEnd` parameters). + */ + dateRange?: Array< + | '1d' + | '2d' + | '7d' + | '14d' + | '28d' + | '12w' + | '24w' + | '52w' + | '1dControl' + | '2dControl' + | '7dControl' + | '14dControl' + | '28dControl' + | '12wControl' + | '24wControl' + >; + + /** + * Array of datetimes to filter the start of a series. + */ + dateStart?: Array; + + /** + * Format results are returned in. + */ + format?: 'JSON' | 'CSV'; + + /** + * Array of comma separated list of locations (alpha-2 country codes). Start with + * `-` to exclude from results. For example, `-US,PT` excludes results from the US, + * but includes results from PT. + */ + location?: Array; + + /** + * Array of names that will be used to name the series in responses. + */ + name?: Array; } export namespace HTTP { + export import HTTPTimeseriesResponse = HTTPAPI.HTTPTimeseriesResponse; + export import HTTPTimeseriesParams = HTTPAPI.HTTPTimeseriesParams; export import Top = TopAPI.Top; export import Browser = TopAPI.Browser; export import TopBrowserFamiliesResponse = TopAPI.TopBrowserFamiliesResponse; diff --git a/src/resources/radar/http/index.ts b/src/resources/radar/http/index.ts index 2969105c28..5771a8ead1 100644 --- a/src/resources/radar/http/index.ts +++ b/src/resources/radar/http/index.ts @@ -9,7 +9,7 @@ export { TopBrowsersParams, Top, } from './top'; -export { HTTP } from './http'; +export { HTTPTimeseriesResponse, HTTPTimeseriesParams, HTTP } from './http'; export { LocationGetResponse, LocationGetParams, Locations } from './locations/index'; export { SummaryBotClassResponse, diff --git a/src/resources/radar/index.ts b/src/resources/radar/index.ts index 5bbab5e4a1..589949ec80 100644 --- a/src/resources/radar/index.ts +++ b/src/resources/radar/index.ts @@ -22,7 +22,7 @@ export { Datasets, } from './datasets'; export { EntityGetResponse, EntityGetParams, Entities } from './entities/index'; -export { HTTP } from './http/index'; +export { HTTPTimeseriesResponse, HTTPTimeseriesParams, HTTP } from './http/index'; export { NetflowTimeseriesResponse, NetflowTimeseriesParams, Netflows } from './netflows/index'; export { Quality } from './quality/index'; export { Radar } from './radar'; diff --git a/src/resources/radar/radar.ts b/src/resources/radar/radar.ts index f204f32c5b..e80dc732b3 100644 --- a/src/resources/radar/radar.ts +++ b/src/resources/radar/radar.ts @@ -76,6 +76,8 @@ export namespace Radar { export import EntityGetResponse = EntitiesAPI.EntityGetResponse; export import EntityGetParams = EntitiesAPI.EntityGetParams; export import HTTP = HTTPAPI.HTTP; + export import HTTPTimeseriesResponse = HTTPAPI.HTTPTimeseriesResponse; + export import HTTPTimeseriesParams = HTTPAPI.HTTPTimeseriesParams; export import Quality = QualityAPI.Quality; export import Ranking = RankingAPI.Ranking; export import RankingTimeseriesGroupsResponse = RankingAPI.RankingTimeseriesGroupsResponse; diff --git a/src/resources/workers/ai.ts b/src/resources/workers/ai/ai.ts similarity index 95% rename from src/resources/workers/ai.ts rename to src/resources/workers/ai/ai.ts index ba8750d87c..df46990159 100644 --- a/src/resources/workers/ai.ts +++ b/src/resources/workers/ai/ai.ts @@ -1,11 +1,14 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from '../../core'; -import { APIResource } from '../../resource'; +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; import * as AIAPI from './ai'; -import { type Uploadable } from '../../core'; +import * as ModelsAPI from './models/models'; +import { type Uploadable } from '../../../core'; export class AI extends APIResource { + models: ModelsAPI.Models = new ModelsAPI.Models(this._client); + /** * This endpoint provides users with the capability to run specific AI models * on-demand. @@ -379,4 +382,5 @@ export namespace AIRunParams { export namespace AI { export import AIRunResponse = AIAPI.AIRunResponse; export import AIRunParams = AIAPI.AIRunParams; + export import Models = ModelsAPI.Models; } diff --git a/src/resources/workers/ai/index.ts b/src/resources/workers/ai/index.ts new file mode 100644 index 0000000000..1ce37976f9 --- /dev/null +++ b/src/resources/workers/ai/index.ts @@ -0,0 +1,4 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { AIRunResponse, AIRunParams, AI } from './ai'; +export { Models } from './models/index'; diff --git a/src/resources/workers/ai/models/index.ts b/src/resources/workers/ai/models/index.ts new file mode 100644 index 0000000000..e19233e767 --- /dev/null +++ b/src/resources/workers/ai/models/index.ts @@ -0,0 +1,4 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { Models } from './models'; +export { SchemaGetResponse, SchemaGetParams, Schema } from './schema'; diff --git a/src/resources/workers/ai/models/models.ts b/src/resources/workers/ai/models/models.ts new file mode 100644 index 0000000000..fc61d9483f --- /dev/null +++ b/src/resources/workers/ai/models/models.ts @@ -0,0 +1,14 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../../../resource'; +import * as SchemaAPI from './schema'; + +export class Models extends APIResource { + schema: SchemaAPI.Schema = new SchemaAPI.Schema(this._client); +} + +export namespace Models { + export import Schema = SchemaAPI.Schema; + export import SchemaGetResponse = SchemaAPI.SchemaGetResponse; + export import SchemaGetParams = SchemaAPI.SchemaGetParams; +} diff --git a/src/resources/workers/ai/models/schema.ts b/src/resources/workers/ai/models/schema.ts new file mode 100644 index 0000000000..96f1ab60b6 --- /dev/null +++ b/src/resources/workers/ai/models/schema.ts @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../../../core'; +import { APIResource } from '../../../../resource'; +import * as SchemaAPI from './schema'; + +export class Schema extends APIResource { + /** + * Get Model Schema + */ + get(params: SchemaGetParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id, ...query } = params; + return ( + this._client.get(`/accounts/${account_id}/ai/models/schema`, { query, ...options }) as Core.APIPromise<{ + result: SchemaGetResponse; + }> + )._thenUnwrap((obj) => obj.result); + } +} + +export type SchemaGetResponse = unknown; + +export interface SchemaGetParams { + /** + * Path param: + */ + account_id: string; + + /** + * Query param: Model Name + */ + model: string; +} + +export namespace Schema { + export import SchemaGetResponse = SchemaAPI.SchemaGetResponse; + export import SchemaGetParams = SchemaAPI.SchemaGetParams; +} diff --git a/src/resources/workers/index.ts b/src/resources/workers/index.ts index 25a42d1b9a..830d2e1fd4 100644 --- a/src/resources/workers/index.ts +++ b/src/resources/workers/index.ts @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { AIRunResponse, AIRunParams, AI } from './ai'; +export { AIRunResponse, AIRunParams, AI } from './ai/index'; export { AccountSettingUpdateResponse, AccountSettingGetResponse, diff --git a/src/resources/workers/workers.ts b/src/resources/workers/workers.ts index ac62310d48..22608378b8 100644 --- a/src/resources/workers/workers.ts +++ b/src/resources/workers/workers.ts @@ -2,9 +2,9 @@ import { APIResource } from '../../resource'; import * as AccountSettingsAPI from './account-settings'; -import * as AIAPI from './ai'; import * as DomainsAPI from './domains'; import * as SubdomainsAPI from './subdomains'; +import * as AIAPI from './ai/ai'; import * as ScriptsAPI from './scripts/scripts'; export class Workers extends APIResource { diff --git a/tests/api-resources/radar/bgp/routes.test.ts b/tests/api-resources/radar/bgp/routes.test.ts index 62aa761ca5..0d5241dd3f 100644 --- a/tests/api-resources/radar/bgp/routes.test.ts +++ b/tests/api-resources/radar/bgp/routes.test.ts @@ -10,6 +10,34 @@ const cloudflare = new Cloudflare({ }); describe('resource routes', () => { + test('ases', async () => { + const responsePromise = cloudflare.radar.bgp.routes.ases(); + 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('ases: 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.radar.bgp.routes.ases({ path: '/_stainless_unknown_path' })).rejects.toThrow( + Cloudflare.NotFoundError, + ); + }); + + test('ases: 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.radar.bgp.routes.ases( + { format: 'JSON', limit: 5, location: 'US', sortBy: 'ipv4', sortOrder: 'desc' }, + { path: '/_stainless_unknown_path' }, + ), + ).rejects.toThrow(Cloudflare.NotFoundError); + }); + test('moas', async () => { const responsePromise = cloudflare.radar.bgp.routes.moas(); const rawResponse = await responsePromise.asResponse(); diff --git a/tests/api-resources/radar/http/http.test.ts b/tests/api-resources/radar/http/http.test.ts new file mode 100644 index 0000000000..eb3eb62a58 --- /dev/null +++ b/tests/api-resources/radar/http/http.test.ts @@ -0,0 +1,50 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource http', () => { + test('timeseries', async () => { + const responsePromise = cloudflare.radar.http.timeseries(); + 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('timeseries: 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.radar.http.timeseries({ path: '/_stainless_unknown_path' })).rejects.toThrow( + Cloudflare.NotFoundError, + ); + }); + + test('timeseries: 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.radar.http.timeseries( + { + aggInterval: '1h', + asn: ['string', 'string', 'string'], + continent: ['string', 'string', 'string'], + dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], + dateRange: ['1d', '2d', '7d'], + dateStart: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], + format: 'JSON', + location: ['string', 'string', 'string'], + name: ['string', 'string', 'string'], + }, + { path: '/_stainless_unknown_path' }, + ), + ).rejects.toThrow(Cloudflare.NotFoundError); + }); +}); diff --git a/tests/api-resources/workers/ai.test.ts b/tests/api-resources/workers/ai/ai.test.ts similarity index 100% rename from tests/api-resources/workers/ai.test.ts rename to tests/api-resources/workers/ai/ai.test.ts diff --git a/tests/api-resources/workers/ai/models/schema.test.ts b/tests/api-resources/workers/ai/models/schema.test.ts new file mode 100644 index 0000000000..0bac46b87b --- /dev/null +++ b/tests/api-resources/workers/ai/models/schema.test.ts @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource schema', () => { + test('get: only required params', async () => { + const responsePromise = cloudflare.workers.ai.models.schema.get({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + model: 'string', + }); + 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('get: required and optional params', async () => { + const response = await cloudflare.workers.ai.models.schema.get({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + model: 'string', + }); + }); +}); From c850009733c5773e09460d605f0f2c6a1f9e66e8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 07:53:12 +0000 Subject: [PATCH 295/473] feat(api): OpenAPI spec update via Stainless API (#792) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c10a59bb09..c59c4be91d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1338 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-563da3da7347fb7ce5676737cc6a457de5da7c96aa7d44098a9db3b2fb8d6599.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6537ce0cca2a8b4688b717abc1782d929fc949649130a34c7dd86031294f2810.yml From b3555377249030bf9598c3686e8e9b4015a3a07e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 09:03:23 +0000 Subject: [PATCH 296/473] feat(api): OpenAPI spec update via Stainless API (#793) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c59c4be91d..6744521cd5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1338 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6537ce0cca2a8b4688b717abc1782d929fc949649130a34c7dd86031294f2810.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-980ca1b5a0f22cdbb5a3645d7142164f008cdf7e70dfb6b53e9544f91e184fdd.yml From 0ca04d2233fbbb85b53a474669a260eb437a75c9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 09:23:49 +0000 Subject: [PATCH 297/473] feat(api): OpenAPI spec update via Stainless API (#794) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6744521cd5..fe7ec84965 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1338 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-980ca1b5a0f22cdbb5a3645d7142164f008cdf7e70dfb6b53e9544f91e184fdd.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b02b68427ca7af705b9f5f833944a4959877bb48cb88a7dc74dd8bfbf2d9a25a.yml From 2f0a4f2c9d14f66792db02cb2fb6afbc3b061498 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 09:42:59 +0000 Subject: [PATCH 298/473] feat(api): OpenAPI spec update via Stainless API (#795) --- .stats.yml | 2 +- src/resources/rulesets/phases/phases.ts | 5 ----- src/resources/rulesets/rulesets.ts | 5 ----- tests/api-resources/rulesets/phases/phases.test.ts | 1 - 4 files changed, 1 insertion(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index fe7ec84965..bf9ade0a89 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1338 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b02b68427ca7af705b9f5f833944a4959877bb48cb88a7dc74dd8bfbf2d9a25a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0ec270b3c03c21a8d2358f8bf7726d82da5aa7eda902b5df86220f550eac2c2e.yml diff --git a/src/resources/rulesets/phases/phases.ts b/src/resources/rulesets/phases/phases.ts index 6d5af19145..2a988702b9 100644 --- a/src/resources/rulesets/phases/phases.ts +++ b/src/resources/rulesets/phases/phases.ts @@ -717,11 +717,6 @@ export interface PhaseUpdateParams { * Body param: The human-readable name of the ruleset. */ name?: string; - - /** - * Body param: The phase of the ruleset. - */ - phase?: RulesetsAPI.PhaseParam; } export namespace PhaseUpdateParams { diff --git a/src/resources/rulesets/rulesets.ts b/src/resources/rulesets/rulesets.ts index 5b91cb15f2..f16596d2ec 100644 --- a/src/resources/rulesets/rulesets.ts +++ b/src/resources/rulesets/rulesets.ts @@ -294,11 +294,6 @@ export interface Ruleset { * The human-readable name of the ruleset. */ name?: string; - - /** - * The phase of the ruleset. - */ - phase?: Phase; } /** diff --git a/tests/api-resources/rulesets/phases/phases.test.ts b/tests/api-resources/rulesets/phases/phases.test.ts index 9b0485aa85..4f3b44e5e8 100644 --- a/tests/api-resources/rulesets/phases/phases.test.ts +++ b/tests/api-resources/rulesets/phases/phases.test.ts @@ -81,7 +81,6 @@ describe('resource phases', () => { account_id: 'string', description: 'My ruleset to execute managed rulesets', name: 'My ruleset', - phase: 'http_request_firewall_custom', }); }); From 8aea1086f7c648c53986497e2258e3eed806ea5b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 10:00:29 +0000 Subject: [PATCH 299/473] feat(api): OpenAPI spec update via Stainless API (#796) --- .stats.yml | 4 +- api.md | 5 - src/resources/zones/dns-settings.ts | 136 +----------------- src/resources/zones/index.ts | 8 +- src/resources/zones/zones.ts | 2 - .../api-resources/zones/dns-settings.test.ts | 61 -------- 6 files changed, 4 insertions(+), 212 deletions(-) delete mode 100644 tests/api-resources/zones/dns-settings.test.ts diff --git a/.stats.yml b/.stats.yml index bf9ade0a89..8670b1dd64 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1338 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0ec270b3c03c21a8d2358f8bf7726d82da5aa7eda902b5df86220f550eac2c2e.yml +configured_endpoints: 1336 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36b39384f5550979f973317bd71942fbae76ba2d7ee3aa70c7c0af16740916b2.yml diff --git a/api.md b/api.md index 1393887d66..031fd36509 100644 --- a/api.md +++ b/api.md @@ -270,11 +270,6 @@ Types: - DNSSetting - Nameserver -Methods: - -- client.zones.dnsSettings.edit({ ...params }) -> DNSSetting -- client.zones.dnsSettings.get({ ...params }) -> DNSSetting - ## Settings ### ZeroRTT diff --git a/src/resources/zones/dns-settings.ts b/src/resources/zones/dns-settings.ts index ccf677bf5a..a3806dfe82 100644 --- a/src/resources/zones/dns-settings.ts +++ b/src/resources/zones/dns-settings.ts @@ -1,32 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from '../../core'; import { APIResource } from '../../resource'; import * as DNSSettingsAPI from './dns-settings'; -export class DNSSettings extends APIResource { - /** - * Update DNS settings for a zone - */ - edit(params: DNSSettingEditParams, options?: Core.RequestOptions): Core.APIPromise { - const { zone_id, ...body } = params; - return ( - this._client.patch(`/zones/${zone_id}/dns_settings`, { body, ...options }) as Core.APIPromise<{ - result: DNSSetting; - }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Show DNS settings for a zone - */ - get(params: DNSSettingGetParams, options?: Core.RequestOptions): Core.APIPromise { - const { zone_id } = params; - return ( - this._client.get(`/zones/${zone_id}/dns_settings`, options) as Core.APIPromise<{ result: DNSSetting }> - )._thenUnwrap((obj) => obj.result); - } -} +export class DNSSettings extends APIResource {} export interface DNSSetting { /** @@ -124,118 +101,7 @@ export interface Nameserver { type: 'cloudflare.standard'; } -/** - * Settings determining the nameservers through which the zone should be available. - */ -export interface NameserverParam { - /** - * Nameserver type - */ - type: 'cloudflare.standard'; -} - -export interface DNSSettingEditParams { - /** - * Path param: Identifier - */ - zone_id: string; - - /** - * Body param: Whether to enable Foundation DNS Advanced Nameservers on the zone. - */ - foundation_dns?: boolean; - - /** - * Body param: Whether to enable multi-provider DNS, which causes Cloudflare to - * activate the zone even when non-Cloudflare NS records exist, and to respect NS - * records at the zone apex during outbound zone transfers. - */ - multi_provider?: boolean; - - /** - * Body param: Settings determining the nameservers through which the zone should - * be available. - */ - nameservers?: NameserverParam; - - /** - * Body param: The time to live (TTL) of the zone's nameserver (NS) records. - */ - ns_ttl?: number; - - /** - * Body param: Allows a Secondary DNS zone to use (proxied) override records and - * CNAME flattening at the zone apex. - */ - secondary_overrides?: boolean; - - /** - * Body param: Components of the zone's SOA record. - */ - soa?: DNSSettingEditParams.SOA; - - /** - * Body param: Whether the zone mode is a regular or CDN/DNS only zone. - */ - zone_mode?: 'standard' | 'cdn_only' | 'dns_only'; -} - -export namespace DNSSettingEditParams { - /** - * Components of the zone's SOA record. - */ - export interface SOA { - /** - * Time in seconds of being unable to query the primary server after which - * secondary servers should stop serving the zone. - */ - expire: number; - - /** - * The time to live (TTL) for negative caching of records within the zone. - */ - min_ttl: number; - - /** - * The primary nameserver, which may be used for outbound zone transfers. - */ - mname: string; - - /** - * Time in seconds after which secondary servers should re-check the SOA record to - * see if the zone has been updated. - */ - refresh: number; - - /** - * Time in seconds after which secondary servers should retry queries after the - * primary server was unresponsive. - */ - retry: number; - - /** - * The email address of the zone administrator, with the first label representing - * the local part of the email address. - */ - rname: string; - - /** - * The time to live (TTL) of the SOA record itself. - */ - ttl: number; - } -} - -export interface DNSSettingGetParams { - /** - * Identifier - */ - zone_id: string; -} - export namespace DNSSettings { export import DNSSetting = DNSSettingsAPI.DNSSetting; export import Nameserver = DNSSettingsAPI.Nameserver; - export import DNSSettingEditParams = DNSSettingsAPI.DNSSettingEditParams; - export import DNSSettingGetParams = DNSSettingsAPI.DNSSettingGetParams; } diff --git a/src/resources/zones/index.ts b/src/resources/zones/index.ts index 4ef10bef87..9a102069c9 100644 --- a/src/resources/zones/index.ts +++ b/src/resources/zones/index.ts @@ -12,13 +12,7 @@ export { CustomNameserverGetParams, CustomNameservers, } from './custom-nameservers'; -export { - DNSSetting, - Nameserver, - DNSSettingEditParams, - DNSSettingGetParams, - DNSSettings, -} from './dns-settings'; +export { DNSSetting, Nameserver, DNSSettings } from './dns-settings'; export { Settings } from './settings/index'; export { SubscriptionCreateResponse, diff --git a/src/resources/zones/zones.ts b/src/resources/zones/zones.ts index fe070e3b4e..b0e6c94bf3 100644 --- a/src/resources/zones/zones.ts +++ b/src/resources/zones/zones.ts @@ -404,8 +404,6 @@ export namespace Zones { export import DNSSettings = DNSSettingsAPI.DNSSettings; export import DNSSetting = DNSSettingsAPI.DNSSetting; export import Nameserver = DNSSettingsAPI.Nameserver; - export import DNSSettingEditParams = DNSSettingsAPI.DNSSettingEditParams; - export import DNSSettingGetParams = DNSSettingsAPI.DNSSettingGetParams; export import Settings = SettingsAPI.Settings; export import CustomNameservers = CustomNameserversAPI.CustomNameservers; export import CustomNameserverUpdateResponse = CustomNameserversAPI.CustomNameserverUpdateResponse; diff --git a/tests/api-resources/zones/dns-settings.test.ts b/tests/api-resources/zones/dns-settings.test.ts deleted file mode 100644 index ca11c478be..0000000000 --- a/tests/api-resources/zones/dns-settings.test.ts +++ /dev/null @@ -1,61 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import Cloudflare from 'cloudflare'; -import { Response } from 'node-fetch'; - -const cloudflare = new Cloudflare({ - apiKey: '144c9defac04969c7bfad8efaa8ea194', - apiEmail: 'user@example.com', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); - -describe('resource dnsSettings', () => { - test('edit: only required params', async () => { - const responsePromise = cloudflare.zones.dnsSettings.edit({ - zone_id: '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); - }); - - test('edit: required and optional params', async () => { - const response = await cloudflare.zones.dnsSettings.edit({ - zone_id: '023e105f4ecef8ad9ca31a8372d0c353', - foundation_dns: false, - multi_provider: false, - nameservers: { type: 'cloudflare.standard' }, - ns_ttl: 86400, - secondary_overrides: false, - soa: { - expire: 604800, - min_ttl: 1800, - mname: 'kristina.ns.cloudflare.com', - refresh: 10000, - retry: 2400, - rname: 'admin.example.com', - ttl: 3600, - }, - zone_mode: 'dns_only', - }); - }); - - test('get: only required params', async () => { - const responsePromise = cloudflare.zones.dnsSettings.get({ zone_id: '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); - }); - - test('get: required and optional params', async () => { - const response = await cloudflare.zones.dnsSettings.get({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }); - }); -}); From 330c67a9fb910fe5361012ccda9e0b1dc7a19c2d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 10:22:58 +0000 Subject: [PATCH 300/473] feat(api): OpenAPI spec update via Stainless API (#797) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8670b1dd64..385e5f005b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36b39384f5550979f973317bd71942fbae76ba2d7ee3aa70c7c0af16740916b2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2188e450fd8cb6ca4b1df88054b2a0a3543072a57eefcc5b36df6f2aa7427d1a.yml From 283b59e9d71bb941e35b973e47e073d251184e53 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 10:25:27 +0000 Subject: [PATCH 301/473] feat(api): OpenAPI spec update via Stainless API (#798) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 385e5f005b..8670b1dd64 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2188e450fd8cb6ca4b1df88054b2a0a3543072a57eefcc5b36df6f2aa7427d1a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36b39384f5550979f973317bd71942fbae76ba2d7ee3aa70c7c0af16740916b2.yml From ee28c7f0228b23e4ad6da89e90a37ce6cb02c6b0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 11:42:38 +0000 Subject: [PATCH 302/473] feat(api): OpenAPI spec update via Stainless API (#799) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8670b1dd64..25b22c0508 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36b39384f5550979f973317bd71942fbae76ba2d7ee3aa70c7c0af16740916b2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4e4e817eba08fb4827b9b553a56939fa973b1870780e33f42897910ff91fb7a7.yml From feab364827b3358d6c15d8ae052b6ca71e3340f6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 11:44:50 +0000 Subject: [PATCH 303/473] feat(api): OpenAPI spec update via Stainless API (#800) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 25b22c0508..8670b1dd64 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4e4e817eba08fb4827b9b553a56939fa973b1870780e33f42897910ff91fb7a7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36b39384f5550979f973317bd71942fbae76ba2d7ee3aa70c7c0af16740916b2.yml From dfeb4fed67c19d500873098df6210b883d41596f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 11:47:03 +0000 Subject: [PATCH 304/473] feat(api): OpenAPI spec update via Stainless API (#801) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8670b1dd64..25b22c0508 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36b39384f5550979f973317bd71942fbae76ba2d7ee3aa70c7c0af16740916b2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4e4e817eba08fb4827b9b553a56939fa973b1870780e33f42897910ff91fb7a7.yml From 5c73426414b4982776f41eaef41546c5ff9ef9bc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 12:15:11 +0000 Subject: [PATCH 305/473] feat(api): OpenAPI spec update via Stainless API (#802) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 25b22c0508..8670b1dd64 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4e4e817eba08fb4827b9b553a56939fa973b1870780e33f42897910ff91fb7a7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36b39384f5550979f973317bd71942fbae76ba2d7ee3aa70c7c0af16740916b2.yml From 0b8a56fa0cbf10ba6ea19fd27f434e2d3ffb37de Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 12:17:28 +0000 Subject: [PATCH 306/473] feat(api): OpenAPI spec update via Stainless API (#803) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8670b1dd64..25b22c0508 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36b39384f5550979f973317bd71942fbae76ba2d7ee3aa70c7c0af16740916b2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4e4e817eba08fb4827b9b553a56939fa973b1870780e33f42897910ff91fb7a7.yml From 07e234211780b4c2121555aa56136dbcb08208aa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 13:07:35 +0000 Subject: [PATCH 307/473] feat(api): OpenAPI spec update via Stainless API (#804) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 25b22c0508..8670b1dd64 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4e4e817eba08fb4827b9b553a56939fa973b1870780e33f42897910ff91fb7a7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36b39384f5550979f973317bd71942fbae76ba2d7ee3aa70c7c0af16740916b2.yml From ee86ba8c6557d1a48e2640e801c8a3cc9f984abf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 13:41:20 +0000 Subject: [PATCH 308/473] feat(api): OpenAPI spec update via Stainless API (#805) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8670b1dd64..5687d58b75 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36b39384f5550979f973317bd71942fbae76ba2d7ee3aa70c7c0af16740916b2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0c5150531151846d105d663c712d62adb98269c4cfe632cff01acd7d103d7ba6.yml From 35e79c76b76ca20270c469ec0e07668f3bfee204 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 14:51:47 +0000 Subject: [PATCH 309/473] feat(api): OpenAPI spec update via Stainless API (#806) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 5687d58b75..8bf8851fe9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0c5150531151846d105d663c712d62adb98269c4cfe632cff01acd7d103d7ba6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-55d5cd39348ff6d84361429d4573fb999f4d1328ec9130d5a0f7baee223caebf.yml From 3a9822fe040055085898f8ec5c9264660053bb5a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 15:05:43 +0000 Subject: [PATCH 310/473] feat(api): OpenAPI spec update via Stainless API (#807) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8bf8851fe9..f604cb48b5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-55d5cd39348ff6d84361429d4573fb999f4d1328ec9130d5a0f7baee223caebf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-93d5ac1d3a9df89b61082ce1c02f2fbc1bf8ab7ca5d63ae7d3b8521e82b4188c.yml From 088bcb542a76bd389637c901435df4be94d7816b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 15:07:56 +0000 Subject: [PATCH 311/473] feat(api): OpenAPI spec update via Stainless API (#808) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f604cb48b5..8bf8851fe9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-93d5ac1d3a9df89b61082ce1c02f2fbc1bf8ab7ca5d63ae7d3b8521e82b4188c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-55d5cd39348ff6d84361429d4573fb999f4d1328ec9130d5a0f7baee223caebf.yml From f7a87a21fc16a9d0ce153f75145d258d3ad01751 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 16:18:41 +0000 Subject: [PATCH 312/473] feat(api): OpenAPI spec update via Stainless API (#809) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8bf8851fe9..5aa7311c5e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-55d5cd39348ff6d84361429d4573fb999f4d1328ec9130d5a0f7baee223caebf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2a8a1caa6fe5f9470abfecdc44bec05bf438fd7e4a4a8278d5f262dabed78c3a.yml From a9da4a71dfc822fbbe57c9d120128b41e95347fd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 16:43:19 +0000 Subject: [PATCH 313/473] feat(api): OpenAPI spec update via Stainless API (#810) --- .stats.yml | 2 +- api.md | 13 +- src/resources/accounts/accounts.ts | 9 +- src/resources/accounts/index.ts | 5 +- src/resources/accounts/members.ts | 791 ++++++++++++++++--- src/resources/accounts/roles.ts | 2 +- src/resources/memberships.ts | 376 ++++++++- src/resources/shared.ts | 19 +- src/resources/user/index.ts | 1 - src/resources/user/invites.ts | 4 +- src/resources/user/organizations.ts | 4 +- src/resources/user/tokens/index.ts | 1 - src/resources/user/tokens/tokens.ts | 166 ++-- src/resources/user/user.ts | 5 +- tests/api-resources/accounts/members.test.ts | 5 - 15 files changed, 1195 insertions(+), 208 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5aa7311c5e..43ab45243c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2a8a1caa6fe5f9470abfecdc44bec05bf438fd7e4a4a8278d5f262dabed78c3a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dae61c40e8505c826e518a64122325c0e12c78fe44961c1ff6a1e281b7095be3.yml diff --git a/api.md b/api.md index 031fd36509..46b2fb9caf 100644 --- a/api.md +++ b/api.md @@ -40,16 +40,18 @@ Types: - Status - UserWithInviteCode -- MemberListResponse +- MemberCreateResponse +- MemberUpdateResponse - MemberDeleteResponse +- MemberGetResponse Methods: -- client.accounts.members.create({ ...params }) -> UserWithInviteCode -- client.accounts.members.update(memberId, { ...params }) -> Member -- client.accounts.members.list({ ...params }) -> MemberListResponsesV4PagePaginationArray +- client.accounts.members.create({ ...params }) -> MemberCreateResponse +- client.accounts.members.update(memberId, { ...params }) -> MemberUpdateResponse +- client.accounts.members.list({ ...params }) -> MembersV4PagePaginationArray - client.accounts.members.delete(memberId, { ...params }) -> MemberDeleteResponse | null -- client.accounts.members.get(memberId, { ...params }) -> Member +- client.accounts.members.get(memberId, { ...params }) -> MemberGetResponse ## Roles @@ -199,7 +201,6 @@ Methods: Types: - CIDRList -- Policy - Token - TokenCreateResponse - TokenUpdateResponse diff --git a/src/resources/accounts/accounts.ts b/src/resources/accounts/accounts.ts index 1d581596b1..d43722798d 100644 --- a/src/resources/accounts/accounts.ts +++ b/src/resources/accounts/accounts.ts @@ -116,11 +116,11 @@ export namespace Account { } } -export type AccountUpdateResponse = unknown | string | null; +export type AccountUpdateResponse = unknown; export type AccountListResponse = unknown; -export type AccountGetResponse = unknown | string | null; +export type AccountGetResponse = unknown; export interface AccountUpdateParams { /** @@ -194,9 +194,10 @@ export namespace Accounts { export import Members = MembersAPI.Members; export import Status = MembersAPI.Status; export import UserWithInviteCode = MembersAPI.UserWithInviteCode; - export import MemberListResponse = MembersAPI.MemberListResponse; + export import MemberCreateResponse = MembersAPI.MemberCreateResponse; + export import MemberUpdateResponse = MembersAPI.MemberUpdateResponse; export import MemberDeleteResponse = MembersAPI.MemberDeleteResponse; - export import MemberListResponsesV4PagePaginationArray = MembersAPI.MemberListResponsesV4PagePaginationArray; + export import MemberGetResponse = MembersAPI.MemberGetResponse; export import MemberCreateParams = MembersAPI.MemberCreateParams; export import MemberUpdateParams = MembersAPI.MemberUpdateParams; export import MemberListParams = MembersAPI.MemberListParams; diff --git a/src/resources/accounts/index.ts b/src/resources/accounts/index.ts index 5009288a07..f7902ad496 100644 --- a/src/resources/accounts/index.ts +++ b/src/resources/accounts/index.ts @@ -5,13 +5,14 @@ export { RoleGetResponse, RoleListParams, RoleGetParams, Roles } from './roles'; export { Status, UserWithInviteCode, - MemberListResponse, + MemberCreateResponse, + MemberUpdateResponse, MemberDeleteResponse, + MemberGetResponse, MemberCreateParams, MemberUpdateParams, MemberListParams, MemberDeleteParams, MemberGetParams, - MemberListResponsesV4PagePaginationArray, Members, } from './members'; diff --git a/src/resources/accounts/members.ts b/src/resources/accounts/members.ts index 3719cddcd2..baf2ae008b 100644 --- a/src/resources/accounts/members.ts +++ b/src/resources/accounts/members.ts @@ -4,19 +4,16 @@ import * as Core from '../../core'; import { APIResource } from '../../resource'; import * as MembersAPI from './members'; import * as Shared from '../shared'; -import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; +import { MembersV4PagePaginationArray } from '../shared'; +import { type V4PagePaginationArrayParams } from '../../pagination'; export class Members extends APIResource { /** * Add a user to the list of members for this account. */ - create(params: MemberCreateParams, options?: Core.RequestOptions): Core.APIPromise { + create(params: MemberCreateParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, ...body } = params; - return ( - this._client.post(`/accounts/${account_id}/members`, { body, ...options }) as Core.APIPromise<{ - result: UserWithInviteCode; - }> - )._thenUnwrap((obj) => obj.result); + return this._client.post(`/accounts/${account_id}/members`, { body, ...options }); } /** @@ -26,14 +23,9 @@ export class Members extends APIResource { memberId: string, params: MemberUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...body } = params; - return ( - this._client.put(`/accounts/${account_id}/members/${memberId}`, { - body, - ...options, - }) as Core.APIPromise<{ result: Shared.Member }> - )._thenUnwrap((obj) => obj.result); + return this._client.put(`/accounts/${account_id}/members/${memberId}`, { body, ...options }); } /** @@ -42,13 +34,12 @@ export class Members extends APIResource { list( params: MemberListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id, ...query } = params; - return this._client.getAPIList( - `/accounts/${account_id}/members`, - MemberListResponsesV4PagePaginationArray, - { query, ...options }, - ); + return this._client.getAPIList(`/accounts/${account_id}/members`, MembersV4PagePaginationArray, { + query, + ...options, + }); } /** @@ -74,20 +65,14 @@ export class Members extends APIResource { memberId: string, params: MemberGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; - return ( - this._client.get(`/accounts/${account_id}/members/${memberId}`, options) as Core.APIPromise<{ - result: Shared.Member; - }> - )._thenUnwrap((obj) => obj.result); + return this._client.get(`/accounts/${account_id}/members/${memberId}`, options); } } -export class MemberListResponsesV4PagePaginationArray extends V4PagePaginationArray {} - /** - * Whether the user is a member of the organization or has an inivitation pending. + * Whether the user is a member of the organization or has an invitation pending. */ export type Status = 'member' | 'invited'; @@ -95,21 +80,27 @@ export interface UserWithInviteCode { /** * Membership identifier tag. */ - id: string; + id?: string; /** - * Roles assigned to this member. + * The unique activation code for the account membership. */ - roles: Array; + code?: string; - status: unknown; + /** + * Roles assigned to this member. + */ + roles?: Array; - user: UserWithInviteCode.User; + /** + * A member's status in the account. + */ + status?: 'accepted' | 'pending'; /** - * The unique activation code for the account membership. + * Details of the user associated to the membership. */ - code?: string; + user?: UserWithInviteCode.User; } export namespace UserWithInviteCode { @@ -160,6 +151,9 @@ export namespace UserWithInviteCode { } } + /** + * Details of the user associated to the membership. + */ export interface User { /** * The contact email address of the user. @@ -189,31 +183,350 @@ export namespace UserWithInviteCode { } } -export interface MemberListResponse { - /** - * Identifier - */ - id: string; +export type MemberCreateResponse = + | MemberCreateResponse.IamAPIResponseCommon + | MemberCreateResponse.IamAPIResponseCommon; - /** - * The contact email address of the user. - */ - email: string; +export namespace MemberCreateResponse { + export interface IamAPIResponseCommon { + result?: Shared.Member; + } - /** - * Member Name. - */ - name: string | null; + export interface IamAPIResponseCommon { + result?: IamAPIResponseCommon.Result; + } - /** - * Roles assigned to this Member. - */ - roles: Array; + export namespace IamAPIResponseCommon { + export interface Result { + /** + * Membership identifier tag. + */ + id?: string; + + /** + * Access policy for the membership + */ + policies?: Array; + + /** + * Roles assigned to this Member. + */ + roles?: Array; + + /** + * A member's status in the account. + */ + status?: 'accepted' | 'pending'; + + /** + * Details of the user associated to the membership. + */ + user?: Result.User; + } - /** - * A member's status in the organization. - */ - status: 'accepted' | 'invited'; + export namespace Result { + export interface Policy { + /** + * Policy identifier. + */ + id?: string; + + /** + * Allow or deny operations against the resources. + */ + access?: 'allow' | 'deny'; + + /** + * A set of permission groups that are specified to the policy. + */ + permission_groups?: Array; + + /** + * A list of resource groups that the policy applies to. + */ + resource_groups?: Array; + } + + export namespace Policy { + /** + * A named group of permissions that map to a group of operations against + * resources. + */ + export interface PermissionGroup { + /** + * Identifier of the group. + */ + id: string; + + /** + * Name of the group. + */ + name?: string; + } + + /** + * A group of scoped resources. + */ + export interface ResourceGroup { + /** + * Identifier of the group. + */ + id: string; + + /** + * Attributes associated to the resource group. + */ + meta?: unknown; + + /** + * Name of the resource group. + */ + name?: string; + + /** + * The scope associated to the resource group + */ + scope?: Array; + } + + export namespace ResourceGroup { + /** + * A scope is a combination of scope objects which provides additional context. + */ + export interface Scope { + /** + * This is a combination of pre-defined resource name and identifier (like Account + * ID etc.) + */ + key: string; + + /** + * A list of scope objects for additional context. + */ + objects: Array; + } + + export namespace Scope { + /** + * A scope object represents any resource that can have actions applied against + * invite. + */ + export interface Object { + /** + * This is a combination of pre-defined resource name and identifier (like Account + * ID etc.) + */ + key: string; + } + } + } + } + + /** + * Details of the user associated to the membership. + */ + export interface User { + /** + * The contact email address of the user. + */ + email: string; + + /** + * Identifier + */ + id?: string; + + /** + * User's first name + */ + first_name?: string | null; + + /** + * User's last name + */ + last_name?: string | null; + + /** + * Indicates whether two-factor authentication is enabled for the user account. + * Does not apply to API authentication. + */ + two_factor_authentication_enabled?: boolean; + } + } + } +} + +export type MemberUpdateResponse = + | MemberUpdateResponse.IamAPIResponseCommon + | MemberUpdateResponse.IamAPIResponseCommon; + +export namespace MemberUpdateResponse { + export interface IamAPIResponseCommon { + result?: Shared.Member; + } + + export interface IamAPIResponseCommon { + result?: IamAPIResponseCommon.Result; + } + + export namespace IamAPIResponseCommon { + export interface Result { + /** + * Membership identifier tag. + */ + id?: string; + + /** + * Access policy for the membership + */ + policies?: Array; + + /** + * Roles assigned to this Member. + */ + roles?: Array; + + /** + * A member's status in the account. + */ + status?: 'accepted' | 'pending'; + + /** + * Details of the user associated to the membership. + */ + user?: Result.User; + } + + export namespace Result { + export interface Policy { + /** + * Policy identifier. + */ + id?: string; + + /** + * Allow or deny operations against the resources. + */ + access?: 'allow' | 'deny'; + + /** + * A set of permission groups that are specified to the policy. + */ + permission_groups?: Array; + + /** + * A list of resource groups that the policy applies to. + */ + resource_groups?: Array; + } + + export namespace Policy { + /** + * A named group of permissions that map to a group of operations against + * resources. + */ + export interface PermissionGroup { + /** + * Identifier of the group. + */ + id: string; + + /** + * Name of the group. + */ + name?: string; + } + + /** + * A group of scoped resources. + */ + export interface ResourceGroup { + /** + * Identifier of the group. + */ + id: string; + + /** + * Attributes associated to the resource group. + */ + meta?: unknown; + + /** + * Name of the resource group. + */ + name?: string; + + /** + * The scope associated to the resource group + */ + scope?: Array; + } + + export namespace ResourceGroup { + /** + * A scope is a combination of scope objects which provides additional context. + */ + export interface Scope { + /** + * This is a combination of pre-defined resource name and identifier (like Account + * ID etc.) + */ + key: string; + + /** + * A list of scope objects for additional context. + */ + objects: Array; + } + + export namespace Scope { + /** + * A scope object represents any resource that can have actions applied against + * invite. + */ + export interface Object { + /** + * This is a combination of pre-defined resource name and identifier (like Account + * ID etc.) + */ + key: string; + } + } + } + } + + /** + * Details of the user associated to the membership. + */ + export interface User { + /** + * The contact email address of the user. + */ + email: string; + + /** + * Identifier + */ + id?: string; + + /** + * User's first name + */ + first_name?: string | null; + + /** + * User's last name + */ + last_name?: string | null; + + /** + * Indicates whether two-factor authentication is enabled for the user account. + * Does not apply to API authentication. + */ + two_factor_authentication_enabled?: boolean; + } + } + } } export interface MemberDeleteResponse { @@ -223,46 +536,345 @@ export interface MemberDeleteResponse { id: string; } -export interface MemberCreateParams { - /** - * Path param: - */ - account_id: string; +export type MemberGetResponse = + | MemberGetResponse.IamAPIResponseCommon + | MemberGetResponse.IamAPIResponseCommon; - /** - * Body param: The contact email address of the user. - */ - email: string; +export namespace MemberGetResponse { + export interface IamAPIResponseCommon { + result?: Shared.Member; + } - /** - * Body param: Array of roles associated with this member. - */ - roles: Array; + export interface IamAPIResponseCommon { + result?: IamAPIResponseCommon.Result; + } - /** - * Body param: - */ - status?: 'accepted' | 'pending'; + export namespace IamAPIResponseCommon { + export interface Result { + /** + * Membership identifier tag. + */ + id?: string; + + /** + * Access policy for the membership + */ + policies?: Array; + + /** + * Roles assigned to this Member. + */ + roles?: Array; + + /** + * A member's status in the account. + */ + status?: 'accepted' | 'pending'; + + /** + * Details of the user associated to the membership. + */ + user?: Result.User; + } + + export namespace Result { + export interface Policy { + /** + * Policy identifier. + */ + id?: string; + + /** + * Allow or deny operations against the resources. + */ + access?: 'allow' | 'deny'; + + /** + * A set of permission groups that are specified to the policy. + */ + permission_groups?: Array; + + /** + * A list of resource groups that the policy applies to. + */ + resource_groups?: Array; + } + + export namespace Policy { + /** + * A named group of permissions that map to a group of operations against + * resources. + */ + export interface PermissionGroup { + /** + * Identifier of the group. + */ + id: string; + + /** + * Name of the group. + */ + name?: string; + } + + /** + * A group of scoped resources. + */ + export interface ResourceGroup { + /** + * Identifier of the group. + */ + id: string; + + /** + * Attributes associated to the resource group. + */ + meta?: unknown; + + /** + * Name of the resource group. + */ + name?: string; + + /** + * The scope associated to the resource group + */ + scope?: Array; + } + + export namespace ResourceGroup { + /** + * A scope is a combination of scope objects which provides additional context. + */ + export interface Scope { + /** + * This is a combination of pre-defined resource name and identifier (like Account + * ID etc.) + */ + key: string; + + /** + * A list of scope objects for additional context. + */ + objects: Array; + } + + export namespace Scope { + /** + * A scope object represents any resource that can have actions applied against + * invite. + */ + export interface Object { + /** + * This is a combination of pre-defined resource name and identifier (like Account + * ID etc.) + */ + key: string; + } + } + } + } + + /** + * Details of the user associated to the membership. + */ + export interface User { + /** + * The contact email address of the user. + */ + email: string; + + /** + * Identifier + */ + id?: string; + + /** + * User's first name + */ + first_name?: string | null; + + /** + * User's last name + */ + last_name?: string | null; + + /** + * Indicates whether two-factor authentication is enabled for the user account. + * Does not apply to API authentication. + */ + two_factor_authentication_enabled?: boolean; + } + } + } } -export interface MemberUpdateParams { - /** - * Path param: - */ - account_id: string; +export type MemberCreateParams = + | MemberCreateParams.IamCreateMemberWithRoles + | MemberCreateParams.IamCreateMemberWithPolicies; - /** - * Body param: Roles assigned to this member. - */ - roles: Array; +export namespace MemberCreateParams { + export interface IamCreateMemberWithRoles { + /** + * Path param: + */ + account_id: string; + + /** + * Body param: The contact email address of the user. + */ + email: string; + + /** + * Body param: Array of roles associated with this member. + */ + roles: Array; + + /** + * Body param: + */ + status?: 'accepted' | 'pending'; + } + + export interface IamCreateMemberWithPolicies { + /** + * Path param: + */ + account_id: string; + + /** + * Body param: The contact email address of the user. + */ + email: string; + + /** + * Body param: Array of policies associated with this member. + */ + policies: Array; + + /** + * Body param: + */ + status?: 'accepted' | 'pending'; + } + + export namespace IamCreateMemberWithPolicies { + export interface Policy { + /** + * Allow or deny operations against the resources. + */ + access: 'allow' | 'deny'; + + /** + * A set of permission groups that are specified to the policy. + */ + permission_groups: Array; + + /** + * A list of resource groups that the policy applies to. + */ + resource_groups: Array; + } + + export namespace Policy { + /** + * A group of permissions. + */ + export interface PermissionGroup { + /** + * Identifier of the group. + */ + id: string; + } + + /** + * A group of scoped resources. + */ + export interface ResourceGroup { + /** + * Identifier of the group. + */ + id: string; + } + } + } } +export type MemberUpdateParams = MemberUpdateParams.Member | MemberUpdateParams.IamUpdateMemberWithPolicies; + export namespace MemberUpdateParams { - export interface Role { + export interface Member { /** - * Role identifier tag. + * Path param: */ - id: string; + account_id: string; + + /** + * Body param: Roles assigned to this member. + */ + roles?: Array; + } + + export namespace Member { + export interface Role { + /** + * Role identifier tag. + */ + id: string; + } + } + + export interface IamUpdateMemberWithPolicies { + /** + * Path param: + */ + account_id: string; + + /** + * Body param: Array of policies associated with this member. + */ + policies: Array; + } + + export namespace IamUpdateMemberWithPolicies { + export interface Policy { + /** + * Allow or deny operations against the resources. + */ + access: 'allow' | 'deny'; + + /** + * A set of permission groups that are specified to the policy. + */ + permission_groups: Array; + + /** + * A list of resource groups that the policy applies to. + */ + resource_groups: Array; + } + + export namespace Policy { + /** + * A group of permissions. + */ + export interface PermissionGroup { + /** + * Identifier of the group. + */ + id: string; + } + + /** + * A group of scoped resources. + */ + export interface ResourceGroup { + /** + * Identifier of the group. + */ + id: string; + } + } } } @@ -299,12 +911,15 @@ export interface MemberGetParams { export namespace Members { export import Status = MembersAPI.Status; export import UserWithInviteCode = MembersAPI.UserWithInviteCode; - export import MemberListResponse = MembersAPI.MemberListResponse; + export import MemberCreateResponse = MembersAPI.MemberCreateResponse; + export import MemberUpdateResponse = MembersAPI.MemberUpdateResponse; export import MemberDeleteResponse = MembersAPI.MemberDeleteResponse; - export import MemberListResponsesV4PagePaginationArray = MembersAPI.MemberListResponsesV4PagePaginationArray; + export import MemberGetResponse = MembersAPI.MemberGetResponse; export import MemberCreateParams = MembersAPI.MemberCreateParams; export import MemberUpdateParams = MembersAPI.MemberUpdateParams; export import MemberListParams = MembersAPI.MemberListParams; export import MemberDeleteParams = MembersAPI.MemberDeleteParams; export import MemberGetParams = MembersAPI.MemberGetParams; } + +export { MembersV4PagePaginationArray }; diff --git a/src/resources/accounts/roles.ts b/src/resources/accounts/roles.ts index 9f4b48c80f..5165f4ac44 100644 --- a/src/resources/accounts/roles.ts +++ b/src/resources/accounts/roles.ts @@ -35,7 +35,7 @@ export class Roles extends APIResource { } } -export type RoleGetResponse = unknown | string | null; +export type RoleGetResponse = unknown; export interface RoleListParams { account_id: string; diff --git a/src/resources/memberships.ts b/src/resources/memberships.ts index 530f3ce5cc..914b83cab3 100644 --- a/src/resources/memberships.ts +++ b/src/resources/memberships.ts @@ -3,6 +3,7 @@ import * as Core from '../core'; import { APIResource } from '../resource'; import { isRequestOptions } from '../core'; +import * as MembershipsAPI from './memberships'; import * as Shared from './shared'; import * as AccountsAPI from './accounts/accounts'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../pagination'; @@ -16,11 +17,7 @@ export class Memberships extends APIResource { body: MembershipUpdateParams, options?: Core.RequestOptions, ): Core.APIPromise { - return ( - this._client.put(`/memberships/${membershipId}`, { body, ...options }) as Core.APIPromise<{ - result: MembershipUpdateResponse; - }> - )._thenUnwrap((obj) => obj.result); + return this._client.put(`/memberships/${membershipId}`, { body, ...options }); } /** @@ -56,11 +53,7 @@ export class Memberships extends APIResource { * Get a specific membership. */ get(membershipId: string, options?: Core.RequestOptions): Core.APIPromise { - return ( - this._client.get(`/memberships/${membershipId}`, options) as Core.APIPromise<{ - result: MembershipGetResponse; - }> - )._thenUnwrap((obj) => obj.result); + return this._client.get(`/memberships/${membershipId}`, options); } } @@ -80,11 +73,6 @@ export interface Membership { */ api_access_enabled?: boolean | null; - /** - * The unique activation code for the account membership. - */ - code?: string; - /** * All access permissions for the user at the account. */ @@ -132,7 +120,184 @@ export namespace Membership { } } -export type MembershipUpdateResponse = unknown | string | null; +export type MembershipUpdateResponse = + | MembershipUpdateResponse.IamAPIResponseCommon + | MembershipUpdateResponse.IamAPIResponseCommon; + +export namespace MembershipUpdateResponse { + export interface IamAPIResponseCommon { + result?: MembershipsAPI.Membership; + } + + export interface IamAPIResponseCommon { + result?: IamAPIResponseCommon.Result; + } + + export namespace IamAPIResponseCommon { + export interface Result { + /** + * Membership identifier tag. + */ + id?: string; + + account?: AccountsAPI.Account; + + /** + * Enterprise only. Indicates whether or not API access is enabled specifically for + * this user on a given account. + */ + api_access_enabled?: boolean | null; + + /** + * All access permissions for the user at the account. + */ + permissions?: Result.Permissions; + + /** + * Access policy for the membership + */ + policies?: Array; + + /** + * List of role names for the user at the account. + */ + roles?: Array; + + /** + * Status of this membership. + */ + status?: 'accepted' | 'pending' | 'rejected'; + } + + export namespace Result { + /** + * All access permissions for the user at the account. + */ + export interface Permissions { + analytics?: Shared.PermissionGrant; + + billing?: Shared.PermissionGrant; + + cache_purge?: Shared.PermissionGrant; + + dns?: Shared.PermissionGrant; + + dns_records?: Shared.PermissionGrant; + + lb?: Shared.PermissionGrant; + + logs?: Shared.PermissionGrant; + + organization?: Shared.PermissionGrant; + + ssl?: Shared.PermissionGrant; + + waf?: Shared.PermissionGrant; + + zone_settings?: Shared.PermissionGrant; + + zones?: Shared.PermissionGrant; + } + + export interface Policy { + /** + * Policy identifier. + */ + id?: string; + + /** + * Allow or deny operations against the resources. + */ + access?: 'allow' | 'deny'; + + /** + * A set of permission groups that are specified to the policy. + */ + permission_groups?: Array; + + /** + * A list of resource groups that the policy applies to. + */ + resource_groups?: Array; + } + + export namespace Policy { + /** + * A named group of permissions that map to a group of operations against + * resources. + */ + export interface PermissionGroup { + /** + * Identifier of the group. + */ + id: string; + + /** + * Name of the group. + */ + name?: string; + } + + /** + * A group of scoped resources. + */ + export interface ResourceGroup { + /** + * Identifier of the group. + */ + id: string; + + /** + * Attributes associated to the resource group. + */ + meta?: unknown; + + /** + * Name of the resource group. + */ + name?: string; + + /** + * The scope associated to the resource group + */ + scope?: Array; + } + + export namespace ResourceGroup { + /** + * A scope is a combination of scope objects which provides additional context. + */ + export interface Scope { + /** + * This is a combination of pre-defined resource name and identifier (like Account + * ID etc.) + */ + key: string; + + /** + * A list of scope objects for additional context. + */ + objects: Array; + } + + export namespace Scope { + /** + * A scope object represents any resource that can have actions applied against + * invite. + */ + export interface Object { + /** + * This is a combination of pre-defined resource name and identifier (like Account + * ID etc.) + */ + key: string; + } + } + } + } + } + } +} export interface MembershipDeleteResponse { /** @@ -141,7 +306,184 @@ export interface MembershipDeleteResponse { id?: string; } -export type MembershipGetResponse = unknown | string | null; +export type MembershipGetResponse = + | MembershipGetResponse.IamAPIResponseCommon + | MembershipGetResponse.IamAPIResponseCommon; + +export namespace MembershipGetResponse { + export interface IamAPIResponseCommon { + result?: MembershipsAPI.Membership; + } + + export interface IamAPIResponseCommon { + result?: IamAPIResponseCommon.Result; + } + + export namespace IamAPIResponseCommon { + export interface Result { + /** + * Membership identifier tag. + */ + id?: string; + + account?: AccountsAPI.Account; + + /** + * Enterprise only. Indicates whether or not API access is enabled specifically for + * this user on a given account. + */ + api_access_enabled?: boolean | null; + + /** + * All access permissions for the user at the account. + */ + permissions?: Result.Permissions; + + /** + * Access policy for the membership + */ + policies?: Array; + + /** + * List of role names for the user at the account. + */ + roles?: Array; + + /** + * Status of this membership. + */ + status?: 'accepted' | 'pending' | 'rejected'; + } + + export namespace Result { + /** + * All access permissions for the user at the account. + */ + export interface Permissions { + analytics?: Shared.PermissionGrant; + + billing?: Shared.PermissionGrant; + + cache_purge?: Shared.PermissionGrant; + + dns?: Shared.PermissionGrant; + + dns_records?: Shared.PermissionGrant; + + lb?: Shared.PermissionGrant; + + logs?: Shared.PermissionGrant; + + organization?: Shared.PermissionGrant; + + ssl?: Shared.PermissionGrant; + + waf?: Shared.PermissionGrant; + + zone_settings?: Shared.PermissionGrant; + + zones?: Shared.PermissionGrant; + } + + export interface Policy { + /** + * Policy identifier. + */ + id?: string; + + /** + * Allow or deny operations against the resources. + */ + access?: 'allow' | 'deny'; + + /** + * A set of permission groups that are specified to the policy. + */ + permission_groups?: Array; + + /** + * A list of resource groups that the policy applies to. + */ + resource_groups?: Array; + } + + export namespace Policy { + /** + * A named group of permissions that map to a group of operations against + * resources. + */ + export interface PermissionGroup { + /** + * Identifier of the group. + */ + id: string; + + /** + * Name of the group. + */ + name?: string; + } + + /** + * A group of scoped resources. + */ + export interface ResourceGroup { + /** + * Identifier of the group. + */ + id: string; + + /** + * Attributes associated to the resource group. + */ + meta?: unknown; + + /** + * Name of the resource group. + */ + name?: string; + + /** + * The scope associated to the resource group + */ + scope?: Array; + } + + export namespace ResourceGroup { + /** + * A scope is a combination of scope objects which provides additional context. + */ + export interface Scope { + /** + * This is a combination of pre-defined resource name and identifier (like Account + * ID etc.) + */ + key: string; + + /** + * A list of scope objects for additional context. + */ + objects: Array; + } + + export namespace Scope { + /** + * A scope object represents any resource that can have actions applied against + * invite. + */ + export interface Object { + /** + * This is a combination of pre-defined resource name and identifier (like Account + * ID etc.) + */ + key: string; + } + } + } + } + } + } +} export interface MembershipUpdateParams { /** diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 5cc66b3e7f..0d358f8384 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -271,16 +271,22 @@ export interface Member { /** * Membership identifier tag. */ - id: string; + id?: string; /** * Roles assigned to this member. */ - roles: Array; + roles?: Array; - status: unknown; + /** + * A member's status in the account. + */ + status?: 'accepted' | 'pending'; - user: Member.User; + /** + * Details of the user associated to the membership. + */ + user?: Member.User; } export namespace Member { @@ -331,6 +337,9 @@ export namespace Member { } } + /** + * Details of the user associated to the membership. + */ export interface User { /** * The contact email address of the user. @@ -459,6 +468,8 @@ export type SortDirection = 'asc' | 'desc'; */ export type SortDirectionParam = 'asc' | 'desc'; +export class MembersV4PagePaginationArray extends V4PagePaginationArray {} + export class RolesSinglePage extends SinglePage {} export class AuditLogsV4PagePaginationArray extends V4PagePaginationArray {} diff --git a/src/resources/user/index.ts b/src/resources/user/index.ts index 9e6f89fc0a..79ce45de57 100644 --- a/src/resources/user/index.ts +++ b/src/resources/user/index.ts @@ -4,7 +4,6 @@ export { AuditLogListParams, AuditLogs } from './audit-logs'; export { Billing } from './billing/index'; export { CIDRList, - Policy, Token, TokenCreateResponse, TokenUpdateResponse, diff --git a/src/resources/user/invites.ts b/src/resources/user/invites.ts index 9d9309f7d0..67c2baa7ac 100644 --- a/src/resources/user/invites.ts +++ b/src/resources/user/invites.ts @@ -93,9 +93,9 @@ export interface Invite { status?: 'pending' | 'accepted' | 'rejected' | 'expired'; } -export type InviteEditResponse = unknown | string | null; +export type InviteEditResponse = unknown; -export type InviteGetResponse = unknown | string | null; +export type InviteGetResponse = unknown; export interface InviteEditParams { /** diff --git a/src/resources/user/organizations.ts b/src/resources/user/organizations.ts index 37a77ab176..ab06489e50 100644 --- a/src/resources/user/organizations.ts +++ b/src/resources/user/organizations.ts @@ -73,7 +73,7 @@ export interface Organization { roles?: Array; /** - * Whether the user is a member of the organization or has an inivitation pending. + * Whether the user is a member of the organization or has an invitation pending. */ status?: MembersAPI.Status; } @@ -85,7 +85,7 @@ export interface OrganizationDeleteResponse { id?: string; } -export type OrganizationGetResponse = unknown | string | null; +export type OrganizationGetResponse = unknown; export interface OrganizationListParams extends V4PagePaginationArrayParams { /** diff --git a/src/resources/user/tokens/index.ts b/src/resources/user/tokens/index.ts index 120c42ef41..aaae5582a7 100644 --- a/src/resources/user/tokens/index.ts +++ b/src/resources/user/tokens/index.ts @@ -2,7 +2,6 @@ export { CIDRList, - Policy, Token, TokenCreateResponse, TokenUpdateResponse, diff --git a/src/resources/user/tokens/tokens.ts b/src/resources/user/tokens/tokens.ts index 40c3aaeef3..4890c38767 100644 --- a/src/resources/user/tokens/tokens.ts +++ b/src/resources/user/tokens/tokens.ts @@ -105,71 +105,6 @@ export type CIDRList = string; */ export type CIDRListParam = string; -export interface Policy { - /** - * Policy identifier. - */ - id: string; - - /** - * Allow or deny operations against the resources. - */ - effect: 'allow' | 'deny'; - - /** - * A set of permission groups that are specified to the policy. - */ - permission_groups: Array; - - /** - * A list of resource names that the policy applies to. - */ - resources: unknown; -} - -export namespace Policy { - /** - * A named group of permissions that map to a group of operations against - * resources. - */ - export interface PermissionGroup { - /** - * Identifier of the group. - */ - id: string; - - /** - * Name of the group. - */ - name?: string; - } -} - -export interface PolicyParam { - /** - * Allow or deny operations against the resources. - */ - effect: 'allow' | 'deny'; - - /** - * A set of permission groups that are specified to the policy. - */ - permission_groups: Array; - - /** - * A list of resource names that the policy applies to. - */ - resources: unknown; -} - -export namespace PolicyParam { - /** - * A named group of permissions that map to a group of operations against - * resources. - */ - export interface PermissionGroup {} -} - export interface Token { /** * Token identifier tag. @@ -184,7 +119,7 @@ export interface Token { /** * List of access policies assigned to the token. */ - policies: Array; + policies: Array; /** * Status of the token. @@ -216,6 +151,46 @@ export interface Token { } export namespace Token { + export interface Policy { + /** + * Policy identifier. + */ + id: string; + + /** + * Allow or deny operations against the resources. + */ + effect: 'allow' | 'deny'; + + /** + * A set of permission groups that are specified to the policy. + */ + permission_groups: Array; + + /** + * A list of resource names that the policy applies to. + */ + resources: unknown; + } + + export namespace Policy { + /** + * A named group of permissions that map to a group of operations against + * resources. + */ + export interface PermissionGroup { + /** + * Identifier of the group. + */ + id: string; + + /** + * Name of the group. + */ + name?: string; + } + } + export interface Condition { /** * Client IP restrictions. @@ -248,7 +223,7 @@ export interface TokenCreateResponse { value?: ValueAPI.Value; } -export type TokenUpdateResponse = unknown | string | null; +export type TokenUpdateResponse = unknown; export type TokenListResponse = unknown; @@ -259,7 +234,7 @@ export interface TokenDeleteResponse { id: string; } -export type TokenGetResponse = unknown | string | null; +export type TokenGetResponse = unknown; export interface TokenVerifyResponse { /** @@ -293,7 +268,7 @@ export interface TokenCreateParams { /** * List of access policies assigned to the token. */ - policies: Array; + policies: Array; condition?: TokenCreateParams.Condition; @@ -310,6 +285,31 @@ export interface TokenCreateParams { } export namespace TokenCreateParams { + export interface Policy { + /** + * Allow or deny operations against the resources. + */ + effect: 'allow' | 'deny'; + + /** + * A set of permission groups that are specified to the policy. + */ + permission_groups: Array; + + /** + * A list of resource names that the policy applies to. + */ + resources: unknown; + } + + export namespace Policy { + /** + * A named group of permissions that map to a group of operations against + * resources. + */ + export interface PermissionGroup {} + } + export interface Condition { /** * Client IP restrictions. @@ -344,7 +344,7 @@ export interface TokenUpdateParams { /** * List of access policies assigned to the token. */ - policies: Array; + policies: Array; /** * Status of the token. @@ -366,6 +366,31 @@ export interface TokenUpdateParams { } export namespace TokenUpdateParams { + export interface Policy { + /** + * Allow or deny operations against the resources. + */ + effect: 'allow' | 'deny'; + + /** + * A set of permission groups that are specified to the policy. + */ + permission_groups: Array; + + /** + * A list of resource names that the policy applies to. + */ + resources: unknown; + } + + export namespace Policy { + /** + * A named group of permissions that map to a group of operations against + * resources. + */ + export interface PermissionGroup {} + } + export interface Condition { /** * Client IP restrictions. @@ -400,7 +425,6 @@ export interface TokenListParams extends V4PagePaginationArrayParams { export namespace Tokens { export import CIDRList = TokensAPI.CIDRList; - export import Policy = TokensAPI.Policy; export import Token = TokensAPI.Token; export import TokenCreateResponse = TokensAPI.TokenCreateResponse; export import TokenUpdateResponse = TokensAPI.TokenUpdateResponse; diff --git a/src/resources/user/user.ts b/src/resources/user/user.ts index f3c4872fda..16e40e715d 100644 --- a/src/resources/user/user.ts +++ b/src/resources/user/user.ts @@ -36,9 +36,9 @@ export class User extends APIResource { } } -export type UserEditResponse = unknown | string | null; +export type UserEditResponse = unknown; -export type UserGetResponse = unknown | string | null; +export type UserGetResponse = unknown; export interface UserEditParams { /** @@ -96,7 +96,6 @@ export namespace User { export import SubscriptionEditParams = SubscriptionsAPI.SubscriptionEditParams; export import Tokens = TokensAPI.Tokens; export import CIDRList = TokensAPI.CIDRList; - export import Policy = TokensAPI.Policy; export import Token = TokensAPI.Token; export import TokenCreateResponse = TokensAPI.TokenCreateResponse; export import TokenUpdateResponse = TokensAPI.TokenUpdateResponse; diff --git a/tests/api-resources/accounts/members.test.ts b/tests/api-resources/accounts/members.test.ts index e5d6befc46..3a7def315c 100644 --- a/tests/api-resources/accounts/members.test.ts +++ b/tests/api-resources/accounts/members.test.ts @@ -46,11 +46,6 @@ describe('resource members', () => { test.skip('update: only required params', async () => { const responsePromise = cloudflare.accounts.members.update('4536bcfad5faccb111b47003c79917fa', { account_id: 'string', - roles: [ - { id: '3536bcfad5faccb999b47003c79917fb' }, - { id: '3536bcfad5faccb999b47003c79917fb' }, - { id: '3536bcfad5faccb999b47003c79917fb' }, - ], }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); From 7a88a2468a7c308166649b556d53afb2a78b687c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 16:53:19 +0000 Subject: [PATCH 314/473] feat(api): OpenAPI spec update via Stainless API (#811) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 43ab45243c..feabb37aca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dae61c40e8505c826e518a64122325c0e12c78fe44961c1ff6a1e281b7095be3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-aae6ca53fe907112bf8cdbfa9d98476947ade2b9edc12746b59afbdc64c7df5d.yml From 2a4636216955bf8ebbb422f1e439c6905e47a6ea Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 17:10:59 +0000 Subject: [PATCH 315/473] feat(api): OpenAPI spec update via Stainless API (#812) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index feabb37aca..1e6f112cc7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-aae6ca53fe907112bf8cdbfa9d98476947ade2b9edc12746b59afbdc64c7df5d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4992ff415e7c422b2b42f20ca3878860ea8d391b0bfde1b1b72adb858a383c17.yml From 89dc0aa5dcfcb9a93f8d867c8af45bd1986ca54a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 17:43:42 +0000 Subject: [PATCH 316/473] feat(api): OpenAPI spec update via Stainless API (#813) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1e6f112cc7..f5f614db49 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4992ff415e7c422b2b42f20ca3878860ea8d391b0bfde1b1b72adb858a383c17.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f2571965a066e5ec176e3f8cb83d9cbf8889e42380a250bad505db2d18a4a772.yml From d07e6037fd753ed105cadd82fc755edca267b4d8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 17:45:53 +0000 Subject: [PATCH 317/473] feat(api): OpenAPI spec update via Stainless API (#814) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f5f614db49..1e6f112cc7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f2571965a066e5ec176e3f8cb83d9cbf8889e42380a250bad505db2d18a4a772.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4992ff415e7c422b2b42f20ca3878860ea8d391b0bfde1b1b72adb858a383c17.yml From 270127bb90da45c43f407590fe31ac84cc63c7f9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 17:54:47 +0000 Subject: [PATCH 318/473] feat(api): OpenAPI spec update via Stainless API (#815) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1e6f112cc7..f5f614db49 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4992ff415e7c422b2b42f20ca3878860ea8d391b0bfde1b1b72adb858a383c17.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f2571965a066e5ec176e3f8cb83d9cbf8889e42380a250bad505db2d18a4a772.yml From 3a76a957002e4ff90e310a56b1bd390b225f35eb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 17:57:00 +0000 Subject: [PATCH 319/473] feat(api): OpenAPI spec update via Stainless API (#816) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f5f614db49..feabb37aca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f2571965a066e5ec176e3f8cb83d9cbf8889e42380a250bad505db2d18a4a772.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-aae6ca53fe907112bf8cdbfa9d98476947ade2b9edc12746b59afbdc64c7df5d.yml From 678c0756ca5737211b1f5f3ca8cef46392ee0407 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 17:59:19 +0000 Subject: [PATCH 320/473] feat(api): OpenAPI spec update via Stainless API (#817) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index feabb37aca..f5f614db49 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-aae6ca53fe907112bf8cdbfa9d98476947ade2b9edc12746b59afbdc64c7df5d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f2571965a066e5ec176e3f8cb83d9cbf8889e42380a250bad505db2d18a4a772.yml From f15d3aec29f860cc8ba805948625a4a911ba3aaa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 19:38:19 +0000 Subject: [PATCH 321/473] feat(api): OpenAPI spec update via Stainless API (#818) --- .stats.yml | 2 +- src/resources/shared.ts | 2 +- src/resources/warp-connector.ts | 19 ++++++++++++++----- src/resources/zero-trust/tunnels/tunnels.ts | 13 +++++++++++-- tests/api-resources/warp-connector.test.ts | 1 + .../zero-trust/tunnels/tunnels.test.ts | 1 + 6 files changed, 29 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index f5f614db49..1635b8c85a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f2571965a066e5ec176e3f8cb83d9cbf8889e42380a250bad505db2d18a4a772.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6a077023d5a748c646073f33bc20264fc7235f7fe9ce157d1f50f9914a3927e1.yml diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 0d358f8384..baf31c70fb 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -190,7 +190,7 @@ export interface CloudflareTunnel { * state), `healthy` (tunnel is active and able to serve traffic), or `down` * (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). */ - status?: string; + status?: 'inactive' | 'degraded' | 'healthy' | 'down'; /** * The type of tunnel. diff --git a/src/resources/warp-connector.ts b/src/resources/warp-connector.ts index 371a307516..488d74b752 100644 --- a/src/resources/warp-connector.ts +++ b/src/resources/warp-connector.ts @@ -172,7 +172,7 @@ export namespace WARPConnectorCreateResponse { * state), `healthy` (tunnel is active and able to serve traffic), or `down` * (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). */ - status?: string; + status?: 'inactive' | 'degraded' | 'healthy' | 'down'; /** * The type of tunnel. @@ -294,7 +294,7 @@ export namespace WARPConnectorListResponse { * state), `healthy` (tunnel is active and able to serve traffic), or `down` * (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). */ - status?: string; + status?: 'inactive' | 'degraded' | 'healthy' | 'down'; /** * The type of tunnel. @@ -416,7 +416,7 @@ export namespace WARPConnectorDeleteResponse { * state), `healthy` (tunnel is active and able to serve traffic), or `down` * (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). */ - status?: string; + status?: 'inactive' | 'degraded' | 'healthy' | 'down'; /** * The type of tunnel. @@ -538,7 +538,7 @@ export namespace WARPConnectorEditResponse { * state), `healthy` (tunnel is active and able to serve traffic), or `down` * (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). */ - status?: string; + status?: 'inactive' | 'degraded' | 'healthy' | 'down'; /** * The type of tunnel. @@ -660,7 +660,7 @@ export namespace WARPConnectorGetResponse { * state), `healthy` (tunnel is active and able to serve traffic), or `down` * (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). */ - status?: string; + status?: 'inactive' | 'degraded' | 'healthy' | 'down'; /** * The type of tunnel. @@ -763,6 +763,15 @@ export interface WARPConnectorListParams extends V4PagePaginationArrayParams { */ name?: string; + /** + * Query param: The status of the tunnel. Valid values are `inactive` (tunnel has + * never been run), `degraded` (tunnel is active and able to serve traffic but in + * an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or + * `down` (tunnel can not serve traffic as it has no connections to the Cloudflare + * Edge). + */ + status?: 'inactive' | 'degraded' | 'healthy' | 'down'; + /** * Query param: UUID of the tunnel. */ diff --git a/src/resources/zero-trust/tunnels/tunnels.ts b/src/resources/zero-trust/tunnels/tunnels.ts index 2d85ecbfe3..69b7c5a3c9 100644 --- a/src/resources/zero-trust/tunnels/tunnels.ts +++ b/src/resources/zero-trust/tunnels/tunnels.ts @@ -209,7 +209,7 @@ export namespace TunnelListResponse { * state), `healthy` (tunnel is active and able to serve traffic), or `down` * (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). */ - status?: string; + status?: 'inactive' | 'degraded' | 'healthy' | 'down'; /** * The type of tunnel. @@ -357,7 +357,7 @@ export namespace TunnelEditResponse { * state), `healthy` (tunnel is active and able to serve traffic), or `down` * (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). */ - status?: string; + status?: 'inactive' | 'degraded' | 'healthy' | 'down'; /** * The type of tunnel. @@ -492,6 +492,15 @@ export interface TunnelListParams extends V4PagePaginationArrayParams { */ name?: string; + /** + * Query param: The status of the tunnel. Valid values are `inactive` (tunnel has + * never been run), `degraded` (tunnel is active and able to serve traffic but in + * an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or + * `down` (tunnel can not serve traffic as it has no connections to the Cloudflare + * Edge). + */ + status?: 'inactive' | 'degraded' | 'healthy' | 'down'; + /** * Query param: The types of tunnels to filter separated by a comma. */ diff --git a/tests/api-resources/warp-connector.test.ts b/tests/api-resources/warp-connector.test.ts index 9884a80e1f..f28ffdfba2 100644 --- a/tests/api-resources/warp-connector.test.ts +++ b/tests/api-resources/warp-connector.test.ts @@ -52,6 +52,7 @@ describe('resource warpConnector', () => { name: 'blog', page: 1, per_page: 1, + status: 'healthy', uuid: 'f70ff985-a4ef-4643-bbbc-4a0ed4fc8415', was_active_at: '2009-11-10T23:00:00Z', was_inactive_at: '2009-11-10T23:00:00Z', diff --git a/tests/api-resources/zero-trust/tunnels/tunnels.test.ts b/tests/api-resources/zero-trust/tunnels/tunnels.test.ts index a9d2d389e9..681ec6d857 100644 --- a/tests/api-resources/zero-trust/tunnels/tunnels.test.ts +++ b/tests/api-resources/zero-trust/tunnels/tunnels.test.ts @@ -56,6 +56,7 @@ describe('resource tunnels', () => { name: 'blog', page: 1, per_page: 1, + status: 'healthy', tun_types: 'cfd_tunnel,warp_connector', uuid: 'f70ff985-a4ef-4643-bbbc-4a0ed4fc8415', was_active_at: '2009-11-10T23:00:00Z', From 2d334920e512e3234265e738543f5b3d3bf213f1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 19:47:01 +0000 Subject: [PATCH 322/473] feat(api): OpenAPI spec update via Stainless API (#819) --- .stats.yml | 2 +- api.md | 2 +- .../zero-trust/access/logs/access-requests.ts | 33 +++++++++++++++---- .../access/logs/access-requests.test.ts | 4 +++ 4 files changed, 33 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1635b8c85a..9e4464c0c5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6a077023d5a748c646073f33bc20264fc7235f7fe9ce157d1f50f9914a3927e1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bc197b361ec3d5030fd853cb37172adbed55aa014ca7a5ac89fb498a88a8e5cb.yml diff --git a/api.md b/api.md index 46b2fb9caf..627609dee8 100644 --- a/api.md +++ b/api.md @@ -4800,7 +4800,7 @@ Types: Methods: -- client.zeroTrust.access.logs.accessRequests.list({ ...params }) -> AccessRequestListResponse | null +- client.zeroTrust.access.logs.accessRequests.list({ ...params }) -> AccessRequestListResponse ### Users diff --git a/src/resources/zero-trust/access/logs/access-requests.ts b/src/resources/zero-trust/access/logs/access-requests.ts index cb33e40c30..13d30fdd25 100644 --- a/src/resources/zero-trust/access/logs/access-requests.ts +++ b/src/resources/zero-trust/access/logs/access-requests.ts @@ -11,12 +11,13 @@ export class AccessRequests extends APIResource { list( params: AccessRequestListParams, options?: Core.RequestOptions, - ): Core.APIPromise { - const { account_id } = params; + ): Core.APIPromise { + const { account_id, ...query } = params; return ( - this._client.get(`/accounts/${account_id}/access/logs/access_requests`, options) as Core.APIPromise<{ - result: AccessRequestListResponse | null; - }> + this._client.get(`/accounts/${account_id}/access/logs/access_requests`, { + query, + ...options, + }) as Core.APIPromise<{ result: AccessRequestListResponse }> )._thenUnwrap((obj) => obj.result); } } @@ -69,9 +70,29 @@ export type AccessRequestListResponse = Array; export interface AccessRequestListParams { /** - * Identifier + * Path param: Identifier */ account_id: string; + + /** + * Query param: The chronological sorting order for the logs. + */ + direction?: 'desc' | 'asc'; + + /** + * Query param: The maximum number of log entries to retrieve. + */ + limit?: number; + + /** + * Query param: The earliest event timestamp to query. + */ + since?: string; + + /** + * Query param: The latest event timestamp to query. + */ + until?: string; } export namespace AccessRequests { diff --git a/tests/api-resources/zero-trust/access/logs/access-requests.test.ts b/tests/api-resources/zero-trust/access/logs/access-requests.test.ts index 7e68ae2985..be35847664 100644 --- a/tests/api-resources/zero-trust/access/logs/access-requests.test.ts +++ b/tests/api-resources/zero-trust/access/logs/access-requests.test.ts @@ -26,6 +26,10 @@ describe('resource accessRequests', () => { test('list: required and optional params', async () => { const response = await cloudflare.zeroTrust.access.logs.accessRequests.list({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', + direction: 'desc', + limit: 0, + since: '2020-07-01T05:20:00Z', + until: '2020-10-01T05:20:00Z', }); }); }); From 42bd0a111f47d2483d05f87494178e473f641c70 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 20:02:36 +0000 Subject: [PATCH 323/473] feat(api): OpenAPI spec update via Stainless API (#820) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9e4464c0c5..5cc013e4dc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bc197b361ec3d5030fd853cb37172adbed55aa014ca7a5ac89fb498a88a8e5cb.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efdb1c15faba015f2904e7db0946e71b5bd84a6e4b96256aed210e7e0113cf17.yml From bb3457c2509eea96ce11ec44d4bab92e9bf1bc08 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 20:24:51 +0000 Subject: [PATCH 324/473] feat(api): OpenAPI spec update via Stainless API (#821) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 5cc013e4dc..c32afbab59 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efdb1c15faba015f2904e7db0946e71b5bd84a6e4b96256aed210e7e0113cf17.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7d5c5ef81ab6fb46d0069fbaee2804fb9260e09c325145e407c67613ba76732f.yml From e0e343f249f306de180f993df0961d64d33b64d2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 20:27:09 +0000 Subject: [PATCH 325/473] feat(api): OpenAPI spec update via Stainless API (#822) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c32afbab59..5cc013e4dc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7d5c5ef81ab6fb46d0069fbaee2804fb9260e09c325145e407c67613ba76732f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efdb1c15faba015f2904e7db0946e71b5bd84a6e4b96256aed210e7e0113cf17.yml From c04bccb7d785447c1b680d555f3eb517374e90d6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 23:21:30 +0000 Subject: [PATCH 326/473] feat(api): update via SDK Studio (#823) --- .stats.yml | 2 +- api.md | 39 +- src/resources/dns/dns.ts | 9 + src/resources/dns/index.ts | 9 + src/resources/dns/settings.ts | 314 +++++++++ src/resources/zero-trust/access/access.ts | 14 + src/resources/zero-trust/access/index.ts | 14 + src/resources/zero-trust/access/policies.ts | 599 ++++++++++++++++++ src/resources/zones/dns-settings.ts | 107 ---- src/resources/zones/index.ts | 1 - src/resources/zones/zones.ts | 5 - tests/api-resources/dns/settings.test.ts | 34 + .../zero-trust/access/policies.test.ts | 197 ++++++ 13 files changed, 1223 insertions(+), 121 deletions(-) create mode 100644 src/resources/dns/settings.ts create mode 100644 src/resources/zero-trust/access/policies.ts delete mode 100644 src/resources/zones/dns-settings.ts create mode 100644 tests/api-resources/dns/settings.test.ts create mode 100644 tests/api-resources/zero-trust/access/policies.test.ts diff --git a/.stats.yml b/.stats.yml index 5cc013e4dc..563ec8b4af 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1336 +configured_endpoints: 1343 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efdb1c15faba015f2904e7db0946e71b5bd84a6e4b96256aed210e7e0113cf17.yml diff --git a/api.md b/api.md index 627609dee8..bb5cf9c693 100644 --- a/api.md +++ b/api.md @@ -264,13 +264,6 @@ Methods: - client.zones.activationCheck.trigger({ ...params }) -> ActivationCheckTriggerResponse -## DNSSettings - -Types: - -- DNSSetting -- Nameserver - ## Settings ### ZeroRTT @@ -1414,6 +1407,20 @@ Methods: - client.dns.records.import({ ...params }) -> RecordImportResponse - client.dns.records.scan({ ...params }) -> RecordScanResponse +## Settings + +Types: + +- DNSSetting +- Nameserver +- SettingEditResponse +- SettingGetResponse + +Methods: + +- client.dns.settings.edit({ ...params }) -> SettingEditResponse +- client.dns.settings.get({ ...params }) -> SettingGetResponse + ## Analytics ### Reports @@ -4875,6 +4882,24 @@ Methods: - client.zeroTrust.access.tags.delete(tagName, { ...params }) -> TagDeleteResponse - client.zeroTrust.access.tags.get(tagName, { ...params }) -> Tag +### Policies + +Types: + +- PolicyCreateResponse +- PolicyUpdateResponse +- PolicyListResponse +- PolicyDeleteResponse +- PolicyGetResponse + +Methods: + +- client.zeroTrust.access.policies.create({ ...params }) -> PolicyCreateResponse +- client.zeroTrust.access.policies.update(policyId, { ...params }) -> PolicyUpdateResponse +- client.zeroTrust.access.policies.list({ ...params }) -> PolicyListResponsesSinglePage +- client.zeroTrust.access.policies.delete(policyId, { ...params }) -> PolicyDeleteResponse +- client.zeroTrust.access.policies.get(policyId, { ...params }) -> PolicyGetResponse + ## DEX Types: diff --git a/src/resources/dns/dns.ts b/src/resources/dns/dns.ts index adda2d0f8e..727b7f505f 100644 --- a/src/resources/dns/dns.ts +++ b/src/resources/dns/dns.ts @@ -2,12 +2,14 @@ import { APIResource } from '../../resource'; import * as RecordsAPI from './records'; +import * as SettingsAPI from './settings'; import * as AnalyticsAPI from './analytics/analytics'; import * as FirewallAPI from './firewall/firewall'; import * as AnalyticsAnalyticsAPI from './firewall/analytics/analytics'; export class DNS extends APIResource { records: RecordsAPI.Records = new RecordsAPI.Records(this._client); + settings: SettingsAPI.Settings = new SettingsAPI.Settings(this._client); analytics: AnalyticsAPI.Analytics = new AnalyticsAPI.Analytics(this._client); firewall: FirewallAPI.FirewallResource = new FirewallAPI.FirewallResource(this._client); } @@ -101,6 +103,13 @@ export namespace DNS { export import RecordGetParams = RecordsAPI.RecordGetParams; export import RecordImportParams = RecordsAPI.RecordImportParams; export import RecordScanParams = RecordsAPI.RecordScanParams; + export import Settings = SettingsAPI.Settings; + export import DNSSetting = SettingsAPI.DNSSetting; + export import Nameserver = SettingsAPI.Nameserver; + export import SettingEditResponse = SettingsAPI.SettingEditResponse; + export import SettingGetResponse = SettingsAPI.SettingGetResponse; + export import SettingEditParams = SettingsAPI.SettingEditParams; + export import SettingGetParams = SettingsAPI.SettingGetParams; export import Analytics = AnalyticsAPI.Analytics; export import FirewallResource = FirewallAPI.FirewallResource; export import AttackMitigation = FirewallAPI.AttackMitigation; diff --git a/src/resources/dns/index.ts b/src/resources/dns/index.ts index d5aacc7178..1081c10eb5 100644 --- a/src/resources/dns/index.ts +++ b/src/resources/dns/index.ts @@ -58,3 +58,12 @@ export { FirewallResource, } from './firewall/index'; export { DNS } from './dns'; +export { + DNSSetting, + Nameserver, + SettingEditResponse, + SettingGetResponse, + SettingEditParams, + SettingGetParams, + Settings, +} from './settings'; diff --git a/src/resources/dns/settings.ts b/src/resources/dns/settings.ts new file mode 100644 index 0000000000..e076e84e63 --- /dev/null +++ b/src/resources/dns/settings.ts @@ -0,0 +1,314 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../core'; +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import { CloudflareError } from '../../error'; +import * as SettingsAPI from './settings'; + +export class Settings extends APIResource { + /** + * Update DNS settings for an account or zone + */ + edit(params: SettingEditParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id, zone_id, ...body } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.patch(`/${accountOrZone}/${accountOrZoneId}/dns_settings`, { + body, + ...options, + }) as Core.APIPromise<{ result: SettingEditResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Show DNS settings for an account or zone + */ + get(params?: SettingGetParams, options?: Core.RequestOptions): Core.APIPromise; + get(options?: Core.RequestOptions): Core.APIPromise; + get( + params: SettingGetParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(params)) { + return this.get({}, params); + } + const { account_id, zone_id } = params; + if (!account_id && !zone_id) { + throw new CloudflareError('You must provide either account_id or zone_id.'); + } + if (account_id && zone_id) { + throw new CloudflareError('You cannot provide both account_id and zone_id.'); + } + const { accountOrZone, accountOrZoneId } = + account_id ? + { + accountOrZone: 'accounts', + accountOrZoneId: account_id, + } + : { + accountOrZone: 'zones', + accountOrZoneId: zone_id, + }; + return ( + this._client.get(`/${accountOrZone}/${accountOrZoneId}/dns_settings`, options) as Core.APIPromise<{ + result: SettingGetResponse; + }> + )._thenUnwrap((obj) => obj.result); + } +} + +export interface DNSSetting { + /** + * Whether to enable Foundation DNS Advanced Nameservers on the zone. + */ + foundation_dns?: boolean; + + /** + * Whether to enable multi-provider DNS, which causes Cloudflare to activate the + * zone even when non-Cloudflare NS records exist, and to respect NS records at the + * zone apex during outbound zone transfers. + */ + multi_provider?: boolean; + + /** + * Settings determining the nameservers through which the zone should be available. + */ + nameservers?: Nameserver; + + /** + * The time to live (TTL) of the zone's nameserver (NS) records. + */ + ns_ttl?: number; + + /** + * Allows a Secondary DNS zone to use (proxied) override records and CNAME + * flattening at the zone apex. + */ + secondary_overrides?: boolean; + + /** + * Components of the zone's SOA record. + */ + soa?: DNSSetting.SOA; + + /** + * Whether the zone mode is a regular or CDN/DNS only zone. + */ + zone_mode?: 'standard' | 'cdn_only' | 'dns_only'; +} + +export namespace DNSSetting { + /** + * Components of the zone's SOA record. + */ + export interface SOA { + /** + * Time in seconds of being unable to query the primary server after which + * secondary servers should stop serving the zone. + */ + expire: number; + + /** + * The time to live (TTL) for negative caching of records within the zone. + */ + min_ttl: number; + + /** + * The primary nameserver, which may be used for outbound zone transfers. + */ + mname: string; + + /** + * Time in seconds after which secondary servers should re-check the SOA record to + * see if the zone has been updated. + */ + refresh: number; + + /** + * Time in seconds after which secondary servers should retry queries after the + * primary server was unresponsive. + */ + retry: number; + + /** + * The email address of the zone administrator, with the first label representing + * the local part of the email address. + */ + rname: string; + + /** + * The time to live (TTL) of the SOA record itself. + */ + ttl: number; + } +} + +export interface DNSSettingParam { + /** + * Whether to enable Foundation DNS Advanced Nameservers on the zone. + */ + foundation_dns?: boolean; + + /** + * Whether to enable multi-provider DNS, which causes Cloudflare to activate the + * zone even when non-Cloudflare NS records exist, and to respect NS records at the + * zone apex during outbound zone transfers. + */ + multi_provider?: boolean; + + /** + * Settings determining the nameservers through which the zone should be available. + */ + nameservers?: NameserverParam; + + /** + * The time to live (TTL) of the zone's nameserver (NS) records. + */ + ns_ttl?: number; + + /** + * Allows a Secondary DNS zone to use (proxied) override records and CNAME + * flattening at the zone apex. + */ + secondary_overrides?: boolean; + + /** + * Components of the zone's SOA record. + */ + soa?: DNSSettingParam.SOA; + + /** + * Whether the zone mode is a regular or CDN/DNS only zone. + */ + zone_mode?: 'standard' | 'cdn_only' | 'dns_only'; +} + +export namespace DNSSettingParam { + /** + * Components of the zone's SOA record. + */ + export interface SOA { + /** + * Time in seconds of being unable to query the primary server after which + * secondary servers should stop serving the zone. + */ + expire: number; + + /** + * The time to live (TTL) for negative caching of records within the zone. + */ + min_ttl: number; + + /** + * The primary nameserver, which may be used for outbound zone transfers. + */ + mname: string; + + /** + * Time in seconds after which secondary servers should re-check the SOA record to + * see if the zone has been updated. + */ + refresh: number; + + /** + * Time in seconds after which secondary servers should retry queries after the + * primary server was unresponsive. + */ + retry: number; + + /** + * The email address of the zone administrator, with the first label representing + * the local part of the email address. + */ + rname: string; + + /** + * The time to live (TTL) of the SOA record itself. + */ + ttl: number; + } +} + +/** + * Settings determining the nameservers through which the zone should be available. + */ +export interface Nameserver { + /** + * Nameserver type + */ + type: 'cloudflare.standard'; +} + +/** + * Settings determining the nameservers through which the zone should be available. + */ +export interface NameserverParam { + /** + * Nameserver type + */ + type: 'cloudflare.standard'; +} + +export interface SettingEditResponse { + zone_defaults?: DNSSetting; +} + +export interface SettingGetResponse { + zone_defaults?: DNSSetting; +} + +export interface SettingEditParams { + /** + * Path param: The Account ID to use for this endpoint. Mutually exclusive with the + * Zone ID. + */ + account_id?: string; + + /** + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. + */ + zone_id?: string; + + /** + * Body param: + */ + zone_defaults?: DNSSettingParam; +} + +export interface SettingGetParams { + /** + * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + */ + account_id?: string; + + /** + * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + */ + zone_id?: string; +} + +export namespace Settings { + export import DNSSetting = SettingsAPI.DNSSetting; + export import Nameserver = SettingsAPI.Nameserver; + export import SettingEditResponse = SettingsAPI.SettingEditResponse; + export import SettingGetResponse = SettingsAPI.SettingGetResponse; + export import SettingEditParams = SettingsAPI.SettingEditParams; + export import SettingGetParams = SettingsAPI.SettingGetParams; +} diff --git a/src/resources/zero-trust/access/access.ts b/src/resources/zero-trust/access/access.ts index b0a817d781..8b4f72c7ef 100644 --- a/src/resources/zero-trust/access/access.ts +++ b/src/resources/zero-trust/access/access.ts @@ -6,6 +6,7 @@ import * as BookmarksAPI from './bookmarks'; import * as CustomPagesAPI from './custom-pages'; import * as GroupsAPI from './groups'; import * as KeysAPI from './keys'; +import * as PoliciesAPI from './policies'; import * as ServiceTokensAPI from './service-tokens'; import * as TagsAPI from './tags'; import * as ApplicationsAPI from './applications/applications'; @@ -24,6 +25,7 @@ export class Access extends APIResource { users: UsersAPI.Users = new UsersAPI.Users(this._client); customPages: CustomPagesAPI.CustomPages = new CustomPagesAPI.CustomPages(this._client); tags: TagsAPI.Tags = new TagsAPI.Tags(this._client); + policies: PoliciesAPI.Policies = new PoliciesAPI.Policies(this._client); } /** @@ -824,4 +826,16 @@ export namespace Access { export import TagListParams = TagsAPI.TagListParams; export import TagDeleteParams = TagsAPI.TagDeleteParams; export import TagGetParams = TagsAPI.TagGetParams; + export import Policies = PoliciesAPI.Policies; + export import PolicyCreateResponse = PoliciesAPI.PolicyCreateResponse; + export import PolicyUpdateResponse = PoliciesAPI.PolicyUpdateResponse; + export import PolicyListResponse = PoliciesAPI.PolicyListResponse; + export import PolicyDeleteResponse = PoliciesAPI.PolicyDeleteResponse; + export import PolicyGetResponse = PoliciesAPI.PolicyGetResponse; + export import PolicyListResponsesSinglePage = PoliciesAPI.PolicyListResponsesSinglePage; + export import PolicyCreateParams = PoliciesAPI.PolicyCreateParams; + export import PolicyUpdateParams = PoliciesAPI.PolicyUpdateParams; + export import PolicyListParams = PoliciesAPI.PolicyListParams; + export import PolicyDeleteParams = PoliciesAPI.PolicyDeleteParams; + export import PolicyGetParams = PoliciesAPI.PolicyGetParams; } diff --git a/src/resources/zero-trust/access/index.ts b/src/resources/zero-trust/access/index.ts index 3998f345b4..245c27d7e2 100644 --- a/src/resources/zero-trust/access/index.ts +++ b/src/resources/zero-trust/access/index.ts @@ -99,6 +99,20 @@ export { Keys, } from './keys'; export { Logs } from './logs/index'; +export { + PolicyCreateResponse, + PolicyUpdateResponse, + PolicyListResponse, + PolicyDeleteResponse, + PolicyGetResponse, + PolicyCreateParams, + PolicyUpdateParams, + PolicyListParams, + PolicyDeleteParams, + PolicyGetParams, + PolicyListResponsesSinglePage, + Policies, +} from './policies'; export { ServiceToken, ServiceTokenCreateResponse, diff --git a/src/resources/zero-trust/access/policies.ts b/src/resources/zero-trust/access/policies.ts new file mode 100644 index 0000000000..a64044f869 --- /dev/null +++ b/src/resources/zero-trust/access/policies.ts @@ -0,0 +1,599 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as Core from '../../../core'; +import { APIResource } from '../../../resource'; +import * as PoliciesAPI from './policies'; +import * as AccessAPI from './access'; +import * as ApplicationsAPI from './applications/applications'; +import * as ApplicationsPoliciesAPI from './applications/policies'; +import { SinglePage } from '../../../pagination'; + +export class Policies extends APIResource { + /** + * Creates a new Access reusable policy. + */ + create(params: PolicyCreateParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.post(`/accounts/${account_id}/access/policies`, { body, ...options }) as Core.APIPromise<{ + result: PolicyCreateResponse; + }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Updates a Access reusable policy. + */ + update( + policyId: string, + params: PolicyUpdateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.put(`/accounts/${account_id}/access/policies/${policyId}`, { + body, + ...options, + }) as Core.APIPromise<{ result: PolicyUpdateResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Lists Access reusable policies. + */ + list( + params: PolicyListParams, + options?: Core.RequestOptions, + ): Core.PagePromise { + const { account_id } = params; + return this._client.getAPIList( + `/accounts/${account_id}/access/policies`, + PolicyListResponsesSinglePage, + options, + ); + } + + /** + * Deletes an Access reusable policy. + */ + delete( + policyId: string, + params: PolicyDeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.delete(`/accounts/${account_id}/access/policies/${policyId}`, options) as Core.APIPromise<{ + result: PolicyDeleteResponse; + }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Fetches a single Access reusable policy. + */ + get( + policyId: string, + params: PolicyGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.get(`/accounts/${account_id}/access/policies/${policyId}`, options) as Core.APIPromise<{ + result: PolicyGetResponse; + }> + )._thenUnwrap((obj) => obj.result); + } +} + +export class PolicyListResponsesSinglePage extends SinglePage {} + +export interface PolicyCreateResponse { + /** + * The UUID of the policy + */ + id?: string; + + /** + * Number of access applications currently using this policy. + */ + app_count?: number; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: ApplicationsAPI.Decision; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + reusable?: true; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; +} + +export interface PolicyUpdateResponse { + /** + * The UUID of the policy + */ + id?: string; + + /** + * Number of access applications currently using this policy. + */ + app_count?: number; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: ApplicationsAPI.Decision; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + reusable?: true; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; +} + +export interface PolicyListResponse { + /** + * The UUID of the policy + */ + id?: string; + + /** + * Number of access applications currently using this policy. + */ + app_count?: number; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: ApplicationsAPI.Decision; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + reusable?: true; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; +} + +export interface PolicyDeleteResponse { + /** + * The UUID of the policy + */ + id?: string; +} + +export interface PolicyGetResponse { + /** + * The UUID of the policy + */ + id?: string; + + /** + * Number of access applications currently using this policy. + */ + app_count?: number; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. + */ + decision?: ApplicationsAPI.Decision; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + reusable?: true; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; +} + +export interface PolicyCreateParams { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: The action Access will take if a user matches this policy. + */ + decision: ApplicationsAPI.DecisionParam; + + /** + * Body param: Rules evaluated with an OR logical operator. A user needs to meet + * only one of the Include rules. + */ + include: Array; + + /** + * Body param: The name of the Access policy. + */ + name: string; + + /** + * Body param: Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Body param: Requires the user to request access from an administrator at the + * start of each session. + */ + approval_required?: boolean; + + /** + * Body param: Rules evaluated with a NOT logical operator. To match the policy, a + * user cannot meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Body param: Require this application to be served in an isolated browser for + * users matching this policy. 'Client Web Isolation' must be on for the account in + * order to use this feature. + */ + isolation_required?: boolean; + + /** + * Body param: A custom message that will appear on the purpose justification + * screen. + */ + purpose_justification_prompt?: string; + + /** + * Body param: Require users to enter a justification when they log in to the + * application. + */ + purpose_justification_required?: boolean; + + /** + * Body param: Rules evaluated with an AND logical operator. To match the policy, a + * user must meet all of the Require rules. + */ + require?: Array; + + /** + * Body param: The amount of time that tokens issued for the application will be + * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us + * (or µs), ms, s, m, h. + */ + session_duration?: string; +} + +export interface PolicyUpdateParams { + /** + * Path param: Identifier + */ + account_id: string; + + /** + * Body param: The action Access will take if a user matches this policy. + */ + decision: ApplicationsAPI.DecisionParam; + + /** + * Body param: Rules evaluated with an OR logical operator. A user needs to meet + * only one of the Include rules. + */ + include: Array; + + /** + * Body param: The name of the Access policy. + */ + name: string; + + /** + * Body param: Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Body param: Requires the user to request access from an administrator at the + * start of each session. + */ + approval_required?: boolean; + + /** + * Body param: Rules evaluated with a NOT logical operator. To match the policy, a + * user cannot meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Body param: Require this application to be served in an isolated browser for + * users matching this policy. 'Client Web Isolation' must be on for the account in + * order to use this feature. + */ + isolation_required?: boolean; + + /** + * Body param: A custom message that will appear on the purpose justification + * screen. + */ + purpose_justification_prompt?: string; + + /** + * Body param: Require users to enter a justification when they log in to the + * application. + */ + purpose_justification_required?: boolean; + + /** + * Body param: Rules evaluated with an AND logical operator. To match the policy, a + * user must meet all of the Require rules. + */ + require?: Array; + + /** + * Body param: The amount of time that tokens issued for the application will be + * valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us + * (or µs), ms, s, m, h. + */ + session_duration?: string; +} + +export interface PolicyListParams { + /** + * Identifier + */ + account_id: string; +} + +export interface PolicyDeleteParams { + /** + * Identifier + */ + account_id: string; +} + +export interface PolicyGetParams { + /** + * Identifier + */ + account_id: string; +} + +export namespace Policies { + export import PolicyCreateResponse = PoliciesAPI.PolicyCreateResponse; + export import PolicyUpdateResponse = PoliciesAPI.PolicyUpdateResponse; + export import PolicyListResponse = PoliciesAPI.PolicyListResponse; + export import PolicyDeleteResponse = PoliciesAPI.PolicyDeleteResponse; + export import PolicyGetResponse = PoliciesAPI.PolicyGetResponse; + export import PolicyListResponsesSinglePage = PoliciesAPI.PolicyListResponsesSinglePage; + export import PolicyCreateParams = PoliciesAPI.PolicyCreateParams; + export import PolicyUpdateParams = PoliciesAPI.PolicyUpdateParams; + export import PolicyListParams = PoliciesAPI.PolicyListParams; + export import PolicyDeleteParams = PoliciesAPI.PolicyDeleteParams; + export import PolicyGetParams = PoliciesAPI.PolicyGetParams; +} diff --git a/src/resources/zones/dns-settings.ts b/src/resources/zones/dns-settings.ts deleted file mode 100644 index a3806dfe82..0000000000 --- a/src/resources/zones/dns-settings.ts +++ /dev/null @@ -1,107 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../resource'; -import * as DNSSettingsAPI from './dns-settings'; - -export class DNSSettings extends APIResource {} - -export interface DNSSetting { - /** - * Whether to enable Foundation DNS Advanced Nameservers on the zone. - */ - foundation_dns?: boolean; - - /** - * Whether to enable multi-provider DNS, which causes Cloudflare to activate the - * zone even when non-Cloudflare NS records exist, and to respect NS records at the - * zone apex during outbound zone transfers. - */ - multi_provider?: boolean; - - /** - * Settings determining the nameservers through which the zone should be available. - */ - nameservers?: Nameserver; - - /** - * The time to live (TTL) of the zone's nameserver (NS) records. - */ - ns_ttl?: number; - - /** - * Allows a Secondary DNS zone to use (proxied) override records and CNAME - * flattening at the zone apex. - */ - secondary_overrides?: boolean; - - /** - * Components of the zone's SOA record. - */ - soa?: DNSSetting.SOA; - - /** - * Whether the zone mode is a regular or CDN/DNS only zone. - */ - zone_mode?: 'standard' | 'cdn_only' | 'dns_only'; -} - -export namespace DNSSetting { - /** - * Components of the zone's SOA record. - */ - export interface SOA { - /** - * Time in seconds of being unable to query the primary server after which - * secondary servers should stop serving the zone. - */ - expire: number; - - /** - * The time to live (TTL) for negative caching of records within the zone. - */ - min_ttl: number; - - /** - * The primary nameserver, which may be used for outbound zone transfers. - */ - mname: string; - - /** - * Time in seconds after which secondary servers should re-check the SOA record to - * see if the zone has been updated. - */ - refresh: number; - - /** - * Time in seconds after which secondary servers should retry queries after the - * primary server was unresponsive. - */ - retry: number; - - /** - * The email address of the zone administrator, with the first label representing - * the local part of the email address. - */ - rname: string; - - /** - * The time to live (TTL) of the SOA record itself. - */ - ttl: number; - } -} - -/** - * Settings determining the nameservers through which the zone should be available. - */ -export interface Nameserver { - /** - * Nameserver type - */ - type: 'cloudflare.standard'; -} - -export namespace DNSSettings { - export import DNSSetting = DNSSettingsAPI.DNSSetting; - export import Nameserver = DNSSettingsAPI.Nameserver; -} diff --git a/src/resources/zones/index.ts b/src/resources/zones/index.ts index 9a102069c9..8a628468f2 100644 --- a/src/resources/zones/index.ts +++ b/src/resources/zones/index.ts @@ -12,7 +12,6 @@ export { CustomNameserverGetParams, CustomNameservers, } from './custom-nameservers'; -export { DNSSetting, Nameserver, DNSSettings } from './dns-settings'; export { Settings } from './settings/index'; export { SubscriptionCreateResponse, diff --git a/src/resources/zones/zones.ts b/src/resources/zones/zones.ts index b0e6c94bf3..4bcdbcc039 100644 --- a/src/resources/zones/zones.ts +++ b/src/resources/zones/zones.ts @@ -5,7 +5,6 @@ import { APIResource } from '../../resource'; import { isRequestOptions } from '../../core'; import * as ActivationCheckAPI from './activation-check'; import * as CustomNameserversAPI from './custom-nameservers'; -import * as DNSSettingsAPI from './dns-settings'; import * as HoldsAPI from './holds'; import * as SubscriptionsAPI from './subscriptions'; import * as SettingsAPI from './settings/settings'; @@ -13,7 +12,6 @@ import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../p export class Zones extends APIResource { activationCheck: ActivationCheckAPI.ActivationCheck = new ActivationCheckAPI.ActivationCheck(this._client); - dnsSettings: DNSSettingsAPI.DNSSettings = new DNSSettingsAPI.DNSSettings(this._client); settings: SettingsAPI.Settings = new SettingsAPI.Settings(this._client); customNameservers: CustomNameserversAPI.CustomNameservers = new CustomNameserversAPI.CustomNameservers( this._client, @@ -401,9 +399,6 @@ export namespace Zones { export import ActivationCheck = ActivationCheckAPI.ActivationCheck; export import ActivationCheckTriggerResponse = ActivationCheckAPI.ActivationCheckTriggerResponse; export import ActivationCheckTriggerParams = ActivationCheckAPI.ActivationCheckTriggerParams; - export import DNSSettings = DNSSettingsAPI.DNSSettings; - export import DNSSetting = DNSSettingsAPI.DNSSetting; - export import Nameserver = DNSSettingsAPI.Nameserver; export import Settings = SettingsAPI.Settings; export import CustomNameservers = CustomNameserversAPI.CustomNameservers; export import CustomNameserverUpdateResponse = CustomNameserversAPI.CustomNameserverUpdateResponse; diff --git a/tests/api-resources/dns/settings.test.ts b/tests/api-resources/dns/settings.test.ts new file mode 100644 index 0000000000..2df8c2bbff --- /dev/null +++ b/tests/api-resources/dns/settings.test.ts @@ -0,0 +1,34 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource settings', () => { + test('edit', async () => { + const responsePromise = cloudflare.dns.settings.edit({ account_id: 'string' }); + 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('get', async () => { + const responsePromise = cloudflare.dns.settings.get({ account_id: 'string' }); + 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); + }); +}); diff --git a/tests/api-resources/zero-trust/access/policies.test.ts b/tests/api-resources/zero-trust/access/policies.test.ts new file mode 100644 index 0000000000..2cc044f82f --- /dev/null +++ b/tests/api-resources/zero-trust/access/policies.test.ts @@ -0,0 +1,197 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const cloudflare = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource policies', () => { + test('create: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.policies.create({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + decision: 'allow', + include: [ + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + ], + name: 'Allow devs', + }); + 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('create: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.policies.create({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + decision: 'allow', + include: [ + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + ], + name: 'Allow devs', + approval_groups: [ + { + approvals_needed: 1, + email_addresses: ['test1@cloudflare.com', 'test2@cloudflare.com'], + email_list_uuid: 'string', + }, + { + approvals_needed: 3, + email_addresses: ['test@cloudflare.com', 'test2@cloudflare.com'], + email_list_uuid: '597147a1-976b-4ef2-9af0-81d5d007fc34', + }, + ], + approval_required: true, + exclude: [ + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + ], + isolation_required: false, + purpose_justification_prompt: 'Please enter a justification for entering this protected domain.', + purpose_justification_required: true, + require: [ + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + ], + session_duration: '24h', + }); + }); + + test('update: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.policies.update( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + decision: 'allow', + include: [ + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + ], + name: 'Allow devs', + }, + ); + 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('update: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.policies.update( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + decision: 'allow', + include: [ + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + ], + name: 'Allow devs', + approval_groups: [ + { + approvals_needed: 1, + email_addresses: ['test1@cloudflare.com', 'test2@cloudflare.com'], + email_list_uuid: 'string', + }, + { + approvals_needed: 3, + email_addresses: ['test@cloudflare.com', 'test2@cloudflare.com'], + email_list_uuid: '597147a1-976b-4ef2-9af0-81d5d007fc34', + }, + ], + approval_required: true, + exclude: [ + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + ], + isolation_required: false, + purpose_justification_prompt: 'Please enter a justification for entering this protected domain.', + purpose_justification_required: true, + require: [ + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + { email: { email: 'test@example.com' } }, + ], + session_duration: '24h', + }, + ); + }); + + test('list: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.policies.list({ + account_id: '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); + }); + + test('list: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.policies.list({ + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); + + test('delete: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.policies.delete( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '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); + }); + + test('delete: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.policies.delete( + 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, + ); + }); + + test('get: only required params', async () => { + const responsePromise = cloudflare.zeroTrust.access.policies.get('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { + account_id: '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); + }); + + test('get: required and optional params', async () => { + const response = await cloudflare.zeroTrust.access.policies.get('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); +}); From 49007d917e325bf3c5f8af11af804fd2ec26d451 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 00:00:58 +0000 Subject: [PATCH 327/473] feat(api): update via SDK Studio (#824) --- api.md | 2 +- .../access/applications/applications.ts | 1120 ++++++++--------- .../zero-trust/identity-providers.ts | 114 +- src/resources/zero-trust/index.ts | 2 +- src/resources/zero-trust/zero-trust.ts | 2 +- 5 files changed, 620 insertions(+), 620 deletions(-) diff --git a/api.md b/api.md index bb5cf9c693..d04b3c56ce 100644 --- a/api.md +++ b/api.md @@ -4561,7 +4561,7 @@ Types: - GenericOAuthConfig - IdentityProvider - IdentityProviderType -- ScimConfig +- SCIMConfig - IdentityProviderListResponse - IdentityProviderDeleteResponse diff --git a/src/resources/zero-trust/access/applications/applications.ts b/src/resources/zero-trust/access/applications/applications.ts index 94df7faafc..5ec1528359 100644 --- a/src/resources/zero-trust/access/applications/applications.ts +++ b/src/resources/zero-trust/access/applications/applications.ts @@ -409,7 +409,7 @@ export namespace Application { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: SelfHostedApplication.ScimConfig; + scim_config?: SelfHostedApplication.SCIMConfig; /** * Returns a 401 status code when the request is blocked by a Service Auth policy. @@ -479,7 +479,7 @@ export namespace Application { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -496,9 +496,9 @@ export namespace Application { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, we propagate DELETE requests to the target application for SCIM @@ -516,15 +516,15 @@ export namespace Application { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -545,7 +545,7 @@ export namespace Application { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -561,7 +561,7 @@ export namespace Application { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -701,7 +701,7 @@ export namespace Application { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: SaaSApplication.ScimConfig; + scim_config?: SaaSApplication.SCIMConfig; /** * The application type. @@ -918,7 +918,7 @@ export namespace Application { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -935,9 +935,9 @@ export namespace Application { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, we propagate DELETE requests to the target application for SCIM @@ -955,15 +955,15 @@ export namespace Application { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -984,7 +984,7 @@ export namespace Application { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -1000,7 +1000,7 @@ export namespace Application { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -1186,7 +1186,7 @@ export namespace Application { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: BrowserSSHApplication.ScimConfig; + scim_config?: BrowserSSHApplication.SCIMConfig; /** * Returns a 401 status code when the request is blocked by a Service Auth policy. @@ -1256,7 +1256,7 @@ export namespace Application { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -1273,9 +1273,9 @@ export namespace Application { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, we propagate DELETE requests to the target application for SCIM @@ -1293,15 +1293,15 @@ export namespace Application { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -1322,7 +1322,7 @@ export namespace Application { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -1338,7 +1338,7 @@ export namespace Application { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -1524,7 +1524,7 @@ export namespace Application { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: BrowserVncApplication.ScimConfig; + scim_config?: BrowserVncApplication.SCIMConfig; /** * Returns a 401 status code when the request is blocked by a Service Auth policy. @@ -1594,7 +1594,7 @@ export namespace Application { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -1611,9 +1611,9 @@ export namespace Application { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, we propagate DELETE requests to the target application for SCIM @@ -1631,15 +1631,15 @@ export namespace Application { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -1660,7 +1660,7 @@ export namespace Application { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -1676,7 +1676,7 @@ export namespace Application { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -1814,7 +1814,7 @@ export namespace Application { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: AppLauncherApplication.ScimConfig; + scim_config?: AppLauncherApplication.SCIMConfig; /** * The amount of time that tokens issued for this application will be valid. Must @@ -1831,7 +1831,7 @@ export namespace Application { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -1848,9 +1848,9 @@ export namespace Application { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, we propagate DELETE requests to the target application for SCIM @@ -1868,15 +1868,15 @@ export namespace Application { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -1897,7 +1897,7 @@ export namespace Application { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -1913,7 +1913,7 @@ export namespace Application { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -2051,7 +2051,7 @@ export namespace Application { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: DeviceEnrollmentPermissionsApplication.ScimConfig; + scim_config?: DeviceEnrollmentPermissionsApplication.SCIMConfig; /** * The amount of time that tokens issued for this application will be valid. Must @@ -2068,7 +2068,7 @@ export namespace Application { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -2085,9 +2085,9 @@ export namespace Application { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, we propagate DELETE requests to the target application for SCIM @@ -2105,15 +2105,15 @@ export namespace Application { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -2134,7 +2134,7 @@ export namespace Application { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -2150,7 +2150,7 @@ export namespace Application { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -2288,7 +2288,7 @@ export namespace Application { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: BrowserIsolationPermissionsApplication.ScimConfig; + scim_config?: BrowserIsolationPermissionsApplication.SCIMConfig; /** * The amount of time that tokens issued for this application will be valid. Must @@ -2305,7 +2305,7 @@ export namespace Application { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -2322,9 +2322,9 @@ export namespace Application { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, we propagate DELETE requests to the target application for SCIM @@ -2342,15 +2342,15 @@ export namespace Application { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -2371,7 +2371,7 @@ export namespace Application { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -2387,7 +2387,7 @@ export namespace Application { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -2520,7 +2520,7 @@ export namespace Application { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: BookmarkApplication.ScimConfig; + scim_config?: BookmarkApplication.SCIMConfig; updated_at?: string; } @@ -2530,7 +2530,7 @@ export namespace Application { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -2547,9 +2547,9 @@ export namespace Application { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, we propagate DELETE requests to the target application for SCIM @@ -2567,15 +2567,15 @@ export namespace Application { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -2596,7 +2596,7 @@ export namespace Application { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -2612,7 +2612,7 @@ export namespace Application { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -3206,7 +3206,7 @@ export namespace ApplicationCreateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: SelfHostedApplication.ScimConfig; + scim_config?: SelfHostedApplication.SCIMConfig; /** * List of domains that Access will secure. @@ -3318,7 +3318,7 @@ export namespace ApplicationCreateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -3335,9 +3335,9 @@ export namespace ApplicationCreateResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -3355,15 +3355,15 @@ export namespace ApplicationCreateResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -3384,7 +3384,7 @@ export namespace ApplicationCreateResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -3400,7 +3400,7 @@ export namespace ApplicationCreateResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -3547,7 +3547,7 @@ export namespace ApplicationCreateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: SaaSApplication.ScimConfig; + scim_config?: SaaSApplication.SCIMConfig; /** * The tags you want assigned to an application. Tags are used to filter @@ -3765,7 +3765,7 @@ export namespace ApplicationCreateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -3782,9 +3782,9 @@ export namespace ApplicationCreateResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -3802,15 +3802,15 @@ export namespace ApplicationCreateResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -3831,7 +3831,7 @@ export namespace ApplicationCreateResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -3847,7 +3847,7 @@ export namespace ApplicationCreateResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -4061,7 +4061,7 @@ export namespace ApplicationCreateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: BrowserSSHApplication.ScimConfig; + scim_config?: BrowserSSHApplication.SCIMConfig; /** * List of domains that Access will secure. @@ -4173,7 +4173,7 @@ export namespace ApplicationCreateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -4190,9 +4190,9 @@ export namespace ApplicationCreateResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -4210,15 +4210,15 @@ export namespace ApplicationCreateResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -4239,7 +4239,7 @@ export namespace ApplicationCreateResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -4255,7 +4255,7 @@ export namespace ApplicationCreateResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -4469,7 +4469,7 @@ export namespace ApplicationCreateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: BrowserVncApplication.ScimConfig; + scim_config?: BrowserVncApplication.SCIMConfig; /** * List of domains that Access will secure. @@ -4581,7 +4581,7 @@ export namespace ApplicationCreateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -4598,9 +4598,9 @@ export namespace ApplicationCreateResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -4618,15 +4618,15 @@ export namespace ApplicationCreateResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -4647,7 +4647,7 @@ export namespace ApplicationCreateResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -4663,7 +4663,7 @@ export namespace ApplicationCreateResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -4804,7 +4804,7 @@ export namespace ApplicationCreateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: AppLauncherApplication.ScimConfig; + scim_config?: AppLauncherApplication.SCIMConfig; /** * The amount of time that tokens issued for this application will be valid. Must @@ -4895,7 +4895,7 @@ export namespace ApplicationCreateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -4912,9 +4912,9 @@ export namespace ApplicationCreateResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -4932,15 +4932,15 @@ export namespace ApplicationCreateResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -4961,7 +4961,7 @@ export namespace ApplicationCreateResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -4977,7 +4977,7 @@ export namespace ApplicationCreateResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -5118,7 +5118,7 @@ export namespace ApplicationCreateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: DeviceEnrollmentPermissionsApplication.ScimConfig; + scim_config?: DeviceEnrollmentPermissionsApplication.SCIMConfig; /** * The amount of time that tokens issued for this application will be valid. Must @@ -5209,7 +5209,7 @@ export namespace ApplicationCreateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -5226,9 +5226,9 @@ export namespace ApplicationCreateResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -5246,15 +5246,15 @@ export namespace ApplicationCreateResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -5275,7 +5275,7 @@ export namespace ApplicationCreateResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -5291,7 +5291,7 @@ export namespace ApplicationCreateResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -5432,7 +5432,7 @@ export namespace ApplicationCreateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: BrowserIsolationPermissionsApplication.ScimConfig; + scim_config?: BrowserIsolationPermissionsApplication.SCIMConfig; /** * The amount of time that tokens issued for this application will be valid. Must @@ -5523,7 +5523,7 @@ export namespace ApplicationCreateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -5540,9 +5540,9 @@ export namespace ApplicationCreateResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -5560,15 +5560,15 @@ export namespace ApplicationCreateResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -5589,7 +5589,7 @@ export namespace ApplicationCreateResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -5605,7 +5605,7 @@ export namespace ApplicationCreateResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -5736,7 +5736,7 @@ export namespace ApplicationCreateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: BookmarkApplication.ScimConfig; + scim_config?: BookmarkApplication.SCIMConfig; /** * The tags you want assigned to an application. Tags are used to filter @@ -5757,7 +5757,7 @@ export namespace ApplicationCreateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -5774,9 +5774,9 @@ export namespace ApplicationCreateResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -5794,15 +5794,15 @@ export namespace ApplicationCreateResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -5823,7 +5823,7 @@ export namespace ApplicationCreateResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -5839,7 +5839,7 @@ export namespace ApplicationCreateResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -6065,7 +6065,7 @@ export namespace ApplicationUpdateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: SelfHostedApplication.ScimConfig; + scim_config?: SelfHostedApplication.SCIMConfig; /** * List of domains that Access will secure. @@ -6177,7 +6177,7 @@ export namespace ApplicationUpdateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -6194,9 +6194,9 @@ export namespace ApplicationUpdateResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -6214,15 +6214,15 @@ export namespace ApplicationUpdateResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -6243,7 +6243,7 @@ export namespace ApplicationUpdateResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -6259,7 +6259,7 @@ export namespace ApplicationUpdateResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -6406,7 +6406,7 @@ export namespace ApplicationUpdateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: SaaSApplication.ScimConfig; + scim_config?: SaaSApplication.SCIMConfig; /** * The tags you want assigned to an application. Tags are used to filter @@ -6624,7 +6624,7 @@ export namespace ApplicationUpdateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -6641,9 +6641,9 @@ export namespace ApplicationUpdateResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -6661,15 +6661,15 @@ export namespace ApplicationUpdateResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -6690,7 +6690,7 @@ export namespace ApplicationUpdateResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -6706,7 +6706,7 @@ export namespace ApplicationUpdateResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -6920,7 +6920,7 @@ export namespace ApplicationUpdateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: BrowserSSHApplication.ScimConfig; + scim_config?: BrowserSSHApplication.SCIMConfig; /** * List of domains that Access will secure. @@ -7032,7 +7032,7 @@ export namespace ApplicationUpdateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -7049,9 +7049,9 @@ export namespace ApplicationUpdateResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -7069,15 +7069,15 @@ export namespace ApplicationUpdateResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -7098,7 +7098,7 @@ export namespace ApplicationUpdateResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -7114,7 +7114,7 @@ export namespace ApplicationUpdateResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -7328,7 +7328,7 @@ export namespace ApplicationUpdateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: BrowserVncApplication.ScimConfig; + scim_config?: BrowserVncApplication.SCIMConfig; /** * List of domains that Access will secure. @@ -7440,7 +7440,7 @@ export namespace ApplicationUpdateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -7457,9 +7457,9 @@ export namespace ApplicationUpdateResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -7477,15 +7477,15 @@ export namespace ApplicationUpdateResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -7506,7 +7506,7 @@ export namespace ApplicationUpdateResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -7522,7 +7522,7 @@ export namespace ApplicationUpdateResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -7663,7 +7663,7 @@ export namespace ApplicationUpdateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: AppLauncherApplication.ScimConfig; + scim_config?: AppLauncherApplication.SCIMConfig; /** * The amount of time that tokens issued for this application will be valid. Must @@ -7754,7 +7754,7 @@ export namespace ApplicationUpdateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -7771,9 +7771,9 @@ export namespace ApplicationUpdateResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -7791,15 +7791,15 @@ export namespace ApplicationUpdateResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -7820,7 +7820,7 @@ export namespace ApplicationUpdateResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -7836,7 +7836,7 @@ export namespace ApplicationUpdateResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -7977,7 +7977,7 @@ export namespace ApplicationUpdateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: DeviceEnrollmentPermissionsApplication.ScimConfig; + scim_config?: DeviceEnrollmentPermissionsApplication.SCIMConfig; /** * The amount of time that tokens issued for this application will be valid. Must @@ -8068,7 +8068,7 @@ export namespace ApplicationUpdateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -8085,9 +8085,9 @@ export namespace ApplicationUpdateResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -8105,15 +8105,15 @@ export namespace ApplicationUpdateResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -8134,7 +8134,7 @@ export namespace ApplicationUpdateResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -8150,7 +8150,7 @@ export namespace ApplicationUpdateResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -8291,7 +8291,7 @@ export namespace ApplicationUpdateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: BrowserIsolationPermissionsApplication.ScimConfig; + scim_config?: BrowserIsolationPermissionsApplication.SCIMConfig; /** * The amount of time that tokens issued for this application will be valid. Must @@ -8382,7 +8382,7 @@ export namespace ApplicationUpdateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -8399,9 +8399,9 @@ export namespace ApplicationUpdateResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -8419,15 +8419,15 @@ export namespace ApplicationUpdateResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -8448,7 +8448,7 @@ export namespace ApplicationUpdateResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -8464,7 +8464,7 @@ export namespace ApplicationUpdateResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -8595,7 +8595,7 @@ export namespace ApplicationUpdateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: BookmarkApplication.ScimConfig; + scim_config?: BookmarkApplication.SCIMConfig; /** * The tags you want assigned to an application. Tags are used to filter @@ -8616,7 +8616,7 @@ export namespace ApplicationUpdateResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -8633,9 +8633,9 @@ export namespace ApplicationUpdateResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -8653,15 +8653,15 @@ export namespace ApplicationUpdateResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -8682,7 +8682,7 @@ export namespace ApplicationUpdateResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -8698,7 +8698,7 @@ export namespace ApplicationUpdateResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -8924,7 +8924,7 @@ export namespace ApplicationListResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: SelfHostedApplication.ScimConfig; + scim_config?: SelfHostedApplication.SCIMConfig; /** * List of domains that Access will secure. @@ -9036,7 +9036,7 @@ export namespace ApplicationListResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -9053,9 +9053,9 @@ export namespace ApplicationListResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -9073,15 +9073,15 @@ export namespace ApplicationListResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -9102,7 +9102,7 @@ export namespace ApplicationListResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -9118,7 +9118,7 @@ export namespace ApplicationListResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -9265,7 +9265,7 @@ export namespace ApplicationListResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: SaaSApplication.ScimConfig; + scim_config?: SaaSApplication.SCIMConfig; /** * The tags you want assigned to an application. Tags are used to filter @@ -9483,7 +9483,7 @@ export namespace ApplicationListResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -9500,9 +9500,9 @@ export namespace ApplicationListResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -9520,15 +9520,15 @@ export namespace ApplicationListResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -9549,7 +9549,7 @@ export namespace ApplicationListResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -9565,7 +9565,7 @@ export namespace ApplicationListResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -9779,7 +9779,7 @@ export namespace ApplicationListResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: BrowserSSHApplication.ScimConfig; + scim_config?: BrowserSSHApplication.SCIMConfig; /** * List of domains that Access will secure. @@ -9891,7 +9891,7 @@ export namespace ApplicationListResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -9908,9 +9908,9 @@ export namespace ApplicationListResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -9928,15 +9928,15 @@ export namespace ApplicationListResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -9957,7 +9957,7 @@ export namespace ApplicationListResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -9973,7 +9973,7 @@ export namespace ApplicationListResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -10187,7 +10187,7 @@ export namespace ApplicationListResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: BrowserVncApplication.ScimConfig; + scim_config?: BrowserVncApplication.SCIMConfig; /** * List of domains that Access will secure. @@ -10299,7 +10299,7 @@ export namespace ApplicationListResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -10316,9 +10316,9 @@ export namespace ApplicationListResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -10336,15 +10336,15 @@ export namespace ApplicationListResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -10365,7 +10365,7 @@ export namespace ApplicationListResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -10381,7 +10381,7 @@ export namespace ApplicationListResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -10522,7 +10522,7 @@ export namespace ApplicationListResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: AppLauncherApplication.ScimConfig; + scim_config?: AppLauncherApplication.SCIMConfig; /** * The amount of time that tokens issued for this application will be valid. Must @@ -10613,7 +10613,7 @@ export namespace ApplicationListResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -10630,9 +10630,9 @@ export namespace ApplicationListResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -10650,15 +10650,15 @@ export namespace ApplicationListResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -10679,7 +10679,7 @@ export namespace ApplicationListResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -10695,7 +10695,7 @@ export namespace ApplicationListResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -10836,7 +10836,7 @@ export namespace ApplicationListResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: DeviceEnrollmentPermissionsApplication.ScimConfig; + scim_config?: DeviceEnrollmentPermissionsApplication.SCIMConfig; /** * The amount of time that tokens issued for this application will be valid. Must @@ -10927,7 +10927,7 @@ export namespace ApplicationListResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -10944,9 +10944,9 @@ export namespace ApplicationListResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -10964,15 +10964,15 @@ export namespace ApplicationListResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -10993,7 +10993,7 @@ export namespace ApplicationListResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -11009,7 +11009,7 @@ export namespace ApplicationListResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -11150,7 +11150,7 @@ export namespace ApplicationListResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: BrowserIsolationPermissionsApplication.ScimConfig; + scim_config?: BrowserIsolationPermissionsApplication.SCIMConfig; /** * The amount of time that tokens issued for this application will be valid. Must @@ -11241,7 +11241,7 @@ export namespace ApplicationListResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -11258,9 +11258,9 @@ export namespace ApplicationListResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -11278,15 +11278,15 @@ export namespace ApplicationListResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -11307,7 +11307,7 @@ export namespace ApplicationListResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -11323,7 +11323,7 @@ export namespace ApplicationListResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -11454,7 +11454,7 @@ export namespace ApplicationListResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: BookmarkApplication.ScimConfig; + scim_config?: BookmarkApplication.SCIMConfig; /** * The tags you want assigned to an application. Tags are used to filter @@ -11475,7 +11475,7 @@ export namespace ApplicationListResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -11492,9 +11492,9 @@ export namespace ApplicationListResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -11512,15 +11512,15 @@ export namespace ApplicationListResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -11541,7 +11541,7 @@ export namespace ApplicationListResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -11557,7 +11557,7 @@ export namespace ApplicationListResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -11790,7 +11790,7 @@ export namespace ApplicationGetResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: SelfHostedApplication.ScimConfig; + scim_config?: SelfHostedApplication.SCIMConfig; /** * List of domains that Access will secure. @@ -11902,7 +11902,7 @@ export namespace ApplicationGetResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -11919,9 +11919,9 @@ export namespace ApplicationGetResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -11939,15 +11939,15 @@ export namespace ApplicationGetResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -11968,7 +11968,7 @@ export namespace ApplicationGetResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -11984,7 +11984,7 @@ export namespace ApplicationGetResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -12131,7 +12131,7 @@ export namespace ApplicationGetResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: SaaSApplication.ScimConfig; + scim_config?: SaaSApplication.SCIMConfig; /** * The tags you want assigned to an application. Tags are used to filter @@ -12349,7 +12349,7 @@ export namespace ApplicationGetResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -12366,9 +12366,9 @@ export namespace ApplicationGetResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -12386,15 +12386,15 @@ export namespace ApplicationGetResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -12415,7 +12415,7 @@ export namespace ApplicationGetResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -12431,7 +12431,7 @@ export namespace ApplicationGetResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -12645,7 +12645,7 @@ export namespace ApplicationGetResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: BrowserSSHApplication.ScimConfig; + scim_config?: BrowserSSHApplication.SCIMConfig; /** * List of domains that Access will secure. @@ -12757,7 +12757,7 @@ export namespace ApplicationGetResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -12774,9 +12774,9 @@ export namespace ApplicationGetResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -12794,15 +12794,15 @@ export namespace ApplicationGetResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -12823,7 +12823,7 @@ export namespace ApplicationGetResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -12839,7 +12839,7 @@ export namespace ApplicationGetResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -13053,7 +13053,7 @@ export namespace ApplicationGetResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: BrowserVncApplication.ScimConfig; + scim_config?: BrowserVncApplication.SCIMConfig; /** * List of domains that Access will secure. @@ -13165,7 +13165,7 @@ export namespace ApplicationGetResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -13182,9 +13182,9 @@ export namespace ApplicationGetResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -13202,15 +13202,15 @@ export namespace ApplicationGetResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -13231,7 +13231,7 @@ export namespace ApplicationGetResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -13247,7 +13247,7 @@ export namespace ApplicationGetResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -13388,7 +13388,7 @@ export namespace ApplicationGetResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: AppLauncherApplication.ScimConfig; + scim_config?: AppLauncherApplication.SCIMConfig; /** * The amount of time that tokens issued for this application will be valid. Must @@ -13479,7 +13479,7 @@ export namespace ApplicationGetResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -13496,9 +13496,9 @@ export namespace ApplicationGetResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -13516,15 +13516,15 @@ export namespace ApplicationGetResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -13545,7 +13545,7 @@ export namespace ApplicationGetResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -13561,7 +13561,7 @@ export namespace ApplicationGetResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -13702,7 +13702,7 @@ export namespace ApplicationGetResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: DeviceEnrollmentPermissionsApplication.ScimConfig; + scim_config?: DeviceEnrollmentPermissionsApplication.SCIMConfig; /** * The amount of time that tokens issued for this application will be valid. Must @@ -13793,7 +13793,7 @@ export namespace ApplicationGetResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -13810,9 +13810,9 @@ export namespace ApplicationGetResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -13830,15 +13830,15 @@ export namespace ApplicationGetResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -13859,7 +13859,7 @@ export namespace ApplicationGetResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -13875,7 +13875,7 @@ export namespace ApplicationGetResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -14016,7 +14016,7 @@ export namespace ApplicationGetResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: BrowserIsolationPermissionsApplication.ScimConfig; + scim_config?: BrowserIsolationPermissionsApplication.SCIMConfig; /** * The amount of time that tokens issued for this application will be valid. Must @@ -14107,7 +14107,7 @@ export namespace ApplicationGetResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -14124,9 +14124,9 @@ export namespace ApplicationGetResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -14144,15 +14144,15 @@ export namespace ApplicationGetResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -14173,7 +14173,7 @@ export namespace ApplicationGetResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -14189,7 +14189,7 @@ export namespace ApplicationGetResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -14320,7 +14320,7 @@ export namespace ApplicationGetResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - scim_config?: BookmarkApplication.ScimConfig; + scim_config?: BookmarkApplication.SCIMConfig; /** * The tags you want assigned to an application. Tags are used to filter @@ -14341,7 +14341,7 @@ export namespace ApplicationGetResponse { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -14358,9 +14358,9 @@ export namespace ApplicationGetResponse { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -14378,15 +14378,15 @@ export namespace ApplicationGetResponse { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -14407,7 +14407,7 @@ export namespace ApplicationGetResponse { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -14423,7 +14423,7 @@ export namespace ApplicationGetResponse { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -14665,7 +14665,7 @@ export namespace ApplicationCreateParams { * Body param: Configuration for provisioning to this application via SCIM. This is * currently in closed beta. */ - scim_config?: ApplicationCreateParams.SelfHostedApplication.ScimConfig; + scim_config?: ApplicationCreateParams.SelfHostedApplication.SCIMConfig; /** * Body param: List of domains that Access will secure. @@ -14794,7 +14794,7 @@ export namespace ApplicationCreateParams { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -14811,9 +14811,9 @@ export namespace ApplicationCreateParams { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -14831,15 +14831,15 @@ export namespace ApplicationCreateParams { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -14860,7 +14860,7 @@ export namespace ApplicationCreateParams { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -14876,7 +14876,7 @@ export namespace ApplicationCreateParams { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -15036,7 +15036,7 @@ export namespace ApplicationCreateParams { * Body param: Configuration for provisioning to this application via SCIM. This is * currently in closed beta. */ - scim_config?: ApplicationCreateParams.SaaSApplication.ScimConfig; + scim_config?: ApplicationCreateParams.SaaSApplication.SCIMConfig; /** * Body param: The tags you want assigned to an application. Tags are used to @@ -15266,7 +15266,7 @@ export namespace ApplicationCreateParams { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -15283,9 +15283,9 @@ export namespace ApplicationCreateParams { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -15303,15 +15303,15 @@ export namespace ApplicationCreateParams { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -15332,7 +15332,7 @@ export namespace ApplicationCreateParams { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -15348,7 +15348,7 @@ export namespace ApplicationCreateParams { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -15576,7 +15576,7 @@ export namespace ApplicationCreateParams { * Body param: Configuration for provisioning to this application via SCIM. This is * currently in closed beta. */ - scim_config?: ApplicationCreateParams.BrowserSSHApplication.ScimConfig; + scim_config?: ApplicationCreateParams.BrowserSSHApplication.SCIMConfig; /** * Body param: List of domains that Access will secure. @@ -15705,7 +15705,7 @@ export namespace ApplicationCreateParams { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -15722,9 +15722,9 @@ export namespace ApplicationCreateParams { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -15742,15 +15742,15 @@ export namespace ApplicationCreateParams { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -15771,7 +15771,7 @@ export namespace ApplicationCreateParams { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -15787,7 +15787,7 @@ export namespace ApplicationCreateParams { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -16015,7 +16015,7 @@ export namespace ApplicationCreateParams { * Body param: Configuration for provisioning to this application via SCIM. This is * currently in closed beta. */ - scim_config?: ApplicationCreateParams.BrowserVncApplication.ScimConfig; + scim_config?: ApplicationCreateParams.BrowserVncApplication.SCIMConfig; /** * Body param: List of domains that Access will secure. @@ -16144,7 +16144,7 @@ export namespace ApplicationCreateParams { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -16161,9 +16161,9 @@ export namespace ApplicationCreateParams { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -16181,15 +16181,15 @@ export namespace ApplicationCreateParams { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -16210,7 +16210,7 @@ export namespace ApplicationCreateParams { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -16226,7 +16226,7 @@ export namespace ApplicationCreateParams { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -16365,7 +16365,7 @@ export namespace ApplicationCreateParams { * Body param: Configuration for provisioning to this application via SCIM. This is * currently in closed beta. */ - scim_config?: ApplicationCreateParams.AppLauncherApplication.ScimConfig; + scim_config?: ApplicationCreateParams.AppLauncherApplication.SCIMConfig; /** * Body param: The amount of time that tokens issued for this application will be @@ -16472,7 +16472,7 @@ export namespace ApplicationCreateParams { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -16489,9 +16489,9 @@ export namespace ApplicationCreateParams { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -16509,15 +16509,15 @@ export namespace ApplicationCreateParams { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -16538,7 +16538,7 @@ export namespace ApplicationCreateParams { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -16554,7 +16554,7 @@ export namespace ApplicationCreateParams { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -16693,7 +16693,7 @@ export namespace ApplicationCreateParams { * Body param: Configuration for provisioning to this application via SCIM. This is * currently in closed beta. */ - scim_config?: ApplicationCreateParams.DeviceEnrollmentPermissionsApplication.ScimConfig; + scim_config?: ApplicationCreateParams.DeviceEnrollmentPermissionsApplication.SCIMConfig; /** * Body param: The amount of time that tokens issued for this application will be @@ -16800,7 +16800,7 @@ export namespace ApplicationCreateParams { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -16817,9 +16817,9 @@ export namespace ApplicationCreateParams { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -16837,15 +16837,15 @@ export namespace ApplicationCreateParams { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -16866,7 +16866,7 @@ export namespace ApplicationCreateParams { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -16882,7 +16882,7 @@ export namespace ApplicationCreateParams { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -17021,7 +17021,7 @@ export namespace ApplicationCreateParams { * Body param: Configuration for provisioning to this application via SCIM. This is * currently in closed beta. */ - scim_config?: ApplicationCreateParams.BrowserIsolationPermissionsApplication.ScimConfig; + scim_config?: ApplicationCreateParams.BrowserIsolationPermissionsApplication.SCIMConfig; /** * Body param: The amount of time that tokens issued for this application will be @@ -17128,7 +17128,7 @@ export namespace ApplicationCreateParams { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -17145,9 +17145,9 @@ export namespace ApplicationCreateParams { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -17165,15 +17165,15 @@ export namespace ApplicationCreateParams { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -17194,7 +17194,7 @@ export namespace ApplicationCreateParams { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -17210,7 +17210,7 @@ export namespace ApplicationCreateParams { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -17341,7 +17341,7 @@ export namespace ApplicationCreateParams { * Body param: Configuration for provisioning to this application via SCIM. This is * currently in closed beta. */ - scim_config?: ApplicationCreateParams.BookmarkApplication.ScimConfig; + scim_config?: ApplicationCreateParams.BookmarkApplication.SCIMConfig; /** * Body param: The tags you want assigned to an application. Tags are used to @@ -17360,7 +17360,7 @@ export namespace ApplicationCreateParams { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -17377,9 +17377,9 @@ export namespace ApplicationCreateParams { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -17397,15 +17397,15 @@ export namespace ApplicationCreateParams { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -17426,7 +17426,7 @@ export namespace ApplicationCreateParams { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -17442,7 +17442,7 @@ export namespace ApplicationCreateParams { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -17682,7 +17682,7 @@ export namespace ApplicationUpdateParams { * Body param: Configuration for provisioning to this application via SCIM. This is * currently in closed beta. */ - scim_config?: ApplicationUpdateParams.SelfHostedApplication.ScimConfig; + scim_config?: ApplicationUpdateParams.SelfHostedApplication.SCIMConfig; /** * Body param: List of domains that Access will secure. @@ -17811,7 +17811,7 @@ export namespace ApplicationUpdateParams { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -17828,9 +17828,9 @@ export namespace ApplicationUpdateParams { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -17848,15 +17848,15 @@ export namespace ApplicationUpdateParams { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -17877,7 +17877,7 @@ export namespace ApplicationUpdateParams { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -17893,7 +17893,7 @@ export namespace ApplicationUpdateParams { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -18053,7 +18053,7 @@ export namespace ApplicationUpdateParams { * Body param: Configuration for provisioning to this application via SCIM. This is * currently in closed beta. */ - scim_config?: ApplicationUpdateParams.SaaSApplication.ScimConfig; + scim_config?: ApplicationUpdateParams.SaaSApplication.SCIMConfig; /** * Body param: The tags you want assigned to an application. Tags are used to @@ -18283,7 +18283,7 @@ export namespace ApplicationUpdateParams { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -18300,9 +18300,9 @@ export namespace ApplicationUpdateParams { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -18320,15 +18320,15 @@ export namespace ApplicationUpdateParams { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -18349,7 +18349,7 @@ export namespace ApplicationUpdateParams { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -18365,7 +18365,7 @@ export namespace ApplicationUpdateParams { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -18593,7 +18593,7 @@ export namespace ApplicationUpdateParams { * Body param: Configuration for provisioning to this application via SCIM. This is * currently in closed beta. */ - scim_config?: ApplicationUpdateParams.BrowserSSHApplication.ScimConfig; + scim_config?: ApplicationUpdateParams.BrowserSSHApplication.SCIMConfig; /** * Body param: List of domains that Access will secure. @@ -18722,7 +18722,7 @@ export namespace ApplicationUpdateParams { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -18739,9 +18739,9 @@ export namespace ApplicationUpdateParams { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -18759,15 +18759,15 @@ export namespace ApplicationUpdateParams { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -18788,7 +18788,7 @@ export namespace ApplicationUpdateParams { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -18804,7 +18804,7 @@ export namespace ApplicationUpdateParams { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -19032,7 +19032,7 @@ export namespace ApplicationUpdateParams { * Body param: Configuration for provisioning to this application via SCIM. This is * currently in closed beta. */ - scim_config?: ApplicationUpdateParams.BrowserVncApplication.ScimConfig; + scim_config?: ApplicationUpdateParams.BrowserVncApplication.SCIMConfig; /** * Body param: List of domains that Access will secure. @@ -19161,7 +19161,7 @@ export namespace ApplicationUpdateParams { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -19178,9 +19178,9 @@ export namespace ApplicationUpdateParams { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -19198,15 +19198,15 @@ export namespace ApplicationUpdateParams { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -19227,7 +19227,7 @@ export namespace ApplicationUpdateParams { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -19243,7 +19243,7 @@ export namespace ApplicationUpdateParams { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -19382,7 +19382,7 @@ export namespace ApplicationUpdateParams { * Body param: Configuration for provisioning to this application via SCIM. This is * currently in closed beta. */ - scim_config?: ApplicationUpdateParams.AppLauncherApplication.ScimConfig; + scim_config?: ApplicationUpdateParams.AppLauncherApplication.SCIMConfig; /** * Body param: The amount of time that tokens issued for this application will be @@ -19489,7 +19489,7 @@ export namespace ApplicationUpdateParams { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -19506,9 +19506,9 @@ export namespace ApplicationUpdateParams { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -19526,15 +19526,15 @@ export namespace ApplicationUpdateParams { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -19555,7 +19555,7 @@ export namespace ApplicationUpdateParams { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -19571,7 +19571,7 @@ export namespace ApplicationUpdateParams { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -19710,7 +19710,7 @@ export namespace ApplicationUpdateParams { * Body param: Configuration for provisioning to this application via SCIM. This is * currently in closed beta. */ - scim_config?: ApplicationUpdateParams.DeviceEnrollmentPermissionsApplication.ScimConfig; + scim_config?: ApplicationUpdateParams.DeviceEnrollmentPermissionsApplication.SCIMConfig; /** * Body param: The amount of time that tokens issued for this application will be @@ -19817,7 +19817,7 @@ export namespace ApplicationUpdateParams { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -19834,9 +19834,9 @@ export namespace ApplicationUpdateParams { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -19854,15 +19854,15 @@ export namespace ApplicationUpdateParams { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -19883,7 +19883,7 @@ export namespace ApplicationUpdateParams { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -19899,7 +19899,7 @@ export namespace ApplicationUpdateParams { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -20038,7 +20038,7 @@ export namespace ApplicationUpdateParams { * Body param: Configuration for provisioning to this application via SCIM. This is * currently in closed beta. */ - scim_config?: ApplicationUpdateParams.BrowserIsolationPermissionsApplication.ScimConfig; + scim_config?: ApplicationUpdateParams.BrowserIsolationPermissionsApplication.SCIMConfig; /** * Body param: The amount of time that tokens issued for this application will be @@ -20145,7 +20145,7 @@ export namespace ApplicationUpdateParams { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -20162,9 +20162,9 @@ export namespace ApplicationUpdateParams { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -20182,15 +20182,15 @@ export namespace ApplicationUpdateParams { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -20211,7 +20211,7 @@ export namespace ApplicationUpdateParams { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -20227,7 +20227,7 @@ export namespace ApplicationUpdateParams { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ @@ -20358,7 +20358,7 @@ export namespace ApplicationUpdateParams { * Body param: Configuration for provisioning to this application via SCIM. This is * currently in closed beta. */ - scim_config?: ApplicationUpdateParams.BookmarkApplication.ScimConfig; + scim_config?: ApplicationUpdateParams.BookmarkApplication.SCIMConfig; /** * Body param: The tags you want assigned to an application. Tags are used to @@ -20377,7 +20377,7 @@ export namespace ApplicationUpdateParams { * Configuration for provisioning to this application via SCIM. This is currently * in closed beta. */ - export interface ScimConfig { + export interface SCIMConfig { /** * The UID of the IdP to use as the source for SCIM resources to provision to this * application. @@ -20394,9 +20394,9 @@ export namespace ApplicationUpdateParams { * provisioning to an application. */ authentication?: - | ScimConfig.AccessScimConfigAuthenticationHTTPBasic - | ScimConfig.AccessScimConfigAuthenticationOAuthBearerToken - | ScimConfig.AccessScimConfigAuthenticationOauth2; + | SCIMConfig.AccessSCIMConfigAuthenticationHTTPBasic + | SCIMConfig.AccessSCIMConfigAuthenticationOAuthBearerToken + | SCIMConfig.AccessSCIMConfigAuthenticationOauth2; /** * If false, propagates DELETE requests to the target application for SCIM @@ -20414,15 +20414,15 @@ export namespace ApplicationUpdateParams { * A list of mappings to apply to SCIM resources before provisioning them in this * application. These can transform or filter the resources to be provisioned. */ - mappings?: Array; + mappings?: Array; } - export namespace ScimConfig { + export namespace SCIMConfig { /** * Attributes for configuring HTTP Basic authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationHTTPBasic { + export interface AccessSCIMConfigAuthenticationHTTPBasic { /** * Password used to authenticate with the remote SCIM service. */ @@ -20443,7 +20443,7 @@ export namespace ApplicationUpdateParams { * Attributes for configuring OAuth Bearer Token authentication scheme for SCIM * provisioning to an application. */ - export interface AccessScimConfigAuthenticationOAuthBearerToken { + export interface AccessSCIMConfigAuthenticationOAuthBearerToken { /** * Token used to authenticate with the remote SCIM service. */ @@ -20459,7 +20459,7 @@ export namespace ApplicationUpdateParams { * Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning * to an application. */ - export interface AccessScimConfigAuthenticationOauth2 { + export interface AccessSCIMConfigAuthenticationOauth2 { /** * URL used to generate the auth code used during token generation. */ diff --git a/src/resources/zero-trust/identity-providers.ts b/src/resources/zero-trust/identity-providers.ts index 8b9e15dd00..47ba695cc6 100644 --- a/src/resources/zero-trust/identity-providers.ts +++ b/src/resources/zero-trust/identity-providers.ts @@ -233,7 +233,7 @@ export interface AzureAD { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: ScimConfig; + scim_config?: SCIMConfig; } export namespace AzureAD { @@ -362,7 +362,7 @@ export namespace IdentityProvider { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export namespace AccessCentrify { @@ -433,7 +433,7 @@ export namespace IdentityProvider { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export interface AccessGitHub { @@ -465,7 +465,7 @@ export namespace IdentityProvider { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export interface AccessGoogle { @@ -497,7 +497,7 @@ export namespace IdentityProvider { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export namespace AccessGoogle { @@ -558,7 +558,7 @@ export namespace IdentityProvider { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export namespace AccessGoogleApps { @@ -624,7 +624,7 @@ export namespace IdentityProvider { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export interface AccessOIDC { @@ -656,7 +656,7 @@ export namespace IdentityProvider { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export namespace AccessOIDC { @@ -737,7 +737,7 @@ export namespace IdentityProvider { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export namespace AccessOkta { @@ -808,7 +808,7 @@ export namespace IdentityProvider { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export namespace AccessOnelogin { @@ -874,7 +874,7 @@ export namespace IdentityProvider { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export namespace AccessPingone { @@ -940,7 +940,7 @@ export namespace IdentityProvider { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export namespace AccessSAML { @@ -1033,7 +1033,7 @@ export namespace IdentityProvider { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export interface AccessOnetimepin { @@ -1065,7 +1065,7 @@ export namespace IdentityProvider { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } } @@ -1115,7 +1115,7 @@ export type IdentityProviderTypeParam = * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ -export interface ScimConfig { +export interface SCIMConfig { /** * A flag to enable or disable SCIM for the identity provider. */ @@ -1153,7 +1153,7 @@ export interface ScimConfig { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ -export interface ScimConfigParam { +export interface SCIMConfigParam { /** * A flag to enable or disable SCIM for the identity provider. */ @@ -1232,7 +1232,7 @@ export namespace IdentityProviderListResponse { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export namespace AccessCentrify { @@ -1303,7 +1303,7 @@ export namespace IdentityProviderListResponse { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export interface AccessGitHub { @@ -1335,7 +1335,7 @@ export namespace IdentityProviderListResponse { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export interface AccessGoogle { @@ -1367,7 +1367,7 @@ export namespace IdentityProviderListResponse { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export namespace AccessGoogle { @@ -1428,7 +1428,7 @@ export namespace IdentityProviderListResponse { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export namespace AccessGoogleApps { @@ -1494,7 +1494,7 @@ export namespace IdentityProviderListResponse { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export interface AccessOIDC { @@ -1526,7 +1526,7 @@ export namespace IdentityProviderListResponse { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export namespace AccessOIDC { @@ -1607,7 +1607,7 @@ export namespace IdentityProviderListResponse { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export namespace AccessOkta { @@ -1678,7 +1678,7 @@ export namespace IdentityProviderListResponse { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export namespace AccessOnelogin { @@ -1744,7 +1744,7 @@ export namespace IdentityProviderListResponse { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export namespace AccessPingone { @@ -1810,7 +1810,7 @@ export namespace IdentityProviderListResponse { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } export namespace AccessSAML { @@ -1903,7 +1903,7 @@ export namespace IdentityProviderListResponse { * The configuration settings for enabling a System for Cross-Domain Identity * Management (SCIM) with the identity provider. */ - scim_config?: IdentityProvidersAPI.ScimConfig; + scim_config?: IdentityProvidersAPI.SCIMConfig; } } @@ -1967,7 +1967,7 @@ export namespace IdentityProviderCreateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export namespace AzureAD { @@ -2062,7 +2062,7 @@ export namespace IdentityProviderCreateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export namespace AccessCentrify { @@ -2140,7 +2140,7 @@ export namespace IdentityProviderCreateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export interface AccessGitHub { @@ -2179,7 +2179,7 @@ export namespace IdentityProviderCreateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export interface AccessGoogle { @@ -2218,7 +2218,7 @@ export namespace IdentityProviderCreateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export namespace AccessGoogle { @@ -2286,7 +2286,7 @@ export namespace IdentityProviderCreateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export namespace AccessGoogleApps { @@ -2359,7 +2359,7 @@ export namespace IdentityProviderCreateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export interface AccessOIDC { @@ -2398,7 +2398,7 @@ export namespace IdentityProviderCreateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export namespace AccessOIDC { @@ -2486,7 +2486,7 @@ export namespace IdentityProviderCreateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export namespace AccessOkta { @@ -2564,7 +2564,7 @@ export namespace IdentityProviderCreateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export namespace AccessOnelogin { @@ -2637,7 +2637,7 @@ export namespace IdentityProviderCreateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export namespace AccessPingone { @@ -2710,7 +2710,7 @@ export namespace IdentityProviderCreateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export namespace AccessSAML { @@ -2810,7 +2810,7 @@ export namespace IdentityProviderCreateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export interface AccessOnetimepin { @@ -2849,7 +2849,7 @@ export namespace IdentityProviderCreateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } } @@ -2906,7 +2906,7 @@ export namespace IdentityProviderUpdateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export namespace AzureAD { @@ -3001,7 +3001,7 @@ export namespace IdentityProviderUpdateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export namespace AccessCentrify { @@ -3079,7 +3079,7 @@ export namespace IdentityProviderUpdateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export interface AccessGitHub { @@ -3118,7 +3118,7 @@ export namespace IdentityProviderUpdateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export interface AccessGoogle { @@ -3157,7 +3157,7 @@ export namespace IdentityProviderUpdateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export namespace AccessGoogle { @@ -3225,7 +3225,7 @@ export namespace IdentityProviderUpdateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export namespace AccessGoogleApps { @@ -3298,7 +3298,7 @@ export namespace IdentityProviderUpdateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export interface AccessOIDC { @@ -3337,7 +3337,7 @@ export namespace IdentityProviderUpdateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export namespace AccessOIDC { @@ -3425,7 +3425,7 @@ export namespace IdentityProviderUpdateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export namespace AccessOkta { @@ -3503,7 +3503,7 @@ export namespace IdentityProviderUpdateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export namespace AccessOnelogin { @@ -3576,7 +3576,7 @@ export namespace IdentityProviderUpdateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export namespace AccessPingone { @@ -3649,7 +3649,7 @@ export namespace IdentityProviderUpdateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export namespace AccessSAML { @@ -3749,7 +3749,7 @@ export namespace IdentityProviderUpdateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } export interface AccessOnetimepin { @@ -3788,7 +3788,7 @@ export namespace IdentityProviderUpdateParams { * Body param: The configuration settings for enabling a System for Cross-Domain * Identity Management (SCIM) with the identity provider. */ - scim_config?: ScimConfigParam; + scim_config?: SCIMConfigParam; } } @@ -3833,7 +3833,7 @@ export namespace IdentityProviders { export import GenericOAuthConfig = IdentityProvidersAPI.GenericOAuthConfig; export import IdentityProvider = IdentityProvidersAPI.IdentityProvider; export import IdentityProviderType = IdentityProvidersAPI.IdentityProviderType; - export import ScimConfig = IdentityProvidersAPI.ScimConfig; + export import SCIMConfig = IdentityProvidersAPI.SCIMConfig; export import IdentityProviderListResponse = IdentityProvidersAPI.IdentityProviderListResponse; export import IdentityProviderDeleteResponse = IdentityProvidersAPI.IdentityProviderDeleteResponse; export import IdentityProviderListResponsesSinglePage = IdentityProvidersAPI.IdentityProviderListResponsesSinglePage; diff --git a/src/resources/zero-trust/index.ts b/src/resources/zero-trust/index.ts index acf3c1cdb3..59ac113a26 100644 --- a/src/resources/zero-trust/index.ts +++ b/src/resources/zero-trust/index.ts @@ -28,7 +28,7 @@ export { GenericOAuthConfig, IdentityProvider, IdentityProviderType, - ScimConfig, + SCIMConfig, IdentityProviderListResponse, IdentityProviderDeleteResponse, IdentityProviderCreateParams, diff --git a/src/resources/zero-trust/zero-trust.ts b/src/resources/zero-trust/zero-trust.ts index 45f05d017f..229a763e98 100644 --- a/src/resources/zero-trust/zero-trust.ts +++ b/src/resources/zero-trust/zero-trust.ts @@ -44,7 +44,7 @@ export namespace ZeroTrust { export import GenericOAuthConfig = IdentityProvidersAPI.GenericOAuthConfig; export import IdentityProvider = IdentityProvidersAPI.IdentityProvider; export import IdentityProviderType = IdentityProvidersAPI.IdentityProviderType; - export import ScimConfig = IdentityProvidersAPI.ScimConfig; + export import SCIMConfig = IdentityProvidersAPI.SCIMConfig; export import IdentityProviderListResponse = IdentityProvidersAPI.IdentityProviderListResponse; export import IdentityProviderDeleteResponse = IdentityProvidersAPI.IdentityProviderDeleteResponse; export import IdentityProviderListResponsesSinglePage = IdentityProvidersAPI.IdentityProviderListResponsesSinglePage; From 8272298ccc61970cfcc4a65583f4463f70569d7c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 01:27:10 +0000 Subject: [PATCH 328/473] feat(api): OpenAPI spec update via Stainless API (#825) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 563ec8b4af..b68b9a715d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efdb1c15faba015f2904e7db0946e71b5bd84a6e4b96256aed210e7e0113cf17.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dd6f560da6eb9ae8d43a6fd37d706e939ef20c6cca15655adc5dc821fa2fd19f.yml From d04eb4d6d4a5a25b94e977191303f39577f3c19a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 01:29:23 +0000 Subject: [PATCH 329/473] feat(api): OpenAPI spec update via Stainless API (#826) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index b68b9a715d..e43120fc0b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dd6f560da6eb9ae8d43a6fd37d706e939ef20c6cca15655adc5dc821fa2fd19f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7d5c5ef81ab6fb46d0069fbaee2804fb9260e09c325145e407c67613ba76732f.yml From ebcf187285d7a145cb1de521d52da3191dff9a0c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 06:16:15 +0000 Subject: [PATCH 330/473] feat(api): OpenAPI spec update via Stainless API (#827) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e43120fc0b..b68b9a715d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7d5c5ef81ab6fb46d0069fbaee2804fb9260e09c325145e407c67613ba76732f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dd6f560da6eb9ae8d43a6fd37d706e939ef20c6cca15655adc5dc821fa2fd19f.yml From 66078b9a8fa831a1998ef8c98fad7751da59cbbc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 06:18:46 +0000 Subject: [PATCH 331/473] feat(api): OpenAPI spec update via Stainless API (#828) --- .stats.yml | 2 +- src/resources/accounts/members.ts | 186 +++++------------------------- 2 files changed, 31 insertions(+), 157 deletions(-) diff --git a/.stats.yml b/.stats.yml index b68b9a715d..ddeeffb5d0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dd6f560da6eb9ae8d43a6fd37d706e939ef20c6cca15655adc5dc821fa2fd19f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-90de7c383d660ce2dd1c4dfa53b4c75ef8c4c37d485f16f9cc2da269d4852095.yml diff --git a/src/resources/accounts/members.ts b/src/resources/accounts/members.ts index baf2ae008b..ed8693a525 100644 --- a/src/resources/accounts/members.ts +++ b/src/resources/accounts/members.ts @@ -709,172 +709,46 @@ export namespace MemberGetResponse { } } -export type MemberCreateParams = - | MemberCreateParams.IamCreateMemberWithRoles - | MemberCreateParams.IamCreateMemberWithPolicies; - -export namespace MemberCreateParams { - export interface IamCreateMemberWithRoles { - /** - * Path param: - */ - account_id: string; - - /** - * Body param: The contact email address of the user. - */ - email: string; - - /** - * Body param: Array of roles associated with this member. - */ - roles: Array; - - /** - * Body param: - */ - status?: 'accepted' | 'pending'; - } - - export interface IamCreateMemberWithPolicies { - /** - * Path param: - */ - account_id: string; - - /** - * Body param: The contact email address of the user. - */ - email: string; - - /** - * Body param: Array of policies associated with this member. - */ - policies: Array; - - /** - * Body param: - */ - status?: 'accepted' | 'pending'; - } +export interface MemberCreateParams { + /** + * Path param: + */ + account_id: string; - export namespace IamCreateMemberWithPolicies { - export interface Policy { - /** - * Allow or deny operations against the resources. - */ - access: 'allow' | 'deny'; + /** + * Body param: The contact email address of the user. + */ + email: string; - /** - * A set of permission groups that are specified to the policy. - */ - permission_groups: Array; + /** + * Body param: Array of roles associated with this member. + */ + roles: Array; - /** - * A list of resource groups that the policy applies to. - */ - resource_groups: Array; - } + /** + * Body param: + */ + status?: 'accepted' | 'pending'; +} - export namespace Policy { - /** - * A group of permissions. - */ - export interface PermissionGroup { - /** - * Identifier of the group. - */ - id: string; - } +export interface MemberUpdateParams { + /** + * Path param: + */ + account_id: string; - /** - * A group of scoped resources. - */ - export interface ResourceGroup { - /** - * Identifier of the group. - */ - id: string; - } - } - } + /** + * Body param: Roles assigned to this member. + */ + roles?: Array; } -export type MemberUpdateParams = MemberUpdateParams.Member | MemberUpdateParams.IamUpdateMemberWithPolicies; - export namespace MemberUpdateParams { - export interface Member { - /** - * Path param: - */ - account_id: string; - - /** - * Body param: Roles assigned to this member. - */ - roles?: Array; - } - - export namespace Member { - export interface Role { - /** - * Role identifier tag. - */ - id: string; - } - } - - export interface IamUpdateMemberWithPolicies { - /** - * Path param: - */ - account_id: string; - + export interface Role { /** - * Body param: Array of policies associated with this member. + * Role identifier tag. */ - policies: Array; - } - - export namespace IamUpdateMemberWithPolicies { - export interface Policy { - /** - * Allow or deny operations against the resources. - */ - access: 'allow' | 'deny'; - - /** - * A set of permission groups that are specified to the policy. - */ - permission_groups: Array; - - /** - * A list of resource groups that the policy applies to. - */ - resource_groups: Array; - } - - export namespace Policy { - /** - * A group of permissions. - */ - export interface PermissionGroup { - /** - * Identifier of the group. - */ - id: string; - } - - /** - * A group of scoped resources. - */ - export interface ResourceGroup { - /** - * Identifier of the group. - */ - id: string; - } - } + id: string; } } From ff9cf0eb1a717a813e1dd9eaf354b2dad2a7c7bb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 08:30:52 +0000 Subject: [PATCH 332/473] feat(api): OpenAPI spec update via Stainless API (#829) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index ddeeffb5d0..2dc213fb8e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-90de7c383d660ce2dd1c4dfa53b4c75ef8c4c37d485f16f9cc2da269d4852095.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b9eda15ba6e500908a66e39a9d92ce5ce54da5eb7d0ecce2ccb51eaa74afaeee.yml From 91f5a783e268c957cc249d8bbb91d6a465fa6fa6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 09:17:44 +0000 Subject: [PATCH 333/473] feat(api): OpenAPI spec update via Stainless API (#830) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 2dc213fb8e..ddeeffb5d0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b9eda15ba6e500908a66e39a9d92ce5ce54da5eb7d0ecce2ccb51eaa74afaeee.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-90de7c383d660ce2dd1c4dfa53b4c75ef8c4c37d485f16f9cc2da269d4852095.yml From 0ee8af823fa81aaa6f183cdec1666a6a08759d84 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 09:48:55 +0000 Subject: [PATCH 334/473] feat(api): OpenAPI spec update via Stainless API (#831) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index ddeeffb5d0..8b57cbbfca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-90de7c383d660ce2dd1c4dfa53b4c75ef8c4c37d485f16f9cc2da269d4852095.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-97347d998788b4bfb492f2a2aeadd31063f79a70cd39952c18b880117a06a8b5.yml From 445582fed34b92ecdfa9ba7839e5a60f721df2dd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 12:04:16 +0000 Subject: [PATCH 335/473] feat(api): OpenAPI spec update via Stainless API (#832) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8b57cbbfca..2dc213fb8e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-97347d998788b4bfb492f2a2aeadd31063f79a70cd39952c18b880117a06a8b5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b9eda15ba6e500908a66e39a9d92ce5ce54da5eb7d0ecce2ccb51eaa74afaeee.yml From 0ea8bde792a744952cbbd991a72884ed17fb2707 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 12:06:34 +0000 Subject: [PATCH 336/473] feat(api): OpenAPI spec update via Stainless API (#833) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 2dc213fb8e..8b57cbbfca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b9eda15ba6e500908a66e39a9d92ce5ce54da5eb7d0ecce2ccb51eaa74afaeee.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-97347d998788b4bfb492f2a2aeadd31063f79a70cd39952c18b880117a06a8b5.yml From 4d9332ea83d636eb2c9ff3a2477d77024dffcb1a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 12:08:48 +0000 Subject: [PATCH 337/473] feat(api): OpenAPI spec update via Stainless API (#834) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8b57cbbfca..97ea24156e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-97347d998788b4bfb492f2a2aeadd31063f79a70cd39952c18b880117a06a8b5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-10c6435539a9266e87ab838ee156aea2c5e8412dfdf9009512910abc3be46a29.yml From ba2be123b77f144877f5941f4ea6645cc78e768a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 13:17:35 +0000 Subject: [PATCH 338/473] feat(api): OpenAPI spec update via Stainless API (#835) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 97ea24156e..8b57cbbfca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-10c6435539a9266e87ab838ee156aea2c5e8412dfdf9009512910abc3be46a29.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-97347d998788b4bfb492f2a2aeadd31063f79a70cd39952c18b880117a06a8b5.yml From 02ea124ba69335dc47171f11c8f181225adec270 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 14:52:02 +0000 Subject: [PATCH 339/473] feat(api): OpenAPI spec update via Stainless API (#836) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8b57cbbfca..2dc213fb8e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-97347d998788b4bfb492f2a2aeadd31063f79a70cd39952c18b880117a06a8b5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b9eda15ba6e500908a66e39a9d92ce5ce54da5eb7d0ecce2ccb51eaa74afaeee.yml From ec4f985b460fe3a2b329515bd40ef8b28892a73c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:00:58 +0000 Subject: [PATCH 340/473] feat(api): OpenAPI spec update via Stainless API (#837) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 2dc213fb8e..8b57cbbfca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b9eda15ba6e500908a66e39a9d92ce5ce54da5eb7d0ecce2ccb51eaa74afaeee.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-97347d998788b4bfb492f2a2aeadd31063f79a70cd39952c18b880117a06a8b5.yml From d4cfb552b630b61ab49b9e360957a413b54b487a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:13:26 +0000 Subject: [PATCH 341/473] feat(api): OpenAPI spec update via Stainless API (#838) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8b57cbbfca..2dc213fb8e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-97347d998788b4bfb492f2a2aeadd31063f79a70cd39952c18b880117a06a8b5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b9eda15ba6e500908a66e39a9d92ce5ce54da5eb7d0ecce2ccb51eaa74afaeee.yml From f807390b2f44dbffc777b63f527e874928ef8ef6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:17:54 +0000 Subject: [PATCH 342/473] feat(api): OpenAPI spec update via Stainless API (#839) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 2dc213fb8e..0d963443d9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b9eda15ba6e500908a66e39a9d92ce5ce54da5eb7d0ecce2ccb51eaa74afaeee.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-01bcee9f0bcbf82223f65ca440689c33643a11097face82ec05050592f2389ad.yml From 59bd980e6c4329939006076fbe8488c3df54e6d9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 16:10:54 +0000 Subject: [PATCH 343/473] feat(api): OpenAPI spec update via Stainless API (#840) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 0d963443d9..330be9e14a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-01bcee9f0bcbf82223f65ca440689c33643a11097face82ec05050592f2389ad.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0053e474edb7f838f2b1d38334a7ccb983db09216cca0173a3c3d5401cadcf82.yml From 01274e29a7883c691bfe8575a8c420ecae0adb3a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 16:38:14 +0000 Subject: [PATCH 344/473] feat(api): OpenAPI spec update via Stainless API (#841) --- .stats.yml | 2 +- api.md | 6 +--- .../addressing/address-maps/address-maps.ts | 34 +++++++++++++++++-- .../addressing/loa-documents/downloads.ts | 14 ++++---- .../addressing/loa-documents/index.ts | 2 +- .../addressing/loa-documents/loa-documents.ts | 1 - .../address-maps/address-maps.test.ts | 6 ++++ .../loa-documents/downloads.test.ts | 15 -------- 8 files changed, 47 insertions(+), 33 deletions(-) diff --git a/.stats.yml b/.stats.yml index 330be9e14a..0440ff0afa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0053e474edb7f838f2b1d38334a7ccb983db09216cca0173a3c3d5401cadcf82.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d780b9eb98465e97c30112eb2c9e586883852508d23a6684bd28e5a9cb7da7a1.yml diff --git a/api.md b/api.md index d04b3c56ce..d51d603e37 100644 --- a/api.md +++ b/api.md @@ -3020,13 +3020,9 @@ Methods: ### Downloads -Types: - -- DownloadGetResponse - Methods: -- client.addressing.loaDocuments.downloads.get(loaDocumentId, { ...params }) -> unknown +- client.addressing.loaDocuments.downloads.get(loaDocumentId, { ...params }) -> Response ## Prefixes diff --git a/src/resources/addressing/address-maps/address-maps.ts b/src/resources/addressing/address-maps/address-maps.ts index 866a465e1d..d4a63db063 100644 --- a/src/resources/addressing/address-maps/address-maps.ts +++ b/src/resources/addressing/address-maps/address-maps.ts @@ -148,6 +148,11 @@ export interface AddressMap { */ export type Kind = 'zone' | 'account'; +/** + * The type of the membership. + */ +export type KindParam = 'zone' | 'account'; + export interface AddressMapCreateResponse { /** * Identifier @@ -222,7 +227,7 @@ export namespace AddressMapCreateResponse { created_at?: string; /** - * Identifier + * The identifier for the membership (eg. a zone or account tag). */ identifier?: string; @@ -309,7 +314,7 @@ export namespace AddressMapGetResponse { created_at?: string; /** - * Identifier + * The identifier for the membership (eg. a zone or account tag). */ identifier?: string; @@ -337,6 +342,31 @@ export interface AddressMapCreateParams { * respond with IP addresses on an Address Map until the map is enabled. */ enabled?: boolean | null; + + /** + * Body param: + */ + ips?: Array; + + /** + * Body param: Zones and Accounts which will be assigned IPs on this Address Map. A + * zone membership will take priority over an account membership. + */ + memberships?: Array; +} + +export namespace AddressMapCreateParams { + export interface Membership { + /** + * The identifier for the membership (eg. a zone or account tag). + */ + identifier?: string; + + /** + * The type of the membership. + */ + kind?: AddressMapsAPI.KindParam; + } } export interface AddressMapListParams { diff --git a/src/resources/addressing/loa-documents/downloads.ts b/src/resources/addressing/loa-documents/downloads.ts index 32c281650e..eba729030e 100644 --- a/src/resources/addressing/loa-documents/downloads.ts +++ b/src/resources/addressing/loa-documents/downloads.ts @@ -2,6 +2,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; +import { type Response } from '../../../_shims/index'; import * as DownloadsAPI from './downloads'; export class Downloads extends APIResource { @@ -12,17 +13,15 @@ export class Downloads extends APIResource { loaDocumentId: string | null, params: DownloadGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; - return this._client.get( - `/accounts/${account_id}/addressing/loa_documents/${loaDocumentId}/download`, - options, - ); + return this._client.get(`/accounts/${account_id}/addressing/loa_documents/${loaDocumentId}/download`, { + ...options, + __binaryResponse: true, + }); } } -export type DownloadGetResponse = unknown; - export interface DownloadGetParams { /** * Identifier @@ -31,6 +30,5 @@ export interface DownloadGetParams { } export namespace Downloads { - export import DownloadGetResponse = DownloadsAPI.DownloadGetResponse; export import DownloadGetParams = DownloadsAPI.DownloadGetParams; } diff --git a/src/resources/addressing/loa-documents/index.ts b/src/resources/addressing/loa-documents/index.ts index 70f333d35d..40c4791998 100644 --- a/src/resources/addressing/loa-documents/index.ts +++ b/src/resources/addressing/loa-documents/index.ts @@ -1,4 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { DownloadGetResponse, DownloadGetParams, Downloads } from './downloads'; +export { DownloadGetParams, Downloads } from './downloads'; export { LOADocumentCreateResponse, LOADocumentCreateParams, LOADocuments } from './loa-documents'; diff --git a/src/resources/addressing/loa-documents/loa-documents.ts b/src/resources/addressing/loa-documents/loa-documents.ts index 0112ff9578..c4aa3c8ef4 100644 --- a/src/resources/addressing/loa-documents/loa-documents.ts +++ b/src/resources/addressing/loa-documents/loa-documents.ts @@ -49,6 +49,5 @@ export namespace LOADocuments { export import LOADocumentCreateResponse = LOADocumentsAPI.LOADocumentCreateResponse; export import LOADocumentCreateParams = LOADocumentsAPI.LOADocumentCreateParams; export import Downloads = DownloadsAPI.Downloads; - export import DownloadGetResponse = DownloadsAPI.DownloadGetResponse; export import DownloadGetParams = DownloadsAPI.DownloadGetParams; } diff --git a/tests/api-resources/addressing/address-maps/address-maps.test.ts b/tests/api-resources/addressing/address-maps/address-maps.test.ts index 1234cde27a..404c5b613a 100644 --- a/tests/api-resources/addressing/address-maps/address-maps.test.ts +++ b/tests/api-resources/addressing/address-maps/address-maps.test.ts @@ -28,6 +28,12 @@ describe('resource addressMaps', () => { account_id: '023e105f4ecef8ad9ca31a8372d0c353', description: 'My Ecommerce zones', enabled: true, + ips: ['192.0.2.1', '192.0.2.1', '192.0.2.1'], + memberships: [ + { identifier: '023e105f4ecef8ad9ca31a8372d0c353', kind: 'zone' }, + { identifier: '023e105f4ecef8ad9ca31a8372d0c353', kind: 'zone' }, + { identifier: '023e105f4ecef8ad9ca31a8372d0c353', kind: 'zone' }, + ], }); }); diff --git a/tests/api-resources/addressing/loa-documents/downloads.test.ts b/tests/api-resources/addressing/loa-documents/downloads.test.ts index 1790763377..6ad26ae05a 100644 --- a/tests/api-resources/addressing/loa-documents/downloads.test.ts +++ b/tests/api-resources/addressing/loa-documents/downloads.test.ts @@ -1,7 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import Cloudflare from 'cloudflare'; -import { Response } from 'node-fetch'; const cloudflare = new Cloudflare({ apiKey: '144c9defac04969c7bfad8efaa8ea194', @@ -10,20 +9,6 @@ const cloudflare = new Cloudflare({ }); describe('resource downloads', () => { - test('get: only required params', async () => { - const responsePromise = cloudflare.addressing.loaDocuments.downloads.get( - 'd933b1530bc56c9953cf8ce166da8004', - { account_id: '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); - }); - test('get: required and optional params', async () => { const response = await cloudflare.addressing.loaDocuments.downloads.get( 'd933b1530bc56c9953cf8ce166da8004', From 398ba7c1c676fd79e2fbb6e1305a892312b4841c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 16:46:23 +0000 Subject: [PATCH 345/473] feat(api): OpenAPI spec update via Stainless API (#842) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 0440ff0afa..a09b92e43d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d780b9eb98465e97c30112eb2c9e586883852508d23a6684bd28e5a9cb7da7a1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f64174a3fe500d2081cdd36a3263ffda8c5713543ddf8aa7fef8c8cdcda7d22f.yml From 10c2f7afa8ac221d6ef5ce591142de79d8ff702a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 16:48:46 +0000 Subject: [PATCH 346/473] feat(api): OpenAPI spec update via Stainless API (#843) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a09b92e43d..0440ff0afa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f64174a3fe500d2081cdd36a3263ffda8c5713543ddf8aa7fef8c8cdcda7d22f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d780b9eb98465e97c30112eb2c9e586883852508d23a6684bd28e5a9cb7da7a1.yml From 43ac40ae7d2ef0f1d3b8c3b778669987ca2936cb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 16:57:54 +0000 Subject: [PATCH 347/473] feat(api): OpenAPI spec update via Stainless API (#844) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 0440ff0afa..a09b92e43d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d780b9eb98465e97c30112eb2c9e586883852508d23a6684bd28e5a9cb7da7a1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f64174a3fe500d2081cdd36a3263ffda8c5713543ddf8aa7fef8c8cdcda7d22f.yml From 6fe0a415a6072b8a91c8060f9c0ce38706aaaba5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 17:00:10 +0000 Subject: [PATCH 348/473] feat(api): OpenAPI spec update via Stainless API (#845) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a09b92e43d..4210ccee04 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f64174a3fe500d2081cdd36a3263ffda8c5713543ddf8aa7fef8c8cdcda7d22f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-88251a14cc4e73591bebcd234af63228b058d53dc2fb2ab00e0386e984b4db80.yml From f7d16410fb23691dce59fe3835317248ce33e02b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 17:02:26 +0000 Subject: [PATCH 349/473] feat(api): OpenAPI spec update via Stainless API (#846) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4210ccee04..a09b92e43d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-88251a14cc4e73591bebcd234af63228b058d53dc2fb2ab00e0386e984b4db80.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f64174a3fe500d2081cdd36a3263ffda8c5713543ddf8aa7fef8c8cdcda7d22f.yml From 3192c4b0c5610918a1ea489b696b49ad6b362839 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 18:08:33 +0000 Subject: [PATCH 350/473] feat(api): OpenAPI spec update via Stainless API (#847) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a09b92e43d..0440ff0afa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f64174a3fe500d2081cdd36a3263ffda8c5713543ddf8aa7fef8c8cdcda7d22f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d780b9eb98465e97c30112eb2c9e586883852508d23a6684bd28e5a9cb7da7a1.yml From 18477f9f41adf5a37e39bf97a26db1f4f7a5e79b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 18:10:54 +0000 Subject: [PATCH 351/473] feat(api): OpenAPI spec update via Stainless API (#848) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 0440ff0afa..a09b92e43d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d780b9eb98465e97c30112eb2c9e586883852508d23a6684bd28e5a9cb7da7a1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f64174a3fe500d2081cdd36a3263ffda8c5713543ddf8aa7fef8c8cdcda7d22f.yml From 5c5d2a6867e81a00c68a20d92a8f6c605a94b78a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 19:18:46 +0000 Subject: [PATCH 352/473] feat(api): OpenAPI spec update via Stainless API (#849) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a09b92e43d..4210ccee04 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f64174a3fe500d2081cdd36a3263ffda8c5713543ddf8aa7fef8c8cdcda7d22f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-88251a14cc4e73591bebcd234af63228b058d53dc2fb2ab00e0386e984b4db80.yml From a0556c106d4fe8e24ba66368b3e42880c91b5e5e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 19:59:26 +0000 Subject: [PATCH 353/473] feat(api): OpenAPI spec update via Stainless API (#850) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4210ccee04..0440ff0afa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-88251a14cc4e73591bebcd234af63228b058d53dc2fb2ab00e0386e984b4db80.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d780b9eb98465e97c30112eb2c9e586883852508d23a6684bd28e5a9cb7da7a1.yml From 150c2a822ef77dabfafccfd9f19a76e424a392aa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 21:20:20 +0000 Subject: [PATCH 354/473] feat(api): OpenAPI spec update via Stainless API (#851) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 0440ff0afa..92b81159a8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d780b9eb98465e97c30112eb2c9e586883852508d23a6684bd28e5a9cb7da7a1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bdfe21693106fc05b48376c8081959ea29b7484eb76fb778b3a87cfdd4849dd2.yml From e0fb710e1b7c62bedddb073d64eb5e1317a08521 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 10:46:22 +0000 Subject: [PATCH 355/473] feat(api): OpenAPI spec update via Stainless API (#852) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 92b81159a8..a09b92e43d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bdfe21693106fc05b48376c8081959ea29b7484eb76fb778b3a87cfdd4849dd2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f64174a3fe500d2081cdd36a3263ffda8c5713543ddf8aa7fef8c8cdcda7d22f.yml From a081a70980fa43f9bde422e4d05d4420c71d30bf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 10:57:27 +0000 Subject: [PATCH 356/473] feat(api): OpenAPI spec update via Stainless API (#853) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a09b92e43d..4210ccee04 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f64174a3fe500d2081cdd36a3263ffda8c5713543ddf8aa7fef8c8cdcda7d22f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-88251a14cc4e73591bebcd234af63228b058d53dc2fb2ab00e0386e984b4db80.yml From 471a116c89fa9db2a320a50fb07ff0f4c77519c7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 10:59:43 +0000 Subject: [PATCH 357/473] feat(api): OpenAPI spec update via Stainless API (#854) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4210ccee04..a09b92e43d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-88251a14cc4e73591bebcd234af63228b058d53dc2fb2ab00e0386e984b4db80.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f64174a3fe500d2081cdd36a3263ffda8c5713543ddf8aa7fef8c8cdcda7d22f.yml From 9b68e0ede2c2bb1c1c9a34b880314874ea104a81 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 12:09:33 +0000 Subject: [PATCH 358/473] feat(api): OpenAPI spec update via Stainless API (#855) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a09b92e43d..4210ccee04 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f64174a3fe500d2081cdd36a3263ffda8c5713543ddf8aa7fef8c8cdcda7d22f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-88251a14cc4e73591bebcd234af63228b058d53dc2fb2ab00e0386e984b4db80.yml From 16eb1c2adf9d3b5f4b02639a771ed3dead270508 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 12:11:44 +0000 Subject: [PATCH 359/473] feat(api): OpenAPI spec update via Stainless API (#856) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4210ccee04..a09b92e43d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-88251a14cc4e73591bebcd234af63228b058d53dc2fb2ab00e0386e984b4db80.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f64174a3fe500d2081cdd36a3263ffda8c5713543ddf8aa7fef8c8cdcda7d22f.yml From 205034229abf11cc266c8d9c22f2d4d946cac75e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 12:57:11 +0000 Subject: [PATCH 360/473] feat(api): OpenAPI spec update via Stainless API (#857) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a09b92e43d..92b81159a8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f64174a3fe500d2081cdd36a3263ffda8c5713543ddf8aa7fef8c8cdcda7d22f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bdfe21693106fc05b48376c8081959ea29b7484eb76fb778b3a87cfdd4849dd2.yml From aa82a6ba486dc9ae3b73e8e16e36f062ed63bdba Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 14:28:14 +0000 Subject: [PATCH 361/473] feat(api): OpenAPI spec update via Stainless API (#858) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 92b81159a8..4210ccee04 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bdfe21693106fc05b48376c8081959ea29b7484eb76fb778b3a87cfdd4849dd2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-88251a14cc4e73591bebcd234af63228b058d53dc2fb2ab00e0386e984b4db80.yml From eb847d5512fd8dea4e4abd2fd84f32c8b0451dae Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 15:40:43 +0000 Subject: [PATCH 362/473] feat(api): OpenAPI spec update via Stainless API (#859) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4210ccee04..92b81159a8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-88251a14cc4e73591bebcd234af63228b058d53dc2fb2ab00e0386e984b4db80.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bdfe21693106fc05b48376c8081959ea29b7484eb76fb778b3a87cfdd4849dd2.yml From 5e53ad5568b67917f26514c5d617b5f7d1730093 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 16:00:29 +0000 Subject: [PATCH 363/473] feat(api): OpenAPI spec update via Stainless API (#860) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 92b81159a8..a09b92e43d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bdfe21693106fc05b48376c8081959ea29b7484eb76fb778b3a87cfdd4849dd2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f64174a3fe500d2081cdd36a3263ffda8c5713543ddf8aa7fef8c8cdcda7d22f.yml From ccf6cc8407aa3879aef7f82f6c79bfcbd0e494ed Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 16:53:55 +0000 Subject: [PATCH 364/473] feat(api): OpenAPI spec update via Stainless API (#861) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a09b92e43d..0440ff0afa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f64174a3fe500d2081cdd36a3263ffda8c5713543ddf8aa7fef8c8cdcda7d22f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d780b9eb98465e97c30112eb2c9e586883852508d23a6684bd28e5a9cb7da7a1.yml From 876b96d784e562856712d3bdf9242b889971752f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 18:08:56 +0000 Subject: [PATCH 365/473] feat(api): OpenAPI spec update via Stainless API (#862) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 0440ff0afa..92b81159a8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d780b9eb98465e97c30112eb2c9e586883852508d23a6684bd28e5a9cb7da7a1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bdfe21693106fc05b48376c8081959ea29b7484eb76fb778b3a87cfdd4849dd2.yml From ce6e63a3ff01d3654e69658d184e548d88b30cd3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 18:11:13 +0000 Subject: [PATCH 366/473] feat(api): OpenAPI spec update via Stainless API (#863) --- .stats.yml | 2 +- .../access/applications/applications.ts | 42 +++++++++++++++++++ src/resources/zero-trust/seats.ts | 7 +++- tests/api-resources/zero-trust/seats.test.ts | 16 +++---- 4 files changed, 57 insertions(+), 10 deletions(-) diff --git a/.stats.yml b/.stats.yml index 92b81159a8..5a6baba3ca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bdfe21693106fc05b48376c8081959ea29b7484eb76fb778b3a87cfdd4849dd2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f33a7e8050bdba5caa80d678c9b3de6fe87b6af4bf29184f3f1b07b2793c817b.yml diff --git a/src/resources/zero-trust/access/applications/applications.ts b/src/resources/zero-trust/access/applications/applications.ts index 5ec1528359..af0b5bbbcb 100644 --- a/src/resources/zero-trust/access/applications/applications.ts +++ b/src/resources/zero-trust/access/applications/applications.ts @@ -792,6 +792,12 @@ export namespace Application { } export interface AccessSchemasOIDCSaaSApp { + /** + * The lifetime of the OIDC Access Token after creation. Valid units are m,h. Must + * be greater than or equal to 1m and less than or equal to 24h. + */ + access_token_lifetime?: string; + /** * If client secret should be required on the token endpoint when * authorization_code_with_pkce grant is used. @@ -3639,6 +3645,12 @@ export namespace ApplicationCreateResponse { } export interface AccessOIDCSaaSApp { + /** + * The lifetime of the OIDC Access Token after creation. Valid units are m,h. Must + * be greater than or equal to 1m and less than or equal to 24h. + */ + access_token_lifetime?: string; + /** * If client secret should be required on the token endpoint when * authorization_code_with_pkce grant is used. @@ -6498,6 +6510,12 @@ export namespace ApplicationUpdateResponse { } export interface AccessOIDCSaaSApp { + /** + * The lifetime of the OIDC Access Token after creation. Valid units are m,h. Must + * be greater than or equal to 1m and less than or equal to 24h. + */ + access_token_lifetime?: string; + /** * If client secret should be required on the token endpoint when * authorization_code_with_pkce grant is used. @@ -9357,6 +9375,12 @@ export namespace ApplicationListResponse { } export interface AccessOIDCSaaSApp { + /** + * The lifetime of the OIDC Access Token after creation. Valid units are m,h. Must + * be greater than or equal to 1m and less than or equal to 24h. + */ + access_token_lifetime?: string; + /** * If client secret should be required on the token endpoint when * authorization_code_with_pkce grant is used. @@ -12223,6 +12247,12 @@ export namespace ApplicationGetResponse { } export interface AccessOIDCSaaSApp { + /** + * The lifetime of the OIDC Access Token after creation. Valid units are m,h. Must + * be greater than or equal to 1m and less than or equal to 24h. + */ + access_token_lifetime?: string; + /** * If client secret should be required on the token endpoint when * authorization_code_with_pkce grant is used. @@ -15144,6 +15174,12 @@ export namespace ApplicationCreateParams { } export interface AccessOIDCSaaSApp { + /** + * The lifetime of the OIDC Access Token after creation. Valid units are m,h. Must + * be greater than or equal to 1m and less than or equal to 24h. + */ + access_token_lifetime?: string; + /** * If client secret should be required on the token endpoint when * authorization_code_with_pkce grant is used. @@ -18161,6 +18197,12 @@ export namespace ApplicationUpdateParams { } export interface AccessOIDCSaaSApp { + /** + * The lifetime of the OIDC Access Token after creation. Valid units are m,h. Must + * be greater than or equal to 1m and less than or equal to 24h. + */ + access_token_lifetime?: string; + /** * If client secret should be required on the token endpoint when * authorization_code_with_pkce grant is used. diff --git a/src/resources/zero-trust/seats.ts b/src/resources/zero-trust/seats.ts index 4736555f14..fde235fbdf 100644 --- a/src/resources/zero-trust/seats.ts +++ b/src/resources/zero-trust/seats.ts @@ -34,7 +34,7 @@ export interface Seat { gateway_seat?: boolean; /** - * Identifier + * The unique API identifier for the Zero Trust seat. */ seat_uid?: string; @@ -66,6 +66,11 @@ export namespace SeatEditParams { * True if the seat is part of Gateway. */ gateway_seat: boolean; + + /** + * The unique API identifier for the Zero Trust seat. + */ + seat_uid: string; } } diff --git a/tests/api-resources/zero-trust/seats.test.ts b/tests/api-resources/zero-trust/seats.test.ts index 07e137fee7..a958341aa9 100644 --- a/tests/api-resources/zero-trust/seats.test.ts +++ b/tests/api-resources/zero-trust/seats.test.ts @@ -13,11 +13,11 @@ describe('resource seats', () => { // TODO: investigate broken test test.skip('edit: only required params', async () => { const responsePromise = cloudflare.zeroTrust.seats.edit({ - account_id: '023e105f4ecef8ad9ca31a8372d0c353', + account_id: '699d98642c564d2e855e9661899b7252', body: [ - { access_seat: false, gateway_seat: false }, - { access_seat: false, gateway_seat: false }, - { access_seat: false, gateway_seat: false }, + { access_seat: false, gateway_seat: false, seat_uid: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415' }, + { access_seat: false, gateway_seat: false, seat_uid: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415' }, + { access_seat: false, gateway_seat: false, seat_uid: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415' }, ], }); const rawResponse = await responsePromise.asResponse(); @@ -32,11 +32,11 @@ describe('resource seats', () => { // TODO: investigate broken test test.skip('edit: required and optional params', async () => { const response = await cloudflare.zeroTrust.seats.edit({ - account_id: '023e105f4ecef8ad9ca31a8372d0c353', + account_id: '699d98642c564d2e855e9661899b7252', body: [ - { access_seat: false, gateway_seat: false }, - { access_seat: false, gateway_seat: false }, - { access_seat: false, gateway_seat: false }, + { access_seat: false, gateway_seat: false, seat_uid: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415' }, + { access_seat: false, gateway_seat: false, seat_uid: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415' }, + { access_seat: false, gateway_seat: false, seat_uid: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415' }, ], }); }); From 123808c2c1bafd98370282ac65cddc4b72be7712 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 18:36:51 +0000 Subject: [PATCH 367/473] feat(api): OpenAPI spec update via Stainless API (#864) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 5a6baba3ca..254000e633 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f33a7e8050bdba5caa80d678c9b3de6fe87b6af4bf29184f3f1b07b2793c817b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6545c93a16062d2763cd304367d8babf5aaef09046036361dbb077b75536e858.yml From c63d0d27275693be87459b05843579a106fd0d59 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 20:45:53 +0000 Subject: [PATCH 368/473] feat(api): OpenAPI spec update via Stainless API (#865) --- .stats.yml | 2 +- src/core.ts | 35 ++++++++++++++----- src/resources/vectorize/indexes.ts | 4 +++ .../dispatch/namespaces/scripts/scripts.ts | 6 +++- src/resources/workers/scripts/scripts.ts | 7 +++- .../zero-trust/dlp/datasets/upload.ts | 4 ++- .../zero-trust/dlp/datasets/upload.test.ts | 4 +-- 7 files changed, 48 insertions(+), 14 deletions(-) diff --git a/.stats.yml b/.stats.yml index 254000e633..f6163818d6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6545c93a16062d2763cd304367d8babf5aaef09046036361dbb077b75536e858.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f1ab7e5d073ef27b0e08bd9fd83e406c15c1c69017c29b17dadceec459febd7b.yml diff --git a/src/core.ts b/src/core.ts index 5f985a0a71..2a6ff76440 100644 --- a/src/core.ts +++ b/src/core.ts @@ -18,7 +18,7 @@ import { type HeadersInit, } from './_shims/index'; export { type Response }; -import { isMultipartBody } from './uploads'; +import { BlobLike, isBlobLike, isMultipartBody } from './uploads'; export { maybeMultipartFormRequestOptions, multipartFormRequestOptions, @@ -235,7 +235,17 @@ export abstract class APIClient { path: string, opts?: PromiseOrValue>, ): APIPromise { - return this.request(Promise.resolve(opts).then((opts) => ({ method, path, ...opts }))); + return this.request( + Promise.resolve(opts).then(async (opts) => { + const body = + opts && isBlobLike(opts?.body) ? new DataView(await opts.body.arrayBuffer()) + : opts?.body instanceof DataView ? opts.body + : opts?.body instanceof ArrayBuffer ? new DataView(opts.body) + : opts && ArrayBuffer.isView(opts?.body) ? new DataView(opts.body.buffer) + : opts?.body; + return { method, path, ...opts, body }; + }), + ); } getAPIList = AbstractPage>( @@ -257,6 +267,8 @@ export abstract class APIClient { const encoded = encoder.encode(body); return encoded.length.toString(); } + } else if (ArrayBuffer.isView(body)) { + return body.byteLength.toString(); } return null; @@ -266,7 +278,9 @@ export abstract class APIClient { const { method, path, query, headers: headers = {} } = options; const body = - isMultipartBody(options.body) ? options.body.body + ArrayBuffer.isView(options.body) || (options.__binaryRequest && typeof options.body === 'string') ? + options.body + : isMultipartBody(options.body) ? options.body.body : options.body ? JSON.stringify(options.body, null, 2) : null; const contentLength = this.calculateContentLength(body); @@ -721,7 +735,9 @@ export type Headers = Record; export type DefaultQuery = Record; export type KeysEnum = { [P in keyof Required]: true }; -export type RequestOptions | Readable> = { +export type RequestOptions< + Req = unknown | Record | Readable | BlobLike | ArrayBufferView | ArrayBuffer, +> = { method?: HTTPMethod; path?: string; query?: Req | undefined; @@ -735,6 +751,7 @@ export type RequestOptions | Readable> = signal?: AbortSignal | undefined | null; idempotencyKey?: string; + __binaryRequest?: boolean | undefined; __binaryResponse?: boolean | undefined; }; @@ -755,6 +772,7 @@ const requestOptionsKeys: KeysEnum = { signal: true, idempotencyKey: true, + __binaryRequest: true, __binaryResponse: true, }; @@ -767,10 +785,11 @@ export const isRequestOptions = (obj: unknown): obj is RequestOptions => { ); }; -export type FinalRequestOptions | Readable> = RequestOptions & { - method: HTTPMethod; - path: string; -}; +export type FinalRequestOptions | Readable | DataView> = + RequestOptions & { + method: HTTPMethod; + path: string; + }; declare const Deno: any; declare const EdgeRuntime: any; diff --git a/src/resources/vectorize/indexes.ts b/src/resources/vectorize/indexes.ts index 011c123f3a..5280edd431 100644 --- a/src/resources/vectorize/indexes.ts +++ b/src/resources/vectorize/indexes.ts @@ -133,6 +133,8 @@ export class Indexes extends APIResource { this._client.post(`/accounts/${account_id}/vectorize/indexes/${indexName}/insert`, { body: body, ...options, + headers: { 'Content-Type': 'application/x-ndjson', ...options?.headers }, + __binaryRequest: true, }) as Core.APIPromise<{ result: IndexInsert | null }> )._thenUnwrap((obj) => obj.result); } @@ -168,6 +170,8 @@ export class Indexes extends APIResource { this._client.post(`/accounts/${account_id}/vectorize/indexes/${indexName}/upsert`, { body: body, ...options, + headers: { 'Content-Type': 'application/x-ndjson', ...options?.headers }, + __binaryRequest: true, }) as Core.APIPromise<{ result: IndexUpsert | null }> )._thenUnwrap((obj) => obj.result); } diff --git a/src/resources/workers-for-platforms/dispatch/namespaces/scripts/scripts.ts b/src/resources/workers-for-platforms/dispatch/namespaces/scripts/scripts.ts index ce5a325abf..f05cadf5f8 100644 --- a/src/resources/workers-for-platforms/dispatch/namespaces/scripts/scripts.ts +++ b/src/resources/workers-for-platforms/dispatch/namespaces/scripts/scripts.ts @@ -35,7 +35,11 @@ export class Scripts extends APIResource { return ( this._client.put( `/accounts/${account_id}/workers/dispatch/namespaces/${dispatchNamespace}/scripts/${scriptName}`, - maybeMultipartFormRequestOptions({ body, ...options }), + maybeMultipartFormRequestOptions({ + body, + ...options, + headers: { 'Content-Type': 'application/javascript', ...options?.headers }, + }), ) as Core.APIPromise<{ result: ScriptsAPI.Script }> )._thenUnwrap((obj) => obj.result); } diff --git a/src/resources/workers/scripts/scripts.ts b/src/resources/workers/scripts/scripts.ts index 90558b0639..96c0a9d180 100644 --- a/src/resources/workers/scripts/scripts.ts +++ b/src/resources/workers/scripts/scripts.ts @@ -34,7 +34,12 @@ export class Scripts extends APIResource { return ( this._client.put( `/accounts/${account_id}/workers/scripts/${scriptName}`, - maybeMultipartFormRequestOptions({ query: { rollback_to }, body, ...options }), + maybeMultipartFormRequestOptions({ + query: { rollback_to }, + body, + ...options, + headers: { 'Content-Type': 'application/javascript', ...options?.headers }, + }), ) as Core.APIPromise<{ result: Script }> )._thenUnwrap((obj) => obj.result); } diff --git a/src/resources/zero-trust/dlp/datasets/upload.ts b/src/resources/zero-trust/dlp/datasets/upload.ts index 2391176d95..f631048af2 100644 --- a/src/resources/zero-trust/dlp/datasets/upload.ts +++ b/src/resources/zero-trust/dlp/datasets/upload.ts @@ -37,6 +37,8 @@ export class Upload extends APIResource { this._client.post(`/accounts/${account_id}/dlp/datasets/${datasetId}/upload/${version}`, { body: body, ...options, + headers: { 'Content-Type': 'application/octet-stream', ...options?.headers }, + __binaryRequest: true, }) as Core.APIPromise<{ result: DatasetsAPI.Dataset }> )._thenUnwrap((obj) => obj.result); } @@ -63,7 +65,7 @@ export interface UploadEditParams { /** * Body param: */ - body: unknown; + body: string; } export namespace Upload { diff --git a/tests/api-resources/zero-trust/dlp/datasets/upload.test.ts b/tests/api-resources/zero-trust/dlp/datasets/upload.test.ts index 83bb67cbc8..286907836d 100644 --- a/tests/api-resources/zero-trust/dlp/datasets/upload.test.ts +++ b/tests/api-resources/zero-trust/dlp/datasets/upload.test.ts @@ -36,7 +36,7 @@ describe('resource upload', () => { const responsePromise = cloudflare.zeroTrust.dlp.datasets.upload.edit( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', 0, - { account_id: 'string', body: {} }, + { account_id: 'string', body: 'string' }, ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -52,7 +52,7 @@ describe('resource upload', () => { const response = await cloudflare.zeroTrust.dlp.datasets.upload.edit( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', 0, - { account_id: 'string', body: {} }, + { account_id: 'string', body: 'string' }, ); }); }); From 1dccc2a9a8670a49a67763c1a0def3979ca3f64d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 22:47:28 +0000 Subject: [PATCH 369/473] feat(api): OpenAPI spec update via Stainless API (#866) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f6163818d6..9a470d133f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f1ab7e5d073ef27b0e08bd9fd83e406c15c1c69017c29b17dadceec459febd7b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0af4828f19ecf78eaed609758780c7c837f008f7bd0bab1e47a902a791cf3eba.yml From 868c6de4708094ddea9de1e88cc67ab487d11ee8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Jun 2024 01:32:22 +0000 Subject: [PATCH 370/473] feat(api): update via SDK Studio (#867) --- tests/api-resources/addressing/loa-documents/downloads.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/api-resources/addressing/loa-documents/downloads.test.ts b/tests/api-resources/addressing/loa-documents/downloads.test.ts index 6ad26ae05a..dc17eb1db5 100644 --- a/tests/api-resources/addressing/loa-documents/downloads.test.ts +++ b/tests/api-resources/addressing/loa-documents/downloads.test.ts @@ -9,7 +9,8 @@ const cloudflare = new Cloudflare({ }); describe('resource downloads', () => { - test('get: required and optional params', async () => { + // TODO: address broken spotlight error - https://github.com/cloudflare/cloudflare-typescript/actions/runs/9456639475/job/26048931174?pr=498#step:5:489 + test.skip('get: required and optional params', async () => { const response = await cloudflare.addressing.loaDocuments.downloads.get( 'd933b1530bc56c9953cf8ce166da8004', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, From 040a73fb675841dd7698c48d210d8d35ceaaa169 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Jun 2024 08:56:34 +0000 Subject: [PATCH 371/473] feat(api): OpenAPI spec update via Stainless API (#868) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9a470d133f..63ee54ee2b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0af4828f19ecf78eaed609758780c7c837f008f7bd0bab1e47a902a791cf3eba.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1621fb6b04eebbe830d6278109c795ad58da5fabdde174fea2fa2d5cc0a2a6e7.yml From dc78af3ed0e68a0401cdd7384856061016d4635e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:04:41 +0000 Subject: [PATCH 372/473] feat(api): OpenAPI spec update via Stainless API (#869) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 63ee54ee2b..a5cd29944c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1621fb6b04eebbe830d6278109c795ad58da5fabdde174fea2fa2d5cc0a2a6e7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-808f6ad1ec4946bfa2de623df9e6b47369a325e530eb5944671f18f11024b2e4.yml From d4a00b00110faf589aae2e07a61d81d3253a9a47 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Jun 2024 15:03:07 +0000 Subject: [PATCH 373/473] feat(api): OpenAPI spec update via Stainless API (#870) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a5cd29944c..a3ab103b78 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-808f6ad1ec4946bfa2de623df9e6b47369a325e530eb5944671f18f11024b2e4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-21b47a69bc32776f3294f3c636cad301b509524877079e2477fd4f306b9c123b.yml From a3fd253b9a8f2436bed8706916fd70fa356e47c5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Jun 2024 15:49:18 +0000 Subject: [PATCH 374/473] feat(api): OpenAPI spec update via Stainless API (#871) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a3ab103b78..6df0dd1533 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-21b47a69bc32776f3294f3c636cad301b509524877079e2477fd4f306b9c123b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3dbd1eb87fca83bbc2f9437df898269e03c56e67cd37ee62ccb3f7e1232eb606.yml From f403fc2799942af5ba8823d810ebb06695087aef Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Jun 2024 16:35:43 +0000 Subject: [PATCH 375/473] feat(api): OpenAPI spec update via Stainless API (#872) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6df0dd1533..71726454a9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3dbd1eb87fca83bbc2f9437df898269e03c56e67cd37ee62ccb3f7e1232eb606.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4220c0316b6a5dada3587bc54e55df7d6f77bc9509a1e4ecff7273928d079843.yml From 2c38c6998f715723117fee04c6a876690765e106 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Jun 2024 20:34:24 +0000 Subject: [PATCH 376/473] feat(api): OpenAPI spec update via Stainless API (#873) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 71726454a9..c31bc4bb3d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4220c0316b6a5dada3587bc54e55df7d6f77bc9509a1e4ecff7273928d079843.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-edcf9ad6aa034e166b4e50019579df2a77135741fecdb5c836cf6352ff4a1e1a.yml From 724f81680e43dcc27b08eae6a4409c72b70b58d8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Jun 2024 20:43:41 +0000 Subject: [PATCH 377/473] feat(api): OpenAPI spec update via Stainless API (#874) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c31bc4bb3d..655f5af9cf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-edcf9ad6aa034e166b4e50019579df2a77135741fecdb5c836cf6352ff4a1e1a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3ea4936546f621c7849b96e75c935cb8242eef6497615bf83ae09dff102a1827.yml From b37624d1bd18647e2493b2c56234d7f32292dce8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Jun 2024 22:08:56 +0000 Subject: [PATCH 378/473] feat(api): OpenAPI spec update via Stainless API (#875) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 655f5af9cf..d92ca39529 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3ea4936546f621c7849b96e75c935cb8242eef6497615bf83ae09dff102a1827.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b57c143aface6815ba3fea56b8918bf3585a783920aab504c0f5290ddaa6c223.yml From 55ee4715e41997472ea2bf09eb2d4ef0377c3e6f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Jun 2024 22:17:31 +0000 Subject: [PATCH 379/473] feat(api): OpenAPI spec update via Stainless API (#876) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d92ca39529..c93e918343 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b57c143aface6815ba3fea56b8918bf3585a783920aab504c0f5290ddaa6c223.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c6936210883e7f0b45c6934943092702ee1e70750421fb07777b53fbe0829b97.yml From 2564da2d0ee5f7c7433d65329e6ffbf26900b05b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Jun 2024 23:11:29 +0000 Subject: [PATCH 380/473] feat(api): OpenAPI spec update via Stainless API (#877) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c93e918343..e5899477ae 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c6936210883e7f0b45c6934943092702ee1e70750421fb07777b53fbe0829b97.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-869da9197e7a5cc155e776b632c1bc39c4e80b33faa17c0ba4ec02002573c018.yml From 0fbfd60a4efc04236ba729f2fe22d58332d940c6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 05:55:39 +0000 Subject: [PATCH 381/473] feat(api): update via SDK Studio (#878) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e5899477ae..9a470d133f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-869da9197e7a5cc155e776b632c1bc39c4e80b33faa17c0ba4ec02002573c018.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0af4828f19ecf78eaed609758780c7c837f008f7bd0bab1e47a902a791cf3eba.yml From 692e6fc9508729925bd25953424fe7022055a782 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 09:29:12 +0000 Subject: [PATCH 382/473] feat(api): OpenAPI spec update via Stainless API (#879) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9a470d133f..d92ca39529 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0af4828f19ecf78eaed609758780c7c837f008f7bd0bab1e47a902a791cf3eba.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b57c143aface6815ba3fea56b8918bf3585a783920aab504c0f5290ddaa6c223.yml From 260df4ef0f68325a78a6e46f100218ba7c03d6e8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 09:31:48 +0000 Subject: [PATCH 383/473] feat(api): OpenAPI spec update via Stainless API (#880) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d92ca39529..e5899477ae 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b57c143aface6815ba3fea56b8918bf3585a783920aab504c0f5290ddaa6c223.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-869da9197e7a5cc155e776b632c1bc39c4e80b33faa17c0ba4ec02002573c018.yml From 40913d1f2c56a6861eb60e7ec9e66233fc2c970c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 11:03:22 +0000 Subject: [PATCH 384/473] feat(api): OpenAPI spec update via Stainless API (#881) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e5899477ae..d92ca39529 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-869da9197e7a5cc155e776b632c1bc39c4e80b33faa17c0ba4ec02002573c018.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b57c143aface6815ba3fea56b8918bf3585a783920aab504c0f5290ddaa6c223.yml From f09fb4adeef85bc65523e77311045a264c3056fb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 11:05:45 +0000 Subject: [PATCH 385/473] feat(api): OpenAPI spec update via Stainless API (#882) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d92ca39529..c93e918343 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b57c143aface6815ba3fea56b8918bf3585a783920aab504c0f5290ddaa6c223.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c6936210883e7f0b45c6934943092702ee1e70750421fb07777b53fbe0829b97.yml From f0a7452b15e33a70e4ea7c3cf3968904731c5a8a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 11:16:28 +0000 Subject: [PATCH 386/473] feat(api): OpenAPI spec update via Stainless API (#883) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c93e918343..c1d464865f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c6936210883e7f0b45c6934943092702ee1e70750421fb07777b53fbe0829b97.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-799a9bbf5649fd0d0530e2b7cd45106c66c52539d1ff188e812b00570931aef0.yml From 7f9f80be9c16769e37d3a8b84fa0399ecac3b884 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 12:57:22 +0000 Subject: [PATCH 387/473] feat(api): OpenAPI spec update via Stainless API (#884) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c1d464865f..10556b9b00 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-799a9bbf5649fd0d0530e2b7cd45106c66c52539d1ff188e812b00570931aef0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6e72e9fb06c3ae4b5c549e441f8f6fb151d8e3c7c58e4e8d6b93a375b23100d0.yml From 7df9888ff7446be89d7d6fe0e6ce8770fe525190 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:10:06 +0000 Subject: [PATCH 388/473] feat(api): OpenAPI spec update via Stainless API (#885) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 10556b9b00..c1d464865f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6e72e9fb06c3ae4b5c549e441f8f6fb151d8e3c7c58e4e8d6b93a375b23100d0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-799a9bbf5649fd0d0530e2b7cd45106c66c52539d1ff188e812b00570931aef0.yml From 5d2712406bfe8f288a1dccb038e41f0099b0e2a9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:12:24 +0000 Subject: [PATCH 389/473] feat(api): OpenAPI spec update via Stainless API (#886) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c1d464865f..6fde78fdc7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-799a9bbf5649fd0d0530e2b7cd45106c66c52539d1ff188e812b00570931aef0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fe0ee00408caf027bceb4697ef04630628dbe49bbba41d7c3e05239e8a2a10cb.yml From 2e18495cfe502342d2be72ef56ebeaf625e060b8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:14:50 +0000 Subject: [PATCH 390/473] feat(api): OpenAPI spec update via Stainless API (#887) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6fde78fdc7..10556b9b00 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fe0ee00408caf027bceb4697ef04630628dbe49bbba41d7c3e05239e8a2a10cb.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6e72e9fb06c3ae4b5c549e441f8f6fb151d8e3c7c58e4e8d6b93a375b23100d0.yml From d3c25cbdcac6bf59f3aaa9703eef4ca47bd1e932 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:37:06 +0000 Subject: [PATCH 391/473] feat(api): OpenAPI spec update via Stainless API (#888) --- .stats.yml | 2 +- src/resources/ai-gateway/logs.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 10556b9b00..695ddd7d27 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6e72e9fb06c3ae4b5c549e441f8f6fb151d8e3c7c58e4e8d6b93a375b23100d0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-48e28a02de2c33ece25ad1d8b607437a22080c5dedf1fdc6a3a6376191511969.yml diff --git a/src/resources/ai-gateway/logs.ts b/src/resources/ai-gateway/logs.ts index 4601768b1b..876943c864 100644 --- a/src/resources/ai-gateway/logs.ts +++ b/src/resources/ai-gateway/logs.ts @@ -49,8 +49,12 @@ export namespace LogGetResponse { metadata?: string; + request_content_type?: string; + request_type?: string; + response_content_type?: string; + status_code?: number; step?: number; From cc1e283a978b9d06d6493b928f0012f481e12bdd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:54:29 +0000 Subject: [PATCH 392/473] feat(api): OpenAPI spec update via Stainless API (#889) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 695ddd7d27..42f2e9dfae 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-48e28a02de2c33ece25ad1d8b607437a22080c5dedf1fdc6a3a6376191511969.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f7189cd1704f80d8969496b778da756eb0513a1ff672a7b92832621a442392df.yml From 599612945d4b2f8bfe24e57cccf9dfbd28d38b97 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 15:21:13 +0000 Subject: [PATCH 393/473] feat(api): OpenAPI spec update via Stainless API (#890) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 42f2e9dfae..1ec79c56fc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f7189cd1704f80d8969496b778da756eb0513a1ff672a7b92832621a442392df.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b0b298b696064472a3286b206fea41a653304187a69a9d0f0c30d58ff6b94d93.yml From cf9e4b944ffe23fe0a48aea78d87f19bb4dc6a61 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 15:25:56 +0000 Subject: [PATCH 394/473] feat(api): OpenAPI spec update via Stainless API (#891) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1ec79c56fc..1a485b2e26 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b0b298b696064472a3286b206fea41a653304187a69a9d0f0c30d58ff6b94d93.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c75e08772b144c7d39368408731ab6653af70f38c28776c04deeed19e186ad22.yml From b0dbae6098a44e17498abcd4682ced371b908888 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 15:30:18 +0000 Subject: [PATCH 395/473] feat(api): OpenAPI spec update via Stainless API (#892) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1a485b2e26..179d467f7b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c75e08772b144c7d39368408731ab6653af70f38c28776c04deeed19e186ad22.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-461929b1b5afaf566588db157668b281c06fc476c889e6de6d2dc85684dd3b0b.yml From 90e0520cbf848fe39c1db7ae066b48636d85b4d6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 16:00:51 +0000 Subject: [PATCH 396/473] feat(api): OpenAPI spec update via Stainless API (#893) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 179d467f7b..1a485b2e26 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-461929b1b5afaf566588db157668b281c06fc476c889e6de6d2dc85684dd3b0b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c75e08772b144c7d39368408731ab6653af70f38c28776c04deeed19e186ad22.yml From 55535be1261e48a9abffbf28b87a1b3dcca91a12 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 16:47:47 +0000 Subject: [PATCH 397/473] feat(api): OpenAPI spec update via Stainless API (#894) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1a485b2e26..e9195a53d7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c75e08772b144c7d39368408731ab6653af70f38c28776c04deeed19e186ad22.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3b8f040caccf466c729ad97c89d1d67efa0db92032827dbb89bdb534d512776a.yml From 858190b2c3a6bccbd028a886b67b0c6d818a46cb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 17:30:42 +0000 Subject: [PATCH 398/473] feat(api): OpenAPI spec update via Stainless API (#895) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e9195a53d7..1ec79c56fc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3b8f040caccf466c729ad97c89d1d67efa0db92032827dbb89bdb534d512776a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b0b298b696064472a3286b206fea41a653304187a69a9d0f0c30d58ff6b94d93.yml From 7ceb4b73fc7bad4a3921b77273be55716a276177 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 17:33:11 +0000 Subject: [PATCH 399/473] feat(api): OpenAPI spec update via Stainless API (#896) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1ec79c56fc..1a485b2e26 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b0b298b696064472a3286b206fea41a653304187a69a9d0f0c30d58ff6b94d93.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c75e08772b144c7d39368408731ab6653af70f38c28776c04deeed19e186ad22.yml From 58302708b1e1b7cc27afdb65fb66d89cf0d2fbaf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 17:35:33 +0000 Subject: [PATCH 400/473] feat(api): OpenAPI spec update via Stainless API (#897) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1a485b2e26..179d467f7b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c75e08772b144c7d39368408731ab6653af70f38c28776c04deeed19e186ad22.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-461929b1b5afaf566588db157668b281c06fc476c889e6de6d2dc85684dd3b0b.yml From 1be3891b3a0dbbe38730087a0efc8867c0809b92 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 19:11:18 +0000 Subject: [PATCH 401/473] feat(api): OpenAPI spec update via Stainless API (#898) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 179d467f7b..e95c24fcea 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-461929b1b5afaf566588db157668b281c06fc476c889e6de6d2dc85684dd3b0b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-10a753356d5981b9dc2ea375f82d6d7394b33a3479852fabb987883dff9d30d9.yml From 68d337680f34e389cc2f9931cc14cc581f55715b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 19:25:51 +0000 Subject: [PATCH 402/473] feat(api): OpenAPI spec update via Stainless API (#899) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e95c24fcea..87bd020b67 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-10a753356d5981b9dc2ea375f82d6d7394b33a3479852fabb987883dff9d30d9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-809dc71ed8eb89889ef334ca5c906e9007132a6823ca2e457eaa104c171f48aa.yml From 7835dbe41b5fb4de3026df05185f50ef784b60af Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 20:59:36 +0000 Subject: [PATCH 403/473] feat(api): OpenAPI spec update via Stainless API (#900) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 87bd020b67..16df9bdbb7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-809dc71ed8eb89889ef334ca5c906e9007132a6823ca2e457eaa104c171f48aa.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6a8b418c4ee750ec86822d47288511679fac8f8c4f67ce699f726925fd0eba16.yml From 575667c759960dd504a397eb85d559f3a71b2695 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 21:08:35 +0000 Subject: [PATCH 404/473] feat(api): OpenAPI spec update via Stainless API (#901) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 16df9bdbb7..246b487186 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6a8b418c4ee750ec86822d47288511679fac8f8c4f67ce699f726925fd0eba16.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-96b5069e416336d61323d8bcf354e7c821962a2d5c727d93a42d8a71dd66f345.yml From 7bb8af2ac8a07d72f060ef6d378e47d1dbdbb80d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 21:10:56 +0000 Subject: [PATCH 405/473] feat(api): OpenAPI spec update via Stainless API (#902) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 246b487186..16df9bdbb7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-96b5069e416336d61323d8bcf354e7c821962a2d5c727d93a42d8a71dd66f345.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6a8b418c4ee750ec86822d47288511679fac8f8c4f67ce699f726925fd0eba16.yml From 056e03372daf8a512e492310cbc0f16952277ad8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 21:14:25 +0000 Subject: [PATCH 406/473] feat(api): OpenAPI spec update via Stainless API (#903) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 16df9bdbb7..afacac1c24 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6a8b418c4ee750ec86822d47288511679fac8f8c4f67ce699f726925fd0eba16.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e9286bfc3a8928017faeb1e13647ed442f40920306240a58bef108882279838a.yml From aefe0a549fadc944985e7b55c910203b62e4ea16 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 21:36:16 +0000 Subject: [PATCH 407/473] feat(api): OpenAPI spec update via Stainless API (#904) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index afacac1c24..71fd807cc3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e9286bfc3a8928017faeb1e13647ed442f40920306240a58bef108882279838a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8dcef9f58449044ae01861fe3fab751073a39aa953b36da3bb3f413ea2cafbc2.yml From 5ac6880ce2bc1fdcaf7ffd283379b53e6e150ffe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 22:31:13 +0000 Subject: [PATCH 408/473] feat(api): OpenAPI spec update via Stainless API (#905) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 71fd807cc3..c4ad890aa3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8dcef9f58449044ae01861fe3fab751073a39aa953b36da3bb3f413ea2cafbc2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-006fe70343aa3ef4a560a2cd1a8d68653d4f838c85aeab7106e1fbb79999d3d4.yml From 337edc3fdd4b889c6cb31c5f49e06c831dee3c9a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 22:33:35 +0000 Subject: [PATCH 409/473] feat(api): OpenAPI spec update via Stainless API (#906) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c4ad890aa3..71fd807cc3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-006fe70343aa3ef4a560a2cd1a8d68653d4f838c85aeab7106e1fbb79999d3d4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8dcef9f58449044ae01861fe3fab751073a39aa953b36da3bb3f413ea2cafbc2.yml From f4505315b3cbcf6cf877ecd0812b4f04858b3e06 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 13 Jun 2024 01:31:24 +0000 Subject: [PATCH 410/473] feat(api): OpenAPI spec update via Stainless API (#907) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 71fd807cc3..e527984a91 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8dcef9f58449044ae01861fe3fab751073a39aa953b36da3bb3f413ea2cafbc2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d74ff52531eba014ef7094d273b7c762dabc31c730dc5dfadb9eaaef49e34f91.yml From d12763d49b47a9455146d8379c02435c8352d8bd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 13 Jun 2024 10:09:09 +0000 Subject: [PATCH 411/473] feat(api): OpenAPI spec update via Stainless API (#908) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e527984a91..6c39e78a8e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d74ff52531eba014ef7094d273b7c762dabc31c730dc5dfadb9eaaef49e34f91.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-41c018ac6326b548545294d1e9b667f10cb5e0337351b34407d6e1eaf0ef29a6.yml From 68269307be1737dd973c371529a4f62b2c32441c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 13 Jun 2024 10:27:12 +0000 Subject: [PATCH 412/473] feat(api): OpenAPI spec update via Stainless API (#909) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6c39e78a8e..e527984a91 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-41c018ac6326b548545294d1e9b667f10cb5e0337351b34407d6e1eaf0ef29a6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d74ff52531eba014ef7094d273b7c762dabc31c730dc5dfadb9eaaef49e34f91.yml From b015d510797060337081aabe2a51dae1a1960481 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 13 Jun 2024 11:28:07 +0000 Subject: [PATCH 413/473] feat(api): OpenAPI spec update via Stainless API (#910) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e527984a91..c4ad890aa3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d74ff52531eba014ef7094d273b7c762dabc31c730dc5dfadb9eaaef49e34f91.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-006fe70343aa3ef4a560a2cd1a8d68653d4f838c85aeab7106e1fbb79999d3d4.yml From 27211e2b17f77d41f65c3cac955de66e3896d2d8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 13 Jun 2024 12:52:24 +0000 Subject: [PATCH 414/473] feat(api): OpenAPI spec update via Stainless API (#911) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c4ad890aa3..6c39e78a8e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-006fe70343aa3ef4a560a2cd1a8d68653d4f838c85aeab7106e1fbb79999d3d4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-41c018ac6326b548545294d1e9b667f10cb5e0337351b34407d6e1eaf0ef29a6.yml From 845c57a68e0f9ec30bab763fff47ff7dfd509994 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 13 Jun 2024 13:10:00 +0000 Subject: [PATCH 415/473] feat(api): OpenAPI spec update via Stainless API (#912) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6c39e78a8e..e527984a91 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-41c018ac6326b548545294d1e9b667f10cb5e0337351b34407d6e1eaf0ef29a6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d74ff52531eba014ef7094d273b7c762dabc31c730dc5dfadb9eaaef49e34f91.yml From 8030b6997abe4d910612737a260c17cc7ffae003 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 13 Jun 2024 14:10:56 +0000 Subject: [PATCH 416/473] feat(api): OpenAPI spec update via Stainless API (#913) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e527984a91..021924421a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d74ff52531eba014ef7094d273b7c762dabc31c730dc5dfadb9eaaef49e34f91.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3d58351dc0fdbc99a810dbf8010a0b78ee693ef3be9b656377bf1eeed0e0c8b6.yml From d962a85333af71e21efa956389ab8a720f5b9ed9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 13 Jun 2024 15:19:27 +0000 Subject: [PATCH 417/473] feat(api): OpenAPI spec update via Stainless API (#914) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 021924421a..6c39e78a8e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3d58351dc0fdbc99a810dbf8010a0b78ee693ef3be9b656377bf1eeed0e0c8b6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-41c018ac6326b548545294d1e9b667f10cb5e0337351b34407d6e1eaf0ef29a6.yml From 8978d7544cc72f3789419f28cc45ac5ff7b3fbb5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 13 Jun 2024 15:27:20 +0000 Subject: [PATCH 418/473] feat(api): OpenAPI spec update via Stainless API (#915) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6c39e78a8e..c4ad890aa3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-41c018ac6326b548545294d1e9b667f10cb5e0337351b34407d6e1eaf0ef29a6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-006fe70343aa3ef4a560a2cd1a8d68653d4f838c85aeab7106e1fbb79999d3d4.yml From 8c2f2e9001312618109428f227deeeb46fdbdd9b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Jun 2024 04:29:39 +0000 Subject: [PATCH 419/473] feat(api): update via SDK Studio (#916) --- .stats.yml | 2 +- api.md | 20 +- src/resources/accounts/accounts.ts | 2 + src/resources/accounts/index.ts | 2 + src/resources/accounts/members.ts | 1128 ++++++++++------- src/resources/accounts/roles.ts | 6 + .../addressing/address-maps/address-maps.ts | 2 + src/resources/kv/namespaces/bulk.ts | 14 +- src/resources/kv/namespaces/index.ts | 1 - src/resources/kv/namespaces/keys.ts | 2 +- src/resources/kv/namespaces/metadata.ts | 2 +- src/resources/kv/namespaces/namespaces.ts | 13 +- src/resources/kv/namespaces/values.ts | 23 +- src/resources/memberships.ts | 527 ++++---- src/resources/shared.ts | 2 - .../user/tokens/permission-groups.ts | 2 +- src/resources/user/tokens/tokens.ts | 19 +- src/resources/workers/scripts/index.ts | 1 + src/resources/workers/scripts/scripts.ts | 1 + src/resources/workers/scripts/versions.ts | 41 +- tests/api-resources/accounts/members.test.ts | 22 +- tests/api-resources/accounts/roles.test.ts | 16 +- .../address-maps/address-maps.test.ts | 18 +- .../api-resources/kv/namespaces/bulk.test.ts | 6 +- .../kv/namespaces/values.test.ts | 15 - .../api-resources/user/tokens/tokens.test.ts | 30 +- .../workers/scripts/versions.test.ts | 3 + 27 files changed, 1116 insertions(+), 804 deletions(-) diff --git a/.stats.yml b/.stats.yml index c4ad890aa3..cf68beefb0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-006fe70343aa3ef4a560a2cd1a8d68653d4f838c85aeab7106e1fbb79999d3d4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-af1ecaabf305033e1f88b63fa9ff708149d2e8f79c0050c0e046d010c668038c.yml diff --git a/api.md b/api.md index d51d603e37..0691c8afdd 100644 --- a/api.md +++ b/api.md @@ -42,6 +42,7 @@ Types: - UserWithInviteCode - MemberCreateResponse - MemberUpdateResponse +- MemberListResponse - MemberDeleteResponse - MemberGetResponse @@ -49,7 +50,7 @@ Methods: - client.accounts.members.create({ ...params }) -> MemberCreateResponse - client.accounts.members.update(memberId, { ...params }) -> MemberUpdateResponse -- client.accounts.members.list({ ...params }) -> MembersV4PagePaginationArray +- client.accounts.members.list({ ...params }) -> MemberListResponsesV4PagePaginationArray - client.accounts.members.delete(memberId, { ...params }) -> MemberDeleteResponse | null - client.accounts.members.get(memberId, { ...params }) -> MemberGetResponse @@ -2381,7 +2382,7 @@ Types: Methods: - client.workers.scripts.versions.create(scriptName, { ...params }) -> VersionCreateResponse -- client.workers.scripts.versions.list(scriptName, { ...params }) -> VersionListResponse +- client.workers.scripts.versions.list(scriptName, { ...params }) -> VersionListResponsesV4PagePagination - client.workers.scripts.versions.get(scriptName, versionId, { ...params }) -> VersionGetResponse ## AccountSettings @@ -2434,9 +2435,9 @@ Types: Methods: - client.kv.namespaces.create({ ...params }) -> Namespace -- client.kv.namespaces.update(namespaceId, { ...params }) -> NamespaceUpdateResponse +- client.kv.namespaces.update(namespaceId, { ...params }) -> NamespaceUpdateResponse | null - client.kv.namespaces.list({ ...params }) -> NamespacesV4PagePaginationArray -- client.kv.namespaces.delete(namespaceId, { ...params }) -> NamespaceDeleteResponse +- client.kv.namespaces.delete(namespaceId, { ...params }) -> NamespaceDeleteResponse | null - client.kv.namespaces.get(namespaceId, { ...params }) -> Namespace ### Bulk @@ -2448,8 +2449,8 @@ Types: Methods: -- client.kv.namespaces.bulk.update(namespaceId, [ ...body ]) -> BulkUpdateResponse -- client.kv.namespaces.bulk.delete(namespaceId, { ...params }) -> BulkDeleteResponse +- client.kv.namespaces.bulk.update(namespaceId, [ ...body ]) -> BulkUpdateResponse | null +- client.kv.namespaces.bulk.delete(namespaceId, { ...params }) -> BulkDeleteResponse | null ### Keys @@ -2477,13 +2478,12 @@ Types: - ValueUpdateResponse - ValueDeleteResponse -- ValueGetResponse Methods: -- client.kv.namespaces.values.update(namespaceId, keyName, { ...params }) -> ValueUpdateResponse -- client.kv.namespaces.values.delete(namespaceId, keyName, { ...params }) -> ValueDeleteResponse -- client.kv.namespaces.values.get(namespaceId, keyName, { ...params }) -> string +- client.kv.namespaces.values.update(namespaceId, keyName, { ...params }) -> ValueUpdateResponse | null +- client.kv.namespaces.values.delete(namespaceId, keyName, { ...params }) -> ValueDeleteResponse | null +- client.kv.namespaces.values.get(namespaceId, keyName, { ...params }) -> Response # DurableObjects diff --git a/src/resources/accounts/accounts.ts b/src/resources/accounts/accounts.ts index d43722798d..1fba55106f 100644 --- a/src/resources/accounts/accounts.ts +++ b/src/resources/accounts/accounts.ts @@ -196,8 +196,10 @@ export namespace Accounts { export import UserWithInviteCode = MembersAPI.UserWithInviteCode; export import MemberCreateResponse = MembersAPI.MemberCreateResponse; export import MemberUpdateResponse = MembersAPI.MemberUpdateResponse; + export import MemberListResponse = MembersAPI.MemberListResponse; export import MemberDeleteResponse = MembersAPI.MemberDeleteResponse; export import MemberGetResponse = MembersAPI.MemberGetResponse; + export import MemberListResponsesV4PagePaginationArray = MembersAPI.MemberListResponsesV4PagePaginationArray; export import MemberCreateParams = MembersAPI.MemberCreateParams; export import MemberUpdateParams = MembersAPI.MemberUpdateParams; export import MemberListParams = MembersAPI.MemberListParams; diff --git a/src/resources/accounts/index.ts b/src/resources/accounts/index.ts index f7902ad496..9651605ee3 100644 --- a/src/resources/accounts/index.ts +++ b/src/resources/accounts/index.ts @@ -7,6 +7,7 @@ export { UserWithInviteCode, MemberCreateResponse, MemberUpdateResponse, + MemberListResponse, MemberDeleteResponse, MemberGetResponse, MemberCreateParams, @@ -14,5 +15,6 @@ export { MemberListParams, MemberDeleteParams, MemberGetParams, + MemberListResponsesV4PagePaginationArray, Members, } from './members'; diff --git a/src/resources/accounts/members.ts b/src/resources/accounts/members.ts index ed8693a525..ca561d89d4 100644 --- a/src/resources/accounts/members.ts +++ b/src/resources/accounts/members.ts @@ -4,8 +4,7 @@ import * as Core from '../../core'; import { APIResource } from '../../resource'; import * as MembersAPI from './members'; import * as Shared from '../shared'; -import { MembersV4PagePaginationArray } from '../shared'; -import { type V4PagePaginationArrayParams } from '../../pagination'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class Members extends APIResource { /** @@ -13,7 +12,11 @@ export class Members extends APIResource { */ create(params: MemberCreateParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, ...body } = params; - return this._client.post(`/accounts/${account_id}/members`, { body, ...options }); + return ( + this._client.post(`/accounts/${account_id}/members`, { body, ...options }) as Core.APIPromise<{ + result: MemberCreateResponse; + }> + )._thenUnwrap((obj) => obj.result); } /** @@ -25,7 +28,12 @@ export class Members extends APIResource { options?: Core.RequestOptions, ): Core.APIPromise { const { account_id, ...body } = params; - return this._client.put(`/accounts/${account_id}/members/${memberId}`, { body, ...options }); + return ( + this._client.put(`/accounts/${account_id}/members/${memberId}`, { + body, + ...options, + }) as Core.APIPromise<{ result: MemberUpdateResponse }> + )._thenUnwrap((obj) => obj.result); } /** @@ -34,12 +42,13 @@ export class Members extends APIResource { list( params: MemberListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id, ...query } = params; - return this._client.getAPIList(`/accounts/${account_id}/members`, MembersV4PagePaginationArray, { - query, - ...options, - }); + return this._client.getAPIList( + `/accounts/${account_id}/members`, + MemberListResponsesV4PagePaginationArray, + { query, ...options }, + ); } /** @@ -67,10 +76,16 @@ export class Members extends APIResource { options?: Core.RequestOptions, ): Core.APIPromise { const { account_id } = params; - return this._client.get(`/accounts/${account_id}/members/${memberId}`, options); + return ( + this._client.get(`/accounts/${account_id}/members/${memberId}`, options) as Core.APIPromise<{ + result: MemberGetResponse; + }> + )._thenUnwrap((obj) => obj.result); } } +export class MemberListResponsesV4PagePaginationArray extends V4PagePaginationArray {} + /** * Whether the user is a member of the organization or has an invitation pending. */ @@ -183,578 +198,833 @@ export namespace UserWithInviteCode { } } -export type MemberCreateResponse = - | MemberCreateResponse.IamAPIResponseCommon - | MemberCreateResponse.IamAPIResponseCommon; +export interface MemberCreateResponse { + /** + * Membership identifier tag. + */ + id?: string; + + /** + * Access policy for the membership + */ + policies?: Array; + + /** + * Roles assigned to this Member. + */ + roles?: Array; + + /** + * A member's status in the account. + */ + status?: 'accepted' | 'pending'; + + /** + * Details of the user associated to the membership. + */ + user?: MemberCreateResponse.User; +} export namespace MemberCreateResponse { - export interface IamAPIResponseCommon { - result?: Shared.Member; - } + export interface Policy { + /** + * Policy identifier. + */ + id?: string; + + /** + * Allow or deny operations against the resources. + */ + access?: 'allow' | 'deny'; - export interface IamAPIResponseCommon { - result?: IamAPIResponseCommon.Result; + /** + * A set of permission groups that are specified to the policy. + */ + permission_groups?: Array; + + /** + * A list of resource groups that the policy applies to. + */ + resource_groups?: Array; } - export namespace IamAPIResponseCommon { - export interface Result { + export namespace Policy { + /** + * A named group of permissions that map to a group of operations against + * resources. + */ + export interface PermissionGroup { /** - * Membership identifier tag. + * Identifier of the group. */ - id?: string; + id: string; /** - * Access policy for the membership + * Attributes associated to the permission group. */ - policies?: Array; + meta?: unknown; /** - * Roles assigned to this Member. + * Name of the group. */ - roles?: Array; + name?: string; + } + /** + * A group of scoped resources. + */ + export interface ResourceGroup { /** - * A member's status in the account. + * Identifier of the group. */ - status?: 'accepted' | 'pending'; + id: string; /** - * Details of the user associated to the membership. + * The scope associated to the resource group */ - user?: Result.User; - } + scope: Array; - export namespace Result { - export interface Policy { - /** - * Policy identifier. - */ - id?: string; + /** + * Attributes associated to the resource group. + */ + meta?: unknown; - /** - * Allow or deny operations against the resources. - */ - access?: 'allow' | 'deny'; + /** + * Name of the resource group. + */ + name?: string; + } + export namespace ResourceGroup { + /** + * A scope is a combination of scope objects which provides additional context. + */ + export interface Scope { /** - * A set of permission groups that are specified to the policy. + * This is a combination of pre-defined resource name and identifier (like Account + * ID etc.) */ - permission_groups?: Array; + key: string; /** - * A list of resource groups that the policy applies to. + * A list of scope objects for additional context. */ - resource_groups?: Array; + objects: Array; } - export namespace Policy { + export namespace Scope { /** - * A named group of permissions that map to a group of operations against - * resources. + * A scope object represents any resource that can have actions applied against + * invite. */ - export interface PermissionGroup { - /** - * Identifier of the group. - */ - id: string; - + export interface Object { /** - * Name of the group. + * This is a combination of pre-defined resource name and identifier (like Zone ID + * etc.) */ - name?: string; + key: string; } + } + } + } - /** - * A group of scoped resources. - */ - export interface ResourceGroup { - /** - * Identifier of the group. - */ - id: string; + /** + * Details of the user associated to the membership. + */ + export interface User { + /** + * The contact email address of the user. + */ + email: string; - /** - * Attributes associated to the resource group. - */ - meta?: unknown; + /** + * Identifier + */ + id?: string; - /** - * Name of the resource group. - */ - name?: string; + /** + * User's first name + */ + first_name?: string | null; - /** - * The scope associated to the resource group - */ - scope?: Array; - } + /** + * User's last name + */ + last_name?: string | null; - export namespace ResourceGroup { - /** - * A scope is a combination of scope objects which provides additional context. - */ - export interface Scope { - /** - * This is a combination of pre-defined resource name and identifier (like Account - * ID etc.) - */ - key: string; - - /** - * A list of scope objects for additional context. - */ - objects: Array; - } - - export namespace Scope { - /** - * A scope object represents any resource that can have actions applied against - * invite. - */ - export interface Object { - /** - * This is a combination of pre-defined resource name and identifier (like Account - * ID etc.) - */ - key: string; - } - } - } - } + /** + * Indicates whether two-factor authentication is enabled for the user account. + * Does not apply to API authentication. + */ + two_factor_authentication_enabled?: boolean; + } +} - /** - * Details of the user associated to the membership. - */ - export interface User { - /** - * The contact email address of the user. - */ - email: string; +export interface MemberUpdateResponse { + /** + * Membership identifier tag. + */ + id?: string; - /** - * Identifier - */ - id?: string; + /** + * Access policy for the membership + */ + policies?: Array; - /** - * User's first name - */ - first_name?: string | null; + /** + * Roles assigned to this Member. + */ + roles?: Array; - /** - * User's last name - */ - last_name?: string | null; + /** + * A member's status in the account. + */ + status?: 'accepted' | 'pending'; - /** - * Indicates whether two-factor authentication is enabled for the user account. - * Does not apply to API authentication. - */ - two_factor_authentication_enabled?: boolean; - } - } - } + /** + * Details of the user associated to the membership. + */ + user?: MemberUpdateResponse.User; } -export type MemberUpdateResponse = - | MemberUpdateResponse.IamAPIResponseCommon - | MemberUpdateResponse.IamAPIResponseCommon; - export namespace MemberUpdateResponse { - export interface IamAPIResponseCommon { - result?: Shared.Member; - } + export interface Policy { + /** + * Policy identifier. + */ + id?: string; + + /** + * Allow or deny operations against the resources. + */ + access?: 'allow' | 'deny'; - export interface IamAPIResponseCommon { - result?: IamAPIResponseCommon.Result; + /** + * A set of permission groups that are specified to the policy. + */ + permission_groups?: Array; + + /** + * A list of resource groups that the policy applies to. + */ + resource_groups?: Array; } - export namespace IamAPIResponseCommon { - export interface Result { + export namespace Policy { + /** + * A named group of permissions that map to a group of operations against + * resources. + */ + export interface PermissionGroup { /** - * Membership identifier tag. + * Identifier of the group. */ - id?: string; + id: string; /** - * Access policy for the membership + * Attributes associated to the permission group. */ - policies?: Array; + meta?: unknown; /** - * Roles assigned to this Member. + * Name of the group. */ - roles?: Array; + name?: string; + } + /** + * A group of scoped resources. + */ + export interface ResourceGroup { /** - * A member's status in the account. + * Identifier of the group. */ - status?: 'accepted' | 'pending'; + id: string; /** - * Details of the user associated to the membership. + * The scope associated to the resource group */ - user?: Result.User; - } + scope: Array; - export namespace Result { - export interface Policy { - /** - * Policy identifier. - */ - id?: string; + /** + * Attributes associated to the resource group. + */ + meta?: unknown; - /** - * Allow or deny operations against the resources. - */ - access?: 'allow' | 'deny'; + /** + * Name of the resource group. + */ + name?: string; + } + export namespace ResourceGroup { + /** + * A scope is a combination of scope objects which provides additional context. + */ + export interface Scope { /** - * A set of permission groups that are specified to the policy. + * This is a combination of pre-defined resource name and identifier (like Account + * ID etc.) */ - permission_groups?: Array; + key: string; /** - * A list of resource groups that the policy applies to. + * A list of scope objects for additional context. */ - resource_groups?: Array; + objects: Array; } - export namespace Policy { - /** - * A named group of permissions that map to a group of operations against - * resources. - */ - export interface PermissionGroup { - /** - * Identifier of the group. - */ - id: string; - - /** - * Name of the group. - */ - name?: string; - } - + export namespace Scope { /** - * A group of scoped resources. + * A scope object represents any resource that can have actions applied against + * invite. */ - export interface ResourceGroup { - /** - * Identifier of the group. - */ - id: string; - - /** - * Attributes associated to the resource group. - */ - meta?: unknown; - - /** - * Name of the resource group. - */ - name?: string; - + export interface Object { /** - * The scope associated to the resource group + * This is a combination of pre-defined resource name and identifier (like Zone ID + * etc.) */ - scope?: Array; - } - - export namespace ResourceGroup { - /** - * A scope is a combination of scope objects which provides additional context. - */ - export interface Scope { - /** - * This is a combination of pre-defined resource name and identifier (like Account - * ID etc.) - */ - key: string; - - /** - * A list of scope objects for additional context. - */ - objects: Array; - } - - export namespace Scope { - /** - * A scope object represents any resource that can have actions applied against - * invite. - */ - export interface Object { - /** - * This is a combination of pre-defined resource name and identifier (like Account - * ID etc.) - */ - key: string; - } - } + key: string; } } + } + } - /** - * Details of the user associated to the membership. - */ - export interface User { - /** - * The contact email address of the user. - */ - email: string; + /** + * Details of the user associated to the membership. + */ + export interface User { + /** + * The contact email address of the user. + */ + email: string; - /** - * Identifier - */ - id?: string; + /** + * Identifier + */ + id?: string; - /** - * User's first name - */ - first_name?: string | null; + /** + * User's first name + */ + first_name?: string | null; - /** - * User's last name - */ - last_name?: string | null; + /** + * User's last name + */ + last_name?: string | null; - /** - * Indicates whether two-factor authentication is enabled for the user account. - * Does not apply to API authentication. - */ - two_factor_authentication_enabled?: boolean; - } - } + /** + * Indicates whether two-factor authentication is enabled for the user account. + * Does not apply to API authentication. + */ + two_factor_authentication_enabled?: boolean; } } -export interface MemberDeleteResponse { +export interface MemberListResponse { /** - * Identifier + * Membership identifier tag. */ - id: string; -} - -export type MemberGetResponse = - | MemberGetResponse.IamAPIResponseCommon - | MemberGetResponse.IamAPIResponseCommon; + id?: string; -export namespace MemberGetResponse { - export interface IamAPIResponseCommon { - result?: Shared.Member; - } + /** + * Access policy for the membership + */ + policies?: Array; - export interface IamAPIResponseCommon { - result?: IamAPIResponseCommon.Result; - } + /** + * Roles assigned to this Member. + */ + roles?: Array; - export namespace IamAPIResponseCommon { - export interface Result { - /** - * Membership identifier tag. - */ - id?: string; + /** + * A member's status in the account. + */ + status?: 'accepted' | 'pending'; - /** - * Access policy for the membership - */ - policies?: Array; + /** + * Details of the user associated to the membership. + */ + user?: MemberListResponse.User; +} - /** - * Roles assigned to this Member. +export namespace MemberListResponse { + export interface Policy { + /** + * Policy identifier. + */ + id?: string; + + /** + * Allow or deny operations against the resources. + */ + access?: 'allow' | 'deny'; + + /** + * A set of permission groups that are specified to the policy. + */ + permission_groups?: Array; + + /** + * A list of resource groups that the policy applies to. + */ + resource_groups?: Array; + } + + export namespace Policy { + /** + * A named group of permissions that map to a group of operations against + * resources. + */ + export interface PermissionGroup { + /** + * Identifier of the group. */ - roles?: Array; + id: string; /** - * A member's status in the account. + * Attributes associated to the permission group. */ - status?: 'accepted' | 'pending'; + meta?: unknown; /** - * Details of the user associated to the membership. + * Name of the group. */ - user?: Result.User; + name?: string; } - export namespace Result { - export interface Policy { - /** - * Policy identifier. - */ - id?: string; + /** + * A group of scoped resources. + */ + export interface ResourceGroup { + /** + * Identifier of the group. + */ + id: string; - /** - * Allow or deny operations against the resources. - */ - access?: 'allow' | 'deny'; + /** + * The scope associated to the resource group + */ + scope: Array; + /** + * Attributes associated to the resource group. + */ + meta?: unknown; + + /** + * Name of the resource group. + */ + name?: string; + } + + export namespace ResourceGroup { + /** + * A scope is a combination of scope objects which provides additional context. + */ + export interface Scope { /** - * A set of permission groups that are specified to the policy. + * This is a combination of pre-defined resource name and identifier (like Account + * ID etc.) */ - permission_groups?: Array; + key: string; /** - * A list of resource groups that the policy applies to. + * A list of scope objects for additional context. */ - resource_groups?: Array; + objects: Array; } - export namespace Policy { + export namespace Scope { /** - * A named group of permissions that map to a group of operations against - * resources. + * A scope object represents any resource that can have actions applied against + * invite. */ - export interface PermissionGroup { + export interface Object { /** - * Identifier of the group. + * This is a combination of pre-defined resource name and identifier (like Zone ID + * etc.) */ - id: string; - - /** - * Name of the group. - */ - name?: string; + key: string; } + } + } + } - /** - * A group of scoped resources. - */ - export interface ResourceGroup { - /** - * Identifier of the group. - */ - id: string; + /** + * Details of the user associated to the membership. + */ + export interface User { + /** + * The contact email address of the user. + */ + email: string; - /** - * Attributes associated to the resource group. - */ - meta?: unknown; + /** + * Identifier + */ + id?: string; - /** - * Name of the resource group. - */ - name?: string; + /** + * User's first name + */ + first_name?: string | null; - /** - * The scope associated to the resource group - */ - scope?: Array; - } + /** + * User's last name + */ + last_name?: string | null; - export namespace ResourceGroup { - /** - * A scope is a combination of scope objects which provides additional context. - */ - export interface Scope { - /** - * This is a combination of pre-defined resource name and identifier (like Account - * ID etc.) - */ - key: string; - - /** - * A list of scope objects for additional context. - */ - objects: Array; - } - - export namespace Scope { - /** - * A scope object represents any resource that can have actions applied against - * invite. - */ - export interface Object { - /** - * This is a combination of pre-defined resource name and identifier (like Account - * ID etc.) - */ - key: string; - } - } - } - } + /** + * Indicates whether two-factor authentication is enabled for the user account. + * Does not apply to API authentication. + */ + two_factor_authentication_enabled?: boolean; + } +} + +export interface MemberDeleteResponse { + /** + * Identifier + */ + id: string; +} + +export interface MemberGetResponse { + /** + * Membership identifier tag. + */ + id?: string; + + /** + * Access policy for the membership + */ + policies?: Array; + + /** + * Roles assigned to this Member. + */ + roles?: Array; + + /** + * A member's status in the account. + */ + status?: 'accepted' | 'pending'; + + /** + * Details of the user associated to the membership. + */ + user?: MemberGetResponse.User; +} +export namespace MemberGetResponse { + export interface Policy { + /** + * Policy identifier. + */ + id?: string; + + /** + * Allow or deny operations against the resources. + */ + access?: 'allow' | 'deny'; + + /** + * A set of permission groups that are specified to the policy. + */ + permission_groups?: Array; + + /** + * A list of resource groups that the policy applies to. + */ + resource_groups?: Array; + } + + export namespace Policy { + /** + * A named group of permissions that map to a group of operations against + * resources. + */ + export interface PermissionGroup { /** - * Details of the user associated to the membership. + * Identifier of the group. */ - export interface User { - /** - * The contact email address of the user. - */ - email: string; + id: string; - /** - * Identifier - */ - id?: string; + /** + * Attributes associated to the permission group. + */ + meta?: unknown; + + /** + * Name of the group. + */ + name?: string; + } + + /** + * A group of scoped resources. + */ + export interface ResourceGroup { + /** + * Identifier of the group. + */ + id: string; + + /** + * The scope associated to the resource group + */ + scope: Array; + + /** + * Attributes associated to the resource group. + */ + meta?: unknown; + + /** + * Name of the resource group. + */ + name?: string; + } + export namespace ResourceGroup { + /** + * A scope is a combination of scope objects which provides additional context. + */ + export interface Scope { /** - * User's first name + * This is a combination of pre-defined resource name and identifier (like Account + * ID etc.) */ - first_name?: string | null; + key: string; /** - * User's last name + * A list of scope objects for additional context. */ - last_name?: string | null; + objects: Array; + } + export namespace Scope { /** - * Indicates whether two-factor authentication is enabled for the user account. - * Does not apply to API authentication. + * A scope object represents any resource that can have actions applied against + * invite. */ - two_factor_authentication_enabled?: boolean; + export interface Object { + /** + * This is a combination of pre-defined resource name and identifier (like Zone ID + * etc.) + */ + key: string; + } } } } -} -export interface MemberCreateParams { /** - * Path param: + * Details of the user associated to the membership. */ - account_id: string; + export interface User { + /** + * The contact email address of the user. + */ + email: string; - /** - * Body param: The contact email address of the user. - */ - email: string; + /** + * Identifier + */ + id?: string; - /** - * Body param: Array of roles associated with this member. - */ - roles: Array; + /** + * User's first name + */ + first_name?: string | null; - /** - * Body param: - */ - status?: 'accepted' | 'pending'; + /** + * User's last name + */ + last_name?: string | null; + + /** + * Indicates whether two-factor authentication is enabled for the user account. + * Does not apply to API authentication. + */ + two_factor_authentication_enabled?: boolean; + } } -export interface MemberUpdateParams { - /** - * Path param: - */ - account_id: string; +export type MemberCreateParams = + | MemberCreateParams.IamCreateMemberWithRoles + | MemberCreateParams.IamCreateMemberWithPolicies; - /** - * Body param: Roles assigned to this member. - */ - roles?: Array; +export namespace MemberCreateParams { + export interface IamCreateMemberWithRoles { + /** + * Path param: Account identifier tag. + */ + account_id: string; + + /** + * Body param: The contact email address of the user. + */ + email: string; + + /** + * Body param: Array of roles associated with this member. + */ + roles: Array; + + /** + * Body param: + */ + status?: 'accepted' | 'pending'; + } + + export interface IamCreateMemberWithPolicies { + /** + * Path param: Account identifier tag. + */ + account_id: string; + + /** + * Body param: The contact email address of the user. + */ + email: string; + + /** + * Body param: Array of policies associated with this member. + */ + policies: Array; + + /** + * Body param: + */ + status?: 'accepted' | 'pending'; + } + + export namespace IamCreateMemberWithPolicies { + export interface Policy { + /** + * Allow or deny operations against the resources. + */ + access: 'allow' | 'deny'; + + /** + * A set of permission groups that are specified to the policy. + */ + permission_groups: Array; + + /** + * A list of resource groups that the policy applies to. + */ + resource_groups: Array; + } + + export namespace Policy { + /** + * A group of permissions. + */ + export interface PermissionGroup { + /** + * Identifier of the group. + */ + id: string; + } + + /** + * A group of scoped resources. + */ + export interface ResourceGroup { + /** + * Identifier of the group. + */ + id: string; + } + } + } } +export type MemberUpdateParams = MemberUpdateParams.Member | MemberUpdateParams.IamUpdateMemberWithPolicies; + export namespace MemberUpdateParams { - export interface Role { + export interface Member { /** - * Role identifier tag. + * Path param: Account identifier tag. */ - id: string; + account_id: string; + + /** + * Body param: Roles assigned to this member. + */ + roles?: Array; + } + + export namespace Member { + export interface Role { + /** + * Role identifier tag. + */ + id: string; + } + } + + export interface IamUpdateMemberWithPolicies { + /** + * Path param: Account identifier tag. + */ + account_id: string; + + /** + * Body param: Array of policies associated with this member. + */ + policies: Array; + } + + export namespace IamUpdateMemberWithPolicies { + export interface Policy { + /** + * Allow or deny operations against the resources. + */ + access: 'allow' | 'deny'; + + /** + * A set of permission groups that are specified to the policy. + */ + permission_groups: Array; + + /** + * A list of resource groups that the policy applies to. + */ + resource_groups: Array; + } + + export namespace Policy { + /** + * A group of permissions. + */ + export interface PermissionGroup { + /** + * Identifier of the group. + */ + id: string; + } + + /** + * A group of scoped resources. + */ + export interface ResourceGroup { + /** + * Identifier of the group. + */ + id: string; + } + } } } export interface MemberListParams extends V4PagePaginationArrayParams { /** - * Path param: + * Path param: Account identifier tag. */ account_id: string; @@ -775,10 +1045,16 @@ export interface MemberListParams extends V4PagePaginationArrayParams { } export interface MemberDeleteParams { + /** + * Account identifier tag. + */ account_id: string; } export interface MemberGetParams { + /** + * Account identifier tag. + */ account_id: string; } @@ -787,13 +1063,13 @@ export namespace Members { export import UserWithInviteCode = MembersAPI.UserWithInviteCode; export import MemberCreateResponse = MembersAPI.MemberCreateResponse; export import MemberUpdateResponse = MembersAPI.MemberUpdateResponse; + export import MemberListResponse = MembersAPI.MemberListResponse; export import MemberDeleteResponse = MembersAPI.MemberDeleteResponse; export import MemberGetResponse = MembersAPI.MemberGetResponse; + export import MemberListResponsesV4PagePaginationArray = MembersAPI.MemberListResponsesV4PagePaginationArray; export import MemberCreateParams = MembersAPI.MemberCreateParams; export import MemberUpdateParams = MembersAPI.MemberUpdateParams; export import MemberListParams = MembersAPI.MemberListParams; export import MemberDeleteParams = MembersAPI.MemberDeleteParams; export import MemberGetParams = MembersAPI.MemberGetParams; } - -export { MembersV4PagePaginationArray }; diff --git a/src/resources/accounts/roles.ts b/src/resources/accounts/roles.ts index 5165f4ac44..64b9fba52b 100644 --- a/src/resources/accounts/roles.ts +++ b/src/resources/accounts/roles.ts @@ -38,10 +38,16 @@ export class Roles extends APIResource { export type RoleGetResponse = unknown; export interface RoleListParams { + /** + * Account identifier tag. + */ account_id: string; } export interface RoleGetParams { + /** + * Account identifier tag. + */ account_id: string; } diff --git a/src/resources/addressing/address-maps/address-maps.ts b/src/resources/addressing/address-maps/address-maps.ts index d4a63db063..998f542e80 100644 --- a/src/resources/addressing/address-maps/address-maps.ts +++ b/src/resources/addressing/address-maps/address-maps.ts @@ -357,6 +357,8 @@ export interface AddressMapCreateParams { export namespace AddressMapCreateParams { export interface Membership { + created_at?: string; + /** * The identifier for the membership (eg. a zone or account tag). */ diff --git a/src/resources/kv/namespaces/bulk.ts b/src/resources/kv/namespaces/bulk.ts index 3940b013c9..72bc7b5165 100644 --- a/src/resources/kv/namespaces/bulk.ts +++ b/src/resources/kv/namespaces/bulk.ts @@ -17,13 +17,13 @@ export class Bulk extends APIResource { namespaceId: string, params: BulkUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, body } = params; return ( this._client.put(`/accounts/${account_id}/storage/kv/namespaces/${namespaceId}/bulk`, { body: body, ...options, - }) as Core.APIPromise<{ result: BulkUpdateResponse }> + }) as Core.APIPromise<{ result: BulkUpdateResponse | null }> )._thenUnwrap((obj) => obj.result); } @@ -35,20 +35,20 @@ export class Bulk extends APIResource { namespaceId: string, params: BulkDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.delete( `/accounts/${account_id}/storage/kv/namespaces/${namespaceId}/bulk`, options, - ) as Core.APIPromise<{ result: BulkDeleteResponse }> + ) as Core.APIPromise<{ result: BulkDeleteResponse | null }> )._thenUnwrap((obj) => obj.result); } } -export type BulkUpdateResponse = unknown | string; +export interface BulkUpdateResponse {} -export type BulkDeleteResponse = unknown | string; +export interface BulkDeleteResponse {} export interface BulkUpdateParams { /** @@ -92,7 +92,7 @@ export namespace BulkUpdateParams { /** * Arbitrary JSON that is associated with a key. */ - metadata?: unknown; + metadata?: Record; /** * A UTF-8 encoded string to be stored, up to 25 MiB in length. diff --git a/src/resources/kv/namespaces/index.ts b/src/resources/kv/namespaces/index.ts index aae9be09ec..1fa99eaa8b 100644 --- a/src/resources/kv/namespaces/index.ts +++ b/src/resources/kv/namespaces/index.ts @@ -18,7 +18,6 @@ export { export { ValueUpdateResponse, ValueDeleteResponse, - ValueGetResponse, ValueUpdateParams, ValueDeleteParams, ValueGetParams, diff --git a/src/resources/kv/namespaces/keys.ts b/src/resources/kv/namespaces/keys.ts index 17b2c45673..52ca26dacc 100644 --- a/src/resources/kv/namespaces/keys.ts +++ b/src/resources/kv/namespaces/keys.ts @@ -45,7 +45,7 @@ export interface Key { /** * Arbitrary JSON that is associated with a key. */ - metadata?: unknown; + metadata?: Record; } export interface KeyListParams extends CursorLimitPaginationParams { diff --git a/src/resources/kv/namespaces/metadata.ts b/src/resources/kv/namespaces/metadata.ts index 1d027bf657..e1b889297a 100644 --- a/src/resources/kv/namespaces/metadata.ts +++ b/src/resources/kv/namespaces/metadata.ts @@ -29,7 +29,7 @@ export class Metadata extends APIResource { /** * Arbitrary JSON that is associated with a key. */ -export type MetadataGetResponse = unknown; +export type MetadataGetResponse = Record; export interface MetadataGetParams { /** diff --git a/src/resources/kv/namespaces/namespaces.ts b/src/resources/kv/namespaces/namespaces.ts index 71856898cb..703fa91680 100644 --- a/src/resources/kv/namespaces/namespaces.ts +++ b/src/resources/kv/namespaces/namespaces.ts @@ -37,13 +37,13 @@ export class Namespaces extends APIResource { namespaceId: string, params: NamespaceUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.put(`/accounts/${account_id}/storage/kv/namespaces/${namespaceId}`, { body, ...options, - }) as Core.APIPromise<{ result: NamespaceUpdateResponse }> + }) as Core.APIPromise<{ result: NamespaceUpdateResponse | null }> )._thenUnwrap((obj) => obj.result); } @@ -69,13 +69,13 @@ export class Namespaces extends APIResource { namespaceId: string, params: NamespaceDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.delete( `/accounts/${account_id}/storage/kv/namespaces/${namespaceId}`, options, - ) as Core.APIPromise<{ result: NamespaceDeleteResponse }> + ) as Core.APIPromise<{ result: NamespaceDeleteResponse | null }> )._thenUnwrap((obj) => obj.result); } @@ -117,9 +117,9 @@ export interface Namespace { supports_url_encoding?: boolean; } -export type NamespaceUpdateResponse = unknown | string; +export interface NamespaceUpdateResponse {} -export type NamespaceDeleteResponse = unknown | string; +export interface NamespaceDeleteResponse {} export interface NamespaceCreateParams { /** @@ -201,7 +201,6 @@ export namespace Namespaces { export import Values = ValuesAPI.Values; export import ValueUpdateResponse = ValuesAPI.ValueUpdateResponse; export import ValueDeleteResponse = ValuesAPI.ValueDeleteResponse; - export import ValueGetResponse = ValuesAPI.ValueGetResponse; export import ValueUpdateParams = ValuesAPI.ValueUpdateParams; export import ValueDeleteParams = ValuesAPI.ValueDeleteParams; export import ValueGetParams = ValuesAPI.ValueGetParams; diff --git a/src/resources/kv/namespaces/values.ts b/src/resources/kv/namespaces/values.ts index 9bb679348b..a1b4942751 100644 --- a/src/resources/kv/namespaces/values.ts +++ b/src/resources/kv/namespaces/values.ts @@ -2,6 +2,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; +import { type Response } from '../../../_shims/index'; import * as ValuesAPI from './values'; import { multipartFormRequestOptions } from '../../../core'; @@ -19,13 +20,13 @@ export class Values extends APIResource { keyName: string, params: ValueUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.put( `/accounts/${account_id}/storage/kv/namespaces/${namespaceId}/values/${keyName}`, multipartFormRequestOptions({ body, ...options }), - ) as Core.APIPromise<{ result: ValueUpdateResponse }> + ) as Core.APIPromise<{ result: ValueUpdateResponse | null }> )._thenUnwrap((obj) => obj.result); } @@ -38,13 +39,13 @@ export class Values extends APIResource { keyName: string, params: ValueDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.delete( `/accounts/${account_id}/storage/kv/namespaces/${namespaceId}/values/${keyName}`, options, - ) as Core.APIPromise<{ result: ValueDeleteResponse }> + ) as Core.APIPromise<{ result: ValueDeleteResponse | null }> )._thenUnwrap((obj) => obj.result); } @@ -60,23 +61,18 @@ export class Values extends APIResource { keyName: string, params: ValueGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return this._client.get( `/accounts/${account_id}/storage/kv/namespaces/${namespaceId}/values/${keyName}`, - { ...options, headers: { Accept: 'application/json', ...options?.headers } }, + { ...options, __binaryResponse: true }, ); } } -export type ValueUpdateResponse = unknown | string; +export interface ValueUpdateResponse {} -export type ValueDeleteResponse = unknown | string; - -/** - * A byte sequence to be stored, up to 25 MiB in length. - */ -export type ValueGetResponse = string; +export interface ValueDeleteResponse {} export interface ValueUpdateParams { /** @@ -112,7 +108,6 @@ export interface ValueGetParams { export namespace Values { export import ValueUpdateResponse = ValuesAPI.ValueUpdateResponse; export import ValueDeleteResponse = ValuesAPI.ValueDeleteResponse; - export import ValueGetResponse = ValuesAPI.ValueGetResponse; export import ValueUpdateParams = ValuesAPI.ValueUpdateParams; export import ValueDeleteParams = ValuesAPI.ValueDeleteParams; export import ValueGetParams = ValuesAPI.ValueGetParams; diff --git a/src/resources/memberships.ts b/src/resources/memberships.ts index 914b83cab3..26f55bc6cb 100644 --- a/src/resources/memberships.ts +++ b/src/resources/memberships.ts @@ -3,7 +3,6 @@ import * as Core from '../core'; import { APIResource } from '../resource'; import { isRequestOptions } from '../core'; -import * as MembershipsAPI from './memberships'; import * as Shared from './shared'; import * as AccountsAPI from './accounts/accounts'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../pagination'; @@ -17,7 +16,11 @@ export class Memberships extends APIResource { body: MembershipUpdateParams, options?: Core.RequestOptions, ): Core.APIPromise { - return this._client.put(`/memberships/${membershipId}`, { body, ...options }); + return ( + this._client.put(`/memberships/${membershipId}`, { body, ...options }) as Core.APIPromise<{ + result: MembershipUpdateResponse; + }> + )._thenUnwrap((obj) => obj.result); } /** @@ -53,7 +56,11 @@ export class Memberships extends APIResource { * Get a specific membership. */ get(membershipId: string, options?: Core.RequestOptions): Core.APIPromise { - return this._client.get(`/memberships/${membershipId}`, options); + return ( + this._client.get(`/memberships/${membershipId}`, options) as Core.APIPromise<{ + result: MembershipGetResponse; + }> + )._thenUnwrap((obj) => obj.result); } } @@ -120,179 +127,168 @@ export namespace Membership { } } -export type MembershipUpdateResponse = - | MembershipUpdateResponse.IamAPIResponseCommon - | MembershipUpdateResponse.IamAPIResponseCommon; +export interface MembershipUpdateResponse { + /** + * Membership identifier tag. + */ + id?: string; + + account?: AccountsAPI.Account; + + /** + * Enterprise only. Indicates whether or not API access is enabled specifically for + * this user on a given account. + */ + api_access_enabled?: boolean | null; + + /** + * All access permissions for the user at the account. + */ + permissions?: MembershipUpdateResponse.Permissions; + + /** + * Access policy for the membership + */ + policies?: Array; + + /** + * List of role names for the user at the account. + */ + roles?: Array; + + /** + * Status of this membership. + */ + status?: 'accepted' | 'pending' | 'rejected'; +} export namespace MembershipUpdateResponse { - export interface IamAPIResponseCommon { - result?: MembershipsAPI.Membership; + /** + * All access permissions for the user at the account. + */ + export interface Permissions { + analytics?: Shared.PermissionGrant; + + billing?: Shared.PermissionGrant; + + cache_purge?: Shared.PermissionGrant; + + dns?: Shared.PermissionGrant; + + dns_records?: Shared.PermissionGrant; + + lb?: Shared.PermissionGrant; + + logs?: Shared.PermissionGrant; + + organization?: Shared.PermissionGrant; + + ssl?: Shared.PermissionGrant; + + waf?: Shared.PermissionGrant; + + zone_settings?: Shared.PermissionGrant; + + zones?: Shared.PermissionGrant; } - export interface IamAPIResponseCommon { - result?: IamAPIResponseCommon.Result; + export interface Policy { + /** + * Policy identifier. + */ + id?: string; + + /** + * Allow or deny operations against the resources. + */ + access?: 'allow' | 'deny'; + + /** + * A set of permission groups that are specified to the policy. + */ + permission_groups?: Array; + + /** + * A list of resource groups that the policy applies to. + */ + resource_groups?: Array; } - export namespace IamAPIResponseCommon { - export interface Result { + export namespace Policy { + /** + * A named group of permissions that map to a group of operations against + * resources. + */ + export interface PermissionGroup { /** - * Membership identifier tag. + * Identifier of the group. */ - id?: string; + id: string; - account?: AccountsAPI.Account; + /** + * Attributes associated to the permission group. + */ + meta?: unknown; /** - * Enterprise only. Indicates whether or not API access is enabled specifically for - * this user on a given account. + * Name of the group. */ - api_access_enabled?: boolean | null; + name?: string; + } + /** + * A group of scoped resources. + */ + export interface ResourceGroup { /** - * All access permissions for the user at the account. + * Identifier of the group. */ - permissions?: Result.Permissions; + id: string; /** - * Access policy for the membership + * The scope associated to the resource group */ - policies?: Array; + scope: Array; /** - * List of role names for the user at the account. + * Attributes associated to the resource group. */ - roles?: Array; + meta?: unknown; /** - * Status of this membership. + * Name of the resource group. */ - status?: 'accepted' | 'pending' | 'rejected'; + name?: string; } - export namespace Result { + export namespace ResourceGroup { /** - * All access permissions for the user at the account. + * A scope is a combination of scope objects which provides additional context. */ - export interface Permissions { - analytics?: Shared.PermissionGrant; - - billing?: Shared.PermissionGrant; - - cache_purge?: Shared.PermissionGrant; - - dns?: Shared.PermissionGrant; - - dns_records?: Shared.PermissionGrant; - - lb?: Shared.PermissionGrant; - - logs?: Shared.PermissionGrant; - - organization?: Shared.PermissionGrant; - - ssl?: Shared.PermissionGrant; - - waf?: Shared.PermissionGrant; - - zone_settings?: Shared.PermissionGrant; - - zones?: Shared.PermissionGrant; - } - - export interface Policy { + export interface Scope { /** - * Policy identifier. + * This is a combination of pre-defined resource name and identifier (like Account + * ID etc.) */ - id?: string; + key: string; /** - * Allow or deny operations against the resources. + * A list of scope objects for additional context. */ - access?: 'allow' | 'deny'; - - /** - * A set of permission groups that are specified to the policy. - */ - permission_groups?: Array; - - /** - * A list of resource groups that the policy applies to. - */ - resource_groups?: Array; + objects: Array; } - export namespace Policy { + export namespace Scope { /** - * A named group of permissions that map to a group of operations against - * resources. + * A scope object represents any resource that can have actions applied against + * invite. */ - export interface PermissionGroup { - /** - * Identifier of the group. - */ - id: string; - - /** - * Name of the group. - */ - name?: string; - } - - /** - * A group of scoped resources. - */ - export interface ResourceGroup { - /** - * Identifier of the group. - */ - id: string; - - /** - * Attributes associated to the resource group. - */ - meta?: unknown; - - /** - * Name of the resource group. - */ - name?: string; - - /** - * The scope associated to the resource group - */ - scope?: Array; - } - - export namespace ResourceGroup { + export interface Object { /** - * A scope is a combination of scope objects which provides additional context. + * This is a combination of pre-defined resource name and identifier (like Zone ID + * etc.) */ - export interface Scope { - /** - * This is a combination of pre-defined resource name and identifier (like Account - * ID etc.) - */ - key: string; - - /** - * A list of scope objects for additional context. - */ - objects: Array; - } - - export namespace Scope { - /** - * A scope object represents any resource that can have actions applied against - * invite. - */ - export interface Object { - /** - * This is a combination of pre-defined resource name and identifier (like Account - * ID etc.) - */ - key: string; - } - } + key: string; } } } @@ -306,179 +302,168 @@ export interface MembershipDeleteResponse { id?: string; } -export type MembershipGetResponse = - | MembershipGetResponse.IamAPIResponseCommon - | MembershipGetResponse.IamAPIResponseCommon; +export interface MembershipGetResponse { + /** + * Membership identifier tag. + */ + id?: string; + + account?: AccountsAPI.Account; + + /** + * Enterprise only. Indicates whether or not API access is enabled specifically for + * this user on a given account. + */ + api_access_enabled?: boolean | null; + + /** + * All access permissions for the user at the account. + */ + permissions?: MembershipGetResponse.Permissions; + + /** + * Access policy for the membership + */ + policies?: Array; + + /** + * List of role names for the user at the account. + */ + roles?: Array; + + /** + * Status of this membership. + */ + status?: 'accepted' | 'pending' | 'rejected'; +} export namespace MembershipGetResponse { - export interface IamAPIResponseCommon { - result?: MembershipsAPI.Membership; + /** + * All access permissions for the user at the account. + */ + export interface Permissions { + analytics?: Shared.PermissionGrant; + + billing?: Shared.PermissionGrant; + + cache_purge?: Shared.PermissionGrant; + + dns?: Shared.PermissionGrant; + + dns_records?: Shared.PermissionGrant; + + lb?: Shared.PermissionGrant; + + logs?: Shared.PermissionGrant; + + organization?: Shared.PermissionGrant; + + ssl?: Shared.PermissionGrant; + + waf?: Shared.PermissionGrant; + + zone_settings?: Shared.PermissionGrant; + + zones?: Shared.PermissionGrant; } - export interface IamAPIResponseCommon { - result?: IamAPIResponseCommon.Result; + export interface Policy { + /** + * Policy identifier. + */ + id?: string; + + /** + * Allow or deny operations against the resources. + */ + access?: 'allow' | 'deny'; + + /** + * A set of permission groups that are specified to the policy. + */ + permission_groups?: Array; + + /** + * A list of resource groups that the policy applies to. + */ + resource_groups?: Array; } - export namespace IamAPIResponseCommon { - export interface Result { + export namespace Policy { + /** + * A named group of permissions that map to a group of operations against + * resources. + */ + export interface PermissionGroup { /** - * Membership identifier tag. + * Identifier of the group. */ - id?: string; + id: string; - account?: AccountsAPI.Account; + /** + * Attributes associated to the permission group. + */ + meta?: unknown; /** - * Enterprise only. Indicates whether or not API access is enabled specifically for - * this user on a given account. + * Name of the group. */ - api_access_enabled?: boolean | null; + name?: string; + } + /** + * A group of scoped resources. + */ + export interface ResourceGroup { /** - * All access permissions for the user at the account. + * Identifier of the group. */ - permissions?: Result.Permissions; + id: string; /** - * Access policy for the membership + * The scope associated to the resource group */ - policies?: Array; + scope: Array; /** - * List of role names for the user at the account. + * Attributes associated to the resource group. */ - roles?: Array; + meta?: unknown; /** - * Status of this membership. + * Name of the resource group. */ - status?: 'accepted' | 'pending' | 'rejected'; + name?: string; } - export namespace Result { + export namespace ResourceGroup { /** - * All access permissions for the user at the account. + * A scope is a combination of scope objects which provides additional context. */ - export interface Permissions { - analytics?: Shared.PermissionGrant; - - billing?: Shared.PermissionGrant; - - cache_purge?: Shared.PermissionGrant; - - dns?: Shared.PermissionGrant; - - dns_records?: Shared.PermissionGrant; - - lb?: Shared.PermissionGrant; - - logs?: Shared.PermissionGrant; - - organization?: Shared.PermissionGrant; - - ssl?: Shared.PermissionGrant; - - waf?: Shared.PermissionGrant; - - zone_settings?: Shared.PermissionGrant; - - zones?: Shared.PermissionGrant; - } - - export interface Policy { - /** - * Policy identifier. - */ - id?: string; - + export interface Scope { /** - * Allow or deny operations against the resources. + * This is a combination of pre-defined resource name and identifier (like Account + * ID etc.) */ - access?: 'allow' | 'deny'; + key: string; /** - * A set of permission groups that are specified to the policy. + * A list of scope objects for additional context. */ - permission_groups?: Array; - - /** - * A list of resource groups that the policy applies to. - */ - resource_groups?: Array; + objects: Array; } - export namespace Policy { + export namespace Scope { /** - * A named group of permissions that map to a group of operations against - * resources. + * A scope object represents any resource that can have actions applied against + * invite. */ - export interface PermissionGroup { - /** - * Identifier of the group. - */ - id: string; - - /** - * Name of the group. - */ - name?: string; - } - - /** - * A group of scoped resources. - */ - export interface ResourceGroup { - /** - * Identifier of the group. - */ - id: string; - - /** - * Attributes associated to the resource group. - */ - meta?: unknown; - - /** - * Name of the resource group. - */ - name?: string; - - /** - * The scope associated to the resource group - */ - scope?: Array; - } - - export namespace ResourceGroup { + export interface Object { /** - * A scope is a combination of scope objects which provides additional context. + * This is a combination of pre-defined resource name and identifier (like Zone ID + * etc.) */ - export interface Scope { - /** - * This is a combination of pre-defined resource name and identifier (like Account - * ID etc.) - */ - key: string; - - /** - * A list of scope objects for additional context. - */ - objects: Array; - } - - export namespace Scope { - /** - * A scope object represents any resource that can have actions applied against - * invite. - */ - export interface Object { - /** - * This is a combination of pre-defined resource name and identifier (like Account - * ID etc.) - */ - key: string; - } - } + key: string; } } } diff --git a/src/resources/shared.ts b/src/resources/shared.ts index baf31c70fb..dc5b28b640 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -468,8 +468,6 @@ export type SortDirection = 'asc' | 'desc'; */ export type SortDirectionParam = 'asc' | 'desc'; -export class MembersV4PagePaginationArray extends V4PagePaginationArray {} - export class RolesSinglePage extends SinglePage {} export class AuditLogsV4PagePaginationArray extends V4PagePaginationArray {} diff --git a/src/resources/user/tokens/permission-groups.ts b/src/resources/user/tokens/permission-groups.ts index 3b5c91519f..5cca8e9e58 100644 --- a/src/resources/user/tokens/permission-groups.ts +++ b/src/resources/user/tokens/permission-groups.ts @@ -7,7 +7,7 @@ import { SinglePage } from '../../../pagination'; export class PermissionGroups extends APIResource { /** - * Find all available permission groups. + * Find all available permission groups for API Tokens */ list( options?: Core.RequestOptions, diff --git a/src/resources/user/tokens/tokens.ts b/src/resources/user/tokens/tokens.ts index 4890c38767..6c1b028bc5 100644 --- a/src/resources/user/tokens/tokens.ts +++ b/src/resources/user/tokens/tokens.ts @@ -184,6 +184,11 @@ export namespace Token { */ id: string; + /** + * Attributes associated to the permission group. + */ + meta?: unknown; + /** * Name of the group. */ @@ -307,7 +312,12 @@ export namespace TokenCreateParams { * A named group of permissions that map to a group of operations against * resources. */ - export interface PermissionGroup {} + export interface PermissionGroup { + /** + * Attributes associated to the permission group. + */ + meta?: unknown; + } } export interface Condition { @@ -388,7 +398,12 @@ export namespace TokenUpdateParams { * A named group of permissions that map to a group of operations against * resources. */ - export interface PermissionGroup {} + export interface PermissionGroup { + /** + * Attributes associated to the permission group. + */ + meta?: unknown; + } } export interface Condition { diff --git a/src/resources/workers/scripts/index.ts b/src/resources/workers/scripts/index.ts index f9024cf2d7..6e2054fdd0 100644 --- a/src/resources/workers/scripts/index.ts +++ b/src/resources/workers/scripts/index.ts @@ -45,5 +45,6 @@ export { VersionCreateParams, VersionListParams, VersionGetParams, + VersionListResponsesV4PagePagination, Versions, } from './versions'; diff --git a/src/resources/workers/scripts/scripts.ts b/src/resources/workers/scripts/scripts.ts index 96c0a9d180..e3b64bc0f7 100644 --- a/src/resources/workers/scripts/scripts.ts +++ b/src/resources/workers/scripts/scripts.ts @@ -331,6 +331,7 @@ export namespace Scripts { export import VersionCreateResponse = VersionsAPI.VersionCreateResponse; export import VersionListResponse = VersionsAPI.VersionListResponse; export import VersionGetResponse = VersionsAPI.VersionGetResponse; + export import VersionListResponsesV4PagePagination = VersionsAPI.VersionListResponsesV4PagePagination; export import VersionCreateParams = VersionsAPI.VersionCreateParams; export import VersionListParams = VersionsAPI.VersionListParams; export import VersionGetParams = VersionsAPI.VersionGetParams; diff --git a/src/resources/workers/scripts/versions.ts b/src/resources/workers/scripts/versions.ts index f8e55463b5..2a3539bf1b 100644 --- a/src/resources/workers/scripts/versions.ts +++ b/src/resources/workers/scripts/versions.ts @@ -4,6 +4,7 @@ import * as Core from '../../../core'; import { APIResource } from '../../../resource'; import * as VersionsAPI from './versions'; import { type Uploadable, multipartFormRequestOptions } from '../../../core'; +import { V4PagePagination, type V4PagePaginationParams } from '../../../pagination'; export class Versions extends APIResource { /** @@ -30,14 +31,13 @@ export class Versions extends APIResource { scriptName: string, params: VersionListParams, options?: Core.RequestOptions, - ): Core.APIPromise { - const { account_id } = params; - return ( - this._client.get( - `/accounts/${account_id}/workers/scripts/${scriptName}/versions`, - options, - ) as Core.APIPromise<{ result: VersionListResponse }> - )._thenUnwrap((obj) => obj.result); + ): Core.PagePromise { + const { account_id, ...query } = params; + return this._client.getAPIList( + `/accounts/${account_id}/workers/scripts/${scriptName}/versions`, + VersionListResponsesV4PagePagination, + { query, ...options }, + ); } /** @@ -59,6 +59,8 @@ export class Versions extends APIResource { } } +export class VersionListResponsesV4PagePagination extends V4PagePagination {} + export interface VersionCreateResponse { resources: unknown; @@ -70,17 +72,11 @@ export interface VersionCreateResponse { } export interface VersionListResponse { - items?: Array; -} - -export namespace VersionListResponse { - export interface Item { - id?: string; + id?: string; - metadata?: unknown; + metadata?: unknown; - number?: number; - } + number?: number; } export interface VersionGetResponse { @@ -170,11 +166,17 @@ export namespace VersionCreateParams { } } -export interface VersionListParams { +export interface VersionListParams extends V4PagePaginationParams { /** - * Identifier + * Path param: Identifier */ account_id: string; + + /** + * Query param: Only return versions that can be used in a deployment. Ignores + * pagination. + */ + deployable?: boolean; } export interface VersionGetParams { @@ -188,6 +190,7 @@ export namespace Versions { export import VersionCreateResponse = VersionsAPI.VersionCreateResponse; export import VersionListResponse = VersionsAPI.VersionListResponse; export import VersionGetResponse = VersionsAPI.VersionGetResponse; + export import VersionListResponsesV4PagePagination = VersionsAPI.VersionListResponsesV4PagePagination; export import VersionCreateParams = VersionsAPI.VersionCreateParams; export import VersionListParams = VersionsAPI.VersionListParams; export import VersionGetParams = VersionsAPI.VersionGetParams; diff --git a/tests/api-resources/accounts/members.test.ts b/tests/api-resources/accounts/members.test.ts index 3a7def315c..d3cfc44971 100644 --- a/tests/api-resources/accounts/members.test.ts +++ b/tests/api-resources/accounts/members.test.ts @@ -12,7 +12,7 @@ const cloudflare = new Cloudflare({ describe('resource members', () => { test('create: only required params', async () => { const responsePromise = cloudflare.accounts.members.create({ - account_id: 'string', + account_id: 'eb78d65290b24279ba6f44721b3ea3c4', email: 'user@example.com', roles: [ '3536bcfad5faccb999b47003c79917fb', @@ -31,7 +31,7 @@ describe('resource members', () => { test('create: required and optional params', async () => { const response = await cloudflare.accounts.members.create({ - account_id: 'string', + account_id: 'eb78d65290b24279ba6f44721b3ea3c4', email: 'user@example.com', roles: [ '3536bcfad5faccb999b47003c79917fb', @@ -45,7 +45,7 @@ describe('resource members', () => { // TODO: investigate broken test test.skip('update: only required params', async () => { const responsePromise = cloudflare.accounts.members.update('4536bcfad5faccb111b47003c79917fa', { - account_id: 'string', + account_id: 'eb78d65290b24279ba6f44721b3ea3c4', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -59,7 +59,7 @@ describe('resource members', () => { // TODO: investigate broken test test.skip('update: required and optional params', async () => { const response = await cloudflare.accounts.members.update('4536bcfad5faccb111b47003c79917fa', { - account_id: 'string', + account_id: 'eb78d65290b24279ba6f44721b3ea3c4', roles: [ { id: '3536bcfad5faccb999b47003c79917fb' }, { id: '3536bcfad5faccb999b47003c79917fb' }, @@ -69,7 +69,9 @@ describe('resource members', () => { }); test('list: only required params', async () => { - const responsePromise = cloudflare.accounts.members.list({ account_id: 'string' }); + const responsePromise = cloudflare.accounts.members.list({ + account_id: 'eb78d65290b24279ba6f44721b3ea3c4', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -81,7 +83,7 @@ describe('resource members', () => { test('list: required and optional params', async () => { const response = await cloudflare.accounts.members.list({ - account_id: 'string', + account_id: 'eb78d65290b24279ba6f44721b3ea3c4', direction: 'desc', order: 'status', page: 1, @@ -92,7 +94,7 @@ describe('resource members', () => { test('delete: only required params', async () => { const responsePromise = cloudflare.accounts.members.delete('4536bcfad5faccb111b47003c79917fa', { - account_id: 'string', + account_id: 'eb78d65290b24279ba6f44721b3ea3c4', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -105,13 +107,13 @@ describe('resource members', () => { test('delete: required and optional params', async () => { const response = await cloudflare.accounts.members.delete('4536bcfad5faccb111b47003c79917fa', { - account_id: 'string', + account_id: 'eb78d65290b24279ba6f44721b3ea3c4', }); }); test('get: only required params', async () => { const responsePromise = cloudflare.accounts.members.get('4536bcfad5faccb111b47003c79917fa', { - account_id: 'string', + account_id: 'eb78d65290b24279ba6f44721b3ea3c4', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -124,7 +126,7 @@ describe('resource members', () => { test('get: required and optional params', async () => { const response = await cloudflare.accounts.members.get('4536bcfad5faccb111b47003c79917fa', { - account_id: 'string', + account_id: 'eb78d65290b24279ba6f44721b3ea3c4', }); }); }); diff --git a/tests/api-resources/accounts/roles.test.ts b/tests/api-resources/accounts/roles.test.ts index ec90eac3b9..e14eeae7df 100644 --- a/tests/api-resources/accounts/roles.test.ts +++ b/tests/api-resources/accounts/roles.test.ts @@ -11,7 +11,9 @@ const cloudflare = new Cloudflare({ describe('resource roles', () => { test('list: only required params', async () => { - const responsePromise = cloudflare.accounts.roles.list({ account_id: 'string' }); + const responsePromise = cloudflare.accounts.roles.list({ + account_id: 'eb78d65290b24279ba6f44721b3ea3c4', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -22,11 +24,14 @@ describe('resource roles', () => { }); test('list: required and optional params', async () => { - const response = await cloudflare.accounts.roles.list({ account_id: 'string' }); + const response = await cloudflare.accounts.roles.list({ account_id: 'eb78d65290b24279ba6f44721b3ea3c4' }); }); test('get: only required params', async () => { - const responsePromise = cloudflare.accounts.roles.get({}, { account_id: 'string' }); + const responsePromise = cloudflare.accounts.roles.get( + {}, + { account_id: 'eb78d65290b24279ba6f44721b3ea3c4' }, + ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -37,6 +42,9 @@ describe('resource roles', () => { }); test('get: required and optional params', async () => { - const response = await cloudflare.accounts.roles.get({}, { account_id: 'string' }); + const response = await cloudflare.accounts.roles.get( + {}, + { account_id: 'eb78d65290b24279ba6f44721b3ea3c4' }, + ); }); }); diff --git a/tests/api-resources/addressing/address-maps/address-maps.test.ts b/tests/api-resources/addressing/address-maps/address-maps.test.ts index 404c5b613a..452db3e7b9 100644 --- a/tests/api-resources/addressing/address-maps/address-maps.test.ts +++ b/tests/api-resources/addressing/address-maps/address-maps.test.ts @@ -30,9 +30,21 @@ describe('resource addressMaps', () => { enabled: true, ips: ['192.0.2.1', '192.0.2.1', '192.0.2.1'], memberships: [ - { identifier: '023e105f4ecef8ad9ca31a8372d0c353', kind: 'zone' }, - { identifier: '023e105f4ecef8ad9ca31a8372d0c353', kind: 'zone' }, - { identifier: '023e105f4ecef8ad9ca31a8372d0c353', kind: 'zone' }, + { + created_at: '2014-01-01T05:20:00.12345Z', + identifier: '023e105f4ecef8ad9ca31a8372d0c353', + kind: 'zone', + }, + { + created_at: '2014-01-01T05:20:00.12345Z', + identifier: '023e105f4ecef8ad9ca31a8372d0c353', + kind: 'zone', + }, + { + created_at: '2014-01-01T05:20:00.12345Z', + identifier: '023e105f4ecef8ad9ca31a8372d0c353', + kind: 'zone', + }, ], }); }); diff --git a/tests/api-resources/kv/namespaces/bulk.test.ts b/tests/api-resources/kv/namespaces/bulk.test.ts index 58c82429c9..83d5d7f92b 100644 --- a/tests/api-resources/kv/namespaces/bulk.test.ts +++ b/tests/api-resources/kv/namespaces/bulk.test.ts @@ -33,7 +33,7 @@ describe('resource bulk', () => { expiration: 1578435000, expiration_ttl: 300, key: 'My-Key', - metadata: { someMetadataKey: 'someMetadataValue' }, + metadata: { someMetadataKey: 'bar' }, value: 'Some string', }, { @@ -41,7 +41,7 @@ describe('resource bulk', () => { expiration: 1578435000, expiration_ttl: 300, key: 'My-Key', - metadata: { someMetadataKey: 'someMetadataValue' }, + metadata: { someMetadataKey: 'bar' }, value: 'Some string', }, { @@ -49,7 +49,7 @@ describe('resource bulk', () => { expiration: 1578435000, expiration_ttl: 300, key: 'My-Key', - metadata: { someMetadataKey: 'someMetadataValue' }, + metadata: { someMetadataKey: 'bar' }, value: 'Some string', }, ], diff --git a/tests/api-resources/kv/namespaces/values.test.ts b/tests/api-resources/kv/namespaces/values.test.ts index b08bafe0a0..9516c2a17a 100644 --- a/tests/api-resources/kv/namespaces/values.test.ts +++ b/tests/api-resources/kv/namespaces/values.test.ts @@ -66,21 +66,6 @@ describe('resource values', () => { ); }); - test('get: only required params', async () => { - const responsePromise = cloudflare.kv.namespaces.values.get( - '0f2ac74b498b48028cb68387c421e279', - 'My-Key', - { account_id: '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); - }); - test('get: required and optional params', async () => { const response = await cloudflare.kv.namespaces.values.get('0f2ac74b498b48028cb68387c421e279', 'My-Key', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', diff --git a/tests/api-resources/user/tokens/tokens.test.ts b/tests/api-resources/user/tokens/tokens.test.ts index 93a6b21521..2e3480dce5 100644 --- a/tests/api-resources/user/tokens/tokens.test.ts +++ b/tests/api-resources/user/tokens/tokens.test.ts @@ -57,7 +57,10 @@ describe('resource tokens', () => { policies: [ { effect: 'allow', - permission_groups: [{}, {}], + permission_groups: [ + { meta: { label: 'load_balancer_admin', scopes: 'com.cloudflare.api.account' } }, + { meta: { label: 'fbm_user', scopes: 'com.cloudflare.api.account' } }, + ], resources: { 'com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43': '*', 'com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4': '*', @@ -65,7 +68,10 @@ describe('resource tokens', () => { }, { effect: 'allow', - permission_groups: [{}, {}], + permission_groups: [ + { meta: { label: 'load_balancer_admin', scopes: 'com.cloudflare.api.account' } }, + { meta: { label: 'fbm_user', scopes: 'com.cloudflare.api.account' } }, + ], resources: { 'com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43': '*', 'com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4': '*', @@ -73,7 +79,10 @@ describe('resource tokens', () => { }, { effect: 'allow', - permission_groups: [{}, {}], + permission_groups: [ + { meta: { label: 'load_balancer_admin', scopes: 'com.cloudflare.api.account' } }, + { meta: { label: 'fbm_user', scopes: 'com.cloudflare.api.account' } }, + ], resources: { 'com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43': '*', 'com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4': '*', @@ -144,7 +153,10 @@ describe('resource tokens', () => { policies: [ { effect: 'allow', - permission_groups: [{}, {}], + permission_groups: [ + { meta: { label: 'load_balancer_admin', scopes: 'com.cloudflare.api.account' } }, + { meta: { label: 'fbm_user', scopes: 'com.cloudflare.api.account' } }, + ], resources: { 'com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43': '*', 'com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4': '*', @@ -152,7 +164,10 @@ describe('resource tokens', () => { }, { effect: 'allow', - permission_groups: [{}, {}], + permission_groups: [ + { meta: { label: 'load_balancer_admin', scopes: 'com.cloudflare.api.account' } }, + { meta: { label: 'fbm_user', scopes: 'com.cloudflare.api.account' } }, + ], resources: { 'com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43': '*', 'com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4': '*', @@ -160,7 +175,10 @@ describe('resource tokens', () => { }, { effect: 'allow', - permission_groups: [{}, {}], + permission_groups: [ + { meta: { label: 'load_balancer_admin', scopes: 'com.cloudflare.api.account' } }, + { meta: { label: 'fbm_user', scopes: 'com.cloudflare.api.account' } }, + ], resources: { 'com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43': '*', 'com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4': '*', diff --git a/tests/api-resources/workers/scripts/versions.test.ts b/tests/api-resources/workers/scripts/versions.test.ts index edaf6ea1a4..01c31beb10 100644 --- a/tests/api-resources/workers/scripts/versions.test.ts +++ b/tests/api-resources/workers/scripts/versions.test.ts @@ -61,6 +61,9 @@ describe('resource versions', () => { test('list: required and optional params', async () => { const response = await cloudflare.workers.scripts.versions.list('this-is_my_script-01', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', + deployable: true, + page: 0, + per_page: 0, }); }); From b7f254e405bba70818a13ab8aab24439dad1dbd4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Jun 2024 04:47:52 +0000 Subject: [PATCH 420/473] feat(api): update via SDK Studio (#917) --- api.md | 1 + src/resources/user/index.ts | 1 + src/resources/user/tokens/index.ts | 1 + src/resources/user/tokens/tokens.ts | 187 ++++++++++++---------------- src/resources/user/user.ts | 1 + 5 files changed, 83 insertions(+), 108 deletions(-) diff --git a/api.md b/api.md index 0691c8afdd..5eeea9eb18 100644 --- a/api.md +++ b/api.md @@ -202,6 +202,7 @@ Methods: Types: - CIDRList +- Policy - Token - TokenCreateResponse - TokenUpdateResponse diff --git a/src/resources/user/index.ts b/src/resources/user/index.ts index 79ce45de57..9e6f89fc0a 100644 --- a/src/resources/user/index.ts +++ b/src/resources/user/index.ts @@ -4,6 +4,7 @@ export { AuditLogListParams, AuditLogs } from './audit-logs'; export { Billing } from './billing/index'; export { CIDRList, + Policy, Token, TokenCreateResponse, TokenUpdateResponse, diff --git a/src/resources/user/tokens/index.ts b/src/resources/user/tokens/index.ts index aaae5582a7..120c42ef41 100644 --- a/src/resources/user/tokens/index.ts +++ b/src/resources/user/tokens/index.ts @@ -2,6 +2,7 @@ export { CIDRList, + Policy, Token, TokenCreateResponse, TokenUpdateResponse, diff --git a/src/resources/user/tokens/tokens.ts b/src/resources/user/tokens/tokens.ts index 6c1b028bc5..56aa06de1f 100644 --- a/src/resources/user/tokens/tokens.ts +++ b/src/resources/user/tokens/tokens.ts @@ -105,6 +105,81 @@ export type CIDRList = string; */ export type CIDRListParam = string; +export interface Policy { + /** + * Policy identifier. + */ + id: string; + + /** + * Allow or deny operations against the resources. + */ + effect: 'allow' | 'deny'; + + /** + * A set of permission groups that are specified to the policy. + */ + permission_groups: Array; + + /** + * A list of resource names that the policy applies to. + */ + resources: unknown; +} + +export namespace Policy { + /** + * A named group of permissions that map to a group of operations against + * resources. + */ + export interface PermissionGroup { + /** + * Identifier of the group. + */ + id: string; + + /** + * Attributes associated to the permission group. + */ + meta?: unknown; + + /** + * Name of the group. + */ + name?: string; + } +} + +export interface PolicyParam { + /** + * Allow or deny operations against the resources. + */ + effect: 'allow' | 'deny'; + + /** + * A set of permission groups that are specified to the policy. + */ + permission_groups: Array; + + /** + * A list of resource names that the policy applies to. + */ + resources: unknown; +} + +export namespace PolicyParam { + /** + * A named group of permissions that map to a group of operations against + * resources. + */ + export interface PermissionGroup { + /** + * Attributes associated to the permission group. + */ + meta?: unknown; + } +} + export interface Token { /** * Token identifier tag. @@ -119,7 +194,7 @@ export interface Token { /** * List of access policies assigned to the token. */ - policies: Array; + policies: Array; /** * Status of the token. @@ -151,51 +226,6 @@ export interface Token { } export namespace Token { - export interface Policy { - /** - * Policy identifier. - */ - id: string; - - /** - * Allow or deny operations against the resources. - */ - effect: 'allow' | 'deny'; - - /** - * A set of permission groups that are specified to the policy. - */ - permission_groups: Array; - - /** - * A list of resource names that the policy applies to. - */ - resources: unknown; - } - - export namespace Policy { - /** - * A named group of permissions that map to a group of operations against - * resources. - */ - export interface PermissionGroup { - /** - * Identifier of the group. - */ - id: string; - - /** - * Attributes associated to the permission group. - */ - meta?: unknown; - - /** - * Name of the group. - */ - name?: string; - } - } - export interface Condition { /** * Client IP restrictions. @@ -273,7 +303,7 @@ export interface TokenCreateParams { /** * List of access policies assigned to the token. */ - policies: Array; + policies: Array; condition?: TokenCreateParams.Condition; @@ -290,36 +320,6 @@ export interface TokenCreateParams { } export namespace TokenCreateParams { - export interface Policy { - /** - * Allow or deny operations against the resources. - */ - effect: 'allow' | 'deny'; - - /** - * A set of permission groups that are specified to the policy. - */ - permission_groups: Array; - - /** - * A list of resource names that the policy applies to. - */ - resources: unknown; - } - - export namespace Policy { - /** - * A named group of permissions that map to a group of operations against - * resources. - */ - export interface PermissionGroup { - /** - * Attributes associated to the permission group. - */ - meta?: unknown; - } - } - export interface Condition { /** * Client IP restrictions. @@ -354,7 +354,7 @@ export interface TokenUpdateParams { /** * List of access policies assigned to the token. */ - policies: Array; + policies: Array; /** * Status of the token. @@ -376,36 +376,6 @@ export interface TokenUpdateParams { } export namespace TokenUpdateParams { - export interface Policy { - /** - * Allow or deny operations against the resources. - */ - effect: 'allow' | 'deny'; - - /** - * A set of permission groups that are specified to the policy. - */ - permission_groups: Array; - - /** - * A list of resource names that the policy applies to. - */ - resources: unknown; - } - - export namespace Policy { - /** - * A named group of permissions that map to a group of operations against - * resources. - */ - export interface PermissionGroup { - /** - * Attributes associated to the permission group. - */ - meta?: unknown; - } - } - export interface Condition { /** * Client IP restrictions. @@ -440,6 +410,7 @@ export interface TokenListParams extends V4PagePaginationArrayParams { export namespace Tokens { export import CIDRList = TokensAPI.CIDRList; + export import Policy = TokensAPI.Policy; export import Token = TokensAPI.Token; export import TokenCreateResponse = TokensAPI.TokenCreateResponse; export import TokenUpdateResponse = TokensAPI.TokenUpdateResponse; diff --git a/src/resources/user/user.ts b/src/resources/user/user.ts index 16e40e715d..c26cbc45f7 100644 --- a/src/resources/user/user.ts +++ b/src/resources/user/user.ts @@ -96,6 +96,7 @@ export namespace User { export import SubscriptionEditParams = SubscriptionsAPI.SubscriptionEditParams; export import Tokens = TokensAPI.Tokens; export import CIDRList = TokensAPI.CIDRList; + export import Policy = TokensAPI.Policy; export import Token = TokensAPI.Token; export import TokenCreateResponse = TokensAPI.TokenCreateResponse; export import TokenUpdateResponse = TokensAPI.TokenUpdateResponse; From dab032b6ab6c064f281e4fa7b4a7afac48af55b7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Jun 2024 09:27:27 +0000 Subject: [PATCH 421/473] feat(api): OpenAPI spec update via Stainless API (#918) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index cf68beefb0..c1b84218a5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-af1ecaabf305033e1f88b63fa9ff708149d2e8f79c0050c0e046d010c668038c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f5082157bb70165b34f3a552faa44b9693adacaa9613d4b887b251cd744d076f.yml From a808842a119b53815a11d1b9d9f347084b58dd74 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Jun 2024 09:29:43 +0000 Subject: [PATCH 422/473] feat(api): OpenAPI spec update via Stainless API (#919) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c1b84218a5..cf68beefb0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f5082157bb70165b34f3a552faa44b9693adacaa9613d4b887b251cd744d076f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-af1ecaabf305033e1f88b63fa9ff708149d2e8f79c0050c0e046d010c668038c.yml From 8b28dd390cee6ce8220cb6420a63bcced067dcf6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Jun 2024 10:02:38 +0000 Subject: [PATCH 423/473] feat(api): OpenAPI spec update via Stainless API (#920) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index cf68beefb0..c1b84218a5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-af1ecaabf305033e1f88b63fa9ff708149d2e8f79c0050c0e046d010c668038c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f5082157bb70165b34f3a552faa44b9693adacaa9613d4b887b251cd744d076f.yml From c50a989f5e15fdea6408f99474b21679b26e1899 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Jun 2024 10:05:10 +0000 Subject: [PATCH 424/473] feat(api): OpenAPI spec update via Stainless API (#921) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c1b84218a5..cf68beefb0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f5082157bb70165b34f3a552faa44b9693adacaa9613d4b887b251cd744d076f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-af1ecaabf305033e1f88b63fa9ff708149d2e8f79c0050c0e046d010c668038c.yml From 329a88e84f9871a83742dd9c68e7e7f9ac168c6b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Jun 2024 10:09:47 +0000 Subject: [PATCH 425/473] feat(api): OpenAPI spec update via Stainless API (#922) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index cf68beefb0..f298910cbc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-af1ecaabf305033e1f88b63fa9ff708149d2e8f79c0050c0e046d010c668038c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-263a561e908d0670ade328d0bf353bb05356c254b1f3031b18b06a0d0bf40b44.yml From c84f2ac04ef3b1b01d3ee04b92b6e2adcfe62fd3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Jun 2024 10:12:04 +0000 Subject: [PATCH 426/473] feat(api): OpenAPI spec update via Stainless API (#923) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f298910cbc..c1b84218a5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-263a561e908d0670ade328d0bf353bb05356c254b1f3031b18b06a0d0bf40b44.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f5082157bb70165b34f3a552faa44b9693adacaa9613d4b887b251cd744d076f.yml From daef7cb50f595ec10f63ebb823378e862463d042 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Jun 2024 10:55:09 +0000 Subject: [PATCH 427/473] feat(api): OpenAPI spec update via Stainless API (#924) --- .stats.yml | 2 +- api.md | 19 +- src/resources/page-shield/connections.ts | 36 ++-- src/resources/page-shield/index.ts | 7 +- src/resources/page-shield/page-shield.ts | 29 +-- src/resources/page-shield/policies.ts | 174 +++++++++++++++--- src/resources/page-shield/scripts.ts | 112 ++++++++--- .../page-shield/connections.test.ts | 4 +- .../page-shield/policies.test.ts | 17 +- .../api-resources/page-shield/scripts.test.ts | 4 +- 10 files changed, 306 insertions(+), 98 deletions(-) diff --git a/.stats.yml b/.stats.yml index c1b84218a5..fdf1e9f7f3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f5082157bb70165b34f3a552faa44b9693adacaa9613d4b887b251cd744d076f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fea5e994c4346dfa223df3833cf88a978ab7df816a2a4e5718ec2ce40cd98ac0.yml diff --git a/api.md b/api.md index 5eeea9eb18..d5e55d5def 100644 --- a/api.md +++ b/api.md @@ -2698,21 +2698,24 @@ Types: Methods: - client.pageShield.update({ ...params }) -> PageShieldUpdateResponse -- client.pageShield.get({ ...params }) -> Setting +- client.pageShield.get({ ...params }) -> Setting | null ## Policies Types: -- Policy +- PolicyCreateResponse +- PolicyUpdateResponse +- PolicyListResponse +- PolicyGetResponse Methods: -- client.pageShield.policies.create({ ...params }) -> Policy -- client.pageShield.policies.update(policyId, { ...params }) -> Policy -- client.pageShield.policies.list({ ...params }) -> PoliciesSinglePage +- client.pageShield.policies.create({ ...params }) -> PolicyCreateResponse | null +- client.pageShield.policies.update(policyId, { ...params }) -> PolicyUpdateResponse | null +- client.pageShield.policies.list({ ...params }) -> PolicyListResponsesSinglePage - client.pageShield.policies.delete(policyId, { ...params }) -> void -- client.pageShield.policies.get(policyId, { ...params }) -> Policy +- client.pageShield.policies.get(policyId, { ...params }) -> PolicyGetResponse | null ## Connections @@ -2723,7 +2726,7 @@ Types: Methods: - client.pageShield.connections.list({ ...params }) -> ConnectionsSinglePage -- client.pageShield.connections.get(connectionId, { ...params }) -> Connection +- client.pageShield.connections.get(connectionId, { ...params }) -> Connection | null ## Scripts @@ -2735,7 +2738,7 @@ Types: Methods: - client.pageShield.scripts.list({ ...params }) -> ScriptsSinglePage -- client.pageShield.scripts.get(scriptId, { ...params }) -> ScriptGetResponse +- client.pageShield.scripts.get(scriptId, { ...params }) -> ScriptGetResponse | null # Rulesets diff --git a/src/resources/page-shield/connections.ts b/src/resources/page-shield/connections.ts index 2c4b486609..4147fca629 100644 --- a/src/resources/page-shield/connections.ts +++ b/src/resources/page-shield/connections.ts @@ -27,34 +27,48 @@ export class Connections extends APIResource { connectionId: string, params: ConnectionGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { zone_id } = params; - return this._client.get(`/zones/${zone_id}/page_shield/connections/${connectionId}`, options); + return ( + this._client.get( + `/zones/${zone_id}/page_shield/connections/${connectionId}`, + options, + ) as Core.APIPromise<{ result: Connection | null }> + )._thenUnwrap((obj) => obj.result); } } export class ConnectionsSinglePage extends SinglePage {} export interface Connection { - id?: string; + /** + * Identifier + */ + id: string; + + added_at: string; + + first_seen_at: string; - added_at?: string; + host: string; + + last_seen_at: string; + + url: string; + + url_contains_cdn_cgi_path: boolean; domain_reported_malicious?: boolean; first_page_url?: string; - first_seen_at?: string; + malicious_domain_categories?: Array; - host?: string; - - last_seen_at?: string; + malicious_url_categories?: Array; page_urls?: Array; - url?: string; - - url_contains_cdn_cgi_path?: boolean; + url_reported_malicious?: boolean; } export interface ConnectionListParams { diff --git a/src/resources/page-shield/index.ts b/src/resources/page-shield/index.ts index 960d7a7a4b..5a2e7fb958 100644 --- a/src/resources/page-shield/index.ts +++ b/src/resources/page-shield/index.ts @@ -9,13 +9,16 @@ export { } from './connections'; export { PageShield } from './page-shield'; export { - Policy, + PolicyCreateResponse, + PolicyUpdateResponse, + PolicyListResponse, + PolicyGetResponse, PolicyCreateParams, PolicyUpdateParams, PolicyListParams, PolicyDeleteParams, PolicyGetParams, - PoliciesSinglePage, + PolicyListResponsesSinglePage, Policies, } from './policies'; export { diff --git a/src/resources/page-shield/page-shield.ts b/src/resources/page-shield/page-shield.ts index e8de11c69e..11d732b0a6 100644 --- a/src/resources/page-shield/page-shield.ts +++ b/src/resources/page-shield/page-shield.ts @@ -29,10 +29,12 @@ export class PageShield extends APIResource { /** * Fetches the Page Shield settings. */ - get(params: PageShieldGetParams, options?: Core.RequestOptions): Core.APIPromise { + get(params: PageShieldGetParams, options?: Core.RequestOptions): Core.APIPromise { const { zone_id } = params; return ( - this._client.get(`/zones/${zone_id}/page_shield`, options) as Core.APIPromise<{ result: Setting }> + this._client.get(`/zones/${zone_id}/page_shield`, options) as Core.APIPromise<{ + result: Setting | null; + }> )._thenUnwrap((obj) => obj.result); } } @@ -41,46 +43,46 @@ export interface Setting { /** * When true, indicates that Page Shield is enabled. */ - enabled?: boolean; + enabled: boolean; /** * The timestamp of when Page Shield was last updated. */ - updated_at?: string; + updated_at: string; /** * When true, CSP reports will be sent to * https://csp-reporting.cloudflare.com/cdn-cgi/script_monitor/report */ - use_cloudflare_reporting_endpoint?: boolean; + use_cloudflare_reporting_endpoint: boolean; /** * When true, the paths associated with connections URLs will also be analyzed. */ - use_connection_url_path?: boolean; + use_connection_url_path: boolean; } export interface PageShieldUpdateResponse { /** * When true, indicates that Page Shield is enabled. */ - enabled?: boolean; + enabled: boolean; /** * The timestamp of when Page Shield was last updated. */ - updated_at?: string; + updated_at: string; /** * When true, CSP reports will be sent to * https://csp-reporting.cloudflare.com/cdn-cgi/script_monitor/report */ - use_cloudflare_reporting_endpoint?: boolean; + use_cloudflare_reporting_endpoint: boolean; /** * When true, the paths associated with connections URLs will also be analyzed. */ - use_connection_url_path?: boolean; + use_connection_url_path: boolean; } export interface PageShieldUpdateParams { @@ -116,8 +118,11 @@ export interface PageShieldGetParams { export namespace PageShield { export import Policies = PoliciesAPI.Policies; - export import Policy = PoliciesAPI.Policy; - export import PoliciesSinglePage = PoliciesAPI.PoliciesSinglePage; + export import PolicyCreateResponse = PoliciesAPI.PolicyCreateResponse; + export import PolicyUpdateResponse = PoliciesAPI.PolicyUpdateResponse; + export import PolicyListResponse = PoliciesAPI.PolicyListResponse; + export import PolicyGetResponse = PoliciesAPI.PolicyGetResponse; + export import PolicyListResponsesSinglePage = PoliciesAPI.PolicyListResponsesSinglePage; export import PolicyCreateParams = PoliciesAPI.PolicyCreateParams; export import PolicyUpdateParams = PoliciesAPI.PolicyUpdateParams; export import PolicyListParams = PoliciesAPI.PolicyListParams; diff --git a/src/resources/page-shield/policies.ts b/src/resources/page-shield/policies.ts index 97da07037d..3187748964 100644 --- a/src/resources/page-shield/policies.ts +++ b/src/resources/page-shield/policies.ts @@ -9,9 +9,16 @@ export class Policies extends APIResource { /** * Create a Page Shield policy. */ - create(params: PolicyCreateParams, options?: Core.RequestOptions): Core.APIPromise { + create( + params: PolicyCreateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { const { zone_id, ...body } = params; - return this._client.post(`/zones/${zone_id}/page_shield/policies`, { body, ...options }); + return ( + this._client.post(`/zones/${zone_id}/page_shield/policies`, { body, ...options }) as Core.APIPromise<{ + result: PolicyCreateResponse | null; + }> + )._thenUnwrap((obj) => obj.result); } /** @@ -21,9 +28,14 @@ export class Policies extends APIResource { policyId: string, params: PolicyUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { zone_id, ...body } = params; - return this._client.put(`/zones/${zone_id}/page_shield/policies/${policyId}`, { body, ...options }); + return ( + this._client.put(`/zones/${zone_id}/page_shield/policies/${policyId}`, { + body, + ...options, + }) as Core.APIPromise<{ result: PolicyUpdateResponse | null }> + )._thenUnwrap((obj) => obj.result); } /** @@ -32,9 +44,13 @@ export class Policies extends APIResource { list( params: PolicyListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { zone_id } = params; - return this._client.getAPIList(`/zones/${zone_id}/page_shield/policies`, PoliciesSinglePage, options); + return this._client.getAPIList( + `/zones/${zone_id}/page_shield/policies`, + PolicyListResponsesSinglePage, + options, + ); } /** @@ -51,45 +67,152 @@ export class Policies extends APIResource { /** * Fetches a Page Shield policy by ID. */ - get(policyId: string, params: PolicyGetParams, options?: Core.RequestOptions): Core.APIPromise { + get( + policyId: string, + params: PolicyGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise { const { zone_id } = params; - return this._client.get(`/zones/${zone_id}/page_shield/policies/${policyId}`, options); + return ( + this._client.get(`/zones/${zone_id}/page_shield/policies/${policyId}`, options) as Core.APIPromise<{ + result: PolicyGetResponse | null; + }> + )._thenUnwrap((obj) => obj.result); } } -export class PoliciesSinglePage extends SinglePage {} +export class PolicyListResponsesSinglePage extends SinglePage {} -export interface Policy { +export interface PolicyCreateResponse { /** - * The ID of the policy + * Identifier */ - id?: string; + id: string; /** * The action to take if the expression matches */ - action?: 'allow' | 'log'; + action: 'allow' | 'log'; /** * A description for the policy */ - description?: string; + description: string; /** * Whether the policy is enabled */ - enabled?: boolean; + enabled: boolean; /** * The expression which must match for the policy to be applied, using the * Cloudflare Firewall rule expression syntax */ - expression?: string; + expression: string; /** * The policy which will be applied */ - value?: string; + value: string; +} + +export interface PolicyUpdateResponse { + /** + * Identifier + */ + id: string; + + /** + * The action to take if the expression matches + */ + action: 'allow' | 'log'; + + /** + * A description for the policy + */ + description: string; + + /** + * Whether the policy is enabled + */ + enabled: boolean; + + /** + * The expression which must match for the policy to be applied, using the + * Cloudflare Firewall rule expression syntax + */ + expression: string; + + /** + * The policy which will be applied + */ + value: string; +} + +export interface PolicyListResponse { + /** + * Identifier + */ + id: string; + + /** + * The action to take if the expression matches + */ + action: 'allow' | 'log'; + + /** + * A description for the policy + */ + description: string; + + /** + * Whether the policy is enabled + */ + enabled: boolean; + + /** + * The expression which must match for the policy to be applied, using the + * Cloudflare Firewall rule expression syntax + */ + expression: string; + + /** + * The policy which will be applied + */ + value: string; +} + +export interface PolicyGetResponse { + /** + * Identifier + */ + id: string; + + /** + * The action to take if the expression matches + */ + action: 'allow' | 'log'; + + /** + * A description for the policy + */ + description: string; + + /** + * Whether the policy is enabled + */ + enabled: boolean; + + /** + * The expression which must match for the policy to be applied, using the + * Cloudflare Firewall rule expression syntax + */ + expression: string; + + /** + * The policy which will be applied + */ + value: string; } export interface PolicyCreateParams { @@ -101,28 +224,28 @@ export interface PolicyCreateParams { /** * Body param: The action to take if the expression matches */ - action?: 'allow' | 'log'; + action: 'allow' | 'log'; /** * Body param: A description for the policy */ - description?: string; + description: string; /** * Body param: Whether the policy is enabled */ - enabled?: boolean; + enabled: boolean; /** * Body param: The expression which must match for the policy to be applied, using * the Cloudflare Firewall rule expression syntax */ - expression?: string; + expression: string; /** * Body param: The policy which will be applied */ - value?: string; + value: string; } export interface PolicyUpdateParams { @@ -180,8 +303,11 @@ export interface PolicyGetParams { } export namespace Policies { - export import Policy = PoliciesAPI.Policy; - export import PoliciesSinglePage = PoliciesAPI.PoliciesSinglePage; + export import PolicyCreateResponse = PoliciesAPI.PolicyCreateResponse; + export import PolicyUpdateResponse = PoliciesAPI.PolicyUpdateResponse; + export import PolicyListResponse = PoliciesAPI.PolicyListResponse; + export import PolicyGetResponse = PoliciesAPI.PolicyGetResponse; + export import PolicyListResponsesSinglePage = PoliciesAPI.PolicyListResponsesSinglePage; export import PolicyCreateParams = PoliciesAPI.PolicyCreateParams; export import PolicyUpdateParams = PoliciesAPI.PolicyUpdateParams; export import PolicyListParams = PoliciesAPI.PolicyListParams; diff --git a/src/resources/page-shield/scripts.ts b/src/resources/page-shield/scripts.ts index bf0ad01ff2..d587da7dcb 100644 --- a/src/resources/page-shield/scripts.ts +++ b/src/resources/page-shield/scripts.ts @@ -24,76 +24,128 @@ export class Scripts extends APIResource { scriptId: string, params: ScriptGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { zone_id } = params; - return this._client.get(`/zones/${zone_id}/page_shield/scripts/${scriptId}`, options); + return ( + this._client.get(`/zones/${zone_id}/page_shield/scripts/${scriptId}`, options) as Core.APIPromise<{ + result: ScriptGetResponse | null; + }> + )._thenUnwrap((obj) => obj.result); } } export class ScriptsSinglePage extends SinglePage