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
|
@@ -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
|
*
|
|
@@ -216,6 +216,109 @@ class ResourceServersClient {
|
|
|
216
216
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/resource-servers");
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
|
+
/**
|
|
220
|
+
* 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.
|
|
221
|
+
* Results may not reflect recent updates immediately.
|
|
222
|
+
*
|
|
223
|
+
* The `signing_secret` field is not supported by this endpoint.
|
|
224
|
+
*
|
|
225
|
+
* @param {Management.SearchResourceServersRequestParameters} request
|
|
226
|
+
* @param {ResourceServersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
227
|
+
*
|
|
228
|
+
* @throws {@link Management.BadRequestError}
|
|
229
|
+
* @throws {@link Management.UnauthorizedError}
|
|
230
|
+
* @throws {@link Management.ForbiddenError}
|
|
231
|
+
* @throws {@link Management.NotFoundError}
|
|
232
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
233
|
+
* @throws {@link Management.InternalServerError}
|
|
234
|
+
* @throws {@link Management.GatewayTimeoutError}
|
|
235
|
+
*
|
|
236
|
+
* @example
|
|
237
|
+
* await client.resourceServers.search({
|
|
238
|
+
* q: "q",
|
|
239
|
+
* parser: "scim",
|
|
240
|
+
* fields: "fields",
|
|
241
|
+
* include_fields: true,
|
|
242
|
+
* take: 1,
|
|
243
|
+
* from: "from",
|
|
244
|
+
* sort: "identifier"
|
|
245
|
+
* })
|
|
246
|
+
*/
|
|
247
|
+
search() {
|
|
248
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
249
|
+
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
250
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
251
|
+
const { q, parser, fields, include_fields: includeFields, take = 50, from: from_, sort } = request;
|
|
252
|
+
const _queryParams = {
|
|
253
|
+
q,
|
|
254
|
+
parser: parser !== undefined ? parser : undefined,
|
|
255
|
+
fields,
|
|
256
|
+
include_fields: includeFields,
|
|
257
|
+
take,
|
|
258
|
+
from: from_,
|
|
259
|
+
sort: sort !== undefined ? sort : undefined,
|
|
260
|
+
};
|
|
261
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
262
|
+
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
263
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
264
|
+
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"),
|
|
265
|
+
method: "GET",
|
|
266
|
+
headers: _headers,
|
|
267
|
+
queryString: core.url
|
|
268
|
+
.queryBuilder()
|
|
269
|
+
.addMany(_queryParams)
|
|
270
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
271
|
+
.build(),
|
|
272
|
+
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,
|
|
273
|
+
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,
|
|
274
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
275
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
276
|
+
logging: this._options.logging,
|
|
277
|
+
});
|
|
278
|
+
if (_response.ok) {
|
|
279
|
+
return {
|
|
280
|
+
data: _response.body,
|
|
281
|
+
rawResponse: _response.rawResponse,
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
if (_response.error.reason === "status-code") {
|
|
285
|
+
switch (_response.error.statusCode) {
|
|
286
|
+
case 400:
|
|
287
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
288
|
+
case 401:
|
|
289
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
290
|
+
case 403:
|
|
291
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
292
|
+
case 404:
|
|
293
|
+
throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
|
|
294
|
+
case 429:
|
|
295
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
296
|
+
case 500:
|
|
297
|
+
throw new Management.InternalServerError(_response.error.body, _response.rawResponse);
|
|
298
|
+
case 504:
|
|
299
|
+
throw new Management.GatewayTimeoutError(_response.error.body, _response.rawResponse);
|
|
300
|
+
default:
|
|
301
|
+
throw new errors.ManagementError({
|
|
302
|
+
statusCode: _response.error.statusCode,
|
|
303
|
+
body: _response.error.body,
|
|
304
|
+
rawResponse: _response.rawResponse,
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/resource-servers/search");
|
|
309
|
+
}));
|
|
310
|
+
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
311
|
+
return new core.Page({
|
|
312
|
+
response: dataWithRawResponse.data,
|
|
313
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
314
|
+
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) === ""),
|
|
315
|
+
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.resource_servers) !== null && _a !== void 0 ? _a : []; },
|
|
316
|
+
loadPage: (response) => {
|
|
317
|
+
return list(core.setObjectProperty(request, "from", response === null || response === void 0 ? void 0 : response.next));
|
|
318
|
+
},
|
|
319
|
+
});
|
|
320
|
+
});
|
|
321
|
+
}
|
|
219
322
|
/**
|
|
220
323
|
* Retrieve <a href="https://auth0.com/docs/apis">API</a> details with the given ID.
|
|
221
324
|
*
|