@dynamic-labs/sdk-api 0.0.921 → 0.0.923
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.
- package/package.json +1 -1
- package/src/apis/AllowlistsApi.cjs +245 -286
- package/src/apis/AllowlistsApi.js +245 -286
- package/src/apis/AnalyticsApi.cjs +210 -235
- package/src/apis/AnalyticsApi.js +210 -235
- package/src/apis/ChainalysisApi.cjs +66 -79
- package/src/apis/ChainalysisApi.js +66 -79
- package/src/apis/ChainsApi.cjs +25 -30
- package/src/apis/ChainsApi.js +25 -30
- package/src/apis/CustomFieldsApi.cjs +119 -140
- package/src/apis/CustomFieldsApi.js +119 -140
- package/src/apis/CustomHostnamesApi.cjs +55 -68
- package/src/apis/CustomHostnamesApi.js +55 -68
- package/src/apis/CustomNetworksApi.cjs +128 -149
- package/src/apis/CustomNetworksApi.js +128 -149
- package/src/apis/DeeplinkUrlsApi.cjs +70 -83
- package/src/apis/DeeplinkUrlsApi.js +70 -83
- package/src/apis/DepositApi.cjs +83 -100
- package/src/apis/DepositApi.js +83 -100
- package/src/apis/EnvironmentsApi.cjs +168 -197
- package/src/apis/EnvironmentsApi.js +168 -197
- package/src/apis/EventsApi.cjs +60 -73
- package/src/apis/EventsApi.js +60 -73
- package/src/apis/ExportsApi.cjs +89 -106
- package/src/apis/ExportsApi.js +89 -106
- package/src/apis/ExternalJwtApi.cjs +27 -32
- package/src/apis/ExternalJwtApi.js +27 -32
- package/src/apis/GatesApi.cjs +154 -183
- package/src/apis/GatesApi.js +154 -183
- package/src/apis/GlobalWalletAccessControlApi.cjs +159 -188
- package/src/apis/GlobalWalletAccessControlApi.js +159 -188
- package/src/apis/GlobalWalletConnectionsApi.cjs +28 -33
- package/src/apis/GlobalWalletConnectionsApi.js +28 -33
- package/src/apis/GlobalWalletsApi.cjs +90 -111
- package/src/apis/GlobalWalletsApi.js +90 -111
- package/src/apis/InvitesApi.cjs +120 -141
- package/src/apis/InvitesApi.js +120 -141
- package/src/apis/MembersApi.cjs +115 -136
- package/src/apis/MembersApi.js +115 -136
- package/src/apis/MfaApi.cjs +42 -51
- package/src/apis/MfaApi.js +42 -51
- package/src/apis/MfaSettingsApi.cjs +72 -85
- package/src/apis/MfaSettingsApi.js +72 -85
- package/src/apis/NameServicesApi.cjs +123 -148
- package/src/apis/NameServicesApi.js +123 -148
- package/src/apis/OrganizationsApi.cjs +328 -381
- package/src/apis/OrganizationsApi.js +328 -381
- package/src/apis/OriginsApi.cjs +58 -71
- package/src/apis/OriginsApi.js +58 -71
- package/src/apis/ProjectsApi.cjs +119 -140
- package/src/apis/ProjectsApi.js +119 -140
- package/src/apis/SDKApi.cjs +6187 -7365
- package/src/apis/SDKApi.d.ts +3 -2
- package/src/apis/SDKApi.js +6187 -7365
- package/src/apis/SDKViewsApi.cjs +59 -72
- package/src/apis/SDKViewsApi.js +59 -72
- package/src/apis/SessionsApi.cjs +69 -82
- package/src/apis/SessionsApi.js +69 -82
- package/src/apis/SettingsApi.cjs +273 -330
- package/src/apis/SettingsApi.js +273 -330
- package/src/apis/TestAccountApi.cjs +47 -60
- package/src/apis/TestAccountApi.js +47 -60
- package/src/apis/TokensApi.cjs +92 -109
- package/src/apis/TokensApi.js +92 -109
- package/src/apis/UserApiTokensApi.cjs +64 -77
- package/src/apis/UserApiTokensApi.js +64 -77
- package/src/apis/UsersApi.cjs +357 -410
- package/src/apis/UsersApi.js +357 -410
- package/src/apis/VisitsApi.cjs +34 -39
- package/src/apis/VisitsApi.js +34 -39
- package/src/apis/WaasApi.cjs +470 -559
- package/src/apis/WaasApi.js +470 -559
- package/src/apis/WalletConnectApi.cjs +21 -26
- package/src/apis/WalletConnectApi.js +21 -26
- package/src/apis/WalletsApi.cjs +340 -393
- package/src/apis/WalletsApi.js +340 -393
- package/src/apis/WebhooksApi.cjs +167 -200
- package/src/apis/WebhooksApi.js +167 -200
- package/src/index.cjs +8 -4
- package/src/index.js +2 -1
- package/src/models/CreateEmbeddedWalletSpecificOpts.cjs +2 -2
- package/src/models/CreateEmbeddedWalletSpecificOpts.js +2 -2
- package/src/models/NetworkConfiguration.cjs +4 -0
- package/src/models/NetworkConfiguration.d.ts +12 -0
- package/src/models/NetworkConfiguration.js +4 -0
- package/src/models/PrepareSigningRequest.cjs +35 -0
- package/src/models/PrepareSigningRequest.d.ts +33 -0
- package/src/models/PrepareSigningRequest.js +29 -0
- package/src/models/Provider.cjs +2 -0
- package/src/models/Provider.d.ts +6 -0
- package/src/models/Provider.js +2 -0
- package/src/models/ProviderCreateRequest.cjs +2 -0
- package/src/models/ProviderCreateRequest.d.ts +6 -0
- package/src/models/ProviderCreateRequest.js +2 -0
- package/src/models/ProviderUpdateRequest.cjs +2 -0
- package/src/models/ProviderUpdateRequest.d.ts +6 -0
- package/src/models/ProviderUpdateRequest.js +2 -0
- package/src/models/TransactionFeeEstimateRequest.cjs +37 -0
- package/src/models/TransactionFeeEstimateRequest.d.ts +39 -0
- package/src/models/TransactionFeeEstimateRequest.js +31 -0
- package/src/models/index.d.ts +2 -1
- package/src/runtime.cjs +45 -36
- package/src/runtime.js +45 -36
- package/_virtual/_tslib.cjs +0 -35
- package/_virtual/_tslib.js +0 -31
- package/src/models/InlineObject1.cjs +0 -43
- package/src/models/InlineObject1.d.ts +0 -27
- package/src/models/InlineObject1.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
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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
|
-
|
|
158
|
-
|
|
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
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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
|
-
|
|
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
|
-
|
|
204
|
-
|
|
205
|
-
|
|
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
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
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
|
-
|
|
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
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
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
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
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
|
-
|
|
267
|
-
|
|
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
|
-
|
|
277
|
-
|
|
278
|
-
|
|
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
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
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
|
-
|
|
304
|
-
|
|
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
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
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
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
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
|
-
|
|
341
|
-
|
|
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
|
-
|
|
351
|
-
|
|
352
|
-
|
|
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
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
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
|
-
|
|
378
|
-
|
|
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
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
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
|
-
|
|
396
|
-
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
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
|
-
|
|
427
|
-
|
|
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
|
-
|
|
437
|
-
|
|
438
|
-
|
|
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
|
-
|
|
441
|
-
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
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
|
-
|
|
469
|
-
|
|
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
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
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
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
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
|
-
|
|
511
|
-
|
|
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
|
|