@dynamic-labs/sdk-api 0.0.921 → 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 -7365
- package/src/apis/SDKApi.d.ts +2 -2
- package/src/apis/SDKApi.js +6184 -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 +4 -4
- package/src/index.js +1 -1
- 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/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 +1 -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
|
@@ -52,6 +52,7 @@ function ProviderCreateRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
52
52
|
'zerodevBundlerRpcUrl': !runtime.exists(json, 'zerodevBundlerRpcUrl') ? undefined : json['zerodevBundlerRpcUrl'],
|
|
53
53
|
'zerodevPaymasterRpcUrl': !runtime.exists(json, 'zerodevPaymasterRpcUrl') ? undefined : json['zerodevPaymasterRpcUrl'],
|
|
54
54
|
'zerodevKernelDelegationAddress': !runtime.exists(json, 'zerodevKernelDelegationAddress') ? undefined : json['zerodevKernelDelegationAddress'],
|
|
55
|
+
'zerodevProjectVersion': !runtime.exists(json, 'zerodevProjectVersion') ? undefined : json['zerodevProjectVersion'],
|
|
55
56
|
'domain': !runtime.exists(json, 'domain') ? undefined : json['domain'],
|
|
56
57
|
'returnUrl': !runtime.exists(json, 'returnUrl') ? undefined : json['returnUrl'],
|
|
57
58
|
'cancelUrl': !runtime.exists(json, 'cancelUrl') ? undefined : json['cancelUrl'],
|
|
@@ -97,6 +98,7 @@ function ProviderCreateRequestToJSON(value) {
|
|
|
97
98
|
'zerodevBundlerRpcUrl': value.zerodevBundlerRpcUrl,
|
|
98
99
|
'zerodevPaymasterRpcUrl': value.zerodevPaymasterRpcUrl,
|
|
99
100
|
'zerodevKernelDelegationAddress': value.zerodevKernelDelegationAddress,
|
|
101
|
+
'zerodevProjectVersion': value.zerodevProjectVersion,
|
|
100
102
|
'domain': value.domain,
|
|
101
103
|
'returnUrl': value.returnUrl,
|
|
102
104
|
'cancelUrl': value.cancelUrl,
|
|
@@ -214,6 +214,12 @@ export interface ProviderCreateRequest {
|
|
|
214
214
|
* @memberof ProviderCreateRequest
|
|
215
215
|
*/
|
|
216
216
|
zerodevKernelDelegationAddress?: string;
|
|
217
|
+
/**
|
|
218
|
+
* The ZeroDev projects endpoint version (v1 or v2)
|
|
219
|
+
* @type {string}
|
|
220
|
+
* @memberof ProviderCreateRequest
|
|
221
|
+
*/
|
|
222
|
+
zerodevProjectVersion?: string;
|
|
217
223
|
/**
|
|
218
224
|
* The subdomain for the provider (mostly used for SSO)
|
|
219
225
|
* @type {string}
|
|
@@ -48,6 +48,7 @@ function ProviderCreateRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
48
48
|
'zerodevBundlerRpcUrl': !exists(json, 'zerodevBundlerRpcUrl') ? undefined : json['zerodevBundlerRpcUrl'],
|
|
49
49
|
'zerodevPaymasterRpcUrl': !exists(json, 'zerodevPaymasterRpcUrl') ? undefined : json['zerodevPaymasterRpcUrl'],
|
|
50
50
|
'zerodevKernelDelegationAddress': !exists(json, 'zerodevKernelDelegationAddress') ? undefined : json['zerodevKernelDelegationAddress'],
|
|
51
|
+
'zerodevProjectVersion': !exists(json, 'zerodevProjectVersion') ? undefined : json['zerodevProjectVersion'],
|
|
51
52
|
'domain': !exists(json, 'domain') ? undefined : json['domain'],
|
|
52
53
|
'returnUrl': !exists(json, 'returnUrl') ? undefined : json['returnUrl'],
|
|
53
54
|
'cancelUrl': !exists(json, 'cancelUrl') ? undefined : json['cancelUrl'],
|
|
@@ -93,6 +94,7 @@ function ProviderCreateRequestToJSON(value) {
|
|
|
93
94
|
'zerodevBundlerRpcUrl': value.zerodevBundlerRpcUrl,
|
|
94
95
|
'zerodevPaymasterRpcUrl': value.zerodevPaymasterRpcUrl,
|
|
95
96
|
'zerodevKernelDelegationAddress': value.zerodevKernelDelegationAddress,
|
|
97
|
+
'zerodevProjectVersion': value.zerodevProjectVersion,
|
|
96
98
|
'domain': value.domain,
|
|
97
99
|
'returnUrl': value.returnUrl,
|
|
98
100
|
'cancelUrl': value.cancelUrl,
|
|
@@ -50,6 +50,7 @@ function ProviderUpdateRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
50
50
|
'zerodevBundlerRpcUrl': !runtime.exists(json, 'zerodevBundlerRpcUrl') ? undefined : json['zerodevBundlerRpcUrl'],
|
|
51
51
|
'zerodevPaymasterRpcUrl': !runtime.exists(json, 'zerodevPaymasterRpcUrl') ? undefined : json['zerodevPaymasterRpcUrl'],
|
|
52
52
|
'zerodevKernelDelegationAddress': !runtime.exists(json, 'zerodevKernelDelegationAddress') ? undefined : json['zerodevKernelDelegationAddress'],
|
|
53
|
+
'zerodevProjectVersion': !runtime.exists(json, 'zerodevProjectVersion') ? undefined : json['zerodevProjectVersion'],
|
|
53
54
|
'returnUrl': !runtime.exists(json, 'returnUrl') ? undefined : json['returnUrl'],
|
|
54
55
|
'cancelUrl': !runtime.exists(json, 'cancelUrl') ? undefined : json['cancelUrl'],
|
|
55
56
|
};
|
|
@@ -93,6 +94,7 @@ function ProviderUpdateRequestToJSON(value) {
|
|
|
93
94
|
'zerodevBundlerRpcUrl': value.zerodevBundlerRpcUrl,
|
|
94
95
|
'zerodevPaymasterRpcUrl': value.zerodevPaymasterRpcUrl,
|
|
95
96
|
'zerodevKernelDelegationAddress': value.zerodevKernelDelegationAddress,
|
|
97
|
+
'zerodevProjectVersion': value.zerodevProjectVersion,
|
|
96
98
|
'returnUrl': value.returnUrl,
|
|
97
99
|
'cancelUrl': value.cancelUrl,
|
|
98
100
|
};
|
|
@@ -207,6 +207,12 @@ export interface ProviderUpdateRequest {
|
|
|
207
207
|
* @memberof ProviderUpdateRequest
|
|
208
208
|
*/
|
|
209
209
|
zerodevKernelDelegationAddress?: string;
|
|
210
|
+
/**
|
|
211
|
+
* The ZeroDev projects endpoint version (v1 or v2)
|
|
212
|
+
* @type {string}
|
|
213
|
+
* @memberof ProviderUpdateRequest
|
|
214
|
+
*/
|
|
215
|
+
zerodevProjectVersion?: string;
|
|
210
216
|
/**
|
|
211
217
|
* URL to return to after completion
|
|
212
218
|
* @type {string}
|
|
@@ -46,6 +46,7 @@ function ProviderUpdateRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
46
46
|
'zerodevBundlerRpcUrl': !exists(json, 'zerodevBundlerRpcUrl') ? undefined : json['zerodevBundlerRpcUrl'],
|
|
47
47
|
'zerodevPaymasterRpcUrl': !exists(json, 'zerodevPaymasterRpcUrl') ? undefined : json['zerodevPaymasterRpcUrl'],
|
|
48
48
|
'zerodevKernelDelegationAddress': !exists(json, 'zerodevKernelDelegationAddress') ? undefined : json['zerodevKernelDelegationAddress'],
|
|
49
|
+
'zerodevProjectVersion': !exists(json, 'zerodevProjectVersion') ? undefined : json['zerodevProjectVersion'],
|
|
49
50
|
'returnUrl': !exists(json, 'returnUrl') ? undefined : json['returnUrl'],
|
|
50
51
|
'cancelUrl': !exists(json, 'cancelUrl') ? undefined : json['cancelUrl'],
|
|
51
52
|
};
|
|
@@ -89,6 +90,7 @@ function ProviderUpdateRequestToJSON(value) {
|
|
|
89
90
|
'zerodevBundlerRpcUrl': value.zerodevBundlerRpcUrl,
|
|
90
91
|
'zerodevPaymasterRpcUrl': value.zerodevPaymasterRpcUrl,
|
|
91
92
|
'zerodevKernelDelegationAddress': value.zerodevKernelDelegationAddress,
|
|
93
|
+
'zerodevProjectVersion': value.zerodevProjectVersion,
|
|
92
94
|
'returnUrl': value.returnUrl,
|
|
93
95
|
'cancelUrl': value.cancelUrl,
|
|
94
96
|
};
|
|
@@ -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
|
@@ -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';
|
|
@@ -551,6 +550,7 @@ export * from './TokenWithRaw';
|
|
|
551
550
|
export * from './TokenWithRawProjectEnvironment';
|
|
552
551
|
export * from './TokensResponse';
|
|
553
552
|
export * from './TooManyRequests';
|
|
553
|
+
export * from './TransactionFeeEstimateRequest';
|
|
554
554
|
export * from './TransactionFeeEstimateResponse';
|
|
555
555
|
export * from './TransferDestination';
|
|
556
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,43 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
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
|
-
*/
|
|
18
|
-
function InlineObject1FromJSON(json) {
|
|
19
|
-
return InlineObject1FromJSONTyped(json);
|
|
20
|
-
}
|
|
21
|
-
function InlineObject1FromJSONTyped(json, ignoreDiscriminator) {
|
|
22
|
-
if ((json === undefined) || (json === null)) {
|
|
23
|
-
return json;
|
|
24
|
-
}
|
|
25
|
-
return {
|
|
26
|
-
'base64RawTransaction': json['base64RawTransaction'],
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
function InlineObject1ToJSON(value) {
|
|
30
|
-
if (value === undefined) {
|
|
31
|
-
return undefined;
|
|
32
|
-
}
|
|
33
|
-
if (value === null) {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
return {
|
|
37
|
-
'base64RawTransaction': value.base64RawTransaction,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
exports.InlineObject1FromJSON = InlineObject1FromJSON;
|
|
42
|
-
exports.InlineObject1FromJSONTyped = InlineObject1FromJSONTyped;
|
|
43
|
-
exports.InlineObject1ToJSON = InlineObject1ToJSON;
|