auth0 5.6.0 → 5.8.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/api/requests/requests.d.ts +41 -2
- package/dist/cjs/management/api/resources/clientGrants/client/Client.d.ts +2 -1
- package/dist/cjs/management/api/resources/clientGrants/client/Client.js +4 -2
- package/dist/cjs/management/api/resources/connections/resources/directoryProvisioning/client/Client.d.ts +43 -0
- package/dist/cjs/management/api/resources/connections/resources/directoryProvisioning/client/Client.js +152 -0
- package/dist/cjs/management/api/resources/eventStreams/client/Client.d.ts +1 -1
- package/dist/cjs/management/api/resources/eventStreams/client/Client.js +1 -1
- package/dist/cjs/management/api/resources/logStreams/client/Client.d.ts +465 -300
- package/dist/cjs/management/api/resources/logStreams/client/Client.js +465 -300
- package/dist/cjs/management/api/types/types.d.ts +200 -37
- package/dist/cjs/management/api/types/types.js +104 -46
- package/dist/cjs/management/version.d.ts +1 -1
- package/dist/cjs/management/version.js +1 -1
- package/dist/esm/management/api/requests/requests.d.mts +41 -2
- package/dist/esm/management/api/resources/clientGrants/client/Client.d.mts +2 -1
- package/dist/esm/management/api/resources/clientGrants/client/Client.mjs +4 -2
- package/dist/esm/management/api/resources/connections/resources/directoryProvisioning/client/Client.d.mts +43 -0
- package/dist/esm/management/api/resources/connections/resources/directoryProvisioning/client/Client.mjs +152 -0
- package/dist/esm/management/api/resources/eventStreams/client/Client.d.mts +1 -1
- package/dist/esm/management/api/resources/eventStreams/client/Client.mjs +1 -1
- package/dist/esm/management/api/resources/logStreams/client/Client.d.mts +465 -300
- package/dist/esm/management/api/resources/logStreams/client/Client.mjs +465 -300
- package/dist/esm/management/api/types/types.d.mts +200 -37
- package/dist/esm/management/api/types/types.mjs +94 -36
- package/dist/esm/management/version.d.mts +1 -1
- package/dist/esm/management/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +673 -323
|
@@ -424,4 +424,156 @@ export class DirectoryProvisioningClient {
|
|
|
424
424
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/connections/{id}/directory-provisioning/default-mapping");
|
|
425
425
|
});
|
|
426
426
|
}
|
|
427
|
+
/**
|
|
428
|
+
* Retrieve the configured synchronized groups for a connection directory provisioning configuration.
|
|
429
|
+
*
|
|
430
|
+
* @param {string} id - The id of the connection to list synchronized groups for.
|
|
431
|
+
* @param {Management.ListSynchronizedGroupsRequestParameters} request
|
|
432
|
+
* @param {DirectoryProvisioningClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
433
|
+
*
|
|
434
|
+
* @throws {@link Management.BadRequestError}
|
|
435
|
+
* @throws {@link Management.UnauthorizedError}
|
|
436
|
+
* @throws {@link Management.ForbiddenError}
|
|
437
|
+
* @throws {@link Management.NotFoundError}
|
|
438
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
439
|
+
*
|
|
440
|
+
* @example
|
|
441
|
+
* await client.connections.directoryProvisioning.listSynchronizedGroups("id", {
|
|
442
|
+
* from: "from",
|
|
443
|
+
* take: 1
|
|
444
|
+
* })
|
|
445
|
+
*/
|
|
446
|
+
listSynchronizedGroups(id_1) {
|
|
447
|
+
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
448
|
+
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
449
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
450
|
+
const { from: from_, take = 50 } = request;
|
|
451
|
+
const _queryParams = {
|
|
452
|
+
from: from_,
|
|
453
|
+
take,
|
|
454
|
+
};
|
|
455
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
456
|
+
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);
|
|
457
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
458
|
+
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, `connections/${core.url.encodePathParam(id)}/directory-provisioning/synchronized-groups`),
|
|
459
|
+
method: "GET",
|
|
460
|
+
headers: _headers,
|
|
461
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
462
|
+
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,
|
|
463
|
+
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,
|
|
464
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
465
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
466
|
+
logging: this._options.logging,
|
|
467
|
+
});
|
|
468
|
+
if (_response.ok) {
|
|
469
|
+
return {
|
|
470
|
+
data: _response.body,
|
|
471
|
+
rawResponse: _response.rawResponse,
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
if (_response.error.reason === "status-code") {
|
|
475
|
+
switch (_response.error.statusCode) {
|
|
476
|
+
case 400:
|
|
477
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
478
|
+
case 401:
|
|
479
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
480
|
+
case 403:
|
|
481
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
482
|
+
case 404:
|
|
483
|
+
throw new Management.NotFoundError(_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, "GET", "/connections/{id}/directory-provisioning/synchronized-groups");
|
|
495
|
+
}));
|
|
496
|
+
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
497
|
+
return new core.Page({
|
|
498
|
+
response: dataWithRawResponse.data,
|
|
499
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
500
|
+
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) === ""),
|
|
501
|
+
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.groups) !== null && _a !== void 0 ? _a : []; },
|
|
502
|
+
loadPage: (response) => {
|
|
503
|
+
return list(core.setObjectProperty(request, "from", response === null || response === void 0 ? void 0 : response.next));
|
|
504
|
+
},
|
|
505
|
+
});
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* Create or replace the selected groups for a connection directory provisioning configuration.
|
|
510
|
+
*
|
|
511
|
+
* @param {string} id - The id of the connection to create or replace synchronized groups for
|
|
512
|
+
* @param {Management.ReplaceSynchronizedGroupsRequestContent} request
|
|
513
|
+
* @param {DirectoryProvisioningClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
514
|
+
*
|
|
515
|
+
* @throws {@link Management.BadRequestError}
|
|
516
|
+
* @throws {@link Management.UnauthorizedError}
|
|
517
|
+
* @throws {@link Management.ForbiddenError}
|
|
518
|
+
* @throws {@link Management.NotFoundError}
|
|
519
|
+
* @throws {@link Management.ConflictError}
|
|
520
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
521
|
+
*
|
|
522
|
+
* @example
|
|
523
|
+
* await client.connections.directoryProvisioning.set("id", {
|
|
524
|
+
* groups: [{
|
|
525
|
+
* id: "id"
|
|
526
|
+
* }]
|
|
527
|
+
* })
|
|
528
|
+
*/
|
|
529
|
+
set(id, request, requestOptions) {
|
|
530
|
+
return core.HttpResponsePromise.fromPromise(this.__set(id, request, requestOptions));
|
|
531
|
+
}
|
|
532
|
+
__set(id, request, requestOptions) {
|
|
533
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
534
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
535
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
536
|
+
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);
|
|
537
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
538
|
+
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, `connections/${core.url.encodePathParam(id)}/directory-provisioning/synchronized-groups`),
|
|
539
|
+
method: "PUT",
|
|
540
|
+
headers: _headers,
|
|
541
|
+
contentType: "application/json",
|
|
542
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
543
|
+
requestType: "json",
|
|
544
|
+
body: request,
|
|
545
|
+
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,
|
|
546
|
+
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,
|
|
547
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
548
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
549
|
+
logging: this._options.logging,
|
|
550
|
+
});
|
|
551
|
+
if (_response.ok) {
|
|
552
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
553
|
+
}
|
|
554
|
+
if (_response.error.reason === "status-code") {
|
|
555
|
+
switch (_response.error.statusCode) {
|
|
556
|
+
case 400:
|
|
557
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
558
|
+
case 401:
|
|
559
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
560
|
+
case 403:
|
|
561
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
562
|
+
case 404:
|
|
563
|
+
throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
|
|
564
|
+
case 409:
|
|
565
|
+
throw new Management.ConflictError(_response.error.body, _response.rawResponse);
|
|
566
|
+
case 429:
|
|
567
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
568
|
+
default:
|
|
569
|
+
throw new errors.ManagementError({
|
|
570
|
+
statusCode: _response.error.statusCode,
|
|
571
|
+
body: _response.error.body,
|
|
572
|
+
rawResponse: _response.rawResponse,
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/connections/{id}/directory-provisioning/synchronized-groups");
|
|
577
|
+
});
|
|
578
|
+
}
|
|
427
579
|
}
|
|
@@ -112,7 +112,7 @@ export declare class EventStreamsClient {
|
|
|
112
112
|
*
|
|
113
113
|
* @example
|
|
114
114
|
* await client.eventStreams.test("id", {
|
|
115
|
-
* event_type: "
|
|
115
|
+
* event_type: "group.created"
|
|
116
116
|
* })
|
|
117
117
|
*/
|
|
118
118
|
test(id: string, request: Management.CreateEventStreamTestEventRequestContent, requestOptions?: EventStreamsClient.RequestOptions): core.HttpResponsePromise<Management.CreateEventStreamTestEventResponseContent>;
|