diff --git a/.stats.yml b/.stats.yml index 34aac7813a..fdf051588b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1397 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f5305b253841aee001bed9bf486562184b70df73d31313774fd5b00bc2e7f8e1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1f3a5920b5590a1e7f4df129cc299fe3d4aaa7bf4ef6915b015dd898b1a1813c.yml diff --git a/src/index.ts b/src/index.ts index b67d1951bc..d4c9480ed5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -482,25 +482,6 @@ export class Cloudflare extends Core.APIClient { static fileFromPath = Uploads.fileFromPath; } -export { - CloudflareError, - APIError, - APIConnectionError, - APIConnectionTimeoutError, - APIUserAbortError, - NotFoundError, - ConflictError, - RateLimitError, - BadRequestError, - AuthenticationError, - InternalServerError, - PermissionDeniedError, - UnprocessableEntityError, -} from './error'; - -export import toFile = Uploads.toFile; -export import fileFromPath = Uploads.fileFromPath; - Cloudflare.Accounts = Accounts; Cloudflare.OriginCACertificates = OriginCACertificates; Cloudflare.IPs = IPs; @@ -589,7 +570,6 @@ Cloudflare.WorkflowListResponsesV4PagePaginationArray = WorkflowListResponsesV4P Cloudflare.ResourceSharing = ResourceSharing; Cloudflare.ResourceSharingListResponsesV4PagePaginationArray = ResourceSharingListResponsesV4PagePaginationArray; - export declare namespace Cloudflare { export type RequestOptions = Core.RequestOptions; @@ -842,4 +822,21 @@ export declare namespace Cloudflare { export type SubscriptionZone = API.SubscriptionZone; } +export { toFile, fileFromPath } from 'cloudflare/uploads'; +export { + CloudflareError, + APIError, + APIConnectionError, + APIConnectionTimeoutError, + APIUserAbortError, + NotFoundError, + ConflictError, + RateLimitError, + BadRequestError, + AuthenticationError, + InternalServerError, + PermissionDeniedError, + UnprocessableEntityError, +} from 'cloudflare/error'; + export default Cloudflare; diff --git a/src/resources/zero-trust/access/service-tokens.ts b/src/resources/zero-trust/access/service-tokens.ts index dd0c5563f6..bd36583ce5 100644 --- a/src/resources/zero-trust/access/service-tokens.ts +++ b/src/resources/zero-trust/access/service-tokens.ts @@ -89,7 +89,7 @@ export class ServiceTokens extends APIResource { if (isRequestOptions(params)) { return this.list({}, params); } - const { account_id, zone_id } = params; + const { account_id, zone_id, ...query } = params; if (!account_id && !zone_id) { throw new CloudflareError('You must provide either account_id or zone_id.'); } @@ -109,7 +109,7 @@ export class ServiceTokens extends APIResource { return this._client.getAPIList( `/${accountOrZone}/${accountOrZoneId}/access/service_tokens`, ServiceTokensSinglePage, - options, + { query, ...options }, ); } @@ -389,14 +389,26 @@ export interface ServiceTokenUpdateParams { export interface ServiceTokenListParams { /** - * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + * Path param: 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. + * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the + * Account ID. */ zone_id?: string; + + /** + * Query param: The name of the service token. + */ + name?: string; + + /** + * Query param: Search for service tokens by other listed query parameters. + */ + search?: string; } export interface ServiceTokenDeleteParams { diff --git a/src/resources/zero-trust/identity-providers.ts b/src/resources/zero-trust/identity-providers.ts index 095b03299a..70b874efd7 100644 --- a/src/resources/zero-trust/identity-providers.ts +++ b/src/resources/zero-trust/identity-providers.ts @@ -1042,7 +1042,7 @@ export namespace IdentityProvider { * parameters for a specific provider, refer to our * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). */ - config: unknown; + config: AccessOnetimepin.Config; /** * The name of the identity provider, shown to users on the login page. @@ -1067,6 +1067,17 @@ export namespace IdentityProvider { */ scim_config?: IdentityProvidersAPI.IdentityProviderSCIMConfig; } + + export namespace AccessOnetimepin { + /** + * 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 { + redirect_url?: string; + } + } } /** @@ -2812,7 +2823,7 @@ export namespace IdentityProviderCreateParams { * required parameters for a specific provider, refer to our * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). */ - config: unknown; + config: IdentityProviderCreateParams.AccessOnetimepin.Config; /** * Body param: The name of the identity provider, shown to users on the login page. @@ -2844,6 +2855,15 @@ export namespace IdentityProviderCreateParams { */ scim_config?: IdentityProviderSCIMConfigParam; } + + export namespace AccessOnetimepin { + /** + * 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 {} + } } export type IdentityProviderUpdateParams = @@ -3751,7 +3771,7 @@ export namespace IdentityProviderUpdateParams { * required parameters for a specific provider, refer to our * [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). */ - config: unknown; + config: IdentityProviderUpdateParams.AccessOnetimepin.Config; /** * Body param: The name of the identity provider, shown to users on the login page. @@ -3783,6 +3803,15 @@ export namespace IdentityProviderUpdateParams { */ scim_config?: IdentityProviderSCIMConfigParam; } + + export namespace AccessOnetimepin { + /** + * 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 {} + } } export interface IdentityProviderListParams {