@dynamic-labs/sdk-api 0.0.920 → 0.0.922

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 (120) hide show
  1. package/package.json +1 -1
  2. package/src/apis/AllowlistsApi.cjs +245 -286
  3. package/src/apis/AllowlistsApi.js +245 -286
  4. package/src/apis/AnalyticsApi.cjs +210 -235
  5. package/src/apis/AnalyticsApi.js +210 -235
  6. package/src/apis/ChainalysisApi.cjs +66 -79
  7. package/src/apis/ChainalysisApi.js +66 -79
  8. package/src/apis/ChainsApi.cjs +25 -30
  9. package/src/apis/ChainsApi.js +25 -30
  10. package/src/apis/CustomFieldsApi.cjs +119 -140
  11. package/src/apis/CustomFieldsApi.js +119 -140
  12. package/src/apis/CustomHostnamesApi.cjs +55 -68
  13. package/src/apis/CustomHostnamesApi.js +55 -68
  14. package/src/apis/CustomNetworksApi.cjs +128 -149
  15. package/src/apis/CustomNetworksApi.js +128 -149
  16. package/src/apis/DeeplinkUrlsApi.cjs +70 -83
  17. package/src/apis/DeeplinkUrlsApi.js +70 -83
  18. package/src/apis/DepositApi.cjs +83 -100
  19. package/src/apis/DepositApi.js +83 -100
  20. package/src/apis/EnvironmentsApi.cjs +168 -197
  21. package/src/apis/EnvironmentsApi.js +168 -197
  22. package/src/apis/EventsApi.cjs +60 -73
  23. package/src/apis/EventsApi.js +60 -73
  24. package/src/apis/ExportsApi.cjs +89 -106
  25. package/src/apis/ExportsApi.js +89 -106
  26. package/src/apis/ExternalJwtApi.cjs +27 -32
  27. package/src/apis/ExternalJwtApi.js +27 -32
  28. package/src/apis/GatesApi.cjs +154 -183
  29. package/src/apis/GatesApi.js +154 -183
  30. package/src/apis/GlobalWalletAccessControlApi.cjs +159 -188
  31. package/src/apis/GlobalWalletAccessControlApi.js +159 -188
  32. package/src/apis/GlobalWalletConnectionsApi.cjs +28 -33
  33. package/src/apis/GlobalWalletConnectionsApi.js +28 -33
  34. package/src/apis/GlobalWalletsApi.cjs +90 -111
  35. package/src/apis/GlobalWalletsApi.js +90 -111
  36. package/src/apis/InvitesApi.cjs +120 -141
  37. package/src/apis/InvitesApi.js +120 -141
  38. package/src/apis/MembersApi.cjs +115 -136
  39. package/src/apis/MembersApi.js +115 -136
  40. package/src/apis/MfaApi.cjs +42 -51
  41. package/src/apis/MfaApi.js +42 -51
  42. package/src/apis/MfaSettingsApi.cjs +72 -85
  43. package/src/apis/MfaSettingsApi.js +72 -85
  44. package/src/apis/NameServicesApi.cjs +123 -148
  45. package/src/apis/NameServicesApi.js +123 -148
  46. package/src/apis/OrganizationsApi.cjs +328 -381
  47. package/src/apis/OrganizationsApi.js +328 -381
  48. package/src/apis/OriginsApi.cjs +58 -71
  49. package/src/apis/OriginsApi.js +58 -71
  50. package/src/apis/ProjectsApi.cjs +119 -140
  51. package/src/apis/ProjectsApi.js +119 -140
  52. package/src/apis/SDKApi.cjs +6184 -7362
  53. package/src/apis/SDKApi.d.ts +3 -3
  54. package/src/apis/SDKApi.js +6184 -7362
  55. package/src/apis/SDKViewsApi.cjs +59 -72
  56. package/src/apis/SDKViewsApi.js +59 -72
  57. package/src/apis/SessionsApi.cjs +69 -82
  58. package/src/apis/SessionsApi.js +69 -82
  59. package/src/apis/SettingsApi.cjs +273 -330
  60. package/src/apis/SettingsApi.js +273 -330
  61. package/src/apis/TestAccountApi.cjs +47 -60
  62. package/src/apis/TestAccountApi.js +47 -60
  63. package/src/apis/TokensApi.cjs +92 -109
  64. package/src/apis/TokensApi.js +92 -109
  65. package/src/apis/UserApiTokensApi.cjs +64 -77
  66. package/src/apis/UserApiTokensApi.js +64 -77
  67. package/src/apis/UsersApi.cjs +357 -410
  68. package/src/apis/UsersApi.js +357 -410
  69. package/src/apis/VisitsApi.cjs +34 -39
  70. package/src/apis/VisitsApi.js +34 -39
  71. package/src/apis/WaasApi.cjs +470 -559
  72. package/src/apis/WaasApi.js +470 -559
  73. package/src/apis/WalletConnectApi.cjs +21 -26
  74. package/src/apis/WalletConnectApi.js +21 -26
  75. package/src/apis/WalletsApi.cjs +340 -393
  76. package/src/apis/WalletsApi.js +340 -393
  77. package/src/apis/WebhooksApi.cjs +167 -200
  78. package/src/apis/WebhooksApi.js +167 -200
  79. package/src/index.cjs +8 -16
  80. package/src/index.js +2 -4
  81. package/src/models/CheckoutTransaction.cjs +3 -10
  82. package/src/models/CheckoutTransaction.d.ts +3 -22
  83. package/src/models/CheckoutTransaction.js +3 -10
  84. package/src/models/CheckoutTransactionQuote.cjs +51 -0
  85. package/src/models/CheckoutTransactionQuote.d.ts +77 -0
  86. package/src/models/CheckoutTransactionQuote.js +45 -0
  87. package/src/models/CreateEmbeddedWalletSpecificOpts.cjs +2 -2
  88. package/src/models/CreateEmbeddedWalletSpecificOpts.js +2 -2
  89. package/src/models/Provider.cjs +2 -0
  90. package/src/models/Provider.d.ts +6 -0
  91. package/src/models/Provider.js +2 -0
  92. package/src/models/ProviderCreateRequest.cjs +2 -0
  93. package/src/models/ProviderCreateRequest.d.ts +6 -0
  94. package/src/models/ProviderCreateRequest.js +2 -0
  95. package/src/models/ProviderUpdateRequest.cjs +2 -0
  96. package/src/models/ProviderUpdateRequest.d.ts +6 -0
  97. package/src/models/ProviderUpdateRequest.js +2 -0
  98. package/src/models/SwapSigningPayload.cjs +4 -6
  99. package/src/models/SwapSigningPayload.d.ts +7 -9
  100. package/src/models/SwapSigningPayload.js +4 -6
  101. package/src/models/TransactionFeeEstimateRequest.cjs +37 -0
  102. package/src/models/TransactionFeeEstimateRequest.d.ts +39 -0
  103. package/src/models/TransactionFeeEstimateRequest.js +31 -0
  104. package/src/models/index.d.ts +2 -4
  105. package/src/runtime.cjs +45 -36
  106. package/src/runtime.js +45 -36
  107. package/_virtual/_tslib.cjs +0 -35
  108. package/_virtual/_tslib.js +0 -31
  109. package/src/models/CheckoutQuoteSnapshot.cjs +0 -50
  110. package/src/models/CheckoutQuoteSnapshot.d.ts +0 -76
  111. package/src/models/CheckoutQuoteSnapshot.js +0 -44
  112. package/src/models/InlineObject1.cjs +0 -43
  113. package/src/models/InlineObject1.d.ts +0 -27
  114. package/src/models/InlineObject1.js +0 -37
  115. package/src/models/SwapPsbtTransactionData.cjs +0 -43
  116. package/src/models/SwapPsbtTransactionData.d.ts +0 -27
  117. package/src/models/SwapPsbtTransactionData.js +0 -37
  118. package/src/models/SwapSerializedTransactionData.cjs +0 -43
  119. package/src/models/SwapSerializedTransactionData.d.ts +0 -27
  120. package/src/models/SwapSerializedTransactionData.js +0 -37
@@ -1,4 +1,3 @@
1
- import { __awaiter } from '../../_virtual/_tslib.js';
2
1
  import { BaseAPI, RequiredError, JSONApiResponse, VoidApiResponse } from '../runtime.js';
3
2
  import '../models/AccessOutcomeEnum.js';
4
3
  import '../models/ExchangeKeyEnum.js';
@@ -121,396 +120,356 @@ class AllowlistsApi extends BaseAPI {
121
120
  * Creates a new allowlist for the specified environment.
122
121
  * Create an allowlist for the environment
123
122
  */
124
- createAllowlistByEnvironmentIdRaw(requestParameters, initOverrides) {
125
- return __awaiter(this, void 0, void 0, function* () {
126
- if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
127
- throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling createAllowlistByEnvironmentId.');
123
+ async createAllowlistByEnvironmentIdRaw(requestParameters, initOverrides) {
124
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
125
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling createAllowlistByEnvironmentId.');
126
+ }
127
+ if (requestParameters.postAllowlistsRequest === null || requestParameters.postAllowlistsRequest === undefined) {
128
+ throw new RequiredError('postAllowlistsRequest', 'Required parameter requestParameters.postAllowlistsRequest was null or undefined when calling createAllowlistByEnvironmentId.');
129
+ }
130
+ const queryParameters = {};
131
+ const headerParameters = {};
132
+ headerParameters['Content-Type'] = 'application/json';
133
+ if (this.configuration && this.configuration.accessToken) {
134
+ const token = this.configuration.accessToken;
135
+ const tokenString = await token("bearerAuth", []);
136
+ if (tokenString) {
137
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
128
138
  }
129
- if (requestParameters.postAllowlistsRequest === null || requestParameters.postAllowlistsRequest === undefined) {
130
- throw new RequiredError('postAllowlistsRequest', 'Required parameter requestParameters.postAllowlistsRequest was null or undefined when calling createAllowlistByEnvironmentId.');
131
- }
132
- const queryParameters = {};
133
- const headerParameters = {};
134
- headerParameters['Content-Type'] = 'application/json';
135
- if (this.configuration && this.configuration.accessToken) {
136
- const token = this.configuration.accessToken;
137
- const tokenString = yield token("bearerAuth", []);
138
- if (tokenString) {
139
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
140
- }
141
- }
142
- const response = yield this.request({
143
- path: `/environments/{environmentId}/allowlists`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
144
- method: 'POST',
145
- headers: headerParameters,
146
- query: queryParameters,
147
- body: PostAllowlistsRequestToJSON(requestParameters.postAllowlistsRequest),
148
- }, initOverrides);
149
- return new JSONApiResponse(response, (jsonValue) => AllowlistFromJSON(jsonValue));
150
- });
139
+ }
140
+ const response = await this.request({
141
+ path: `/environments/{environmentId}/allowlists`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
142
+ method: 'POST',
143
+ headers: headerParameters,
144
+ query: queryParameters,
145
+ body: PostAllowlistsRequestToJSON(requestParameters.postAllowlistsRequest),
146
+ }, initOverrides);
147
+ return new JSONApiResponse(response, (jsonValue) => AllowlistFromJSON(jsonValue));
151
148
  }
152
149
  /**
153
150
  * Creates a new allowlist for the specified environment.
154
151
  * Create an allowlist for the environment
155
152
  */
156
- createAllowlistByEnvironmentId(requestParameters, initOverrides) {
157
- return __awaiter(this, void 0, void 0, function* () {
158
- const response = yield this.createAllowlistByEnvironmentIdRaw(requestParameters, initOverrides);
159
- return yield response.value();
160
- });
153
+ async createAllowlistByEnvironmentId(requestParameters, initOverrides) {
154
+ const response = await this.createAllowlistByEnvironmentIdRaw(requestParameters, initOverrides);
155
+ return await response.value();
161
156
  }
162
157
  /**
163
158
  * Permanently removes the specified allowlist.
164
159
  * Delete an allowlist
165
160
  */
166
- deleteAllowlistByIdRaw(requestParameters, initOverrides) {
167
- return __awaiter(this, void 0, void 0, function* () {
168
- if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
169
- throw new RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling deleteAllowlistById.');
170
- }
171
- const queryParameters = {};
172
- const headerParameters = {};
173
- if (this.configuration && this.configuration.accessToken) {
174
- const token = this.configuration.accessToken;
175
- const tokenString = yield token("bearerAuth", []);
176
- if (tokenString) {
177
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
178
- }
161
+ async deleteAllowlistByIdRaw(requestParameters, initOverrides) {
162
+ if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
163
+ throw new RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling deleteAllowlistById.');
164
+ }
165
+ const queryParameters = {};
166
+ const headerParameters = {};
167
+ if (this.configuration && this.configuration.accessToken) {
168
+ const token = this.configuration.accessToken;
169
+ const tokenString = await token("bearerAuth", []);
170
+ if (tokenString) {
171
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
179
172
  }
180
- const response = yield this.request({
181
- path: `/allowlists/{allowlistId}`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
182
- method: 'DELETE',
183
- headers: headerParameters,
184
- query: queryParameters,
185
- }, initOverrides);
186
- return new VoidApiResponse(response);
187
- });
173
+ }
174
+ const response = await this.request({
175
+ path: `/allowlists/{allowlistId}`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
176
+ method: 'DELETE',
177
+ headers: headerParameters,
178
+ query: queryParameters,
179
+ }, initOverrides);
180
+ return new VoidApiResponse(response);
188
181
  }
189
182
  /**
190
183
  * Permanently removes the specified allowlist.
191
184
  * Delete an allowlist
192
185
  */
193
- deleteAllowlistById(requestParameters, initOverrides) {
194
- return __awaiter(this, void 0, void 0, function* () {
195
- yield this.deleteAllowlistByIdRaw(requestParameters, initOverrides);
196
- });
186
+ async deleteAllowlistById(requestParameters, initOverrides) {
187
+ await this.deleteAllowlistByIdRaw(requestParameters, initOverrides);
197
188
  }
198
189
  /**
199
190
  * Permanently removes the specified allowlist entry.
200
191
  * Delete an allowlist entry
201
192
  */
202
- deleteAllowlistEntryByIdRaw(requestParameters, initOverrides) {
203
- return __awaiter(this, void 0, void 0, function* () {
204
- if (requestParameters.allowlistEntryId === null || requestParameters.allowlistEntryId === undefined) {
205
- throw new RequiredError('allowlistEntryId', 'Required parameter requestParameters.allowlistEntryId was null or undefined when calling deleteAllowlistEntryById.');
193
+ async deleteAllowlistEntryByIdRaw(requestParameters, initOverrides) {
194
+ if (requestParameters.allowlistEntryId === null || requestParameters.allowlistEntryId === undefined) {
195
+ throw new RequiredError('allowlistEntryId', 'Required parameter requestParameters.allowlistEntryId was null or undefined when calling deleteAllowlistEntryById.');
196
+ }
197
+ const queryParameters = {};
198
+ const headerParameters = {};
199
+ if (this.configuration && this.configuration.accessToken) {
200
+ const token = this.configuration.accessToken;
201
+ const tokenString = await token("bearerAuth", []);
202
+ if (tokenString) {
203
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
206
204
  }
207
- const queryParameters = {};
208
- const headerParameters = {};
209
- if (this.configuration && this.configuration.accessToken) {
210
- const token = this.configuration.accessToken;
211
- const tokenString = yield token("bearerAuth", []);
212
- if (tokenString) {
213
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
214
- }
215
- }
216
- const response = yield this.request({
217
- path: `/allowlistEntries/{allowlistEntryId}`.replace(`{${"allowlistEntryId"}}`, encodeURIComponent(String(requestParameters.allowlistEntryId))),
218
- method: 'DELETE',
219
- headers: headerParameters,
220
- query: queryParameters,
221
- }, initOverrides);
222
- return new VoidApiResponse(response);
223
- });
205
+ }
206
+ const response = await this.request({
207
+ path: `/allowlistEntries/{allowlistEntryId}`.replace(`{${"allowlistEntryId"}}`, encodeURIComponent(String(requestParameters.allowlistEntryId))),
208
+ method: 'DELETE',
209
+ headers: headerParameters,
210
+ query: queryParameters,
211
+ }, initOverrides);
212
+ return new VoidApiResponse(response);
224
213
  }
225
214
  /**
226
215
  * Permanently removes the specified allowlist entry.
227
216
  * Delete an allowlist entry
228
217
  */
229
- deleteAllowlistEntryById(requestParameters, initOverrides) {
230
- return __awaiter(this, void 0, void 0, function* () {
231
- yield this.deleteAllowlistEntryByIdRaw(requestParameters, initOverrides);
232
- });
218
+ async deleteAllowlistEntryById(requestParameters, initOverrides) {
219
+ await this.deleteAllowlistEntryByIdRaw(requestParameters, initOverrides);
233
220
  }
234
221
  /**
235
222
  * Disables the specified allowlist.
236
223
  * Disable the allow list
237
224
  */
238
- disableAllowlistByIdRaw(requestParameters, initOverrides) {
239
- return __awaiter(this, void 0, void 0, function* () {
240
- if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
241
- throw new RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling disableAllowlistById.');
242
- }
243
- const queryParameters = {};
244
- const headerParameters = {};
245
- if (this.configuration && this.configuration.accessToken) {
246
- const token = this.configuration.accessToken;
247
- const tokenString = yield token("bearerAuth", []);
248
- if (tokenString) {
249
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
250
- }
225
+ async disableAllowlistByIdRaw(requestParameters, initOverrides) {
226
+ if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
227
+ throw new RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling disableAllowlistById.');
228
+ }
229
+ const queryParameters = {};
230
+ const headerParameters = {};
231
+ if (this.configuration && this.configuration.accessToken) {
232
+ const token = this.configuration.accessToken;
233
+ const tokenString = await token("bearerAuth", []);
234
+ if (tokenString) {
235
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
251
236
  }
252
- const response = yield this.request({
253
- path: `/allowlists/{allowlistId}/disable`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
254
- method: 'PUT',
255
- headers: headerParameters,
256
- query: queryParameters,
257
- }, initOverrides);
258
- return new JSONApiResponse(response, (jsonValue) => AllowlistFromJSON(jsonValue));
259
- });
237
+ }
238
+ const response = await this.request({
239
+ path: `/allowlists/{allowlistId}/disable`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
240
+ method: 'PUT',
241
+ headers: headerParameters,
242
+ query: queryParameters,
243
+ }, initOverrides);
244
+ return new JSONApiResponse(response, (jsonValue) => AllowlistFromJSON(jsonValue));
260
245
  }
261
246
  /**
262
247
  * Disables the specified allowlist.
263
248
  * Disable the allow list
264
249
  */
265
- disableAllowlistById(requestParameters, initOverrides) {
266
- return __awaiter(this, void 0, void 0, function* () {
267
- const response = yield this.disableAllowlistByIdRaw(requestParameters, initOverrides);
268
- return yield response.value();
269
- });
250
+ async disableAllowlistById(requestParameters, initOverrides) {
251
+ const response = await this.disableAllowlistByIdRaw(requestParameters, initOverrides);
252
+ return await response.value();
270
253
  }
271
254
  /**
272
255
  * Enables the specified allowlist.
273
256
  * Enable the allowlist
274
257
  */
275
- enableAllowlistByIdRaw(requestParameters, initOverrides) {
276
- return __awaiter(this, void 0, void 0, function* () {
277
- if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
278
- throw new RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling enableAllowlistById.');
258
+ async enableAllowlistByIdRaw(requestParameters, initOverrides) {
259
+ if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
260
+ throw new RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling enableAllowlistById.');
261
+ }
262
+ const queryParameters = {};
263
+ const headerParameters = {};
264
+ if (this.configuration && this.configuration.accessToken) {
265
+ const token = this.configuration.accessToken;
266
+ const tokenString = await token("bearerAuth", []);
267
+ if (tokenString) {
268
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
279
269
  }
280
- const queryParameters = {};
281
- const headerParameters = {};
282
- if (this.configuration && this.configuration.accessToken) {
283
- const token = this.configuration.accessToken;
284
- const tokenString = yield token("bearerAuth", []);
285
- if (tokenString) {
286
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
287
- }
288
- }
289
- const response = yield this.request({
290
- path: `/allowlists/{allowlistId}/enable`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
291
- method: 'PUT',
292
- headers: headerParameters,
293
- query: queryParameters,
294
- }, initOverrides);
295
- return new JSONApiResponse(response, (jsonValue) => AllowlistFromJSON(jsonValue));
296
- });
270
+ }
271
+ const response = await this.request({
272
+ path: `/allowlists/{allowlistId}/enable`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
273
+ method: 'PUT',
274
+ headers: headerParameters,
275
+ query: queryParameters,
276
+ }, initOverrides);
277
+ return new JSONApiResponse(response, (jsonValue) => AllowlistFromJSON(jsonValue));
297
278
  }
298
279
  /**
299
280
  * Enables the specified allowlist.
300
281
  * Enable the allowlist
301
282
  */
302
- enableAllowlistById(requestParameters, initOverrides) {
303
- return __awaiter(this, void 0, void 0, function* () {
304
- const response = yield this.enableAllowlistByIdRaw(requestParameters, initOverrides);
305
- return yield response.value();
306
- });
283
+ async enableAllowlistById(requestParameters, initOverrides) {
284
+ const response = await this.enableAllowlistByIdRaw(requestParameters, initOverrides);
285
+ return await response.value();
307
286
  }
308
287
  /**
309
288
  * Returns the allowlists for the specified environment.
310
289
  * Get allowlists for the environment
311
290
  */
312
- getAllowlistsByEnvironmentIdRaw(requestParameters, initOverrides) {
313
- return __awaiter(this, void 0, void 0, function* () {
314
- if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
315
- throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getAllowlistsByEnvironmentId.');
316
- }
317
- const queryParameters = {};
318
- const headerParameters = {};
319
- if (this.configuration && this.configuration.accessToken) {
320
- const token = this.configuration.accessToken;
321
- const tokenString = yield token("bearerAuth", []);
322
- if (tokenString) {
323
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
324
- }
291
+ async getAllowlistsByEnvironmentIdRaw(requestParameters, initOverrides) {
292
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
293
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getAllowlistsByEnvironmentId.');
294
+ }
295
+ const queryParameters = {};
296
+ const headerParameters = {};
297
+ if (this.configuration && this.configuration.accessToken) {
298
+ const token = this.configuration.accessToken;
299
+ const tokenString = await token("bearerAuth", []);
300
+ if (tokenString) {
301
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
325
302
  }
326
- const response = yield this.request({
327
- path: `/environments/{environmentId}/allowlists`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
328
- method: 'GET',
329
- headers: headerParameters,
330
- query: queryParameters,
331
- }, initOverrides);
332
- return new JSONApiResponse(response, (jsonValue) => jsonValue.map(AllowlistFromJSON));
333
- });
303
+ }
304
+ const response = await this.request({
305
+ path: `/environments/{environmentId}/allowlists`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
306
+ method: 'GET',
307
+ headers: headerParameters,
308
+ query: queryParameters,
309
+ }, initOverrides);
310
+ return new JSONApiResponse(response, (jsonValue) => jsonValue.map(AllowlistFromJSON));
334
311
  }
335
312
  /**
336
313
  * Returns the allowlists for the specified environment.
337
314
  * Get allowlists for the environment
338
315
  */
339
- getAllowlistsByEnvironmentId(requestParameters, initOverrides) {
340
- return __awaiter(this, void 0, void 0, function* () {
341
- const response = yield this.getAllowlistsByEnvironmentIdRaw(requestParameters, initOverrides);
342
- return yield response.value();
343
- });
316
+ async getAllowlistsByEnvironmentId(requestParameters, initOverrides) {
317
+ const response = await this.getAllowlistsByEnvironmentIdRaw(requestParameters, initOverrides);
318
+ return await response.value();
344
319
  }
345
320
  /**
346
321
  * Returns an allowlist by its unique identifier.
347
322
  * Get allowlist by id
348
323
  */
349
- getAllowlistsByIdRaw(requestParameters, initOverrides) {
350
- return __awaiter(this, void 0, void 0, function* () {
351
- if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
352
- throw new RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling getAllowlistsById.');
324
+ async getAllowlistsByIdRaw(requestParameters, initOverrides) {
325
+ if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
326
+ throw new RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling getAllowlistsById.');
327
+ }
328
+ const queryParameters = {};
329
+ const headerParameters = {};
330
+ if (this.configuration && this.configuration.accessToken) {
331
+ const token = this.configuration.accessToken;
332
+ const tokenString = await token("bearerAuth", []);
333
+ if (tokenString) {
334
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
353
335
  }
354
- const queryParameters = {};
355
- const headerParameters = {};
356
- if (this.configuration && this.configuration.accessToken) {
357
- const token = this.configuration.accessToken;
358
- const tokenString = yield token("bearerAuth", []);
359
- if (tokenString) {
360
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
361
- }
362
- }
363
- const response = yield this.request({
364
- path: `/allowlists/{allowlistId}`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
365
- method: 'GET',
366
- headers: headerParameters,
367
- query: queryParameters,
368
- }, initOverrides);
369
- return new JSONApiResponse(response, (jsonValue) => AllowlistFromJSON(jsonValue));
370
- });
336
+ }
337
+ const response = await this.request({
338
+ path: `/allowlists/{allowlistId}`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
339
+ method: 'GET',
340
+ headers: headerParameters,
341
+ query: queryParameters,
342
+ }, initOverrides);
343
+ return new JSONApiResponse(response, (jsonValue) => AllowlistFromJSON(jsonValue));
371
344
  }
372
345
  /**
373
346
  * Returns an allowlist by its unique identifier.
374
347
  * Get allowlist by id
375
348
  */
376
- getAllowlistsById(requestParameters, initOverrides) {
377
- return __awaiter(this, void 0, void 0, function* () {
378
- const response = yield this.getAllowlistsByIdRaw(requestParameters, initOverrides);
379
- return yield response.value();
380
- });
349
+ async getAllowlistsById(requestParameters, initOverrides) {
350
+ const response = await this.getAllowlistsByIdRaw(requestParameters, initOverrides);
351
+ return await response.value();
381
352
  }
382
353
  /**
383
354
  * Returns all entries for the specified allowlist.
384
355
  * Get all entries for an allowlist
385
356
  */
386
- getEntriesByAllowlistIdRaw(requestParameters, initOverrides) {
387
- return __awaiter(this, void 0, void 0, function* () {
388
- if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
389
- throw new RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling getEntriesByAllowlistId.');
390
- }
391
- const queryParameters = {};
392
- if (requestParameters.orderBy !== undefined) {
393
- queryParameters['orderBy'] = requestParameters.orderBy;
357
+ async getEntriesByAllowlistIdRaw(requestParameters, initOverrides) {
358
+ if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
359
+ throw new RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling getEntriesByAllowlistId.');
360
+ }
361
+ const queryParameters = {};
362
+ if (requestParameters.orderBy !== undefined) {
363
+ queryParameters['orderBy'] = requestParameters.orderBy;
364
+ }
365
+ if (requestParameters.offset !== undefined) {
366
+ queryParameters['offset'] = requestParameters.offset;
367
+ }
368
+ if (requestParameters.limit !== undefined) {
369
+ queryParameters['limit'] = requestParameters.limit;
370
+ }
371
+ if (requestParameters.query !== undefined) {
372
+ queryParameters['query'] = requestParameters.query;
373
+ }
374
+ const headerParameters = {};
375
+ if (this.configuration && this.configuration.accessToken) {
376
+ const token = this.configuration.accessToken;
377
+ const tokenString = await token("bearerAuth", []);
378
+ if (tokenString) {
379
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
394
380
  }
395
- if (requestParameters.offset !== undefined) {
396
- queryParameters['offset'] = requestParameters.offset;
397
- }
398
- if (requestParameters.limit !== undefined) {
399
- queryParameters['limit'] = requestParameters.limit;
400
- }
401
- if (requestParameters.query !== undefined) {
402
- queryParameters['query'] = requestParameters.query;
403
- }
404
- const headerParameters = {};
405
- if (this.configuration && this.configuration.accessToken) {
406
- const token = this.configuration.accessToken;
407
- const tokenString = yield token("bearerAuth", []);
408
- if (tokenString) {
409
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
410
- }
411
- }
412
- const response = yield this.request({
413
- path: `/allowlists/{allowlistId}/entries`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
414
- method: 'GET',
415
- headers: headerParameters,
416
- query: queryParameters,
417
- }, initOverrides);
418
- return new JSONApiResponse(response, (jsonValue) => AllowlistEntriesResponseFromJSON(jsonValue));
419
- });
381
+ }
382
+ const response = await this.request({
383
+ path: `/allowlists/{allowlistId}/entries`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
384
+ method: 'GET',
385
+ headers: headerParameters,
386
+ query: queryParameters,
387
+ }, initOverrides);
388
+ return new JSONApiResponse(response, (jsonValue) => AllowlistEntriesResponseFromJSON(jsonValue));
420
389
  }
421
390
  /**
422
391
  * Returns all entries for the specified allowlist.
423
392
  * Get all entries for an allowlist
424
393
  */
425
- getEntriesByAllowlistId(requestParameters, initOverrides) {
426
- return __awaiter(this, void 0, void 0, function* () {
427
- const response = yield this.getEntriesByAllowlistIdRaw(requestParameters, initOverrides);
428
- return yield response.value();
429
- });
394
+ async getEntriesByAllowlistId(requestParameters, initOverrides) {
395
+ const response = await this.getEntriesByAllowlistIdRaw(requestParameters, initOverrides);
396
+ return await response.value();
430
397
  }
431
398
  /**
432
399
  * Creates a new entry for the specified allowlist.
433
400
  * Create an allowlist entry
434
401
  */
435
- postEntryByAllowlistIdRaw(requestParameters, initOverrides) {
436
- return __awaiter(this, void 0, void 0, function* () {
437
- if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
438
- throw new RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling postEntryByAllowlistId.');
402
+ async postEntryByAllowlistIdRaw(requestParameters, initOverrides) {
403
+ if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
404
+ throw new RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling postEntryByAllowlistId.');
405
+ }
406
+ if (requestParameters.postAllowlistEntriesRequest === null || requestParameters.postAllowlistEntriesRequest === undefined) {
407
+ throw new RequiredError('postAllowlistEntriesRequest', 'Required parameter requestParameters.postAllowlistEntriesRequest was null or undefined when calling postEntryByAllowlistId.');
408
+ }
409
+ const queryParameters = {};
410
+ const headerParameters = {};
411
+ headerParameters['Content-Type'] = 'application/json';
412
+ if (this.configuration && this.configuration.accessToken) {
413
+ const token = this.configuration.accessToken;
414
+ const tokenString = await token("bearerAuth", []);
415
+ if (tokenString) {
416
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
439
417
  }
440
- if (requestParameters.postAllowlistEntriesRequest === null || requestParameters.postAllowlistEntriesRequest === undefined) {
441
- throw new RequiredError('postAllowlistEntriesRequest', 'Required parameter requestParameters.postAllowlistEntriesRequest was null or undefined when calling postEntryByAllowlistId.');
442
- }
443
- const queryParameters = {};
444
- const headerParameters = {};
445
- headerParameters['Content-Type'] = 'application/json';
446
- if (this.configuration && this.configuration.accessToken) {
447
- const token = this.configuration.accessToken;
448
- const tokenString = yield token("bearerAuth", []);
449
- if (tokenString) {
450
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
451
- }
452
- }
453
- const response = yield this.request({
454
- path: `/allowlists/{allowlistId}/entries`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
455
- method: 'POST',
456
- headers: headerParameters,
457
- query: queryParameters,
458
- body: PostAllowlistEntriesRequestToJSON(requestParameters.postAllowlistEntriesRequest),
459
- }, initOverrides);
460
- return new JSONApiResponse(response, (jsonValue) => AllowlistEntryFromJSON(jsonValue));
461
- });
418
+ }
419
+ const response = await this.request({
420
+ path: `/allowlists/{allowlistId}/entries`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
421
+ method: 'POST',
422
+ headers: headerParameters,
423
+ query: queryParameters,
424
+ body: PostAllowlistEntriesRequestToJSON(requestParameters.postAllowlistEntriesRequest),
425
+ }, initOverrides);
426
+ return new JSONApiResponse(response, (jsonValue) => AllowlistEntryFromJSON(jsonValue));
462
427
  }
463
428
  /**
464
429
  * Creates a new entry for the specified allowlist.
465
430
  * Create an allowlist entry
466
431
  */
467
- postEntryByAllowlistId(requestParameters, initOverrides) {
468
- return __awaiter(this, void 0, void 0, function* () {
469
- const response = yield this.postEntryByAllowlistIdRaw(requestParameters, initOverrides);
470
- return yield response.value();
471
- });
432
+ async postEntryByAllowlistId(requestParameters, initOverrides) {
433
+ const response = await this.postEntryByAllowlistIdRaw(requestParameters, initOverrides);
434
+ return await response.value();
472
435
  }
473
436
  /**
474
437
  * Updates the specified allowlist.
475
438
  * Update the outcome, scope, or name of an allowlist entry by ID
476
439
  */
477
- updateAllowlistByIdRaw(requestParameters, initOverrides) {
478
- return __awaiter(this, void 0, void 0, function* () {
479
- if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
480
- throw new RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling updateAllowlistById.');
481
- }
482
- if (requestParameters.postAllowlistsRequest === null || requestParameters.postAllowlistsRequest === undefined) {
483
- throw new RequiredError('postAllowlistsRequest', 'Required parameter requestParameters.postAllowlistsRequest was null or undefined when calling updateAllowlistById.');
484
- }
485
- const queryParameters = {};
486
- const headerParameters = {};
487
- headerParameters['Content-Type'] = 'application/json';
488
- if (this.configuration && this.configuration.accessToken) {
489
- const token = this.configuration.accessToken;
490
- const tokenString = yield token("bearerAuth", []);
491
- if (tokenString) {
492
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
493
- }
440
+ async updateAllowlistByIdRaw(requestParameters, initOverrides) {
441
+ if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
442
+ throw new RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling updateAllowlistById.');
443
+ }
444
+ if (requestParameters.postAllowlistsRequest === null || requestParameters.postAllowlistsRequest === undefined) {
445
+ throw new RequiredError('postAllowlistsRequest', 'Required parameter requestParameters.postAllowlistsRequest was null or undefined when calling updateAllowlistById.');
446
+ }
447
+ const queryParameters = {};
448
+ const headerParameters = {};
449
+ headerParameters['Content-Type'] = 'application/json';
450
+ if (this.configuration && this.configuration.accessToken) {
451
+ const token = this.configuration.accessToken;
452
+ const tokenString = await token("bearerAuth", []);
453
+ if (tokenString) {
454
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
494
455
  }
495
- const response = yield this.request({
496
- path: `/allowlists/{allowlistId}`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
497
- method: 'PUT',
498
- headers: headerParameters,
499
- query: queryParameters,
500
- body: PostAllowlistsRequestToJSON(requestParameters.postAllowlistsRequest),
501
- }, initOverrides);
502
- return new JSONApiResponse(response, (jsonValue) => AllowlistFromJSON(jsonValue));
503
- });
456
+ }
457
+ const response = await this.request({
458
+ path: `/allowlists/{allowlistId}`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
459
+ method: 'PUT',
460
+ headers: headerParameters,
461
+ query: queryParameters,
462
+ body: PostAllowlistsRequestToJSON(requestParameters.postAllowlistsRequest),
463
+ }, initOverrides);
464
+ return new JSONApiResponse(response, (jsonValue) => AllowlistFromJSON(jsonValue));
504
465
  }
505
466
  /**
506
467
  * Updates the specified allowlist.
507
468
  * Update the outcome, scope, or name of an allowlist entry by ID
508
469
  */
509
- updateAllowlistById(requestParameters, initOverrides) {
510
- return __awaiter(this, void 0, void 0, function* () {
511
- const response = yield this.updateAllowlistByIdRaw(requestParameters, initOverrides);
512
- return yield response.value();
513
- });
470
+ async updateAllowlistById(requestParameters, initOverrides) {
471
+ const response = await this.updateAllowlistByIdRaw(requestParameters, initOverrides);
472
+ return await response.value();
514
473
  }
515
474
  }
516
475