auth0 5.2.0 → 5.3.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 (179) hide show
  1. package/LICENSE +1 -1
  2. package/dist/cjs/management/Client.d.ts +3 -0
  3. package/dist/cjs/management/Client.js +59 -54
  4. package/dist/cjs/management/api/errors/PreconditionFailedError.d.ts +5 -0
  5. package/dist/cjs/management/api/errors/PreconditionFailedError.js +54 -0
  6. package/dist/cjs/management/api/errors/index.d.ts +1 -0
  7. package/dist/cjs/management/api/errors/index.js +1 -0
  8. package/dist/cjs/management/api/requests/requests.d.ts +185 -10
  9. package/dist/cjs/management/api/resources/actions/client/Client.d.ts +3 -0
  10. package/dist/cjs/management/api/resources/actions/client/Client.js +9 -4
  11. package/dist/cjs/management/api/resources/actions/resources/index.d.ts +1 -0
  12. package/dist/cjs/management/api/resources/actions/resources/index.js +2 -1
  13. package/dist/cjs/management/api/resources/actions/resources/modules/client/Client.d.ts +149 -0
  14. package/dist/cjs/management/api/resources/actions/resources/modules/client/Client.js +569 -0
  15. package/dist/cjs/management/api/resources/actions/resources/modules/client/index.d.ts +1 -0
  16. package/dist/cjs/management/api/resources/actions/resources/modules/client/index.js +2 -0
  17. package/dist/cjs/management/api/resources/actions/resources/modules/index.d.ts +2 -0
  18. package/dist/cjs/management/api/resources/actions/resources/modules/index.js +18 -0
  19. package/dist/cjs/management/api/resources/actions/resources/modules/resources/index.d.ts +1 -0
  20. package/dist/cjs/management/api/resources/actions/resources/modules/resources/index.js +37 -0
  21. package/dist/cjs/management/api/resources/actions/resources/modules/resources/versions/client/Client.d.ts +66 -0
  22. package/dist/cjs/management/api/resources/actions/resources/modules/resources/versions/client/Client.js +252 -0
  23. package/dist/cjs/management/api/resources/actions/resources/modules/resources/versions/client/index.d.ts +1 -0
  24. package/dist/cjs/management/api/resources/actions/resources/modules/resources/versions/client/index.js +2 -0
  25. package/dist/cjs/management/api/resources/actions/resources/modules/resources/versions/index.d.ts +1 -0
  26. package/dist/cjs/management/api/resources/actions/resources/modules/resources/versions/index.js +17 -0
  27. package/dist/cjs/management/api/resources/clientGrants/client/Client.d.ts +17 -0
  28. package/dist/cjs/management/api/resources/clientGrants/client/Client.js +61 -0
  29. package/dist/cjs/management/api/resources/connections/client/Client.d.ts +7 -3
  30. package/dist/cjs/management/api/resources/connections/client/Client.js +9 -5
  31. package/dist/cjs/management/api/resources/connections/resources/directoryProvisioning/client/Client.d.ts +18 -0
  32. package/dist/cjs/management/api/resources/connections/resources/directoryProvisioning/client/Client.js +80 -0
  33. package/dist/cjs/management/api/resources/deviceCredentials/client/Client.d.ts +1 -0
  34. package/dist/cjs/management/api/resources/deviceCredentials/client/Client.js +2 -1
  35. package/dist/cjs/management/api/resources/eventStreams/client/Client.d.ts +1 -2
  36. package/dist/cjs/management/api/resources/eventStreams/client/Client.js +59 -50
  37. package/dist/cjs/management/api/resources/flows/index.d.ts +1 -0
  38. package/dist/cjs/management/api/resources/flows/index.js +1 -0
  39. package/dist/cjs/management/api/resources/flows/resources/executions/index.d.ts +1 -0
  40. package/dist/cjs/management/api/resources/flows/resources/executions/index.js +1 -0
  41. package/dist/cjs/management/api/resources/flows/resources/executions/types/index.d.ts +1 -0
  42. package/dist/cjs/management/api/resources/flows/resources/executions/types/index.js +17 -0
  43. package/dist/cjs/management/api/resources/flows/resources/executions/types/types.d.ts +4 -0
  44. package/dist/cjs/management/api/resources/flows/resources/executions/types/types.js +7 -0
  45. package/dist/cjs/management/api/resources/flows/resources/index.d.ts +1 -0
  46. package/dist/cjs/management/api/resources/flows/resources/index.js +4 -0
  47. package/dist/cjs/management/api/resources/flows/types/index.d.ts +1 -0
  48. package/dist/cjs/management/api/resources/flows/types/index.js +17 -0
  49. package/dist/cjs/management/api/resources/flows/types/types.d.ts +4 -0
  50. package/dist/cjs/management/api/resources/flows/types/types.js +7 -0
  51. package/dist/cjs/management/api/resources/groups/client/Client.d.ts +56 -0
  52. package/dist/cjs/management/api/resources/groups/client/Client.js +224 -0
  53. package/dist/cjs/management/api/resources/groups/client/index.d.ts +1 -0
  54. package/dist/cjs/management/api/resources/groups/client/index.js +2 -0
  55. package/dist/cjs/management/api/resources/groups/index.d.ts +2 -0
  56. package/dist/cjs/management/api/resources/groups/index.js +18 -0
  57. package/dist/cjs/management/api/resources/groups/resources/index.d.ts +1 -0
  58. package/dist/cjs/management/api/resources/groups/resources/index.js +37 -0
  59. package/dist/cjs/management/api/resources/groups/resources/members/client/Client.d.ts +34 -0
  60. package/dist/cjs/management/api/resources/groups/resources/members/client/Client.js +148 -0
  61. package/dist/cjs/management/api/resources/groups/resources/members/client/index.d.ts +1 -0
  62. package/dist/cjs/management/api/resources/groups/resources/members/client/index.js +2 -0
  63. package/dist/cjs/management/api/resources/groups/resources/members/index.d.ts +1 -0
  64. package/dist/cjs/management/api/resources/groups/resources/members/index.js +17 -0
  65. package/dist/cjs/management/api/resources/index.d.ts +2 -0
  66. package/dist/cjs/management/api/resources/index.js +3 -1
  67. package/dist/cjs/management/api/resources/organizations/resources/discoveryDomains/client/Client.d.ts +20 -1
  68. package/dist/cjs/management/api/resources/organizations/resources/discoveryDomains/client/Client.js +66 -1
  69. package/dist/cjs/management/api/resources/prompts/resources/rendering/client/Client.d.ts +1 -1
  70. package/dist/cjs/management/api/resources/refreshTokens/client/Client.d.ts +18 -0
  71. package/dist/cjs/management/api/resources/refreshTokens/client/Client.js +67 -0
  72. package/dist/cjs/management/api/resources/roles/client/Client.d.ts +1 -0
  73. package/dist/cjs/management/api/resources/roles/client/Client.js +3 -0
  74. package/dist/cjs/management/api/resources/tokenExchangeProfiles/client/Client.d.ts +2 -1
  75. package/dist/cjs/management/api/resources/tokenExchangeProfiles/client/Client.js +3 -2
  76. package/dist/cjs/management/api/resources/users/client/Client.d.ts +3 -0
  77. package/dist/cjs/management/api/resources/users/client/Client.js +23 -18
  78. package/dist/cjs/management/api/resources/users/resources/groups/client/Client.d.ts +34 -0
  79. package/dist/cjs/management/api/resources/users/resources/groups/client/Client.js +148 -0
  80. package/dist/cjs/management/api/resources/users/resources/groups/client/index.d.ts +1 -0
  81. package/dist/cjs/management/api/resources/users/resources/groups/client/index.js +2 -0
  82. package/dist/cjs/management/api/resources/users/resources/groups/index.d.ts +1 -0
  83. package/dist/cjs/management/api/resources/users/resources/groups/index.js +17 -0
  84. package/dist/cjs/management/api/resources/users/resources/index.d.ts +1 -0
  85. package/dist/cjs/management/api/resources/users/resources/index.js +2 -1
  86. package/dist/cjs/management/api/types/types.d.ts +4374 -959
  87. package/dist/cjs/management/api/types/types.js +1715 -11
  88. package/dist/cjs/management/version.d.ts +1 -1
  89. package/dist/cjs/management/version.js +1 -1
  90. package/dist/esm/management/Client.d.mts +3 -0
  91. package/dist/esm/management/Client.mjs +5 -0
  92. package/dist/esm/management/api/errors/PreconditionFailedError.d.mts +5 -0
  93. package/dist/esm/management/api/errors/PreconditionFailedError.mjs +17 -0
  94. package/dist/esm/management/api/errors/index.d.mts +1 -0
  95. package/dist/esm/management/api/errors/index.mjs +1 -0
  96. package/dist/esm/management/api/requests/requests.d.mts +185 -10
  97. package/dist/esm/management/api/resources/actions/client/Client.d.mts +3 -0
  98. package/dist/esm/management/api/resources/actions/client/Client.mjs +5 -0
  99. package/dist/esm/management/api/resources/actions/resources/index.d.mts +1 -0
  100. package/dist/esm/management/api/resources/actions/resources/index.mjs +1 -0
  101. package/dist/esm/management/api/resources/actions/resources/modules/client/Client.d.mts +149 -0
  102. package/dist/esm/management/api/resources/actions/resources/modules/client/Client.mjs +532 -0
  103. package/dist/esm/management/api/resources/actions/resources/modules/client/index.d.mts +1 -0
  104. package/dist/esm/management/api/resources/actions/resources/modules/client/index.mjs +1 -0
  105. package/dist/esm/management/api/resources/actions/resources/modules/index.d.mts +2 -0
  106. package/dist/esm/management/api/resources/actions/resources/modules/index.mjs +2 -0
  107. package/dist/esm/management/api/resources/actions/resources/modules/resources/index.d.mts +1 -0
  108. package/dist/esm/management/api/resources/actions/resources/modules/resources/index.mjs +1 -0
  109. package/dist/esm/management/api/resources/actions/resources/modules/resources/versions/client/Client.d.mts +66 -0
  110. package/dist/esm/management/api/resources/actions/resources/modules/resources/versions/client/Client.mjs +215 -0
  111. package/dist/esm/management/api/resources/actions/resources/modules/resources/versions/client/index.d.mts +1 -0
  112. package/dist/esm/management/api/resources/actions/resources/modules/resources/versions/client/index.mjs +1 -0
  113. package/dist/esm/management/api/resources/actions/resources/modules/resources/versions/index.d.mts +1 -0
  114. package/dist/esm/management/api/resources/actions/resources/modules/resources/versions/index.mjs +1 -0
  115. package/dist/esm/management/api/resources/clientGrants/client/Client.d.mts +17 -0
  116. package/dist/esm/management/api/resources/clientGrants/client/Client.mjs +61 -0
  117. package/dist/esm/management/api/resources/connections/client/Client.d.mts +7 -3
  118. package/dist/esm/management/api/resources/connections/client/Client.mjs +9 -5
  119. package/dist/esm/management/api/resources/connections/resources/directoryProvisioning/client/Client.d.mts +18 -0
  120. package/dist/esm/management/api/resources/connections/resources/directoryProvisioning/client/Client.mjs +80 -0
  121. package/dist/esm/management/api/resources/deviceCredentials/client/Client.d.mts +1 -0
  122. package/dist/esm/management/api/resources/deviceCredentials/client/Client.mjs +2 -1
  123. package/dist/esm/management/api/resources/eventStreams/client/Client.d.mts +1 -2
  124. package/dist/esm/management/api/resources/eventStreams/client/Client.mjs +59 -50
  125. package/dist/esm/management/api/resources/flows/index.d.mts +1 -0
  126. package/dist/esm/management/api/resources/flows/index.mjs +1 -0
  127. package/dist/esm/management/api/resources/flows/resources/executions/index.d.mts +1 -0
  128. package/dist/esm/management/api/resources/flows/resources/executions/index.mjs +1 -0
  129. package/dist/esm/management/api/resources/flows/resources/executions/types/index.d.mts +1 -0
  130. package/dist/esm/management/api/resources/flows/resources/executions/types/index.mjs +1 -0
  131. package/dist/esm/management/api/resources/flows/resources/executions/types/types.d.mts +4 -0
  132. package/dist/esm/management/api/resources/flows/resources/executions/types/types.mjs +4 -0
  133. package/dist/esm/management/api/resources/flows/resources/index.d.mts +1 -0
  134. package/dist/esm/management/api/resources/flows/resources/index.mjs +1 -0
  135. package/dist/esm/management/api/resources/flows/types/index.d.mts +1 -0
  136. package/dist/esm/management/api/resources/flows/types/index.mjs +1 -0
  137. package/dist/esm/management/api/resources/flows/types/types.d.mts +4 -0
  138. package/dist/esm/management/api/resources/flows/types/types.mjs +4 -0
  139. package/dist/esm/management/api/resources/groups/client/Client.d.mts +56 -0
  140. package/dist/esm/management/api/resources/groups/client/Client.mjs +187 -0
  141. package/dist/esm/management/api/resources/groups/client/index.d.mts +1 -0
  142. package/dist/esm/management/api/resources/groups/client/index.mjs +1 -0
  143. package/dist/esm/management/api/resources/groups/index.d.mts +2 -0
  144. package/dist/esm/management/api/resources/groups/index.mjs +2 -0
  145. package/dist/esm/management/api/resources/groups/resources/index.d.mts +1 -0
  146. package/dist/esm/management/api/resources/groups/resources/index.mjs +1 -0
  147. package/dist/esm/management/api/resources/groups/resources/members/client/Client.d.mts +34 -0
  148. package/dist/esm/management/api/resources/groups/resources/members/client/Client.mjs +111 -0
  149. package/dist/esm/management/api/resources/groups/resources/members/client/index.d.mts +1 -0
  150. package/dist/esm/management/api/resources/groups/resources/members/client/index.mjs +1 -0
  151. package/dist/esm/management/api/resources/groups/resources/members/index.d.mts +1 -0
  152. package/dist/esm/management/api/resources/groups/resources/members/index.mjs +1 -0
  153. package/dist/esm/management/api/resources/index.d.mts +2 -0
  154. package/dist/esm/management/api/resources/index.mjs +2 -0
  155. package/dist/esm/management/api/resources/organizations/resources/discoveryDomains/client/Client.d.mts +20 -1
  156. package/dist/esm/management/api/resources/organizations/resources/discoveryDomains/client/Client.mjs +66 -1
  157. package/dist/esm/management/api/resources/prompts/resources/rendering/client/Client.d.mts +1 -1
  158. package/dist/esm/management/api/resources/refreshTokens/client/Client.d.mts +18 -0
  159. package/dist/esm/management/api/resources/refreshTokens/client/Client.mjs +67 -0
  160. package/dist/esm/management/api/resources/roles/client/Client.d.mts +1 -0
  161. package/dist/esm/management/api/resources/roles/client/Client.mjs +3 -0
  162. package/dist/esm/management/api/resources/tokenExchangeProfiles/client/Client.d.mts +2 -1
  163. package/dist/esm/management/api/resources/tokenExchangeProfiles/client/Client.mjs +3 -2
  164. package/dist/esm/management/api/resources/users/client/Client.d.mts +3 -0
  165. package/dist/esm/management/api/resources/users/client/Client.mjs +5 -0
  166. package/dist/esm/management/api/resources/users/resources/groups/client/Client.d.mts +34 -0
  167. package/dist/esm/management/api/resources/users/resources/groups/client/Client.mjs +111 -0
  168. package/dist/esm/management/api/resources/users/resources/groups/client/index.d.mts +1 -0
  169. package/dist/esm/management/api/resources/users/resources/groups/client/index.mjs +1 -0
  170. package/dist/esm/management/api/resources/users/resources/groups/index.d.mts +1 -0
  171. package/dist/esm/management/api/resources/users/resources/groups/index.mjs +1 -0
  172. package/dist/esm/management/api/resources/users/resources/index.d.mts +1 -0
  173. package/dist/esm/management/api/resources/users/resources/index.mjs +1 -0
  174. package/dist/esm/management/api/types/types.d.mts +4374 -959
  175. package/dist/esm/management/api/types/types.mjs +1705 -7
  176. package/dist/esm/management/version.d.mts +1 -1
  177. package/dist/esm/management/version.mjs +1 -1
  178. package/package.json +1 -1
  179. package/reference.md +1547 -186
@@ -0,0 +1,66 @@
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 VersionsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class VersionsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<VersionsClient.Options>;
12
+ constructor(options: VersionsClient.Options);
13
+ /**
14
+ * List all published versions of a specific Actions Module.
15
+ *
16
+ * @param {string} id - The unique ID of the module.
17
+ * @param {VersionsClient.RequestOptions} requestOptions - Request-specific configuration.
18
+ *
19
+ * @throws {@link Management.BadRequestError}
20
+ * @throws {@link Management.UnauthorizedError}
21
+ * @throws {@link Management.ForbiddenError}
22
+ * @throws {@link Management.NotFoundError}
23
+ * @throws {@link Management.TooManyRequestsError}
24
+ *
25
+ * @example
26
+ * await client.actions.modules.versions.list("id")
27
+ */
28
+ list(id: string, requestOptions?: VersionsClient.RequestOptions): core.HttpResponsePromise<Management.GetActionModuleVersionsResponseContent>;
29
+ private __list;
30
+ /**
31
+ * Creates a new immutable version of an Actions Module from the current draft version. This publishes the draft as a new version that can be referenced by actions, while maintaining the existing draft for continued development.
32
+ *
33
+ * @param {string} id - The ID of the action module to create a version for.
34
+ * @param {VersionsClient.RequestOptions} requestOptions - Request-specific configuration.
35
+ *
36
+ * @throws {@link Management.BadRequestError}
37
+ * @throws {@link Management.UnauthorizedError}
38
+ * @throws {@link Management.ForbiddenError}
39
+ * @throws {@link Management.NotFoundError}
40
+ * @throws {@link Management.ConflictError}
41
+ * @throws {@link Management.PreconditionFailedError}
42
+ *
43
+ * @example
44
+ * await client.actions.modules.versions.create("id")
45
+ */
46
+ create(id: string, requestOptions?: VersionsClient.RequestOptions): core.HttpResponsePromise<Management.CreateActionModuleVersionResponseContent>;
47
+ private __create;
48
+ /**
49
+ * Retrieve the details of a specific, immutable version of an Actions Module.
50
+ *
51
+ * @param {string} id - The unique ID of the module.
52
+ * @param {string} versionId - The unique ID of the module version to retrieve.
53
+ * @param {VersionsClient.RequestOptions} requestOptions - Request-specific configuration.
54
+ *
55
+ * @throws {@link Management.BadRequestError}
56
+ * @throws {@link Management.UnauthorizedError}
57
+ * @throws {@link Management.ForbiddenError}
58
+ * @throws {@link Management.NotFoundError}
59
+ * @throws {@link Management.TooManyRequestsError}
60
+ *
61
+ * @example
62
+ * await client.actions.modules.versions.get("id", "versionId")
63
+ */
64
+ get(id: string, versionId: string, requestOptions?: VersionsClient.RequestOptions): core.HttpResponsePromise<Management.GetActionModuleVersionResponseContent>;
65
+ private __get;
66
+ }
@@ -0,0 +1,252 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.VersionsClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../../../../../BaseClient.js");
48
+ const core = __importStar(require("../../../../../../../../core/index.js"));
49
+ const headers_js_1 = require("../../../../../../../../core/headers.js");
50
+ const environments = __importStar(require("../../../../../../../../environments.js"));
51
+ const handleNonStatusCodeError_js_1 = require("../../../../../../../../errors/handleNonStatusCodeError.js");
52
+ const errors = __importStar(require("../../../../../../../../errors/index.js"));
53
+ const Management = __importStar(require("../../../../../../../index.js"));
54
+ class VersionsClient {
55
+ constructor(options) {
56
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
+ }
58
+ /**
59
+ * List all published versions of a specific Actions Module.
60
+ *
61
+ * @param {string} id - The unique ID of the module.
62
+ * @param {VersionsClient.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @throws {@link Management.BadRequestError}
65
+ * @throws {@link Management.UnauthorizedError}
66
+ * @throws {@link Management.ForbiddenError}
67
+ * @throws {@link Management.NotFoundError}
68
+ * @throws {@link Management.TooManyRequestsError}
69
+ *
70
+ * @example
71
+ * await client.actions.modules.versions.list("id")
72
+ */
73
+ list(id, requestOptions) {
74
+ return core.HttpResponsePromise.fromPromise(this.__list(id, requestOptions));
75
+ }
76
+ __list(id, requestOptions) {
77
+ return __awaiter(this, void 0, void 0, function* () {
78
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
79
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
80
+ 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);
81
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
82
+ 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, `actions/modules/${core.url.encodePathParam(id)}/versions`),
83
+ method: "GET",
84
+ headers: _headers,
85
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
86
+ 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,
87
+ 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,
88
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
89
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
90
+ logging: this._options.logging,
91
+ });
92
+ if (_response.ok) {
93
+ return {
94
+ data: _response.body,
95
+ rawResponse: _response.rawResponse,
96
+ };
97
+ }
98
+ if (_response.error.reason === "status-code") {
99
+ switch (_response.error.statusCode) {
100
+ case 400:
101
+ throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
102
+ case 401:
103
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
104
+ case 403:
105
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
106
+ case 404:
107
+ throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
108
+ case 429:
109
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
110
+ default:
111
+ throw new errors.ManagementError({
112
+ statusCode: _response.error.statusCode,
113
+ body: _response.error.body,
114
+ rawResponse: _response.rawResponse,
115
+ });
116
+ }
117
+ }
118
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/actions/modules/{id}/versions");
119
+ });
120
+ }
121
+ /**
122
+ * Creates a new immutable version of an Actions Module from the current draft version. This publishes the draft as a new version that can be referenced by actions, while maintaining the existing draft for continued development.
123
+ *
124
+ * @param {string} id - The ID of the action module to create a version for.
125
+ * @param {VersionsClient.RequestOptions} requestOptions - Request-specific configuration.
126
+ *
127
+ * @throws {@link Management.BadRequestError}
128
+ * @throws {@link Management.UnauthorizedError}
129
+ * @throws {@link Management.ForbiddenError}
130
+ * @throws {@link Management.NotFoundError}
131
+ * @throws {@link Management.ConflictError}
132
+ * @throws {@link Management.PreconditionFailedError}
133
+ *
134
+ * @example
135
+ * await client.actions.modules.versions.create("id")
136
+ */
137
+ create(id, requestOptions) {
138
+ return core.HttpResponsePromise.fromPromise(this.__create(id, requestOptions));
139
+ }
140
+ __create(id, requestOptions) {
141
+ return __awaiter(this, void 0, void 0, function* () {
142
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
143
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
144
+ 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);
145
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
146
+ 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, `actions/modules/${core.url.encodePathParam(id)}/versions`),
147
+ method: "POST",
148
+ headers: _headers,
149
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
150
+ 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,
151
+ 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,
152
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
153
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
154
+ logging: this._options.logging,
155
+ });
156
+ if (_response.ok) {
157
+ return {
158
+ data: _response.body,
159
+ rawResponse: _response.rawResponse,
160
+ };
161
+ }
162
+ if (_response.error.reason === "status-code") {
163
+ switch (_response.error.statusCode) {
164
+ case 400:
165
+ throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
166
+ case 401:
167
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
168
+ case 403:
169
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
170
+ case 404:
171
+ throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
172
+ case 409:
173
+ throw new Management.ConflictError(_response.error.body, _response.rawResponse);
174
+ case 412:
175
+ throw new Management.PreconditionFailedError(_response.error.body, _response.rawResponse);
176
+ default:
177
+ throw new errors.ManagementError({
178
+ statusCode: _response.error.statusCode,
179
+ body: _response.error.body,
180
+ rawResponse: _response.rawResponse,
181
+ });
182
+ }
183
+ }
184
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/actions/modules/{id}/versions");
185
+ });
186
+ }
187
+ /**
188
+ * Retrieve the details of a specific, immutable version of an Actions Module.
189
+ *
190
+ * @param {string} id - The unique ID of the module.
191
+ * @param {string} versionId - The unique ID of the module version to retrieve.
192
+ * @param {VersionsClient.RequestOptions} requestOptions - Request-specific configuration.
193
+ *
194
+ * @throws {@link Management.BadRequestError}
195
+ * @throws {@link Management.UnauthorizedError}
196
+ * @throws {@link Management.ForbiddenError}
197
+ * @throws {@link Management.NotFoundError}
198
+ * @throws {@link Management.TooManyRequestsError}
199
+ *
200
+ * @example
201
+ * await client.actions.modules.versions.get("id", "versionId")
202
+ */
203
+ get(id, versionId, requestOptions) {
204
+ return core.HttpResponsePromise.fromPromise(this.__get(id, versionId, requestOptions));
205
+ }
206
+ __get(id, versionId, requestOptions) {
207
+ return __awaiter(this, void 0, void 0, function* () {
208
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
209
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
210
+ 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);
211
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
212
+ 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, `actions/modules/${core.url.encodePathParam(id)}/versions/${core.url.encodePathParam(versionId)}`),
213
+ method: "GET",
214
+ headers: _headers,
215
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
216
+ 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,
217
+ 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,
218
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
219
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
220
+ logging: this._options.logging,
221
+ });
222
+ if (_response.ok) {
223
+ return {
224
+ data: _response.body,
225
+ rawResponse: _response.rawResponse,
226
+ };
227
+ }
228
+ if (_response.error.reason === "status-code") {
229
+ switch (_response.error.statusCode) {
230
+ case 400:
231
+ throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
232
+ case 401:
233
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
234
+ case 403:
235
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
236
+ case 404:
237
+ throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
238
+ case 429:
239
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
240
+ default:
241
+ throw new errors.ManagementError({
242
+ statusCode: _response.error.statusCode,
243
+ body: _response.error.body,
244
+ rawResponse: _response.rawResponse,
245
+ });
246
+ }
247
+ }
248
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/actions/modules/{id}/versions/{versionId}");
249
+ });
250
+ }
251
+ }
252
+ exports.VersionsClient = VersionsClient;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
@@ -55,6 +55,23 @@ export declare class ClientGrantsClient {
55
55
  */
56
56
  create(request: Management.CreateClientGrantRequestContent, requestOptions?: ClientGrantsClient.RequestOptions): core.HttpResponsePromise<Management.CreateClientGrantResponseContent>;
57
57
  private __create;
58
+ /**
59
+ * Retrieve a single <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grant</a>, including the
60
+ * scopes associated with the application/API pair.
61
+ *
62
+ * @param {string} id - The ID of the client grant to retrieve.
63
+ * @param {ClientGrantsClient.RequestOptions} requestOptions - Request-specific configuration.
64
+ *
65
+ * @throws {@link Management.UnauthorizedError}
66
+ * @throws {@link Management.ForbiddenError}
67
+ * @throws {@link Management.NotFoundError}
68
+ * @throws {@link Management.TooManyRequestsError}
69
+ *
70
+ * @example
71
+ * await client.clientGrants.get("id")
72
+ */
73
+ get(id: string, requestOptions?: ClientGrantsClient.RequestOptions): core.HttpResponsePromise<Management.GetClientGrantResponseContent>;
74
+ private __get;
58
75
  /**
59
76
  * Delete the <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a> from your machine-to-machine application.
60
77
  *
@@ -225,6 +225,67 @@ class ClientGrantsClient {
225
225
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/client-grants");
226
226
  });
227
227
  }
228
+ /**
229
+ * Retrieve a single <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grant</a>, including the
230
+ * scopes associated with the application/API pair.
231
+ *
232
+ * @param {string} id - The ID of the client grant to retrieve.
233
+ * @param {ClientGrantsClient.RequestOptions} requestOptions - Request-specific configuration.
234
+ *
235
+ * @throws {@link Management.UnauthorizedError}
236
+ * @throws {@link Management.ForbiddenError}
237
+ * @throws {@link Management.NotFoundError}
238
+ * @throws {@link Management.TooManyRequestsError}
239
+ *
240
+ * @example
241
+ * await client.clientGrants.get("id")
242
+ */
243
+ get(id, requestOptions) {
244
+ return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));
245
+ }
246
+ __get(id, 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 = (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);
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, `client-grants/${core.url.encodePathParam(id)}`),
253
+ method: "GET",
254
+ headers: _headers,
255
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
256
+ 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,
257
+ 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,
258
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
259
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
260
+ logging: this._options.logging,
261
+ });
262
+ if (_response.ok) {
263
+ return {
264
+ data: _response.body,
265
+ rawResponse: _response.rawResponse,
266
+ };
267
+ }
268
+ if (_response.error.reason === "status-code") {
269
+ switch (_response.error.statusCode) {
270
+ case 401:
271
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
272
+ case 403:
273
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
274
+ case 404:
275
+ throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
276
+ case 429:
277
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
278
+ default:
279
+ throw new errors.ManagementError({
280
+ statusCode: _response.error.statusCode,
281
+ body: _response.error.body,
282
+ rawResponse: _response.rawResponse,
283
+ });
284
+ }
285
+ }
286
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/client-grants/{id}");
287
+ });
288
+ }
228
289
  /**
229
290
  * Delete the <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a> from your machine-to-machine application.
230
291
  *
@@ -14,14 +14,14 @@ export declare namespace ConnectionsClient {
14
14
  }
15
15
  export declare class ConnectionsClient {
16
16
  protected readonly _options: NormalizedClientOptionsWithAuth<ConnectionsClient.Options>;
17
- protected _clients: ClientsClient | undefined;
18
17
  protected _directoryProvisioning: DirectoryProvisioningClient | undefined;
18
+ protected _clients: ClientsClient | undefined;
19
19
  protected _keys: KeysClient | undefined;
20
20
  protected _scimConfiguration: ScimConfigurationClient | undefined;
21
21
  protected _users: UsersClient | undefined;
22
22
  constructor(options: ConnectionsClient.Options);
23
- get clients(): ClientsClient;
24
23
  get directoryProvisioning(): DirectoryProvisioningClient;
24
+ get clients(): ClientsClient;
25
25
  get keys(): KeysClient;
26
26
  get scimConfiguration(): ScimConfigurationClient;
27
27
  get users(): UsersClient;
@@ -65,7 +65,9 @@ export declare class ConnectionsClient {
65
65
  */
66
66
  list(request?: Management.ListConnectionsQueryParameters, requestOptions?: ConnectionsClient.RequestOptions): Promise<core.Page<Management.ConnectionForList, Management.ListConnectionsCheckpointPaginatedResponseContent>>;
67
67
  /**
68
- * Creates a new connection according to the JSON object received in <code>body</code>.<br/>
68
+ * Creates a new connection according to the JSON object received in <code>body</code>.
69
+ *
70
+ * <b>Note:</b> If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results.
69
71
  *
70
72
  * @param {Management.CreateConnectionRequestContent} request
71
73
  * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -108,6 +110,8 @@ export declare class ConnectionsClient {
108
110
  /**
109
111
  * Removes a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate.
110
112
  *
113
+ * <b>Note:</b> If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent <a href="https://auth0.com/docs/api/management/v2/connections/post-connections">create connection</a> requests, if they use an identical connection name.
114
+ *
111
115
  * @param {string} id - The id of the connection to delete
112
116
  * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
113
117
  *
@@ -60,14 +60,14 @@ class ConnectionsClient {
60
60
  constructor(options) {
61
61
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
62
62
  }
63
- get clients() {
64
- var _a;
65
- return ((_a = this._clients) !== null && _a !== void 0 ? _a : (this._clients = new Client_js_1.ClientsClient(this._options)));
66
- }
67
63
  get directoryProvisioning() {
68
64
  var _a;
69
65
  return ((_a = this._directoryProvisioning) !== null && _a !== void 0 ? _a : (this._directoryProvisioning = new Client_js_2.DirectoryProvisioningClient(this._options)));
70
66
  }
67
+ get clients() {
68
+ var _a;
69
+ return ((_a = this._clients) !== null && _a !== void 0 ? _a : (this._clients = new Client_js_1.ClientsClient(this._options)));
70
+ }
71
71
  get keys() {
72
72
  var _a;
73
73
  return ((_a = this._keys) !== null && _a !== void 0 ? _a : (this._keys = new Client_js_3.KeysClient(this._options)));
@@ -199,7 +199,9 @@ class ConnectionsClient {
199
199
  });
200
200
  }
201
201
  /**
202
- * Creates a new connection according to the JSON object received in <code>body</code>.<br/>
202
+ * Creates a new connection according to the JSON object received in <code>body</code>.
203
+ *
204
+ * <b>Note:</b> If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results.
203
205
  *
204
206
  * @param {Management.CreateConnectionRequestContent} request
205
207
  * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -345,6 +347,8 @@ class ConnectionsClient {
345
347
  /**
346
348
  * Removes a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate.
347
349
  *
350
+ * <b>Note:</b> If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent <a href="https://auth0.com/docs/api/management/v2/connections/post-connections">create connection</a> requests, if they use an identical connection name.
351
+ *
348
352
  * @param {string} id - The id of the connection to delete
349
353
  * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
350
354
  *
@@ -13,6 +13,24 @@ export declare class DirectoryProvisioningClient {
13
13
  protected _synchronizations: SynchronizationsClient | undefined;
14
14
  constructor(options: DirectoryProvisioningClient.Options);
15
15
  get synchronizations(): SynchronizationsClient;
16
+ /**
17
+ * Retrieve a list of directory provisioning configurations of a tenant.
18
+ *
19
+ * @param {Management.ListDirectoryProvisioningsRequestParameters} request
20
+ * @param {DirectoryProvisioningClient.RequestOptions} requestOptions - Request-specific configuration.
21
+ *
22
+ * @throws {@link Management.BadRequestError}
23
+ * @throws {@link Management.UnauthorizedError}
24
+ * @throws {@link Management.ForbiddenError}
25
+ * @throws {@link Management.TooManyRequestsError}
26
+ *
27
+ * @example
28
+ * await client.connections.directoryProvisioning.list({
29
+ * from: "from",
30
+ * take: 1
31
+ * })
32
+ */
33
+ list(request?: Management.ListDirectoryProvisioningsRequestParameters, requestOptions?: DirectoryProvisioningClient.RequestOptions): Promise<core.Page<Management.DirectoryProvisioning, Management.ListDirectoryProvisioningsResponseContent>>;
16
34
  /**
17
35
  * Retrieve the directory provisioning configuration of a connection.
18
36
  *
@@ -60,6 +60,86 @@ class DirectoryProvisioningClient {
60
60
  var _a;
61
61
  return ((_a = this._synchronizations) !== null && _a !== void 0 ? _a : (this._synchronizations = new Client_js_1.SynchronizationsClient(this._options)));
62
62
  }
63
+ /**
64
+ * Retrieve a list of directory provisioning configurations of a tenant.
65
+ *
66
+ * @param {Management.ListDirectoryProvisioningsRequestParameters} request
67
+ * @param {DirectoryProvisioningClient.RequestOptions} requestOptions - Request-specific configuration.
68
+ *
69
+ * @throws {@link Management.BadRequestError}
70
+ * @throws {@link Management.UnauthorizedError}
71
+ * @throws {@link Management.ForbiddenError}
72
+ * @throws {@link Management.TooManyRequestsError}
73
+ *
74
+ * @example
75
+ * await client.connections.directoryProvisioning.list({
76
+ * from: "from",
77
+ * take: 1
78
+ * })
79
+ */
80
+ list() {
81
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
82
+ const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
83
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
84
+ const { from: from_, take = 50 } = request;
85
+ const _queryParams = {};
86
+ if (from_ !== undefined) {
87
+ _queryParams["from"] = from_;
88
+ }
89
+ if (take !== undefined) {
90
+ _queryParams["take"] = (_a = take === null || take === void 0 ? void 0 : take.toString()) !== null && _a !== void 0 ? _a : null;
91
+ }
92
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
93
+ let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
94
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
95
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ManagementEnvironment.Default, "connections-directory-provisionings"),
96
+ method: "GET",
97
+ headers: _headers,
98
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
99
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
100
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
101
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
102
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
103
+ logging: this._options.logging,
104
+ });
105
+ if (_response.ok) {
106
+ return {
107
+ data: _response.body,
108
+ rawResponse: _response.rawResponse,
109
+ };
110
+ }
111
+ if (_response.error.reason === "status-code") {
112
+ switch (_response.error.statusCode) {
113
+ case 400:
114
+ throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
115
+ case 401:
116
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
117
+ case 403:
118
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
119
+ case 429:
120
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
121
+ default:
122
+ throw new errors.ManagementError({
123
+ statusCode: _response.error.statusCode,
124
+ body: _response.error.body,
125
+ rawResponse: _response.rawResponse,
126
+ });
127
+ }
128
+ }
129
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/connections-directory-provisionings");
130
+ }));
131
+ const dataWithRawResponse = yield list(request).withRawResponse();
132
+ return new core.Page({
133
+ response: dataWithRawResponse.data,
134
+ rawResponse: dataWithRawResponse.rawResponse,
135
+ 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) === ""),
136
+ getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.directory_provisionings) !== null && _a !== void 0 ? _a : []; },
137
+ loadPage: (response) => {
138
+ return list(core.setObjectProperty(request, "from", response === null || response === void 0 ? void 0 : response.next));
139
+ },
140
+ });
141
+ });
142
+ }
63
143
  /**
64
144
  * Retrieve the directory provisioning configuration of a connection.
65
145
  *
@@ -51,6 +51,7 @@ export declare class DeviceCredentialsClient {
51
51
  * @example
52
52
  * await client.deviceCredentials.createPublicKey({
53
53
  * device_name: "device_name",
54
+ * type: "public_key",
54
55
  * value: "value",
55
56
  * device_id: "device_id"
56
57
  * })