@coinflowlabs/vue 1.14.0 → 1.16.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.
@@ -358,6 +358,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
358
358
  handleSendTransaction: (transaction: string) => Promise<string>;
359
359
  handleSignMessage?: ((message: string) => Promise<string>) | undefined;
360
360
  handleSignTransaction?: ((transaction: string) => Promise<string>) | undefined;
361
+ handleOverlay?: ((state: string) => void) | undefined;
361
362
  };
362
363
  }, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
363
364
  args: {
@@ -262,6 +262,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
262
262
  handleSendTransaction: (transaction: string) => Promise<string>;
263
263
  handleSignMessage?: ((message: string) => Promise<string>) | undefined;
264
264
  handleSignTransaction?: ((transaction: string) => Promise<string>) | undefined;
265
+ handleOverlay?: ((state: string) => void) | undefined;
265
266
  };
266
267
  }, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
267
268
  args: {
@@ -4,6 +4,8 @@ export interface CardFormV2TokenResponse {
4
4
  token: string;
5
5
  expMonth?: string;
6
6
  expYear?: string;
7
+ /** Forter device token captured in the card-form iframe; forward it as the `x-forter-token` header on your charge request so Forter can score the transaction. Absent if the Forter SDK has not loaded. */
8
+ forterToken?: string;
7
9
  }
8
10
  declare function tokenize(): Promise<CardFormV2TokenResponse>;
9
11
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
@@ -18,6 +18,11 @@ export interface IFrameMessageHandlers {
18
18
  handleHeightChange?: (height: string) => void;
19
19
  onSuccess: OnSuccessMethod | undefined;
20
20
  onAuthDeclined: OnAuthDeclinedMethod | undefined;
21
+ /**
22
+ * Called when the iframe opens/closes an in-page overlay (e.g. the PayPal
23
+ * approval modal). `state` is 'open' or 'close'.
24
+ */
25
+ handleOverlay?: (state: string) => void;
21
26
  }
22
27
  export declare enum IFrameMessageMethods {
23
28
  SignMessage = "signMessage",
@@ -28,7 +33,8 @@ export declare enum IFrameMessageMethods {
28
33
  AuthDeclined = "authDeclined",
29
34
  Loaded = "loaded",
30
35
  AccountLinked = "accountLinked",
31
- Redirect = "redirect"
36
+ Redirect = "redirect",
37
+ Overlay = "overlay"
32
38
  }
33
39
  export declare function getWalletPubkey(input: Pick<CoinflowPurchaseProps, 'wallet' | 'blockchain'>): string | null | undefined;
34
40
  export declare function handleIFrameMessage(rawMessage: string, handlers: IFrameMessageHandlers, handleHeightChangeId: string | number): Promise<string> | void;
@@ -1,9 +1,11 @@
1
1
  export declare const DEVICE_ID_HEADER = "x-device-id";
2
2
  export declare const SESSION_ID_HEADER = "x-session-id";
3
3
  export declare const REFERRER_HEADER = "x-coinflow-referrer";
4
+ export declare const FORTER_TOKEN_HEADER = "x-forter-token";
4
5
  export type CoinflowProtectionHeadersType = {
5
6
  [DEVICE_ID_HEADER]: string | null;
6
7
  [SESSION_ID_HEADER]: string | null;
8
+ [FORTER_TOKEN_HEADER]: string | null;
7
9
  };
8
10
  export declare function getCoinflowProtectionHeaders(): CoinflowProtectionHeadersType;
9
11
  export type CoinflowPurchaseHeadersType = CoinflowProtectionHeadersType & {
@@ -79,6 +79,7 @@ export declare enum MerchantStyle {
79
79
  export type MerchantTheme = {
80
80
  primary?: string;
81
81
  background?: string;
82
+ cardBackground?: string;
82
83
  backgroundAccent?: string;
83
84
  backgroundAccent2?: string;
84
85
  textColor?: string;
@@ -92,6 +93,7 @@ export type MerchantTheme = {
92
93
  cardNumberPlaceholder?: string;
93
94
  cvvPlaceholder?: string;
94
95
  expirationPlaceholder?: string;
96
+ placeholderColor?: string;
95
97
  showCardIcon?: boolean;
96
98
  };
97
99
  interface BaseCustomerInfo {
@@ -265,7 +267,10 @@ export declare enum PaymentMethods {
265
267
  crypto = "crypto",
266
268
  wire = "wire",
267
269
  cashApp = "cashApp",
268
- rain = "rain"
270
+ apa = "apa",
271
+ paypal = "paypal",
272
+ venmo = "venmo",
273
+ interac = "interac"
269
274
  }
270
275
  export declare const paymentMethodLabels: Record<PaymentMethods, string>;
271
276
  export interface CoinflowCommonPaymentIntentProps extends Omit<CoinflowTypes, 'blockchain'> {
@@ -0,0 +1,10 @@
1
+ export declare function getForterToken(): string | null;
2
+ export declare function captureForterToken({ timeoutMs, intervalMs, }?: {
3
+ timeoutMs?: number;
4
+ intervalMs?: number;
5
+ }): void;
6
+ export declare function awaitForterToken({ timeoutMs, intervalMs, }?: {
7
+ timeoutMs?: number;
8
+ intervalMs?: number;
9
+ }): Promise<string | null>;
10
+ export default getForterToken;
@@ -11,3 +11,4 @@ export * from './types/nftCartItem';
11
11
  export * from './types/cryptoCartItem';
12
12
  export * from './CoinflowPurchaseProtectionHeaders';
13
13
  export * from './CoinflowProtectionInit';
14
+ export { default as getForterToken, captureForterToken, awaitForterToken, } from './Forter';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coinflowlabs/vue",
3
3
  "private": false,
4
- "version": "1.14.0",
4
+ "version": "1.16.0",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",