From 5c353cce90f961c737c543307ba7001eae7c89ca Mon Sep 17 00:00:00 2001 From: Mikhala <122326421+imx-mikhala@users.noreply.github.com> Date: Wed, 4 Oct 2023 14:01:10 +0800 Subject: [PATCH] WT-1727 Export smart checkout types (#932) --- packages/checkout/sdk/src/index.ts | 18 +++++++++++++++--- .../checkout/sdk/src/types/smartCheckout.ts | 4 ++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/packages/checkout/sdk/src/index.ts b/packages/checkout/sdk/src/index.ts index 9751d0eb39..4925955ece 100644 --- a/packages/checkout/sdk/src/index.ts +++ b/packages/checkout/sdk/src/index.ts @@ -5,10 +5,12 @@ export { CHECKOUT_API_BASE_URL, CheckoutStatus, ExchangeType, + FundingStepType, GasEstimateType, GasTokenType, ItemType, NetworkFilterTypes, + RoutingOutcomeType, TokenFilterTypes, TransactionOrGasType, WalletFilterTypes, @@ -16,6 +18,8 @@ export { } from './types'; export type { AllowedNetworkConfig, + AvailableRoutingOptions, + BalanceDelta, BuyOrder, BuyParams, BuyResult, @@ -28,12 +32,17 @@ export type { ConnectParams, ConnectResult, DexConfig, + FeePercentage, + NativeItemRequirement, ERC20ItemRequirement, ERC721ItemRequirement, - FeePercentage, FeeToken, FiatRampParams, FulfillmentTransaction, + FundingItem, + FundingRoute, + FundingRouteFeeEstimate, + FundingStep, GasAmount, GasEstimateBridgeToL2Result, GasEstimateParams, @@ -51,12 +60,12 @@ export type { GetTokenAllowListResult, GetWalletAllowListParams, GetWalletAllowListResult, - ItemRequirement, - NativeItemRequirement, + ItemBalance, NetworkFilter, NetworkInfo, OrderFee, RemoteConfiguration, + RoutingOutcome, SellOrder, SellParams, SellResult, @@ -64,10 +73,13 @@ export type { SendTransactionParams, SendTransactionResult, SmartCheckoutParams, + SmartCheckoutResult, + SmartCheckoutRouter, SwitchNetworkParams, SwitchNetworkResult, TokenFilter, TokenInfo, + TransactionRequirement, WalletFilter, WalletInfo, } from './types'; diff --git a/packages/checkout/sdk/src/types/smartCheckout.ts b/packages/checkout/sdk/src/types/smartCheckout.ts index 0a0038e844..1deaaeaa2c 100644 --- a/packages/checkout/sdk/src/types/smartCheckout.ts +++ b/packages/checkout/sdk/src/types/smartCheckout.ts @@ -431,7 +431,7 @@ export type RoutesFound = { * @property {RoutingOutcomeType.NO_ROUTES_FOUND} type - Indicates that no funding routes were found for the transaction. * @property {string} message - The message indicating why no funding routes were found. */ -type NoRoutesFound = { +export type NoRoutesFound = { type: RoutingOutcomeType.NO_ROUTES_FOUND, message: string }; @@ -441,7 +441,7 @@ type NoRoutesFound = { * @property {RoutingOutcomeType.NO_ROUTE_OPTIONS} type - Indicates that no routing options were available for the transaction. * @property {string} message - The message indicating why no routing options were available. */ -type NoRouteOptions = { +export type NoRouteOptions = { type: RoutingOutcomeType.NO_ROUTE_OPTIONS, message: string };