auth0 5.3.0 → 5.4.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 (218) hide show
  1. package/dist/cjs/management/BaseClient.d.ts +4 -4
  2. package/dist/cjs/management/api/requests/requests.d.ts +50 -134
  3. package/dist/cjs/management/api/requests/requests.js +0 -108
  4. package/dist/cjs/management/api/resources/actions/client/Client.js +25 -37
  5. package/dist/cjs/management/api/resources/actions/resources/modules/client/Client.js +22 -28
  6. package/dist/cjs/management/api/resources/actions/resources/modules/resources/versions/client/Client.d.ts +6 -3
  7. package/dist/cjs/management/api/resources/actions/resources/modules/resources/versions/client/Client.js +65 -45
  8. package/dist/cjs/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.js +11 -14
  9. package/dist/cjs/management/api/resources/actions/resources/versions/client/Client.d.ts +2 -2
  10. package/dist/cjs/management/api/resources/actions/resources/versions/client/Client.js +13 -16
  11. package/dist/cjs/management/api/resources/branding/resources/phone/resources/providers/client/Client.js +10 -11
  12. package/dist/cjs/management/api/resources/branding/resources/phone/resources/templates/client/Client.js +10 -11
  13. package/dist/cjs/management/api/resources/clientGrants/client/Client.js +15 -26
  14. package/dist/cjs/management/api/resources/clientGrants/resources/organizations/client/Client.js +11 -14
  15. package/dist/cjs/management/api/resources/clients/client/Client.js +29 -49
  16. package/dist/cjs/management/api/resources/clients/resources/connections/client/Client.js +18 -28
  17. package/dist/cjs/management/api/resources/connectionProfiles/client/Client.js +11 -14
  18. package/dist/cjs/management/api/resources/connections/client/Client.d.ts +2 -2
  19. package/dist/cjs/management/api/resources/connections/client/Client.js +34 -49
  20. package/dist/cjs/management/api/resources/connections/resources/clients/client/Client.js +11 -14
  21. package/dist/cjs/management/api/resources/connections/resources/directoryProvisioning/client/Client.js +13 -16
  22. package/dist/cjs/management/api/resources/connections/resources/keys/client/Client.d.ts +19 -0
  23. package/dist/cjs/management/api/resources/connections/resources/keys/client/Client.js +71 -1
  24. package/dist/cjs/management/api/resources/connections/resources/scimConfiguration/client/Client.d.ts +18 -0
  25. package/dist/cjs/management/api/resources/connections/resources/scimConfiguration/client/Client.js +78 -1
  26. package/dist/cjs/management/api/resources/connections/resources/users/client/Client.js +3 -2
  27. package/dist/cjs/management/api/resources/customDomains/client/Client.js +13 -20
  28. package/dist/cjs/management/api/resources/deviceCredentials/client/Client.js +17 -32
  29. package/dist/cjs/management/api/resources/emails/resources/provider/client/Client.js +11 -14
  30. package/dist/cjs/management/api/resources/eventStreams/client/Client.js +11 -14
  31. package/dist/cjs/management/api/resources/eventStreams/resources/deliveries/client/Client.js +15 -26
  32. package/dist/cjs/management/api/resources/flows/client/Client.d.ts +2 -2
  33. package/dist/cjs/management/api/resources/flows/client/Client.js +22 -38
  34. package/dist/cjs/management/api/resources/flows/index.d.ts +0 -1
  35. package/dist/cjs/management/api/resources/flows/index.js +0 -1
  36. package/dist/cjs/management/api/resources/flows/resources/executions/client/Client.d.ts +4 -4
  37. package/dist/cjs/management/api/resources/flows/resources/executions/client/Client.js +16 -25
  38. package/dist/cjs/management/api/resources/flows/resources/executions/index.d.ts +0 -1
  39. package/dist/cjs/management/api/resources/flows/resources/executions/index.js +0 -1
  40. package/dist/cjs/management/api/resources/flows/resources/index.d.ts +0 -1
  41. package/dist/cjs/management/api/resources/flows/resources/index.js +0 -4
  42. package/dist/cjs/management/api/resources/flows/resources/vault/resources/connections/client/Client.js +12 -17
  43. package/dist/cjs/management/api/resources/forms/client/Client.js +20 -34
  44. package/dist/cjs/management/api/resources/groups/client/Client.js +16 -29
  45. package/dist/cjs/management/api/resources/groups/resources/members/client/Client.js +13 -20
  46. package/dist/cjs/management/api/resources/hooks/client/Client.js +18 -30
  47. package/dist/cjs/management/api/resources/index.d.ts +0 -1
  48. package/dist/cjs/management/api/resources/index.js +0 -1
  49. package/dist/cjs/management/api/resources/jobs/resources/usersImports/client/Client.js +14 -14
  50. package/dist/cjs/management/api/resources/keys/resources/encryption/client/Client.js +12 -17
  51. package/dist/cjs/management/api/resources/logs/client/Client.js +16 -29
  52. package/dist/cjs/management/api/resources/networkAcls/client/Client.js +12 -17
  53. package/dist/cjs/management/api/resources/organizations/client/Client.js +12 -17
  54. package/dist/cjs/management/api/resources/organizations/resources/clientGrants/client/Client.js +15 -31
  55. package/dist/cjs/management/api/resources/organizations/resources/discoveryDomains/client/Client.js +11 -14
  56. package/dist/cjs/management/api/resources/organizations/resources/enabledConnections/client/Client.js +12 -17
  57. package/dist/cjs/management/api/resources/organizations/resources/invitations/client/Client.js +26 -40
  58. package/dist/cjs/management/api/resources/organizations/resources/members/client/Client.js +13 -20
  59. package/dist/cjs/management/api/resources/organizations/resources/members/resources/roles/client/Client.js +12 -17
  60. package/dist/cjs/management/api/resources/prompts/resources/rendering/client/Client.js +17 -32
  61. package/dist/cjs/management/api/resources/resourceServers/client/Client.js +24 -39
  62. package/dist/cjs/management/api/resources/roles/client/Client.js +13 -20
  63. package/dist/cjs/management/api/resources/roles/resources/permissions/client/Client.js +12 -17
  64. package/dist/cjs/management/api/resources/roles/resources/users/client/Client.js +11 -14
  65. package/dist/cjs/management/api/resources/rules/client/Client.js +26 -40
  66. package/dist/cjs/management/api/resources/selfServiceProfiles/client/Client.js +12 -17
  67. package/dist/cjs/management/api/resources/stats/client/Client.js +4 -7
  68. package/dist/cjs/management/api/resources/tenants/resources/settings/client/Client.js +11 -14
  69. package/dist/cjs/management/api/resources/tokenExchangeProfiles/client/Client.js +11 -14
  70. package/dist/cjs/management/api/resources/userAttributeProfiles/client/Client.js +11 -14
  71. package/dist/cjs/management/api/resources/userBlocks/client/Client.js +24 -25
  72. package/dist/cjs/management/api/resources/userGrants/client/Client.js +18 -28
  73. package/dist/cjs/management/api/resources/users/client/Client.js +42 -67
  74. package/dist/cjs/management/api/resources/users/resources/authenticationMethods/client/Client.js +12 -17
  75. package/dist/cjs/management/api/resources/users/resources/connectedAccounts/client/Client.js +11 -14
  76. package/dist/cjs/management/api/resources/users/resources/groups/client/Client.js +13 -20
  77. package/dist/cjs/management/api/resources/users/resources/logs/client/Client.js +13 -20
  78. package/dist/cjs/management/api/resources/users/resources/organizations/client/Client.js +12 -17
  79. package/dist/cjs/management/api/resources/users/resources/permissions/client/Client.js +12 -17
  80. package/dist/cjs/management/api/resources/users/resources/refreshToken/client/Client.js +11 -14
  81. package/dist/cjs/management/api/resources/users/resources/roles/client/Client.js +12 -17
  82. package/dist/cjs/management/api/resources/users/resources/sessions/client/Client.js +11 -14
  83. package/dist/cjs/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/Client.js +11 -14
  84. package/dist/cjs/management/api/types/types.d.ts +5257 -4642
  85. package/dist/cjs/management/api/types/types.js +457 -431
  86. package/dist/cjs/management/auth/BearerAuthProvider.d.ts +14 -10
  87. package/dist/cjs/management/auth/BearerAuthProvider.js +15 -6
  88. package/dist/cjs/management/core/fetcher/EndpointSupplier.d.ts +2 -2
  89. package/dist/cjs/management/core/fetcher/Fetcher.d.ts +1 -2
  90. package/dist/cjs/management/core/fetcher/Fetcher.js +7 -1
  91. package/dist/cjs/management/core/form-data-utils/FormDataWrapper.js +1 -1
  92. package/dist/cjs/management/core/headers.d.ts +2 -2
  93. package/dist/cjs/management/core/pagination/CustomPager.d.ts +29 -44
  94. package/dist/cjs/management/core/pagination/CustomPager.js +60 -42
  95. package/dist/cjs/management/core/pagination/exports.d.ts +0 -1
  96. package/dist/cjs/management/core/pagination/exports.js +0 -3
  97. package/dist/cjs/management/core/pagination/index.d.ts +1 -1
  98. package/dist/cjs/management/core/pagination/index.js +2 -1
  99. package/dist/cjs/management/version.d.ts +1 -1
  100. package/dist/cjs/management/version.js +1 -1
  101. package/dist/esm/management/BaseClient.d.mts +4 -4
  102. package/dist/esm/management/api/requests/requests.d.mts +50 -134
  103. package/dist/esm/management/api/requests/requests.mjs +1 -107
  104. package/dist/esm/management/api/resources/actions/client/Client.mjs +25 -37
  105. package/dist/esm/management/api/resources/actions/resources/modules/client/Client.mjs +22 -28
  106. package/dist/esm/management/api/resources/actions/resources/modules/resources/versions/client/Client.d.mts +6 -3
  107. package/dist/esm/management/api/resources/actions/resources/modules/resources/versions/client/Client.mjs +65 -45
  108. package/dist/esm/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.mjs +11 -14
  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 +13 -16
  111. package/dist/esm/management/api/resources/branding/resources/phone/resources/providers/client/Client.mjs +10 -11
  112. package/dist/esm/management/api/resources/branding/resources/phone/resources/templates/client/Client.mjs +10 -11
  113. package/dist/esm/management/api/resources/clientGrants/client/Client.mjs +15 -26
  114. package/dist/esm/management/api/resources/clientGrants/resources/organizations/client/Client.mjs +11 -14
  115. package/dist/esm/management/api/resources/clients/client/Client.mjs +29 -49
  116. package/dist/esm/management/api/resources/clients/resources/connections/client/Client.mjs +18 -28
  117. package/dist/esm/management/api/resources/connectionProfiles/client/Client.mjs +11 -14
  118. package/dist/esm/management/api/resources/connections/client/Client.d.mts +2 -2
  119. package/dist/esm/management/api/resources/connections/client/Client.mjs +34 -49
  120. package/dist/esm/management/api/resources/connections/resources/clients/client/Client.mjs +11 -14
  121. package/dist/esm/management/api/resources/connections/resources/directoryProvisioning/client/Client.mjs +13 -16
  122. package/dist/esm/management/api/resources/connections/resources/keys/client/Client.d.mts +19 -0
  123. package/dist/esm/management/api/resources/connections/resources/keys/client/Client.mjs +71 -1
  124. package/dist/esm/management/api/resources/connections/resources/scimConfiguration/client/Client.d.mts +18 -0
  125. package/dist/esm/management/api/resources/connections/resources/scimConfiguration/client/Client.mjs +78 -1
  126. package/dist/esm/management/api/resources/connections/resources/users/client/Client.mjs +3 -2
  127. package/dist/esm/management/api/resources/customDomains/client/Client.mjs +13 -20
  128. package/dist/esm/management/api/resources/deviceCredentials/client/Client.mjs +17 -32
  129. package/dist/esm/management/api/resources/emails/resources/provider/client/Client.mjs +11 -14
  130. package/dist/esm/management/api/resources/eventStreams/client/Client.mjs +11 -14
  131. package/dist/esm/management/api/resources/eventStreams/resources/deliveries/client/Client.mjs +15 -26
  132. package/dist/esm/management/api/resources/flows/client/Client.d.mts +2 -2
  133. package/dist/esm/management/api/resources/flows/client/Client.mjs +22 -38
  134. package/dist/esm/management/api/resources/flows/index.d.mts +0 -1
  135. package/dist/esm/management/api/resources/flows/index.mjs +0 -1
  136. package/dist/esm/management/api/resources/flows/resources/executions/client/Client.d.mts +4 -4
  137. package/dist/esm/management/api/resources/flows/resources/executions/client/Client.mjs +16 -25
  138. package/dist/esm/management/api/resources/flows/resources/executions/index.d.mts +0 -1
  139. package/dist/esm/management/api/resources/flows/resources/executions/index.mjs +0 -1
  140. package/dist/esm/management/api/resources/flows/resources/index.d.mts +0 -1
  141. package/dist/esm/management/api/resources/flows/resources/index.mjs +0 -1
  142. package/dist/esm/management/api/resources/flows/resources/vault/resources/connections/client/Client.mjs +12 -17
  143. package/dist/esm/management/api/resources/forms/client/Client.mjs +20 -34
  144. package/dist/esm/management/api/resources/groups/client/Client.mjs +16 -29
  145. package/dist/esm/management/api/resources/groups/resources/members/client/Client.mjs +13 -20
  146. package/dist/esm/management/api/resources/hooks/client/Client.mjs +18 -30
  147. package/dist/esm/management/api/resources/index.d.mts +0 -1
  148. package/dist/esm/management/api/resources/index.mjs +0 -1
  149. package/dist/esm/management/api/resources/jobs/resources/usersImports/client/Client.mjs +14 -14
  150. package/dist/esm/management/api/resources/keys/resources/encryption/client/Client.mjs +12 -17
  151. package/dist/esm/management/api/resources/logs/client/Client.mjs +16 -29
  152. package/dist/esm/management/api/resources/networkAcls/client/Client.mjs +12 -17
  153. package/dist/esm/management/api/resources/organizations/client/Client.mjs +12 -17
  154. package/dist/esm/management/api/resources/organizations/resources/clientGrants/client/Client.mjs +15 -31
  155. package/dist/esm/management/api/resources/organizations/resources/discoveryDomains/client/Client.mjs +11 -14
  156. package/dist/esm/management/api/resources/organizations/resources/enabledConnections/client/Client.mjs +12 -17
  157. package/dist/esm/management/api/resources/organizations/resources/invitations/client/Client.mjs +26 -40
  158. package/dist/esm/management/api/resources/organizations/resources/members/client/Client.mjs +13 -20
  159. package/dist/esm/management/api/resources/organizations/resources/members/resources/roles/client/Client.mjs +12 -17
  160. package/dist/esm/management/api/resources/prompts/resources/rendering/client/Client.mjs +17 -32
  161. package/dist/esm/management/api/resources/resourceServers/client/Client.mjs +24 -39
  162. package/dist/esm/management/api/resources/roles/client/Client.mjs +13 -20
  163. package/dist/esm/management/api/resources/roles/resources/permissions/client/Client.mjs +12 -17
  164. package/dist/esm/management/api/resources/roles/resources/users/client/Client.mjs +11 -14
  165. package/dist/esm/management/api/resources/rules/client/Client.mjs +26 -40
  166. package/dist/esm/management/api/resources/selfServiceProfiles/client/Client.mjs +12 -17
  167. package/dist/esm/management/api/resources/stats/client/Client.mjs +4 -7
  168. package/dist/esm/management/api/resources/tenants/resources/settings/client/Client.mjs +11 -14
  169. package/dist/esm/management/api/resources/tokenExchangeProfiles/client/Client.mjs +11 -14
  170. package/dist/esm/management/api/resources/userAttributeProfiles/client/Client.mjs +11 -14
  171. package/dist/esm/management/api/resources/userBlocks/client/Client.mjs +24 -25
  172. package/dist/esm/management/api/resources/userGrants/client/Client.mjs +18 -28
  173. package/dist/esm/management/api/resources/users/client/Client.mjs +42 -67
  174. package/dist/esm/management/api/resources/users/resources/authenticationMethods/client/Client.mjs +12 -17
  175. package/dist/esm/management/api/resources/users/resources/connectedAccounts/client/Client.mjs +11 -14
  176. package/dist/esm/management/api/resources/users/resources/groups/client/Client.mjs +13 -20
  177. package/dist/esm/management/api/resources/users/resources/logs/client/Client.mjs +13 -20
  178. package/dist/esm/management/api/resources/users/resources/organizations/client/Client.mjs +12 -17
  179. package/dist/esm/management/api/resources/users/resources/permissions/client/Client.mjs +12 -17
  180. package/dist/esm/management/api/resources/users/resources/refreshToken/client/Client.mjs +11 -14
  181. package/dist/esm/management/api/resources/users/resources/roles/client/Client.mjs +12 -17
  182. package/dist/esm/management/api/resources/users/resources/sessions/client/Client.mjs +11 -14
  183. package/dist/esm/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/Client.mjs +11 -14
  184. package/dist/esm/management/api/types/types.d.mts +5257 -4642
  185. package/dist/esm/management/api/types/types.mjs +447 -421
  186. package/dist/esm/management/auth/BearerAuthProvider.d.mts +14 -10
  187. package/dist/esm/management/auth/BearerAuthProvider.mjs +15 -6
  188. package/dist/esm/management/core/fetcher/EndpointSupplier.d.mts +2 -2
  189. package/dist/esm/management/core/fetcher/Fetcher.d.mts +1 -2
  190. package/dist/esm/management/core/fetcher/Fetcher.mjs +7 -1
  191. package/dist/esm/management/core/form-data-utils/FormDataWrapper.mjs +1 -1
  192. package/dist/esm/management/core/headers.d.mts +2 -2
  193. package/dist/esm/management/core/pagination/CustomPager.d.mts +29 -44
  194. package/dist/esm/management/core/pagination/CustomPager.mjs +58 -41
  195. package/dist/esm/management/core/pagination/exports.d.mts +0 -1
  196. package/dist/esm/management/core/pagination/exports.mjs +1 -1
  197. package/dist/esm/management/core/pagination/index.d.mts +1 -1
  198. package/dist/esm/management/core/pagination/index.mjs +1 -1
  199. package/dist/esm/management/version.d.mts +1 -1
  200. package/dist/esm/management/version.mjs +1 -1
  201. package/package.json +4 -3
  202. package/reference.md +302 -124
  203. package/dist/cjs/management/api/resources/flows/resources/executions/types/index.d.ts +0 -1
  204. package/dist/cjs/management/api/resources/flows/resources/executions/types/index.js +0 -17
  205. package/dist/cjs/management/api/resources/flows/resources/executions/types/types.d.ts +0 -4
  206. package/dist/cjs/management/api/resources/flows/resources/executions/types/types.js +0 -7
  207. package/dist/cjs/management/api/resources/flows/types/index.d.ts +0 -1
  208. package/dist/cjs/management/api/resources/flows/types/index.js +0 -17
  209. package/dist/cjs/management/api/resources/flows/types/types.d.ts +0 -4
  210. package/dist/cjs/management/api/resources/flows/types/types.js +0 -7
  211. package/dist/esm/management/api/resources/flows/resources/executions/types/index.d.mts +0 -1
  212. package/dist/esm/management/api/resources/flows/resources/executions/types/index.mjs +0 -1
  213. package/dist/esm/management/api/resources/flows/resources/executions/types/types.d.mts +0 -4
  214. package/dist/esm/management/api/resources/flows/resources/executions/types/types.mjs +0 -4
  215. package/dist/esm/management/api/resources/flows/types/index.d.mts +0 -1
  216. package/dist/esm/management/api/resources/flows/types/index.mjs +0 -1
  217. package/dist/esm/management/api/resources/flows/types/types.d.mts +0 -4
  218. package/dist/esm/management/api/resources/flows/types/types.mjs +0 -4
@@ -23,6 +23,7 @@ export class VersionsClient {
23
23
  * List all published versions of a specific Actions Module.
24
24
  *
25
25
  * @param {string} id - The unique ID of the module.
26
+ * @param {Management.GetActionModuleVersionsRequestParameters} request
26
27
  * @param {VersionsClient.RequestOptions} requestOptions - Request-specific configuration.
27
28
  *
28
29
  * @throws {@link Management.BadRequestError}
@@ -32,54 +33,73 @@ export class VersionsClient {
32
33
  * @throws {@link Management.TooManyRequestsError}
33
34
  *
34
35
  * @example
35
- * await client.actions.modules.versions.list("id")
36
+ * await client.actions.modules.versions.list("id", {
37
+ * page: 1,
38
+ * per_page: 1
39
+ * })
36
40
  */
37
- list(id, requestOptions) {
38
- return core.HttpResponsePromise.fromPromise(this.__list(id, requestOptions));
39
- }
40
- __list(id, requestOptions) {
41
- return __awaiter(this, void 0, void 0, function* () {
42
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
43
- const _authRequest = yield this._options.authProvider.getAuthRequest();
44
- let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
45
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
46
- 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`),
47
- method: "GET",
48
- headers: _headers,
49
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
50
- 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,
51
- 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,
52
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
53
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
54
- logging: this._options.logging,
55
- });
56
- if (_response.ok) {
57
- return {
58
- data: _response.body,
59
- rawResponse: _response.rawResponse,
41
+ list(id_1) {
42
+ return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
43
+ const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
44
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
45
+ const { page = 0, per_page: perPage = 50 } = request;
46
+ const _queryParams = {
47
+ page,
48
+ per_page: perPage,
60
49
  };
61
- }
62
- if (_response.error.reason === "status-code") {
63
- switch (_response.error.statusCode) {
64
- case 400:
65
- throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
66
- case 401:
67
- throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
68
- case 403:
69
- throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
70
- case 404:
71
- throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
72
- case 429:
73
- throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
74
- default:
75
- throw new errors.ManagementError({
76
- statusCode: _response.error.statusCode,
77
- body: _response.error.body,
78
- rawResponse: _response.rawResponse,
79
- });
50
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
51
+ let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
52
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
53
+ 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`),
54
+ method: "GET",
55
+ headers: _headers,
56
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
57
+ 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,
58
+ 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,
59
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
60
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
61
+ logging: this._options.logging,
62
+ });
63
+ if (_response.ok) {
64
+ return {
65
+ data: _response.body,
66
+ rawResponse: _response.rawResponse,
67
+ };
80
68
  }
81
- }
82
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/actions/modules/{id}/versions");
69
+ if (_response.error.reason === "status-code") {
70
+ switch (_response.error.statusCode) {
71
+ case 400:
72
+ throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
73
+ case 401:
74
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
75
+ case 403:
76
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
77
+ case 404:
78
+ throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
79
+ case 429:
80
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
81
+ default:
82
+ throw new errors.ManagementError({
83
+ statusCode: _response.error.statusCode,
84
+ body: _response.error.body,
85
+ rawResponse: _response.rawResponse,
86
+ });
87
+ }
88
+ }
89
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/actions/modules/{id}/versions");
90
+ }));
91
+ let _offset = (request === null || request === void 0 ? void 0 : request.page) != null ? request === null || request === void 0 ? void 0 : request.page : 0;
92
+ const dataWithRawResponse = yield list(request).withRawResponse();
93
+ return new core.Page({
94
+ response: dataWithRawResponse.data,
95
+ rawResponse: dataWithRawResponse.rawResponse,
96
+ hasNextPage: (response) => { var _a, _b; return ((_a = response === null || response === void 0 ? void 0 : response.versions) !== null && _a !== void 0 ? _a : []).length >= Math.floor((_b = request === null || request === void 0 ? void 0 : request.per_page) !== null && _b !== void 0 ? _b : 50); },
97
+ getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.versions) !== null && _a !== void 0 ? _a : []; },
98
+ loadPage: (_response) => {
99
+ _offset += 1;
100
+ return list(core.setObjectProperty(request, "page", _offset));
101
+ },
102
+ });
83
103
  });
84
104
  }
85
105
  /**
@@ -40,26 +40,23 @@ export class BindingsClient {
40
40
  list(triggerId_1) {
41
41
  return __awaiter(this, arguments, void 0, function* (triggerId, request = {}, requestOptions) {
42
42
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
43
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
43
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
44
44
  const { page = 0, per_page: perPage = 50 } = request;
45
- const _queryParams = {};
46
- if (page !== undefined) {
47
- _queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
48
- }
49
- if (perPage !== undefined) {
50
- _queryParams["per_page"] = (_b = perPage === null || perPage === void 0 ? void 0 : perPage.toString()) !== null && _b !== void 0 ? _b : null;
51
- }
45
+ const _queryParams = {
46
+ page,
47
+ per_page: perPage,
48
+ };
52
49
  const _authRequest = yield this._options.authProvider.getAuthRequest();
53
- let _headers = mergeHeaders(_authRequest.headers, (_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
54
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
55
- 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, `actions/triggers/${core.url.encodePathParam(triggerId)}/bindings`),
50
+ let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
51
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
52
+ 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/triggers/${core.url.encodePathParam(triggerId)}/bindings`),
56
53
  method: "GET",
57
54
  headers: _headers,
58
55
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
59
- 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,
60
- 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,
56
+ 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,
57
+ 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,
61
58
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
62
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
59
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
63
60
  logging: this._options.logging,
64
61
  });
65
62
  if (_response.ok) {
@@ -52,7 +52,7 @@ export declare class VersionsClient {
52
52
  *
53
53
  * @param {string} actionId - The ID of an action.
54
54
  * @param {string} id - The ID of an action version.
55
- * @param {Management.DeployActionVersionRequestContent | undefined} request
55
+ * @param {Management.DeployActionVersionRequestContent | null} request
56
56
  * @param {VersionsClient.RequestOptions} requestOptions - Request-specific configuration.
57
57
  *
58
58
  * @throws {@link Management.BadRequestError}
@@ -63,6 +63,6 @@ export declare class VersionsClient {
63
63
  * @example
64
64
  * await client.actions.versions.deploy("actionId", "id")
65
65
  */
66
- deploy(actionId: string, id: string, request?: Management.DeployActionVersionRequestContent | undefined, requestOptions?: VersionsClient.RequestOptions): core.HttpResponsePromise<Management.DeployActionVersionResponseContent>;
66
+ deploy(actionId: string, id: string, request?: Management.DeployActionVersionRequestContent | null, requestOptions?: VersionsClient.RequestOptions): core.HttpResponsePromise<Management.DeployActionVersionResponseContent>;
67
67
  private __deploy;
68
68
  }
@@ -40,26 +40,23 @@ export class VersionsClient {
40
40
  list(actionId_1) {
41
41
  return __awaiter(this, arguments, void 0, function* (actionId, request = {}, requestOptions) {
42
42
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
43
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
43
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
44
44
  const { page = 0, per_page: perPage = 50 } = request;
45
- const _queryParams = {};
46
- if (page !== undefined) {
47
- _queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
48
- }
49
- if (perPage !== undefined) {
50
- _queryParams["per_page"] = (_b = perPage === null || perPage === void 0 ? void 0 : perPage.toString()) !== null && _b !== void 0 ? _b : null;
51
- }
45
+ const _queryParams = {
46
+ page,
47
+ per_page: perPage,
48
+ };
52
49
  const _authRequest = yield this._options.authProvider.getAuthRequest();
53
- let _headers = mergeHeaders(_authRequest.headers, (_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
54
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
55
- 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, `actions/actions/${core.url.encodePathParam(actionId)}/versions`),
50
+ let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
51
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
52
+ 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/actions/${core.url.encodePathParam(actionId)}/versions`),
56
53
  method: "GET",
57
54
  headers: _headers,
58
55
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
59
- 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,
60
- 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,
56
+ 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,
57
+ 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,
61
58
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
62
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
59
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
63
60
  logging: this._options.logging,
64
61
  });
65
62
  if (_response.ok) {
@@ -171,7 +168,7 @@ export class VersionsClient {
171
168
  *
172
169
  * @param {string} actionId - The ID of an action.
173
170
  * @param {string} id - The ID of an action version.
174
- * @param {Management.DeployActionVersionRequestContent | undefined} request
171
+ * @param {Management.DeployActionVersionRequestContent | null} request
175
172
  * @param {VersionsClient.RequestOptions} requestOptions - Request-specific configuration.
176
173
  *
177
174
  * @throws {@link Management.BadRequestError}
@@ -197,7 +194,7 @@ export class VersionsClient {
197
194
  contentType: "application/json",
198
195
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
199
196
  requestType: "json",
200
- body: request != null ? request : undefined,
197
+ body: request,
201
198
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
202
199
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
203
200
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -40,23 +40,22 @@ export class ProvidersClient {
40
40
  }
41
41
  __list() {
42
42
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
43
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
43
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
44
44
  const { disabled } = request;
45
- const _queryParams = {};
46
- if (disabled !== undefined) {
47
- _queryParams["disabled"] = (_a = disabled === null || disabled === void 0 ? void 0 : disabled.toString()) !== null && _a !== void 0 ? _a : null;
48
- }
45
+ const _queryParams = {
46
+ disabled,
47
+ };
49
48
  const _authRequest = yield this._options.authProvider.getAuthRequest();
50
- let _headers = mergeHeaders(_authRequest.headers, (_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
51
- const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
52
- 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, "branding/phone/providers"),
49
+ let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
50
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
51
+ 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, "branding/phone/providers"),
53
52
  method: "GET",
54
53
  headers: _headers,
55
54
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
56
- 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,
57
- 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,
55
+ 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,
56
+ 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,
58
57
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
59
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
58
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
60
59
  logging: this._options.logging,
61
60
  });
62
61
  if (_response.ok) {
@@ -38,23 +38,22 @@ export class TemplatesClient {
38
38
  }
39
39
  __list() {
40
40
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
41
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
41
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
42
42
  const { disabled } = request;
43
- const _queryParams = {};
44
- if (disabled !== undefined) {
45
- _queryParams["disabled"] = (_a = disabled === null || disabled === void 0 ? void 0 : disabled.toString()) !== null && _a !== void 0 ? _a : null;
46
- }
43
+ const _queryParams = {
44
+ disabled,
45
+ };
47
46
  const _authRequest = yield this._options.authProvider.getAuthRequest();
48
- let _headers = mergeHeaders(_authRequest.headers, (_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
49
- const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
50
- 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, "branding/phone/templates"),
47
+ let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
48
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
49
+ 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, "branding/phone/templates"),
51
50
  method: "GET",
52
51
  headers: _headers,
53
52
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
54
- 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,
55
- 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,
53
+ 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,
54
+ 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,
56
55
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
57
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
56
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
58
57
  logging: this._options.logging,
59
58
  });
60
59
  if (_response.ok) {
@@ -47,38 +47,27 @@ export class ClientGrantsClient {
47
47
  list() {
48
48
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
49
49
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
50
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
50
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
51
51
  const { from: from_, take = 50, audience, client_id: clientId, allow_any_organization: allowAnyOrganization, subject_type: subjectType, } = request;
52
- const _queryParams = {};
53
- if (from_ !== undefined) {
54
- _queryParams["from"] = from_;
55
- }
56
- if (take !== undefined) {
57
- _queryParams["take"] = (_a = take === null || take === void 0 ? void 0 : take.toString()) !== null && _a !== void 0 ? _a : null;
58
- }
59
- if (audience !== undefined) {
60
- _queryParams["audience"] = audience;
61
- }
62
- if (clientId !== undefined) {
63
- _queryParams["client_id"] = clientId;
64
- }
65
- if (allowAnyOrganization !== undefined) {
66
- _queryParams["allow_any_organization"] = (_b = allowAnyOrganization === null || allowAnyOrganization === void 0 ? void 0 : allowAnyOrganization.toString()) !== null && _b !== void 0 ? _b : null;
67
- }
68
- if (subjectType !== undefined) {
69
- _queryParams["subject_type"] = subjectType;
70
- }
52
+ const _queryParams = {
53
+ from: from_,
54
+ take,
55
+ audience,
56
+ client_id: clientId,
57
+ allow_any_organization: allowAnyOrganization,
58
+ subject_type: subjectType !== undefined ? subjectType : undefined,
59
+ };
71
60
  const _authRequest = yield this._options.authProvider.getAuthRequest();
72
- let _headers = mergeHeaders(_authRequest.headers, (_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
73
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
74
- 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, "client-grants"),
61
+ let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
62
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
63
+ 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"),
75
64
  method: "GET",
76
65
  headers: _headers,
77
66
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
78
- 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,
79
- 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,
67
+ 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,
68
+ 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,
80
69
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
81
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
70
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
82
71
  logging: this._options.logging,
83
72
  });
84
73
  if (_response.ok) {
@@ -38,26 +38,23 @@ export class OrganizationsClient {
38
38
  list(id_1) {
39
39
  return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
40
40
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
41
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
41
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
42
42
  const { from: from_, take = 50 } = request;
43
- const _queryParams = {};
44
- if (from_ !== undefined) {
45
- _queryParams["from"] = from_;
46
- }
47
- if (take !== undefined) {
48
- _queryParams["take"] = (_a = take === null || take === void 0 ? void 0 : take.toString()) !== null && _a !== void 0 ? _a : null;
49
- }
43
+ const _queryParams = {
44
+ from: from_,
45
+ take,
46
+ };
50
47
  const _authRequest = yield this._options.authProvider.getAuthRequest();
51
- let _headers = mergeHeaders(_authRequest.headers, (_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
52
- const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
53
- 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, `client-grants/${core.url.encodePathParam(id)}/organizations`),
48
+ let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
49
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
50
+ 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)}/organizations`),
54
51
  method: "GET",
55
52
  headers: _headers,
56
53
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
57
- 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,
58
- 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,
54
+ 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,
55
+ 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,
59
56
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
60
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
57
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
61
58
  logging: this._options.logging,
62
59
  });
63
60
  if (_response.ok) {
@@ -88,47 +88,30 @@ export class ClientsClient {
88
88
  list() {
89
89
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
90
90
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
91
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
91
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
92
92
  const { fields, include_fields: includeFields, page = 0, per_page: perPage = 50, include_totals: includeTotals = true, is_global: isGlobal, is_first_party: isFirstParty, app_type: appType, q, } = request;
93
- const _queryParams = {};
94
- if (fields !== undefined) {
95
- _queryParams["fields"] = fields;
96
- }
97
- if (includeFields !== undefined) {
98
- _queryParams["include_fields"] = (_a = includeFields === null || includeFields === void 0 ? void 0 : includeFields.toString()) !== null && _a !== void 0 ? _a : null;
99
- }
100
- if (page !== undefined) {
101
- _queryParams["page"] = (_b = page === null || page === void 0 ? void 0 : page.toString()) !== null && _b !== void 0 ? _b : null;
102
- }
103
- if (perPage !== undefined) {
104
- _queryParams["per_page"] = (_c = perPage === null || perPage === void 0 ? void 0 : perPage.toString()) !== null && _c !== void 0 ? _c : null;
105
- }
106
- if (includeTotals !== undefined) {
107
- _queryParams["include_totals"] = (_d = includeTotals === null || includeTotals === void 0 ? void 0 : includeTotals.toString()) !== null && _d !== void 0 ? _d : null;
108
- }
109
- if (isGlobal !== undefined) {
110
- _queryParams["is_global"] = (_e = isGlobal === null || isGlobal === void 0 ? void 0 : isGlobal.toString()) !== null && _e !== void 0 ? _e : null;
111
- }
112
- if (isFirstParty !== undefined) {
113
- _queryParams["is_first_party"] = (_f = isFirstParty === null || isFirstParty === void 0 ? void 0 : isFirstParty.toString()) !== null && _f !== void 0 ? _f : null;
114
- }
115
- if (appType !== undefined) {
116
- _queryParams["app_type"] = appType;
117
- }
118
- if (q !== undefined) {
119
- _queryParams["q"] = q;
120
- }
93
+ const _queryParams = {
94
+ fields,
95
+ include_fields: includeFields,
96
+ page,
97
+ per_page: perPage,
98
+ include_totals: includeTotals,
99
+ is_global: isGlobal,
100
+ is_first_party: isFirstParty,
101
+ app_type: appType,
102
+ q,
103
+ };
121
104
  const _authRequest = yield this._options.authProvider.getAuthRequest();
122
- let _headers = mergeHeaders(_authRequest.headers, (_g = this._options) === null || _g === void 0 ? void 0 : _g.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
123
- const _response = yield ((_h = this._options.fetcher) !== null && _h !== void 0 ? _h : core.fetcher)({
124
- url: core.url.join((_k = (_j = (yield core.Supplier.get(this._options.baseUrl))) !== null && _j !== void 0 ? _j : (yield core.Supplier.get(this._options.environment))) !== null && _k !== void 0 ? _k : environments.ManagementEnvironment.Default, "clients"),
105
+ let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
106
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
107
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, "clients"),
125
108
  method: "GET",
126
109
  headers: _headers,
127
110
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
128
- timeoutMs: ((_o = (_l = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _l !== void 0 ? _l : (_m = this._options) === null || _m === void 0 ? void 0 : _m.timeoutInSeconds) !== null && _o !== void 0 ? _o : 60) * 1000,
129
- maxRetries: (_p = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _p !== void 0 ? _p : (_q = this._options) === null || _q === void 0 ? void 0 : _q.maxRetries,
111
+ 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,
112
+ 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,
130
113
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
131
- fetchFn: (_r = this._options) === null || _r === void 0 ? void 0 : _r.fetch,
114
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
132
115
  logging: this._options.logging,
133
116
  });
134
117
  if (_response.ok) {
@@ -306,26 +289,23 @@ export class ClientsClient {
306
289
  }
307
290
  __get(id_1) {
308
291
  return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
309
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
292
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
310
293
  const { fields, include_fields: includeFields } = request;
311
- const _queryParams = {};
312
- if (fields !== undefined) {
313
- _queryParams["fields"] = fields;
314
- }
315
- if (includeFields !== undefined) {
316
- _queryParams["include_fields"] = (_a = includeFields === null || includeFields === void 0 ? void 0 : includeFields.toString()) !== null && _a !== void 0 ? _a : null;
317
- }
294
+ const _queryParams = {
295
+ fields,
296
+ include_fields: includeFields,
297
+ };
318
298
  const _authRequest = yield this._options.authProvider.getAuthRequest();
319
- let _headers = mergeHeaders(_authRequest.headers, (_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
320
- const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
321
- 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, `clients/${core.url.encodePathParam(id)}`),
299
+ let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
300
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
301
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, `clients/${core.url.encodePathParam(id)}`),
322
302
  method: "GET",
323
303
  headers: _headers,
324
304
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
325
- 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,
326
- 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,
305
+ 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,
306
+ 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,
327
307
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
328
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
308
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
329
309
  logging: this._options.logging,
330
310
  });
331
311
  if (_response.ok) {