@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
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var runtime = require('../runtime.cjs');
|
|
6
|
+
|
|
7
|
+
/* tslint:disable */
|
|
8
|
+
function TransactionFeeEstimateRequestFromJSON(json) {
|
|
9
|
+
return TransactionFeeEstimateRequestFromJSONTyped(json);
|
|
10
|
+
}
|
|
11
|
+
function TransactionFeeEstimateRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
12
|
+
if ((json === undefined) || (json === null)) {
|
|
13
|
+
return json;
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
'base64RawTransaction': !runtime.exists(json, 'base64RawTransaction') ? undefined : json['base64RawTransaction'],
|
|
17
|
+
'fromAddress': !runtime.exists(json, 'fromAddress') ? undefined : json['fromAddress'],
|
|
18
|
+
'rawTransactionData': !runtime.exists(json, 'rawTransactionData') ? undefined : json['rawTransactionData'],
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function TransactionFeeEstimateRequestToJSON(value) {
|
|
22
|
+
if (value === undefined) {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
if (value === null) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
'base64RawTransaction': value.base64RawTransaction,
|
|
30
|
+
'fromAddress': value.fromAddress,
|
|
31
|
+
'rawTransactionData': value.rawTransactionData,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
exports.TransactionFeeEstimateRequestFromJSON = TransactionFeeEstimateRequestFromJSON;
|
|
36
|
+
exports.TransactionFeeEstimateRequestFromJSONTyped = TransactionFeeEstimateRequestFromJSONTyped;
|
|
37
|
+
exports.TransactionFeeEstimateRequestToJSON = TransactionFeeEstimateRequestToJSON;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dashboard API
|
|
3
|
+
* Dashboard API documentation
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface TransactionFeeEstimateRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface TransactionFeeEstimateRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Deprecated — use rawTransactionData instead. The base64-encoded raw transaction to estimate gas fees for.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof TransactionFeeEstimateRequest
|
|
22
|
+
*/
|
|
23
|
+
base64RawTransaction?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Valid blockchain wallet address, must be an alphanumeric string without any special characters
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof TransactionFeeEstimateRequest
|
|
28
|
+
*/
|
|
29
|
+
fromAddress?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The raw transaction data to estimate gas fees for. For BTC, the PSBT string. For EVM, the transaction data in JSON format with properties: { to, data, value }. For Solana, the base64-encoded transaction data. For Sui, the base64-encoded transaction data.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof TransactionFeeEstimateRequest
|
|
34
|
+
*/
|
|
35
|
+
rawTransactionData?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare function TransactionFeeEstimateRequestFromJSON(json: any): TransactionFeeEstimateRequest;
|
|
38
|
+
export declare function TransactionFeeEstimateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionFeeEstimateRequest;
|
|
39
|
+
export declare function TransactionFeeEstimateRequestToJSON(value?: TransactionFeeEstimateRequest | null): any;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { exists } from '../runtime.js';
|
|
2
|
+
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
function TransactionFeeEstimateRequestFromJSON(json) {
|
|
5
|
+
return TransactionFeeEstimateRequestFromJSONTyped(json);
|
|
6
|
+
}
|
|
7
|
+
function TransactionFeeEstimateRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
8
|
+
if ((json === undefined) || (json === null)) {
|
|
9
|
+
return json;
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
'base64RawTransaction': !exists(json, 'base64RawTransaction') ? undefined : json['base64RawTransaction'],
|
|
13
|
+
'fromAddress': !exists(json, 'fromAddress') ? undefined : json['fromAddress'],
|
|
14
|
+
'rawTransactionData': !exists(json, 'rawTransactionData') ? undefined : json['rawTransactionData'],
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function TransactionFeeEstimateRequestToJSON(value) {
|
|
18
|
+
if (value === undefined) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
if (value === null) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
'base64RawTransaction': value.base64RawTransaction,
|
|
26
|
+
'fromAddress': value.fromAddress,
|
|
27
|
+
'rawTransactionData': value.rawTransactionData,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { TransactionFeeEstimateRequestFromJSON, TransactionFeeEstimateRequestFromJSONTyped, TransactionFeeEstimateRequestToJSON };
|
package/src/models/index.d.ts
CHANGED
|
@@ -79,7 +79,6 @@ export * from './CheckoutFailure';
|
|
|
79
79
|
export * from './CheckoutFeeBreakdown';
|
|
80
80
|
export * from './CheckoutGasEstimate';
|
|
81
81
|
export * from './CheckoutModeEnum';
|
|
82
|
-
export * from './CheckoutQuoteSnapshot';
|
|
83
82
|
export * from './CheckoutRiskStateEnum';
|
|
84
83
|
export * from './CheckoutSettlementData';
|
|
85
84
|
export * from './CheckoutSettlementStateEnum';
|
|
@@ -88,6 +87,7 @@ export * from './CheckoutTransaction';
|
|
|
88
87
|
export * from './CheckoutTransactionCreateRequest';
|
|
89
88
|
export * from './CheckoutTransactionCreateResponse';
|
|
90
89
|
export * from './CheckoutTransactionDestinationAddress';
|
|
90
|
+
export * from './CheckoutTransactionQuote';
|
|
91
91
|
export * from './CheckoutUpdateRequest';
|
|
92
92
|
export * from './CheckoutsResponse';
|
|
93
93
|
export * from './CoinbaseMpcWalletProperties';
|
|
@@ -267,7 +267,6 @@ export * from './InitEmailAuthResponse';
|
|
|
267
267
|
export * from './InitPasskeyRecoveryRequest';
|
|
268
268
|
export * from './InitPasskeyRecoveryResponse';
|
|
269
269
|
export * from './InlineObject';
|
|
270
|
-
export * from './InlineObject1';
|
|
271
270
|
export * from './InlineResponse200';
|
|
272
271
|
export * from './InlineResponse201';
|
|
273
272
|
export * from './InlineResponse400';
|
|
@@ -524,12 +523,10 @@ export * from './SwapEvmApprovalData';
|
|
|
524
523
|
export * from './SwapEvmTransactionData';
|
|
525
524
|
export * from './SwapFee';
|
|
526
525
|
export * from './SwapGasCost';
|
|
527
|
-
export * from './SwapPsbtTransactionData';
|
|
528
526
|
export * from './SwapQuoteRequest';
|
|
529
527
|
export * from './SwapQuoteRequestSide';
|
|
530
528
|
export * from './SwapQuoteResponse';
|
|
531
529
|
export * from './SwapQuoteResponseSide';
|
|
532
|
-
export * from './SwapSerializedTransactionData';
|
|
533
530
|
export * from './SwapSigningPayload';
|
|
534
531
|
export * from './SwapStatusRequest';
|
|
535
532
|
export * from './SwapStatusRequestChain';
|
|
@@ -553,6 +550,7 @@ export * from './TokenWithRaw';
|
|
|
553
550
|
export * from './TokenWithRawProjectEnvironment';
|
|
554
551
|
export * from './TokensResponse';
|
|
555
552
|
export * from './TooManyRequests';
|
|
553
|
+
export * from './TransactionFeeEstimateRequest';
|
|
556
554
|
export * from './TransactionFeeEstimateResponse';
|
|
557
555
|
export * from './TransferDestination';
|
|
558
556
|
export * from './TransferDestinationResponse';
|
package/src/runtime.cjs
CHANGED
|
@@ -2,9 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _tslib = require('../_virtual/_tslib.cjs');
|
|
6
|
-
|
|
7
5
|
/* tslint:disable */
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
/**
|
|
8
|
+
* Dashboard API
|
|
9
|
+
* Dashboard API documentation
|
|
10
|
+
*
|
|
11
|
+
* The version of the OpenAPI document: 1.0.0
|
|
12
|
+
*
|
|
13
|
+
*
|
|
14
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
15
|
+
* https://openapi-generator.tech
|
|
16
|
+
* Do not edit the class manually.
|
|
17
|
+
*/
|
|
8
18
|
const BASE_PATH = "https://app.dynamicauth.com/api/v0".replace(/\/+$/, "");
|
|
9
19
|
const isBlob = (value) => typeof Blob !== 'undefined' && value instanceof Blob;
|
|
10
20
|
/**
|
|
@@ -13,26 +23,29 @@ const isBlob = (value) => typeof Blob !== 'undefined' && value instanceof Blob;
|
|
|
13
23
|
class BaseAPI {
|
|
14
24
|
constructor(configuration = new Configuration()) {
|
|
15
25
|
this.configuration = configuration;
|
|
16
|
-
this.fetchApi = (url, init) =>
|
|
26
|
+
this.fetchApi = async (url, init) => {
|
|
17
27
|
let fetchParams = { url, init };
|
|
18
28
|
for (const middleware of this.middleware) {
|
|
19
29
|
if (middleware.pre) {
|
|
20
|
-
fetchParams =
|
|
30
|
+
fetchParams = await middleware.pre({
|
|
31
|
+
fetch: this.fetchApi,
|
|
32
|
+
...fetchParams,
|
|
33
|
+
}) || fetchParams;
|
|
21
34
|
}
|
|
22
35
|
}
|
|
23
|
-
let response =
|
|
36
|
+
let response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
|
|
24
37
|
for (const middleware of this.middleware) {
|
|
25
38
|
if (middleware.post) {
|
|
26
|
-
response =
|
|
39
|
+
response = await middleware.post({
|
|
27
40
|
fetch: this.fetchApi,
|
|
28
41
|
url: fetchParams.url,
|
|
29
42
|
init: fetchParams.init,
|
|
30
43
|
response: response.clone(),
|
|
31
|
-
})
|
|
44
|
+
}) || response;
|
|
32
45
|
}
|
|
33
46
|
}
|
|
34
47
|
return response;
|
|
35
|
-
}
|
|
48
|
+
};
|
|
36
49
|
this.middleware = configuration.middleware;
|
|
37
50
|
}
|
|
38
51
|
withMiddleware(...middlewares) {
|
|
@@ -48,15 +61,13 @@ class BaseAPI {
|
|
|
48
61
|
const middlewares = postMiddlewares.map((post) => ({ post }));
|
|
49
62
|
return this.withMiddleware(...middlewares);
|
|
50
63
|
}
|
|
51
|
-
request(context, initOverrides) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
throw response;
|
|
59
|
-
});
|
|
64
|
+
async request(context, initOverrides) {
|
|
65
|
+
const { url, init } = this.createFetchParams(context, initOverrides);
|
|
66
|
+
const response = await this.fetchApi(url, init);
|
|
67
|
+
if (response.status >= 200 && response.status < 300) {
|
|
68
|
+
return response;
|
|
69
|
+
}
|
|
70
|
+
throw response;
|
|
60
71
|
}
|
|
61
72
|
createFetchParams(context, initOverrides) {
|
|
62
73
|
let url = this.configuration.basePath + context.path;
|
|
@@ -70,7 +81,13 @@ class BaseAPI {
|
|
|
70
81
|
? context.body
|
|
71
82
|
: JSON.stringify(context.body);
|
|
72
83
|
const headers = Object.assign({}, this.configuration.headers, context.headers);
|
|
73
|
-
const init =
|
|
84
|
+
const init = {
|
|
85
|
+
method: context.method,
|
|
86
|
+
headers: headers,
|
|
87
|
+
body,
|
|
88
|
+
credentials: this.configuration.credentials,
|
|
89
|
+
...initOverrides
|
|
90
|
+
};
|
|
74
91
|
return { url, init };
|
|
75
92
|
}
|
|
76
93
|
/**
|
|
@@ -129,7 +146,7 @@ class Configuration {
|
|
|
129
146
|
get accessToken() {
|
|
130
147
|
const accessToken = this.configuration.accessToken;
|
|
131
148
|
if (accessToken) {
|
|
132
|
-
return typeof accessToken === 'function' ? accessToken : () =>
|
|
149
|
+
return typeof accessToken === 'function' ? accessToken : async () => accessToken;
|
|
133
150
|
}
|
|
134
151
|
return undefined;
|
|
135
152
|
}
|
|
@@ -166,7 +183,7 @@ function querystring(params, prefix = '') {
|
|
|
166
183
|
.join('&');
|
|
167
184
|
}
|
|
168
185
|
function mapValues(data, fn) {
|
|
169
|
-
return Object.keys(data).reduce((acc, key) => (
|
|
186
|
+
return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {});
|
|
170
187
|
}
|
|
171
188
|
function canConsumeForm(consumes) {
|
|
172
189
|
for (const consume of consumes) {
|
|
@@ -181,30 +198,24 @@ class JSONApiResponse {
|
|
|
181
198
|
this.raw = raw;
|
|
182
199
|
this.transformer = transformer;
|
|
183
200
|
}
|
|
184
|
-
value() {
|
|
185
|
-
return
|
|
186
|
-
return this.transformer(yield this.raw.json());
|
|
187
|
-
});
|
|
201
|
+
async value() {
|
|
202
|
+
return this.transformer(await this.raw.json());
|
|
188
203
|
}
|
|
189
204
|
}
|
|
190
205
|
class VoidApiResponse {
|
|
191
206
|
constructor(raw) {
|
|
192
207
|
this.raw = raw;
|
|
193
208
|
}
|
|
194
|
-
value() {
|
|
195
|
-
return
|
|
196
|
-
return undefined;
|
|
197
|
-
});
|
|
209
|
+
async value() {
|
|
210
|
+
return undefined;
|
|
198
211
|
}
|
|
199
212
|
}
|
|
200
213
|
class BlobApiResponse {
|
|
201
214
|
constructor(raw) {
|
|
202
215
|
this.raw = raw;
|
|
203
216
|
}
|
|
204
|
-
value() {
|
|
205
|
-
return
|
|
206
|
-
return yield this.raw.blob();
|
|
207
|
-
});
|
|
217
|
+
async value() {
|
|
218
|
+
return await this.raw.blob();
|
|
208
219
|
}
|
|
209
220
|
;
|
|
210
221
|
}
|
|
@@ -212,10 +223,8 @@ class TextApiResponse {
|
|
|
212
223
|
constructor(raw) {
|
|
213
224
|
this.raw = raw;
|
|
214
225
|
}
|
|
215
|
-
value() {
|
|
216
|
-
return
|
|
217
|
-
return yield this.raw.text();
|
|
218
|
-
});
|
|
226
|
+
async value() {
|
|
227
|
+
return await this.raw.text();
|
|
219
228
|
}
|
|
220
229
|
;
|
|
221
230
|
}
|
package/src/runtime.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import { __awaiter } from '../_virtual/_tslib.js';
|
|
2
|
-
|
|
3
1
|
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Dashboard API
|
|
5
|
+
* Dashboard API documentation
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
4
14
|
const BASE_PATH = "https://app.dynamicauth.com/api/v0".replace(/\/+$/, "");
|
|
5
15
|
const isBlob = (value) => typeof Blob !== 'undefined' && value instanceof Blob;
|
|
6
16
|
/**
|
|
@@ -9,26 +19,29 @@ const isBlob = (value) => typeof Blob !== 'undefined' && value instanceof Blob;
|
|
|
9
19
|
class BaseAPI {
|
|
10
20
|
constructor(configuration = new Configuration()) {
|
|
11
21
|
this.configuration = configuration;
|
|
12
|
-
this.fetchApi = (url, init) =>
|
|
22
|
+
this.fetchApi = async (url, init) => {
|
|
13
23
|
let fetchParams = { url, init };
|
|
14
24
|
for (const middleware of this.middleware) {
|
|
15
25
|
if (middleware.pre) {
|
|
16
|
-
fetchParams =
|
|
26
|
+
fetchParams = await middleware.pre({
|
|
27
|
+
fetch: this.fetchApi,
|
|
28
|
+
...fetchParams,
|
|
29
|
+
}) || fetchParams;
|
|
17
30
|
}
|
|
18
31
|
}
|
|
19
|
-
let response =
|
|
32
|
+
let response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
|
|
20
33
|
for (const middleware of this.middleware) {
|
|
21
34
|
if (middleware.post) {
|
|
22
|
-
response =
|
|
35
|
+
response = await middleware.post({
|
|
23
36
|
fetch: this.fetchApi,
|
|
24
37
|
url: fetchParams.url,
|
|
25
38
|
init: fetchParams.init,
|
|
26
39
|
response: response.clone(),
|
|
27
|
-
})
|
|
40
|
+
}) || response;
|
|
28
41
|
}
|
|
29
42
|
}
|
|
30
43
|
return response;
|
|
31
|
-
}
|
|
44
|
+
};
|
|
32
45
|
this.middleware = configuration.middleware;
|
|
33
46
|
}
|
|
34
47
|
withMiddleware(...middlewares) {
|
|
@@ -44,15 +57,13 @@ class BaseAPI {
|
|
|
44
57
|
const middlewares = postMiddlewares.map((post) => ({ post }));
|
|
45
58
|
return this.withMiddleware(...middlewares);
|
|
46
59
|
}
|
|
47
|
-
request(context, initOverrides) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
throw response;
|
|
55
|
-
});
|
|
60
|
+
async request(context, initOverrides) {
|
|
61
|
+
const { url, init } = this.createFetchParams(context, initOverrides);
|
|
62
|
+
const response = await this.fetchApi(url, init);
|
|
63
|
+
if (response.status >= 200 && response.status < 300) {
|
|
64
|
+
return response;
|
|
65
|
+
}
|
|
66
|
+
throw response;
|
|
56
67
|
}
|
|
57
68
|
createFetchParams(context, initOverrides) {
|
|
58
69
|
let url = this.configuration.basePath + context.path;
|
|
@@ -66,7 +77,13 @@ class BaseAPI {
|
|
|
66
77
|
? context.body
|
|
67
78
|
: JSON.stringify(context.body);
|
|
68
79
|
const headers = Object.assign({}, this.configuration.headers, context.headers);
|
|
69
|
-
const init =
|
|
80
|
+
const init = {
|
|
81
|
+
method: context.method,
|
|
82
|
+
headers: headers,
|
|
83
|
+
body,
|
|
84
|
+
credentials: this.configuration.credentials,
|
|
85
|
+
...initOverrides
|
|
86
|
+
};
|
|
70
87
|
return { url, init };
|
|
71
88
|
}
|
|
72
89
|
/**
|
|
@@ -125,7 +142,7 @@ class Configuration {
|
|
|
125
142
|
get accessToken() {
|
|
126
143
|
const accessToken = this.configuration.accessToken;
|
|
127
144
|
if (accessToken) {
|
|
128
|
-
return typeof accessToken === 'function' ? accessToken : () =>
|
|
145
|
+
return typeof accessToken === 'function' ? accessToken : async () => accessToken;
|
|
129
146
|
}
|
|
130
147
|
return undefined;
|
|
131
148
|
}
|
|
@@ -162,7 +179,7 @@ function querystring(params, prefix = '') {
|
|
|
162
179
|
.join('&');
|
|
163
180
|
}
|
|
164
181
|
function mapValues(data, fn) {
|
|
165
|
-
return Object.keys(data).reduce((acc, key) => (
|
|
182
|
+
return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {});
|
|
166
183
|
}
|
|
167
184
|
function canConsumeForm(consumes) {
|
|
168
185
|
for (const consume of consumes) {
|
|
@@ -177,30 +194,24 @@ class JSONApiResponse {
|
|
|
177
194
|
this.raw = raw;
|
|
178
195
|
this.transformer = transformer;
|
|
179
196
|
}
|
|
180
|
-
value() {
|
|
181
|
-
return
|
|
182
|
-
return this.transformer(yield this.raw.json());
|
|
183
|
-
});
|
|
197
|
+
async value() {
|
|
198
|
+
return this.transformer(await this.raw.json());
|
|
184
199
|
}
|
|
185
200
|
}
|
|
186
201
|
class VoidApiResponse {
|
|
187
202
|
constructor(raw) {
|
|
188
203
|
this.raw = raw;
|
|
189
204
|
}
|
|
190
|
-
value() {
|
|
191
|
-
return
|
|
192
|
-
return undefined;
|
|
193
|
-
});
|
|
205
|
+
async value() {
|
|
206
|
+
return undefined;
|
|
194
207
|
}
|
|
195
208
|
}
|
|
196
209
|
class BlobApiResponse {
|
|
197
210
|
constructor(raw) {
|
|
198
211
|
this.raw = raw;
|
|
199
212
|
}
|
|
200
|
-
value() {
|
|
201
|
-
return
|
|
202
|
-
return yield this.raw.blob();
|
|
203
|
-
});
|
|
213
|
+
async value() {
|
|
214
|
+
return await this.raw.blob();
|
|
204
215
|
}
|
|
205
216
|
;
|
|
206
217
|
}
|
|
@@ -208,10 +219,8 @@ class TextApiResponse {
|
|
|
208
219
|
constructor(raw) {
|
|
209
220
|
this.raw = raw;
|
|
210
221
|
}
|
|
211
|
-
value() {
|
|
212
|
-
return
|
|
213
|
-
return yield this.raw.text();
|
|
214
|
-
});
|
|
222
|
+
async value() {
|
|
223
|
+
return await this.raw.text();
|
|
215
224
|
}
|
|
216
225
|
;
|
|
217
226
|
}
|
package/_virtual/_tslib.cjs
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
/******************************************************************************
|
|
6
|
-
Copyright (c) Microsoft Corporation.
|
|
7
|
-
|
|
8
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
9
|
-
purpose with or without fee is hereby granted.
|
|
10
|
-
|
|
11
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
12
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
13
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
14
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
15
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
16
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
17
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
18
|
-
***************************************************************************** */
|
|
19
|
-
|
|
20
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
21
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
23
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
24
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
25
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
26
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
31
|
-
var e = new Error(message);
|
|
32
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
exports.__awaiter = __awaiter;
|
package/_virtual/_tslib.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/******************************************************************************
|
|
2
|
-
Copyright (c) Microsoft Corporation.
|
|
3
|
-
|
|
4
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
-
purpose with or without fee is hereby granted.
|
|
6
|
-
|
|
7
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
-
***************************************************************************** */
|
|
15
|
-
|
|
16
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
17
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
27
|
-
var e = new Error(message);
|
|
28
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export { __awaiter };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var runtime = require('../runtime.cjs');
|
|
6
|
-
var CheckoutFeeBreakdown = require('./CheckoutFeeBreakdown.cjs');
|
|
7
|
-
|
|
8
|
-
/* tslint:disable */
|
|
9
|
-
function CheckoutQuoteSnapshotFromJSON(json) {
|
|
10
|
-
return CheckoutQuoteSnapshotFromJSONTyped(json);
|
|
11
|
-
}
|
|
12
|
-
function CheckoutQuoteSnapshotFromJSONTyped(json, ignoreDiscriminator) {
|
|
13
|
-
if ((json === undefined) || (json === null)) {
|
|
14
|
-
return json;
|
|
15
|
-
}
|
|
16
|
-
return {
|
|
17
|
-
'version': json['version'],
|
|
18
|
-
'fromAmount': json['fromAmount'],
|
|
19
|
-
'toAmount': json['toAmount'],
|
|
20
|
-
'toAmountMin': json['toAmountMin'],
|
|
21
|
-
'fees': CheckoutFeeBreakdown.CheckoutFeeBreakdownFromJSON(json['fees']),
|
|
22
|
-
'estimatedTimeSec': json['estimatedTimeSec'],
|
|
23
|
-
'route': !runtime.exists(json, 'route') ? undefined : json['route'],
|
|
24
|
-
'createdAt': (new Date(json['createdAt'])),
|
|
25
|
-
'expiresAt': (new Date(json['expiresAt'])),
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
function CheckoutQuoteSnapshotToJSON(value) {
|
|
29
|
-
if (value === undefined) {
|
|
30
|
-
return undefined;
|
|
31
|
-
}
|
|
32
|
-
if (value === null) {
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
return {
|
|
36
|
-
'version': value.version,
|
|
37
|
-
'fromAmount': value.fromAmount,
|
|
38
|
-
'toAmount': value.toAmount,
|
|
39
|
-
'toAmountMin': value.toAmountMin,
|
|
40
|
-
'fees': CheckoutFeeBreakdown.CheckoutFeeBreakdownToJSON(value.fees),
|
|
41
|
-
'estimatedTimeSec': value.estimatedTimeSec,
|
|
42
|
-
'route': value.route,
|
|
43
|
-
'createdAt': (value.createdAt.toISOString()),
|
|
44
|
-
'expiresAt': (value.expiresAt.toISOString()),
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
exports.CheckoutQuoteSnapshotFromJSON = CheckoutQuoteSnapshotFromJSON;
|
|
49
|
-
exports.CheckoutQuoteSnapshotFromJSONTyped = CheckoutQuoteSnapshotFromJSONTyped;
|
|
50
|
-
exports.CheckoutQuoteSnapshotToJSON = CheckoutQuoteSnapshotToJSON;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Dashboard API
|
|
3
|
-
* Dashboard API documentation
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import { CheckoutFeeBreakdown } from './CheckoutFeeBreakdown';
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @export
|
|
16
|
-
* @interface CheckoutQuoteSnapshot
|
|
17
|
-
*/
|
|
18
|
-
export interface CheckoutQuoteSnapshot {
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* @type {number}
|
|
22
|
-
* @memberof CheckoutQuoteSnapshot
|
|
23
|
-
*/
|
|
24
|
-
version: number;
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* @type {string}
|
|
28
|
-
* @memberof CheckoutQuoteSnapshot
|
|
29
|
-
*/
|
|
30
|
-
fromAmount: string;
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
* @type {string}
|
|
34
|
-
* @memberof CheckoutQuoteSnapshot
|
|
35
|
-
*/
|
|
36
|
-
toAmount: string;
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
* @type {string}
|
|
40
|
-
* @memberof CheckoutQuoteSnapshot
|
|
41
|
-
*/
|
|
42
|
-
toAmountMin: string;
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @type {CheckoutFeeBreakdown}
|
|
46
|
-
* @memberof CheckoutQuoteSnapshot
|
|
47
|
-
*/
|
|
48
|
-
fees: CheckoutFeeBreakdown;
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* @type {number}
|
|
52
|
-
* @memberof CheckoutQuoteSnapshot
|
|
53
|
-
*/
|
|
54
|
-
estimatedTimeSec: number;
|
|
55
|
-
/**
|
|
56
|
-
* Raw route data from the swap provider
|
|
57
|
-
* @type {object}
|
|
58
|
-
* @memberof CheckoutQuoteSnapshot
|
|
59
|
-
*/
|
|
60
|
-
route?: object;
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @type {Date}
|
|
64
|
-
* @memberof CheckoutQuoteSnapshot
|
|
65
|
-
*/
|
|
66
|
-
createdAt: Date;
|
|
67
|
-
/**
|
|
68
|
-
*
|
|
69
|
-
* @type {Date}
|
|
70
|
-
* @memberof CheckoutQuoteSnapshot
|
|
71
|
-
*/
|
|
72
|
-
expiresAt: Date;
|
|
73
|
-
}
|
|
74
|
-
export declare function CheckoutQuoteSnapshotFromJSON(json: any): CheckoutQuoteSnapshot;
|
|
75
|
-
export declare function CheckoutQuoteSnapshotFromJSONTyped(json: any, ignoreDiscriminator: boolean): CheckoutQuoteSnapshot;
|
|
76
|
-
export declare function CheckoutQuoteSnapshotToJSON(value?: CheckoutQuoteSnapshot | null): any;
|