@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';
|
|
@@ -118,195 +117,175 @@ class CustomFieldsApi extends BaseAPI {
|
|
|
118
117
|
* Creates a new custom field for the specified environment.
|
|
119
118
|
* Create a custom field for the environment
|
|
120
119
|
*/
|
|
121
|
-
createCustomFieldForEnvironmentRaw(requestParameters, initOverrides) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
async createCustomFieldForEnvironmentRaw(requestParameters, initOverrides) {
|
|
121
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
122
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling createCustomFieldForEnvironment.');
|
|
123
|
+
}
|
|
124
|
+
if (requestParameters.customFieldRequest === null || requestParameters.customFieldRequest === undefined) {
|
|
125
|
+
throw new RequiredError('customFieldRequest', 'Required parameter requestParameters.customFieldRequest was null or undefined when calling createCustomFieldForEnvironment.');
|
|
126
|
+
}
|
|
127
|
+
const queryParameters = {};
|
|
128
|
+
const headerParameters = {};
|
|
129
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
130
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
131
|
+
const token = this.configuration.accessToken;
|
|
132
|
+
const tokenString = await token("bearerAuth", []);
|
|
133
|
+
if (tokenString) {
|
|
134
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
125
135
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
if (tokenString) {
|
|
136
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
const response = yield this.request({
|
|
140
|
-
path: `/environments/{environmentId}/custom/fields`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
|
|
141
|
-
method: 'POST',
|
|
142
|
-
headers: headerParameters,
|
|
143
|
-
query: queryParameters,
|
|
144
|
-
body: CustomFieldRequestToJSON(requestParameters.customFieldRequest),
|
|
145
|
-
}, initOverrides);
|
|
146
|
-
return new JSONApiResponse(response, (jsonValue) => CustomFieldFromJSON(jsonValue));
|
|
147
|
-
});
|
|
136
|
+
}
|
|
137
|
+
const response = await this.request({
|
|
138
|
+
path: `/environments/{environmentId}/custom/fields`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
|
|
139
|
+
method: 'POST',
|
|
140
|
+
headers: headerParameters,
|
|
141
|
+
query: queryParameters,
|
|
142
|
+
body: CustomFieldRequestToJSON(requestParameters.customFieldRequest),
|
|
143
|
+
}, initOverrides);
|
|
144
|
+
return new JSONApiResponse(response, (jsonValue) => CustomFieldFromJSON(jsonValue));
|
|
148
145
|
}
|
|
149
146
|
/**
|
|
150
147
|
* Creates a new custom field for the specified environment.
|
|
151
148
|
* Create a custom field for the environment
|
|
152
149
|
*/
|
|
153
|
-
createCustomFieldForEnvironment(requestParameters, initOverrides) {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
return yield response.value();
|
|
157
|
-
});
|
|
150
|
+
async createCustomFieldForEnvironment(requestParameters, initOverrides) {
|
|
151
|
+
const response = await this.createCustomFieldForEnvironmentRaw(requestParameters, initOverrides);
|
|
152
|
+
return await response.value();
|
|
158
153
|
}
|
|
159
154
|
/**
|
|
160
155
|
* Permanently removes the specified custom field.
|
|
161
156
|
* Delete a specific custom field by its ID
|
|
162
157
|
*/
|
|
163
|
-
deleteCustomFieldByIdRaw(requestParameters, initOverrides) {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
158
|
+
async deleteCustomFieldByIdRaw(requestParameters, initOverrides) {
|
|
159
|
+
if (requestParameters.customFieldId === null || requestParameters.customFieldId === undefined) {
|
|
160
|
+
throw new RequiredError('customFieldId', 'Required parameter requestParameters.customFieldId was null or undefined when calling deleteCustomFieldById.');
|
|
161
|
+
}
|
|
162
|
+
const queryParameters = {};
|
|
163
|
+
const headerParameters = {};
|
|
164
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
165
|
+
const token = this.configuration.accessToken;
|
|
166
|
+
const tokenString = await token("bearerAuth", []);
|
|
167
|
+
if (tokenString) {
|
|
168
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
167
169
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}
|
|
177
|
-
const response = yield this.request({
|
|
178
|
-
path: `/custom/fields/{customFieldId}`.replace(`{${"customFieldId"}}`, encodeURIComponent(String(requestParameters.customFieldId))),
|
|
179
|
-
method: 'DELETE',
|
|
180
|
-
headers: headerParameters,
|
|
181
|
-
query: queryParameters,
|
|
182
|
-
}, initOverrides);
|
|
183
|
-
return new VoidApiResponse(response);
|
|
184
|
-
});
|
|
170
|
+
}
|
|
171
|
+
const response = await this.request({
|
|
172
|
+
path: `/custom/fields/{customFieldId}`.replace(`{${"customFieldId"}}`, encodeURIComponent(String(requestParameters.customFieldId))),
|
|
173
|
+
method: 'DELETE',
|
|
174
|
+
headers: headerParameters,
|
|
175
|
+
query: queryParameters,
|
|
176
|
+
}, initOverrides);
|
|
177
|
+
return new VoidApiResponse(response);
|
|
185
178
|
}
|
|
186
179
|
/**
|
|
187
180
|
* Permanently removes the specified custom field.
|
|
188
181
|
* Delete a specific custom field by its ID
|
|
189
182
|
*/
|
|
190
|
-
deleteCustomFieldById(requestParameters, initOverrides) {
|
|
191
|
-
|
|
192
|
-
yield this.deleteCustomFieldByIdRaw(requestParameters, initOverrides);
|
|
193
|
-
});
|
|
183
|
+
async deleteCustomFieldById(requestParameters, initOverrides) {
|
|
184
|
+
await this.deleteCustomFieldByIdRaw(requestParameters, initOverrides);
|
|
194
185
|
}
|
|
195
186
|
/**
|
|
196
187
|
* Returns a custom field by its unique identifier.
|
|
197
188
|
* Retrieve a specific custom field by its ID
|
|
198
189
|
*/
|
|
199
|
-
getCustomFieldByIdRaw(requestParameters, initOverrides) {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
211
|
-
}
|
|
190
|
+
async getCustomFieldByIdRaw(requestParameters, initOverrides) {
|
|
191
|
+
if (requestParameters.customFieldId === null || requestParameters.customFieldId === undefined) {
|
|
192
|
+
throw new RequiredError('customFieldId', 'Required parameter requestParameters.customFieldId was null or undefined when calling getCustomFieldById.');
|
|
193
|
+
}
|
|
194
|
+
const queryParameters = {};
|
|
195
|
+
const headerParameters = {};
|
|
196
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
197
|
+
const token = this.configuration.accessToken;
|
|
198
|
+
const tokenString = await token("bearerAuth", []);
|
|
199
|
+
if (tokenString) {
|
|
200
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
212
201
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
202
|
+
}
|
|
203
|
+
const response = await this.request({
|
|
204
|
+
path: `/custom/fields/{customFieldId}`.replace(`{${"customFieldId"}}`, encodeURIComponent(String(requestParameters.customFieldId))),
|
|
205
|
+
method: 'GET',
|
|
206
|
+
headers: headerParameters,
|
|
207
|
+
query: queryParameters,
|
|
208
|
+
}, initOverrides);
|
|
209
|
+
return new JSONApiResponse(response, (jsonValue) => CustomFieldFromJSON(jsonValue));
|
|
221
210
|
}
|
|
222
211
|
/**
|
|
223
212
|
* Returns a custom field by its unique identifier.
|
|
224
213
|
* Retrieve a specific custom field by its ID
|
|
225
214
|
*/
|
|
226
|
-
getCustomFieldById(requestParameters, initOverrides) {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
return yield response.value();
|
|
230
|
-
});
|
|
215
|
+
async getCustomFieldById(requestParameters, initOverrides) {
|
|
216
|
+
const response = await this.getCustomFieldByIdRaw(requestParameters, initOverrides);
|
|
217
|
+
return await response.value();
|
|
231
218
|
}
|
|
232
219
|
/**
|
|
233
220
|
* Returns the custom fields for the specified environment.
|
|
234
221
|
* Get custom fields for the environment
|
|
235
222
|
*/
|
|
236
|
-
getCustomFieldsForEnvironmentRaw(requestParameters, initOverrides) {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
223
|
+
async getCustomFieldsForEnvironmentRaw(requestParameters, initOverrides) {
|
|
224
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
225
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getCustomFieldsForEnvironment.');
|
|
226
|
+
}
|
|
227
|
+
const queryParameters = {};
|
|
228
|
+
const headerParameters = {};
|
|
229
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
230
|
+
const token = this.configuration.accessToken;
|
|
231
|
+
const tokenString = await token("bearerAuth", []);
|
|
232
|
+
if (tokenString) {
|
|
233
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
240
234
|
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
}
|
|
250
|
-
const response = yield this.request({
|
|
251
|
-
path: `/environments/{environmentId}/custom/fields`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
|
|
252
|
-
method: 'GET',
|
|
253
|
-
headers: headerParameters,
|
|
254
|
-
query: queryParameters,
|
|
255
|
-
}, initOverrides);
|
|
256
|
-
return new JSONApiResponse(response, (jsonValue) => jsonValue.map(CustomFieldFromJSON));
|
|
257
|
-
});
|
|
235
|
+
}
|
|
236
|
+
const response = await this.request({
|
|
237
|
+
path: `/environments/{environmentId}/custom/fields`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
|
|
238
|
+
method: 'GET',
|
|
239
|
+
headers: headerParameters,
|
|
240
|
+
query: queryParameters,
|
|
241
|
+
}, initOverrides);
|
|
242
|
+
return new JSONApiResponse(response, (jsonValue) => jsonValue.map(CustomFieldFromJSON));
|
|
258
243
|
}
|
|
259
244
|
/**
|
|
260
245
|
* Returns the custom fields for the specified environment.
|
|
261
246
|
* Get custom fields for the environment
|
|
262
247
|
*/
|
|
263
|
-
getCustomFieldsForEnvironment(requestParameters, initOverrides) {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
return yield response.value();
|
|
267
|
-
});
|
|
248
|
+
async getCustomFieldsForEnvironment(requestParameters, initOverrides) {
|
|
249
|
+
const response = await this.getCustomFieldsForEnvironmentRaw(requestParameters, initOverrides);
|
|
250
|
+
return await response.value();
|
|
268
251
|
}
|
|
269
252
|
/**
|
|
270
253
|
* Updates the specified custom field.
|
|
271
254
|
* Update an existing custom field by its ID
|
|
272
255
|
*/
|
|
273
|
-
updateCustomFieldByIdRaw(requestParameters, initOverrides) {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
289
|
-
}
|
|
256
|
+
async updateCustomFieldByIdRaw(requestParameters, initOverrides) {
|
|
257
|
+
if (requestParameters.customFieldId === null || requestParameters.customFieldId === undefined) {
|
|
258
|
+
throw new RequiredError('customFieldId', 'Required parameter requestParameters.customFieldId was null or undefined when calling updateCustomFieldById.');
|
|
259
|
+
}
|
|
260
|
+
if (requestParameters.customFieldRequest === null || requestParameters.customFieldRequest === undefined) {
|
|
261
|
+
throw new RequiredError('customFieldRequest', 'Required parameter requestParameters.customFieldRequest was null or undefined when calling updateCustomFieldById.');
|
|
262
|
+
}
|
|
263
|
+
const queryParameters = {};
|
|
264
|
+
const headerParameters = {};
|
|
265
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
266
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
267
|
+
const token = this.configuration.accessToken;
|
|
268
|
+
const tokenString = await token("bearerAuth", []);
|
|
269
|
+
if (tokenString) {
|
|
270
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
290
271
|
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
272
|
+
}
|
|
273
|
+
const response = await this.request({
|
|
274
|
+
path: `/custom/fields/{customFieldId}`.replace(`{${"customFieldId"}}`, encodeURIComponent(String(requestParameters.customFieldId))),
|
|
275
|
+
method: 'PUT',
|
|
276
|
+
headers: headerParameters,
|
|
277
|
+
query: queryParameters,
|
|
278
|
+
body: CustomFieldRequestToJSON(requestParameters.customFieldRequest),
|
|
279
|
+
}, initOverrides);
|
|
280
|
+
return new JSONApiResponse(response, (jsonValue) => CustomFieldFromJSON(jsonValue));
|
|
300
281
|
}
|
|
301
282
|
/**
|
|
302
283
|
* Updates the specified custom field.
|
|
303
284
|
* Update an existing custom field by its ID
|
|
304
285
|
*/
|
|
305
|
-
updateCustomFieldById(requestParameters, initOverrides) {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
return yield response.value();
|
|
309
|
-
});
|
|
286
|
+
async updateCustomFieldById(requestParameters, initOverrides) {
|
|
287
|
+
const response = await this.updateCustomFieldByIdRaw(requestParameters, initOverrides);
|
|
288
|
+
return await response.value();
|
|
310
289
|
}
|
|
311
290
|
}
|
|
312
291
|
|
|
@@ -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');
|
|
@@ -123,98 +122,86 @@ class CustomHostnamesApi extends runtime.BaseAPI {
|
|
|
123
122
|
* Creates a new custom hostname for the specified environment.
|
|
124
123
|
* Create a custom hostname for the environment
|
|
125
124
|
*/
|
|
126
|
-
createCustomHostnameRaw(requestParameters, initOverrides) {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => CustomHostname.CustomHostnameFromJSON(jsonValue));
|
|
145
|
-
});
|
|
125
|
+
async createCustomHostnameRaw(requestParameters, initOverrides) {
|
|
126
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
127
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling createCustomHostname.');
|
|
128
|
+
}
|
|
129
|
+
if (requestParameters.customHostnameCreateRequest === null || requestParameters.customHostnameCreateRequest === undefined) {
|
|
130
|
+
throw new runtime.RequiredError('customHostnameCreateRequest', 'Required parameter requestParameters.customHostnameCreateRequest was null or undefined when calling createCustomHostname.');
|
|
131
|
+
}
|
|
132
|
+
const queryParameters = {};
|
|
133
|
+
const headerParameters = {};
|
|
134
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
135
|
+
const response = await this.request({
|
|
136
|
+
path: `/environments/{environmentId}/custom/hostnames`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
|
|
137
|
+
method: 'POST',
|
|
138
|
+
headers: headerParameters,
|
|
139
|
+
query: queryParameters,
|
|
140
|
+
body: CustomHostnameCreateRequest.CustomHostnameCreateRequestToJSON(requestParameters.customHostnameCreateRequest),
|
|
141
|
+
}, initOverrides);
|
|
142
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CustomHostname.CustomHostnameFromJSON(jsonValue));
|
|
146
143
|
}
|
|
147
144
|
/**
|
|
148
145
|
* Creates a new custom hostname for the specified environment.
|
|
149
146
|
* Create a custom hostname for the environment
|
|
150
147
|
*/
|
|
151
|
-
createCustomHostname(requestParameters, initOverrides) {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
return yield response.value();
|
|
155
|
-
});
|
|
148
|
+
async createCustomHostname(requestParameters, initOverrides) {
|
|
149
|
+
const response = await this.createCustomHostnameRaw(requestParameters, initOverrides);
|
|
150
|
+
return await response.value();
|
|
156
151
|
}
|
|
157
152
|
/**
|
|
158
153
|
* Permanently removes the specified custom hostname.
|
|
159
154
|
* Delete the custom hostname
|
|
160
155
|
*/
|
|
161
|
-
deleteCustomHostnameRaw(requestParameters, initOverrides) {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
return new runtime.VoidApiResponse(response);
|
|
178
|
-
});
|
|
156
|
+
async deleteCustomHostnameRaw(requestParameters, initOverrides) {
|
|
157
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
158
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling deleteCustomHostname.');
|
|
159
|
+
}
|
|
160
|
+
if (requestParameters.customHostnameId === null || requestParameters.customHostnameId === undefined) {
|
|
161
|
+
throw new runtime.RequiredError('customHostnameId', 'Required parameter requestParameters.customHostnameId was null or undefined when calling deleteCustomHostname.');
|
|
162
|
+
}
|
|
163
|
+
const queryParameters = {};
|
|
164
|
+
const headerParameters = {};
|
|
165
|
+
const response = await this.request({
|
|
166
|
+
path: `/environments/{environmentId}/custom/hostnames/{customHostnameId}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"customHostnameId"}}`, encodeURIComponent(String(requestParameters.customHostnameId))),
|
|
167
|
+
method: 'DELETE',
|
|
168
|
+
headers: headerParameters,
|
|
169
|
+
query: queryParameters,
|
|
170
|
+
}, initOverrides);
|
|
171
|
+
return new runtime.VoidApiResponse(response);
|
|
179
172
|
}
|
|
180
173
|
/**
|
|
181
174
|
* Permanently removes the specified custom hostname.
|
|
182
175
|
* Delete the custom hostname
|
|
183
176
|
*/
|
|
184
|
-
deleteCustomHostname(requestParameters, initOverrides) {
|
|
185
|
-
|
|
186
|
-
yield this.deleteCustomHostnameRaw(requestParameters, initOverrides);
|
|
187
|
-
});
|
|
177
|
+
async deleteCustomHostname(requestParameters, initOverrides) {
|
|
178
|
+
await this.deleteCustomHostnameRaw(requestParameters, initOverrides);
|
|
188
179
|
}
|
|
189
180
|
/**
|
|
190
181
|
* Returns all custom hostnames for the specified environment.
|
|
191
182
|
* Get the custom hostnames for this environment
|
|
192
183
|
*/
|
|
193
|
-
getCustomHostnamesRaw(requestParameters, initOverrides) {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => CustomHostnamesResponse.CustomHostnamesResponseFromJSON(jsonValue));
|
|
207
|
-
});
|
|
184
|
+
async getCustomHostnamesRaw(requestParameters, initOverrides) {
|
|
185
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
186
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getCustomHostnames.');
|
|
187
|
+
}
|
|
188
|
+
const queryParameters = {};
|
|
189
|
+
const headerParameters = {};
|
|
190
|
+
const response = await this.request({
|
|
191
|
+
path: `/environments/{environmentId}/custom/hostnames`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
|
|
192
|
+
method: 'GET',
|
|
193
|
+
headers: headerParameters,
|
|
194
|
+
query: queryParameters,
|
|
195
|
+
}, initOverrides);
|
|
196
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CustomHostnamesResponse.CustomHostnamesResponseFromJSON(jsonValue));
|
|
208
197
|
}
|
|
209
198
|
/**
|
|
210
199
|
* Returns all custom hostnames for the specified environment.
|
|
211
200
|
* Get the custom hostnames for this environment
|
|
212
201
|
*/
|
|
213
|
-
getCustomHostnames(requestParameters, initOverrides) {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
return yield response.value();
|
|
217
|
-
});
|
|
202
|
+
async getCustomHostnames(requestParameters, initOverrides) {
|
|
203
|
+
const response = await this.getCustomHostnamesRaw(requestParameters, initOverrides);
|
|
204
|
+
return await response.value();
|
|
218
205
|
}
|
|
219
206
|
}
|
|
220
207
|
|