@dynamic-labs/sdk-api 0.0.1041 → 0.0.1043
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/AdminActionsApi.cjs +5 -4
- package/src/apis/AdminActionsApi.js +5 -4
- package/src/apis/AllowlistsApi.cjs +5 -4
- package/src/apis/AllowlistsApi.js +5 -4
- package/src/apis/AnalyticsApi.cjs +5 -4
- package/src/apis/AnalyticsApi.js +5 -4
- package/src/apis/AuthorizedClientsApi.cjs +5 -4
- package/src/apis/AuthorizedClientsApi.js +5 -4
- package/src/apis/ChainalysisApi.cjs +5 -4
- package/src/apis/ChainalysisApi.js +5 -4
- package/src/apis/ChainsApi.cjs +5 -4
- package/src/apis/ChainsApi.js +5 -4
- package/src/apis/CheckoutApi.cjs +6 -5
- package/src/apis/CheckoutApi.js +6 -5
- package/src/apis/ClientGrantApi.cjs +5 -4
- package/src/apis/ClientGrantApi.js +5 -4
- package/src/apis/CustomFieldsApi.cjs +5 -4
- package/src/apis/CustomFieldsApi.js +5 -4
- package/src/apis/CustomHostnamesApi.cjs +5 -4
- package/src/apis/CustomHostnamesApi.js +5 -4
- package/src/apis/CustomNetworksApi.cjs +5 -4
- package/src/apis/CustomNetworksApi.js +5 -4
- package/src/apis/DeeplinkUrlsApi.cjs +5 -4
- package/src/apis/DeeplinkUrlsApi.js +5 -4
- package/src/apis/EnvironmentsApi.cjs +5 -4
- package/src/apis/EnvironmentsApi.js +5 -4
- package/src/apis/EventsApi.cjs +5 -4
- package/src/apis/EventsApi.js +5 -4
- package/src/apis/ExchangesApi.cjs +5 -4
- package/src/apis/ExchangesApi.js +5 -4
- package/src/apis/ExportsApi.cjs +5 -4
- package/src/apis/ExportsApi.js +5 -4
- package/src/apis/ExternalJwtApi.cjs +5 -4
- package/src/apis/ExternalJwtApi.js +5 -4
- package/src/apis/GatesApi.cjs +5 -4
- package/src/apis/GatesApi.js +5 -4
- package/src/apis/GlobalWalletAccessControlApi.cjs +5 -4
- package/src/apis/GlobalWalletAccessControlApi.js +5 -4
- package/src/apis/GlobalWalletConnectionsApi.cjs +5 -4
- package/src/apis/GlobalWalletConnectionsApi.js +5 -4
- package/src/apis/GlobalWalletsApi.cjs +5 -4
- package/src/apis/GlobalWalletsApi.js +5 -4
- package/src/apis/InvitesApi.cjs +5 -4
- package/src/apis/InvitesApi.js +5 -4
- package/src/apis/MembersApi.cjs +5 -4
- package/src/apis/MembersApi.js +5 -4
- package/src/apis/MfaSettingsApi.cjs +5 -4
- package/src/apis/MfaSettingsApi.js +5 -4
- package/src/apis/NameServicesApi.cjs +5 -4
- package/src/apis/NameServicesApi.js +5 -4
- package/src/apis/OrganizationSettingsApi.cjs +5 -4
- package/src/apis/OrganizationSettingsApi.js +5 -4
- package/src/apis/OrganizationsApi.cjs +5 -4
- package/src/apis/OrganizationsApi.js +5 -4
- package/src/apis/OriginsApi.cjs +5 -4
- package/src/apis/OriginsApi.js +5 -4
- package/src/apis/ProjectsApi.cjs +5 -4
- package/src/apis/ProjectsApi.js +5 -4
- package/src/apis/ProvidersApi.cjs +5 -4
- package/src/apis/ProvidersApi.js +5 -4
- package/src/apis/SDKApi.cjs +225 -287
- package/src/apis/SDKApi.d.ts +112 -140
- package/src/apis/SDKApi.js +225 -287
- package/src/apis/SDKViewsApi.cjs +5 -4
- package/src/apis/SDKViewsApi.js +5 -4
- package/src/apis/SessionsApi.cjs +5 -4
- package/src/apis/SessionsApi.js +5 -4
- package/src/apis/TestAccountApi.cjs +5 -4
- package/src/apis/TestAccountApi.js +5 -4
- package/src/apis/TokensApi.cjs +5 -4
- package/src/apis/TokensApi.js +5 -4
- package/src/apis/UserApiTokensApi.cjs +5 -4
- package/src/apis/UserApiTokensApi.js +5 -4
- package/src/apis/UsersApi.cjs +5 -4
- package/src/apis/UsersApi.js +5 -4
- package/src/apis/VisitsApi.cjs +5 -4
- package/src/apis/VisitsApi.js +5 -4
- package/src/apis/WaasApi.cjs +5 -4
- package/src/apis/WaasApi.js +5 -4
- package/src/apis/WalletConnectApi.cjs +5 -4
- package/src/apis/WalletConnectApi.js +5 -4
- package/src/apis/WalletsApi.cjs +5 -4
- package/src/apis/WalletsApi.js +5 -4
- package/src/apis/WebhooksApi.cjs +5 -4
- package/src/apis/WebhooksApi.js +5 -4
- package/src/index.cjs +100 -68
- package/src/index.js +20 -13
- package/src/models/AttachSourceRequest.cjs +3 -3
- package/src/models/AttachSourceRequest.d.ts +3 -3
- package/src/models/AttachSourceRequest.js +3 -3
- package/src/models/CheckoutTransaction.cjs +24 -24
- package/src/models/CheckoutTransaction.d.ts +24 -24
- package/src/models/CheckoutTransaction.js +24 -24
- package/src/models/Flow.cjs +109 -0
- package/src/models/Flow.d.ts +231 -0
- package/src/models/Flow.js +103 -0
- package/src/models/FlowAttachSourceRequest.cjs +44 -0
- package/src/models/FlowAttachSourceRequest.d.ts +54 -0
- package/src/models/FlowAttachSourceRequest.js +38 -0
- package/src/models/FlowCreateRequest.cjs +45 -0
- package/src/models/FlowCreateRequest.d.ts +59 -0
- package/src/models/FlowCreateRequest.js +39 -0
- package/src/models/FlowCreateResponse.cjs +33 -0
- package/src/models/FlowCreateResponse.d.ts +28 -0
- package/src/models/FlowCreateResponse.js +27 -0
- package/src/models/{CheckoutTransactionExchangeSource.cjs → FlowExchangeSource.cjs} +7 -7
- package/src/models/FlowExchangeSource.d.ts +33 -0
- package/src/models/{CheckoutTransactionExchangeSource.js → FlowExchangeSource.js} +5 -5
- package/src/models/FlowExecutionStateEnum.cjs +47 -0
- package/src/models/{CheckoutExecutionStateEnum.d.ts → FlowExecutionStateEnum.d.ts} +5 -5
- package/src/models/FlowExecutionStateEnum.js +41 -0
- package/src/models/{CheckoutFailure.cjs → FlowFailure.cjs} +7 -7
- package/src/models/{CheckoutFailure.d.ts → FlowFailure.d.ts} +12 -12
- package/src/models/{CheckoutFailure.js → FlowFailure.js} +5 -5
- package/src/models/FlowFeeBreakdown.cjs +36 -0
- package/src/models/FlowFeeBreakdown.d.ts +34 -0
- package/src/models/FlowFeeBreakdown.js +30 -0
- package/src/models/{CheckoutGasEstimate.cjs → FlowGasEstimate.cjs} +7 -7
- package/src/models/{CheckoutGasEstimate.d.ts → FlowGasEstimate.d.ts} +9 -9
- package/src/models/{CheckoutGasEstimate.js → FlowGasEstimate.js} +5 -5
- package/src/models/FlowModeEnum.cjs +41 -0
- package/src/models/FlowModeEnum.d.ts +24 -0
- package/src/models/FlowModeEnum.js +35 -0
- package/src/models/{PrepareSigningRequest.cjs → FlowPrepareSigningRequest.cjs} +7 -7
- package/src/models/FlowPrepareSigningRequest.d.ts +33 -0
- package/src/models/{PrepareSigningRequest.js → FlowPrepareSigningRequest.js} +5 -5
- package/src/models/{CheckoutTransactionQuote.cjs → FlowQuote.cjs} +10 -10
- package/src/models/{CheckoutTransactionQuote.d.ts → FlowQuote.d.ts} +18 -18
- package/src/models/{CheckoutTransactionQuote.js → FlowQuote.js} +8 -8
- package/src/models/{QuoteRequest.cjs → FlowQuoteRequest.cjs} +7 -7
- package/src/models/FlowQuoteRequest.d.ts +39 -0
- package/src/models/{QuoteRequest.js → FlowQuoteRequest.js} +5 -5
- package/src/models/{RecordBroadcastRequest.cjs → FlowRecordBroadcastRequest.cjs} +7 -7
- package/src/models/FlowRecordBroadcastRequest.d.ts +27 -0
- package/src/models/{RecordBroadcastRequest.js → FlowRecordBroadcastRequest.js} +5 -5
- package/src/models/FlowRiskStateEnum.cjs +43 -0
- package/src/models/{CheckoutRiskStateEnum.d.ts → FlowRiskStateEnum.d.ts} +5 -5
- package/src/models/FlowRiskStateEnum.js +37 -0
- package/src/models/{CheckoutSettlementData.cjs → FlowSettlementData.cjs} +7 -7
- package/src/models/{CheckoutSettlementData.d.ts → FlowSettlementData.d.ts} +10 -10
- package/src/models/{CheckoutSettlementData.js → FlowSettlementData.js} +5 -5
- package/src/models/FlowSettlementStateEnum.cjs +45 -0
- package/src/models/{CheckoutSettlementStateEnum.d.ts → FlowSettlementStateEnum.d.ts} +5 -5
- package/src/models/FlowSettlementStateEnum.js +39 -0
- package/src/models/FlowSourceResponse.cjs +37 -0
- package/src/models/FlowSourceResponse.d.ts +40 -0
- package/src/models/FlowSourceResponse.js +31 -0
- package/src/models/FlowSourceTypeEnum.cjs +41 -0
- package/src/models/FlowSourceTypeEnum.d.ts +24 -0
- package/src/models/FlowSourceTypeEnum.js +35 -0
- package/src/models/SwapSigningPayload.cjs +3 -0
- package/src/models/SwapSigningPayload.d.ts +8 -1
- package/src/models/SwapSigningPayload.js +3 -0
- package/src/models/SwapTronTransactionData.cjs +47 -0
- package/src/models/SwapTronTransactionData.d.ts +39 -0
- package/src/models/SwapTronTransactionData.js +41 -0
- package/src/models/TokenScopes.cjs +1 -0
- package/src/models/TokenScopes.d.ts +2 -1
- package/src/models/TokenScopes.js +1 -0
- package/src/models/index.d.ts +20 -13
- package/src/models/CheckoutExecutionStateEnum.cjs +0 -47
- package/src/models/CheckoutExecutionStateEnum.js +0 -41
- package/src/models/CheckoutFeeBreakdown.cjs +0 -36
- package/src/models/CheckoutFeeBreakdown.d.ts +0 -34
- package/src/models/CheckoutFeeBreakdown.js +0 -30
- package/src/models/CheckoutRiskStateEnum.cjs +0 -43
- package/src/models/CheckoutRiskStateEnum.js +0 -37
- package/src/models/CheckoutSettlementStateEnum.cjs +0 -45
- package/src/models/CheckoutSettlementStateEnum.js +0 -39
- package/src/models/CheckoutSourceTypeEnum.cjs +0 -41
- package/src/models/CheckoutSourceTypeEnum.d.ts +0 -24
- package/src/models/CheckoutSourceTypeEnum.js +0 -35
- package/src/models/CheckoutTransactionExchangeSource.d.ts +0 -33
- package/src/models/PrepareSigningRequest.d.ts +0 -33
- package/src/models/QuoteRequest.d.ts +0 -40
- package/src/models/RecordBroadcastRequest.d.ts +0 -27
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import { ChainEnum } from './ChainEnum';
|
|
13
|
-
import { CheckoutExecutionStateEnum } from './CheckoutExecutionStateEnum';
|
|
14
|
-
import { CheckoutFailure } from './CheckoutFailure';
|
|
15
|
-
import { CheckoutRiskStateEnum } from './CheckoutRiskStateEnum';
|
|
16
|
-
import { CheckoutSettlementData } from './CheckoutSettlementData';
|
|
17
|
-
import { CheckoutSettlementStateEnum } from './CheckoutSettlementStateEnum';
|
|
18
|
-
import { CheckoutSourceTypeEnum } from './CheckoutSourceTypeEnum';
|
|
19
13
|
import { CheckoutTransactionDestinationAddress } from './CheckoutTransactionDestinationAddress';
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
14
|
+
import { FlowExchangeSource } from './FlowExchangeSource';
|
|
15
|
+
import { FlowExecutionStateEnum } from './FlowExecutionStateEnum';
|
|
16
|
+
import { FlowFailure } from './FlowFailure';
|
|
17
|
+
import { FlowQuote } from './FlowQuote';
|
|
18
|
+
import { FlowRiskStateEnum } from './FlowRiskStateEnum';
|
|
19
|
+
import { FlowSettlementData } from './FlowSettlementData';
|
|
20
|
+
import { FlowSettlementStateEnum } from './FlowSettlementStateEnum';
|
|
21
|
+
import { FlowSourceTypeEnum } from './FlowSourceTypeEnum';
|
|
22
22
|
/**
|
|
23
23
|
*
|
|
24
24
|
* @export
|
|
@@ -69,28 +69,28 @@ export interface CheckoutTransaction {
|
|
|
69
69
|
destinationAddresses?: Array<CheckoutTransactionDestinationAddress>;
|
|
70
70
|
/**
|
|
71
71
|
*
|
|
72
|
-
* @type {
|
|
72
|
+
* @type {FlowExecutionStateEnum}
|
|
73
73
|
* @memberof CheckoutTransaction
|
|
74
74
|
*/
|
|
75
|
-
executionState:
|
|
75
|
+
executionState: FlowExecutionStateEnum;
|
|
76
76
|
/**
|
|
77
77
|
*
|
|
78
|
-
* @type {
|
|
78
|
+
* @type {FlowSettlementStateEnum}
|
|
79
79
|
* @memberof CheckoutTransaction
|
|
80
80
|
*/
|
|
81
|
-
settlementState:
|
|
81
|
+
settlementState: FlowSettlementStateEnum;
|
|
82
82
|
/**
|
|
83
83
|
*
|
|
84
|
-
* @type {
|
|
84
|
+
* @type {FlowRiskStateEnum}
|
|
85
85
|
* @memberof CheckoutTransaction
|
|
86
86
|
*/
|
|
87
|
-
riskState:
|
|
87
|
+
riskState: FlowRiskStateEnum;
|
|
88
88
|
/**
|
|
89
89
|
*
|
|
90
|
-
* @type {
|
|
90
|
+
* @type {FlowSourceTypeEnum}
|
|
91
91
|
* @memberof CheckoutTransaction
|
|
92
92
|
*/
|
|
93
|
-
sourceType?:
|
|
93
|
+
sourceType?: FlowSourceTypeEnum;
|
|
94
94
|
/**
|
|
95
95
|
* Valid blockchain wallet address, must be an alphanumeric string (underscores allowed for chains like Midnight, hyphens allowed for chains using base64url-encoded addresses like TON)
|
|
96
96
|
* @type {string}
|
|
@@ -147,10 +147,10 @@ export interface CheckoutTransaction {
|
|
|
147
147
|
quoteVersion: number;
|
|
148
148
|
/**
|
|
149
149
|
*
|
|
150
|
-
* @type {
|
|
150
|
+
* @type {FlowQuote}
|
|
151
151
|
* @memberof CheckoutTransaction
|
|
152
152
|
*/
|
|
153
|
-
quote?:
|
|
153
|
+
quote?: FlowQuote;
|
|
154
154
|
/**
|
|
155
155
|
* A string with a max length of 4096 characters
|
|
156
156
|
* @type {string}
|
|
@@ -177,10 +177,10 @@ export interface CheckoutTransaction {
|
|
|
177
177
|
confirmations?: number;
|
|
178
178
|
/**
|
|
179
179
|
*
|
|
180
|
-
* @type {
|
|
180
|
+
* @type {FlowSettlementData}
|
|
181
181
|
* @memberof CheckoutTransaction
|
|
182
182
|
*/
|
|
183
|
-
settlement?:
|
|
183
|
+
settlement?: FlowSettlementData;
|
|
184
184
|
/**
|
|
185
185
|
* ISO 8601 timestamp of when the transaction was completed
|
|
186
186
|
* @type {Date}
|
|
@@ -189,10 +189,10 @@ export interface CheckoutTransaction {
|
|
|
189
189
|
completedAt?: Date;
|
|
190
190
|
/**
|
|
191
191
|
*
|
|
192
|
-
* @type {
|
|
192
|
+
* @type {FlowFailure}
|
|
193
193
|
* @memberof CheckoutTransaction
|
|
194
194
|
*/
|
|
195
|
-
failure?:
|
|
195
|
+
failure?: FlowFailure;
|
|
196
196
|
/**
|
|
197
197
|
* ISO 8601 timestamp of when the transaction expires
|
|
198
198
|
* @type {Date}
|
|
@@ -213,10 +213,10 @@ export interface CheckoutTransaction {
|
|
|
213
213
|
updatedAt: Date;
|
|
214
214
|
/**
|
|
215
215
|
*
|
|
216
|
-
* @type {
|
|
216
|
+
* @type {FlowExchangeSource}
|
|
217
217
|
* @memberof CheckoutTransaction
|
|
218
218
|
*/
|
|
219
|
-
exchangeSource?:
|
|
219
|
+
exchangeSource?: FlowExchangeSource;
|
|
220
220
|
}
|
|
221
221
|
export declare function CheckoutTransactionFromJSON(json: any): CheckoutTransaction;
|
|
222
222
|
export declare function CheckoutTransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): CheckoutTransaction;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { exists } from '../runtime.js';
|
|
2
2
|
import { ChainEnumFromJSON, ChainEnumToJSON } from './ChainEnum.js';
|
|
3
|
-
import { CheckoutExecutionStateEnumFromJSON, CheckoutExecutionStateEnumToJSON } from './CheckoutExecutionStateEnum.js';
|
|
4
|
-
import { CheckoutFailureFromJSON, CheckoutFailureToJSON } from './CheckoutFailure.js';
|
|
5
|
-
import { CheckoutRiskStateEnumFromJSON, CheckoutRiskStateEnumToJSON } from './CheckoutRiskStateEnum.js';
|
|
6
|
-
import { CheckoutSettlementDataFromJSON, CheckoutSettlementDataToJSON } from './CheckoutSettlementData.js';
|
|
7
|
-
import { CheckoutSettlementStateEnumFromJSON, CheckoutSettlementStateEnumToJSON } from './CheckoutSettlementStateEnum.js';
|
|
8
|
-
import { CheckoutSourceTypeEnumFromJSON, CheckoutSourceTypeEnumToJSON } from './CheckoutSourceTypeEnum.js';
|
|
9
3
|
import { CheckoutTransactionDestinationAddressFromJSON, CheckoutTransactionDestinationAddressToJSON } from './CheckoutTransactionDestinationAddress.js';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
4
|
+
import { FlowExchangeSourceFromJSON, FlowExchangeSourceToJSON } from './FlowExchangeSource.js';
|
|
5
|
+
import { FlowExecutionStateEnumFromJSON, FlowExecutionStateEnumToJSON } from './FlowExecutionStateEnum.js';
|
|
6
|
+
import { FlowFailureFromJSON, FlowFailureToJSON } from './FlowFailure.js';
|
|
7
|
+
import { FlowQuoteFromJSON, FlowQuoteToJSON } from './FlowQuote.js';
|
|
8
|
+
import { FlowRiskStateEnumFromJSON, FlowRiskStateEnumToJSON } from './FlowRiskStateEnum.js';
|
|
9
|
+
import { FlowSettlementDataFromJSON, FlowSettlementDataToJSON } from './FlowSettlementData.js';
|
|
10
|
+
import { FlowSettlementStateEnumFromJSON, FlowSettlementStateEnumToJSON } from './FlowSettlementStateEnum.js';
|
|
11
|
+
import { FlowSourceTypeEnumFromJSON, FlowSourceTypeEnumToJSON } from './FlowSourceTypeEnum.js';
|
|
12
12
|
|
|
13
13
|
/* tslint:disable */
|
|
14
14
|
function CheckoutTransactionFromJSON(json) {
|
|
@@ -26,10 +26,10 @@ function CheckoutTransactionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
26
26
|
'amount': json['amount'],
|
|
27
27
|
'currency': json['currency'],
|
|
28
28
|
'destinationAddresses': !exists(json, 'destinationAddresses') ? undefined : (json['destinationAddresses'].map(CheckoutTransactionDestinationAddressFromJSON)),
|
|
29
|
-
'executionState':
|
|
30
|
-
'settlementState':
|
|
31
|
-
'riskState':
|
|
32
|
-
'sourceType': !exists(json, 'sourceType') ? undefined :
|
|
29
|
+
'executionState': FlowExecutionStateEnumFromJSON(json['executionState']),
|
|
30
|
+
'settlementState': FlowSettlementStateEnumFromJSON(json['settlementState']),
|
|
31
|
+
'riskState': FlowRiskStateEnumFromJSON(json['riskState']),
|
|
32
|
+
'sourceType': !exists(json, 'sourceType') ? undefined : FlowSourceTypeEnumFromJSON(json['sourceType']),
|
|
33
33
|
'fromAddress': !exists(json, 'fromAddress') ? undefined : json['fromAddress'],
|
|
34
34
|
'fromChainId': !exists(json, 'fromChainId') ? undefined : json['fromChainId'],
|
|
35
35
|
'fromChainName': !exists(json, 'fromChainName') ? undefined : ChainEnumFromJSON(json['fromChainName']),
|
|
@@ -39,18 +39,18 @@ function CheckoutTransactionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
39
39
|
'toChainName': !exists(json, 'toChainName') ? undefined : ChainEnumFromJSON(json['toChainName']),
|
|
40
40
|
'toToken': !exists(json, 'toToken') ? undefined : json['toToken'],
|
|
41
41
|
'quoteVersion': json['quoteVersion'],
|
|
42
|
-
'quote': !exists(json, 'quote') ? undefined :
|
|
42
|
+
'quote': !exists(json, 'quote') ? undefined : FlowQuoteFromJSON(json['quote']),
|
|
43
43
|
'txHash': !exists(json, 'txHash') ? undefined : json['txHash'],
|
|
44
44
|
'broadcastedAt': !exists(json, 'broadcastedAt') ? undefined : (new Date(json['broadcastedAt'])),
|
|
45
45
|
'sourceConfirmedAt': !exists(json, 'sourceConfirmedAt') ? undefined : (new Date(json['sourceConfirmedAt'])),
|
|
46
46
|
'confirmations': !exists(json, 'confirmations') ? undefined : json['confirmations'],
|
|
47
|
-
'settlement': !exists(json, 'settlement') ? undefined :
|
|
47
|
+
'settlement': !exists(json, 'settlement') ? undefined : FlowSettlementDataFromJSON(json['settlement']),
|
|
48
48
|
'completedAt': !exists(json, 'completedAt') ? undefined : (new Date(json['completedAt'])),
|
|
49
|
-
'failure': !exists(json, 'failure') ? undefined :
|
|
49
|
+
'failure': !exists(json, 'failure') ? undefined : FlowFailureFromJSON(json['failure']),
|
|
50
50
|
'expiresAt': !exists(json, 'expiresAt') ? undefined : (new Date(json['expiresAt'])),
|
|
51
51
|
'createdAt': (new Date(json['createdAt'])),
|
|
52
52
|
'updatedAt': (new Date(json['updatedAt'])),
|
|
53
|
-
'exchangeSource': !exists(json, 'exchangeSource') ? undefined :
|
|
53
|
+
'exchangeSource': !exists(json, 'exchangeSource') ? undefined : FlowExchangeSourceFromJSON(json['exchangeSource']),
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
function CheckoutTransactionToJSON(value) {
|
|
@@ -68,10 +68,10 @@ function CheckoutTransactionToJSON(value) {
|
|
|
68
68
|
'amount': value.amount,
|
|
69
69
|
'currency': value.currency,
|
|
70
70
|
'destinationAddresses': value.destinationAddresses === undefined ? undefined : (value.destinationAddresses.map(CheckoutTransactionDestinationAddressToJSON)),
|
|
71
|
-
'executionState':
|
|
72
|
-
'settlementState':
|
|
73
|
-
'riskState':
|
|
74
|
-
'sourceType':
|
|
71
|
+
'executionState': FlowExecutionStateEnumToJSON(value.executionState),
|
|
72
|
+
'settlementState': FlowSettlementStateEnumToJSON(value.settlementState),
|
|
73
|
+
'riskState': FlowRiskStateEnumToJSON(value.riskState),
|
|
74
|
+
'sourceType': FlowSourceTypeEnumToJSON(value.sourceType),
|
|
75
75
|
'fromAddress': value.fromAddress,
|
|
76
76
|
'fromChainId': value.fromChainId,
|
|
77
77
|
'fromChainName': ChainEnumToJSON(value.fromChainName),
|
|
@@ -81,18 +81,18 @@ function CheckoutTransactionToJSON(value) {
|
|
|
81
81
|
'toChainName': ChainEnumToJSON(value.toChainName),
|
|
82
82
|
'toToken': value.toToken,
|
|
83
83
|
'quoteVersion': value.quoteVersion,
|
|
84
|
-
'quote':
|
|
84
|
+
'quote': FlowQuoteToJSON(value.quote),
|
|
85
85
|
'txHash': value.txHash,
|
|
86
86
|
'broadcastedAt': value.broadcastedAt === undefined ? undefined : (value.broadcastedAt.toISOString()),
|
|
87
87
|
'sourceConfirmedAt': value.sourceConfirmedAt === undefined ? undefined : (value.sourceConfirmedAt.toISOString()),
|
|
88
88
|
'confirmations': value.confirmations,
|
|
89
|
-
'settlement':
|
|
89
|
+
'settlement': FlowSettlementDataToJSON(value.settlement),
|
|
90
90
|
'completedAt': value.completedAt === undefined ? undefined : (value.completedAt.toISOString()),
|
|
91
|
-
'failure':
|
|
91
|
+
'failure': FlowFailureToJSON(value.failure),
|
|
92
92
|
'expiresAt': value.expiresAt === undefined ? undefined : (value.expiresAt.toISOString()),
|
|
93
93
|
'createdAt': (value.createdAt.toISOString()),
|
|
94
94
|
'updatedAt': (value.updatedAt.toISOString()),
|
|
95
|
-
'exchangeSource':
|
|
95
|
+
'exchangeSource': FlowExchangeSourceToJSON(value.exchangeSource),
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var runtime = require('../runtime.cjs');
|
|
6
|
+
var ChainEnum = require('./ChainEnum.cjs');
|
|
7
|
+
var DestinationConfigInput = require('./DestinationConfigInput.cjs');
|
|
8
|
+
var FlowExchangeSource = require('./FlowExchangeSource.cjs');
|
|
9
|
+
var FlowExecutionStateEnum = require('./FlowExecutionStateEnum.cjs');
|
|
10
|
+
var FlowFailure = require('./FlowFailure.cjs');
|
|
11
|
+
var FlowModeEnum = require('./FlowModeEnum.cjs');
|
|
12
|
+
var FlowQuote = require('./FlowQuote.cjs');
|
|
13
|
+
var FlowRiskStateEnum = require('./FlowRiskStateEnum.cjs');
|
|
14
|
+
var FlowSettlementData = require('./FlowSettlementData.cjs');
|
|
15
|
+
var FlowSettlementStateEnum = require('./FlowSettlementStateEnum.cjs');
|
|
16
|
+
var FlowSourceTypeEnum = require('./FlowSourceTypeEnum.cjs');
|
|
17
|
+
var SettlementConfigInput = require('./SettlementConfigInput.cjs');
|
|
18
|
+
|
|
19
|
+
/* tslint:disable */
|
|
20
|
+
function FlowFromJSON(json) {
|
|
21
|
+
return FlowFromJSONTyped(json);
|
|
22
|
+
}
|
|
23
|
+
function FlowFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
|
+
if ((json === undefined) || (json === null)) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
'id': json['id'],
|
|
29
|
+
'mode': FlowModeEnum.FlowModeEnumFromJSON(json['mode']),
|
|
30
|
+
'amount': json['amount'],
|
|
31
|
+
'currency': json['currency'],
|
|
32
|
+
'settlementConfig': SettlementConfigInput.SettlementConfigInputFromJSON(json['settlementConfig']),
|
|
33
|
+
'destinationConfig': !runtime.exists(json, 'destinationConfig') ? undefined : DestinationConfigInput.DestinationConfigInputFromJSON(json['destinationConfig']),
|
|
34
|
+
'memo': !runtime.exists(json, 'memo') ? undefined : json['memo'],
|
|
35
|
+
'userId': !runtime.exists(json, 'userId') ? undefined : json['userId'],
|
|
36
|
+
'executionState': FlowExecutionStateEnum.FlowExecutionStateEnumFromJSON(json['executionState']),
|
|
37
|
+
'settlementState': FlowSettlementStateEnum.FlowSettlementStateEnumFromJSON(json['settlementState']),
|
|
38
|
+
'riskState': FlowRiskStateEnum.FlowRiskStateEnumFromJSON(json['riskState']),
|
|
39
|
+
'sourceType': !runtime.exists(json, 'sourceType') ? undefined : FlowSourceTypeEnum.FlowSourceTypeEnumFromJSON(json['sourceType']),
|
|
40
|
+
'fromAddress': !runtime.exists(json, 'fromAddress') ? undefined : json['fromAddress'],
|
|
41
|
+
'fromChainId': !runtime.exists(json, 'fromChainId') ? undefined : json['fromChainId'],
|
|
42
|
+
'fromChainName': !runtime.exists(json, 'fromChainName') ? undefined : ChainEnum.ChainEnumFromJSON(json['fromChainName']),
|
|
43
|
+
'fromToken': !runtime.exists(json, 'fromToken') ? undefined : json['fromToken'],
|
|
44
|
+
'toAddress': !runtime.exists(json, 'toAddress') ? undefined : json['toAddress'],
|
|
45
|
+
'toChainId': !runtime.exists(json, 'toChainId') ? undefined : json['toChainId'],
|
|
46
|
+
'toChainName': !runtime.exists(json, 'toChainName') ? undefined : ChainEnum.ChainEnumFromJSON(json['toChainName']),
|
|
47
|
+
'toToken': !runtime.exists(json, 'toToken') ? undefined : json['toToken'],
|
|
48
|
+
'quoteVersion': json['quoteVersion'],
|
|
49
|
+
'quote': !runtime.exists(json, 'quote') ? undefined : FlowQuote.FlowQuoteFromJSON(json['quote']),
|
|
50
|
+
'txHash': !runtime.exists(json, 'txHash') ? undefined : json['txHash'],
|
|
51
|
+
'broadcastedAt': !runtime.exists(json, 'broadcastedAt') ? undefined : (new Date(json['broadcastedAt'])),
|
|
52
|
+
'sourceConfirmedAt': !runtime.exists(json, 'sourceConfirmedAt') ? undefined : (new Date(json['sourceConfirmedAt'])),
|
|
53
|
+
'confirmations': !runtime.exists(json, 'confirmations') ? undefined : json['confirmations'],
|
|
54
|
+
'settlement': !runtime.exists(json, 'settlement') ? undefined : FlowSettlementData.FlowSettlementDataFromJSON(json['settlement']),
|
|
55
|
+
'completedAt': !runtime.exists(json, 'completedAt') ? undefined : (new Date(json['completedAt'])),
|
|
56
|
+
'failure': !runtime.exists(json, 'failure') ? undefined : FlowFailure.FlowFailureFromJSON(json['failure']),
|
|
57
|
+
'expiresAt': !runtime.exists(json, 'expiresAt') ? undefined : (new Date(json['expiresAt'])),
|
|
58
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
59
|
+
'updatedAt': (new Date(json['updatedAt'])),
|
|
60
|
+
'exchangeSource': !runtime.exists(json, 'exchangeSource') ? undefined : FlowExchangeSource.FlowExchangeSourceFromJSON(json['exchangeSource']),
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function FlowToJSON(value) {
|
|
64
|
+
if (value === undefined) {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
if (value === null) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
'id': value.id,
|
|
72
|
+
'mode': FlowModeEnum.FlowModeEnumToJSON(value.mode),
|
|
73
|
+
'amount': value.amount,
|
|
74
|
+
'currency': value.currency,
|
|
75
|
+
'settlementConfig': SettlementConfigInput.SettlementConfigInputToJSON(value.settlementConfig),
|
|
76
|
+
'destinationConfig': DestinationConfigInput.DestinationConfigInputToJSON(value.destinationConfig),
|
|
77
|
+
'memo': value.memo,
|
|
78
|
+
'userId': value.userId,
|
|
79
|
+
'executionState': FlowExecutionStateEnum.FlowExecutionStateEnumToJSON(value.executionState),
|
|
80
|
+
'settlementState': FlowSettlementStateEnum.FlowSettlementStateEnumToJSON(value.settlementState),
|
|
81
|
+
'riskState': FlowRiskStateEnum.FlowRiskStateEnumToJSON(value.riskState),
|
|
82
|
+
'sourceType': FlowSourceTypeEnum.FlowSourceTypeEnumToJSON(value.sourceType),
|
|
83
|
+
'fromAddress': value.fromAddress,
|
|
84
|
+
'fromChainId': value.fromChainId,
|
|
85
|
+
'fromChainName': ChainEnum.ChainEnumToJSON(value.fromChainName),
|
|
86
|
+
'fromToken': value.fromToken,
|
|
87
|
+
'toAddress': value.toAddress,
|
|
88
|
+
'toChainId': value.toChainId,
|
|
89
|
+
'toChainName': ChainEnum.ChainEnumToJSON(value.toChainName),
|
|
90
|
+
'toToken': value.toToken,
|
|
91
|
+
'quoteVersion': value.quoteVersion,
|
|
92
|
+
'quote': FlowQuote.FlowQuoteToJSON(value.quote),
|
|
93
|
+
'txHash': value.txHash,
|
|
94
|
+
'broadcastedAt': value.broadcastedAt === undefined ? undefined : (value.broadcastedAt.toISOString()),
|
|
95
|
+
'sourceConfirmedAt': value.sourceConfirmedAt === undefined ? undefined : (value.sourceConfirmedAt.toISOString()),
|
|
96
|
+
'confirmations': value.confirmations,
|
|
97
|
+
'settlement': FlowSettlementData.FlowSettlementDataToJSON(value.settlement),
|
|
98
|
+
'completedAt': value.completedAt === undefined ? undefined : (value.completedAt.toISOString()),
|
|
99
|
+
'failure': FlowFailure.FlowFailureToJSON(value.failure),
|
|
100
|
+
'expiresAt': value.expiresAt === undefined ? undefined : (value.expiresAt.toISOString()),
|
|
101
|
+
'createdAt': (value.createdAt.toISOString()),
|
|
102
|
+
'updatedAt': (value.updatedAt.toISOString()),
|
|
103
|
+
'exchangeSource': FlowExchangeSource.FlowExchangeSourceToJSON(value.exchangeSource),
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
exports.FlowFromJSON = FlowFromJSON;
|
|
108
|
+
exports.FlowFromJSONTyped = FlowFromJSONTyped;
|
|
109
|
+
exports.FlowToJSON = FlowToJSON;
|
|
@@ -0,0 +1,231 @@
|
|
|
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 { ChainEnum } from './ChainEnum';
|
|
13
|
+
import { DestinationConfigInput } from './DestinationConfigInput';
|
|
14
|
+
import { FlowExchangeSource } from './FlowExchangeSource';
|
|
15
|
+
import { FlowExecutionStateEnum } from './FlowExecutionStateEnum';
|
|
16
|
+
import { FlowFailure } from './FlowFailure';
|
|
17
|
+
import { FlowModeEnum } from './FlowModeEnum';
|
|
18
|
+
import { FlowQuote } from './FlowQuote';
|
|
19
|
+
import { FlowRiskStateEnum } from './FlowRiskStateEnum';
|
|
20
|
+
import { FlowSettlementData } from './FlowSettlementData';
|
|
21
|
+
import { FlowSettlementStateEnum } from './FlowSettlementStateEnum';
|
|
22
|
+
import { FlowSourceTypeEnum } from './FlowSourceTypeEnum';
|
|
23
|
+
import { SettlementConfigInput } from './SettlementConfigInput';
|
|
24
|
+
/**
|
|
25
|
+
* A single payment, deposit, or withdraw flow. Collapses the former Checkout and CheckoutTransaction into one resource.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface Flow
|
|
28
|
+
*/
|
|
29
|
+
export interface Flow {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof Flow
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {FlowModeEnum}
|
|
39
|
+
* @memberof Flow
|
|
40
|
+
*/
|
|
41
|
+
mode: FlowModeEnum;
|
|
42
|
+
/**
|
|
43
|
+
* Amount in the specified currency. Set once at create by the API-key caller and immutable thereafter.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof Flow
|
|
46
|
+
*/
|
|
47
|
+
amount: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof Flow
|
|
52
|
+
*/
|
|
53
|
+
currency: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {SettlementConfigInput}
|
|
57
|
+
* @memberof Flow
|
|
58
|
+
*/
|
|
59
|
+
settlementConfig: SettlementConfigInput;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {DestinationConfigInput}
|
|
63
|
+
* @memberof Flow
|
|
64
|
+
*/
|
|
65
|
+
destinationConfig?: DestinationConfigInput;
|
|
66
|
+
/**
|
|
67
|
+
* Arbitrary metadata attached to the flow
|
|
68
|
+
* @type {object}
|
|
69
|
+
* @memberof Flow
|
|
70
|
+
*/
|
|
71
|
+
memo?: object;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {string}
|
|
75
|
+
* @memberof Flow
|
|
76
|
+
*/
|
|
77
|
+
userId?: string;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {FlowExecutionStateEnum}
|
|
81
|
+
* @memberof Flow
|
|
82
|
+
*/
|
|
83
|
+
executionState: FlowExecutionStateEnum;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @type {FlowSettlementStateEnum}
|
|
87
|
+
* @memberof Flow
|
|
88
|
+
*/
|
|
89
|
+
settlementState: FlowSettlementStateEnum;
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @type {FlowRiskStateEnum}
|
|
93
|
+
* @memberof Flow
|
|
94
|
+
*/
|
|
95
|
+
riskState: FlowRiskStateEnum;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @type {FlowSourceTypeEnum}
|
|
99
|
+
* @memberof Flow
|
|
100
|
+
*/
|
|
101
|
+
sourceType?: FlowSourceTypeEnum;
|
|
102
|
+
/**
|
|
103
|
+
* Valid blockchain wallet address, must be an alphanumeric string (underscores allowed for chains like Midnight, hyphens allowed for chains using base64url-encoded addresses like TON)
|
|
104
|
+
* @type {string}
|
|
105
|
+
* @memberof Flow
|
|
106
|
+
*/
|
|
107
|
+
fromAddress?: string;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @type {string}
|
|
111
|
+
* @memberof Flow
|
|
112
|
+
*/
|
|
113
|
+
fromChainId?: string;
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @type {ChainEnum}
|
|
117
|
+
* @memberof Flow
|
|
118
|
+
*/
|
|
119
|
+
fromChainName?: ChainEnum;
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* @type {string}
|
|
123
|
+
* @memberof Flow
|
|
124
|
+
*/
|
|
125
|
+
fromToken?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Valid blockchain wallet address, must be an alphanumeric string (underscores allowed for chains like Midnight, hyphens allowed for chains using base64url-encoded addresses like TON)
|
|
128
|
+
* @type {string}
|
|
129
|
+
* @memberof Flow
|
|
130
|
+
*/
|
|
131
|
+
toAddress?: string;
|
|
132
|
+
/**
|
|
133
|
+
*
|
|
134
|
+
* @type {string}
|
|
135
|
+
* @memberof Flow
|
|
136
|
+
*/
|
|
137
|
+
toChainId?: string;
|
|
138
|
+
/**
|
|
139
|
+
*
|
|
140
|
+
* @type {ChainEnum}
|
|
141
|
+
* @memberof Flow
|
|
142
|
+
*/
|
|
143
|
+
toChainName?: ChainEnum;
|
|
144
|
+
/**
|
|
145
|
+
*
|
|
146
|
+
* @type {string}
|
|
147
|
+
* @memberof Flow
|
|
148
|
+
*/
|
|
149
|
+
toToken?: string;
|
|
150
|
+
/**
|
|
151
|
+
* Version number of the quote used for this flow
|
|
152
|
+
* @type {number}
|
|
153
|
+
* @memberof Flow
|
|
154
|
+
*/
|
|
155
|
+
quoteVersion: number;
|
|
156
|
+
/**
|
|
157
|
+
*
|
|
158
|
+
* @type {FlowQuote}
|
|
159
|
+
* @memberof Flow
|
|
160
|
+
*/
|
|
161
|
+
quote?: FlowQuote;
|
|
162
|
+
/**
|
|
163
|
+
* A string with a max length of 4096 characters
|
|
164
|
+
* @type {string}
|
|
165
|
+
* @memberof Flow
|
|
166
|
+
*/
|
|
167
|
+
txHash?: string;
|
|
168
|
+
/**
|
|
169
|
+
* ISO 8601 timestamp of when the flow was broadcast to the network
|
|
170
|
+
* @type {Date}
|
|
171
|
+
* @memberof Flow
|
|
172
|
+
*/
|
|
173
|
+
broadcastedAt?: Date;
|
|
174
|
+
/**
|
|
175
|
+
* ISO 8601 timestamp of when the source chain confirmed the transaction
|
|
176
|
+
* @type {Date}
|
|
177
|
+
* @memberof Flow
|
|
178
|
+
*/
|
|
179
|
+
sourceConfirmedAt?: Date;
|
|
180
|
+
/**
|
|
181
|
+
* Number of blockchain confirmations received
|
|
182
|
+
* @type {number}
|
|
183
|
+
* @memberof Flow
|
|
184
|
+
*/
|
|
185
|
+
confirmations?: number;
|
|
186
|
+
/**
|
|
187
|
+
*
|
|
188
|
+
* @type {FlowSettlementData}
|
|
189
|
+
* @memberof Flow
|
|
190
|
+
*/
|
|
191
|
+
settlement?: FlowSettlementData;
|
|
192
|
+
/**
|
|
193
|
+
* ISO 8601 timestamp of when the flow was completed
|
|
194
|
+
* @type {Date}
|
|
195
|
+
* @memberof Flow
|
|
196
|
+
*/
|
|
197
|
+
completedAt?: Date;
|
|
198
|
+
/**
|
|
199
|
+
*
|
|
200
|
+
* @type {FlowFailure}
|
|
201
|
+
* @memberof Flow
|
|
202
|
+
*/
|
|
203
|
+
failure?: FlowFailure;
|
|
204
|
+
/**
|
|
205
|
+
* ISO 8601 timestamp of when the flow expires
|
|
206
|
+
* @type {Date}
|
|
207
|
+
* @memberof Flow
|
|
208
|
+
*/
|
|
209
|
+
expiresAt?: Date;
|
|
210
|
+
/**
|
|
211
|
+
* ISO 8601 timestamp of when the flow was created
|
|
212
|
+
* @type {Date}
|
|
213
|
+
* @memberof Flow
|
|
214
|
+
*/
|
|
215
|
+
createdAt: Date;
|
|
216
|
+
/**
|
|
217
|
+
* ISO 8601 timestamp of when the flow was last updated
|
|
218
|
+
* @type {Date}
|
|
219
|
+
* @memberof Flow
|
|
220
|
+
*/
|
|
221
|
+
updatedAt: Date;
|
|
222
|
+
/**
|
|
223
|
+
*
|
|
224
|
+
* @type {FlowExchangeSource}
|
|
225
|
+
* @memberof Flow
|
|
226
|
+
*/
|
|
227
|
+
exchangeSource?: FlowExchangeSource;
|
|
228
|
+
}
|
|
229
|
+
export declare function FlowFromJSON(json: any): Flow;
|
|
230
|
+
export declare function FlowFromJSONTyped(json: any, ignoreDiscriminator: boolean): Flow;
|
|
231
|
+
export declare function FlowToJSON(value?: Flow | null): any;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { exists } from '../runtime.js';
|
|
2
|
+
import { ChainEnumFromJSON, ChainEnumToJSON } from './ChainEnum.js';
|
|
3
|
+
import { DestinationConfigInputFromJSON, DestinationConfigInputToJSON } from './DestinationConfigInput.js';
|
|
4
|
+
import { FlowExchangeSourceFromJSON, FlowExchangeSourceToJSON } from './FlowExchangeSource.js';
|
|
5
|
+
import { FlowExecutionStateEnumFromJSON, FlowExecutionStateEnumToJSON } from './FlowExecutionStateEnum.js';
|
|
6
|
+
import { FlowFailureFromJSON, FlowFailureToJSON } from './FlowFailure.js';
|
|
7
|
+
import { FlowModeEnumFromJSON, FlowModeEnumToJSON } from './FlowModeEnum.js';
|
|
8
|
+
import { FlowQuoteFromJSON, FlowQuoteToJSON } from './FlowQuote.js';
|
|
9
|
+
import { FlowRiskStateEnumFromJSON, FlowRiskStateEnumToJSON } from './FlowRiskStateEnum.js';
|
|
10
|
+
import { FlowSettlementDataFromJSON, FlowSettlementDataToJSON } from './FlowSettlementData.js';
|
|
11
|
+
import { FlowSettlementStateEnumFromJSON, FlowSettlementStateEnumToJSON } from './FlowSettlementStateEnum.js';
|
|
12
|
+
import { FlowSourceTypeEnumFromJSON, FlowSourceTypeEnumToJSON } from './FlowSourceTypeEnum.js';
|
|
13
|
+
import { SettlementConfigInputFromJSON, SettlementConfigInputToJSON } from './SettlementConfigInput.js';
|
|
14
|
+
|
|
15
|
+
/* tslint:disable */
|
|
16
|
+
function FlowFromJSON(json) {
|
|
17
|
+
return FlowFromJSONTyped(json);
|
|
18
|
+
}
|
|
19
|
+
function FlowFromJSONTyped(json, ignoreDiscriminator) {
|
|
20
|
+
if ((json === undefined) || (json === null)) {
|
|
21
|
+
return json;
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
'id': json['id'],
|
|
25
|
+
'mode': FlowModeEnumFromJSON(json['mode']),
|
|
26
|
+
'amount': json['amount'],
|
|
27
|
+
'currency': json['currency'],
|
|
28
|
+
'settlementConfig': SettlementConfigInputFromJSON(json['settlementConfig']),
|
|
29
|
+
'destinationConfig': !exists(json, 'destinationConfig') ? undefined : DestinationConfigInputFromJSON(json['destinationConfig']),
|
|
30
|
+
'memo': !exists(json, 'memo') ? undefined : json['memo'],
|
|
31
|
+
'userId': !exists(json, 'userId') ? undefined : json['userId'],
|
|
32
|
+
'executionState': FlowExecutionStateEnumFromJSON(json['executionState']),
|
|
33
|
+
'settlementState': FlowSettlementStateEnumFromJSON(json['settlementState']),
|
|
34
|
+
'riskState': FlowRiskStateEnumFromJSON(json['riskState']),
|
|
35
|
+
'sourceType': !exists(json, 'sourceType') ? undefined : FlowSourceTypeEnumFromJSON(json['sourceType']),
|
|
36
|
+
'fromAddress': !exists(json, 'fromAddress') ? undefined : json['fromAddress'],
|
|
37
|
+
'fromChainId': !exists(json, 'fromChainId') ? undefined : json['fromChainId'],
|
|
38
|
+
'fromChainName': !exists(json, 'fromChainName') ? undefined : ChainEnumFromJSON(json['fromChainName']),
|
|
39
|
+
'fromToken': !exists(json, 'fromToken') ? undefined : json['fromToken'],
|
|
40
|
+
'toAddress': !exists(json, 'toAddress') ? undefined : json['toAddress'],
|
|
41
|
+
'toChainId': !exists(json, 'toChainId') ? undefined : json['toChainId'],
|
|
42
|
+
'toChainName': !exists(json, 'toChainName') ? undefined : ChainEnumFromJSON(json['toChainName']),
|
|
43
|
+
'toToken': !exists(json, 'toToken') ? undefined : json['toToken'],
|
|
44
|
+
'quoteVersion': json['quoteVersion'],
|
|
45
|
+
'quote': !exists(json, 'quote') ? undefined : FlowQuoteFromJSON(json['quote']),
|
|
46
|
+
'txHash': !exists(json, 'txHash') ? undefined : json['txHash'],
|
|
47
|
+
'broadcastedAt': !exists(json, 'broadcastedAt') ? undefined : (new Date(json['broadcastedAt'])),
|
|
48
|
+
'sourceConfirmedAt': !exists(json, 'sourceConfirmedAt') ? undefined : (new Date(json['sourceConfirmedAt'])),
|
|
49
|
+
'confirmations': !exists(json, 'confirmations') ? undefined : json['confirmations'],
|
|
50
|
+
'settlement': !exists(json, 'settlement') ? undefined : FlowSettlementDataFromJSON(json['settlement']),
|
|
51
|
+
'completedAt': !exists(json, 'completedAt') ? undefined : (new Date(json['completedAt'])),
|
|
52
|
+
'failure': !exists(json, 'failure') ? undefined : FlowFailureFromJSON(json['failure']),
|
|
53
|
+
'expiresAt': !exists(json, 'expiresAt') ? undefined : (new Date(json['expiresAt'])),
|
|
54
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
55
|
+
'updatedAt': (new Date(json['updatedAt'])),
|
|
56
|
+
'exchangeSource': !exists(json, 'exchangeSource') ? undefined : FlowExchangeSourceFromJSON(json['exchangeSource']),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function FlowToJSON(value) {
|
|
60
|
+
if (value === undefined) {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
if (value === null) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
'id': value.id,
|
|
68
|
+
'mode': FlowModeEnumToJSON(value.mode),
|
|
69
|
+
'amount': value.amount,
|
|
70
|
+
'currency': value.currency,
|
|
71
|
+
'settlementConfig': SettlementConfigInputToJSON(value.settlementConfig),
|
|
72
|
+
'destinationConfig': DestinationConfigInputToJSON(value.destinationConfig),
|
|
73
|
+
'memo': value.memo,
|
|
74
|
+
'userId': value.userId,
|
|
75
|
+
'executionState': FlowExecutionStateEnumToJSON(value.executionState),
|
|
76
|
+
'settlementState': FlowSettlementStateEnumToJSON(value.settlementState),
|
|
77
|
+
'riskState': FlowRiskStateEnumToJSON(value.riskState),
|
|
78
|
+
'sourceType': FlowSourceTypeEnumToJSON(value.sourceType),
|
|
79
|
+
'fromAddress': value.fromAddress,
|
|
80
|
+
'fromChainId': value.fromChainId,
|
|
81
|
+
'fromChainName': ChainEnumToJSON(value.fromChainName),
|
|
82
|
+
'fromToken': value.fromToken,
|
|
83
|
+
'toAddress': value.toAddress,
|
|
84
|
+
'toChainId': value.toChainId,
|
|
85
|
+
'toChainName': ChainEnumToJSON(value.toChainName),
|
|
86
|
+
'toToken': value.toToken,
|
|
87
|
+
'quoteVersion': value.quoteVersion,
|
|
88
|
+
'quote': FlowQuoteToJSON(value.quote),
|
|
89
|
+
'txHash': value.txHash,
|
|
90
|
+
'broadcastedAt': value.broadcastedAt === undefined ? undefined : (value.broadcastedAt.toISOString()),
|
|
91
|
+
'sourceConfirmedAt': value.sourceConfirmedAt === undefined ? undefined : (value.sourceConfirmedAt.toISOString()),
|
|
92
|
+
'confirmations': value.confirmations,
|
|
93
|
+
'settlement': FlowSettlementDataToJSON(value.settlement),
|
|
94
|
+
'completedAt': value.completedAt === undefined ? undefined : (value.completedAt.toISOString()),
|
|
95
|
+
'failure': FlowFailureToJSON(value.failure),
|
|
96
|
+
'expiresAt': value.expiresAt === undefined ? undefined : (value.expiresAt.toISOString()),
|
|
97
|
+
'createdAt': (value.createdAt.toISOString()),
|
|
98
|
+
'updatedAt': (value.updatedAt.toISOString()),
|
|
99
|
+
'exchangeSource': FlowExchangeSourceToJSON(value.exchangeSource),
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export { FlowFromJSON, FlowFromJSONTyped, FlowToJSON };
|