@coinflowlabs/angular 1.11.0 → 1.12.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinflowlabs/angular",
3
- "version": "1.11.0",
3
+ "version": "1.12.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.17",
6
6
  "@angular/core": "^19.2.17",
@@ -932,7 +932,10 @@ declare enum PaymentMethods {
932
932
  crypto = "crypto",
933
933
  wire = "wire",
934
934
  cashApp = "cashApp",
935
- rain = "rain"
935
+ apa = "apa",
936
+ paypal = "paypal",
937
+ venmo = "venmo",
938
+ interac = "interac"
936
939
  }
937
940
  declare const paymentMethodLabels: Record<PaymentMethods, string>;
938
941
  interface CoinflowCommonPaymentIntentProps extends Omit<CoinflowTypes, 'blockchain'> {
@@ -947,8 +950,6 @@ interface CoinflowCommonPaymentIntentProps extends Omit<CoinflowTypes, 'blockcha
947
950
  /**
948
951
  * The DeviceID gotten from the Coinflow SDK:
949
952
  * https://docs.coinflow.cash/guides/checkout/fraud-protection/chargeback-protection/implement-chargeback-protection#how-to-add-chargeback-protection
950
- *
951
- * nSureSDK.getDeviceId()
952
953
  */
953
954
  deviceId?: string;
954
955
  /**
@@ -1009,8 +1010,6 @@ interface CoinflowCommonPurchaseProps extends CoinflowTypes {
1009
1010
  /**
1010
1011
  * The DeviceID gotten from the Coinflow SDK:
1011
1012
  * https://docs.coinflow.cash/guides/checkout/fraud-protection/chargeback-protection/implement-chargeback-protection#how-to-add-chargeback-protection
1012
- *
1013
- * nSureSDK.getDeviceId()
1014
1013
  */
1015
1014
  deviceId?: string;
1016
1015
  jwtToken?: string;
@@ -1030,6 +1029,11 @@ interface CoinflowCommonPurchaseProps extends CoinflowTypes {
1030
1029
  threeDsChallengePreference?: ThreeDsChallengePreference;
1031
1030
  destinationAuthKey?: string;
1032
1031
  accountFundingTransaction?: AccountFundingTransaction;
1032
+ /**
1033
+ * Custom preset deposit amounts (in dollars) to display in the AmountSelector.
1034
+ * Only the first 3 values are used. Defaults to [10, 25, 50] if not provided.
1035
+ */
1036
+ depositAmounts?: number[];
1033
1037
  }
1034
1038
  interface WithGeo {
1035
1039
  /**
@@ -1300,7 +1304,7 @@ interface DecentRedeem extends CommonEvmRedeem {
1300
1304
  * Gas fees for the transaction will be automatically calculated and added to the total charged to the customer. Optionally the merchant can opt to pay for these gas fees.
1301
1305
  */
1302
1306
  type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem | DecentRedeem;
1303
- interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'chargebackProtectionAccountType' | 'webhookInfo' | 'subtotal' | 'presentment' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'supportEmail' | 'allowedPaymentMethods' | 'accountFundingTransaction' | 'partialUsdcChecked' | 'isZeroAuthorization' | 'zeroAuthorizationConfig'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins' | 'allowedWithdrawSpeeds'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey' | 'redemptionCheck'>, WithGeo {
1307
+ interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'chargebackProtectionAccountType' | 'webhookInfo' | 'subtotal' | 'presentment' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'supportEmail' | 'allowedPaymentMethods' | 'accountFundingTransaction' | 'partialUsdcChecked' | 'isZeroAuthorization' | 'zeroAuthorizationConfig' | 'depositAmounts'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins' | 'allowedWithdrawSpeeds'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey' | 'redemptionCheck'>, WithGeo {
1304
1308
  walletPubkey: string | null | undefined;
1305
1309
  sessionKey?: string;
1306
1310
  route: string;
@@ -1388,7 +1392,7 @@ declare class CoinflowUtils {
1388
1392
  static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
1389
1393
  static getCoinflowAppBaseUrl(env?: CoinflowEnvs): string;
1390
1394
  static getCoinflowApiUrl(env?: CoinflowEnvs): string;
1391
- static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, presentment, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, chargebackProtectionData, chargebackProtectionAccountType, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, allowedPaymentMethods, accountFundingTransaction, partialUsdcChecked, redemptionCheck, allowedWithdrawSpeeds, isZeroAuthorization, zeroAuthorizationConfig, userLocation, baseUrl, }: CoinflowIFrameProps & {
1395
+ static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, presentment, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, chargebackProtectionData, chargebackProtectionAccountType, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, allowedPaymentMethods, accountFundingTransaction, partialUsdcChecked, redemptionCheck, allowedWithdrawSpeeds, isZeroAuthorization, zeroAuthorizationConfig, userLocation, depositAmounts, baseUrl, }: CoinflowIFrameProps & {
1392
1396
  baseUrl?: string;
1393
1397
  } & WithGeo): string;
1394
1398
  static getCoinflowIntentsUrl({ baseUrl, route, color, theme, env, origins, deviceId, merchantCss, loaderBackground, handleHeightChangeId, }: CoinflowIntentsIFrameProps & {
@@ -1438,6 +1442,11 @@ interface IFrameMessageHandlers {
1438
1442
  handleHeightChange?: (height: string) => void;
1439
1443
  onSuccess: OnSuccessMethod | undefined;
1440
1444
  onAuthDeclined: OnAuthDeclinedMethod | undefined;
1445
+ /**
1446
+ * Called when the iframe opens/closes an in-page overlay (e.g. the PayPal
1447
+ * approval modal). `state` is 'open' or 'close'.
1448
+ */
1449
+ handleOverlay?: (state: string) => void;
1441
1450
  }
1442
1451
  declare enum IFrameMessageMethods {
1443
1452
  SignMessage = "signMessage",
@@ -1448,7 +1457,8 @@ declare enum IFrameMessageMethods {
1448
1457
  AuthDeclined = "authDeclined",
1449
1458
  Loaded = "loaded",
1450
1459
  AccountLinked = "accountLinked",
1451
- Redirect = "redirect"
1460
+ Redirect = "redirect",
1461
+ Overlay = "overlay"
1452
1462
  }
1453
1463
  declare function getWalletPubkey(input: Pick<CoinflowPurchaseProps, 'wallet' | 'blockchain'>): string | null | undefined;
1454
1464
  declare function handleIFrameMessage(rawMessage: string, handlers: IFrameMessageHandlers, handleHeightChangeId: string | number): Promise<string> | void;
@@ -1569,9 +1579,11 @@ declare function doInitializeTokenExCardOnlyIframe(args: DoInitializeTokenExIfra
1569
1579
  declare const DEVICE_ID_HEADER = "x-device-id";
1570
1580
  declare const SESSION_ID_HEADER = "x-session-id";
1571
1581
  declare const REFERRER_HEADER = "x-coinflow-referrer";
1582
+ declare const FORTER_TOKEN_HEADER = "x-forter-token";
1572
1583
  type CoinflowProtectionHeadersType = {
1573
1584
  [DEVICE_ID_HEADER]: string | null;
1574
1585
  [SESSION_ID_HEADER]: string | null;
1586
+ [FORTER_TOKEN_HEADER]: string | null;
1575
1587
  };
1576
1588
  declare function getCoinflowProtectionHeaders(): CoinflowProtectionHeadersType;
1577
1589
  type CoinflowPurchaseHeadersType = CoinflowProtectionHeadersType & {
@@ -1584,6 +1596,16 @@ declare function initCoinflowProtection({ coinflowEnv, merchantId, }: {
1584
1596
  merchantId: string;
1585
1597
  }): Promise<void>;
1586
1598
 
1599
+ declare function getForterToken(): string | null;
1600
+ declare function captureForterToken({ timeoutMs, intervalMs, }?: {
1601
+ timeoutMs?: number;
1602
+ intervalMs?: number;
1603
+ }): void;
1604
+ declare function awaitForterToken({ timeoutMs, intervalMs, }?: {
1605
+ timeoutMs?: number;
1606
+ intervalMs?: number;
1607
+ }): Promise<string | null>;
1608
+
1587
1609
  declare class CoinflowIFrameComponent {
1588
1610
  private sanitizer;
1589
1611
  iframeProps: CoinflowIFrameProps;
@@ -1744,5 +1766,5 @@ type WithOnLoad = {
1744
1766
  onLoad?: () => void | Promise<void>;
1745
1767
  };
1746
1768
 
1747
- export { BankingCurrencies, CARD_TYPE_MAPPING, CardType, ChargebackProtectionAccountType, CoinflowApplePayButtonComponent, CoinflowCardForm, CoinflowCardFormV2, CoinflowCardNumberInput, CoinflowCardNumberOnlyInput, CoinflowCvvInputComponent, CoinflowCvvOnlyInputComponent, CoinflowGooglePayButtonComponent, CoinflowIFrameComponent, CoinflowPurchaseComponent, CoinflowPurchaseHistoryComponent, CoinflowPurchaseProtectionComponent, CoinflowUtils, CoinflowWithdrawComponent, CoinflowWithdrawHistoryComponent, Currency, CurrencyToISO4217, DEVICE_ID_HEADER, EventBus, IFrameMessageMethods, MerchantStyle, PaymentMethods, REFERRER_HEADER, RN_REDIRECT_MESSAGE_NAME, SESSION_ID_HEADER, SettlementType, ThreeDsChallengePreference, TokenExCardNumberIframeId, TokenExCvvContainerID, WithdrawCategory, WithdrawCurrencies, WithdrawSpeed, doInitializeCvvOnlyTokenExIframe, doInitializeTokenExCardOnlyIframe, doInitializeTokenExIframe, getCoinflowProtectionHeaders, getCoinflowPurchaseHeaders, getCurrencyDecimals, getCustomerName, getHandlers, getIframeConfig, getWalletPubkey, handleIFrameMessage, initCoinflowProtection, invertRate, isBankingCurrency, isTypedCurrencyCents, isWithdrawCurrency, isZeroAuthSavedPaymentMethods, isZeroAuthVerifyCard, nftCartItem, paymentMethodLabels, productType, recordFrontendError, setTokenExScriptTag };
1769
+ export { BankingCurrencies, CARD_TYPE_MAPPING, CardType, ChargebackProtectionAccountType, CoinflowApplePayButtonComponent, CoinflowCardForm, CoinflowCardFormV2, CoinflowCardNumberInput, CoinflowCardNumberOnlyInput, CoinflowCvvInputComponent, CoinflowCvvOnlyInputComponent, CoinflowGooglePayButtonComponent, CoinflowIFrameComponent, CoinflowPurchaseComponent, CoinflowPurchaseHistoryComponent, CoinflowPurchaseProtectionComponent, CoinflowUtils, CoinflowWithdrawComponent, CoinflowWithdrawHistoryComponent, Currency, CurrencyToISO4217, DEVICE_ID_HEADER, EventBus, FORTER_TOKEN_HEADER, IFrameMessageMethods, MerchantStyle, PaymentMethods, REFERRER_HEADER, RN_REDIRECT_MESSAGE_NAME, SESSION_ID_HEADER, SettlementType, ThreeDsChallengePreference, TokenExCardNumberIframeId, TokenExCvvContainerID, WithdrawCategory, WithdrawCurrencies, WithdrawSpeed, awaitForterToken, captureForterToken, doInitializeCvvOnlyTokenExIframe, doInitializeTokenExCardOnlyIframe, doInitializeTokenExIframe, getCoinflowProtectionHeaders, getCoinflowPurchaseHeaders, getCurrencyDecimals, getCustomerName, getForterToken, getHandlers, getIframeConfig, getWalletPubkey, handleIFrameMessage, initCoinflowProtection, invertRate, isBankingCurrency, isTypedCurrencyCents, isWithdrawCurrency, isZeroAuthSavedPaymentMethods, isZeroAuthVerifyCard, nftCartItem, paymentMethodLabels, productType, recordFrontendError, setTokenExScriptTag };
1748
1770
  export type { AccountFundingTransaction, AnyObject, ArbitrumWalletProps, AuthDeclinedWalletCallInfo, BankingCurrency, BaseWalletProps, CardFormArgs, CardFormInputStyles, CardFormTokenResponse, Cart, CartClassOmitted, CartItem, CartItemClassOmitted, Cents, ChargebackProtectionData, ChargebackProtectionItem, CoinflowArbitrumHistoryProps, CoinflowArbitrumPurchaseProps, CoinflowArbitrumWithdrawProps, CoinflowBaseHistoryProps, CoinflowBasePurchaseProps, CoinflowBaseWithdrawProps, CoinflowBlockchain, CoinflowCardNumberInputProps, CoinflowCardTokenResponse, CoinflowCommonPaymentIntentProps, CoinflowCommonPurchaseProps, CoinflowCommonWithdrawProps, CoinflowCvvOnlyInputProps, CoinflowEnvs, CoinflowEthHistoryProps, CoinflowEthPurchaseProps, CoinflowEthWithdrawProps, CoinflowEvmHistoryProps, CoinflowEvmPurchaseProps, CoinflowHistoryProps, CoinflowIFrameProps, CoinflowIntentsIFrameProps, CoinflowMonadHistoryProps, CoinflowMonadPurchaseProps, CoinflowMonadWithdrawProps, CoinflowPolygonHistoryProps, CoinflowPolygonPurchaseProps, CoinflowPolygonWithdrawProps, CoinflowProtectionHeadersType, CoinflowPurchaseHeadersType, CoinflowPurchaseProps, CoinflowSessionKeyHistoryProps, CoinflowSessionKeyPurchaseProps, CoinflowSolanaHistoryProps, CoinflowSolanaPurchaseProps, CoinflowSolanaWithdrawProps, CoinflowStellarHistoryProps, CoinflowStellarPurchaseProps, CoinflowStellarWithdrawProps, CoinflowTempoHistoryProps, CoinflowTempoPurchaseProps, CoinflowTempoWithdrawProps, CoinflowTypes, CoinflowWithdrawProps, CommonDoInitializeTokenExIframeArgs, CommonEvmRedeem, CryptoCartItem, CurrencyCents, CustomerInfo, DecentRedeem, DoInitializeCvvOnlyTokenExIframeArgs, DoInitializeTokenExIframeArgs, EthWallet, EthWalletProps, EventBusCallback, EvmTransactionData, ExchangeRate, FullName, GetIFrameConfigArgs, GiftCardCartItem, IFrameMessageHandlers, KnownTokenIdRedeem, MerchantIdOrCheckoutJwt, MerchantTheme, MergeWithOptionalDiff, MonadWalletProps, NameCustomerInfo, NftCartItemClassOmitted, NormalRedeem, OnAuthDeclinedMethod, OnSuccessMethod, PartialBy, PolygonWalletProps, PurchaseCustomPayInFee, RecipientAftInfo, RemainingLimit, ReturnedTokenIdRedeem, SafeMintRedeem, SolanaWallet, SolanaWalletProps, SplitNameCustomerInfo, StellarWallet, StellarWalletProps, Subtotal, TempoWalletProps, TokenExIFrameConfiguration, TokenExIframe, TokenRedeem, TokenSubtotal, TokenizationResponse, TypedCurrencyCents, VersionDetail, WalletCall, WalletTypes, WithGeo, WithOnLoad, WithdrawCurrency, ZeroAuthSavedPaymentMethods, ZeroAuthVerifyCard, ZeroAuthorizationConfig };