Skip to content

Commit 62a2abd

Browse files
SDK regeneration
1 parent c7ce988 commit 62a2abd

158 files changed

Lines changed: 3724 additions & 7840 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: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"types": "./dist/cjs/index.d.ts",
1414
"exports": {
1515
".": {
16-
"types": "./dist/cjs/index.d.ts",
1716
"import": {
1817
"types": "./dist/esm/index.d.mts",
1918
"default": "./dist/esm/index.mjs"
@@ -77,17 +76,17 @@
7776
"auth0-legacy": "npm:auth0@^4.27.0"
7877
},
7978
"devDependencies": {
80-
"webpack": "^5.97.1",
81-
"ts-loader": "^9.5.1",
79+
"webpack": "^5.105.4",
80+
"ts-loader": "^9.5.4",
8281
"jest": "^29.7.0",
8382
"@jest/globals": "^29.7.0",
8483
"@types/jest": "^29.5.14",
8584
"ts-jest": "^29.3.4",
8685
"jest-environment-jsdom": "^29.7.0",
8786
"msw": "2.11.2",
8887
"@types/node": "^18.19.70",
89-
"typescript": "~5.7.2",
90-
"prettier": "3.7.4",
88+
"typescript": "~5.9.3",
89+
"prettier": "3.8.1",
9190
"typedoc": "^0.28.7",
9291
"typedoc-plugin-missing-exports": "^4.0.0",
9392
"nock": "^14.0.6",

src/management/Client.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,4 +275,35 @@ export class ManagementClient {
275275
public get verifiableCredentials(): VerifiableCredentialsClient {
276276
return (this._verifiableCredentials ??= new VerifiableCredentialsClient(this._options));
277277
}
278+
279+
/**
280+
* Make a passthrough request using the SDK's configured auth, retry, logging, etc.
281+
* This is useful for making requests to endpoints not yet supported in the SDK.
282+
* The input can be a URL string, URL object, or Request object. Relative paths are resolved against the configured base URL.
283+
*
284+
* @param {Request | string | URL} input - The URL, path, or Request object.
285+
* @param {RequestInit} init - Standard fetch RequestInit options.
286+
* @param {core.PassthroughRequest.RequestOptions} requestOptions - Per-request overrides (timeout, retries, headers, abort signal).
287+
* @returns {Promise<Response>} A standard Response object.
288+
*/
289+
public async fetch(
290+
input: Request | string | URL,
291+
init?: RequestInit,
292+
requestOptions?: core.PassthroughRequest.RequestOptions,
293+
): Promise<Response> {
294+
return core.makePassthroughRequest(
295+
input,
296+
init,
297+
{
298+
baseUrl: this._options.baseUrl ?? this._options.environment,
299+
headers: this._options.headers,
300+
timeoutInSeconds: this._options.timeoutInSeconds,
301+
maxRetries: this._options.maxRetries,
302+
fetch: this._options.fetch,
303+
logging: this._options.logging,
304+
getAuthHeaders: async () => (await this._options.authProvider.getAuthRequest()).headers,
305+
},
306+
requestOptions,
307+
);
308+
}
278309
}

src/management/api/types/types.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5809,7 +5809,7 @@ export interface ConnectionPropertiesOptions {
58095809
/** Enable this if you have a legacy user store and you want to gradually migrate those users to the Auth0 user store */
58105810
import_mode?: boolean | undefined;
58115811
/** Stores encrypted string only configurations for connections */
5812-
configuration?: (Record<string, (string | null) | undefined> | null) | undefined;
5812+
configuration?: (Record<string, string | null> | null) | undefined;
58135813
customScripts?: Management.ConnectionCustomScripts | undefined;
58145814
authentication_methods?: (Management.ConnectionAuthenticationMethods | null) | undefined;
58155815
passkey_options?: (Management.ConnectionPasskeyOptions | null) | undefined;
@@ -7322,7 +7322,7 @@ export type ConnectionUpstreamAliasEnum =
73227322
* Options for adding parameters in the request to the upstream IdP
73237323
*/
73247324
export type ConnectionUpstreamParams =
7325-
| (Record<string, (Management.ConnectionUpstreamAdditionalProperties | null) | undefined> | null)
7325+
| (Record<string, Management.ConnectionUpstreamAdditionalProperties | null> | null)
73267326
| undefined;
73277327

73287328
/**
@@ -7407,7 +7407,7 @@ export type ConnectionWaadProtocolEnumAzureAd =
74077407
/**
74087408
* Metadata associated with the connection in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed.
74097409
*/
7410-
export type ConnectionsMetadata = Record<string, (string | null) | undefined>;
7410+
export type ConnectionsMetadata = Record<string, string | null>;
74117411

74127412
export interface CreateActionModuleResponseContent {
74137413
/** The unique ID of the module. */
@@ -10185,7 +10185,7 @@ export type DomainCertificateStatusEnum =
1018510185
/**
1018610186
* Domain metadata associated with the custom domain, in the form of an object with string values (max 255 chars). Maximum of 10 domain metadata properties allowed.
1018710187
*/
10188-
export type DomainMetadata = Record<string, (string | null) | undefined>;
10188+
export type DomainMetadata = Record<string, string | null>;
1018910189

1019010190
/**
1019110191
* Domain verification settings.
@@ -11170,7 +11170,7 @@ export type FlowActionAuth0SendRequestParamsPayloadObject = Record<string, unkno
1117011170

1117111171
export type FlowActionAuth0SendRequestParamsQueryParams = Record<
1117211172
string,
11173-
(FlowActionAuth0SendRequestParamsQueryParams.Value | null) | undefined
11173+
FlowActionAuth0SendRequestParamsQueryParams.Value | null
1117411174
>;
1117511175

1117611176
export namespace FlowActionAuth0SendRequestParamsQueryParams {
@@ -11676,7 +11676,7 @@ export type FlowActionHttpSendRequestParamsPayloadObject = Record<string, unknow
1167611676

1167711677
export type FlowActionHttpSendRequestParamsQueryParams = Record<
1167811678
string,
11679-
(FlowActionHttpSendRequestParamsQueryParams.Value | null) | undefined
11679+
FlowActionHttpSendRequestParamsQueryParams.Value | null
1168011680
>;
1168111681

1168211682
export namespace FlowActionHttpSendRequestParamsQueryParams {
@@ -17551,7 +17551,7 @@ export interface OrganizationMemberRole {
1755117551
/**
1755217552
* Metadata associated with the organization, in the form of an object with string values (max 255 chars). Maximum of 25 metadata properties allowed.
1755317553
*/
17554-
export type OrganizationMetadata = Record<string, (string | null) | undefined>;
17554+
export type OrganizationMetadata = Record<string, string | null>;
1755517555

1755617556
/** Defines whether organizations can be used with client credentials exchanges for this grant. */
1755717557
export const OrganizationUsageEnum = {
@@ -20060,7 +20060,7 @@ export interface UpdateConnectionOptions {
2006020060
/** Enable this if you have a legacy user store and you want to gradually migrate those users to the Auth0 user store */
2006120061
import_mode?: boolean | undefined;
2006220062
/** Stores encrypted string only configurations for connections */
20063-
configuration?: (Record<string, (string | null) | undefined> | null) | undefined;
20063+
configuration?: (Record<string, string | null> | null) | undefined;
2006420064
customScripts?: Management.ConnectionCustomScripts | undefined;
2006520065
authentication_methods?: (Management.ConnectionAuthenticationMethods | null) | undefined;
2006620066
passkey_options?: (Management.ConnectionPasskeyOptions | null) | undefined;

src/management/core/auth/BasicAuth.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { base64Decode, base64Encode } from "../base64.js";
22

33
export interface BasicAuth {
4-
username: string;
5-
password: string;
4+
username?: string;
5+
password?: string;
66
}
77

88
const BASIC_AUTH_HEADER_PREFIX = /^Basic /i;
@@ -12,7 +12,12 @@ export const BasicAuth = {
1212
if (basicAuth == null) {
1313
return undefined;
1414
}
15-
const token = base64Encode(`${basicAuth.username}:${basicAuth.password}`);
15+
const username = basicAuth.username ?? "";
16+
const password = basicAuth.password ?? "";
17+
if (username === "" && password === "") {
18+
return undefined;
19+
}
20+
const token = base64Encode(`${username}:${password}`);
1621
return `Basic ${token}`;
1722
},
1823
fromAuthorizationHeader: (header: string): BasicAuth => {

src/management/core/fetcher/BinaryResponse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export type BinaryResponse = {
1414
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes)
1515
* Some versions of the Fetch API may not support this method.
1616
*/
17-
bytes?(): ReturnType<Response["bytes"]>;
17+
bytes?(): Promise<Uint8Array>;
1818
};
1919

2020
export function getBinaryResponse(response: Response): BinaryResponse {

src/management/core/fetcher/Fetcher.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,13 @@ export declare namespace Fetcher {
5656

5757
export interface TimeoutError {
5858
reason: "timeout";
59+
cause?: unknown;
5960
}
6061

6162
export interface UnknownError {
6263
reason: "unknown";
6364
errorMessage: string;
65+
cause?: unknown;
6466
}
6567
}
6668

@@ -282,6 +284,7 @@ export async function fetcherImpl<R = unknown>(args: Fetcher.Args): Promise<APIR
282284
args.abortSignal,
283285
args.withCredentials,
284286
args.duplex,
287+
args.responseType === "streaming" || args.responseType === "sse",
285288
),
286289
args.maxRetries,
287290
);
@@ -337,6 +340,7 @@ export async function fetcherImpl<R = unknown>(args: Fetcher.Args): Promise<APIR
337340
error: {
338341
reason: "unknown",
339342
errorMessage: "The user aborted a request",
343+
cause: error,
340344
},
341345
rawResponse: abortRawResponse,
342346
};
@@ -353,6 +357,7 @@ export async function fetcherImpl<R = unknown>(args: Fetcher.Args): Promise<APIR
353357
ok: false,
354358
error: {
355359
reason: "timeout",
360+
cause: error,
356361
},
357362
rawResponse: abortRawResponse,
358363
};
@@ -370,6 +375,7 @@ export async function fetcherImpl<R = unknown>(args: Fetcher.Args): Promise<APIR
370375
error: {
371376
reason: "unknown",
372377
errorMessage: error.message,
378+
cause: error,
373379
},
374380
rawResponse: unknownRawResponse,
375381
};
@@ -388,6 +394,7 @@ export async function fetcherImpl<R = unknown>(args: Fetcher.Args): Promise<APIR
388394
error: {
389395
reason: "unknown",
390396
errorMessage: toJson(error),
397+
cause: error,
391398
},
392399
rawResponse: unknownRawResponse,
393400
};

src/management/core/fetcher/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ export type { Fetcher, FetchFunction } from "./Fetcher.js";
66
export { fetcher } from "./Fetcher.js";
77
export { getHeader } from "./getHeader.js";
88
export { HttpResponsePromise } from "./HttpResponsePromise.js";
9+
export type { PassthroughRequest } from "./makePassthroughRequest.js";
10+
export { makePassthroughRequest } from "./makePassthroughRequest.js";
911
export type { RawResponse, WithRawResponse } from "./RawResponse.js";
1012
export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.js";
1113
export { Supplier } from "./Supplier.js";

0 commit comments

Comments
 (0)