Skip to content
Open
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
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"msw": "2.11.2",
"@types/node": "^18.19.70",
"typescript": "~5.7.2",
"prettier": "3.4.2",
"prettier": "3.7.4",
"typedoc": "^0.28.7",
"typedoc-plugin-missing-exports": "^4.0.0",
"nock": "^14.0.6",
Expand All @@ -106,7 +106,8 @@
"fs": false,
"os": false,
"path": false,
"stream": false
"stream": false,
"crypto": false
},
"packageManager": "yarn@1.22.22",
"engines": {
Expand Down
390 changes: 271 additions & 119 deletions reference.md

Large diffs are not rendered by default.

17 changes: 10 additions & 7 deletions src/management/BaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,26 @@ export interface BaseRequestOptions {
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
}

export type NormalizedClientOptions<T extends BaseClientOptions> = T & {
export type NormalizedClientOptions<T extends BaseClientOptions = BaseClientOptions> = T & {
logging: core.logging.Logger;
authProvider?: core.AuthProvider;
};

export type NormalizedClientOptionsWithAuth<T extends BaseClientOptions> = NormalizedClientOptions<T> & {
authProvider: core.AuthProvider;
};
export type NormalizedClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions> =
NormalizedClientOptions<T> & {
authProvider: core.AuthProvider;
};

export function normalizeClientOptions<T extends BaseClientOptions>(options: T): NormalizedClientOptions<T> {
export function normalizeClientOptions<T extends BaseClientOptions = BaseClientOptions>(
options: T,
): NormalizedClientOptions<T> {
return {
...options,
logging: core.logging.createLogger(options?.logging),
} as NormalizedClientOptions<T>;
}

export function normalizeClientOptionsWithAuth<T extends BaseClientOptions>(
export function normalizeClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions>(
options: T,
): NormalizedClientOptionsWithAuth<T> {
const normalized = normalizeClientOptions(options) as NormalizedClientOptionsWithAuth<T>;
Expand All @@ -60,7 +63,7 @@ export function normalizeClientOptionsWithAuth<T extends BaseClientOptions>(
return normalized;
}

function withNoOpAuthProvider<T extends BaseClientOptions>(
function withNoOpAuthProvider<T extends BaseClientOptions = BaseClientOptions>(
options: NormalizedClientOptions<T>,
): NormalizedClientOptionsWithAuth<T> {
return {
Expand Down
30 changes: 22 additions & 8 deletions src/management/api/requests/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ export interface UpdateClientRequestContent {
client_aliases?: string[];
/** Ids of clients that will be allowed to perform delegation requests. Clients that will be allowed to make delegation request. By default, all your clients will be allowed. This field allows you to specify specific clients */
allowed_clients?: string[];
/** URLs that are valid to redirect to after logout from Auth0. */
/** URLs that are valid to redirect to after logout from Auth0 */
allowed_logout_urls?: string[];
jwt_configuration?: Management.ClientJwtConfiguration;
encryption_key?: Management.ClientEncryptionKey | null;
Expand Down Expand Up @@ -1451,7 +1451,7 @@ export interface CreateSelfServiceProfileRequestContent {
/** The description of the self-service Profile. */
description?: string;
branding?: Management.SelfServiceProfileBrandingProperties;
/** List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `keycloak-samlp`, `pingfederate`] */
/** List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `auth0-samlp`, `okta-samlp`, `keycloak-samlp`, `pingfederate`] */
allowed_strategies?: Management.SelfServiceProfileAllowedStrategyEnum[];
/** List of attributes to be mapped that will be shown to the user during the SS-SSO flow. */
user_attributes?: Management.SelfServiceProfileUserAttribute[];
Expand All @@ -1468,7 +1468,7 @@ export interface UpdateSelfServiceProfileRequestContent {
name?: string;
description?: (Management.SelfServiceProfileDescription | undefined) | null;
branding?: Management.SelfServiceProfileBranding | undefined;
/** List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `keycloak-samlp`, `pingfederate`] */
/** List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `auth0-samlp`, `okta-samlp`, `keycloak-samlp`, `pingfederate`] */
allowed_strategies?: Management.SelfServiceProfileAllowedStrategyEnum[];
user_attributes?: (Management.SelfServiceProfileUserAttributes | undefined) | null;
/** ID of the user-attribute-profile to associate with this self-service profile. */
Expand Down Expand Up @@ -2408,15 +2408,15 @@ export interface ListDirectoryProvisioningsRequestParameters {
/**
* @example
* {
* take: 1,
* from: "from"
* from: "from",
* take: 1
* }
*/
export interface GetConnectionEnabledClientsRequestParameters {
/** Number of results per page. Defaults to 50. */
take?: number | null;
export interface ListScimConfigurationsRequestParameters {
/** Optional Id from which to start selection. */
from?: string | null;
/** Number of results per page. Defaults to 50. */
take?: number | null;
}

/**
Expand All @@ -2433,6 +2433,20 @@ export interface UpdateScimConfigurationRequestContent {
mapping: Management.ScimMappingItem[];
}

/**
* @example
* {
* take: 1,
* from: "from"
* }
*/
export interface GetConnectionEnabledClientsRequestParameters {
/** Number of results per page. Defaults to 50. */
take?: number | null;
/** Optional Id from which to start selection. */
from?: string | null;
}

/**
* @example
* {
Expand Down
35 changes: 11 additions & 24 deletions src/management/api/resources/actions/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,14 @@ export class ActionsClient {
request: Management.ListActionsRequestParameters,
): Promise<core.WithRawResponse<Management.ListActionsPaginatedResponseContent>> => {
const { triggerId, actionName, deployed, page = 0, per_page: perPage = 50, installed } = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (triggerId !== undefined) {
_queryParams["triggerId"] = triggerId;
}
if (actionName !== undefined) {
_queryParams["actionName"] = actionName;
}
if (deployed !== undefined) {
_queryParams["deployed"] = deployed?.toString() ?? null;
}
if (page !== undefined) {
_queryParams["page"] = page?.toString() ?? null;
}
if (perPage !== undefined) {
_queryParams["per_page"] = perPage?.toString() ?? null;
}
if (installed !== undefined) {
_queryParams["installed"] = installed?.toString() ?? null;
}
const _queryParams: Record<string, unknown> = {
triggerId,
actionName,
deployed,
page,
per_page: perPage,
installed,
};
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
Expand Down Expand Up @@ -359,11 +348,9 @@ export class ActionsClient {
requestOptions?: ActionsClient.RequestOptions,
): Promise<core.WithRawResponse<void>> {
const { force } = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (force !== undefined) {
_queryParams["force"] = force?.toString() ?? null;
}

const _queryParams: Record<string, unknown> = {
force,
};
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,10 @@ export class ModulesClient {
request: Management.GetActionModulesRequestParameters,
): Promise<core.WithRawResponse<Management.GetActionModulesResponseContent>> => {
const { page = 0, per_page: perPage = 50 } = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (page !== undefined) {
_queryParams["page"] = page?.toString() ?? null;
}
if (perPage !== undefined) {
_queryParams["per_page"] = perPage?.toString() ?? null;
}
const _queryParams: Record<string, unknown> = {
page,
per_page: perPage,
};
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
Expand Down Expand Up @@ -493,13 +490,10 @@ export class ModulesClient {
request: Management.GetActionModuleActionsRequestParameters,
): Promise<core.WithRawResponse<Management.GetActionModuleActionsResponseContent>> => {
const { page = 0, per_page: perPage = 50 } = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (page !== undefined) {
_queryParams["page"] = page?.toString() ?? null;
}
if (perPage !== undefined) {
_queryParams["per_page"] = perPage?.toString() ?? null;
}
const _queryParams: Record<string, unknown> = {
page,
per_page: perPage,
};
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,10 @@ export class VersionsClient {
request: Management.GetActionModuleVersionsRequestParameters,
): Promise<core.WithRawResponse<Management.GetActionModuleVersionsResponseContent>> => {
const { page = 0, per_page: perPage = 50 } = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (page !== undefined) {
_queryParams["page"] = page?.toString() ?? null;
}
if (perPage !== undefined) {
_queryParams["per_page"] = perPage?.toString() ?? null;
}
const _queryParams: Record<string, unknown> = {
page,
per_page: perPage,
};
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,10 @@ export class BindingsClient {
request: Management.ListActionTriggerBindingsRequestParameters,
): Promise<core.WithRawResponse<Management.ListActionBindingsPaginatedResponseContent>> => {
const { page = 0, per_page: perPage = 50 } = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (page !== undefined) {
_queryParams["page"] = page?.toString() ?? null;
}
if (perPage !== undefined) {
_queryParams["per_page"] = perPage?.toString() ?? null;
}
const _queryParams: Record<string, unknown> = {
page,
per_page: perPage,
};
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,10 @@ export class VersionsClient {
request: Management.ListActionVersionsRequestParameters,
): Promise<core.WithRawResponse<Management.ListActionVersionsPaginatedResponseContent>> => {
const { page = 0, per_page: perPage = 50 } = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (page !== undefined) {
_queryParams["page"] = page?.toString() ?? null;
}
if (perPage !== undefined) {
_queryParams["per_page"] = perPage?.toString() ?? null;
}
const _queryParams: Record<string, unknown> = {
page,
per_page: perPage,
};
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
Expand Down Expand Up @@ -270,7 +267,7 @@ export class VersionsClient {
contentType: "application/json",
queryParameters: requestOptions?.queryParams,
requestType: "json",
body: request != null ? request : undefined,
body: request,
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,9 @@ export class ProvidersClient {
requestOptions?: ProvidersClient.RequestOptions,
): Promise<core.WithRawResponse<Management.ListBrandingPhoneProvidersResponseContent>> {
const { disabled } = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (disabled !== undefined) {
_queryParams["disabled"] = disabled?.toString() ?? null;
}

const _queryParams: Record<string, unknown> = {
disabled,
};
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,9 @@ export class TemplatesClient {
requestOptions?: TemplatesClient.RequestOptions,
): Promise<core.WithRawResponse<Management.ListPhoneTemplatesResponseContent>> {
const { disabled } = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (disabled !== undefined) {
_queryParams["disabled"] = disabled?.toString() ?? null;
}

const _queryParams: Record<string, unknown> = {
disabled,
};
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
Expand Down
27 changes: 8 additions & 19 deletions src/management/api/resources/clientGrants/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,25 +64,14 @@ export class ClientGrantsClient {
allow_any_organization: allowAnyOrganization,
subject_type: subjectType,
} = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (from_ !== undefined) {
_queryParams["from"] = from_;
}
if (take !== undefined) {
_queryParams["take"] = take?.toString() ?? null;
}
if (audience !== undefined) {
_queryParams["audience"] = audience;
}
if (clientId !== undefined) {
_queryParams["client_id"] = clientId;
}
if (allowAnyOrganization !== undefined) {
_queryParams["allow_any_organization"] = allowAnyOrganization?.toString() ?? null;
}
if (subjectType !== undefined) {
_queryParams["subject_type"] = subjectType;
}
const _queryParams: Record<string, unknown> = {
from: from_,
take,
audience,
client_id: clientId,
allow_any_organization: allowAnyOrganization,
subject_type: subjectType !== undefined ? subjectType : undefined,
};
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,10 @@ export class OrganizationsClient {
request: Management.ListClientGrantOrganizationsRequestParameters,
): Promise<core.WithRawResponse<Management.ListClientGrantOrganizationsPaginatedResponseContent>> => {
const { from: from_, take = 50 } = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (from_ !== undefined) {
_queryParams["from"] = from_;
}
if (take !== undefined) {
_queryParams["take"] = take?.toString() ?? null;
}
const _queryParams: Record<string, unknown> = {
from: from_,
take,
};
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
Expand Down
Loading
Loading