auth0 5.2.0 → 5.3.1

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 (165) 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 +212 -134
  9. package/dist/cjs/management/api/requests/requests.js +0 -108
  10. package/dist/cjs/management/api/resources/actions/client/Client.d.ts +3 -0
  11. package/dist/cjs/management/api/resources/actions/client/Client.js +9 -4
  12. package/dist/cjs/management/api/resources/actions/resources/index.d.ts +1 -0
  13. package/dist/cjs/management/api/resources/actions/resources/index.js +2 -1
  14. package/dist/cjs/management/api/resources/actions/resources/modules/client/Client.d.ts +149 -0
  15. package/dist/cjs/management/api/resources/actions/resources/modules/client/Client.js +569 -0
  16. package/dist/cjs/management/api/resources/actions/resources/modules/client/index.d.ts +1 -0
  17. package/dist/cjs/management/api/resources/actions/resources/modules/client/index.js +2 -0
  18. package/dist/cjs/management/api/resources/actions/resources/modules/index.d.ts +2 -0
  19. package/dist/cjs/management/api/resources/actions/resources/modules/index.js +18 -0
  20. package/dist/cjs/management/api/resources/actions/resources/modules/resources/index.d.ts +1 -0
  21. package/dist/cjs/management/api/resources/actions/resources/modules/resources/index.js +37 -0
  22. package/dist/cjs/management/api/resources/actions/resources/modules/resources/versions/client/Client.d.ts +69 -0
  23. package/dist/cjs/management/api/resources/actions/resources/modules/resources/versions/client/Client.js +275 -0
  24. package/dist/cjs/management/api/resources/actions/resources/modules/resources/versions/client/index.d.ts +1 -0
  25. package/dist/cjs/management/api/resources/actions/resources/modules/resources/versions/client/index.js +2 -0
  26. package/dist/cjs/management/api/resources/actions/resources/modules/resources/versions/index.d.ts +1 -0
  27. package/dist/cjs/management/api/resources/actions/resources/modules/resources/versions/index.js +17 -0
  28. package/dist/cjs/management/api/resources/actions/resources/versions/client/Client.d.ts +2 -2
  29. package/dist/cjs/management/api/resources/actions/resources/versions/client/Client.js +1 -1
  30. package/dist/cjs/management/api/resources/clientGrants/client/Client.d.ts +17 -0
  31. package/dist/cjs/management/api/resources/clientGrants/client/Client.js +61 -0
  32. package/dist/cjs/management/api/resources/connections/client/Client.d.ts +7 -3
  33. package/dist/cjs/management/api/resources/connections/client/Client.js +9 -5
  34. package/dist/cjs/management/api/resources/connections/resources/directoryProvisioning/client/Client.d.ts +18 -0
  35. package/dist/cjs/management/api/resources/connections/resources/directoryProvisioning/client/Client.js +80 -0
  36. package/dist/cjs/management/api/resources/deviceCredentials/client/Client.d.ts +1 -0
  37. package/dist/cjs/management/api/resources/deviceCredentials/client/Client.js +2 -1
  38. package/dist/cjs/management/api/resources/eventStreams/client/Client.d.ts +1 -2
  39. package/dist/cjs/management/api/resources/eventStreams/client/Client.js +59 -50
  40. package/dist/cjs/management/api/resources/flows/client/Client.d.ts +2 -2
  41. package/dist/cjs/management/api/resources/flows/client/Client.js +1 -1
  42. package/dist/cjs/management/api/resources/flows/resources/executions/client/Client.d.ts +4 -4
  43. package/dist/cjs/management/api/resources/flows/resources/executions/client/Client.js +2 -2
  44. package/dist/cjs/management/api/resources/groups/client/Client.d.ts +56 -0
  45. package/dist/cjs/management/api/resources/groups/client/Client.js +224 -0
  46. package/dist/cjs/management/api/resources/groups/client/index.d.ts +1 -0
  47. package/dist/cjs/management/api/resources/groups/client/index.js +2 -0
  48. package/dist/cjs/management/api/resources/groups/index.d.ts +2 -0
  49. package/dist/cjs/management/api/resources/groups/index.js +18 -0
  50. package/dist/cjs/management/api/resources/groups/resources/index.d.ts +1 -0
  51. package/dist/cjs/management/api/resources/groups/resources/index.js +37 -0
  52. package/dist/cjs/management/api/resources/groups/resources/members/client/Client.d.ts +34 -0
  53. package/dist/cjs/management/api/resources/groups/resources/members/client/Client.js +148 -0
  54. package/dist/cjs/management/api/resources/groups/resources/members/client/index.d.ts +1 -0
  55. package/dist/cjs/management/api/resources/groups/resources/members/client/index.js +2 -0
  56. package/dist/cjs/management/api/resources/groups/resources/members/index.d.ts +1 -0
  57. package/dist/cjs/management/api/resources/groups/resources/members/index.js +17 -0
  58. package/dist/cjs/management/api/resources/index.d.ts +1 -0
  59. package/dist/cjs/management/api/resources/index.js +2 -1
  60. package/dist/cjs/management/api/resources/organizations/resources/discoveryDomains/client/Client.d.ts +20 -1
  61. package/dist/cjs/management/api/resources/organizations/resources/discoveryDomains/client/Client.js +66 -1
  62. package/dist/cjs/management/api/resources/prompts/resources/rendering/client/Client.d.ts +1 -1
  63. package/dist/cjs/management/api/resources/refreshTokens/client/Client.d.ts +18 -0
  64. package/dist/cjs/management/api/resources/refreshTokens/client/Client.js +67 -0
  65. package/dist/cjs/management/api/resources/roles/client/Client.d.ts +1 -0
  66. package/dist/cjs/management/api/resources/roles/client/Client.js +3 -0
  67. package/dist/cjs/management/api/resources/tokenExchangeProfiles/client/Client.d.ts +2 -1
  68. package/dist/cjs/management/api/resources/tokenExchangeProfiles/client/Client.js +3 -2
  69. package/dist/cjs/management/api/resources/users/client/Client.d.ts +3 -0
  70. package/dist/cjs/management/api/resources/users/client/Client.js +23 -18
  71. package/dist/cjs/management/api/resources/users/resources/groups/client/Client.d.ts +34 -0
  72. package/dist/cjs/management/api/resources/users/resources/groups/client/Client.js +148 -0
  73. package/dist/cjs/management/api/resources/users/resources/groups/client/index.d.ts +1 -0
  74. package/dist/cjs/management/api/resources/users/resources/groups/client/index.js +2 -0
  75. package/dist/cjs/management/api/resources/users/resources/groups/index.d.ts +1 -0
  76. package/dist/cjs/management/api/resources/users/resources/groups/index.js +17 -0
  77. package/dist/cjs/management/api/resources/users/resources/index.d.ts +1 -0
  78. package/dist/cjs/management/api/resources/users/resources/index.js +2 -1
  79. package/dist/cjs/management/api/types/types.d.ts +5277 -1396
  80. package/dist/cjs/management/api/types/types.js +2143 -442
  81. package/dist/cjs/management/version.d.ts +1 -1
  82. package/dist/cjs/management/version.js +1 -1
  83. package/dist/esm/management/Client.d.mts +3 -0
  84. package/dist/esm/management/Client.mjs +5 -0
  85. package/dist/esm/management/api/errors/PreconditionFailedError.d.mts +5 -0
  86. package/dist/esm/management/api/errors/PreconditionFailedError.mjs +17 -0
  87. package/dist/esm/management/api/errors/index.d.mts +1 -0
  88. package/dist/esm/management/api/errors/index.mjs +1 -0
  89. package/dist/esm/management/api/requests/requests.d.mts +212 -134
  90. package/dist/esm/management/api/requests/requests.mjs +1 -107
  91. package/dist/esm/management/api/resources/actions/client/Client.d.mts +3 -0
  92. package/dist/esm/management/api/resources/actions/client/Client.mjs +5 -0
  93. package/dist/esm/management/api/resources/actions/resources/index.d.mts +1 -0
  94. package/dist/esm/management/api/resources/actions/resources/index.mjs +1 -0
  95. package/dist/esm/management/api/resources/actions/resources/modules/client/Client.d.mts +149 -0
  96. package/dist/esm/management/api/resources/actions/resources/modules/client/Client.mjs +532 -0
  97. package/dist/esm/management/api/resources/actions/resources/modules/client/index.d.mts +1 -0
  98. package/dist/esm/management/api/resources/actions/resources/modules/client/index.mjs +1 -0
  99. package/dist/esm/management/api/resources/actions/resources/modules/index.d.mts +2 -0
  100. package/dist/esm/management/api/resources/actions/resources/modules/index.mjs +2 -0
  101. package/dist/esm/management/api/resources/actions/resources/modules/resources/index.d.mts +1 -0
  102. package/dist/esm/management/api/resources/actions/resources/modules/resources/index.mjs +1 -0
  103. package/dist/esm/management/api/resources/actions/resources/modules/resources/versions/client/Client.d.mts +69 -0
  104. package/dist/esm/management/api/resources/actions/resources/modules/resources/versions/client/Client.mjs +238 -0
  105. package/dist/esm/management/api/resources/actions/resources/modules/resources/versions/client/index.d.mts +1 -0
  106. package/dist/esm/management/api/resources/actions/resources/modules/resources/versions/client/index.mjs +1 -0
  107. package/dist/esm/management/api/resources/actions/resources/modules/resources/versions/index.d.mts +1 -0
  108. package/dist/esm/management/api/resources/actions/resources/modules/resources/versions/index.mjs +1 -0
  109. package/dist/esm/management/api/resources/actions/resources/versions/client/Client.d.mts +2 -2
  110. package/dist/esm/management/api/resources/actions/resources/versions/client/Client.mjs +1 -1
  111. package/dist/esm/management/api/resources/clientGrants/client/Client.d.mts +17 -0
  112. package/dist/esm/management/api/resources/clientGrants/client/Client.mjs +61 -0
  113. package/dist/esm/management/api/resources/connections/client/Client.d.mts +7 -3
  114. package/dist/esm/management/api/resources/connections/client/Client.mjs +9 -5
  115. package/dist/esm/management/api/resources/connections/resources/directoryProvisioning/client/Client.d.mts +18 -0
  116. package/dist/esm/management/api/resources/connections/resources/directoryProvisioning/client/Client.mjs +80 -0
  117. package/dist/esm/management/api/resources/deviceCredentials/client/Client.d.mts +1 -0
  118. package/dist/esm/management/api/resources/deviceCredentials/client/Client.mjs +2 -1
  119. package/dist/esm/management/api/resources/eventStreams/client/Client.d.mts +1 -2
  120. package/dist/esm/management/api/resources/eventStreams/client/Client.mjs +59 -50
  121. package/dist/esm/management/api/resources/flows/client/Client.d.mts +2 -2
  122. package/dist/esm/management/api/resources/flows/client/Client.mjs +1 -1
  123. package/dist/esm/management/api/resources/flows/resources/executions/client/Client.d.mts +4 -4
  124. package/dist/esm/management/api/resources/flows/resources/executions/client/Client.mjs +2 -2
  125. package/dist/esm/management/api/resources/groups/client/Client.d.mts +56 -0
  126. package/dist/esm/management/api/resources/groups/client/Client.mjs +187 -0
  127. package/dist/esm/management/api/resources/groups/client/index.d.mts +1 -0
  128. package/dist/esm/management/api/resources/groups/client/index.mjs +1 -0
  129. package/dist/esm/management/api/resources/groups/index.d.mts +2 -0
  130. package/dist/esm/management/api/resources/groups/index.mjs +2 -0
  131. package/dist/esm/management/api/resources/groups/resources/index.d.mts +1 -0
  132. package/dist/esm/management/api/resources/groups/resources/index.mjs +1 -0
  133. package/dist/esm/management/api/resources/groups/resources/members/client/Client.d.mts +34 -0
  134. package/dist/esm/management/api/resources/groups/resources/members/client/Client.mjs +111 -0
  135. package/dist/esm/management/api/resources/groups/resources/members/client/index.d.mts +1 -0
  136. package/dist/esm/management/api/resources/groups/resources/members/client/index.mjs +1 -0
  137. package/dist/esm/management/api/resources/groups/resources/members/index.d.mts +1 -0
  138. package/dist/esm/management/api/resources/groups/resources/members/index.mjs +1 -0
  139. package/dist/esm/management/api/resources/index.d.mts +1 -0
  140. package/dist/esm/management/api/resources/index.mjs +1 -0
  141. package/dist/esm/management/api/resources/organizations/resources/discoveryDomains/client/Client.d.mts +20 -1
  142. package/dist/esm/management/api/resources/organizations/resources/discoveryDomains/client/Client.mjs +66 -1
  143. package/dist/esm/management/api/resources/prompts/resources/rendering/client/Client.d.mts +1 -1
  144. package/dist/esm/management/api/resources/refreshTokens/client/Client.d.mts +18 -0
  145. package/dist/esm/management/api/resources/refreshTokens/client/Client.mjs +67 -0
  146. package/dist/esm/management/api/resources/roles/client/Client.d.mts +1 -0
  147. package/dist/esm/management/api/resources/roles/client/Client.mjs +3 -0
  148. package/dist/esm/management/api/resources/tokenExchangeProfiles/client/Client.d.mts +2 -1
  149. package/dist/esm/management/api/resources/tokenExchangeProfiles/client/Client.mjs +3 -2
  150. package/dist/esm/management/api/resources/users/client/Client.d.mts +3 -0
  151. package/dist/esm/management/api/resources/users/client/Client.mjs +5 -0
  152. package/dist/esm/management/api/resources/users/resources/groups/client/Client.d.mts +34 -0
  153. package/dist/esm/management/api/resources/users/resources/groups/client/Client.mjs +111 -0
  154. package/dist/esm/management/api/resources/users/resources/groups/client/index.d.mts +1 -0
  155. package/dist/esm/management/api/resources/users/resources/groups/client/index.mjs +1 -0
  156. package/dist/esm/management/api/resources/users/resources/groups/index.d.mts +1 -0
  157. package/dist/esm/management/api/resources/users/resources/groups/index.mjs +1 -0
  158. package/dist/esm/management/api/resources/users/resources/index.d.mts +1 -0
  159. package/dist/esm/management/api/resources/users/resources/index.mjs +1 -0
  160. package/dist/esm/management/api/types/types.d.mts +5277 -1396
  161. package/dist/esm/management/api/types/types.mjs +2133 -438
  162. package/dist/esm/management/version.d.mts +1 -1
  163. package/dist/esm/management/version.mjs +1 -1
  164. package/package.json +1 -1
  165. package/reference.md +1572 -185
@@ -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
  * })
@@ -178,6 +178,7 @@ class DeviceCredentialsClient {
178
178
  * @example
179
179
  * await client.deviceCredentials.createPublicKey({
180
180
  * device_name: "device_name",
181
+ * type: "public_key",
181
182
  * value: "value",
182
183
  * device_id: "device_id"
183
184
  * })
@@ -197,7 +198,7 @@ class DeviceCredentialsClient {
197
198
  contentType: "application/json",
198
199
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
199
200
  requestType: "json",
200
- body: Object.assign(Object.assign({}, request), { type: "public_key" }),
201
+ body: request,
201
202
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
202
203
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
203
204
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -31,8 +31,7 @@ export declare class EventStreamsClient {
31
31
  * take: 1
32
32
  * })
33
33
  */
34
- list(request?: Management.ListEventStreamsRequestParameters, requestOptions?: EventStreamsClient.RequestOptions): core.HttpResponsePromise<Management.EventStreamResponseContent[]>;
35
- private __list;
34
+ list(request?: Management.ListEventStreamsRequestParameters, requestOptions?: EventStreamsClient.RequestOptions): Promise<core.Page<Management.EventStreamResponseContent, Management.ListEventStreamsResponseContent>>;
36
35
  /**
37
36
  * @param {Management.EventStreamsCreateRequest} request
38
37
  * @param {EventStreamsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -80,58 +80,67 @@ class EventStreamsClient {
80
80
  * take: 1
81
81
  * })
82
82
  */
83
- list(request = {}, requestOptions) {
84
- return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
85
- }
86
- __list() {
83
+ list() {
87
84
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
88
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
89
- const { from: from_, take = 50 } = request;
90
- const _queryParams = {};
91
- if (from_ !== undefined) {
92
- _queryParams["from"] = from_;
93
- }
94
- if (take !== undefined) {
95
- _queryParams["take"] = (_a = take === null || take === void 0 ? void 0 : take.toString()) !== null && _a !== void 0 ? _a : null;
96
- }
97
- const _authRequest = yield this._options.authProvider.getAuthRequest();
98
- 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);
99
- const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
100
- 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, "event-streams"),
101
- method: "GET",
102
- headers: _headers,
103
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
104
- 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,
105
- 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,
106
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
107
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
108
- logging: this._options.logging,
109
- });
110
- if (_response.ok) {
111
- return {
112
- data: _response.body,
113
- rawResponse: _response.rawResponse,
114
- };
115
- }
116
- if (_response.error.reason === "status-code") {
117
- switch (_response.error.statusCode) {
118
- case 400:
119
- throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
120
- case 401:
121
- throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
122
- case 403:
123
- throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
124
- case 429:
125
- throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
126
- default:
127
- throw new errors.ManagementError({
128
- statusCode: _response.error.statusCode,
129
- body: _response.error.body,
130
- rawResponse: _response.rawResponse,
131
- });
85
+ const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
86
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
87
+ const { from: from_, take = 50 } = request;
88
+ const _queryParams = {};
89
+ if (from_ !== undefined) {
90
+ _queryParams["from"] = from_;
132
91
  }
133
- }
134
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/event-streams");
92
+ if (take !== undefined) {
93
+ _queryParams["take"] = (_a = take === null || take === void 0 ? void 0 : take.toString()) !== null && _a !== void 0 ? _a : null;
94
+ }
95
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
96
+ 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);
97
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
98
+ 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, "event-streams"),
99
+ method: "GET",
100
+ headers: _headers,
101
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
102
+ 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,
103
+ 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,
104
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
105
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
106
+ logging: this._options.logging,
107
+ });
108
+ if (_response.ok) {
109
+ return {
110
+ data: _response.body,
111
+ rawResponse: _response.rawResponse,
112
+ };
113
+ }
114
+ if (_response.error.reason === "status-code") {
115
+ switch (_response.error.statusCode) {
116
+ case 400:
117
+ throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
118
+ case 401:
119
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
120
+ case 403:
121
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
122
+ case 429:
123
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
124
+ default:
125
+ throw new errors.ManagementError({
126
+ statusCode: _response.error.statusCode,
127
+ body: _response.error.body,
128
+ rawResponse: _response.rawResponse,
129
+ });
130
+ }
131
+ }
132
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/event-streams");
133
+ }));
134
+ const dataWithRawResponse = yield list(request).withRawResponse();
135
+ return new core.Page({
136
+ response: dataWithRawResponse.data,
137
+ rawResponse: dataWithRawResponse.rawResponse,
138
+ 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) === ""),
139
+ getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.eventStreams) !== null && _a !== void 0 ? _a : []; },
140
+ loadPage: (response) => {
141
+ return list(core.setObjectProperty(request, "from", response === null || response === void 0 ? void 0 : response.next));
142
+ },
143
+ });
135
144
  });
136
145
  }
137
146
  /**
@@ -17,7 +17,7 @@ export declare class FlowsClient {
17
17
  get executions(): ExecutionsClient;
18
18
  get vault(): VaultClient;
19
19
  /**
20
- * @param {Management.FlowsListRequest} request
20
+ * @param {Management.ListFlowsRequestParameters} request
21
21
  * @param {FlowsClient.RequestOptions} requestOptions - Request-specific configuration.
22
22
  *
23
23
  * @throws {@link Management.BadRequestError}
@@ -33,7 +33,7 @@ export declare class FlowsClient {
33
33
  * synchronous: true
34
34
  * })
35
35
  */
36
- list(request?: Management.FlowsListRequest, requestOptions?: FlowsClient.RequestOptions): Promise<core.Page<Management.FlowSummary, Management.ListFlowsOffsetPaginatedResponseContent>>;
36
+ list(request?: Management.ListFlowsRequestParameters, requestOptions?: FlowsClient.RequestOptions): Promise<core.Page<Management.FlowSummary, Management.ListFlowsOffsetPaginatedResponseContent>>;
37
37
  /**
38
38
  * @param {Management.CreateFlowRequestContent} request
39
39
  * @param {FlowsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -66,7 +66,7 @@ class FlowsClient {
66
66
  return ((_a = this._vault) !== null && _a !== void 0 ? _a : (this._vault = new Client_js_2.VaultClient(this._options)));
67
67
  }
68
68
  /**
69
- * @param {Management.FlowsListRequest} request
69
+ * @param {Management.ListFlowsRequestParameters} request
70
70
  * @param {FlowsClient.RequestOptions} requestOptions - Request-specific configuration.
71
71
  *
72
72
  * @throws {@link Management.BadRequestError}
@@ -12,7 +12,7 @@ export declare class ExecutionsClient {
12
12
  constructor(options: ExecutionsClient.Options);
13
13
  /**
14
14
  * @param {string} flow_id - Flow id
15
- * @param {Management.ExecutionsListRequest} request
15
+ * @param {Management.ListFlowExecutionsRequestParameters} request
16
16
  * @param {ExecutionsClient.RequestOptions} requestOptions - Request-specific configuration.
17
17
  *
18
18
  * @throws {@link Management.BadRequestError}
@@ -26,11 +26,11 @@ export declare class ExecutionsClient {
26
26
  * take: 1
27
27
  * })
28
28
  */
29
- list(flow_id: string, request?: Management.ExecutionsListRequest, requestOptions?: ExecutionsClient.RequestOptions): Promise<core.Page<Management.FlowExecutionSummary, Management.ListFlowExecutionsPaginatedResponseContent>>;
29
+ list(flow_id: string, request?: Management.ListFlowExecutionsRequestParameters, requestOptions?: ExecutionsClient.RequestOptions): Promise<core.Page<Management.FlowExecutionSummary, Management.ListFlowExecutionsPaginatedResponseContent>>;
30
30
  /**
31
31
  * @param {string} flow_id - Flow id
32
32
  * @param {string} execution_id - Flow execution id
33
- * @param {Management.ExecutionsGetRequest} request
33
+ * @param {Management.GetFlowExecutionRequestParameters} request
34
34
  * @param {ExecutionsClient.RequestOptions} requestOptions - Request-specific configuration.
35
35
  *
36
36
  * @throws {@link Management.BadRequestError}
@@ -41,7 +41,7 @@ export declare class ExecutionsClient {
41
41
  * @example
42
42
  * await client.flows.executions.get("flow_id", "execution_id")
43
43
  */
44
- get(flow_id: string, execution_id: string, request?: Management.ExecutionsGetRequest, requestOptions?: ExecutionsClient.RequestOptions): core.HttpResponsePromise<Management.GetFlowExecutionResponseContent>;
44
+ get(flow_id: string, execution_id: string, request?: Management.GetFlowExecutionRequestParameters, requestOptions?: ExecutionsClient.RequestOptions): core.HttpResponsePromise<Management.GetFlowExecutionResponseContent>;
45
45
  private __get;
46
46
  /**
47
47
  * @param {string} flow_id - Flows id
@@ -57,7 +57,7 @@ class ExecutionsClient {
57
57
  }
58
58
  /**
59
59
  * @param {string} flow_id - Flow id
60
- * @param {Management.ExecutionsListRequest} request
60
+ * @param {Management.ListFlowExecutionsRequestParameters} request
61
61
  * @param {ExecutionsClient.RequestOptions} requestOptions - Request-specific configuration.
62
62
  *
63
63
  * @throws {@link Management.BadRequestError}
@@ -137,7 +137,7 @@ class ExecutionsClient {
137
137
  /**
138
138
  * @param {string} flow_id - Flow id
139
139
  * @param {string} execution_id - Flow execution id
140
- * @param {Management.ExecutionsGetRequest} request
140
+ * @param {Management.GetFlowExecutionRequestParameters} request
141
141
  * @param {ExecutionsClient.RequestOptions} requestOptions - Request-specific configuration.
142
142
  *
143
143
  * @throws {@link Management.BadRequestError}
@@ -0,0 +1,56 @@
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
+ import { MembersClient } from "../resources/members/client/Client.js";
6
+ export declare namespace GroupsClient {
7
+ type Options = BaseClientOptions;
8
+ interface RequestOptions extends BaseRequestOptions {
9
+ }
10
+ }
11
+ export declare class GroupsClient {
12
+ protected readonly _options: NormalizedClientOptionsWithAuth<GroupsClient.Options>;
13
+ protected _members: MembersClient | undefined;
14
+ constructor(options: GroupsClient.Options);
15
+ get members(): MembersClient;
16
+ /**
17
+ * List all groups in your tenant.
18
+ *
19
+ * @param {Management.ListGroupsRequestParameters} request
20
+ * @param {GroupsClient.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.groups.list({
29
+ * connection_id: "connection_id",
30
+ * name: "name",
31
+ * external_id: "external_id",
32
+ * fields: "fields",
33
+ * include_fields: true,
34
+ * from: "from",
35
+ * take: 1
36
+ * })
37
+ */
38
+ list(request?: Management.ListGroupsRequestParameters, requestOptions?: GroupsClient.RequestOptions): Promise<core.Page<Management.Group, Management.ListGroupsPaginatedResponseContent>>;
39
+ /**
40
+ * Retrieve a group by its ID.
41
+ *
42
+ * @param {string} id - Unique identifier for the group (service-generated).
43
+ * @param {GroupsClient.RequestOptions} requestOptions - Request-specific configuration.
44
+ *
45
+ * @throws {@link Management.BadRequestError}
46
+ * @throws {@link Management.UnauthorizedError}
47
+ * @throws {@link Management.ForbiddenError}
48
+ * @throws {@link Management.NotFoundError}
49
+ * @throws {@link Management.TooManyRequestsError}
50
+ *
51
+ * @example
52
+ * await client.groups.get("id")
53
+ */
54
+ get(id: string, requestOptions?: GroupsClient.RequestOptions): core.HttpResponsePromise<Management.GetGroupResponseContent>;
55
+ private __get;
56
+ }
@@ -0,0 +1,224 @@
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.GroupsClient = 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
+ const Client_js_1 = require("../resources/members/client/Client.js");
55
+ class GroupsClient {
56
+ constructor(options) {
57
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
58
+ }
59
+ get members() {
60
+ var _a;
61
+ return ((_a = this._members) !== null && _a !== void 0 ? _a : (this._members = new Client_js_1.MembersClient(this._options)));
62
+ }
63
+ /**
64
+ * List all groups in your tenant.
65
+ *
66
+ * @param {Management.ListGroupsRequestParameters} request
67
+ * @param {GroupsClient.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.groups.list({
76
+ * connection_id: "connection_id",
77
+ * name: "name",
78
+ * external_id: "external_id",
79
+ * fields: "fields",
80
+ * include_fields: true,
81
+ * from: "from",
82
+ * take: 1
83
+ * })
84
+ */
85
+ list() {
86
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
87
+ const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
88
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
89
+ const { connection_id: connectionId, name, external_id: externalId, fields, include_fields: includeFields, from: from_, take = 50, } = request;
90
+ const _queryParams = {};
91
+ if (connectionId !== undefined) {
92
+ _queryParams["connection_id"] = connectionId;
93
+ }
94
+ if (name !== undefined) {
95
+ _queryParams["name"] = name;
96
+ }
97
+ if (externalId !== undefined) {
98
+ _queryParams["external_id"] = externalId;
99
+ }
100
+ if (fields !== undefined) {
101
+ _queryParams["fields"] = fields;
102
+ }
103
+ if (includeFields !== undefined) {
104
+ _queryParams["include_fields"] = (_a = includeFields === null || includeFields === void 0 ? void 0 : includeFields.toString()) !== null && _a !== void 0 ? _a : null;
105
+ }
106
+ if (from_ !== undefined) {
107
+ _queryParams["from"] = from_;
108
+ }
109
+ if (take !== undefined) {
110
+ _queryParams["take"] = (_b = take === null || take === void 0 ? void 0 : take.toString()) !== null && _b !== void 0 ? _b : null;
111
+ }
112
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
113
+ let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
114
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
115
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ManagementEnvironment.Default, "groups"),
116
+ method: "GET",
117
+ headers: _headers,
118
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
119
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
120
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
121
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
122
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
123
+ logging: this._options.logging,
124
+ });
125
+ if (_response.ok) {
126
+ return {
127
+ data: _response.body,
128
+ rawResponse: _response.rawResponse,
129
+ };
130
+ }
131
+ if (_response.error.reason === "status-code") {
132
+ switch (_response.error.statusCode) {
133
+ case 400:
134
+ throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
135
+ case 401:
136
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
137
+ case 403:
138
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
139
+ case 429:
140
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
141
+ default:
142
+ throw new errors.ManagementError({
143
+ statusCode: _response.error.statusCode,
144
+ body: _response.error.body,
145
+ rawResponse: _response.rawResponse,
146
+ });
147
+ }
148
+ }
149
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/groups");
150
+ }));
151
+ const dataWithRawResponse = yield list(request).withRawResponse();
152
+ return new core.Page({
153
+ response: dataWithRawResponse.data,
154
+ rawResponse: dataWithRawResponse.rawResponse,
155
+ 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) === ""),
156
+ getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.groups) !== null && _a !== void 0 ? _a : []; },
157
+ loadPage: (response) => {
158
+ return list(core.setObjectProperty(request, "from", response === null || response === void 0 ? void 0 : response.next));
159
+ },
160
+ });
161
+ });
162
+ }
163
+ /**
164
+ * Retrieve a group by its ID.
165
+ *
166
+ * @param {string} id - Unique identifier for the group (service-generated).
167
+ * @param {GroupsClient.RequestOptions} requestOptions - Request-specific configuration.
168
+ *
169
+ * @throws {@link Management.BadRequestError}
170
+ * @throws {@link Management.UnauthorizedError}
171
+ * @throws {@link Management.ForbiddenError}
172
+ * @throws {@link Management.NotFoundError}
173
+ * @throws {@link Management.TooManyRequestsError}
174
+ *
175
+ * @example
176
+ * await client.groups.get("id")
177
+ */
178
+ get(id, requestOptions) {
179
+ return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));
180
+ }
181
+ __get(id, requestOptions) {
182
+ return __awaiter(this, void 0, void 0, function* () {
183
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
184
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
185
+ 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);
186
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
187
+ 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)}`),
188
+ method: "GET",
189
+ headers: _headers,
190
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
191
+ 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,
192
+ 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,
193
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
194
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
195
+ logging: this._options.logging,
196
+ });
197
+ if (_response.ok) {
198
+ return { data: _response.body, rawResponse: _response.rawResponse };
199
+ }
200
+ if (_response.error.reason === "status-code") {
201
+ switch (_response.error.statusCode) {
202
+ case 400:
203
+ throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
204
+ case 401:
205
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
206
+ case 403:
207
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
208
+ case 404:
209
+ throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
210
+ case 429:
211
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
212
+ default:
213
+ throw new errors.ManagementError({
214
+ statusCode: _response.error.statusCode,
215
+ body: _response.error.body,
216
+ rawResponse: _response.rawResponse,
217
+ });
218
+ }
219
+ }
220
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/groups/{id}");
221
+ });
222
+ }
223
+ }
224
+ exports.GroupsClient = GroupsClient;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.js";
2
+ export * from "./resources/index.js";
@@ -0,0 +1,18 @@
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);
18
+ __exportStar(require("./resources/index.js"), exports);
@@ -0,0 +1 @@
1
+ export * as members from "./members/index.js";