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
@@ -59,6 +59,7 @@ class VersionsClient {
59
59
  * List all published versions of a specific Actions Module.
60
60
  *
61
61
  * @param {string} id - The unique ID of the module.
62
+ * @param {Management.GetActionModuleVersionsRequestParameters} request
62
63
  * @param {VersionsClient.RequestOptions} requestOptions - Request-specific configuration.
63
64
  *
64
65
  * @throws {@link Management.BadRequestError}
@@ -68,54 +69,73 @@ class VersionsClient {
68
69
  * @throws {@link Management.TooManyRequestsError}
69
70
  *
70
71
  * @example
71
- * await client.actions.modules.versions.list("id")
72
+ * await client.actions.modules.versions.list("id", {
73
+ * page: 1,
74
+ * per_page: 1
75
+ * })
72
76
  */
73
- list(id, requestOptions) {
74
- return core.HttpResponsePromise.fromPromise(this.__list(id, requestOptions));
75
- }
76
- __list(id, requestOptions) {
77
- return __awaiter(this, void 0, void 0, function* () {
78
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
79
- const _authRequest = yield this._options.authProvider.getAuthRequest();
80
- let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
81
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
82
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, `actions/modules/${core.url.encodePathParam(id)}/versions`),
83
- method: "GET",
84
- headers: _headers,
85
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
86
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
87
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
88
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
89
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
90
- logging: this._options.logging,
91
- });
92
- if (_response.ok) {
93
- return {
94
- data: _response.body,
95
- rawResponse: _response.rawResponse,
77
+ list(id_1) {
78
+ return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
79
+ const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
80
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
81
+ const { page = 0, per_page: perPage = 50 } = request;
82
+ const _queryParams = {
83
+ page,
84
+ per_page: perPage,
96
85
  };
97
- }
98
- if (_response.error.reason === "status-code") {
99
- switch (_response.error.statusCode) {
100
- case 400:
101
- throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
102
- case 401:
103
- throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
104
- case 403:
105
- throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
106
- case 404:
107
- throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
108
- case 429:
109
- throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
110
- default:
111
- throw new errors.ManagementError({
112
- statusCode: _response.error.statusCode,
113
- body: _response.error.body,
114
- rawResponse: _response.rawResponse,
115
- });
86
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
87
+ 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);
88
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
89
+ 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`),
90
+ method: "GET",
91
+ headers: _headers,
92
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
93
+ 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,
94
+ 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,
95
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
96
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
97
+ logging: this._options.logging,
98
+ });
99
+ if (_response.ok) {
100
+ return {
101
+ data: _response.body,
102
+ rawResponse: _response.rawResponse,
103
+ };
116
104
  }
117
- }
118
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/actions/modules/{id}/versions");
105
+ if (_response.error.reason === "status-code") {
106
+ switch (_response.error.statusCode) {
107
+ case 400:
108
+ throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
109
+ case 401:
110
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
111
+ case 403:
112
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
113
+ case 404:
114
+ throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
115
+ case 429:
116
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
117
+ default:
118
+ throw new errors.ManagementError({
119
+ statusCode: _response.error.statusCode,
120
+ body: _response.error.body,
121
+ rawResponse: _response.rawResponse,
122
+ });
123
+ }
124
+ }
125
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/actions/modules/{id}/versions");
126
+ }));
127
+ let _offset = (request === null || request === void 0 ? void 0 : request.page) != null ? request === null || request === void 0 ? void 0 : request.page : 0;
128
+ const dataWithRawResponse = yield list(request).withRawResponse();
129
+ return new core.Page({
130
+ response: dataWithRawResponse.data,
131
+ rawResponse: dataWithRawResponse.rawResponse,
132
+ 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); },
133
+ getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.versions) !== null && _a !== void 0 ? _a : []; },
134
+ loadPage: (_response) => {
135
+ _offset += 1;
136
+ return list(core.setObjectProperty(request, "page", _offset));
137
+ },
138
+ });
119
139
  });
120
140
  }
121
141
  /**
@@ -76,26 +76,23 @@ class BindingsClient {
76
76
  list(triggerId_1) {
77
77
  return __awaiter(this, arguments, void 0, function* (triggerId, request = {}, requestOptions) {
78
78
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
79
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
79
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
80
80
  const { page = 0, per_page: perPage = 50 } = request;
81
- const _queryParams = {};
82
- if (page !== undefined) {
83
- _queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
84
- }
85
- if (perPage !== undefined) {
86
- _queryParams["per_page"] = (_b = perPage === null || perPage === void 0 ? void 0 : perPage.toString()) !== null && _b !== void 0 ? _b : null;
87
- }
81
+ const _queryParams = {
82
+ page,
83
+ per_page: perPage,
84
+ };
88
85
  const _authRequest = yield this._options.authProvider.getAuthRequest();
89
- 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);
90
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
91
- 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`),
86
+ 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);
87
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
88
+ 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`),
92
89
  method: "GET",
93
90
  headers: _headers,
94
91
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
95
- 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,
96
- 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,
92
+ 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,
93
+ 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,
97
94
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
98
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
95
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
99
96
  logging: this._options.logging,
100
97
  });
101
98
  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
  }
@@ -76,26 +76,23 @@ class VersionsClient {
76
76
  list(actionId_1) {
77
77
  return __awaiter(this, arguments, void 0, function* (actionId, request = {}, requestOptions) {
78
78
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
79
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
79
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
80
80
  const { page = 0, per_page: perPage = 50 } = request;
81
- const _queryParams = {};
82
- if (page !== undefined) {
83
- _queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
84
- }
85
- if (perPage !== undefined) {
86
- _queryParams["per_page"] = (_b = perPage === null || perPage === void 0 ? void 0 : perPage.toString()) !== null && _b !== void 0 ? _b : null;
87
- }
81
+ const _queryParams = {
82
+ page,
83
+ per_page: perPage,
84
+ };
88
85
  const _authRequest = yield this._options.authProvider.getAuthRequest();
89
- 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);
90
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
91
- 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`),
86
+ 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);
87
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
88
+ 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`),
92
89
  method: "GET",
93
90
  headers: _headers,
94
91
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
95
- 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,
96
- 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,
92
+ 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,
93
+ 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,
97
94
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
98
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
95
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
99
96
  logging: this._options.logging,
100
97
  });
101
98
  if (_response.ok) {
@@ -207,7 +204,7 @@ class VersionsClient {
207
204
  *
208
205
  * @param {string} actionId - The ID of an action.
209
206
  * @param {string} id - The ID of an action version.
210
- * @param {Management.DeployActionVersionRequestContent | undefined} request
207
+ * @param {Management.DeployActionVersionRequestContent | null} request
211
208
  * @param {VersionsClient.RequestOptions} requestOptions - Request-specific configuration.
212
209
  *
213
210
  * @throws {@link Management.BadRequestError}
@@ -233,7 +230,7 @@ class VersionsClient {
233
230
  contentType: "application/json",
234
231
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
235
232
  requestType: "json",
236
- body: request != null ? request : undefined,
233
+ body: request,
237
234
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
238
235
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
239
236
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -76,23 +76,22 @@ class ProvidersClient {
76
76
  }
77
77
  __list() {
78
78
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
79
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
79
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
80
80
  const { disabled } = request;
81
- const _queryParams = {};
82
- if (disabled !== undefined) {
83
- _queryParams["disabled"] = (_a = disabled === null || disabled === void 0 ? void 0 : disabled.toString()) !== null && _a !== void 0 ? _a : null;
84
- }
81
+ const _queryParams = {
82
+ disabled,
83
+ };
85
84
  const _authRequest = yield this._options.authProvider.getAuthRequest();
86
- 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);
87
- const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
88
- 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"),
85
+ 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);
86
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
87
+ 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"),
89
88
  method: "GET",
90
89
  headers: _headers,
91
90
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
92
- 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,
93
- 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,
91
+ 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,
92
+ 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,
94
93
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
95
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
94
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
96
95
  logging: this._options.logging,
97
96
  });
98
97
  if (_response.ok) {
@@ -74,23 +74,22 @@ class TemplatesClient {
74
74
  }
75
75
  __list() {
76
76
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
77
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
77
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
78
78
  const { disabled } = request;
79
- const _queryParams = {};
80
- if (disabled !== undefined) {
81
- _queryParams["disabled"] = (_a = disabled === null || disabled === void 0 ? void 0 : disabled.toString()) !== null && _a !== void 0 ? _a : null;
82
- }
79
+ const _queryParams = {
80
+ disabled,
81
+ };
83
82
  const _authRequest = yield this._options.authProvider.getAuthRequest();
84
- 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);
85
- const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
86
- 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"),
83
+ 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);
84
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
85
+ 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"),
87
86
  method: "GET",
88
87
  headers: _headers,
89
88
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
90
- 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,
91
- 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,
89
+ 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,
90
+ 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,
92
91
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
93
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
92
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
94
93
  logging: this._options.logging,
95
94
  });
96
95
  if (_response.ok) {
@@ -83,38 +83,27 @@ class ClientGrantsClient {
83
83
  list() {
84
84
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
85
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, _m;
86
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
87
87
  const { from: from_, take = 50, audience, client_id: clientId, allow_any_organization: allowAnyOrganization, subject_type: subjectType, } = request;
88
- const _queryParams = {};
89
- if (from_ !== undefined) {
90
- _queryParams["from"] = from_;
91
- }
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
- if (audience !== undefined) {
96
- _queryParams["audience"] = audience;
97
- }
98
- if (clientId !== undefined) {
99
- _queryParams["client_id"] = clientId;
100
- }
101
- if (allowAnyOrganization !== undefined) {
102
- _queryParams["allow_any_organization"] = (_b = allowAnyOrganization === null || allowAnyOrganization === void 0 ? void 0 : allowAnyOrganization.toString()) !== null && _b !== void 0 ? _b : null;
103
- }
104
- if (subjectType !== undefined) {
105
- _queryParams["subject_type"] = subjectType;
106
- }
88
+ const _queryParams = {
89
+ from: from_,
90
+ take,
91
+ audience,
92
+ client_id: clientId,
93
+ allow_any_organization: allowAnyOrganization,
94
+ subject_type: subjectType !== undefined ? subjectType : undefined,
95
+ };
107
96
  const _authRequest = yield this._options.authProvider.getAuthRequest();
108
- 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);
109
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
110
- 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"),
97
+ 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);
98
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
99
+ 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"),
111
100
  method: "GET",
112
101
  headers: _headers,
113
102
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
114
- 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,
115
- 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,
103
+ 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,
104
+ 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,
116
105
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
117
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
106
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
118
107
  logging: this._options.logging,
119
108
  });
120
109
  if (_response.ok) {
@@ -74,26 +74,23 @@ class OrganizationsClient {
74
74
  list(id_1) {
75
75
  return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
76
76
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
77
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
77
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
78
78
  const { from: from_, take = 50 } = request;
79
- const _queryParams = {};
80
- if (from_ !== undefined) {
81
- _queryParams["from"] = from_;
82
- }
83
- if (take !== undefined) {
84
- _queryParams["take"] = (_a = take === null || take === void 0 ? void 0 : take.toString()) !== null && _a !== void 0 ? _a : null;
85
- }
79
+ const _queryParams = {
80
+ from: from_,
81
+ take,
82
+ };
86
83
  const _authRequest = yield this._options.authProvider.getAuthRequest();
87
- 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);
88
- const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
89
- 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`),
84
+ 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);
85
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
86
+ 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`),
90
87
  method: "GET",
91
88
  headers: _headers,
92
89
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
93
- 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,
94
- 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,
90
+ 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,
91
+ 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,
95
92
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
96
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
93
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
97
94
  logging: this._options.logging,
98
95
  });
99
96
  if (_response.ok) {
@@ -124,47 +124,30 @@ class ClientsClient {
124
124
  list() {
125
125
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
126
126
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
127
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
127
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
128
128
  const { fields, include_fields: includeFields, page = 0, per_page: perPage = 50, include_totals: includeTotals = true, is_global: isGlobal, is_first_party: isFirstParty, app_type: appType, q, } = request;
129
- const _queryParams = {};
130
- if (fields !== undefined) {
131
- _queryParams["fields"] = fields;
132
- }
133
- if (includeFields !== undefined) {
134
- _queryParams["include_fields"] = (_a = includeFields === null || includeFields === void 0 ? void 0 : includeFields.toString()) !== null && _a !== void 0 ? _a : null;
135
- }
136
- if (page !== undefined) {
137
- _queryParams["page"] = (_b = page === null || page === void 0 ? void 0 : page.toString()) !== null && _b !== void 0 ? _b : null;
138
- }
139
- if (perPage !== undefined) {
140
- _queryParams["per_page"] = (_c = perPage === null || perPage === void 0 ? void 0 : perPage.toString()) !== null && _c !== void 0 ? _c : null;
141
- }
142
- if (includeTotals !== undefined) {
143
- _queryParams["include_totals"] = (_d = includeTotals === null || includeTotals === void 0 ? void 0 : includeTotals.toString()) !== null && _d !== void 0 ? _d : null;
144
- }
145
- if (isGlobal !== undefined) {
146
- _queryParams["is_global"] = (_e = isGlobal === null || isGlobal === void 0 ? void 0 : isGlobal.toString()) !== null && _e !== void 0 ? _e : null;
147
- }
148
- if (isFirstParty !== undefined) {
149
- _queryParams["is_first_party"] = (_f = isFirstParty === null || isFirstParty === void 0 ? void 0 : isFirstParty.toString()) !== null && _f !== void 0 ? _f : null;
150
- }
151
- if (appType !== undefined) {
152
- _queryParams["app_type"] = appType;
153
- }
154
- if (q !== undefined) {
155
- _queryParams["q"] = q;
156
- }
129
+ const _queryParams = {
130
+ fields,
131
+ include_fields: includeFields,
132
+ page,
133
+ per_page: perPage,
134
+ include_totals: includeTotals,
135
+ is_global: isGlobal,
136
+ is_first_party: isFirstParty,
137
+ app_type: appType,
138
+ q,
139
+ };
157
140
  const _authRequest = yield this._options.authProvider.getAuthRequest();
158
- let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_g = this._options) === null || _g === void 0 ? void 0 : _g.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
159
- const _response = yield ((_h = this._options.fetcher) !== null && _h !== void 0 ? _h : core.fetcher)({
160
- 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"),
141
+ 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);
142
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
143
+ 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"),
161
144
  method: "GET",
162
145
  headers: _headers,
163
146
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
164
- 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,
165
- 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,
147
+ 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,
148
+ 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,
166
149
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
167
- fetchFn: (_r = this._options) === null || _r === void 0 ? void 0 : _r.fetch,
150
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
168
151
  logging: this._options.logging,
169
152
  });
170
153
  if (_response.ok) {
@@ -342,26 +325,23 @@ class ClientsClient {
342
325
  }
343
326
  __get(id_1) {
344
327
  return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
345
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
328
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
346
329
  const { fields, include_fields: includeFields } = request;
347
- const _queryParams = {};
348
- if (fields !== undefined) {
349
- _queryParams["fields"] = fields;
350
- }
351
- if (includeFields !== undefined) {
352
- _queryParams["include_fields"] = (_a = includeFields === null || includeFields === void 0 ? void 0 : includeFields.toString()) !== null && _a !== void 0 ? _a : null;
353
- }
330
+ const _queryParams = {
331
+ fields,
332
+ include_fields: includeFields,
333
+ };
354
334
  const _authRequest = yield this._options.authProvider.getAuthRequest();
355
- 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);
356
- const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
357
- 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)}`),
335
+ 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);
336
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
337
+ 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)}`),
358
338
  method: "GET",
359
339
  headers: _headers,
360
340
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
361
- 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,
362
- 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,
341
+ 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,
342
+ 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,
363
343
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
364
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
344
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
365
345
  logging: this._options.logging,
366
346
  });
367
347
  if (_response.ok) {