auth0 5.5.0 → 5.7.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 +12 -0
- package/dist/cjs/management/Client.js +67 -0
- package/dist/cjs/management/api/requests/requests.d.ts +181 -24
- package/dist/cjs/management/api/resources/actions/client/Client.d.ts +2 -2
- package/dist/cjs/management/api/resources/actions/client/Client.js +3 -3
- package/dist/cjs/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.d.ts +2 -2
- package/dist/cjs/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.js +2 -2
- package/dist/cjs/management/api/resources/clientGrants/client/Client.d.ts +2 -2
- package/dist/cjs/management/api/resources/clientGrants/client/Client.js +4 -3
- package/dist/cjs/management/api/resources/clients/client/Client.d.ts +46 -0
- package/dist/cjs/management/api/resources/clients/client/Client.js +146 -1
- 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/customDomains/client/Client.d.ts +30 -0
- package/dist/cjs/management/api/resources/customDomains/client/Client.js +115 -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/groups/client/Client.d.ts +16 -0
- package/dist/cjs/management/api/resources/groups/client/Client.js +57 -0
- package/dist/cjs/management/api/resources/networkAcls/client/Client.d.ts +0 -2
- package/dist/cjs/management/api/resources/networkAcls/client/Client.js +0 -2
- package/dist/cjs/management/api/resources/organizations/client/Client.d.ts +3 -0
- package/dist/cjs/management/api/resources/organizations/client/Client.js +13 -8
- package/dist/cjs/management/api/resources/organizations/resources/connections/client/Client.d.ts +95 -0
- package/dist/cjs/management/api/resources/organizations/resources/connections/client/Client.js +383 -0
- package/dist/cjs/management/api/resources/organizations/resources/connections/client/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/connections/client/index.js +2 -0
- package/dist/cjs/management/api/resources/organizations/resources/connections/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/connections/index.js +17 -0
- package/dist/cjs/management/api/resources/organizations/resources/discoveryDomains/client/Client.d.ts +3 -1
- package/dist/cjs/management/api/resources/organizations/resources/discoveryDomains/client/Client.js +3 -1
- package/dist/cjs/management/api/resources/organizations/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/index.js +2 -1
- package/dist/cjs/management/api/resources/refreshTokens/client/Client.d.ts +23 -0
- package/dist/cjs/management/api/resources/refreshTokens/client/Client.js +88 -0
- package/dist/cjs/management/api/types/types.d.ts +673 -322
- package/dist/cjs/management/api/types/types.js +180 -134
- package/dist/cjs/management/core/auth/BasicAuth.d.ts +2 -2
- package/dist/cjs/management/core/auth/BasicAuth.js +7 -1
- package/dist/cjs/management/core/fetcher/BinaryResponse.d.ts +1 -1
- package/dist/cjs/management/core/fetcher/Fetcher.d.ts +2 -0
- package/dist/cjs/management/core/fetcher/Fetcher.js +5 -1
- package/dist/cjs/management/core/fetcher/index.d.ts +2 -0
- package/dist/cjs/management/core/fetcher/index.js +3 -1
- package/dist/cjs/management/core/fetcher/makePassthroughRequest.d.ts +49 -0
- package/dist/cjs/management/core/fetcher/makePassthroughRequest.js +135 -0
- package/dist/cjs/management/core/fetcher/makeRequest.d.ts +6 -1
- package/dist/cjs/management/core/fetcher/makeRequest.js +30 -9
- package/dist/cjs/management/core/pagination/Page.d.ts +1 -1
- package/dist/cjs/management/core/pagination/index.d.ts +0 -1
- package/dist/cjs/management/core/pagination/index.js +1 -4
- package/dist/cjs/management/core/runtime/runtime.js +8 -7
- package/dist/cjs/management/errors/ManagementError.d.ts +3 -1
- package/dist/cjs/management/errors/ManagementError.js +4 -1
- package/dist/cjs/management/errors/ManagementTimeoutError.d.ts +4 -1
- package/dist/cjs/management/errors/ManagementTimeoutError.js +4 -1
- package/dist/cjs/management/errors/handleNonStatusCodeError.js +4 -1
- package/dist/cjs/management/version.d.ts +1 -1
- package/dist/cjs/management/version.js +1 -1
- package/dist/esm/management/Client.d.mts +12 -0
- package/dist/esm/management/Client.mjs +34 -0
- package/dist/esm/management/api/requests/requests.d.mts +181 -24
- package/dist/esm/management/api/resources/actions/client/Client.d.mts +2 -2
- package/dist/esm/management/api/resources/actions/client/Client.mjs +3 -3
- package/dist/esm/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.d.mts +2 -2
- package/dist/esm/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.mjs +2 -2
- package/dist/esm/management/api/resources/clientGrants/client/Client.d.mts +2 -2
- package/dist/esm/management/api/resources/clientGrants/client/Client.mjs +4 -3
- package/dist/esm/management/api/resources/clients/client/Client.d.mts +46 -0
- package/dist/esm/management/api/resources/clients/client/Client.mjs +146 -1
- 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/customDomains/client/Client.d.mts +30 -0
- package/dist/esm/management/api/resources/customDomains/client/Client.mjs +115 -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/groups/client/Client.d.mts +16 -0
- package/dist/esm/management/api/resources/groups/client/Client.mjs +57 -0
- package/dist/esm/management/api/resources/networkAcls/client/Client.d.mts +0 -2
- package/dist/esm/management/api/resources/networkAcls/client/Client.mjs +0 -2
- package/dist/esm/management/api/resources/organizations/client/Client.d.mts +3 -0
- package/dist/esm/management/api/resources/organizations/client/Client.mjs +5 -0
- package/dist/esm/management/api/resources/organizations/resources/connections/client/Client.d.mts +95 -0
- package/dist/esm/management/api/resources/organizations/resources/connections/client/Client.mjs +346 -0
- package/dist/esm/management/api/resources/organizations/resources/connections/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/connections/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizations/resources/connections/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/connections/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizations/resources/discoveryDomains/client/Client.d.mts +3 -1
- package/dist/esm/management/api/resources/organizations/resources/discoveryDomains/client/Client.mjs +3 -1
- package/dist/esm/management/api/resources/organizations/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/refreshTokens/client/Client.d.mts +23 -0
- package/dist/esm/management/api/resources/refreshTokens/client/Client.mjs +88 -0
- package/dist/esm/management/api/types/types.d.mts +673 -322
- package/dist/esm/management/api/types/types.mjs +170 -124
- package/dist/esm/management/core/auth/BasicAuth.d.mts +2 -2
- package/dist/esm/management/core/auth/BasicAuth.mjs +7 -1
- package/dist/esm/management/core/fetcher/BinaryResponse.d.mts +1 -1
- package/dist/esm/management/core/fetcher/Fetcher.d.mts +2 -0
- package/dist/esm/management/core/fetcher/Fetcher.mjs +5 -1
- package/dist/esm/management/core/fetcher/index.d.mts +2 -0
- package/dist/esm/management/core/fetcher/index.mjs +1 -0
- package/dist/esm/management/core/fetcher/makePassthroughRequest.d.mts +49 -0
- package/dist/esm/management/core/fetcher/makePassthroughRequest.mjs +132 -0
- package/dist/esm/management/core/fetcher/makeRequest.d.mts +6 -1
- package/dist/esm/management/core/fetcher/makeRequest.mjs +28 -9
- package/dist/esm/management/core/pagination/Page.d.mts +1 -1
- package/dist/esm/management/core/pagination/index.d.mts +0 -1
- package/dist/esm/management/core/pagination/index.mjs +0 -1
- package/dist/esm/management/core/runtime/runtime.mjs +8 -7
- package/dist/esm/management/errors/ManagementError.d.mts +3 -1
- package/dist/esm/management/errors/ManagementError.mjs +4 -1
- package/dist/esm/management/errors/ManagementTimeoutError.d.mts +4 -1
- package/dist/esm/management/errors/ManagementTimeoutError.mjs +4 -1
- package/dist/esm/management/errors/handleNonStatusCodeError.mjs +4 -1
- package/dist/esm/management/version.d.mts +1 -1
- package/dist/esm/management/version.mjs +1 -1
- package/package.json +5 -6
- package/reference.md +958 -68
- package/dist/cjs/management/core/pagination/CustomPager.d.ts +0 -67
- package/dist/cjs/management/core/pagination/CustomPager.js +0 -194
- package/dist/esm/management/core/pagination/CustomPager.d.mts +0 -67
- package/dist/esm/management/core/pagination/CustomPager.mjs +0 -189
|
@@ -82,6 +82,7 @@ export class ClientsClient {
|
|
|
82
82
|
* is_global: true,
|
|
83
83
|
* is_first_party: true,
|
|
84
84
|
* app_type: "app_type",
|
|
85
|
+
* external_client_id: "external_client_id",
|
|
85
86
|
* q: "q"
|
|
86
87
|
* })
|
|
87
88
|
*/
|
|
@@ -89,7 +90,7 @@ export class ClientsClient {
|
|
|
89
90
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
90
91
|
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
91
92
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
92
|
-
const { fields, include_fields: includeFields, page = 0, per_page: perPage = 50, include_totals: includeTotals = true, is_global: isGlobal, is_first_party: isFirstParty, app_type: appType, q, } = request;
|
|
93
|
+
const { fields, include_fields: includeFields, page = 0, per_page: perPage = 50, include_totals: includeTotals = true, is_global: isGlobal, is_first_party: isFirstParty, app_type: appType, external_client_id: externalClientId, q, } = request;
|
|
93
94
|
const _queryParams = {
|
|
94
95
|
fields,
|
|
95
96
|
include_fields: includeFields,
|
|
@@ -99,6 +100,7 @@ export class ClientsClient {
|
|
|
99
100
|
is_global: isGlobal,
|
|
100
101
|
is_first_party: isFirstParty,
|
|
101
102
|
app_type: appType,
|
|
103
|
+
external_client_id: externalClientId,
|
|
102
104
|
q,
|
|
103
105
|
};
|
|
104
106
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
@@ -235,6 +237,149 @@ export class ClientsClient {
|
|
|
235
237
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/clients");
|
|
236
238
|
});
|
|
237
239
|
}
|
|
240
|
+
/**
|
|
241
|
+
*
|
|
242
|
+
* Fetches and validates a Client ID Metadata Document without creating a client.
|
|
243
|
+
* Returns the raw metadata and how it would be mapped to Auth0 client fields.
|
|
244
|
+
* This endpoint is useful for testing metadata URIs before creating CIMD clients.
|
|
245
|
+
*
|
|
246
|
+
*
|
|
247
|
+
* @param {Management.PreviewCimdMetadataRequestContent} request
|
|
248
|
+
* @param {ClientsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
249
|
+
*
|
|
250
|
+
* @throws {@link Management.BadRequestError}
|
|
251
|
+
* @throws {@link Management.UnauthorizedError}
|
|
252
|
+
* @throws {@link Management.ForbiddenError}
|
|
253
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
254
|
+
* @throws {@link Management.InternalServerError}
|
|
255
|
+
*
|
|
256
|
+
* @example
|
|
257
|
+
* await client.clients.previewCimdMetadata({
|
|
258
|
+
* external_client_id: "external_client_id"
|
|
259
|
+
* })
|
|
260
|
+
*/
|
|
261
|
+
previewCimdMetadata(request, requestOptions) {
|
|
262
|
+
return core.HttpResponsePromise.fromPromise(this.__previewCimdMetadata(request, requestOptions));
|
|
263
|
+
}
|
|
264
|
+
__previewCimdMetadata(request, requestOptions) {
|
|
265
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
266
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
267
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
268
|
+
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);
|
|
269
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
270
|
+
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, "clients/cimd/preview"),
|
|
271
|
+
method: "POST",
|
|
272
|
+
headers: _headers,
|
|
273
|
+
contentType: "application/json",
|
|
274
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
275
|
+
requestType: "json",
|
|
276
|
+
body: request,
|
|
277
|
+
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,
|
|
278
|
+
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,
|
|
279
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
280
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
281
|
+
logging: this._options.logging,
|
|
282
|
+
});
|
|
283
|
+
if (_response.ok) {
|
|
284
|
+
return {
|
|
285
|
+
data: _response.body,
|
|
286
|
+
rawResponse: _response.rawResponse,
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
if (_response.error.reason === "status-code") {
|
|
290
|
+
switch (_response.error.statusCode) {
|
|
291
|
+
case 400:
|
|
292
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
293
|
+
case 401:
|
|
294
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
295
|
+
case 403:
|
|
296
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
297
|
+
case 429:
|
|
298
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
299
|
+
case 500:
|
|
300
|
+
throw new Management.InternalServerError(_response.error.body, _response.rawResponse);
|
|
301
|
+
default:
|
|
302
|
+
throw new errors.ManagementError({
|
|
303
|
+
statusCode: _response.error.statusCode,
|
|
304
|
+
body: _response.error.body,
|
|
305
|
+
rawResponse: _response.rawResponse,
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/clients/cimd/preview");
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
*
|
|
314
|
+
* Idempotent registration for Client ID Metadata Document (CIMD) clients.
|
|
315
|
+
* Uses external_client_id as the unique identifier for upsert operations.
|
|
316
|
+
* **Create:** Returns 201 when a new client is created (requires \
|
|
317
|
+
*
|
|
318
|
+
* @param {Management.RegisterCimdClientRequestContent} request
|
|
319
|
+
* @param {ClientsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
320
|
+
*
|
|
321
|
+
* @throws {@link Management.BadRequestError}
|
|
322
|
+
* @throws {@link Management.UnauthorizedError}
|
|
323
|
+
* @throws {@link Management.ForbiddenError}
|
|
324
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
325
|
+
* @throws {@link Management.InternalServerError}
|
|
326
|
+
*
|
|
327
|
+
* @example
|
|
328
|
+
* await client.clients.registerCimdClient({
|
|
329
|
+
* external_client_id: "external_client_id"
|
|
330
|
+
* })
|
|
331
|
+
*/
|
|
332
|
+
registerCimdClient(request, requestOptions) {
|
|
333
|
+
return core.HttpResponsePromise.fromPromise(this.__registerCimdClient(request, requestOptions));
|
|
334
|
+
}
|
|
335
|
+
__registerCimdClient(request, requestOptions) {
|
|
336
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
337
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
338
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
339
|
+
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);
|
|
340
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
341
|
+
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, "clients/cimd/register"),
|
|
342
|
+
method: "POST",
|
|
343
|
+
headers: _headers,
|
|
344
|
+
contentType: "application/json",
|
|
345
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
346
|
+
requestType: "json",
|
|
347
|
+
body: request,
|
|
348
|
+
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,
|
|
349
|
+
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,
|
|
350
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
351
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
352
|
+
logging: this._options.logging,
|
|
353
|
+
});
|
|
354
|
+
if (_response.ok) {
|
|
355
|
+
return {
|
|
356
|
+
data: _response.body,
|
|
357
|
+
rawResponse: _response.rawResponse,
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
if (_response.error.reason === "status-code") {
|
|
361
|
+
switch (_response.error.statusCode) {
|
|
362
|
+
case 400:
|
|
363
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
364
|
+
case 401:
|
|
365
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
366
|
+
case 403:
|
|
367
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
368
|
+
case 429:
|
|
369
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
370
|
+
case 500:
|
|
371
|
+
throw new Management.InternalServerError(_response.error.body, _response.rawResponse);
|
|
372
|
+
default:
|
|
373
|
+
throw new errors.ManagementError({
|
|
374
|
+
statusCode: _response.error.statusCode,
|
|
375
|
+
body: _response.error.body,
|
|
376
|
+
rawResponse: _response.rawResponse,
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/clients/cimd/register");
|
|
381
|
+
});
|
|
382
|
+
}
|
|
238
383
|
/**
|
|
239
384
|
* Retrieve client details by ID. Clients are SSO connections or Applications linked with your Auth0 tenant. A list of fields to include or exclude may also be specified.
|
|
240
385
|
* For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>.
|
|
@@ -119,4 +119,47 @@ export declare class DirectoryProvisioningClient {
|
|
|
119
119
|
*/
|
|
120
120
|
getDefaultMapping(id: string, requestOptions?: DirectoryProvisioningClient.RequestOptions): core.HttpResponsePromise<Management.GetDirectoryProvisioningDefaultMappingResponseContent>;
|
|
121
121
|
private __getDefaultMapping;
|
|
122
|
+
/**
|
|
123
|
+
* Retrieve the configured synchronized groups for a connection directory provisioning configuration.
|
|
124
|
+
*
|
|
125
|
+
* @param {string} id - The id of the connection to list synchronized groups for.
|
|
126
|
+
* @param {Management.ListSynchronizedGroupsRequestParameters} request
|
|
127
|
+
* @param {DirectoryProvisioningClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
128
|
+
*
|
|
129
|
+
* @throws {@link Management.BadRequestError}
|
|
130
|
+
* @throws {@link Management.UnauthorizedError}
|
|
131
|
+
* @throws {@link Management.ForbiddenError}
|
|
132
|
+
* @throws {@link Management.NotFoundError}
|
|
133
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* await client.connections.directoryProvisioning.listSynchronizedGroups("id", {
|
|
137
|
+
* from: "from",
|
|
138
|
+
* take: 1
|
|
139
|
+
* })
|
|
140
|
+
*/
|
|
141
|
+
listSynchronizedGroups(id: string, request?: Management.ListSynchronizedGroupsRequestParameters, requestOptions?: DirectoryProvisioningClient.RequestOptions): Promise<core.Page<Management.SynchronizedGroupPayload, Management.ListSynchronizedGroupsResponseContent>>;
|
|
142
|
+
/**
|
|
143
|
+
* Create or replace the selected groups for a connection directory provisioning configuration.
|
|
144
|
+
*
|
|
145
|
+
* @param {string} id - The id of the connection to create or replace synchronized groups for
|
|
146
|
+
* @param {Management.ReplaceSynchronizedGroupsRequestContent} request
|
|
147
|
+
* @param {DirectoryProvisioningClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
148
|
+
*
|
|
149
|
+
* @throws {@link Management.BadRequestError}
|
|
150
|
+
* @throws {@link Management.UnauthorizedError}
|
|
151
|
+
* @throws {@link Management.ForbiddenError}
|
|
152
|
+
* @throws {@link Management.NotFoundError}
|
|
153
|
+
* @throws {@link Management.ConflictError}
|
|
154
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* await client.connections.directoryProvisioning.set("id", {
|
|
158
|
+
* groups: [{
|
|
159
|
+
* id: "id"
|
|
160
|
+
* }]
|
|
161
|
+
* })
|
|
162
|
+
*/
|
|
163
|
+
set(id: string, request: Management.ReplaceSynchronizedGroupsRequestContent, requestOptions?: DirectoryProvisioningClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
164
|
+
private __set;
|
|
122
165
|
}
|
|
@@ -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
|
}
|
|
@@ -63,6 +63,36 @@ export declare class CustomDomainsClient {
|
|
|
63
63
|
*/
|
|
64
64
|
create(request: Management.CreateCustomDomainRequestContent, requestOptions?: CustomDomainsClient.RequestOptions): core.HttpResponsePromise<Management.CreateCustomDomainResponseContent>;
|
|
65
65
|
private __create;
|
|
66
|
+
/**
|
|
67
|
+
* Retrieve the tenant's default domain.
|
|
68
|
+
*
|
|
69
|
+
* @param {CustomDomainsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
70
|
+
*
|
|
71
|
+
* @throws {@link Management.UnauthorizedError}
|
|
72
|
+
* @throws {@link Management.ForbiddenError}
|
|
73
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* await client.customDomains.getDefault()
|
|
77
|
+
*/
|
|
78
|
+
getDefault(requestOptions?: CustomDomainsClient.RequestOptions): core.HttpResponsePromise<Management.GetDefaultDomainResponseContent>;
|
|
79
|
+
private __getDefault;
|
|
80
|
+
/**
|
|
81
|
+
* Set the default custom domain for the tenant.
|
|
82
|
+
*
|
|
83
|
+
* @param {Management.SetDefaultCustomDomainRequestContent} request
|
|
84
|
+
* @param {CustomDomainsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
85
|
+
*
|
|
86
|
+
* @throws {@link Management.BadRequestError}
|
|
87
|
+
* @throws {@link Management.ForbiddenError}
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* await client.customDomains.setDefault({
|
|
91
|
+
* domain: "domain"
|
|
92
|
+
* })
|
|
93
|
+
*/
|
|
94
|
+
setDefault(request: Management.SetDefaultCustomDomainRequestContent, requestOptions?: CustomDomainsClient.RequestOptions): core.HttpResponsePromise<Management.UpdateDefaultDomainResponseContent>;
|
|
95
|
+
private __setDefault;
|
|
66
96
|
/**
|
|
67
97
|
* Retrieve a custom domain configuration and status.
|
|
68
98
|
*
|
|
@@ -170,6 +170,121 @@ export class CustomDomainsClient {
|
|
|
170
170
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/custom-domains");
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* Retrieve the tenant's default domain.
|
|
175
|
+
*
|
|
176
|
+
* @param {CustomDomainsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
177
|
+
*
|
|
178
|
+
* @throws {@link Management.UnauthorizedError}
|
|
179
|
+
* @throws {@link Management.ForbiddenError}
|
|
180
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* await client.customDomains.getDefault()
|
|
184
|
+
*/
|
|
185
|
+
getDefault(requestOptions) {
|
|
186
|
+
return core.HttpResponsePromise.fromPromise(this.__getDefault(requestOptions));
|
|
187
|
+
}
|
|
188
|
+
__getDefault(requestOptions) {
|
|
189
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
190
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
191
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
192
|
+
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);
|
|
193
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
194
|
+
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, "custom-domains/default"),
|
|
195
|
+
method: "GET",
|
|
196
|
+
headers: _headers,
|
|
197
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
198
|
+
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,
|
|
199
|
+
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,
|
|
200
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
201
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
202
|
+
logging: this._options.logging,
|
|
203
|
+
});
|
|
204
|
+
if (_response.ok) {
|
|
205
|
+
return {
|
|
206
|
+
data: _response.body,
|
|
207
|
+
rawResponse: _response.rawResponse,
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
if (_response.error.reason === "status-code") {
|
|
211
|
+
switch (_response.error.statusCode) {
|
|
212
|
+
case 401:
|
|
213
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
214
|
+
case 403:
|
|
215
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
216
|
+
case 429:
|
|
217
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
218
|
+
default:
|
|
219
|
+
throw new errors.ManagementError({
|
|
220
|
+
statusCode: _response.error.statusCode,
|
|
221
|
+
body: _response.error.body,
|
|
222
|
+
rawResponse: _response.rawResponse,
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/custom-domains/default");
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Set the default custom domain for the tenant.
|
|
231
|
+
*
|
|
232
|
+
* @param {Management.SetDefaultCustomDomainRequestContent} request
|
|
233
|
+
* @param {CustomDomainsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
234
|
+
*
|
|
235
|
+
* @throws {@link Management.BadRequestError}
|
|
236
|
+
* @throws {@link Management.ForbiddenError}
|
|
237
|
+
*
|
|
238
|
+
* @example
|
|
239
|
+
* await client.customDomains.setDefault({
|
|
240
|
+
* domain: "domain"
|
|
241
|
+
* })
|
|
242
|
+
*/
|
|
243
|
+
setDefault(request, requestOptions) {
|
|
244
|
+
return core.HttpResponsePromise.fromPromise(this.__setDefault(request, requestOptions));
|
|
245
|
+
}
|
|
246
|
+
__setDefault(request, requestOptions) {
|
|
247
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
248
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
249
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
250
|
+
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);
|
|
251
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
252
|
+
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, "custom-domains/default"),
|
|
253
|
+
method: "PATCH",
|
|
254
|
+
headers: _headers,
|
|
255
|
+
contentType: "application/json",
|
|
256
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
257
|
+
requestType: "json",
|
|
258
|
+
body: request,
|
|
259
|
+
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,
|
|
260
|
+
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,
|
|
261
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
262
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
263
|
+
logging: this._options.logging,
|
|
264
|
+
});
|
|
265
|
+
if (_response.ok) {
|
|
266
|
+
return {
|
|
267
|
+
data: _response.body,
|
|
268
|
+
rawResponse: _response.rawResponse,
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
if (_response.error.reason === "status-code") {
|
|
272
|
+
switch (_response.error.statusCode) {
|
|
273
|
+
case 400:
|
|
274
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
275
|
+
case 403:
|
|
276
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
277
|
+
default:
|
|
278
|
+
throw new errors.ManagementError({
|
|
279
|
+
statusCode: _response.error.statusCode,
|
|
280
|
+
body: _response.error.body,
|
|
281
|
+
rawResponse: _response.rawResponse,
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/custom-domains/default");
|
|
286
|
+
});
|
|
287
|
+
}
|
|
173
288
|
/**
|
|
174
289
|
* Retrieve a custom domain configuration and status.
|
|
175
290
|
*
|
|
@@ -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>;
|
|
@@ -53,4 +53,20 @@ export declare class GroupsClient {
|
|
|
53
53
|
*/
|
|
54
54
|
get(id: string, requestOptions?: GroupsClient.RequestOptions): core.HttpResponsePromise<Management.GetGroupResponseContent>;
|
|
55
55
|
private __get;
|
|
56
|
+
/**
|
|
57
|
+
* Delete a group by its ID.
|
|
58
|
+
*
|
|
59
|
+
* @param {string} id - Unique identifier for the group (service-generated).
|
|
60
|
+
* @param {GroupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link Management.UnauthorizedError}
|
|
63
|
+
* @throws {@link Management.ForbiddenError}
|
|
64
|
+
* @throws {@link Management.NotFoundError}
|
|
65
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* await client.groups.delete("id")
|
|
69
|
+
*/
|
|
70
|
+
delete(id: string, requestOptions?: GroupsClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
71
|
+
private __delete;
|
|
56
72
|
}
|
|
@@ -171,4 +171,61 @@ export class GroupsClient {
|
|
|
171
171
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/groups/{id}");
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Delete a group by its ID.
|
|
176
|
+
*
|
|
177
|
+
* @param {string} id - Unique identifier for the group (service-generated).
|
|
178
|
+
* @param {GroupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
179
|
+
*
|
|
180
|
+
* @throws {@link Management.UnauthorizedError}
|
|
181
|
+
* @throws {@link Management.ForbiddenError}
|
|
182
|
+
* @throws {@link Management.NotFoundError}
|
|
183
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* await client.groups.delete("id")
|
|
187
|
+
*/
|
|
188
|
+
delete(id, requestOptions) {
|
|
189
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions));
|
|
190
|
+
}
|
|
191
|
+
__delete(id, requestOptions) {
|
|
192
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
194
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
195
|
+
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);
|
|
196
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
197
|
+
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, `groups/${core.url.encodePathParam(id)}`),
|
|
198
|
+
method: "DELETE",
|
|
199
|
+
headers: _headers,
|
|
200
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
201
|
+
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,
|
|
202
|
+
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,
|
|
203
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
204
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
205
|
+
logging: this._options.logging,
|
|
206
|
+
});
|
|
207
|
+
if (_response.ok) {
|
|
208
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
209
|
+
}
|
|
210
|
+
if (_response.error.reason === "status-code") {
|
|
211
|
+
switch (_response.error.statusCode) {
|
|
212
|
+
case 401:
|
|
213
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
214
|
+
case 403:
|
|
215
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
216
|
+
case 404:
|
|
217
|
+
throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
|
|
218
|
+
case 429:
|
|
219
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
220
|
+
default:
|
|
221
|
+
throw new errors.ManagementError({
|
|
222
|
+
statusCode: _response.error.statusCode,
|
|
223
|
+
body: _response.error.body,
|
|
224
|
+
rawResponse: _response.rawResponse,
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/groups/{id}");
|
|
229
|
+
});
|
|
230
|
+
}
|
|
174
231
|
}
|