auth0 7.0.0 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/management/Client.d.ts +5 -5
- package/dist/cjs/management/Client.js +28 -28
- package/dist/cjs/management/api/errors/GatewayTimeoutError.d.ts +5 -0
- package/dist/cjs/management/api/errors/GatewayTimeoutError.js +54 -0
- package/dist/cjs/management/api/errors/index.d.ts +1 -0
- package/dist/cjs/management/api/errors/index.js +1 -0
- package/dist/cjs/management/api/requests/requests.d.ts +112 -88
- package/dist/cjs/management/api/resources/experimentation/client/Client.d.ts +12 -0
- package/dist/cjs/management/api/resources/experimentation/client/Client.js +16 -0
- package/dist/cjs/management/api/resources/experimentation/exports.d.ts +3 -0
- package/dist/cjs/management/api/resources/experimentation/exports.js +22 -0
- package/dist/cjs/management/api/resources/experimentation/index.d.ts +2 -0
- package/dist/cjs/management/api/resources/experimentation/index.js +18 -0
- package/dist/cjs/management/api/resources/experimentation/resources/experiments/client/Client.d.ts +34 -0
- package/dist/cjs/management/api/resources/experimentation/resources/experiments/client/Client.js +131 -0
- package/dist/cjs/management/api/resources/experimentation/resources/experiments/client/index.js +2 -0
- package/dist/cjs/management/api/resources/experimentation/resources/experiments/exports.d.ts +2 -0
- package/dist/cjs/management/api/resources/{organizationTemplates → experimentation/resources/experiments}/exports.js +2 -2
- package/dist/cjs/management/api/resources/experimentation/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/experimentation/resources/index.js +37 -0
- package/dist/cjs/management/api/resources/guardian/client/Client.d.ts +40 -1
- package/dist/cjs/management/api/resources/guardian/client/Client.js +172 -0
- package/dist/cjs/management/api/resources/guardian/resources/factors/client/Client.d.ts +3 -0
- package/dist/cjs/management/api/resources/guardian/resources/factors/client/Client.js +11 -6
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/email/client/Client.d.ts +46 -0
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/email/client/Client.js +181 -0
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/email/client/index.js +2 -0
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/email/exports.d.ts +2 -0
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/email/exports.js +21 -0
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/email/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/email/index.js +17 -0
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/index.js +2 -1
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/phone/client/Client.d.ts +33 -0
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/phone/client/Client.js +122 -0
- package/dist/cjs/management/api/resources/index.d.ts +1 -1
- package/dist/cjs/management/api/resources/index.js +2 -2
- package/dist/cjs/management/api/resources/organizations/client/Client.d.ts +36 -0
- package/dist/cjs/management/api/resources/organizations/client/Client.js +104 -0
- package/dist/cjs/management/api/resources/resourceServers/client/Client.d.ts +29 -0
- package/dist/cjs/management/api/resources/resourceServers/client/Client.js +103 -0
- package/dist/cjs/management/api/types/types.d.ts +226 -51
- package/dist/cjs/management/api/types/types.js +37 -36
- package/dist/cjs/management/version.d.ts +1 -1
- package/dist/cjs/management/version.js +1 -1
- package/dist/esm/management/Client.d.mts +5 -5
- package/dist/esm/management/Client.mjs +7 -7
- package/dist/esm/management/api/errors/GatewayTimeoutError.d.mts +5 -0
- package/dist/esm/management/api/errors/GatewayTimeoutError.mjs +17 -0
- package/dist/esm/management/api/errors/index.d.mts +1 -0
- package/dist/esm/management/api/errors/index.mjs +1 -0
- package/dist/esm/management/api/requests/requests.d.mts +112 -88
- package/dist/esm/management/api/resources/experimentation/client/Client.d.mts +12 -0
- package/dist/esm/management/api/resources/experimentation/client/Client.mjs +12 -0
- package/dist/esm/management/api/resources/experimentation/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/experimentation/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/experimentation/exports.d.mts +3 -0
- package/dist/esm/management/api/resources/experimentation/exports.mjs +4 -0
- package/dist/esm/management/api/resources/experimentation/index.d.mts +2 -0
- package/dist/esm/management/api/resources/experimentation/index.mjs +2 -0
- package/dist/esm/management/api/resources/experimentation/resources/experiments/client/Client.d.mts +34 -0
- package/dist/esm/management/api/resources/experimentation/resources/experiments/client/Client.mjs +94 -0
- package/dist/esm/management/api/resources/experimentation/resources/experiments/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/experimentation/resources/experiments/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/experimentation/resources/experiments/exports.d.mts +2 -0
- package/dist/esm/management/api/resources/{organizationTemplates → experimentation/resources/experiments}/exports.mjs +1 -1
- package/dist/esm/management/api/resources/experimentation/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/experimentation/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/guardian/client/Client.d.mts +40 -1
- package/dist/esm/management/api/resources/guardian/client/Client.mjs +139 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/client/Client.d.mts +3 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/client/Client.mjs +5 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/email/client/Client.d.mts +46 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/email/client/Client.mjs +144 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/email/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/email/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/email/exports.d.mts +2 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/email/exports.mjs +3 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/email/index.d.mts +1 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/email/index.mjs +1 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/phone/client/Client.d.mts +33 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/phone/client/Client.mjs +122 -0
- package/dist/esm/management/api/resources/index.d.mts +1 -1
- package/dist/esm/management/api/resources/index.mjs +1 -1
- package/dist/esm/management/api/resources/organizations/client/Client.d.mts +36 -0
- package/dist/esm/management/api/resources/organizations/client/Client.mjs +104 -0
- package/dist/esm/management/api/resources/resourceServers/client/Client.d.mts +29 -0
- package/dist/esm/management/api/resources/resourceServers/client/Client.mjs +103 -0
- package/dist/esm/management/api/types/types.d.mts +226 -51
- package/dist/esm/management/api/types/types.mjs +34 -33
- package/dist/esm/management/version.d.mts +1 -1
- package/dist/esm/management/version.mjs +1 -1
- package/package.json +46 -23
- package/reference.md +654 -389
- package/dist/cjs/management/api/resources/organizationTemplates/client/Client.d.ts +0 -106
- package/dist/cjs/management/api/resources/organizationTemplates/client/Client.js +0 -411
- package/dist/cjs/management/api/resources/organizationTemplates/exports.d.ts +0 -2
- package/dist/esm/management/api/resources/organizationTemplates/client/Client.d.mts +0 -106
- package/dist/esm/management/api/resources/organizationTemplates/client/Client.mjs +0 -374
- package/dist/esm/management/api/resources/organizationTemplates/exports.d.mts +0 -2
- /package/dist/cjs/management/api/resources/{organizationTemplates → experimentation}/client/index.d.ts +0 -0
- /package/dist/cjs/management/api/resources/{organizationTemplates → experimentation}/client/index.js +0 -0
- /package/dist/{esm/management/api/resources/organizationTemplates/client/index.d.mts → cjs/management/api/resources/experimentation/resources/experiments/client/index.d.ts} +0 -0
- /package/dist/cjs/management/api/resources/{organizationTemplates → experimentation/resources/experiments}/index.d.ts +0 -0
- /package/dist/cjs/management/api/resources/{organizationTemplates → experimentation/resources/experiments}/index.js +0 -0
- /package/dist/{esm/management/api/resources/organizationTemplates/client/index.mjs → cjs/management/api/resources/guardian/resources/factors/resources/email/client/index.d.ts} +0 -0
- /package/dist/esm/management/api/resources/{organizationTemplates → experimentation/resources/experiments}/index.d.mts +0 -0
- /package/dist/esm/management/api/resources/{organizationTemplates → experimentation/resources/experiments}/index.mjs +0 -0
|
@@ -100,6 +100,39 @@ export declare class PhoneClient {
|
|
|
100
100
|
*/
|
|
101
101
|
setProvider(request: Management.SetGuardianFactorsProviderPhoneRequestContent, requestOptions?: PhoneClient.RequestOptions): core.HttpResponsePromise<Management.SetGuardianFactorsProviderPhoneResponseContent>;
|
|
102
102
|
private __setProvider;
|
|
103
|
+
/**
|
|
104
|
+
* TODO: Link this endpoint to relevant documentation when available.
|
|
105
|
+
*
|
|
106
|
+
* @param {PhoneClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
107
|
+
*
|
|
108
|
+
* @throws {@link Management.UnauthorizedError}
|
|
109
|
+
* @throws {@link Management.ForbiddenError}
|
|
110
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* await client.guardian.factors.phone.get()
|
|
114
|
+
*/
|
|
115
|
+
get(requestOptions?: PhoneClient.RequestOptions): core.HttpResponsePromise<Management.GetPhoneFactorSettingsResponseContent>;
|
|
116
|
+
private __get;
|
|
117
|
+
/**
|
|
118
|
+
* TODO: Link this endpoint to relevant documentation when available.
|
|
119
|
+
*
|
|
120
|
+
* @param {Management.SetPhoneFactorSettingsRequestContent} request
|
|
121
|
+
* @param {PhoneClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
122
|
+
*
|
|
123
|
+
* @throws {@link Management.BadRequestError}
|
|
124
|
+
* @throws {@link Management.UnauthorizedError}
|
|
125
|
+
* @throws {@link Management.ForbiddenError}
|
|
126
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* await client.guardian.factors.phone.set({
|
|
130
|
+
* otp_length: 1,
|
|
131
|
+
* otp_expiration_time: 1
|
|
132
|
+
* })
|
|
133
|
+
*/
|
|
134
|
+
set(request: Management.SetPhoneFactorSettingsRequestContent, requestOptions?: PhoneClient.RequestOptions): core.HttpResponsePromise<Management.SetPhoneFactorSettingsResponseContent>;
|
|
135
|
+
private __set;
|
|
103
136
|
/**
|
|
104
137
|
* Retrieve details of the multi-factor authentication enrollment and verification templates for phone-type factors available in your tenant.
|
|
105
138
|
*
|
|
@@ -372,6 +372,128 @@ export class PhoneClient {
|
|
|
372
372
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/guardian/factors/phone/selected-provider");
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
|
+
/**
|
|
376
|
+
* TODO: Link this endpoint to relevant documentation when available.
|
|
377
|
+
*
|
|
378
|
+
* @param {PhoneClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
379
|
+
*
|
|
380
|
+
* @throws {@link Management.UnauthorizedError}
|
|
381
|
+
* @throws {@link Management.ForbiddenError}
|
|
382
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
383
|
+
*
|
|
384
|
+
* @example
|
|
385
|
+
* await client.guardian.factors.phone.get()
|
|
386
|
+
*/
|
|
387
|
+
get(requestOptions) {
|
|
388
|
+
return core.HttpResponsePromise.fromPromise(this.__get(requestOptions));
|
|
389
|
+
}
|
|
390
|
+
__get(requestOptions) {
|
|
391
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
392
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
393
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
394
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
395
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
396
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, "guardian/factors/phone/settings"),
|
|
397
|
+
method: "GET",
|
|
398
|
+
headers: _headers,
|
|
399
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
400
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
401
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
402
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
403
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
404
|
+
logging: this._options.logging,
|
|
405
|
+
});
|
|
406
|
+
if (_response.ok) {
|
|
407
|
+
return {
|
|
408
|
+
data: _response.body,
|
|
409
|
+
rawResponse: _response.rawResponse,
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
if (_response.error.reason === "status-code") {
|
|
413
|
+
switch (_response.error.statusCode) {
|
|
414
|
+
case 401:
|
|
415
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
416
|
+
case 403:
|
|
417
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
418
|
+
case 429:
|
|
419
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
420
|
+
default:
|
|
421
|
+
throw new errors.ManagementError({
|
|
422
|
+
statusCode: _response.error.statusCode,
|
|
423
|
+
body: _response.error.body,
|
|
424
|
+
rawResponse: _response.rawResponse,
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/guardian/factors/phone/settings");
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* TODO: Link this endpoint to relevant documentation when available.
|
|
433
|
+
*
|
|
434
|
+
* @param {Management.SetPhoneFactorSettingsRequestContent} request
|
|
435
|
+
* @param {PhoneClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
436
|
+
*
|
|
437
|
+
* @throws {@link Management.BadRequestError}
|
|
438
|
+
* @throws {@link Management.UnauthorizedError}
|
|
439
|
+
* @throws {@link Management.ForbiddenError}
|
|
440
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
441
|
+
*
|
|
442
|
+
* @example
|
|
443
|
+
* await client.guardian.factors.phone.set({
|
|
444
|
+
* otp_length: 1,
|
|
445
|
+
* otp_expiration_time: 1
|
|
446
|
+
* })
|
|
447
|
+
*/
|
|
448
|
+
set(request, requestOptions) {
|
|
449
|
+
return core.HttpResponsePromise.fromPromise(this.__set(request, requestOptions));
|
|
450
|
+
}
|
|
451
|
+
__set(request, requestOptions) {
|
|
452
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
453
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
454
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
455
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
456
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
457
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, "guardian/factors/phone/settings"),
|
|
458
|
+
method: "PUT",
|
|
459
|
+
headers: _headers,
|
|
460
|
+
contentType: "application/json",
|
|
461
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
462
|
+
requestType: "json",
|
|
463
|
+
body: request,
|
|
464
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
465
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
466
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
467
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
468
|
+
logging: this._options.logging,
|
|
469
|
+
});
|
|
470
|
+
if (_response.ok) {
|
|
471
|
+
return {
|
|
472
|
+
data: _response.body,
|
|
473
|
+
rawResponse: _response.rawResponse,
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
if (_response.error.reason === "status-code") {
|
|
477
|
+
switch (_response.error.statusCode) {
|
|
478
|
+
case 400:
|
|
479
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
480
|
+
case 401:
|
|
481
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
482
|
+
case 403:
|
|
483
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
484
|
+
case 429:
|
|
485
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
486
|
+
default:
|
|
487
|
+
throw new errors.ManagementError({
|
|
488
|
+
statusCode: _response.error.statusCode,
|
|
489
|
+
body: _response.error.body,
|
|
490
|
+
rawResponse: _response.rawResponse,
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/guardian/factors/phone/settings");
|
|
495
|
+
});
|
|
496
|
+
}
|
|
375
497
|
/**
|
|
376
498
|
* Retrieve details of the multi-factor authentication enrollment and verification templates for phone-type factors available in your tenant.
|
|
377
499
|
*
|
|
@@ -14,6 +14,7 @@ export * as emailTemplates from "./emailTemplates/index.mjs";
|
|
|
14
14
|
export * as events from "./events/index.mjs";
|
|
15
15
|
export * as eventStreams from "./eventStreams/index.mjs";
|
|
16
16
|
export * from "./eventStreams/types/index.mjs";
|
|
17
|
+
export * as experimentation from "./experimentation/index.mjs";
|
|
17
18
|
export * as flows from "./flows/index.mjs";
|
|
18
19
|
export * as forms from "./forms/index.mjs";
|
|
19
20
|
export * as groups from "./groups/index.mjs";
|
|
@@ -25,7 +26,6 @@ export * as logs from "./logs/index.mjs";
|
|
|
25
26
|
export * as logStreams from "./logStreams/index.mjs";
|
|
26
27
|
export * as networkAcls from "./networkAcls/index.mjs";
|
|
27
28
|
export * as organizations from "./organizations/index.mjs";
|
|
28
|
-
export * as organizationTemplates from "./organizationTemplates/index.mjs";
|
|
29
29
|
export * as prompts from "./prompts/index.mjs";
|
|
30
30
|
export * as rateLimitPolicies from "./rateLimitPolicies/index.mjs";
|
|
31
31
|
export * as refreshTokens from "./refreshTokens/index.mjs";
|
|
@@ -14,6 +14,7 @@ export * as emailTemplates from "./emailTemplates/index.mjs";
|
|
|
14
14
|
export * as events from "./events/index.mjs";
|
|
15
15
|
export * as eventStreams from "./eventStreams/index.mjs";
|
|
16
16
|
export * from "./eventStreams/types/index.mjs";
|
|
17
|
+
export * as experimentation from "./experimentation/index.mjs";
|
|
17
18
|
export * as flows from "./flows/index.mjs";
|
|
18
19
|
export * as forms from "./forms/index.mjs";
|
|
19
20
|
export * as groups from "./groups/index.mjs";
|
|
@@ -25,7 +26,6 @@ export * as logs from "./logs/index.mjs";
|
|
|
25
26
|
export * as logStreams from "./logStreams/index.mjs";
|
|
26
27
|
export * as networkAcls from "./networkAcls/index.mjs";
|
|
27
28
|
export * as organizations from "./organizations/index.mjs";
|
|
28
|
-
export * as organizationTemplates from "./organizationTemplates/index.mjs";
|
|
29
29
|
export * as prompts from "./prompts/index.mjs";
|
|
30
30
|
export * as rateLimitPolicies from "./rateLimitPolicies/index.mjs";
|
|
31
31
|
export * as refreshTokens from "./refreshTokens/index.mjs";
|
|
@@ -113,6 +113,42 @@ export declare class OrganizationsClient {
|
|
|
113
113
|
*/
|
|
114
114
|
getByName(name: string, requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<Management.GetOrganizationByNameResponseContent>;
|
|
115
115
|
private __getByName;
|
|
116
|
+
/**
|
|
117
|
+
* Retrieve details of organizations matching a search criteria. It is possible to:
|
|
118
|
+
*
|
|
119
|
+
* - Specify a search criteria for organizations
|
|
120
|
+
* - Search via `name`
|
|
121
|
+
* - Search via `display_name`
|
|
122
|
+
* - Substring matching (`contains` and `ends-with`) requires at least 3 characters
|
|
123
|
+
* - Use wildcards
|
|
124
|
+
*
|
|
125
|
+
* The `q` query parameter can be used to get organizations that match the specified criteria on `name` OR `display_name`.
|
|
126
|
+
*
|
|
127
|
+
* This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the `parser` parameter to specify "scim" or "lucene" syntax (default: "lucene").
|
|
128
|
+
*
|
|
129
|
+
* Results are eventually consistent and may not reflect recent updates immediately.
|
|
130
|
+
*
|
|
131
|
+
* **Sortable fields:** `name`, `display_name`, `created_at` (ascending only). Defaults to insertion order (oldest first).
|
|
132
|
+
*
|
|
133
|
+
* @param {Management.SearchOrganizationsRequestParameters} request
|
|
134
|
+
* @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
135
|
+
*
|
|
136
|
+
* @throws {@link Management.BadRequestError}
|
|
137
|
+
* @throws {@link Management.UnauthorizedError}
|
|
138
|
+
* @throws {@link Management.ForbiddenError}
|
|
139
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
140
|
+
* @throws {@link Management.GatewayTimeoutError}
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* await client.organizations.search({
|
|
144
|
+
* q: "q",
|
|
145
|
+
* parser: "scim",
|
|
146
|
+
* take: 1,
|
|
147
|
+
* from: "from",
|
|
148
|
+
* sort: "name"
|
|
149
|
+
* })
|
|
150
|
+
*/
|
|
151
|
+
search(request?: Management.SearchOrganizationsRequestParameters, requestOptions?: OrganizationsClient.RequestOptions): Promise<core.Page<Management.SearchOrganization, Management.SearchOrganizationsPaginatedResponseContent>>;
|
|
116
152
|
/**
|
|
117
153
|
* Retrieve details about a single Organization specified by ID.
|
|
118
154
|
*
|
|
@@ -303,6 +303,110 @@ export class OrganizationsClient {
|
|
|
303
303
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/organizations/name/{name}");
|
|
304
304
|
});
|
|
305
305
|
}
|
|
306
|
+
/**
|
|
307
|
+
* Retrieve details of organizations matching a search criteria. It is possible to:
|
|
308
|
+
*
|
|
309
|
+
* - Specify a search criteria for organizations
|
|
310
|
+
* - Search via `name`
|
|
311
|
+
* - Search via `display_name`
|
|
312
|
+
* - Substring matching (`contains` and `ends-with`) requires at least 3 characters
|
|
313
|
+
* - Use wildcards
|
|
314
|
+
*
|
|
315
|
+
* The `q` query parameter can be used to get organizations that match the specified criteria on `name` OR `display_name`.
|
|
316
|
+
*
|
|
317
|
+
* This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the `parser` parameter to specify "scim" or "lucene" syntax (default: "lucene").
|
|
318
|
+
*
|
|
319
|
+
* Results are eventually consistent and may not reflect recent updates immediately.
|
|
320
|
+
*
|
|
321
|
+
* **Sortable fields:** `name`, `display_name`, `created_at` (ascending only). Defaults to insertion order (oldest first).
|
|
322
|
+
*
|
|
323
|
+
* @param {Management.SearchOrganizationsRequestParameters} request
|
|
324
|
+
* @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
325
|
+
*
|
|
326
|
+
* @throws {@link Management.BadRequestError}
|
|
327
|
+
* @throws {@link Management.UnauthorizedError}
|
|
328
|
+
* @throws {@link Management.ForbiddenError}
|
|
329
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
330
|
+
* @throws {@link Management.GatewayTimeoutError}
|
|
331
|
+
*
|
|
332
|
+
* @example
|
|
333
|
+
* await client.organizations.search({
|
|
334
|
+
* q: "q",
|
|
335
|
+
* parser: "scim",
|
|
336
|
+
* take: 1,
|
|
337
|
+
* from: "from",
|
|
338
|
+
* sort: "name"
|
|
339
|
+
* })
|
|
340
|
+
*/
|
|
341
|
+
search() {
|
|
342
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
343
|
+
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
344
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
345
|
+
const { q, parser, take = 50, from: from_, sort } = request;
|
|
346
|
+
const _queryParams = {
|
|
347
|
+
q,
|
|
348
|
+
parser: parser !== undefined ? parser : undefined,
|
|
349
|
+
take,
|
|
350
|
+
from: from_,
|
|
351
|
+
sort: sort !== undefined ? sort : undefined,
|
|
352
|
+
};
|
|
353
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
354
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
355
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
356
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, "organizations/search"),
|
|
357
|
+
method: "GET",
|
|
358
|
+
headers: _headers,
|
|
359
|
+
queryString: core.url
|
|
360
|
+
.queryBuilder()
|
|
361
|
+
.addMany(_queryParams)
|
|
362
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
363
|
+
.build(),
|
|
364
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
365
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
366
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
367
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
368
|
+
logging: this._options.logging,
|
|
369
|
+
});
|
|
370
|
+
if (_response.ok) {
|
|
371
|
+
return {
|
|
372
|
+
data: _response.body,
|
|
373
|
+
rawResponse: _response.rawResponse,
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
if (_response.error.reason === "status-code") {
|
|
377
|
+
switch (_response.error.statusCode) {
|
|
378
|
+
case 400:
|
|
379
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
380
|
+
case 401:
|
|
381
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
382
|
+
case 403:
|
|
383
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
384
|
+
case 429:
|
|
385
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
386
|
+
case 504:
|
|
387
|
+
throw new Management.GatewayTimeoutError(_response.error.body, _response.rawResponse);
|
|
388
|
+
default:
|
|
389
|
+
throw new errors.ManagementError({
|
|
390
|
+
statusCode: _response.error.statusCode,
|
|
391
|
+
body: _response.error.body,
|
|
392
|
+
rawResponse: _response.rawResponse,
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/organizations/search");
|
|
397
|
+
}));
|
|
398
|
+
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
399
|
+
return new core.Page({
|
|
400
|
+
response: dataWithRawResponse.data,
|
|
401
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
402
|
+
hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.next) != null && !(typeof (response === null || response === void 0 ? void 0 : response.next) === "string" && (response === null || response === void 0 ? void 0 : response.next) === ""),
|
|
403
|
+
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.organizations) !== null && _a !== void 0 ? _a : []; },
|
|
404
|
+
loadPage: (response) => {
|
|
405
|
+
return list(core.setObjectProperty(request, "from", response === null || response === void 0 ? void 0 : response.next));
|
|
406
|
+
},
|
|
407
|
+
});
|
|
408
|
+
});
|
|
409
|
+
}
|
|
306
410
|
/**
|
|
307
411
|
* Retrieve details about a single Organization specified by ID.
|
|
308
412
|
*
|
|
@@ -50,6 +50,35 @@ export declare class ResourceServersClient {
|
|
|
50
50
|
*/
|
|
51
51
|
create(request: Management.CreateResourceServerRequestContent, requestOptions?: ResourceServersClient.RequestOptions): core.HttpResponsePromise<Management.CreateResourceServerResponseContent>;
|
|
52
52
|
private __create;
|
|
53
|
+
/**
|
|
54
|
+
* Search resource servers using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /resource-servers endpoint with better performance for complex queries.
|
|
55
|
+
* Results may not reflect recent updates immediately.
|
|
56
|
+
*
|
|
57
|
+
* The `signing_secret` field is not supported by this endpoint.
|
|
58
|
+
*
|
|
59
|
+
* @param {Management.SearchResourceServersRequestParameters} request
|
|
60
|
+
* @param {ResourceServersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link Management.BadRequestError}
|
|
63
|
+
* @throws {@link Management.UnauthorizedError}
|
|
64
|
+
* @throws {@link Management.ForbiddenError}
|
|
65
|
+
* @throws {@link Management.NotFoundError}
|
|
66
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
67
|
+
* @throws {@link Management.InternalServerError}
|
|
68
|
+
* @throws {@link Management.GatewayTimeoutError}
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* await client.resourceServers.search({
|
|
72
|
+
* q: "q",
|
|
73
|
+
* parser: "scim",
|
|
74
|
+
* fields: "fields",
|
|
75
|
+
* include_fields: true,
|
|
76
|
+
* take: 1,
|
|
77
|
+
* from: "from",
|
|
78
|
+
* sort: "identifier"
|
|
79
|
+
* })
|
|
80
|
+
*/
|
|
81
|
+
search(request?: Management.SearchResourceServersRequestParameters, requestOptions?: ResourceServersClient.RequestOptions): Promise<core.Page<Management.ResourceServerSearchResponse, Management.SearchResourceServersResponseContent>>;
|
|
53
82
|
/**
|
|
54
83
|
* Retrieve <a href="https://auth0.com/docs/apis">API</a> details with the given ID.
|
|
55
84
|
*
|
|
@@ -180,6 +180,109 @@ export class ResourceServersClient {
|
|
|
180
180
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/resource-servers");
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* Search resource servers using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /resource-servers endpoint with better performance for complex queries.
|
|
185
|
+
* Results may not reflect recent updates immediately.
|
|
186
|
+
*
|
|
187
|
+
* The `signing_secret` field is not supported by this endpoint.
|
|
188
|
+
*
|
|
189
|
+
* @param {Management.SearchResourceServersRequestParameters} request
|
|
190
|
+
* @param {ResourceServersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
191
|
+
*
|
|
192
|
+
* @throws {@link Management.BadRequestError}
|
|
193
|
+
* @throws {@link Management.UnauthorizedError}
|
|
194
|
+
* @throws {@link Management.ForbiddenError}
|
|
195
|
+
* @throws {@link Management.NotFoundError}
|
|
196
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
197
|
+
* @throws {@link Management.InternalServerError}
|
|
198
|
+
* @throws {@link Management.GatewayTimeoutError}
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* await client.resourceServers.search({
|
|
202
|
+
* q: "q",
|
|
203
|
+
* parser: "scim",
|
|
204
|
+
* fields: "fields",
|
|
205
|
+
* include_fields: true,
|
|
206
|
+
* take: 1,
|
|
207
|
+
* from: "from",
|
|
208
|
+
* sort: "identifier"
|
|
209
|
+
* })
|
|
210
|
+
*/
|
|
211
|
+
search() {
|
|
212
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
213
|
+
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
214
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
215
|
+
const { q, parser, fields, include_fields: includeFields, take = 50, from: from_, sort } = request;
|
|
216
|
+
const _queryParams = {
|
|
217
|
+
q,
|
|
218
|
+
parser: parser !== undefined ? parser : undefined,
|
|
219
|
+
fields,
|
|
220
|
+
include_fields: includeFields,
|
|
221
|
+
take,
|
|
222
|
+
from: from_,
|
|
223
|
+
sort: sort !== undefined ? sort : undefined,
|
|
224
|
+
};
|
|
225
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
226
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
227
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
228
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, "resource-servers/search"),
|
|
229
|
+
method: "GET",
|
|
230
|
+
headers: _headers,
|
|
231
|
+
queryString: core.url
|
|
232
|
+
.queryBuilder()
|
|
233
|
+
.addMany(_queryParams)
|
|
234
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
235
|
+
.build(),
|
|
236
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
237
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
238
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
239
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
240
|
+
logging: this._options.logging,
|
|
241
|
+
});
|
|
242
|
+
if (_response.ok) {
|
|
243
|
+
return {
|
|
244
|
+
data: _response.body,
|
|
245
|
+
rawResponse: _response.rawResponse,
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
if (_response.error.reason === "status-code") {
|
|
249
|
+
switch (_response.error.statusCode) {
|
|
250
|
+
case 400:
|
|
251
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
252
|
+
case 401:
|
|
253
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
254
|
+
case 403:
|
|
255
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
256
|
+
case 404:
|
|
257
|
+
throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
|
|
258
|
+
case 429:
|
|
259
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
260
|
+
case 500:
|
|
261
|
+
throw new Management.InternalServerError(_response.error.body, _response.rawResponse);
|
|
262
|
+
case 504:
|
|
263
|
+
throw new Management.GatewayTimeoutError(_response.error.body, _response.rawResponse);
|
|
264
|
+
default:
|
|
265
|
+
throw new errors.ManagementError({
|
|
266
|
+
statusCode: _response.error.statusCode,
|
|
267
|
+
body: _response.error.body,
|
|
268
|
+
rawResponse: _response.rawResponse,
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/resource-servers/search");
|
|
273
|
+
}));
|
|
274
|
+
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
275
|
+
return new core.Page({
|
|
276
|
+
response: dataWithRawResponse.data,
|
|
277
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
278
|
+
hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.next) != null && !(typeof (response === null || response === void 0 ? void 0 : response.next) === "string" && (response === null || response === void 0 ? void 0 : response.next) === ""),
|
|
279
|
+
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.resource_servers) !== null && _a !== void 0 ? _a : []; },
|
|
280
|
+
loadPage: (response) => {
|
|
281
|
+
return list(core.setObjectProperty(request, "from", response === null || response === void 0 ? void 0 : response.next));
|
|
282
|
+
},
|
|
283
|
+
});
|
|
284
|
+
});
|
|
285
|
+
}
|
|
183
286
|
/**
|
|
184
287
|
* Retrieve <a href="https://auth0.com/docs/apis">API</a> details with the given ID.
|
|
185
288
|
*
|