Skip to content

Commit

Permalink
Regenerated SDK with OpenAPI3 spec from sdks-oas
Browse files Browse the repository at this point in the history
  • Loading branch information
gyaneshgouraw-okta committed Apr 28, 2024
1 parent 3bc86cb commit b1e6731
Show file tree
Hide file tree
Showing 24 changed files with 3,874 additions and 1,717 deletions.
5 changes: 2 additions & 3 deletions src/deprecations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
EmailProviderUpdateCredentials,
ClientCreateOidcLogout,
ClientOidcLogout,
ClientUpdateOidcLogout,
} from './management/__generated/models/index.js';

/**
Expand Down Expand Up @@ -39,6 +38,6 @@ export type ClientCreateOidcBackchannelLogout = ClientCreateOidcLogout;
*/
export type ClientOidcBackchannelLogout = ClientOidcLogout;
/**
* @deprecated Use {@link ClientUpdateOidcLogout} instead.
* @deprecated Use {@link ClientCreateOidcLogout} instead.
*/
export type ClientUpdateOidcBackchannelLogout = ClientUpdateOidcLogout;
export type ClientUpdateOidcBackchannelLogout = ClientCreateOidcLogout;
4 changes: 4 additions & 0 deletions src/management/__generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ import {
LogsManager,
OrganizationsManager,
PromptsManager,
RefreshTokensManager,
ResourceServersManager,
RolesManager,
RulesManager,
RulesConfigsManager,
SessionsManager,
StatsManager,
TenantsManager,
TicketsManager,
Expand Down Expand Up @@ -59,10 +61,12 @@ export abstract class ManagementClientBase {
public readonly logs = new LogsManager(this.configuration);
public readonly organizations = new OrganizationsManager(this.configuration);
public readonly prompts = new PromptsManager(this.configuration);
public readonly refreshTokens = new RefreshTokensManager(this.configuration);
public readonly resourceServers = new ResourceServersManager(this.configuration);
public readonly roles = new RolesManager(this.configuration);
public readonly rules = new RulesManager(this.configuration);
public readonly rulesConfigs = new RulesConfigsManager(this.configuration);
public readonly sessions = new SessionsManager(this.configuration);
public readonly stats = new StatsManager(this.configuration);
public readonly tenants = new TenantsManager(this.configuration);
public readonly tickets = new TicketsManager(this.configuration);
Expand Down
5 changes: 3 additions & 2 deletions src/management/__generated/managers/actions-manager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as runtime from '../../../lib/runtime.js';
import type { InitOverride, ApiResponse } from '../../../lib/runtime.js';
import type {
GetAction200Response,
GetActionVersions200Response,
GetActionVersions200ResponseVersionsInner,
GetActions200Response,
Expand Down Expand Up @@ -81,7 +82,7 @@ export class ActionsManager extends BaseAPI {
async get(
requestParameters: GetActionRequest,
initOverrides?: InitOverride
): Promise<ApiResponse<GetActions200ResponseActionsInner>> {
): Promise<ApiResponse<GetAction200Response>> {
runtime.validateRequiredRequestParams(requestParameters, ['id']);

const response = await this.request(
Expand Down Expand Up @@ -316,7 +317,7 @@ export class ActionsManager extends BaseAPI {
requestParameters: PatchActionOperationRequest,
bodyParameters: PatchActionRequest,
initOverrides?: InitOverride
): Promise<ApiResponse<GetActions200ResponseActionsInner>> {
): Promise<ApiResponse<GetAction200Response>> {
runtime.validateRequiredRequestParams(requestParameters, ['id']);

const headerParameters: runtime.HTTPHeaders = {};
Expand Down
4 changes: 2 additions & 2 deletions src/management/__generated/managers/anomaly-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const { BaseAPI } = runtime;
*/
export class AnomalyManager extends BaseAPI {
/**
* Unblock an IP address currently blocked by the <a href="https://auth0.com/docs/configure/attack-protection/suspicious-ip-throttling">Suspicious IP Throttling</a> due to multiple suspicious attempts.
* Remove a block imposed by <a href="https://auth0.com/docs/configure/attack-protection/suspicious-ip-throttling">Suspicious IP Throttling</a> for the given IP address.
* Remove the blocked IP address
*
* @throws {RequiredError}
Expand All @@ -35,7 +35,7 @@ export class AnomalyManager extends BaseAPI {
}

/**
* Check if a given IP address is blocked via the <a href="https://auth0.com/docs/configure/attack-protection/suspicious-ip-throttling">Suspicious IP Throttling</a> due to multiple suspicious attempts.
* Check if the given IP address is blocked via the <a href="https://auth0.com/docs/configure/attack-protection/suspicious-ip-throttling">Suspicious IP Throttling</a> due to multiple suspicious attempts.
* Check if an IP address is blocked
*
* @throws {RequiredError}
Expand Down
18 changes: 12 additions & 6 deletions src/management/__generated/managers/attack-protection-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const { BaseAPI } = runtime;
*/
export class AttackProtectionManager extends BaseAPI {
/**
* Get breached password detection settings
* Retrieve details of the Breached Password Detection configuration of your tenant.
* Get Breached Password Detection settings
*
* @throws {RequiredError}
*/
Expand All @@ -35,7 +36,8 @@ export class AttackProtectionManager extends BaseAPI {
}

/**
* Get the brute force configuration
* Retrieve details of the Brute-force Protection configuration of your tenant.
* Get Brute-force settings
*
* @throws {RequiredError}
*/
Expand All @@ -54,7 +56,8 @@ export class AttackProtectionManager extends BaseAPI {
}

/**
* Get the suspicious IP throttling configuration
* Retrieve details of the Suspicious IP Throttling configuration of your tenant.
* Get Suspicious IP Throttling settings
*
* @throws {RequiredError}
*/
Expand All @@ -73,7 +76,8 @@ export class AttackProtectionManager extends BaseAPI {
}

/**
* Update breached password detection settings
* Update details of the Breached Password Detection configuration of your tenant.
* Update Breached Password Detection settings
*
* @throws {RequiredError}
*/
Expand All @@ -99,7 +103,8 @@ export class AttackProtectionManager extends BaseAPI {
}

/**
* Update the brute force configuration
* Update the Brute-force Protection configuration of your tenant.
* Update Brute-force settings
*
* @throws {RequiredError}
*/
Expand All @@ -125,7 +130,8 @@ export class AttackProtectionManager extends BaseAPI {
}

/**
* Update the suspicious IP throttling configuration
* Update the details of the Suspicious IP Throttling configuration of your tenant.
* Update Suspicious IP Throttling settings
*
* @throws {RequiredError}
*/
Expand Down
7 changes: 4 additions & 3 deletions src/management/__generated/managers/client-grants-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const { BaseAPI } = runtime;
*/
export class ClientGrantsManager extends BaseAPI {
/**
* Delete a client grant.
* Delete the <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a> from your machine-to-machine application.
*
* Delete client grant
*
* @throws {RequiredError}
Expand All @@ -44,7 +45,7 @@ export class ClientGrantsManager extends BaseAPI {
}

/**
* Retrieve <a href="https://auth0.com/docs/api-auth/grant/client-credentials">client grants</a>.
* Retrieve a list of <a href="https://auth0.com/docs/api-auth/grant/client-credentials">client grants</a>, including the scopes associated with the application/API pair.
*
* Get client grants
*
Expand Down Expand Up @@ -131,7 +132,7 @@ export class ClientGrantsManager extends BaseAPI {
}

/**
* Create a client grant.
* Create a client grant for a machine-to-machine login flow. To learn more, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>.
* Create client grant
*
* @throws {RequiredError}
Expand Down
73 changes: 42 additions & 31 deletions src/management/__generated/managers/clients-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
GetClients200Response,
GetCredentials200ResponseInner,
PatchCredentialsByCredentialIdRequest,
PostCredentials201Response,
PostCredentialsRequest,
GetClients200ResponseOneOf,
DeleteClientsByIdRequest,
Expand Down Expand Up @@ -54,6 +55,7 @@ export class ClientsManager extends BaseAPI {
}

/**
* Delete a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>.
* Delete a client credential
*
* @throws {RequiredError}
Expand All @@ -78,15 +80,18 @@ export class ClientsManager extends BaseAPI {
}

/**
* Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude
* may also be specified. Note:
* Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude may also be specified.
* For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>.
*
* <ul>
* <li>
* <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code> can be retrieved with
* any scope.
* The following can be retrieved with any scope:
* <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>.
* </li>
* <li>
* <code>callbacks</code>, <code>oidc_backchannel_logout</code>, <code>allowed_origins</code>,
* The following properties can only be retrieved with the <code>read:clients</code> or
* <code>read:client_keys</code> scope:
* <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>,
* <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>,
* <code>callback_url_template</code>, <code>jwt_configuration</code>,
* <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>,
Expand All @@ -99,14 +104,13 @@ export class ClientsManager extends BaseAPI {
* <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>,
* <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>,
* <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>organization_usage</code>,
* <code>organization_require_behavior</code>
* properties can only be retrieved with the <code>read:clients</code> or
* <code>read:client_keys</code> scope.
* <code>organization_require_behavior</code>.
* </li>
* <li>
* The following properties can only be retrieved with the
* <code>read:client_keys</code> or <code>read:client_credentials</code> scope:
* <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>,
* <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code> properties can only be retrieved with the
* <code>read:client_keys</code> or <code>read:client_credentials</code> scope.
* <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>.
* </li>
* </ul>
*
Expand Down Expand Up @@ -174,14 +178,17 @@ export class ClientsManager extends BaseAPI {
}

/**
* Retrieve client details. A list of fields to include or exclude may also be specified. Note:
* Retrieve client details by ID. Clients are SSO connections or Applications linked with your Auth0 tenant. A list of fields to include or exclude may also be specified.
* For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>.
* <ul>
* <li>
* <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code> can be retrieved with
* the any of the scopes.
* The following properties can be retrieved with any of the scopes:
* <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>.
* </li>
* <li>
* <code>callbacks</code>, <code>oidc_backchannel_logout</code>, <code>allowed_origins</code>,
* The following properties can only be retrieved with the <code>read:clients</code> or
* <code>read:client_keys</code> scopes:
* <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>,
* <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>,
* <code>callback_url_template</code>, <code>jwt_configuration</code>,
* <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>,
Expand All @@ -194,18 +201,16 @@ export class ClientsManager extends BaseAPI {
* <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>,
* <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>,
* <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>organization_usage</code>,
* <code>organization_require_behavior</code>
* properties can only be retrieved with the <code>read:clients</code> or
* <code>read:client_keys</code> scope.
* <code>organization_require_behavior</code>.
* </li>
* <li>
* The following properties can only be retrieved with the <code>read:client_keys</code> or <code>read:client_credentials</code> scopes:
* <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>,
* <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code> properties can only be retrieved with the
* <code>read:client_keys</code> or <code>read:client_credentials</code> scope.
* <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>.
* </li>
* </ul>
*
* Get a client
* Get client by ID
*
* @throws {RequiredError}
*/
Expand Down Expand Up @@ -242,9 +247,9 @@ export class ClientsManager extends BaseAPI {
}

/**
* Get the list of client credentials that are associated to the client.
* Get the details of a client credential.
*
* Important: To enable credentials to be used
* <b>Important</b>: To enable credentials to be used for Private Key JWT authentication method, set the <code>client_authentication_methods</code> property on the client.
* Get client credentials
*
* @throws {RequiredError}
Expand All @@ -271,14 +276,16 @@ export class ClientsManager extends BaseAPI {

/**
* Get the details of a client credential.
* Get client credential
*
* <b>Important</b>: To enable credentials to be used for Private Key JWT authentication method, set the <code>client_authentication_methods</code> property on the client.
* Get client credential details
*
* @throws {RequiredError}
*/
async getCredential(
requestParameters: GetCredentialsByCredentialIdRequest,
initOverrides?: InitOverride
): Promise<ApiResponse<GetCredentials200ResponseInner>> {
): Promise<ApiResponse<PostCredentials201Response>> {
runtime.validateRequiredRequestParams(requestParameters, ['client_id', 'credential_id']);

const response = await this.request(
Expand All @@ -295,6 +302,8 @@ export class ClientsManager extends BaseAPI {
}

/**
* Updates a client's settings. For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>.
*
* Notes:
* - The `client_secret` and `signing_key` attributes can only be updated with the `update:client_keys` scope.
* - The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use
Expand Down Expand Up @@ -336,6 +345,7 @@ export class ClientsManager extends BaseAPI {
}

/**
* Change a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>.
* Update a client credential
*
* @throws {RequiredError}
Expand All @@ -344,7 +354,7 @@ export class ClientsManager extends BaseAPI {
requestParameters: PatchCredentialsByCredentialIdOperationRequest,
bodyParameters: PatchCredentialsByCredentialIdRequest,
initOverrides?: InitOverride
): Promise<ApiResponse<GetCredentials200ResponseInner>> {
): Promise<ApiResponse<PostCredentials201Response>> {
runtime.validateRequiredRequestParams(requestParameters, ['client_id', 'credential_id']);

const headerParameters: runtime.HTTPHeaders = {};
Expand All @@ -367,7 +377,8 @@ export class ClientsManager extends BaseAPI {
}

/**
* Create a new client (application or SSO integration).
* Create a new client (application or SSO integration). For more information, read <a href="https://www.auth0.com/docs/get-started/auth0-overview/create-applications">Create Applications</a>
* <a href="https://www.auth0.com/docs/authenticate/single-sign-on/api-endpoints-for-single-sign-on>">API Endpoints for Single Sign-On</a>.
*
* Notes:
* - We recommend leaving the `client_secret` parameter unspecified to allow the generation of a safe secret.
Expand Down Expand Up @@ -407,7 +418,8 @@ export class ClientsManager extends BaseAPI {
}

/**
* Create a client credential associated to the client. The credential will be created but not yet enabled
* Create a client credential associated to your application. The credential will be created but not yet enabled for use with Private Key JWT authentication method. To enable the credential, set the <code>client_authentication_methods</code> property on the client.
* For more information, read <a href="https://www.auth0.com//docs/get-started/applications/configure-private-key-jwt">Configure Private Key JWT Authentication</a>.
* Create a client credential
*
* @throws {RequiredError}
Expand All @@ -416,7 +428,7 @@ export class ClientsManager extends BaseAPI {
requestParameters: PostCredentialsOperationRequest,
bodyParameters: PostCredentialsRequest,
initOverrides?: InitOverride
): Promise<ApiResponse<GetCredentials200ResponseInner>> {
): Promise<ApiResponse<PostCredentials201Response>> {
runtime.validateRequiredRequestParams(requestParameters, ['client_id']);

const headerParameters: runtime.HTTPHeaders = {};
Expand All @@ -442,10 +454,9 @@ export class ClientsManager extends BaseAPI {
/**
* Rotate a client secret.
*
* This endpoint cannot be used with clients configured with Private Key JWT authentication method (client_authentication_methods configured with private_key_jwt).
*
* Note: The generated secret is NOT base64 encoded.
* This endpoint cannot be used with clients configured with Private Key JWT authentication method (client_authentication_methods configured with private_key_jwt). The generated secret is NOT base64 encoded.
*
* For more information, read <a href="https://www.auth0.com/docs/get-started/applications/rotate-client-secret">Rotate Client Secrets</a>.
* Rotate a client secret
*
* @throws {RequiredError}
Expand Down
Loading

0 comments on commit b1e6731

Please sign in to comment.