auth0 5.5.0 → 5.6.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.
Files changed (116) hide show
  1. package/dist/cjs/management/Client.d.ts +12 -0
  2. package/dist/cjs/management/Client.js +67 -0
  3. package/dist/cjs/management/api/requests/requests.d.ts +140 -22
  4. package/dist/cjs/management/api/resources/actions/client/Client.d.ts +2 -2
  5. package/dist/cjs/management/api/resources/actions/client/Client.js +3 -3
  6. package/dist/cjs/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.d.ts +2 -2
  7. package/dist/cjs/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.js +2 -2
  8. package/dist/cjs/management/api/resources/clientGrants/client/Client.d.ts +0 -1
  9. package/dist/cjs/management/api/resources/clientGrants/client/Client.js +0 -1
  10. package/dist/cjs/management/api/resources/clients/client/Client.d.ts +46 -0
  11. package/dist/cjs/management/api/resources/clients/client/Client.js +146 -1
  12. package/dist/cjs/management/api/resources/customDomains/client/Client.d.ts +30 -0
  13. package/dist/cjs/management/api/resources/customDomains/client/Client.js +115 -0
  14. package/dist/cjs/management/api/resources/groups/client/Client.d.ts +16 -0
  15. package/dist/cjs/management/api/resources/groups/client/Client.js +57 -0
  16. package/dist/cjs/management/api/resources/networkAcls/client/Client.d.ts +0 -2
  17. package/dist/cjs/management/api/resources/networkAcls/client/Client.js +0 -2
  18. package/dist/cjs/management/api/resources/organizations/client/Client.d.ts +3 -0
  19. package/dist/cjs/management/api/resources/organizations/client/Client.js +13 -8
  20. package/dist/cjs/management/api/resources/organizations/resources/connections/client/Client.d.ts +95 -0
  21. package/dist/cjs/management/api/resources/organizations/resources/connections/client/Client.js +383 -0
  22. package/dist/cjs/management/api/resources/organizations/resources/connections/client/index.d.ts +1 -0
  23. package/dist/cjs/management/api/resources/organizations/resources/connections/client/index.js +2 -0
  24. package/dist/cjs/management/api/resources/organizations/resources/connections/index.d.ts +1 -0
  25. package/dist/cjs/management/api/resources/organizations/resources/connections/index.js +17 -0
  26. package/dist/cjs/management/api/resources/organizations/resources/discoveryDomains/client/Client.d.ts +3 -1
  27. package/dist/cjs/management/api/resources/organizations/resources/discoveryDomains/client/Client.js +3 -1
  28. package/dist/cjs/management/api/resources/organizations/resources/index.d.ts +1 -0
  29. package/dist/cjs/management/api/resources/organizations/resources/index.js +2 -1
  30. package/dist/cjs/management/api/resources/refreshTokens/client/Client.d.ts +23 -0
  31. package/dist/cjs/management/api/resources/refreshTokens/client/Client.js +88 -0
  32. package/dist/cjs/management/api/types/types.d.ts +492 -292
  33. package/dist/cjs/management/api/types/types.js +96 -103
  34. package/dist/cjs/management/core/auth/BasicAuth.d.ts +2 -2
  35. package/dist/cjs/management/core/auth/BasicAuth.js +7 -1
  36. package/dist/cjs/management/core/fetcher/BinaryResponse.d.ts +1 -1
  37. package/dist/cjs/management/core/fetcher/Fetcher.d.ts +2 -0
  38. package/dist/cjs/management/core/fetcher/Fetcher.js +5 -1
  39. package/dist/cjs/management/core/fetcher/index.d.ts +2 -0
  40. package/dist/cjs/management/core/fetcher/index.js +3 -1
  41. package/dist/cjs/management/core/fetcher/makePassthroughRequest.d.ts +49 -0
  42. package/dist/cjs/management/core/fetcher/makePassthroughRequest.js +135 -0
  43. package/dist/cjs/management/core/fetcher/makeRequest.d.ts +6 -1
  44. package/dist/cjs/management/core/fetcher/makeRequest.js +30 -9
  45. package/dist/cjs/management/core/pagination/Page.d.ts +1 -1
  46. package/dist/cjs/management/core/pagination/index.d.ts +0 -1
  47. package/dist/cjs/management/core/pagination/index.js +1 -4
  48. package/dist/cjs/management/core/runtime/runtime.js +8 -7
  49. package/dist/cjs/management/errors/ManagementError.d.ts +3 -1
  50. package/dist/cjs/management/errors/ManagementError.js +4 -1
  51. package/dist/cjs/management/errors/ManagementTimeoutError.d.ts +4 -1
  52. package/dist/cjs/management/errors/ManagementTimeoutError.js +4 -1
  53. package/dist/cjs/management/errors/handleNonStatusCodeError.js +4 -1
  54. package/dist/cjs/management/version.d.ts +1 -1
  55. package/dist/cjs/management/version.js +1 -1
  56. package/dist/esm/management/Client.d.mts +12 -0
  57. package/dist/esm/management/Client.mjs +34 -0
  58. package/dist/esm/management/api/requests/requests.d.mts +140 -22
  59. package/dist/esm/management/api/resources/actions/client/Client.d.mts +2 -2
  60. package/dist/esm/management/api/resources/actions/client/Client.mjs +3 -3
  61. package/dist/esm/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.d.mts +2 -2
  62. package/dist/esm/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.mjs +2 -2
  63. package/dist/esm/management/api/resources/clientGrants/client/Client.d.mts +0 -1
  64. package/dist/esm/management/api/resources/clientGrants/client/Client.mjs +0 -1
  65. package/dist/esm/management/api/resources/clients/client/Client.d.mts +46 -0
  66. package/dist/esm/management/api/resources/clients/client/Client.mjs +146 -1
  67. package/dist/esm/management/api/resources/customDomains/client/Client.d.mts +30 -0
  68. package/dist/esm/management/api/resources/customDomains/client/Client.mjs +115 -0
  69. package/dist/esm/management/api/resources/groups/client/Client.d.mts +16 -0
  70. package/dist/esm/management/api/resources/groups/client/Client.mjs +57 -0
  71. package/dist/esm/management/api/resources/networkAcls/client/Client.d.mts +0 -2
  72. package/dist/esm/management/api/resources/networkAcls/client/Client.mjs +0 -2
  73. package/dist/esm/management/api/resources/organizations/client/Client.d.mts +3 -0
  74. package/dist/esm/management/api/resources/organizations/client/Client.mjs +5 -0
  75. package/dist/esm/management/api/resources/organizations/resources/connections/client/Client.d.mts +95 -0
  76. package/dist/esm/management/api/resources/organizations/resources/connections/client/Client.mjs +346 -0
  77. package/dist/esm/management/api/resources/organizations/resources/connections/client/index.d.mts +1 -0
  78. package/dist/esm/management/api/resources/organizations/resources/connections/client/index.mjs +1 -0
  79. package/dist/esm/management/api/resources/organizations/resources/connections/index.d.mts +1 -0
  80. package/dist/esm/management/api/resources/organizations/resources/connections/index.mjs +1 -0
  81. package/dist/esm/management/api/resources/organizations/resources/discoveryDomains/client/Client.d.mts +3 -1
  82. package/dist/esm/management/api/resources/organizations/resources/discoveryDomains/client/Client.mjs +3 -1
  83. package/dist/esm/management/api/resources/organizations/resources/index.d.mts +1 -0
  84. package/dist/esm/management/api/resources/organizations/resources/index.mjs +1 -0
  85. package/dist/esm/management/api/resources/refreshTokens/client/Client.d.mts +23 -0
  86. package/dist/esm/management/api/resources/refreshTokens/client/Client.mjs +88 -0
  87. package/dist/esm/management/api/types/types.d.mts +492 -292
  88. package/dist/esm/management/api/types/types.mjs +86 -93
  89. package/dist/esm/management/core/auth/BasicAuth.d.mts +2 -2
  90. package/dist/esm/management/core/auth/BasicAuth.mjs +7 -1
  91. package/dist/esm/management/core/fetcher/BinaryResponse.d.mts +1 -1
  92. package/dist/esm/management/core/fetcher/Fetcher.d.mts +2 -0
  93. package/dist/esm/management/core/fetcher/Fetcher.mjs +5 -1
  94. package/dist/esm/management/core/fetcher/index.d.mts +2 -0
  95. package/dist/esm/management/core/fetcher/index.mjs +1 -0
  96. package/dist/esm/management/core/fetcher/makePassthroughRequest.d.mts +49 -0
  97. package/dist/esm/management/core/fetcher/makePassthroughRequest.mjs +132 -0
  98. package/dist/esm/management/core/fetcher/makeRequest.d.mts +6 -1
  99. package/dist/esm/management/core/fetcher/makeRequest.mjs +28 -9
  100. package/dist/esm/management/core/pagination/Page.d.mts +1 -1
  101. package/dist/esm/management/core/pagination/index.d.mts +0 -1
  102. package/dist/esm/management/core/pagination/index.mjs +0 -1
  103. package/dist/esm/management/core/runtime/runtime.mjs +8 -7
  104. package/dist/esm/management/errors/ManagementError.d.mts +3 -1
  105. package/dist/esm/management/errors/ManagementError.mjs +4 -1
  106. package/dist/esm/management/errors/ManagementTimeoutError.d.mts +4 -1
  107. package/dist/esm/management/errors/ManagementTimeoutError.mjs +4 -1
  108. package/dist/esm/management/errors/handleNonStatusCodeError.mjs +4 -1
  109. package/dist/esm/management/version.d.mts +1 -1
  110. package/dist/esm/management/version.mjs +1 -1
  111. package/package.json +5 -6
  112. package/reference.md +752 -30
  113. package/dist/cjs/management/core/pagination/CustomPager.d.ts +0 -67
  114. package/dist/cjs/management/core/pagination/CustomPager.js +0 -194
  115. package/dist/esm/management/core/pagination/CustomPager.d.mts +0 -67
  116. package/dist/esm/management/core/pagination/CustomPager.mjs +0 -189
@@ -118,6 +118,7 @@ class ClientsClient {
118
118
  * is_global: true,
119
119
  * is_first_party: true,
120
120
  * app_type: "app_type",
121
+ * external_client_id: "external_client_id",
121
122
  * q: "q"
122
123
  * })
123
124
  */
@@ -125,7 +126,7 @@ class ClientsClient {
125
126
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
126
127
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
127
128
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
128
- 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;
129
+ 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;
129
130
  const _queryParams = {
130
131
  fields,
131
132
  include_fields: includeFields,
@@ -135,6 +136,7 @@ class ClientsClient {
135
136
  is_global: isGlobal,
136
137
  is_first_party: isFirstParty,
137
138
  app_type: appType,
139
+ external_client_id: externalClientId,
138
140
  q,
139
141
  };
140
142
  const _authRequest = yield this._options.authProvider.getAuthRequest();
@@ -271,6 +273,149 @@ class ClientsClient {
271
273
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/clients");
272
274
  });
273
275
  }
276
+ /**
277
+ *
278
+ * Fetches and validates a Client ID Metadata Document without creating a client.
279
+ * Returns the raw metadata and how it would be mapped to Auth0 client fields.
280
+ * This endpoint is useful for testing metadata URIs before creating CIMD clients.
281
+ *
282
+ *
283
+ * @param {Management.PreviewCimdMetadataRequestContent} request
284
+ * @param {ClientsClient.RequestOptions} requestOptions - Request-specific configuration.
285
+ *
286
+ * @throws {@link Management.BadRequestError}
287
+ * @throws {@link Management.UnauthorizedError}
288
+ * @throws {@link Management.ForbiddenError}
289
+ * @throws {@link Management.TooManyRequestsError}
290
+ * @throws {@link Management.InternalServerError}
291
+ *
292
+ * @example
293
+ * await client.clients.previewCimdMetadata({
294
+ * external_client_id: "external_client_id"
295
+ * })
296
+ */
297
+ previewCimdMetadata(request, requestOptions) {
298
+ return core.HttpResponsePromise.fromPromise(this.__previewCimdMetadata(request, requestOptions));
299
+ }
300
+ __previewCimdMetadata(request, requestOptions) {
301
+ return __awaiter(this, void 0, void 0, function* () {
302
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
303
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
304
+ 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);
305
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
306
+ 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"),
307
+ method: "POST",
308
+ headers: _headers,
309
+ contentType: "application/json",
310
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
311
+ requestType: "json",
312
+ body: request,
313
+ 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,
314
+ 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,
315
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
316
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
317
+ logging: this._options.logging,
318
+ });
319
+ if (_response.ok) {
320
+ return {
321
+ data: _response.body,
322
+ rawResponse: _response.rawResponse,
323
+ };
324
+ }
325
+ if (_response.error.reason === "status-code") {
326
+ switch (_response.error.statusCode) {
327
+ case 400:
328
+ throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
329
+ case 401:
330
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
331
+ case 403:
332
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
333
+ case 429:
334
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
335
+ case 500:
336
+ throw new Management.InternalServerError(_response.error.body, _response.rawResponse);
337
+ default:
338
+ throw new errors.ManagementError({
339
+ statusCode: _response.error.statusCode,
340
+ body: _response.error.body,
341
+ rawResponse: _response.rawResponse,
342
+ });
343
+ }
344
+ }
345
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/clients/cimd/preview");
346
+ });
347
+ }
348
+ /**
349
+ *
350
+ * Idempotent registration for Client ID Metadata Document (CIMD) clients.
351
+ * Uses external_client_id as the unique identifier for upsert operations.
352
+ * **Create:** Returns 201 when a new client is created (requires \
353
+ *
354
+ * @param {Management.RegisterCimdClientRequestContent} request
355
+ * @param {ClientsClient.RequestOptions} requestOptions - Request-specific configuration.
356
+ *
357
+ * @throws {@link Management.BadRequestError}
358
+ * @throws {@link Management.UnauthorizedError}
359
+ * @throws {@link Management.ForbiddenError}
360
+ * @throws {@link Management.TooManyRequestsError}
361
+ * @throws {@link Management.InternalServerError}
362
+ *
363
+ * @example
364
+ * await client.clients.registerCimdClient({
365
+ * external_client_id: "external_client_id"
366
+ * })
367
+ */
368
+ registerCimdClient(request, requestOptions) {
369
+ return core.HttpResponsePromise.fromPromise(this.__registerCimdClient(request, requestOptions));
370
+ }
371
+ __registerCimdClient(request, requestOptions) {
372
+ return __awaiter(this, void 0, void 0, function* () {
373
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
374
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
375
+ 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);
376
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
377
+ 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"),
378
+ method: "POST",
379
+ headers: _headers,
380
+ contentType: "application/json",
381
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
382
+ requestType: "json",
383
+ body: request,
384
+ 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,
385
+ 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,
386
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
387
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
388
+ logging: this._options.logging,
389
+ });
390
+ if (_response.ok) {
391
+ return {
392
+ data: _response.body,
393
+ rawResponse: _response.rawResponse,
394
+ };
395
+ }
396
+ if (_response.error.reason === "status-code") {
397
+ switch (_response.error.statusCode) {
398
+ case 400:
399
+ throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
400
+ case 401:
401
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
402
+ case 403:
403
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
404
+ case 429:
405
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
406
+ case 500:
407
+ throw new Management.InternalServerError(_response.error.body, _response.rawResponse);
408
+ default:
409
+ throw new errors.ManagementError({
410
+ statusCode: _response.error.statusCode,
411
+ body: _response.error.body,
412
+ rawResponse: _response.rawResponse,
413
+ });
414
+ }
415
+ }
416
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/clients/cimd/register");
417
+ });
418
+ }
274
419
  /**
275
420
  * 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.
276
421
  * 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>.
@@ -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
  *
@@ -206,6 +206,121 @@ class CustomDomainsClient {
206
206
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/custom-domains");
207
207
  });
208
208
  }
209
+ /**
210
+ * Retrieve the tenant's default domain.
211
+ *
212
+ * @param {CustomDomainsClient.RequestOptions} requestOptions - Request-specific configuration.
213
+ *
214
+ * @throws {@link Management.UnauthorizedError}
215
+ * @throws {@link Management.ForbiddenError}
216
+ * @throws {@link Management.TooManyRequestsError}
217
+ *
218
+ * @example
219
+ * await client.customDomains.getDefault()
220
+ */
221
+ getDefault(requestOptions) {
222
+ return core.HttpResponsePromise.fromPromise(this.__getDefault(requestOptions));
223
+ }
224
+ __getDefault(requestOptions) {
225
+ return __awaiter(this, void 0, void 0, function* () {
226
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
227
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
228
+ 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);
229
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
230
+ 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"),
231
+ method: "GET",
232
+ headers: _headers,
233
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
234
+ 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,
235
+ 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,
236
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
237
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
238
+ logging: this._options.logging,
239
+ });
240
+ if (_response.ok) {
241
+ return {
242
+ data: _response.body,
243
+ rawResponse: _response.rawResponse,
244
+ };
245
+ }
246
+ if (_response.error.reason === "status-code") {
247
+ switch (_response.error.statusCode) {
248
+ case 401:
249
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
250
+ case 403:
251
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
252
+ case 429:
253
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
254
+ default:
255
+ throw new errors.ManagementError({
256
+ statusCode: _response.error.statusCode,
257
+ body: _response.error.body,
258
+ rawResponse: _response.rawResponse,
259
+ });
260
+ }
261
+ }
262
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/custom-domains/default");
263
+ });
264
+ }
265
+ /**
266
+ * Set the default custom domain for the tenant.
267
+ *
268
+ * @param {Management.SetDefaultCustomDomainRequestContent} request
269
+ * @param {CustomDomainsClient.RequestOptions} requestOptions - Request-specific configuration.
270
+ *
271
+ * @throws {@link Management.BadRequestError}
272
+ * @throws {@link Management.ForbiddenError}
273
+ *
274
+ * @example
275
+ * await client.customDomains.setDefault({
276
+ * domain: "domain"
277
+ * })
278
+ */
279
+ setDefault(request, requestOptions) {
280
+ return core.HttpResponsePromise.fromPromise(this.__setDefault(request, requestOptions));
281
+ }
282
+ __setDefault(request, requestOptions) {
283
+ return __awaiter(this, void 0, void 0, function* () {
284
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
285
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
286
+ 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);
287
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
288
+ 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"),
289
+ method: "PATCH",
290
+ headers: _headers,
291
+ contentType: "application/json",
292
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
293
+ requestType: "json",
294
+ body: request,
295
+ 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,
296
+ 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,
297
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
298
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
299
+ logging: this._options.logging,
300
+ });
301
+ if (_response.ok) {
302
+ return {
303
+ data: _response.body,
304
+ rawResponse: _response.rawResponse,
305
+ };
306
+ }
307
+ if (_response.error.reason === "status-code") {
308
+ switch (_response.error.statusCode) {
309
+ case 400:
310
+ throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
311
+ case 403:
312
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
313
+ default:
314
+ throw new errors.ManagementError({
315
+ statusCode: _response.error.statusCode,
316
+ body: _response.error.body,
317
+ rawResponse: _response.rawResponse,
318
+ });
319
+ }
320
+ }
321
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/custom-domains/default");
322
+ });
323
+ }
209
324
  /**
210
325
  * Retrieve a custom domain configuration and status.
211
326
  *
@@ -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
  }
@@ -207,5 +207,62 @@ class GroupsClient {
207
207
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/groups/{id}");
208
208
  });
209
209
  }
210
+ /**
211
+ * Delete a group by its ID.
212
+ *
213
+ * @param {string} id - Unique identifier for the group (service-generated).
214
+ * @param {GroupsClient.RequestOptions} requestOptions - Request-specific configuration.
215
+ *
216
+ * @throws {@link Management.UnauthorizedError}
217
+ * @throws {@link Management.ForbiddenError}
218
+ * @throws {@link Management.NotFoundError}
219
+ * @throws {@link Management.TooManyRequestsError}
220
+ *
221
+ * @example
222
+ * await client.groups.delete("id")
223
+ */
224
+ delete(id, requestOptions) {
225
+ return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions));
226
+ }
227
+ __delete(id, requestOptions) {
228
+ return __awaiter(this, void 0, void 0, function* () {
229
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
230
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
231
+ 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);
232
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
233
+ 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)}`),
234
+ method: "DELETE",
235
+ headers: _headers,
236
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
237
+ 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,
238
+ 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,
239
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
240
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
241
+ logging: this._options.logging,
242
+ });
243
+ if (_response.ok) {
244
+ return { data: undefined, rawResponse: _response.rawResponse };
245
+ }
246
+ if (_response.error.reason === "status-code") {
247
+ switch (_response.error.statusCode) {
248
+ case 401:
249
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
250
+ case 403:
251
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
252
+ case 404:
253
+ throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
254
+ case 429:
255
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
256
+ default:
257
+ throw new errors.ManagementError({
258
+ statusCode: _response.error.statusCode,
259
+ body: _response.error.body,
260
+ rawResponse: _response.rawResponse,
261
+ });
262
+ }
263
+ }
264
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/groups/{id}");
265
+ });
266
+ }
210
267
  }
211
268
  exports.GroupsClient = GroupsClient;
@@ -46,7 +46,6 @@ export declare class NetworkAclsClient {
46
46
  * await client.networkAcls.create({
47
47
  * description: "description",
48
48
  * active: true,
49
- * priority: 1.1,
50
49
  * rule: {
51
50
  * action: {},
52
51
  * scope: "management"
@@ -88,7 +87,6 @@ export declare class NetworkAclsClient {
88
87
  * await client.networkAcls.set("id", {
89
88
  * description: "description",
90
89
  * active: true,
91
- * priority: 1.1,
92
90
  * rule: {
93
91
  * action: {},
94
92
  * scope: "management"
@@ -153,7 +153,6 @@ class NetworkAclsClient {
153
153
  * await client.networkAcls.create({
154
154
  * description: "description",
155
155
  * active: true,
156
- * priority: 1.1,
157
156
  * rule: {
158
157
  * action: {},
159
158
  * scope: "management"
@@ -287,7 +286,6 @@ class NetworkAclsClient {
287
286
  * await client.networkAcls.set("id", {
288
287
  * description: "description",
289
288
  * active: true,
290
- * priority: 1.1,
291
289
  * rule: {
292
290
  * action: {},
293
291
  * scope: "management"
@@ -3,6 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Management from "../../../index.js";
5
5
  import { ClientGrantsClient } from "../resources/clientGrants/client/Client.js";
6
+ import { ConnectionsClient } from "../resources/connections/client/Client.js";
6
7
  import { DiscoveryDomainsClient } from "../resources/discoveryDomains/client/Client.js";
7
8
  import { EnabledConnectionsClient } from "../resources/enabledConnections/client/Client.js";
8
9
  import { InvitationsClient } from "../resources/invitations/client/Client.js";
@@ -15,12 +16,14 @@ export declare namespace OrganizationsClient {
15
16
  export declare class OrganizationsClient {
16
17
  protected readonly _options: NormalizedClientOptionsWithAuth<OrganizationsClient.Options>;
17
18
  protected _clientGrants: ClientGrantsClient | undefined;
19
+ protected _connections: ConnectionsClient | undefined;
18
20
  protected _discoveryDomains: DiscoveryDomainsClient | undefined;
19
21
  protected _enabledConnections: EnabledConnectionsClient | undefined;
20
22
  protected _invitations: InvitationsClient | undefined;
21
23
  protected _members: MembersClient | undefined;
22
24
  constructor(options: OrganizationsClient.Options);
23
25
  get clientGrants(): ClientGrantsClient;
26
+ get connections(): ConnectionsClient;
24
27
  get discoveryDomains(): DiscoveryDomainsClient;
25
28
  get enabledConnections(): EnabledConnectionsClient;
26
29
  get invitations(): InvitationsClient;
@@ -52,10 +52,11 @@ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatu
52
52
  const errors = __importStar(require("../../../../errors/index.js"));
53
53
  const Management = __importStar(require("../../../index.js"));
54
54
  const Client_js_1 = require("../resources/clientGrants/client/Client.js");
55
- const Client_js_2 = require("../resources/discoveryDomains/client/Client.js");
56
- const Client_js_3 = require("../resources/enabledConnections/client/Client.js");
57
- const Client_js_4 = require("../resources/invitations/client/Client.js");
58
- const Client_js_5 = require("../resources/members/client/Client.js");
55
+ const Client_js_2 = require("../resources/connections/client/Client.js");
56
+ const Client_js_3 = require("../resources/discoveryDomains/client/Client.js");
57
+ const Client_js_4 = require("../resources/enabledConnections/client/Client.js");
58
+ const Client_js_5 = require("../resources/invitations/client/Client.js");
59
+ const Client_js_6 = require("../resources/members/client/Client.js");
59
60
  class OrganizationsClient {
60
61
  constructor(options) {
61
62
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
@@ -64,21 +65,25 @@ class OrganizationsClient {
64
65
  var _a;
65
66
  return ((_a = this._clientGrants) !== null && _a !== void 0 ? _a : (this._clientGrants = new Client_js_1.ClientGrantsClient(this._options)));
66
67
  }
68
+ get connections() {
69
+ var _a;
70
+ return ((_a = this._connections) !== null && _a !== void 0 ? _a : (this._connections = new Client_js_2.ConnectionsClient(this._options)));
71
+ }
67
72
  get discoveryDomains() {
68
73
  var _a;
69
- return ((_a = this._discoveryDomains) !== null && _a !== void 0 ? _a : (this._discoveryDomains = new Client_js_2.DiscoveryDomainsClient(this._options)));
74
+ return ((_a = this._discoveryDomains) !== null && _a !== void 0 ? _a : (this._discoveryDomains = new Client_js_3.DiscoveryDomainsClient(this._options)));
70
75
  }
71
76
  get enabledConnections() {
72
77
  var _a;
73
- return ((_a = this._enabledConnections) !== null && _a !== void 0 ? _a : (this._enabledConnections = new Client_js_3.EnabledConnectionsClient(this._options)));
78
+ return ((_a = this._enabledConnections) !== null && _a !== void 0 ? _a : (this._enabledConnections = new Client_js_4.EnabledConnectionsClient(this._options)));
74
79
  }
75
80
  get invitations() {
76
81
  var _a;
77
- return ((_a = this._invitations) !== null && _a !== void 0 ? _a : (this._invitations = new Client_js_4.InvitationsClient(this._options)));
82
+ return ((_a = this._invitations) !== null && _a !== void 0 ? _a : (this._invitations = new Client_js_5.InvitationsClient(this._options)));
78
83
  }
79
84
  get members() {
80
85
  var _a;
81
- return ((_a = this._members) !== null && _a !== void 0 ? _a : (this._members = new Client_js_5.MembersClient(this._options)));
86
+ return ((_a = this._members) !== null && _a !== void 0 ? _a : (this._members = new Client_js_6.MembersClient(this._options)));
82
87
  }
83
88
  /**
84
89
  * Retrieve detailed list of all Organizations available in your tenant. For more information, see Auth0 Organizations.
@@ -0,0 +1,95 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
3
+ import * as core from "../../../../../../core/index.js";
4
+ import * as Management from "../../../../../index.js";
5
+ export declare namespace ConnectionsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class ConnectionsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<ConnectionsClient.Options>;
12
+ constructor(options: ConnectionsClient.Options);
13
+ /**
14
+ * @param {string} id - Organization identifier.
15
+ * @param {Management.ListOrganizationAllConnectionsRequestParameters} request
16
+ * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
17
+ *
18
+ * @throws {@link Management.BadRequestError}
19
+ * @throws {@link Management.UnauthorizedError}
20
+ * @throws {@link Management.ForbiddenError}
21
+ * @throws {@link Management.TooManyRequestsError}
22
+ *
23
+ * @example
24
+ * await client.organizations.connections.list("id", {
25
+ * page: 1,
26
+ * per_page: 1,
27
+ * include_totals: true,
28
+ * is_enabled: true
29
+ * })
30
+ */
31
+ list(id: string, request?: Management.ListOrganizationAllConnectionsRequestParameters, requestOptions?: ConnectionsClient.RequestOptions): Promise<core.Page<Management.OrganizationAllConnectionPost, Management.ListOrganizationAllConnectionsOffsetPaginatedResponseContent>>;
32
+ /**
33
+ * @param {string} id - Organization identifier.
34
+ * @param {Management.CreateOrganizationAllConnectionRequestParameters} request
35
+ * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
36
+ *
37
+ * @throws {@link Management.BadRequestError}
38
+ * @throws {@link Management.UnauthorizedError}
39
+ * @throws {@link Management.ForbiddenError}
40
+ * @throws {@link Management.ConflictError}
41
+ * @throws {@link Management.TooManyRequestsError}
42
+ *
43
+ * @example
44
+ * await client.organizations.connections.create("id", {
45
+ * connection_id: "connection_id"
46
+ * })
47
+ */
48
+ create(id: string, request: Management.CreateOrganizationAllConnectionRequestParameters, requestOptions?: ConnectionsClient.RequestOptions): core.HttpResponsePromise<Management.CreateOrganizationAllConnectionResponseContent>;
49
+ private __create;
50
+ /**
51
+ * @param {string} id - Organization identifier.
52
+ * @param {string} connection_id - Connection identifier.
53
+ * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
54
+ *
55
+ * @throws {@link Management.UnauthorizedError}
56
+ * @throws {@link Management.ForbiddenError}
57
+ * @throws {@link Management.NotFoundError}
58
+ * @throws {@link Management.TooManyRequestsError}
59
+ *
60
+ * @example
61
+ * await client.organizations.connections.get("id", "connection_id")
62
+ */
63
+ get(id: string, connection_id: string, requestOptions?: ConnectionsClient.RequestOptions): core.HttpResponsePromise<Management.GetOrganizationAllConnectionResponseContent>;
64
+ private __get;
65
+ /**
66
+ * @param {string} id - Organization identifier.
67
+ * @param {string} connection_id - Connection identifier.
68
+ * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
69
+ *
70
+ * @throws {@link Management.UnauthorizedError}
71
+ * @throws {@link Management.ForbiddenError}
72
+ * @throws {@link Management.TooManyRequestsError}
73
+ *
74
+ * @example
75
+ * await client.organizations.connections.delete("id", "connection_id")
76
+ */
77
+ delete(id: string, connection_id: string, requestOptions?: ConnectionsClient.RequestOptions): core.HttpResponsePromise<void>;
78
+ private __delete;
79
+ /**
80
+ * @param {string} id - Organization identifier.
81
+ * @param {string} connection_id - Connection identifier.
82
+ * @param {Management.UpdateOrganizationConnectionRequestParameters} request
83
+ * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
84
+ *
85
+ * @throws {@link Management.BadRequestError}
86
+ * @throws {@link Management.UnauthorizedError}
87
+ * @throws {@link Management.ForbiddenError}
88
+ * @throws {@link Management.TooManyRequestsError}
89
+ *
90
+ * @example
91
+ * await client.organizations.connections.update("id", "connection_id")
92
+ */
93
+ update(id: string, connection_id: string, request?: Management.UpdateOrganizationConnectionRequestParameters, requestOptions?: ConnectionsClient.RequestOptions): core.HttpResponsePromise<Management.UpdateOrganizationAllConnectionResponseContent>;
94
+ private __update;
95
+ }