Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated OAS Update #86

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 76 additions & 20 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,6 @@ paths:
- portalAccessToken: []
- {}
/api/v2/products/{productId}/actions:
x-unstable: true
parameters:
- $ref: '#/components/parameters/ProductId'
get:
Expand Down Expand Up @@ -1437,6 +1436,12 @@ components:
type: string
format: uuid
nullable: true
AuthStrategyCredentialType:
type: string
enum:
- client_credentials
- self_managed_client_credentials
- key_auth
ListAuthStrategiesItem:
type: object
additionalProperties: false
Expand All @@ -1447,19 +1452,9 @@ components:
type: string
example: Okta Strategy
credential_type:
type: string
enum:
- client_credentials
- self_managed_client_credentials
- key_auth
example: client_credentials
$ref: '#/components/schemas/AuthStrategyCredentialType'
auth_methods:
type: array
items:
description: Auth Methods enabled for this strategy
type: string
example:
- bearer
$ref: '#/components/schemas/AuthMethods'
required:
- id
- credential_type
Expand Down Expand Up @@ -1509,8 +1504,8 @@ components:
redirect_uri:
type: string
nullable: true
auth_strategy_id:
$ref: '#/components/schemas/AuthStrategyId'
auth_strategy:
$ref: '#/components/schemas/AuthStrategy'
created_at:
$ref: '#/components/schemas/CreatedAt'
updated_at:
Expand Down Expand Up @@ -1607,7 +1602,7 @@ components:
- description
- created_at
- updated_at
- auth_strategy_id
- auth_strategy
properties:
id:
$ref: '#/components/schemas/UUID'
Expand All @@ -1632,8 +1627,8 @@ components:
type: string
client_secret:
type: string
auth_strategy_id:
$ref: '#/components/schemas/AuthStrategyId'
auth_strategy:
$ref: '#/components/schemas/AuthStrategy'
created_at:
$ref: '#/components/schemas/CreatedAt'
updated_at:
Expand Down Expand Up @@ -1687,8 +1682,8 @@ components:
type: string
example: https://example.com/callback
nullable: true
auth_strategy_id:
$ref: '#/components/schemas/AuthStrategyId'
auth_strategy:
$ref: '#/components/schemas/AuthStrategy'
created_at:
$ref: '#/components/schemas/CreatedAt'
updated_at:
Expand Down Expand Up @@ -1754,6 +1749,67 @@ components:
Cannot be set when using Dynamic Client Registration.
type: string
maxLength: 255
AuthStrategyKeyAuth:
description: KeyAuth Auth strategy that the application uses.
type: object
required:
- id
- name
- credential_type
properties:
id:
type: string
format: uuid
example: b9e81174-b5bb-4638-a3c3-8afe61a0abf8
description: The Application Auth Strategy ID.
readOnly: true
name:
type: string
example: name
default: name
credential_type:
type: string
enum:
- key_auth
AuthMethods:
type: array
items:
description: Auth Methods enabled for this strategy
type: string
example:
- bearer
AuthStrategyClientCredentials:
description: Client Credential Auth strategy that the application uses.
type: object
required:
- id
- name
- credential_type
- auth_methods
properties:
id:
type: string
format: uuid
example: b9e81174-b5bb-4638-a3c3-8afe61a0abf8
description: The Application Auth Strategy ID.
readOnly: true
name:
type: string
example: name
default: name
credential_type:
type: string
enum:
- client_credentials
- self_managed_client_credentials
auth_methods:
$ref: '#/components/schemas/AuthMethods'
AuthStrategy:
oneOf:
- $ref: '#/components/schemas/AuthStrategyKeyAuth'
- $ref: '#/components/schemas/AuthStrategyClientCredentials'
discriminator:
propertyName: credential_type
CreatedAt:
type: string
format: date-time
Expand Down
123 changes: 103 additions & 20 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ export interface ApplicationCreationResponse {
*/
'credentials'?: ApplicationCreationResponseCredentials;
/**
* ID of the auth strategy to use for the application. If null or not included, the default application auth strategy will be used.
* @type {string}
*
* @type {AuthStrategy}
* @memberof ApplicationCreationResponse
*/
'auth_strategy_id': string | null;
'auth_strategy': AuthStrategy;
/**
* An ISO-8601 timestamp representation of entity creation date.
* @type {string}
Expand Down Expand Up @@ -231,11 +231,11 @@ export interface ApplicationUpdateResponse {
*/
'redirect_uri'?: string | null;
/**
* ID of the auth strategy to use for the application. If null or not included, the default application auth strategy will be used.
* @type {string}
*
* @type {AuthStrategy}
* @memberof ApplicationUpdateResponse
*/
'auth_strategy_id'?: string | null;
'auth_strategy'?: AuthStrategy;
/**
* An ISO-8601 timestamp representation of entity creation date.
* @type {string}
Expand All @@ -249,6 +249,98 @@ export interface ApplicationUpdateResponse {
*/
'updated_at': string;
}
/**
* @type AuthStrategy
* @export
*/
export type AuthStrategy = AuthStrategyClientCredentials | AuthStrategyKeyAuth;

/**
* Client Credential Auth strategy that the application uses.
* @export
* @interface AuthStrategyClientCredentials
*/
export interface AuthStrategyClientCredentials {
/**
* The Application Auth Strategy ID.
* @type {string}
* @memberof AuthStrategyClientCredentials
*/
'id': string;
/**
*
* @type {string}
* @memberof AuthStrategyClientCredentials
*/
'name': string;
/**
*
* @type {string}
* @memberof AuthStrategyClientCredentials
*/
'credential_type': AuthStrategyClientCredentialsCredentialTypeEnum;
/**
*
* @type {Array<string>}
* @memberof AuthStrategyClientCredentials
*/
'auth_methods': Array<string>;
}

export const AuthStrategyClientCredentialsCredentialTypeEnum = {
ClientCredentials: 'client_credentials',
SelfManagedClientCredentials: 'self_managed_client_credentials'
} as const;

export type AuthStrategyClientCredentialsCredentialTypeEnum = typeof AuthStrategyClientCredentialsCredentialTypeEnum[keyof typeof AuthStrategyClientCredentialsCredentialTypeEnum];

/**
*
* @export
* @enum {string}
*/

export const AuthStrategyCredentialType = {
ClientCredentials: 'client_credentials',
SelfManagedClientCredentials: 'self_managed_client_credentials',
KeyAuth: 'key_auth'
} as const;

export type AuthStrategyCredentialType = typeof AuthStrategyCredentialType[keyof typeof AuthStrategyCredentialType];


/**
* KeyAuth Auth strategy that the application uses.
* @export
* @interface AuthStrategyKeyAuth
*/
export interface AuthStrategyKeyAuth {
/**
* The Application Auth Strategy ID.
* @type {string}
* @memberof AuthStrategyKeyAuth
*/
'id': string;
/**
*
* @type {string}
* @memberof AuthStrategyKeyAuth
*/
'name': string;
/**
*
* @type {string}
* @memberof AuthStrategyKeyAuth
*/
'credential_type': AuthStrategyKeyAuthCredentialTypeEnum;
}

export const AuthStrategyKeyAuthCredentialTypeEnum = {
KeyAuth: 'key_auth'
} as const;

export type AuthStrategyKeyAuthCredentialTypeEnum = typeof AuthStrategyKeyAuthCredentialTypeEnum[keyof typeof AuthStrategyKeyAuthCredentialTypeEnum];

/**
* The request schema for the authenticate endpoint.
* @export
Expand Down Expand Up @@ -901,11 +993,11 @@ export interface GetApplicationResponse {
*/
'redirect_uri'?: string | null;
/**
* ID of the auth strategy to use for the application. If null or not included, the default application auth strategy will be used.
* @type {string}
*
* @type {AuthStrategy}
* @memberof GetApplicationResponse
*/
'auth_strategy_id'?: string | null;
'auth_strategy'?: AuthStrategy;
/**
* An ISO-8601 timestamp representation of entity creation date.
* @type {string}
Expand Down Expand Up @@ -1327,26 +1419,17 @@ export interface ListAuthStrategiesItem {
'name': string;
/**
*
* @type {string}
* @type {AuthStrategyCredentialType}
* @memberof ListAuthStrategiesItem
*/
'credential_type': ListAuthStrategiesItemCredentialTypeEnum;
'credential_type': AuthStrategyCredentialType;
/**
*
* @type {Array<string>}
* @memberof ListAuthStrategiesItem
*/
'auth_methods'?: Array<string>;
}

export const ListAuthStrategiesItemCredentialTypeEnum = {
ClientCredentials: 'client_credentials',
SelfManagedClientCredentials: 'self_managed_client_credentials',
KeyAuth: 'key_auth'
} as const;

export type ListAuthStrategiesItemCredentialTypeEnum = typeof ListAuthStrategiesItemCredentialTypeEnum[keyof typeof ListAuthStrategiesItemCredentialTypeEnum];

/**
*
* @export
Expand Down
Loading