UNPKG

auth0

Version:

Auth0 Node.js SDK for the Management API v2.

123 lines (122 loc) 7.27 kB
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; export declare namespace TokenExchangeProfilesClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class TokenExchangeProfilesClient { protected readonly _options: NormalizedClientOptionsWithAuth<TokenExchangeProfilesClient.Options>; constructor(options: TokenExchangeProfilesClient.Options); /** * Retrieve a list of all Token Exchange Profiles available in your tenant. * * By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details. * * This endpoint supports Checkpoint pagination. To search by checkpoint, use the following parameters: * <ul> * <li><code>from</code>: Optional id from which to start selection.</li> * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> * </ul> * * <b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining. * * @param {Management.TokenExchangeProfilesListRequest} request * @param {TokenExchangeProfilesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Management.BadRequestError} * @throws {@link Management.UnauthorizedError} * @throws {@link Management.ForbiddenError} * @throws {@link Management.TooManyRequestsError} * * @example * await client.tokenExchangeProfiles.list({ * from: "from", * take: 1 * }) */ list(request?: Management.TokenExchangeProfilesListRequest, requestOptions?: TokenExchangeProfilesClient.RequestOptions): Promise<core.Page<Management.TokenExchangeProfileResponseContent, Management.ListTokenExchangeProfileResponseContent>>; /** * Create a new Token Exchange Profile within your tenant. * * By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details. * * @param {Management.CreateTokenExchangeProfileRequestContent} request * @param {TokenExchangeProfilesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Management.BadRequestError} * @throws {@link Management.UnauthorizedError} * @throws {@link Management.ForbiddenError} * @throws {@link Management.ConflictError} * @throws {@link Management.TooManyRequestsError} * * @example * await client.tokenExchangeProfiles.create({ * name: "name", * subject_token_type: "subject_token_type", * action_id: "action_id" * }) */ create(request: Management.CreateTokenExchangeProfileRequestContent, requestOptions?: TokenExchangeProfilesClient.RequestOptions): core.HttpResponsePromise<Management.CreateTokenExchangeProfileResponseContent>; private __create; /** * Retrieve details about a single Token Exchange Profile specified by ID. * * By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details. * * @param {string} id - ID of the Token Exchange Profile to retrieve. * @param {TokenExchangeProfilesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Management.BadRequestError} * @throws {@link Management.UnauthorizedError} * @throws {@link Management.ForbiddenError} * @throws {@link Management.NotFoundError} * @throws {@link Management.TooManyRequestsError} * * @example * await client.tokenExchangeProfiles.get("id") */ get(id: string, requestOptions?: TokenExchangeProfilesClient.RequestOptions): core.HttpResponsePromise<Management.GetTokenExchangeProfileResponseContent>; private __get; /** * Delete a Token Exchange Profile within your tenant. * * By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details. * * * @param {string} id - ID of the Token Exchange Profile to delete. * @param {TokenExchangeProfilesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Management.UnauthorizedError} * @throws {@link Management.ForbiddenError} * @throws {@link Management.TooManyRequestsError} * * @example * await client.tokenExchangeProfiles.delete("id") */ delete(id: string, requestOptions?: TokenExchangeProfilesClient.RequestOptions): core.HttpResponsePromise<void>; private __delete; /** * Update a Token Exchange Profile within your tenant. * * By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details. * * * @param {string} id - ID of the Token Exchange Profile to update. * @param {Management.UpdateTokenExchangeProfileRequestContent} request * @param {TokenExchangeProfilesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Management.BadRequestError} * @throws {@link Management.UnauthorizedError} * @throws {@link Management.ForbiddenError} * @throws {@link Management.NotFoundError} * @throws {@link Management.TooManyRequestsError} * * @example * await client.tokenExchangeProfiles.update("id") */ update(id: string, request?: Management.UpdateTokenExchangeProfileRequestContent, requestOptions?: TokenExchangeProfilesClient.RequestOptions): core.HttpResponsePromise<void>; private __update; }