From aa803d099fbdd94d18538c5c96906edde38cead1 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 22 May 2024 18:48:29 +0000 Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API --- .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