@dynamic-labs/sdk-api 0.0.1042 → 0.0.1044
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 +96 -68
- package/src/index.js +19 -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/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 +19 -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
package/src/apis/SDKApi.cjs
CHANGED
|
@@ -52,10 +52,6 @@ var MFADevice = require('../models/MFADevice.cjs');
|
|
|
52
52
|
require('../models/DestinationTypeEnum.cjs');
|
|
53
53
|
require('../models/CheckoutModeEnum.cjs');
|
|
54
54
|
require('../models/SettlementStrategyEnum.cjs');
|
|
55
|
-
require('../models/CheckoutExecutionStateEnum.cjs');
|
|
56
|
-
require('../models/CheckoutRiskStateEnum.cjs');
|
|
57
|
-
require('../models/CheckoutSettlementStateEnum.cjs');
|
|
58
|
-
require('../models/CheckoutSourceTypeEnum.cjs');
|
|
59
55
|
var CheckoutTransaction = require('../models/CheckoutTransaction.cjs');
|
|
60
56
|
var CheckoutTransactionCreateRequest = require('../models/CheckoutTransactionCreateRequest.cjs');
|
|
61
57
|
var CheckoutTransactionCreateResponse = require('../models/CheckoutTransactionCreateResponse.cjs');
|
|
@@ -126,6 +122,17 @@ var ExternalAuthSigninRequest = require('../models/ExternalAuthSigninRequest.cjs
|
|
|
126
122
|
require('../models/ExternalWalletFundingDefaultChain.cjs');
|
|
127
123
|
require('../models/ExternalWalletFundingTokenRule.cjs');
|
|
128
124
|
var FarcasterSignInRequest = require('../models/FarcasterSignInRequest.cjs');
|
|
125
|
+
var Flow = require('../models/Flow.cjs');
|
|
126
|
+
var FlowAttachSourceRequest = require('../models/FlowAttachSourceRequest.cjs');
|
|
127
|
+
require('../models/FlowExecutionStateEnum.cjs');
|
|
128
|
+
require('../models/FlowModeEnum.cjs');
|
|
129
|
+
var FlowPrepareSigningRequest = require('../models/FlowPrepareSigningRequest.cjs');
|
|
130
|
+
var FlowQuoteRequest = require('../models/FlowQuoteRequest.cjs');
|
|
131
|
+
var FlowRecordBroadcastRequest = require('../models/FlowRecordBroadcastRequest.cjs');
|
|
132
|
+
require('../models/FlowRiskStateEnum.cjs');
|
|
133
|
+
require('../models/FlowSettlementStateEnum.cjs');
|
|
134
|
+
var FlowSourceResponse = require('../models/FlowSourceResponse.cjs');
|
|
135
|
+
require('../models/FlowSourceTypeEnum.cjs');
|
|
129
136
|
require('../models/OnrampProviders.cjs');
|
|
130
137
|
require('../models/GateRuleType.cjs');
|
|
131
138
|
var GeneratedTokenResponse = require('../models/GeneratedTokenResponse.cjs');
|
|
@@ -204,7 +211,6 @@ require('../models/PasskeyCredentialHint.cjs');
|
|
|
204
211
|
require('../models/PasskeyCredentialType.cjs');
|
|
205
212
|
var PasskeyRegisterRequest = require('../models/PasskeyRegisterRequest.cjs');
|
|
206
213
|
var PrefetchRequest = require('../models/PrefetchRequest.cjs');
|
|
207
|
-
var PrepareSigningRequest = require('../models/PrepareSigningRequest.cjs');
|
|
208
214
|
require('../models/SignInProviderEnum.cjs');
|
|
209
215
|
require('../models/SocialSignInProviderEnum.cjs');
|
|
210
216
|
require('../models/ProjectSettingsSdkWaasICloud.cjs');
|
|
@@ -214,9 +220,7 @@ require('../models/SdkViewType.cjs');
|
|
|
214
220
|
require('../models/ZerodevBundlerProvider.cjs');
|
|
215
221
|
var PublishEvents = require('../models/PublishEvents.cjs');
|
|
216
222
|
require('../models/PublishEventsEvents.cjs');
|
|
217
|
-
var QuoteRequest = require('../models/QuoteRequest.cjs');
|
|
218
223
|
var RealtimeAuthTokenResponse = require('../models/RealtimeAuthTokenResponse.cjs');
|
|
219
|
-
var RecordBroadcastRequest = require('../models/RecordBroadcastRequest.cjs');
|
|
220
224
|
var RecoverMultipleClientKeySharesRequest = require('../models/RecoverMultipleClientKeySharesRequest.cjs');
|
|
221
225
|
var RecoverMultipleClientKeySharesResponse = require('../models/RecoverMultipleClientKeySharesResponse.cjs');
|
|
222
226
|
var RefreshKeySharesRequest = require('../models/RefreshKeySharesRequest.cjs');
|
|
@@ -298,40 +302,34 @@ var WalletTransactionsResponse = require('../models/WalletTransactionsResponse.c
|
|
|
298
302
|
*/
|
|
299
303
|
class SDKApi extends runtime.BaseAPI {
|
|
300
304
|
/**
|
|
301
|
-
* Sets the source wallet address and chain
|
|
302
|
-
* Attach a source to a
|
|
305
|
+
* Sets the source wallet address and chain on an initiated flow and mints the capability sessionToken used to drive the rest of the lifecycle. No API key or token is required (the browser has neither at this point) — the endpoint is gated by the flow still being initiated and by CORS. At most one live token exists per flow at a time.
|
|
306
|
+
* Attach a source to a flow and mint a session token
|
|
303
307
|
*/
|
|
304
308
|
async attachFlowSourceRaw(requestParameters, initOverrides) {
|
|
305
309
|
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
306
310
|
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling attachFlowSource.');
|
|
307
311
|
}
|
|
308
|
-
if (requestParameters.
|
|
309
|
-
throw new runtime.RequiredError('
|
|
312
|
+
if (requestParameters.flowId === null || requestParameters.flowId === undefined) {
|
|
313
|
+
throw new runtime.RequiredError('flowId', 'Required parameter requestParameters.flowId was null or undefined when calling attachFlowSource.');
|
|
310
314
|
}
|
|
311
|
-
if (requestParameters.
|
|
312
|
-
throw new runtime.RequiredError('
|
|
313
|
-
}
|
|
314
|
-
if (requestParameters.attachSourceRequest === null || requestParameters.attachSourceRequest === undefined) {
|
|
315
|
-
throw new runtime.RequiredError('attachSourceRequest', 'Required parameter requestParameters.attachSourceRequest was null or undefined when calling attachFlowSource.');
|
|
315
|
+
if (requestParameters.flowAttachSourceRequest === null || requestParameters.flowAttachSourceRequest === undefined) {
|
|
316
|
+
throw new runtime.RequiredError('flowAttachSourceRequest', 'Required parameter requestParameters.flowAttachSourceRequest was null or undefined when calling attachFlowSource.');
|
|
316
317
|
}
|
|
317
318
|
const queryParameters = {};
|
|
318
319
|
const headerParameters = {};
|
|
319
320
|
headerParameters['Content-Type'] = 'application/json';
|
|
320
|
-
if (requestParameters.xDynamicCheckoutSessionToken !== undefined && requestParameters.xDynamicCheckoutSessionToken !== null) {
|
|
321
|
-
headerParameters['X-Dynamic-Checkout-Session-Token'] = String(requestParameters.xDynamicCheckoutSessionToken);
|
|
322
|
-
}
|
|
323
321
|
const response = await this.request({
|
|
324
|
-
path: `/sdk/{environmentId}/flow/
|
|
322
|
+
path: `/sdk/{environmentId}/flow/{flowId}/source`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"flowId"}}`, encodeURIComponent(String(requestParameters.flowId))),
|
|
325
323
|
method: 'POST',
|
|
326
324
|
headers: headerParameters,
|
|
327
325
|
query: queryParameters,
|
|
328
|
-
body:
|
|
326
|
+
body: FlowAttachSourceRequest.FlowAttachSourceRequestToJSON(requestParameters.flowAttachSourceRequest),
|
|
329
327
|
}, initOverrides);
|
|
330
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
328
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FlowSourceResponse.FlowSourceResponseFromJSON(jsonValue));
|
|
331
329
|
}
|
|
332
330
|
/**
|
|
333
|
-
* Sets the source wallet address and chain
|
|
334
|
-
* Attach a source to a
|
|
331
|
+
* Sets the source wallet address and chain on an initiated flow and mints the capability sessionToken used to drive the rest of the lifecycle. No API key or token is required (the browser has neither at this point) — the endpoint is gated by the flow still being initiated and by CORS. At most one live token exists per flow at a time.
|
|
332
|
+
* Attach a source to a flow and mint a session token
|
|
335
333
|
*/
|
|
336
334
|
async attachFlowSource(requestParameters, initOverrides) {
|
|
337
335
|
const response = await this.attachFlowSourceRaw(requestParameters, initOverrides);
|
|
@@ -344,13 +342,13 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
344
342
|
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
345
343
|
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling attachFlowSourceOptions.');
|
|
346
344
|
}
|
|
347
|
-
if (requestParameters.
|
|
348
|
-
throw new runtime.RequiredError('
|
|
345
|
+
if (requestParameters.flowId === null || requestParameters.flowId === undefined) {
|
|
346
|
+
throw new runtime.RequiredError('flowId', 'Required parameter requestParameters.flowId was null or undefined when calling attachFlowSourceOptions.');
|
|
349
347
|
}
|
|
350
348
|
const queryParameters = {};
|
|
351
349
|
const headerParameters = {};
|
|
352
350
|
const response = await this.request({
|
|
353
|
-
path: `/sdk/{environmentId}/flow/
|
|
351
|
+
path: `/sdk/{environmentId}/flow/{flowId}/source`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"flowId"}}`, encodeURIComponent(String(requestParameters.flowId))),
|
|
354
352
|
method: 'OPTIONS',
|
|
355
353
|
headers: headerParameters,
|
|
356
354
|
query: queryParameters,
|
|
@@ -364,7 +362,7 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
364
362
|
await this.attachFlowSourceOptionsRaw(requestParameters, initOverrides);
|
|
365
363
|
}
|
|
366
364
|
/**
|
|
367
|
-
* Deprecated: use POST /sdk/{environmentId}/flow/
|
|
365
|
+
* Deprecated: use POST /sdk/{environmentId}/flow/{flowId}/source instead. Sets the source wallet address and chain for an initiated transaction.
|
|
368
366
|
* Attach a source to a checkout transaction
|
|
369
367
|
*/
|
|
370
368
|
async attachSourceRaw(requestParameters, initOverrides) {
|
|
@@ -396,7 +394,7 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
396
394
|
return new runtime.JSONApiResponse(response, (jsonValue) => CheckoutTransaction.CheckoutTransactionFromJSON(jsonValue));
|
|
397
395
|
}
|
|
398
396
|
/**
|
|
399
|
-
* Deprecated: use POST /sdk/{environmentId}/flow/
|
|
397
|
+
* Deprecated: use POST /sdk/{environmentId}/flow/{flowId}/source instead. Sets the source wallet address and chain for an initiated transaction.
|
|
400
398
|
* Attach a source to a checkout transaction
|
|
401
399
|
*/
|
|
402
400
|
async attachSource(requestParameters, initOverrides) {
|
|
@@ -792,20 +790,60 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
792
790
|
async broadcastCheckoutTransactionOptions(requestParameters, initOverrides) {
|
|
793
791
|
await this.broadcastCheckoutTransactionOptionsRaw(requestParameters, initOverrides);
|
|
794
792
|
}
|
|
793
|
+
/**
|
|
794
|
+
* Records the on-chain transaction hash and transitions the flow to the broadcasted state. This is the point of no return. The txHash is recorded against this flow only — it cannot mutate amount or destination. Authenticated by the capability sessionToken.
|
|
795
|
+
* Record a broadcast for a flow
|
|
796
|
+
*/
|
|
797
|
+
async broadcastFlowRaw(requestParameters, initOverrides) {
|
|
798
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
799
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling broadcastFlow.');
|
|
800
|
+
}
|
|
801
|
+
if (requestParameters.flowId === null || requestParameters.flowId === undefined) {
|
|
802
|
+
throw new runtime.RequiredError('flowId', 'Required parameter requestParameters.flowId was null or undefined when calling broadcastFlow.');
|
|
803
|
+
}
|
|
804
|
+
if (requestParameters.xDynamicFlowSessionToken === null || requestParameters.xDynamicFlowSessionToken === undefined) {
|
|
805
|
+
throw new runtime.RequiredError('xDynamicFlowSessionToken', 'Required parameter requestParameters.xDynamicFlowSessionToken was null or undefined when calling broadcastFlow.');
|
|
806
|
+
}
|
|
807
|
+
if (requestParameters.flowRecordBroadcastRequest === null || requestParameters.flowRecordBroadcastRequest === undefined) {
|
|
808
|
+
throw new runtime.RequiredError('flowRecordBroadcastRequest', 'Required parameter requestParameters.flowRecordBroadcastRequest was null or undefined when calling broadcastFlow.');
|
|
809
|
+
}
|
|
810
|
+
const queryParameters = {};
|
|
811
|
+
const headerParameters = {};
|
|
812
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
813
|
+
if (requestParameters.xDynamicFlowSessionToken !== undefined && requestParameters.xDynamicFlowSessionToken !== null) {
|
|
814
|
+
headerParameters['X-Dynamic-Flow-Session-Token'] = String(requestParameters.xDynamicFlowSessionToken);
|
|
815
|
+
}
|
|
816
|
+
const response = await this.request({
|
|
817
|
+
path: `/sdk/{environmentId}/flow/{flowId}/broadcast`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"flowId"}}`, encodeURIComponent(String(requestParameters.flowId))),
|
|
818
|
+
method: 'POST',
|
|
819
|
+
headers: headerParameters,
|
|
820
|
+
query: queryParameters,
|
|
821
|
+
body: FlowRecordBroadcastRequest.FlowRecordBroadcastRequestToJSON(requestParameters.flowRecordBroadcastRequest),
|
|
822
|
+
}, initOverrides);
|
|
823
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => Flow.FlowFromJSON(jsonValue));
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* Records the on-chain transaction hash and transitions the flow to the broadcasted state. This is the point of no return. The txHash is recorded against this flow only — it cannot mutate amount or destination. Authenticated by the capability sessionToken.
|
|
827
|
+
* Record a broadcast for a flow
|
|
828
|
+
*/
|
|
829
|
+
async broadcastFlow(requestParameters, initOverrides) {
|
|
830
|
+
const response = await this.broadcastFlowRaw(requestParameters, initOverrides);
|
|
831
|
+
return await response.value();
|
|
832
|
+
}
|
|
795
833
|
/**
|
|
796
834
|
* Options call for this endpoint
|
|
797
835
|
*/
|
|
798
|
-
async
|
|
836
|
+
async broadcastFlowOptionsRaw(requestParameters, initOverrides) {
|
|
799
837
|
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
800
|
-
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling
|
|
838
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling broadcastFlowOptions.');
|
|
801
839
|
}
|
|
802
|
-
if (requestParameters.
|
|
803
|
-
throw new runtime.RequiredError('
|
|
840
|
+
if (requestParameters.flowId === null || requestParameters.flowId === undefined) {
|
|
841
|
+
throw new runtime.RequiredError('flowId', 'Required parameter requestParameters.flowId was null or undefined when calling broadcastFlowOptions.');
|
|
804
842
|
}
|
|
805
843
|
const queryParameters = {};
|
|
806
844
|
const headerParameters = {};
|
|
807
845
|
const response = await this.request({
|
|
808
|
-
path: `/sdk/{environmentId}/flow/
|
|
846
|
+
path: `/sdk/{environmentId}/flow/{flowId}/broadcast`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"flowId"}}`, encodeURIComponent(String(requestParameters.flowId))),
|
|
809
847
|
method: 'OPTIONS',
|
|
810
848
|
headers: headerParameters,
|
|
811
849
|
query: queryParameters,
|
|
@@ -815,11 +853,11 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
815
853
|
/**
|
|
816
854
|
* Options call for this endpoint
|
|
817
855
|
*/
|
|
818
|
-
async
|
|
819
|
-
await this.
|
|
856
|
+
async broadcastFlowOptions(requestParameters, initOverrides) {
|
|
857
|
+
await this.broadcastFlowOptionsRaw(requestParameters, initOverrides);
|
|
820
858
|
}
|
|
821
859
|
/**
|
|
822
|
-
* Deprecated: use POST /sdk/{environmentId}/flow/
|
|
860
|
+
* Deprecated: use POST /sdk/{environmentId}/flow/{flowId}/cancel instead. Cancels a pre-broadcast transaction. Only allowed before the transaction is broadcasted.
|
|
823
861
|
* Cancel a checkout transaction
|
|
824
862
|
*/
|
|
825
863
|
async cancelCheckoutTransactionRaw(requestParameters, initOverrides) {
|
|
@@ -846,7 +884,7 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
846
884
|
return new runtime.JSONApiResponse(response, (jsonValue) => CheckoutTransaction.CheckoutTransactionFromJSON(jsonValue));
|
|
847
885
|
}
|
|
848
886
|
/**
|
|
849
|
-
* Deprecated: use POST /sdk/{environmentId}/flow/
|
|
887
|
+
* Deprecated: use POST /sdk/{environmentId}/flow/{flowId}/cancel instead. Cancels a pre-broadcast transaction. Only allowed before the transaction is broadcasted.
|
|
850
888
|
* Cancel a checkout transaction
|
|
851
889
|
*/
|
|
852
890
|
async cancelCheckoutTransaction(requestParameters, initOverrides) {
|
|
@@ -880,54 +918,54 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
880
918
|
await this.cancelCheckoutTransactionOptionsRaw(requestParameters, initOverrides);
|
|
881
919
|
}
|
|
882
920
|
/**
|
|
883
|
-
* Cancels a pre-broadcast
|
|
884
|
-
* Cancel a
|
|
921
|
+
* Cancels a pre-broadcast flow. Only allowed before the flow is broadcasted.
|
|
922
|
+
* Cancel a flow
|
|
885
923
|
*/
|
|
886
|
-
async
|
|
924
|
+
async cancelFlowRaw(requestParameters, initOverrides) {
|
|
887
925
|
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
888
|
-
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling
|
|
926
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling cancelFlow.');
|
|
889
927
|
}
|
|
890
|
-
if (requestParameters.
|
|
891
|
-
throw new runtime.RequiredError('
|
|
928
|
+
if (requestParameters.flowId === null || requestParameters.flowId === undefined) {
|
|
929
|
+
throw new runtime.RequiredError('flowId', 'Required parameter requestParameters.flowId was null or undefined when calling cancelFlow.');
|
|
892
930
|
}
|
|
893
|
-
if (requestParameters.
|
|
894
|
-
throw new runtime.RequiredError('
|
|
931
|
+
if (requestParameters.xDynamicFlowSessionToken === null || requestParameters.xDynamicFlowSessionToken === undefined) {
|
|
932
|
+
throw new runtime.RequiredError('xDynamicFlowSessionToken', 'Required parameter requestParameters.xDynamicFlowSessionToken was null or undefined when calling cancelFlow.');
|
|
895
933
|
}
|
|
896
934
|
const queryParameters = {};
|
|
897
935
|
const headerParameters = {};
|
|
898
|
-
if (requestParameters.
|
|
899
|
-
headerParameters['X-Dynamic-
|
|
936
|
+
if (requestParameters.xDynamicFlowSessionToken !== undefined && requestParameters.xDynamicFlowSessionToken !== null) {
|
|
937
|
+
headerParameters['X-Dynamic-Flow-Session-Token'] = String(requestParameters.xDynamicFlowSessionToken);
|
|
900
938
|
}
|
|
901
939
|
const response = await this.request({
|
|
902
|
-
path: `/sdk/{environmentId}/flow/
|
|
940
|
+
path: `/sdk/{environmentId}/flow/{flowId}/cancel`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"flowId"}}`, encodeURIComponent(String(requestParameters.flowId))),
|
|
903
941
|
method: 'POST',
|
|
904
942
|
headers: headerParameters,
|
|
905
943
|
query: queryParameters,
|
|
906
944
|
}, initOverrides);
|
|
907
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
945
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => Flow.FlowFromJSON(jsonValue));
|
|
908
946
|
}
|
|
909
947
|
/**
|
|
910
|
-
* Cancels a pre-broadcast
|
|
911
|
-
* Cancel a
|
|
948
|
+
* Cancels a pre-broadcast flow. Only allowed before the flow is broadcasted.
|
|
949
|
+
* Cancel a flow
|
|
912
950
|
*/
|
|
913
|
-
async
|
|
914
|
-
const response = await this.
|
|
951
|
+
async cancelFlow(requestParameters, initOverrides) {
|
|
952
|
+
const response = await this.cancelFlowRaw(requestParameters, initOverrides);
|
|
915
953
|
return await response.value();
|
|
916
954
|
}
|
|
917
955
|
/**
|
|
918
956
|
* Options call for this endpoint
|
|
919
957
|
*/
|
|
920
|
-
async
|
|
958
|
+
async cancelFlowOptionsRaw(requestParameters, initOverrides) {
|
|
921
959
|
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
922
|
-
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling
|
|
960
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling cancelFlowOptions.');
|
|
923
961
|
}
|
|
924
|
-
if (requestParameters.
|
|
925
|
-
throw new runtime.RequiredError('
|
|
962
|
+
if (requestParameters.flowId === null || requestParameters.flowId === undefined) {
|
|
963
|
+
throw new runtime.RequiredError('flowId', 'Required parameter requestParameters.flowId was null or undefined when calling cancelFlowOptions.');
|
|
926
964
|
}
|
|
927
965
|
const queryParameters = {};
|
|
928
966
|
const headerParameters = {};
|
|
929
967
|
const response = await this.request({
|
|
930
|
-
path: `/sdk/{environmentId}/flow/
|
|
968
|
+
path: `/sdk/{environmentId}/flow/{flowId}/cancel`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"flowId"}}`, encodeURIComponent(String(requestParameters.flowId))),
|
|
931
969
|
method: 'OPTIONS',
|
|
932
970
|
headers: headerParameters,
|
|
933
971
|
query: queryParameters,
|
|
@@ -937,8 +975,8 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
937
975
|
/**
|
|
938
976
|
* Options call for this endpoint
|
|
939
977
|
*/
|
|
940
|
-
async
|
|
941
|
-
await this.
|
|
978
|
+
async cancelFlowOptions(requestParameters, initOverrides) {
|
|
979
|
+
await this.cancelFlowOptionsRaw(requestParameters, initOverrides);
|
|
942
980
|
}
|
|
943
981
|
/**
|
|
944
982
|
* This endpoint proxies requests to `/sdk/{environmentId}/providers/coinbasesocial/redirect` because Coinbase does not allow the string `coinbase` on the redirect URL path
|
|
@@ -1525,66 +1563,6 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
1525
1563
|
async createEmbeddedWalletsOptions(requestParameters, initOverrides) {
|
|
1526
1564
|
await this.createEmbeddedWalletsOptionsRaw(requestParameters, initOverrides);
|
|
1527
1565
|
}
|
|
1528
|
-
/**
|
|
1529
|
-
* Creates a new checkout transaction for the specified checkout.
|
|
1530
|
-
* Create a checkout transaction
|
|
1531
|
-
*/
|
|
1532
|
-
async createFlowCheckoutTransactionRaw(requestParameters, initOverrides) {
|
|
1533
|
-
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
1534
|
-
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling createFlowCheckoutTransaction.');
|
|
1535
|
-
}
|
|
1536
|
-
if (requestParameters.checkoutId === null || requestParameters.checkoutId === undefined) {
|
|
1537
|
-
throw new runtime.RequiredError('checkoutId', 'Required parameter requestParameters.checkoutId was null or undefined when calling createFlowCheckoutTransaction.');
|
|
1538
|
-
}
|
|
1539
|
-
if (requestParameters.checkoutTransactionCreateRequest === null || requestParameters.checkoutTransactionCreateRequest === undefined) {
|
|
1540
|
-
throw new runtime.RequiredError('checkoutTransactionCreateRequest', 'Required parameter requestParameters.checkoutTransactionCreateRequest was null or undefined when calling createFlowCheckoutTransaction.');
|
|
1541
|
-
}
|
|
1542
|
-
const queryParameters = {};
|
|
1543
|
-
const headerParameters = {};
|
|
1544
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
1545
|
-
const response = await this.request({
|
|
1546
|
-
path: `/sdk/{environmentId}/flow/checkouts/{checkoutId}/transactions`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"checkoutId"}}`, encodeURIComponent(String(requestParameters.checkoutId))),
|
|
1547
|
-
method: 'POST',
|
|
1548
|
-
headers: headerParameters,
|
|
1549
|
-
query: queryParameters,
|
|
1550
|
-
body: CheckoutTransactionCreateRequest.CheckoutTransactionCreateRequestToJSON(requestParameters.checkoutTransactionCreateRequest),
|
|
1551
|
-
}, initOverrides);
|
|
1552
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => CheckoutTransactionCreateResponse.CheckoutTransactionCreateResponseFromJSON(jsonValue));
|
|
1553
|
-
}
|
|
1554
|
-
/**
|
|
1555
|
-
* Creates a new checkout transaction for the specified checkout.
|
|
1556
|
-
* Create a checkout transaction
|
|
1557
|
-
*/
|
|
1558
|
-
async createFlowCheckoutTransaction(requestParameters, initOverrides) {
|
|
1559
|
-
const response = await this.createFlowCheckoutTransactionRaw(requestParameters, initOverrides);
|
|
1560
|
-
return await response.value();
|
|
1561
|
-
}
|
|
1562
|
-
/**
|
|
1563
|
-
* Options call for this endpoint
|
|
1564
|
-
*/
|
|
1565
|
-
async createFlowCheckoutTransactionOptionsRaw(requestParameters, initOverrides) {
|
|
1566
|
-
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
1567
|
-
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling createFlowCheckoutTransactionOptions.');
|
|
1568
|
-
}
|
|
1569
|
-
if (requestParameters.checkoutId === null || requestParameters.checkoutId === undefined) {
|
|
1570
|
-
throw new runtime.RequiredError('checkoutId', 'Required parameter requestParameters.checkoutId was null or undefined when calling createFlowCheckoutTransactionOptions.');
|
|
1571
|
-
}
|
|
1572
|
-
const queryParameters = {};
|
|
1573
|
-
const headerParameters = {};
|
|
1574
|
-
const response = await this.request({
|
|
1575
|
-
path: `/sdk/{environmentId}/flow/checkouts/{checkoutId}/transactions`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"checkoutId"}}`, encodeURIComponent(String(requestParameters.checkoutId))),
|
|
1576
|
-
method: 'OPTIONS',
|
|
1577
|
-
headers: headerParameters,
|
|
1578
|
-
query: queryParameters,
|
|
1579
|
-
}, initOverrides);
|
|
1580
|
-
return new runtime.VoidApiResponse(response);
|
|
1581
|
-
}
|
|
1582
|
-
/**
|
|
1583
|
-
* Options call for this endpoint
|
|
1584
|
-
*/
|
|
1585
|
-
async createFlowCheckoutTransactionOptions(requestParameters, initOverrides) {
|
|
1586
|
-
await this.createFlowCheckoutTransactionOptionsRaw(requestParameters, initOverrides);
|
|
1587
|
-
}
|
|
1588
1566
|
/**
|
|
1589
1567
|
* Creates a new global wallet connection for the authenticated user.
|
|
1590
1568
|
* Create a global wallet connection
|
|
@@ -3638,7 +3616,7 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
3638
3616
|
await this.getBackupTokenOptionsRaw(requestParameters, initOverrides);
|
|
3639
3617
|
}
|
|
3640
3618
|
/**
|
|
3641
|
-
* Deprecated: use GET /sdk/{environmentId}/flow/
|
|
3619
|
+
* Deprecated: use GET /sdk/{environmentId}/flow/{flowId} instead.
|
|
3642
3620
|
* Get a checkout transaction by ID
|
|
3643
3621
|
*/
|
|
3644
3622
|
async getCheckoutTransactionRaw(requestParameters, initOverrides) {
|
|
@@ -3659,7 +3637,7 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
3659
3637
|
return new runtime.JSONApiResponse(response, (jsonValue) => CheckoutTransaction.CheckoutTransactionFromJSON(jsonValue));
|
|
3660
3638
|
}
|
|
3661
3639
|
/**
|
|
3662
|
-
* Deprecated: use GET /sdk/{environmentId}/flow/
|
|
3640
|
+
* Deprecated: use GET /sdk/{environmentId}/flow/{flowId} instead.
|
|
3663
3641
|
* Get a checkout transaction by ID
|
|
3664
3642
|
*/
|
|
3665
3643
|
async getCheckoutTransaction(requestParameters, initOverrides) {
|
|
@@ -4296,46 +4274,112 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
4296
4274
|
await this.getExchangeTransferDestinationsOptionsRaw(requestParameters, initOverrides);
|
|
4297
4275
|
}
|
|
4298
4276
|
/**
|
|
4299
|
-
* Get a
|
|
4277
|
+
* Get a flow by ID
|
|
4300
4278
|
*/
|
|
4301
|
-
async
|
|
4279
|
+
async getFlowRaw(requestParameters, initOverrides) {
|
|
4302
4280
|
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
4303
|
-
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling
|
|
4281
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getFlow.');
|
|
4304
4282
|
}
|
|
4305
|
-
if (requestParameters.
|
|
4306
|
-
throw new runtime.RequiredError('
|
|
4283
|
+
if (requestParameters.flowId === null || requestParameters.flowId === undefined) {
|
|
4284
|
+
throw new runtime.RequiredError('flowId', 'Required parameter requestParameters.flowId was null or undefined when calling getFlow.');
|
|
4307
4285
|
}
|
|
4308
4286
|
const queryParameters = {};
|
|
4309
4287
|
const headerParameters = {};
|
|
4310
4288
|
const response = await this.request({
|
|
4311
|
-
path: `/sdk/{environmentId}/flow/
|
|
4289
|
+
path: `/sdk/{environmentId}/flow/{flowId}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"flowId"}}`, encodeURIComponent(String(requestParameters.flowId))),
|
|
4312
4290
|
method: 'GET',
|
|
4313
4291
|
headers: headerParameters,
|
|
4314
4292
|
query: queryParameters,
|
|
4315
4293
|
}, initOverrides);
|
|
4316
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
4294
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => Flow.FlowFromJSON(jsonValue));
|
|
4317
4295
|
}
|
|
4318
4296
|
/**
|
|
4319
|
-
* Get a
|
|
4297
|
+
* Get a flow by ID
|
|
4320
4298
|
*/
|
|
4321
|
-
async
|
|
4322
|
-
const response = await this.
|
|
4299
|
+
async getFlow(requestParameters, initOverrides) {
|
|
4300
|
+
const response = await this.getFlowRaw(requestParameters, initOverrides);
|
|
4323
4301
|
return await response.value();
|
|
4324
4302
|
}
|
|
4325
4303
|
/**
|
|
4326
4304
|
* Options call for this endpoint
|
|
4327
4305
|
*/
|
|
4328
|
-
async
|
|
4306
|
+
async getFlowOptionsRaw(requestParameters, initOverrides) {
|
|
4329
4307
|
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
4330
|
-
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling
|
|
4308
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getFlowOptions.');
|
|
4331
4309
|
}
|
|
4332
|
-
if (requestParameters.
|
|
4333
|
-
throw new runtime.RequiredError('
|
|
4310
|
+
if (requestParameters.flowId === null || requestParameters.flowId === undefined) {
|
|
4311
|
+
throw new runtime.RequiredError('flowId', 'Required parameter requestParameters.flowId was null or undefined when calling getFlowOptions.');
|
|
4312
|
+
}
|
|
4313
|
+
const queryParameters = {};
|
|
4314
|
+
const headerParameters = {};
|
|
4315
|
+
const response = await this.request({
|
|
4316
|
+
path: `/sdk/{environmentId}/flow/{flowId}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"flowId"}}`, encodeURIComponent(String(requestParameters.flowId))),
|
|
4317
|
+
method: 'OPTIONS',
|
|
4318
|
+
headers: headerParameters,
|
|
4319
|
+
query: queryParameters,
|
|
4320
|
+
}, initOverrides);
|
|
4321
|
+
return new runtime.VoidApiResponse(response);
|
|
4322
|
+
}
|
|
4323
|
+
/**
|
|
4324
|
+
* Options call for this endpoint
|
|
4325
|
+
*/
|
|
4326
|
+
async getFlowOptions(requestParameters, initOverrides) {
|
|
4327
|
+
await this.getFlowOptionsRaw(requestParameters, initOverrides);
|
|
4328
|
+
}
|
|
4329
|
+
/**
|
|
4330
|
+
* Fetches a swap quote and stores a versioned snapshot on the flow. Authenticated by the capability sessionToken minted at source.
|
|
4331
|
+
* Get a quote for a flow
|
|
4332
|
+
*/
|
|
4333
|
+
async getFlowQuoteRaw(requestParameters, initOverrides) {
|
|
4334
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
4335
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getFlowQuote.');
|
|
4336
|
+
}
|
|
4337
|
+
if (requestParameters.flowId === null || requestParameters.flowId === undefined) {
|
|
4338
|
+
throw new runtime.RequiredError('flowId', 'Required parameter requestParameters.flowId was null or undefined when calling getFlowQuote.');
|
|
4339
|
+
}
|
|
4340
|
+
if (requestParameters.xDynamicFlowSessionToken === null || requestParameters.xDynamicFlowSessionToken === undefined) {
|
|
4341
|
+
throw new runtime.RequiredError('xDynamicFlowSessionToken', 'Required parameter requestParameters.xDynamicFlowSessionToken was null or undefined when calling getFlowQuote.');
|
|
4342
|
+
}
|
|
4343
|
+
if (requestParameters.flowQuoteRequest === null || requestParameters.flowQuoteRequest === undefined) {
|
|
4344
|
+
throw new runtime.RequiredError('flowQuoteRequest', 'Required parameter requestParameters.flowQuoteRequest was null or undefined when calling getFlowQuote.');
|
|
4345
|
+
}
|
|
4346
|
+
const queryParameters = {};
|
|
4347
|
+
const headerParameters = {};
|
|
4348
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
4349
|
+
if (requestParameters.xDynamicFlowSessionToken !== undefined && requestParameters.xDynamicFlowSessionToken !== null) {
|
|
4350
|
+
headerParameters['X-Dynamic-Flow-Session-Token'] = String(requestParameters.xDynamicFlowSessionToken);
|
|
4351
|
+
}
|
|
4352
|
+
const response = await this.request({
|
|
4353
|
+
path: `/sdk/{environmentId}/flow/{flowId}/quote`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"flowId"}}`, encodeURIComponent(String(requestParameters.flowId))),
|
|
4354
|
+
method: 'POST',
|
|
4355
|
+
headers: headerParameters,
|
|
4356
|
+
query: queryParameters,
|
|
4357
|
+
body: FlowQuoteRequest.FlowQuoteRequestToJSON(requestParameters.flowQuoteRequest),
|
|
4358
|
+
}, initOverrides);
|
|
4359
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => Flow.FlowFromJSON(jsonValue));
|
|
4360
|
+
}
|
|
4361
|
+
/**
|
|
4362
|
+
* Fetches a swap quote and stores a versioned snapshot on the flow. Authenticated by the capability sessionToken minted at source.
|
|
4363
|
+
* Get a quote for a flow
|
|
4364
|
+
*/
|
|
4365
|
+
async getFlowQuote(requestParameters, initOverrides) {
|
|
4366
|
+
const response = await this.getFlowQuoteRaw(requestParameters, initOverrides);
|
|
4367
|
+
return await response.value();
|
|
4368
|
+
}
|
|
4369
|
+
/**
|
|
4370
|
+
* Options call for this endpoint
|
|
4371
|
+
*/
|
|
4372
|
+
async getFlowQuoteOptionsRaw(requestParameters, initOverrides) {
|
|
4373
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
4374
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getFlowQuoteOptions.');
|
|
4375
|
+
}
|
|
4376
|
+
if (requestParameters.flowId === null || requestParameters.flowId === undefined) {
|
|
4377
|
+
throw new runtime.RequiredError('flowId', 'Required parameter requestParameters.flowId was null or undefined when calling getFlowQuoteOptions.');
|
|
4334
4378
|
}
|
|
4335
4379
|
const queryParameters = {};
|
|
4336
4380
|
const headerParameters = {};
|
|
4337
4381
|
const response = await this.request({
|
|
4338
|
-
path: `/sdk/{environmentId}/flow/
|
|
4382
|
+
path: `/sdk/{environmentId}/flow/{flowId}/quote`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"flowId"}}`, encodeURIComponent(String(requestParameters.flowId))),
|
|
4339
4383
|
method: 'OPTIONS',
|
|
4340
4384
|
headers: headerParameters,
|
|
4341
4385
|
query: queryParameters,
|
|
@@ -4345,8 +4389,8 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
4345
4389
|
/**
|
|
4346
4390
|
* Options call for this endpoint
|
|
4347
4391
|
*/
|
|
4348
|
-
async
|
|
4349
|
-
await this.
|
|
4392
|
+
async getFlowQuoteOptions(requestParameters, initOverrides) {
|
|
4393
|
+
await this.getFlowQuoteOptionsRaw(requestParameters, initOverrides);
|
|
4350
4394
|
}
|
|
4351
4395
|
/**
|
|
4352
4396
|
* Returns the global wallet settings configured for the specified environment.
|
|
@@ -4806,11 +4850,11 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
4806
4850
|
queryParameters['capabilities'] = requestParameters.capabilities;
|
|
4807
4851
|
}
|
|
4808
4852
|
const headerParameters = {};
|
|
4809
|
-
if (requestParameters.
|
|
4810
|
-
headerParameters['X-Dynamic-
|
|
4853
|
+
if (requestParameters.xDynamicFlowSessionToken !== undefined && requestParameters.xDynamicFlowSessionToken !== null) {
|
|
4854
|
+
headerParameters['X-Dynamic-Flow-Session-Token'] = String(requestParameters.xDynamicFlowSessionToken);
|
|
4811
4855
|
}
|
|
4812
|
-
if (requestParameters.
|
|
4813
|
-
headerParameters['X-Dynamic-
|
|
4856
|
+
if (requestParameters.xDynamicFlowId !== undefined && requestParameters.xDynamicFlowId !== null) {
|
|
4857
|
+
headerParameters['X-Dynamic-Flow-Id'] = String(requestParameters.xDynamicFlowId);
|
|
4814
4858
|
}
|
|
4815
4859
|
if (this.configuration && this.configuration.accessToken) {
|
|
4816
4860
|
const token = this.configuration.accessToken;
|
|
@@ -6949,7 +6993,7 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
6949
6993
|
await this.prefetchRaw(requestParameters, initOverrides);
|
|
6950
6994
|
}
|
|
6951
6995
|
/**
|
|
6952
|
-
* Deprecated: use POST /sdk/{environmentId}/flow/
|
|
6996
|
+
* Deprecated: use POST /sdk/{environmentId}/flow/{flowId}/prepare instead. Validates quote freshness and risk clearance, then transitions the transaction to signing state.
|
|
6953
6997
|
* Prepare a checkout transaction for signing
|
|
6954
6998
|
*/
|
|
6955
6999
|
async prepareCheckoutTransactionRaw(requestParameters, initOverrides) {
|
|
@@ -6973,12 +7017,12 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
6973
7017
|
method: 'POST',
|
|
6974
7018
|
headers: headerParameters,
|
|
6975
7019
|
query: queryParameters,
|
|
6976
|
-
body:
|
|
7020
|
+
body: FlowPrepareSigningRequest.FlowPrepareSigningRequestToJSON(requestParameters.flowPrepareSigningRequest),
|
|
6977
7021
|
}, initOverrides);
|
|
6978
7022
|
return new runtime.JSONApiResponse(response, (jsonValue) => CheckoutTransaction.CheckoutTransactionFromJSON(jsonValue));
|
|
6979
7023
|
}
|
|
6980
7024
|
/**
|
|
6981
|
-
* Deprecated: use POST /sdk/{environmentId}/flow/
|
|
7025
|
+
* Deprecated: use POST /sdk/{environmentId}/flow/{flowId}/prepare instead. Validates quote freshness and risk clearance, then transitions the transaction to signing state.
|
|
6982
7026
|
* Prepare a checkout transaction for signing
|
|
6983
7027
|
*/
|
|
6984
7028
|
async prepareCheckoutTransaction(requestParameters, initOverrides) {
|
|
@@ -7012,56 +7056,56 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
7012
7056
|
await this.prepareCheckoutTransactionOptionsRaw(requestParameters, initOverrides);
|
|
7013
7057
|
}
|
|
7014
7058
|
/**
|
|
7015
|
-
* Validates quote freshness and risk clearance, then transitions the
|
|
7016
|
-
* Prepare a
|
|
7059
|
+
* Validates quote freshness and risk clearance, then transitions the flow to the signing state and returns the unsigned payload to sign. Wallet sources only. Authenticated by the capability sessionToken.
|
|
7060
|
+
* Prepare a flow for signing
|
|
7017
7061
|
*/
|
|
7018
|
-
async
|
|
7062
|
+
async prepareFlowSigningRaw(requestParameters, initOverrides) {
|
|
7019
7063
|
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
7020
|
-
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling
|
|
7064
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling prepareFlowSigning.');
|
|
7021
7065
|
}
|
|
7022
|
-
if (requestParameters.
|
|
7023
|
-
throw new runtime.RequiredError('
|
|
7066
|
+
if (requestParameters.flowId === null || requestParameters.flowId === undefined) {
|
|
7067
|
+
throw new runtime.RequiredError('flowId', 'Required parameter requestParameters.flowId was null or undefined when calling prepareFlowSigning.');
|
|
7024
7068
|
}
|
|
7025
|
-
if (requestParameters.
|
|
7026
|
-
throw new runtime.RequiredError('
|
|
7069
|
+
if (requestParameters.xDynamicFlowSessionToken === null || requestParameters.xDynamicFlowSessionToken === undefined) {
|
|
7070
|
+
throw new runtime.RequiredError('xDynamicFlowSessionToken', 'Required parameter requestParameters.xDynamicFlowSessionToken was null or undefined when calling prepareFlowSigning.');
|
|
7027
7071
|
}
|
|
7028
7072
|
const queryParameters = {};
|
|
7029
7073
|
const headerParameters = {};
|
|
7030
7074
|
headerParameters['Content-Type'] = 'application/json';
|
|
7031
|
-
if (requestParameters.
|
|
7032
|
-
headerParameters['X-Dynamic-
|
|
7075
|
+
if (requestParameters.xDynamicFlowSessionToken !== undefined && requestParameters.xDynamicFlowSessionToken !== null) {
|
|
7076
|
+
headerParameters['X-Dynamic-Flow-Session-Token'] = String(requestParameters.xDynamicFlowSessionToken);
|
|
7033
7077
|
}
|
|
7034
7078
|
const response = await this.request({
|
|
7035
|
-
path: `/sdk/{environmentId}/flow/
|
|
7079
|
+
path: `/sdk/{environmentId}/flow/{flowId}/prepare`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"flowId"}}`, encodeURIComponent(String(requestParameters.flowId))),
|
|
7036
7080
|
method: 'POST',
|
|
7037
7081
|
headers: headerParameters,
|
|
7038
7082
|
query: queryParameters,
|
|
7039
|
-
body:
|
|
7083
|
+
body: FlowPrepareSigningRequest.FlowPrepareSigningRequestToJSON(requestParameters.flowPrepareSigningRequest),
|
|
7040
7084
|
}, initOverrides);
|
|
7041
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
7085
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => Flow.FlowFromJSON(jsonValue));
|
|
7042
7086
|
}
|
|
7043
7087
|
/**
|
|
7044
|
-
* Validates quote freshness and risk clearance, then transitions the
|
|
7045
|
-
* Prepare a
|
|
7088
|
+
* Validates quote freshness and risk clearance, then transitions the flow to the signing state and returns the unsigned payload to sign. Wallet sources only. Authenticated by the capability sessionToken.
|
|
7089
|
+
* Prepare a flow for signing
|
|
7046
7090
|
*/
|
|
7047
|
-
async
|
|
7048
|
-
const response = await this.
|
|
7091
|
+
async prepareFlowSigning(requestParameters, initOverrides) {
|
|
7092
|
+
const response = await this.prepareFlowSigningRaw(requestParameters, initOverrides);
|
|
7049
7093
|
return await response.value();
|
|
7050
7094
|
}
|
|
7051
7095
|
/**
|
|
7052
7096
|
* Options call for this endpoint
|
|
7053
7097
|
*/
|
|
7054
|
-
async
|
|
7098
|
+
async prepareFlowSigningOptionsRaw(requestParameters, initOverrides) {
|
|
7055
7099
|
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
7056
|
-
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling
|
|
7100
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling prepareFlowSigningOptions.');
|
|
7057
7101
|
}
|
|
7058
|
-
if (requestParameters.
|
|
7059
|
-
throw new runtime.RequiredError('
|
|
7102
|
+
if (requestParameters.flowId === null || requestParameters.flowId === undefined) {
|
|
7103
|
+
throw new runtime.RequiredError('flowId', 'Required parameter requestParameters.flowId was null or undefined when calling prepareFlowSigningOptions.');
|
|
7060
7104
|
}
|
|
7061
7105
|
const queryParameters = {};
|
|
7062
7106
|
const headerParameters = {};
|
|
7063
7107
|
const response = await this.request({
|
|
7064
|
-
path: `/sdk/{environmentId}/flow/
|
|
7108
|
+
path: `/sdk/{environmentId}/flow/{flowId}/prepare`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"flowId"}}`, encodeURIComponent(String(requestParameters.flowId))),
|
|
7065
7109
|
method: 'OPTIONS',
|
|
7066
7110
|
headers: headerParameters,
|
|
7067
7111
|
query: queryParameters,
|
|
@@ -7071,8 +7115,8 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
7071
7115
|
/**
|
|
7072
7116
|
* Options call for this endpoint
|
|
7073
7117
|
*/
|
|
7074
|
-
async
|
|
7075
|
-
await this.
|
|
7118
|
+
async prepareFlowSigningOptions(requestParameters, initOverrides) {
|
|
7119
|
+
await this.prepareFlowSigningOptionsRaw(requestParameters, initOverrides);
|
|
7076
7120
|
}
|
|
7077
7121
|
/**
|
|
7078
7122
|
* Publishes SDK analytics events for the given environment.
|
|
@@ -7105,7 +7149,7 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
7105
7149
|
await this.publishEventRaw(requestParameters, initOverrides);
|
|
7106
7150
|
}
|
|
7107
7151
|
/**
|
|
7108
|
-
* Deprecated: use POST /sdk/{environmentId}/flow/
|
|
7152
|
+
* Deprecated: use POST /sdk/{environmentId}/flow/{flowId}/quote instead. Fetches a swap quote and stores a snapshot on the transaction.
|
|
7109
7153
|
* Get a quote for a checkout transaction
|
|
7110
7154
|
*/
|
|
7111
7155
|
async quoteCheckoutTransactionRaw(requestParameters, initOverrides) {
|
|
@@ -7118,8 +7162,8 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
7118
7162
|
if (requestParameters.xDynamicCheckoutSessionToken === null || requestParameters.xDynamicCheckoutSessionToken === undefined) {
|
|
7119
7163
|
throw new runtime.RequiredError('xDynamicCheckoutSessionToken', 'Required parameter requestParameters.xDynamicCheckoutSessionToken was null or undefined when calling quoteCheckoutTransaction.');
|
|
7120
7164
|
}
|
|
7121
|
-
if (requestParameters.
|
|
7122
|
-
throw new runtime.RequiredError('
|
|
7165
|
+
if (requestParameters.flowQuoteRequest === null || requestParameters.flowQuoteRequest === undefined) {
|
|
7166
|
+
throw new runtime.RequiredError('flowQuoteRequest', 'Required parameter requestParameters.flowQuoteRequest was null or undefined when calling quoteCheckoutTransaction.');
|
|
7123
7167
|
}
|
|
7124
7168
|
const queryParameters = {};
|
|
7125
7169
|
const headerParameters = {};
|
|
@@ -7132,12 +7176,12 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
7132
7176
|
method: 'POST',
|
|
7133
7177
|
headers: headerParameters,
|
|
7134
7178
|
query: queryParameters,
|
|
7135
|
-
body:
|
|
7179
|
+
body: FlowQuoteRequest.FlowQuoteRequestToJSON(requestParameters.flowQuoteRequest),
|
|
7136
7180
|
}, initOverrides);
|
|
7137
7181
|
return new runtime.JSONApiResponse(response, (jsonValue) => CheckoutTransaction.CheckoutTransactionFromJSON(jsonValue));
|
|
7138
7182
|
}
|
|
7139
7183
|
/**
|
|
7140
|
-
* Deprecated: use POST /sdk/{environmentId}/flow/
|
|
7184
|
+
* Deprecated: use POST /sdk/{environmentId}/flow/{flowId}/quote instead. Fetches a swap quote and stores a snapshot on the transaction.
|
|
7141
7185
|
* Get a quote for a checkout transaction
|
|
7142
7186
|
*/
|
|
7143
7187
|
async quoteCheckoutTransaction(requestParameters, initOverrides) {
|
|
@@ -7170,72 +7214,6 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
7170
7214
|
async quoteCheckoutTransactionOptions(requestParameters, initOverrides) {
|
|
7171
7215
|
await this.quoteCheckoutTransactionOptionsRaw(requestParameters, initOverrides);
|
|
7172
7216
|
}
|
|
7173
|
-
/**
|
|
7174
|
-
* Fetches a swap quote and stores a snapshot on the transaction.
|
|
7175
|
-
* Get a quote for a checkout transaction
|
|
7176
|
-
*/
|
|
7177
|
-
async quoteFlowTransactionRaw(requestParameters, initOverrides) {
|
|
7178
|
-
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
7179
|
-
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling quoteFlowTransaction.');
|
|
7180
|
-
}
|
|
7181
|
-
if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
|
|
7182
|
-
throw new runtime.RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling quoteFlowTransaction.');
|
|
7183
|
-
}
|
|
7184
|
-
if (requestParameters.xDynamicCheckoutSessionToken === null || requestParameters.xDynamicCheckoutSessionToken === undefined) {
|
|
7185
|
-
throw new runtime.RequiredError('xDynamicCheckoutSessionToken', 'Required parameter requestParameters.xDynamicCheckoutSessionToken was null or undefined when calling quoteFlowTransaction.');
|
|
7186
|
-
}
|
|
7187
|
-
if (requestParameters.quoteRequest === null || requestParameters.quoteRequest === undefined) {
|
|
7188
|
-
throw new runtime.RequiredError('quoteRequest', 'Required parameter requestParameters.quoteRequest was null or undefined when calling quoteFlowTransaction.');
|
|
7189
|
-
}
|
|
7190
|
-
const queryParameters = {};
|
|
7191
|
-
const headerParameters = {};
|
|
7192
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
7193
|
-
if (requestParameters.xDynamicCheckoutSessionToken !== undefined && requestParameters.xDynamicCheckoutSessionToken !== null) {
|
|
7194
|
-
headerParameters['X-Dynamic-Checkout-Session-Token'] = String(requestParameters.xDynamicCheckoutSessionToken);
|
|
7195
|
-
}
|
|
7196
|
-
const response = await this.request({
|
|
7197
|
-
path: `/sdk/{environmentId}/flow/transactions/{transactionId}/quote`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
|
|
7198
|
-
method: 'POST',
|
|
7199
|
-
headers: headerParameters,
|
|
7200
|
-
query: queryParameters,
|
|
7201
|
-
body: QuoteRequest.QuoteRequestToJSON(requestParameters.quoteRequest),
|
|
7202
|
-
}, initOverrides);
|
|
7203
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => CheckoutTransaction.CheckoutTransactionFromJSON(jsonValue));
|
|
7204
|
-
}
|
|
7205
|
-
/**
|
|
7206
|
-
* Fetches a swap quote and stores a snapshot on the transaction.
|
|
7207
|
-
* Get a quote for a checkout transaction
|
|
7208
|
-
*/
|
|
7209
|
-
async quoteFlowTransaction(requestParameters, initOverrides) {
|
|
7210
|
-
const response = await this.quoteFlowTransactionRaw(requestParameters, initOverrides);
|
|
7211
|
-
return await response.value();
|
|
7212
|
-
}
|
|
7213
|
-
/**
|
|
7214
|
-
* Options call for this endpoint
|
|
7215
|
-
*/
|
|
7216
|
-
async quoteFlowTransactionOptionsRaw(requestParameters, initOverrides) {
|
|
7217
|
-
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
7218
|
-
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling quoteFlowTransactionOptions.');
|
|
7219
|
-
}
|
|
7220
|
-
if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
|
|
7221
|
-
throw new runtime.RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling quoteFlowTransactionOptions.');
|
|
7222
|
-
}
|
|
7223
|
-
const queryParameters = {};
|
|
7224
|
-
const headerParameters = {};
|
|
7225
|
-
const response = await this.request({
|
|
7226
|
-
path: `/sdk/{environmentId}/flow/transactions/{transactionId}/quote`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
|
|
7227
|
-
method: 'OPTIONS',
|
|
7228
|
-
headers: headerParameters,
|
|
7229
|
-
query: queryParameters,
|
|
7230
|
-
}, initOverrides);
|
|
7231
|
-
return new runtime.VoidApiResponse(response);
|
|
7232
|
-
}
|
|
7233
|
-
/**
|
|
7234
|
-
* Options call for this endpoint
|
|
7235
|
-
*/
|
|
7236
|
-
async quoteFlowTransactionOptions(requestParameters, initOverrides) {
|
|
7237
|
-
await this.quoteFlowTransactionOptionsRaw(requestParameters, initOverrides);
|
|
7238
|
-
}
|
|
7239
7217
|
/**
|
|
7240
7218
|
* Options call for this endpoint
|
|
7241
7219
|
*/
|
|
@@ -7260,7 +7238,7 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
7260
7238
|
await this.realtimeAuthOptionsRaw(requestParameters, initOverrides);
|
|
7261
7239
|
}
|
|
7262
7240
|
/**
|
|
7263
|
-
* Deprecated: use POST /sdk/{environmentId}/flow/
|
|
7241
|
+
* Deprecated: use POST /sdk/{environmentId}/flow/{flowId}/broadcast instead. Records the on-chain transaction hash and transitions the transaction to broadcasted state. This is the point of no return.
|
|
7264
7242
|
* Record a broadcast for a checkout transaction
|
|
7265
7243
|
*/
|
|
7266
7244
|
async recordCheckoutBroadcastRaw(requestParameters, initOverrides) {
|
|
@@ -7273,8 +7251,8 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
7273
7251
|
if (requestParameters.xDynamicCheckoutSessionToken === null || requestParameters.xDynamicCheckoutSessionToken === undefined) {
|
|
7274
7252
|
throw new runtime.RequiredError('xDynamicCheckoutSessionToken', 'Required parameter requestParameters.xDynamicCheckoutSessionToken was null or undefined when calling recordCheckoutBroadcast.');
|
|
7275
7253
|
}
|
|
7276
|
-
if (requestParameters.
|
|
7277
|
-
throw new runtime.RequiredError('
|
|
7254
|
+
if (requestParameters.flowRecordBroadcastRequest === null || requestParameters.flowRecordBroadcastRequest === undefined) {
|
|
7255
|
+
throw new runtime.RequiredError('flowRecordBroadcastRequest', 'Required parameter requestParameters.flowRecordBroadcastRequest was null or undefined when calling recordCheckoutBroadcast.');
|
|
7278
7256
|
}
|
|
7279
7257
|
const queryParameters = {};
|
|
7280
7258
|
const headerParameters = {};
|
|
@@ -7287,58 +7265,18 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
7287
7265
|
method: 'POST',
|
|
7288
7266
|
headers: headerParameters,
|
|
7289
7267
|
query: queryParameters,
|
|
7290
|
-
body:
|
|
7268
|
+
body: FlowRecordBroadcastRequest.FlowRecordBroadcastRequestToJSON(requestParameters.flowRecordBroadcastRequest),
|
|
7291
7269
|
}, initOverrides);
|
|
7292
7270
|
return new runtime.JSONApiResponse(response, (jsonValue) => CheckoutTransaction.CheckoutTransactionFromJSON(jsonValue));
|
|
7293
7271
|
}
|
|
7294
7272
|
/**
|
|
7295
|
-
* Deprecated: use POST /sdk/{environmentId}/flow/
|
|
7273
|
+
* Deprecated: use POST /sdk/{environmentId}/flow/{flowId}/broadcast instead. Records the on-chain transaction hash and transitions the transaction to broadcasted state. This is the point of no return.
|
|
7296
7274
|
* Record a broadcast for a checkout transaction
|
|
7297
7275
|
*/
|
|
7298
7276
|
async recordCheckoutBroadcast(requestParameters, initOverrides) {
|
|
7299
7277
|
const response = await this.recordCheckoutBroadcastRaw(requestParameters, initOverrides);
|
|
7300
7278
|
return await response.value();
|
|
7301
7279
|
}
|
|
7302
|
-
/**
|
|
7303
|
-
* Records the on-chain transaction hash and transitions the transaction to broadcasted state. This is the point of no return.
|
|
7304
|
-
* Record a broadcast for a checkout transaction
|
|
7305
|
-
*/
|
|
7306
|
-
async recordFlowBroadcastRaw(requestParameters, initOverrides) {
|
|
7307
|
-
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
7308
|
-
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling recordFlowBroadcast.');
|
|
7309
|
-
}
|
|
7310
|
-
if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
|
|
7311
|
-
throw new runtime.RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling recordFlowBroadcast.');
|
|
7312
|
-
}
|
|
7313
|
-
if (requestParameters.xDynamicCheckoutSessionToken === null || requestParameters.xDynamicCheckoutSessionToken === undefined) {
|
|
7314
|
-
throw new runtime.RequiredError('xDynamicCheckoutSessionToken', 'Required parameter requestParameters.xDynamicCheckoutSessionToken was null or undefined when calling recordFlowBroadcast.');
|
|
7315
|
-
}
|
|
7316
|
-
if (requestParameters.recordBroadcastRequest === null || requestParameters.recordBroadcastRequest === undefined) {
|
|
7317
|
-
throw new runtime.RequiredError('recordBroadcastRequest', 'Required parameter requestParameters.recordBroadcastRequest was null or undefined when calling recordFlowBroadcast.');
|
|
7318
|
-
}
|
|
7319
|
-
const queryParameters = {};
|
|
7320
|
-
const headerParameters = {};
|
|
7321
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
7322
|
-
if (requestParameters.xDynamicCheckoutSessionToken !== undefined && requestParameters.xDynamicCheckoutSessionToken !== null) {
|
|
7323
|
-
headerParameters['X-Dynamic-Checkout-Session-Token'] = String(requestParameters.xDynamicCheckoutSessionToken);
|
|
7324
|
-
}
|
|
7325
|
-
const response = await this.request({
|
|
7326
|
-
path: `/sdk/{environmentId}/flow/transactions/{transactionId}/broadcast`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
|
|
7327
|
-
method: 'POST',
|
|
7328
|
-
headers: headerParameters,
|
|
7329
|
-
query: queryParameters,
|
|
7330
|
-
body: RecordBroadcastRequest.RecordBroadcastRequestToJSON(requestParameters.recordBroadcastRequest),
|
|
7331
|
-
}, initOverrides);
|
|
7332
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => CheckoutTransaction.CheckoutTransactionFromJSON(jsonValue));
|
|
7333
|
-
}
|
|
7334
|
-
/**
|
|
7335
|
-
* Records the on-chain transaction hash and transitions the transaction to broadcasted state. This is the point of no return.
|
|
7336
|
-
* Record a broadcast for a checkout transaction
|
|
7337
|
-
*/
|
|
7338
|
-
async recordFlowBroadcast(requestParameters, initOverrides) {
|
|
7339
|
-
const response = await this.recordFlowBroadcastRaw(requestParameters, initOverrides);
|
|
7340
|
-
return await response.value();
|
|
7341
|
-
}
|
|
7342
7280
|
/**
|
|
7343
7281
|
* Recovers the client key shares for the specified WAAS wallet from backup.
|
|
7344
7282
|
* Recover WAAS keyshares
|