@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.
- 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 +6184 -7362
- package/src/apis/SDKApi.d.ts +3 -3
- package/src/apis/SDKApi.js +6184 -7362
- 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 -16
- package/src/index.js +2 -4
- package/src/models/CheckoutTransaction.cjs +3 -10
- package/src/models/CheckoutTransaction.d.ts +3 -22
- package/src/models/CheckoutTransaction.js +3 -10
- package/src/models/CheckoutTransactionQuote.cjs +51 -0
- package/src/models/CheckoutTransactionQuote.d.ts +77 -0
- package/src/models/CheckoutTransactionQuote.js +45 -0
- package/src/models/CreateEmbeddedWalletSpecificOpts.cjs +2 -2
- package/src/models/CreateEmbeddedWalletSpecificOpts.js +2 -2
- 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/SwapSigningPayload.cjs +4 -6
- package/src/models/SwapSigningPayload.d.ts +7 -9
- package/src/models/SwapSigningPayload.js +4 -6
- 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 -4
- 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/CheckoutQuoteSnapshot.cjs +0 -50
- package/src/models/CheckoutQuoteSnapshot.d.ts +0 -76
- package/src/models/CheckoutQuoteSnapshot.js +0 -44
- package/src/models/InlineObject1.cjs +0 -43
- package/src/models/InlineObject1.d.ts +0 -27
- package/src/models/InlineObject1.js +0 -37
- package/src/models/SwapPsbtTransactionData.cjs +0 -43
- package/src/models/SwapPsbtTransactionData.d.ts +0 -27
- package/src/models/SwapPsbtTransactionData.js +0 -37
- package/src/models/SwapSerializedTransactionData.cjs +0 -43
- package/src/models/SwapSerializedTransactionData.d.ts +0 -27
- package/src/models/SwapSerializedTransactionData.js +0 -37
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _tslib = require('../../_virtual/_tslib.cjs');
|
|
6
5
|
var runtime = require('../runtime.cjs');
|
|
7
6
|
require('../models/AccessOutcomeEnum.cjs');
|
|
8
7
|
require('../models/ExchangeKeyEnum.cjs');
|
|
@@ -125,396 +124,356 @@ class AllowlistsApi extends runtime.BaseAPI {
|
|
|
125
124
|
* Creates a new allowlist for the specified environment.
|
|
126
125
|
* Create an allowlist for the environment
|
|
127
126
|
*/
|
|
128
|
-
createAllowlistByEnvironmentIdRaw(requestParameters, initOverrides) {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
127
|
+
async createAllowlistByEnvironmentIdRaw(requestParameters, initOverrides) {
|
|
128
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
129
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling createAllowlistByEnvironmentId.');
|
|
130
|
+
}
|
|
131
|
+
if (requestParameters.postAllowlistsRequest === null || requestParameters.postAllowlistsRequest === undefined) {
|
|
132
|
+
throw new runtime.RequiredError('postAllowlistsRequest', 'Required parameter requestParameters.postAllowlistsRequest was null or undefined when calling createAllowlistByEnvironmentId.');
|
|
133
|
+
}
|
|
134
|
+
const queryParameters = {};
|
|
135
|
+
const headerParameters = {};
|
|
136
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
137
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
138
|
+
const token = this.configuration.accessToken;
|
|
139
|
+
const tokenString = await token("bearerAuth", []);
|
|
140
|
+
if (tokenString) {
|
|
141
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
132
142
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
if (tokenString) {
|
|
143
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
const response = yield this.request({
|
|
147
|
-
path: `/environments/{environmentId}/allowlists`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
|
|
148
|
-
method: 'POST',
|
|
149
|
-
headers: headerParameters,
|
|
150
|
-
query: queryParameters,
|
|
151
|
-
body: PostAllowlistsRequest.PostAllowlistsRequestToJSON(requestParameters.postAllowlistsRequest),
|
|
152
|
-
}, initOverrides);
|
|
153
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => Allowlist.AllowlistFromJSON(jsonValue));
|
|
154
|
-
});
|
|
143
|
+
}
|
|
144
|
+
const response = await this.request({
|
|
145
|
+
path: `/environments/{environmentId}/allowlists`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
|
|
146
|
+
method: 'POST',
|
|
147
|
+
headers: headerParameters,
|
|
148
|
+
query: queryParameters,
|
|
149
|
+
body: PostAllowlistsRequest.PostAllowlistsRequestToJSON(requestParameters.postAllowlistsRequest),
|
|
150
|
+
}, initOverrides);
|
|
151
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => Allowlist.AllowlistFromJSON(jsonValue));
|
|
155
152
|
}
|
|
156
153
|
/**
|
|
157
154
|
* Creates a new allowlist for the specified environment.
|
|
158
155
|
* Create an allowlist for the environment
|
|
159
156
|
*/
|
|
160
|
-
createAllowlistByEnvironmentId(requestParameters, initOverrides) {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
return yield response.value();
|
|
164
|
-
});
|
|
157
|
+
async createAllowlistByEnvironmentId(requestParameters, initOverrides) {
|
|
158
|
+
const response = await this.createAllowlistByEnvironmentIdRaw(requestParameters, initOverrides);
|
|
159
|
+
return await response.value();
|
|
165
160
|
}
|
|
166
161
|
/**
|
|
167
162
|
* Permanently removes the specified allowlist.
|
|
168
163
|
* Delete an allowlist
|
|
169
164
|
*/
|
|
170
|
-
deleteAllowlistByIdRaw(requestParameters, initOverrides) {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
182
|
-
}
|
|
165
|
+
async deleteAllowlistByIdRaw(requestParameters, initOverrides) {
|
|
166
|
+
if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
|
|
167
|
+
throw new runtime.RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling deleteAllowlistById.');
|
|
168
|
+
}
|
|
169
|
+
const queryParameters = {};
|
|
170
|
+
const headerParameters = {};
|
|
171
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
172
|
+
const token = this.configuration.accessToken;
|
|
173
|
+
const tokenString = await token("bearerAuth", []);
|
|
174
|
+
if (tokenString) {
|
|
175
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
183
176
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
177
|
+
}
|
|
178
|
+
const response = await this.request({
|
|
179
|
+
path: `/allowlists/{allowlistId}`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
|
|
180
|
+
method: 'DELETE',
|
|
181
|
+
headers: headerParameters,
|
|
182
|
+
query: queryParameters,
|
|
183
|
+
}, initOverrides);
|
|
184
|
+
return new runtime.VoidApiResponse(response);
|
|
192
185
|
}
|
|
193
186
|
/**
|
|
194
187
|
* Permanently removes the specified allowlist.
|
|
195
188
|
* Delete an allowlist
|
|
196
189
|
*/
|
|
197
|
-
deleteAllowlistById(requestParameters, initOverrides) {
|
|
198
|
-
|
|
199
|
-
yield this.deleteAllowlistByIdRaw(requestParameters, initOverrides);
|
|
200
|
-
});
|
|
190
|
+
async deleteAllowlistById(requestParameters, initOverrides) {
|
|
191
|
+
await this.deleteAllowlistByIdRaw(requestParameters, initOverrides);
|
|
201
192
|
}
|
|
202
193
|
/**
|
|
203
194
|
* Permanently removes the specified allowlist entry.
|
|
204
195
|
* Delete an allowlist entry
|
|
205
196
|
*/
|
|
206
|
-
deleteAllowlistEntryByIdRaw(requestParameters, initOverrides) {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
197
|
+
async deleteAllowlistEntryByIdRaw(requestParameters, initOverrides) {
|
|
198
|
+
if (requestParameters.allowlistEntryId === null || requestParameters.allowlistEntryId === undefined) {
|
|
199
|
+
throw new runtime.RequiredError('allowlistEntryId', 'Required parameter requestParameters.allowlistEntryId was null or undefined when calling deleteAllowlistEntryById.');
|
|
200
|
+
}
|
|
201
|
+
const queryParameters = {};
|
|
202
|
+
const headerParameters = {};
|
|
203
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
204
|
+
const token = this.configuration.accessToken;
|
|
205
|
+
const tokenString = await token("bearerAuth", []);
|
|
206
|
+
if (tokenString) {
|
|
207
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
210
208
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
220
|
-
const response = yield this.request({
|
|
221
|
-
path: `/allowlistEntries/{allowlistEntryId}`.replace(`{${"allowlistEntryId"}}`, encodeURIComponent(String(requestParameters.allowlistEntryId))),
|
|
222
|
-
method: 'DELETE',
|
|
223
|
-
headers: headerParameters,
|
|
224
|
-
query: queryParameters,
|
|
225
|
-
}, initOverrides);
|
|
226
|
-
return new runtime.VoidApiResponse(response);
|
|
227
|
-
});
|
|
209
|
+
}
|
|
210
|
+
const response = await this.request({
|
|
211
|
+
path: `/allowlistEntries/{allowlistEntryId}`.replace(`{${"allowlistEntryId"}}`, encodeURIComponent(String(requestParameters.allowlistEntryId))),
|
|
212
|
+
method: 'DELETE',
|
|
213
|
+
headers: headerParameters,
|
|
214
|
+
query: queryParameters,
|
|
215
|
+
}, initOverrides);
|
|
216
|
+
return new runtime.VoidApiResponse(response);
|
|
228
217
|
}
|
|
229
218
|
/**
|
|
230
219
|
* Permanently removes the specified allowlist entry.
|
|
231
220
|
* Delete an allowlist entry
|
|
232
221
|
*/
|
|
233
|
-
deleteAllowlistEntryById(requestParameters, initOverrides) {
|
|
234
|
-
|
|
235
|
-
yield this.deleteAllowlistEntryByIdRaw(requestParameters, initOverrides);
|
|
236
|
-
});
|
|
222
|
+
async deleteAllowlistEntryById(requestParameters, initOverrides) {
|
|
223
|
+
await this.deleteAllowlistEntryByIdRaw(requestParameters, initOverrides);
|
|
237
224
|
}
|
|
238
225
|
/**
|
|
239
226
|
* Disables the specified allowlist.
|
|
240
227
|
* Disable the allow list
|
|
241
228
|
*/
|
|
242
|
-
disableAllowlistByIdRaw(requestParameters, initOverrides) {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
254
|
-
}
|
|
229
|
+
async disableAllowlistByIdRaw(requestParameters, initOverrides) {
|
|
230
|
+
if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
|
|
231
|
+
throw new runtime.RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling disableAllowlistById.');
|
|
232
|
+
}
|
|
233
|
+
const queryParameters = {};
|
|
234
|
+
const headerParameters = {};
|
|
235
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
236
|
+
const token = this.configuration.accessToken;
|
|
237
|
+
const tokenString = await token("bearerAuth", []);
|
|
238
|
+
if (tokenString) {
|
|
239
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
255
240
|
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
241
|
+
}
|
|
242
|
+
const response = await this.request({
|
|
243
|
+
path: `/allowlists/{allowlistId}/disable`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
|
|
244
|
+
method: 'PUT',
|
|
245
|
+
headers: headerParameters,
|
|
246
|
+
query: queryParameters,
|
|
247
|
+
}, initOverrides);
|
|
248
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => Allowlist.AllowlistFromJSON(jsonValue));
|
|
264
249
|
}
|
|
265
250
|
/**
|
|
266
251
|
* Disables the specified allowlist.
|
|
267
252
|
* Disable the allow list
|
|
268
253
|
*/
|
|
269
|
-
disableAllowlistById(requestParameters, initOverrides) {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
return yield response.value();
|
|
273
|
-
});
|
|
254
|
+
async disableAllowlistById(requestParameters, initOverrides) {
|
|
255
|
+
const response = await this.disableAllowlistByIdRaw(requestParameters, initOverrides);
|
|
256
|
+
return await response.value();
|
|
274
257
|
}
|
|
275
258
|
/**
|
|
276
259
|
* Enables the specified allowlist.
|
|
277
260
|
* Enable the allowlist
|
|
278
261
|
*/
|
|
279
|
-
enableAllowlistByIdRaw(requestParameters, initOverrides) {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
262
|
+
async enableAllowlistByIdRaw(requestParameters, initOverrides) {
|
|
263
|
+
if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
|
|
264
|
+
throw new runtime.RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling enableAllowlistById.');
|
|
265
|
+
}
|
|
266
|
+
const queryParameters = {};
|
|
267
|
+
const headerParameters = {};
|
|
268
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
269
|
+
const token = this.configuration.accessToken;
|
|
270
|
+
const tokenString = await token("bearerAuth", []);
|
|
271
|
+
if (tokenString) {
|
|
272
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
283
273
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
293
|
-
const response = yield this.request({
|
|
294
|
-
path: `/allowlists/{allowlistId}/enable`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
|
|
295
|
-
method: 'PUT',
|
|
296
|
-
headers: headerParameters,
|
|
297
|
-
query: queryParameters,
|
|
298
|
-
}, initOverrides);
|
|
299
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => Allowlist.AllowlistFromJSON(jsonValue));
|
|
300
|
-
});
|
|
274
|
+
}
|
|
275
|
+
const response = await this.request({
|
|
276
|
+
path: `/allowlists/{allowlistId}/enable`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
|
|
277
|
+
method: 'PUT',
|
|
278
|
+
headers: headerParameters,
|
|
279
|
+
query: queryParameters,
|
|
280
|
+
}, initOverrides);
|
|
281
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => Allowlist.AllowlistFromJSON(jsonValue));
|
|
301
282
|
}
|
|
302
283
|
/**
|
|
303
284
|
* Enables the specified allowlist.
|
|
304
285
|
* Enable the allowlist
|
|
305
286
|
*/
|
|
306
|
-
enableAllowlistById(requestParameters, initOverrides) {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
return yield response.value();
|
|
310
|
-
});
|
|
287
|
+
async enableAllowlistById(requestParameters, initOverrides) {
|
|
288
|
+
const response = await this.enableAllowlistByIdRaw(requestParameters, initOverrides);
|
|
289
|
+
return await response.value();
|
|
311
290
|
}
|
|
312
291
|
/**
|
|
313
292
|
* Returns the allowlists for the specified environment.
|
|
314
293
|
* Get allowlists for the environment
|
|
315
294
|
*/
|
|
316
|
-
getAllowlistsByEnvironmentIdRaw(requestParameters, initOverrides) {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
328
|
-
}
|
|
295
|
+
async getAllowlistsByEnvironmentIdRaw(requestParameters, initOverrides) {
|
|
296
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
297
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getAllowlistsByEnvironmentId.');
|
|
298
|
+
}
|
|
299
|
+
const queryParameters = {};
|
|
300
|
+
const headerParameters = {};
|
|
301
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
302
|
+
const token = this.configuration.accessToken;
|
|
303
|
+
const tokenString = await token("bearerAuth", []);
|
|
304
|
+
if (tokenString) {
|
|
305
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
329
306
|
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
307
|
+
}
|
|
308
|
+
const response = await this.request({
|
|
309
|
+
path: `/environments/{environmentId}/allowlists`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
|
|
310
|
+
method: 'GET',
|
|
311
|
+
headers: headerParameters,
|
|
312
|
+
query: queryParameters,
|
|
313
|
+
}, initOverrides);
|
|
314
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(Allowlist.AllowlistFromJSON));
|
|
338
315
|
}
|
|
339
316
|
/**
|
|
340
317
|
* Returns the allowlists for the specified environment.
|
|
341
318
|
* Get allowlists for the environment
|
|
342
319
|
*/
|
|
343
|
-
getAllowlistsByEnvironmentId(requestParameters, initOverrides) {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
return yield response.value();
|
|
347
|
-
});
|
|
320
|
+
async getAllowlistsByEnvironmentId(requestParameters, initOverrides) {
|
|
321
|
+
const response = await this.getAllowlistsByEnvironmentIdRaw(requestParameters, initOverrides);
|
|
322
|
+
return await response.value();
|
|
348
323
|
}
|
|
349
324
|
/**
|
|
350
325
|
* Returns an allowlist by its unique identifier.
|
|
351
326
|
* Get allowlist by id
|
|
352
327
|
*/
|
|
353
|
-
getAllowlistsByIdRaw(requestParameters, initOverrides) {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
328
|
+
async getAllowlistsByIdRaw(requestParameters, initOverrides) {
|
|
329
|
+
if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
|
|
330
|
+
throw new runtime.RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling getAllowlistsById.');
|
|
331
|
+
}
|
|
332
|
+
const queryParameters = {};
|
|
333
|
+
const headerParameters = {};
|
|
334
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
335
|
+
const token = this.configuration.accessToken;
|
|
336
|
+
const tokenString = await token("bearerAuth", []);
|
|
337
|
+
if (tokenString) {
|
|
338
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
357
339
|
}
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
}
|
|
367
|
-
const response = yield this.request({
|
|
368
|
-
path: `/allowlists/{allowlistId}`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
|
|
369
|
-
method: 'GET',
|
|
370
|
-
headers: headerParameters,
|
|
371
|
-
query: queryParameters,
|
|
372
|
-
}, initOverrides);
|
|
373
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => Allowlist.AllowlistFromJSON(jsonValue));
|
|
374
|
-
});
|
|
340
|
+
}
|
|
341
|
+
const response = await this.request({
|
|
342
|
+
path: `/allowlists/{allowlistId}`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
|
|
343
|
+
method: 'GET',
|
|
344
|
+
headers: headerParameters,
|
|
345
|
+
query: queryParameters,
|
|
346
|
+
}, initOverrides);
|
|
347
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => Allowlist.AllowlistFromJSON(jsonValue));
|
|
375
348
|
}
|
|
376
349
|
/**
|
|
377
350
|
* Returns an allowlist by its unique identifier.
|
|
378
351
|
* Get allowlist by id
|
|
379
352
|
*/
|
|
380
|
-
getAllowlistsById(requestParameters, initOverrides) {
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
return yield response.value();
|
|
384
|
-
});
|
|
353
|
+
async getAllowlistsById(requestParameters, initOverrides) {
|
|
354
|
+
const response = await this.getAllowlistsByIdRaw(requestParameters, initOverrides);
|
|
355
|
+
return await response.value();
|
|
385
356
|
}
|
|
386
357
|
/**
|
|
387
358
|
* Returns all entries for the specified allowlist.
|
|
388
359
|
* Get all entries for an allowlist
|
|
389
360
|
*/
|
|
390
|
-
getEntriesByAllowlistIdRaw(requestParameters, initOverrides) {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
361
|
+
async getEntriesByAllowlistIdRaw(requestParameters, initOverrides) {
|
|
362
|
+
if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
|
|
363
|
+
throw new runtime.RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling getEntriesByAllowlistId.');
|
|
364
|
+
}
|
|
365
|
+
const queryParameters = {};
|
|
366
|
+
if (requestParameters.orderBy !== undefined) {
|
|
367
|
+
queryParameters['orderBy'] = requestParameters.orderBy;
|
|
368
|
+
}
|
|
369
|
+
if (requestParameters.offset !== undefined) {
|
|
370
|
+
queryParameters['offset'] = requestParameters.offset;
|
|
371
|
+
}
|
|
372
|
+
if (requestParameters.limit !== undefined) {
|
|
373
|
+
queryParameters['limit'] = requestParameters.limit;
|
|
374
|
+
}
|
|
375
|
+
if (requestParameters.query !== undefined) {
|
|
376
|
+
queryParameters['query'] = requestParameters.query;
|
|
377
|
+
}
|
|
378
|
+
const headerParameters = {};
|
|
379
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
380
|
+
const token = this.configuration.accessToken;
|
|
381
|
+
const tokenString = await token("bearerAuth", []);
|
|
382
|
+
if (tokenString) {
|
|
383
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
398
384
|
}
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
}
|
|
408
|
-
const headerParameters = {};
|
|
409
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
410
|
-
const token = this.configuration.accessToken;
|
|
411
|
-
const tokenString = yield token("bearerAuth", []);
|
|
412
|
-
if (tokenString) {
|
|
413
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
const response = yield this.request({
|
|
417
|
-
path: `/allowlists/{allowlistId}/entries`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
|
|
418
|
-
method: 'GET',
|
|
419
|
-
headers: headerParameters,
|
|
420
|
-
query: queryParameters,
|
|
421
|
-
}, initOverrides);
|
|
422
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => AllowlistEntriesResponse.AllowlistEntriesResponseFromJSON(jsonValue));
|
|
423
|
-
});
|
|
385
|
+
}
|
|
386
|
+
const response = await this.request({
|
|
387
|
+
path: `/allowlists/{allowlistId}/entries`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
|
|
388
|
+
method: 'GET',
|
|
389
|
+
headers: headerParameters,
|
|
390
|
+
query: queryParameters,
|
|
391
|
+
}, initOverrides);
|
|
392
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AllowlistEntriesResponse.AllowlistEntriesResponseFromJSON(jsonValue));
|
|
424
393
|
}
|
|
425
394
|
/**
|
|
426
395
|
* Returns all entries for the specified allowlist.
|
|
427
396
|
* Get all entries for an allowlist
|
|
428
397
|
*/
|
|
429
|
-
getEntriesByAllowlistId(requestParameters, initOverrides) {
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
return yield response.value();
|
|
433
|
-
});
|
|
398
|
+
async getEntriesByAllowlistId(requestParameters, initOverrides) {
|
|
399
|
+
const response = await this.getEntriesByAllowlistIdRaw(requestParameters, initOverrides);
|
|
400
|
+
return await response.value();
|
|
434
401
|
}
|
|
435
402
|
/**
|
|
436
403
|
* Creates a new entry for the specified allowlist.
|
|
437
404
|
* Create an allowlist entry
|
|
438
405
|
*/
|
|
439
|
-
postEntryByAllowlistIdRaw(requestParameters, initOverrides) {
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
406
|
+
async postEntryByAllowlistIdRaw(requestParameters, initOverrides) {
|
|
407
|
+
if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
|
|
408
|
+
throw new runtime.RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling postEntryByAllowlistId.');
|
|
409
|
+
}
|
|
410
|
+
if (requestParameters.postAllowlistEntriesRequest === null || requestParameters.postAllowlistEntriesRequest === undefined) {
|
|
411
|
+
throw new runtime.RequiredError('postAllowlistEntriesRequest', 'Required parameter requestParameters.postAllowlistEntriesRequest was null or undefined when calling postEntryByAllowlistId.');
|
|
412
|
+
}
|
|
413
|
+
const queryParameters = {};
|
|
414
|
+
const headerParameters = {};
|
|
415
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
416
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
417
|
+
const token = this.configuration.accessToken;
|
|
418
|
+
const tokenString = await token("bearerAuth", []);
|
|
419
|
+
if (tokenString) {
|
|
420
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
443
421
|
}
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
if (tokenString) {
|
|
454
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
const response = yield this.request({
|
|
458
|
-
path: `/allowlists/{allowlistId}/entries`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
|
|
459
|
-
method: 'POST',
|
|
460
|
-
headers: headerParameters,
|
|
461
|
-
query: queryParameters,
|
|
462
|
-
body: PostAllowlistEntriesRequest.PostAllowlistEntriesRequestToJSON(requestParameters.postAllowlistEntriesRequest),
|
|
463
|
-
}, initOverrides);
|
|
464
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => AllowlistEntry.AllowlistEntryFromJSON(jsonValue));
|
|
465
|
-
});
|
|
422
|
+
}
|
|
423
|
+
const response = await this.request({
|
|
424
|
+
path: `/allowlists/{allowlistId}/entries`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
|
|
425
|
+
method: 'POST',
|
|
426
|
+
headers: headerParameters,
|
|
427
|
+
query: queryParameters,
|
|
428
|
+
body: PostAllowlistEntriesRequest.PostAllowlistEntriesRequestToJSON(requestParameters.postAllowlistEntriesRequest),
|
|
429
|
+
}, initOverrides);
|
|
430
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AllowlistEntry.AllowlistEntryFromJSON(jsonValue));
|
|
466
431
|
}
|
|
467
432
|
/**
|
|
468
433
|
* Creates a new entry for the specified allowlist.
|
|
469
434
|
* Create an allowlist entry
|
|
470
435
|
*/
|
|
471
|
-
postEntryByAllowlistId(requestParameters, initOverrides) {
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
return yield response.value();
|
|
475
|
-
});
|
|
436
|
+
async postEntryByAllowlistId(requestParameters, initOverrides) {
|
|
437
|
+
const response = await this.postEntryByAllowlistIdRaw(requestParameters, initOverrides);
|
|
438
|
+
return await response.value();
|
|
476
439
|
}
|
|
477
440
|
/**
|
|
478
441
|
* Updates the specified allowlist.
|
|
479
442
|
* Update the outcome, scope, or name of an allowlist entry by ID
|
|
480
443
|
*/
|
|
481
|
-
updateAllowlistByIdRaw(requestParameters, initOverrides) {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
497
|
-
}
|
|
444
|
+
async updateAllowlistByIdRaw(requestParameters, initOverrides) {
|
|
445
|
+
if (requestParameters.allowlistId === null || requestParameters.allowlistId === undefined) {
|
|
446
|
+
throw new runtime.RequiredError('allowlistId', 'Required parameter requestParameters.allowlistId was null or undefined when calling updateAllowlistById.');
|
|
447
|
+
}
|
|
448
|
+
if (requestParameters.postAllowlistsRequest === null || requestParameters.postAllowlistsRequest === undefined) {
|
|
449
|
+
throw new runtime.RequiredError('postAllowlistsRequest', 'Required parameter requestParameters.postAllowlistsRequest was null or undefined when calling updateAllowlistById.');
|
|
450
|
+
}
|
|
451
|
+
const queryParameters = {};
|
|
452
|
+
const headerParameters = {};
|
|
453
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
454
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
455
|
+
const token = this.configuration.accessToken;
|
|
456
|
+
const tokenString = await token("bearerAuth", []);
|
|
457
|
+
if (tokenString) {
|
|
458
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
498
459
|
}
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
460
|
+
}
|
|
461
|
+
const response = await this.request({
|
|
462
|
+
path: `/allowlists/{allowlistId}`.replace(`{${"allowlistId"}}`, encodeURIComponent(String(requestParameters.allowlistId))),
|
|
463
|
+
method: 'PUT',
|
|
464
|
+
headers: headerParameters,
|
|
465
|
+
query: queryParameters,
|
|
466
|
+
body: PostAllowlistsRequest.PostAllowlistsRequestToJSON(requestParameters.postAllowlistsRequest),
|
|
467
|
+
}, initOverrides);
|
|
468
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => Allowlist.AllowlistFromJSON(jsonValue));
|
|
508
469
|
}
|
|
509
470
|
/**
|
|
510
471
|
* Updates the specified allowlist.
|
|
511
472
|
* Update the outcome, scope, or name of an allowlist entry by ID
|
|
512
473
|
*/
|
|
513
|
-
updateAllowlistById(requestParameters, initOverrides) {
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
return yield response.value();
|
|
517
|
-
});
|
|
474
|
+
async updateAllowlistById(requestParameters, initOverrides) {
|
|
475
|
+
const response = await this.updateAllowlistByIdRaw(requestParameters, initOverrides);
|
|
476
|
+
return await response.value();
|
|
518
477
|
}
|
|
519
478
|
}
|
|
520
479
|
|