Skip to content

Commit 173d27f

Browse files
Feat: Added new connection options, type consolidation, and core improvements (#1301)
2 parents c42753c + 88711e0 commit 173d27f

109 files changed

Lines changed: 6421 additions & 6273 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"msw": "2.11.2",
8888
"@types/node": "^18.19.70",
8989
"typescript": "~5.7.2",
90-
"prettier": "3.4.2",
90+
"prettier": "3.7.4",
9191
"typedoc": "^0.28.7",
9292
"typedoc-plugin-missing-exports": "^4.0.0",
9393
"nock": "^14.0.6",
@@ -106,7 +106,8 @@
106106
"fs": false,
107107
"os": false,
108108
"path": false,
109-
"stream": false
109+
"stream": false,
110+
"crypto": false
110111
},
111112
"packageManager": "yarn@1.22.22",
112113
"engines": {

reference.md

Lines changed: 271 additions & 119 deletions
Large diffs are not rendered by default.

src/management/BaseClient.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,26 @@ export interface BaseRequestOptions {
3535
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
3636
}
3737

38-
export type NormalizedClientOptions<T extends BaseClientOptions> = T & {
38+
export type NormalizedClientOptions<T extends BaseClientOptions = BaseClientOptions> = T & {
3939
logging: core.logging.Logger;
4040
authProvider?: core.AuthProvider;
4141
};
4242

43-
export type NormalizedClientOptionsWithAuth<T extends BaseClientOptions> = NormalizedClientOptions<T> & {
44-
authProvider: core.AuthProvider;
45-
};
43+
export type NormalizedClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions> =
44+
NormalizedClientOptions<T> & {
45+
authProvider: core.AuthProvider;
46+
};
4647

47-
export function normalizeClientOptions<T extends BaseClientOptions>(options: T): NormalizedClientOptions<T> {
48+
export function normalizeClientOptions<T extends BaseClientOptions = BaseClientOptions>(
49+
options: T,
50+
): NormalizedClientOptions<T> {
4851
return {
4952
...options,
5053
logging: core.logging.createLogger(options?.logging),
5154
} as NormalizedClientOptions<T>;
5255
}
5356

54-
export function normalizeClientOptionsWithAuth<T extends BaseClientOptions>(
57+
export function normalizeClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions>(
5558
options: T,
5659
): NormalizedClientOptionsWithAuth<T> {
5760
const normalized = normalizeClientOptions(options) as NormalizedClientOptionsWithAuth<T>;
@@ -60,7 +63,7 @@ export function normalizeClientOptionsWithAuth<T extends BaseClientOptions>(
6063
return normalized;
6164
}
6265

63-
function withNoOpAuthProvider<T extends BaseClientOptions>(
66+
function withNoOpAuthProvider<T extends BaseClientOptions = BaseClientOptions>(
6467
options: NormalizedClientOptions<T>,
6568
): NormalizedClientOptionsWithAuth<T> {
6669
return {

src/management/api/requests/requests.ts

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ export interface UpdateClientRequestContent {
349349
client_aliases?: string[];
350350
/** 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 */
351351
allowed_clients?: string[];
352-
/** URLs that are valid to redirect to after logout from Auth0. */
352+
/** URLs that are valid to redirect to after logout from Auth0 */
353353
allowed_logout_urls?: string[];
354354
jwt_configuration?: Management.ClientJwtConfiguration;
355355
encryption_key?: Management.ClientEncryptionKey | null;
@@ -1451,7 +1451,7 @@ export interface CreateSelfServiceProfileRequestContent {
14511451
/** The description of the self-service Profile. */
14521452
description?: string;
14531453
branding?: Management.SelfServiceProfileBrandingProperties;
1454-
/** 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`] */
1454+
/** 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`] */
14551455
allowed_strategies?: Management.SelfServiceProfileAllowedStrategyEnum[];
14561456
/** List of attributes to be mapped that will be shown to the user during the SS-SSO flow. */
14571457
user_attributes?: Management.SelfServiceProfileUserAttribute[];
@@ -1468,7 +1468,7 @@ export interface UpdateSelfServiceProfileRequestContent {
14681468
name?: string;
14691469
description?: (Management.SelfServiceProfileDescription | undefined) | null;
14701470
branding?: Management.SelfServiceProfileBranding | undefined;
1471-
/** 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`] */
1471+
/** 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`] */
14721472
allowed_strategies?: Management.SelfServiceProfileAllowedStrategyEnum[];
14731473
user_attributes?: (Management.SelfServiceProfileUserAttributes | undefined) | null;
14741474
/** ID of the user-attribute-profile to associate with this self-service profile. */
@@ -2408,15 +2408,15 @@ export interface ListDirectoryProvisioningsRequestParameters {
24082408
/**
24092409
* @example
24102410
* {
2411-
* take: 1,
2412-
* from: "from"
2411+
* from: "from",
2412+
* take: 1
24132413
* }
24142414
*/
2415-
export interface GetConnectionEnabledClientsRequestParameters {
2416-
/** Number of results per page. Defaults to 50. */
2417-
take?: number | null;
2415+
export interface ListScimConfigurationsRequestParameters {
24182416
/** Optional Id from which to start selection. */
24192417
from?: string | null;
2418+
/** Number of results per page. Defaults to 50. */
2419+
take?: number | null;
24202420
}
24212421

24222422
/**
@@ -2433,6 +2433,20 @@ export interface UpdateScimConfigurationRequestContent {
24332433
mapping: Management.ScimMappingItem[];
24342434
}
24352435

2436+
/**
2437+
* @example
2438+
* {
2439+
* take: 1,
2440+
* from: "from"
2441+
* }
2442+
*/
2443+
export interface GetConnectionEnabledClientsRequestParameters {
2444+
/** Number of results per page. Defaults to 50. */
2445+
take?: number | null;
2446+
/** Optional Id from which to start selection. */
2447+
from?: string | null;
2448+
}
2449+
24362450
/**
24372451
* @example
24382452
* {

src/management/api/resources/actions/client/Client.ts

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -76,25 +76,14 @@ export class ActionsClient {
7676
request: Management.ListActionsRequestParameters,
7777
): Promise<core.WithRawResponse<Management.ListActionsPaginatedResponseContent>> => {
7878
const { triggerId, actionName, deployed, page = 0, per_page: perPage = 50, installed } = request;
79-
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
80-
if (triggerId !== undefined) {
81-
_queryParams["triggerId"] = triggerId;
82-
}
83-
if (actionName !== undefined) {
84-
_queryParams["actionName"] = actionName;
85-
}
86-
if (deployed !== undefined) {
87-
_queryParams["deployed"] = deployed?.toString() ?? null;
88-
}
89-
if (page !== undefined) {
90-
_queryParams["page"] = page?.toString() ?? null;
91-
}
92-
if (perPage !== undefined) {
93-
_queryParams["per_page"] = perPage?.toString() ?? null;
94-
}
95-
if (installed !== undefined) {
96-
_queryParams["installed"] = installed?.toString() ?? null;
97-
}
79+
const _queryParams: Record<string, unknown> = {
80+
triggerId,
81+
actionName,
82+
deployed,
83+
page,
84+
per_page: perPage,
85+
installed,
86+
};
9887
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
9988
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
10089
_authRequest.headers,
@@ -359,11 +348,9 @@ export class ActionsClient {
359348
requestOptions?: ActionsClient.RequestOptions,
360349
): Promise<core.WithRawResponse<void>> {
361350
const { force } = request;
362-
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
363-
if (force !== undefined) {
364-
_queryParams["force"] = force?.toString() ?? null;
365-
}
366-
351+
const _queryParams: Record<string, unknown> = {
352+
force,
353+
};
367354
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
368355
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
369356
_authRequest.headers,

src/management/api/resources/actions/resources/modules/client/Client.ts

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,10 @@ export class ModulesClient {
5454
request: Management.GetActionModulesRequestParameters,
5555
): Promise<core.WithRawResponse<Management.GetActionModulesResponseContent>> => {
5656
const { page = 0, per_page: perPage = 50 } = request;
57-
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
58-
if (page !== undefined) {
59-
_queryParams["page"] = page?.toString() ?? null;
60-
}
61-
if (perPage !== undefined) {
62-
_queryParams["per_page"] = perPage?.toString() ?? null;
63-
}
57+
const _queryParams: Record<string, unknown> = {
58+
page,
59+
per_page: perPage,
60+
};
6461
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
6562
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
6663
_authRequest.headers,
@@ -493,13 +490,10 @@ export class ModulesClient {
493490
request: Management.GetActionModuleActionsRequestParameters,
494491
): Promise<core.WithRawResponse<Management.GetActionModuleActionsResponseContent>> => {
495492
const { page = 0, per_page: perPage = 50 } = request;
496-
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
497-
if (page !== undefined) {
498-
_queryParams["page"] = page?.toString() ?? null;
499-
}
500-
if (perPage !== undefined) {
501-
_queryParams["per_page"] = perPage?.toString() ?? null;
502-
}
493+
const _queryParams: Record<string, unknown> = {
494+
page,
495+
per_page: perPage,
496+
};
503497
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
504498
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
505499
_authRequest.headers,

src/management/api/resources/actions/resources/modules/resources/versions/client/Client.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,10 @@ export class VersionsClient {
5454
request: Management.GetActionModuleVersionsRequestParameters,
5555
): Promise<core.WithRawResponse<Management.GetActionModuleVersionsResponseContent>> => {
5656
const { page = 0, per_page: perPage = 50 } = request;
57-
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
58-
if (page !== undefined) {
59-
_queryParams["page"] = page?.toString() ?? null;
60-
}
61-
if (perPage !== undefined) {
62-
_queryParams["per_page"] = perPage?.toString() ?? null;
63-
}
57+
const _queryParams: Record<string, unknown> = {
58+
page,
59+
per_page: perPage,
60+
};
6461
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
6562
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
6663
_authRequest.headers,

src/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,10 @@ export class BindingsClient {
5353
request: Management.ListActionTriggerBindingsRequestParameters,
5454
): Promise<core.WithRawResponse<Management.ListActionBindingsPaginatedResponseContent>> => {
5555
const { page = 0, per_page: perPage = 50 } = request;
56-
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
57-
if (page !== undefined) {
58-
_queryParams["page"] = page?.toString() ?? null;
59-
}
60-
if (perPage !== undefined) {
61-
_queryParams["per_page"] = perPage?.toString() ?? null;
62-
}
56+
const _queryParams: Record<string, unknown> = {
57+
page,
58+
per_page: perPage,
59+
};
6360
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
6461
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
6562
_authRequest.headers,

src/management/api/resources/actions/resources/versions/client/Client.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,10 @@ export class VersionsClient {
5050
request: Management.ListActionVersionsRequestParameters,
5151
): Promise<core.WithRawResponse<Management.ListActionVersionsPaginatedResponseContent>> => {
5252
const { page = 0, per_page: perPage = 50 } = request;
53-
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
54-
if (page !== undefined) {
55-
_queryParams["page"] = page?.toString() ?? null;
56-
}
57-
if (perPage !== undefined) {
58-
_queryParams["per_page"] = perPage?.toString() ?? null;
59-
}
53+
const _queryParams: Record<string, unknown> = {
54+
page,
55+
per_page: perPage,
56+
};
6057
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
6158
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
6259
_authRequest.headers,
@@ -270,7 +267,7 @@ export class VersionsClient {
270267
contentType: "application/json",
271268
queryParameters: requestOptions?.queryParams,
272269
requestType: "json",
273-
body: request != null ? request : undefined,
270+
body: request,
274271
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
275272
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
276273
abortSignal: requestOptions?.abortSignal,

src/management/api/resources/branding/resources/phone/resources/providers/client/Client.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,9 @@ export class ProvidersClient {
5353
requestOptions?: ProvidersClient.RequestOptions,
5454
): Promise<core.WithRawResponse<Management.ListBrandingPhoneProvidersResponseContent>> {
5555
const { disabled } = request;
56-
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
57-
if (disabled !== undefined) {
58-
_queryParams["disabled"] = disabled?.toString() ?? null;
59-
}
60-
56+
const _queryParams: Record<string, unknown> = {
57+
disabled,
58+
};
6159
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
6260
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
6361
_authRequest.headers,

0 commit comments

Comments
 (0)