@coinflowlabs/vue 1.10.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.
@@ -0,0 +1,38 @@
1
+ import { PropType } from 'vue';
2
+ import { CoinflowEnvs, MerchantTheme } from '../../lib/common';
3
+ interface CardFormV2TokenResponse {
4
+ token: string;
5
+ expMonth?: string;
6
+ expYear?: string;
7
+ }
8
+ declare function tokenize(): Promise<CardFormV2TokenResponse>;
9
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
10
+ args: {
11
+ type: PropType<{
12
+ merchantId: string;
13
+ env?: CoinflowEnvs;
14
+ theme?: MerchantTheme;
15
+ variant: "card-form" | "card-number-form" | "cvv-form";
16
+ token?: string;
17
+ onLoad?: () => void;
18
+ }>;
19
+ required: true;
20
+ };
21
+ }>, {
22
+ tokenize: typeof tokenize;
23
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
24
+ args: {
25
+ type: PropType<{
26
+ merchantId: string;
27
+ env?: CoinflowEnvs;
28
+ theme?: MerchantTheme;
29
+ variant: "card-form" | "card-number-form" | "cvv-form";
30
+ token?: string;
31
+ onLoad?: () => void;
32
+ }>;
33
+ required: true;
34
+ };
35
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
36
+ iframeRef: HTMLIFrameElement;
37
+ }, HTMLIFrameElement>;
38
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { CoinflowEnvs } from './CoinflowTypes';
2
+ export declare function initCoinflowProtection({ coinflowEnv, merchantId, }: {
3
+ coinflowEnv: CoinflowEnvs;
4
+ merchantId: string;
5
+ }): Promise<void>;
@@ -0,0 +1,16 @@
1
+ import { CoinflowEnvs } from './CoinflowTypes';
2
+ declare global {
3
+ interface Window {
4
+ Verisoul?: {
5
+ session: () => Promise<{
6
+ session_id: string;
7
+ }>;
8
+ };
9
+ }
10
+ }
11
+ export declare function initProtectionSession({ merchantId, env, }: {
12
+ merchantId: string;
13
+ env: CoinflowEnvs;
14
+ }): Promise<void>;
15
+ export declare function getProtectionSessionId(): string | null;
16
+ export default getProtectionSessionId;
@@ -0,0 +1,3 @@
1
+ export declare function initProtectionSession(): Promise<void>;
2
+ export declare function getProtectionSessionId(): string | null;
3
+ export default getProtectionSessionId;
@@ -0,0 +1,7 @@
1
+ export declare const DEVICE_ID_HEADER = "x-device-id";
2
+ export declare const SESSION_ID_HEADER = "x-session-id";
3
+ export type CoinflowProtectionHeadersType = {
4
+ [DEVICE_ID_HEADER]: string | null;
5
+ [SESSION_ID_HEADER]: string | null;
6
+ };
7
+ export declare function getCoinflowProtectionHeaders(): CoinflowProtectionHeadersType;
@@ -86,6 +86,12 @@ export type MerchantTheme = {
86
86
  ctaColor?: string;
87
87
  font?: string;
88
88
  style?: MerchantStyle;
89
+ fontSize?: string;
90
+ fontWeight?: string;
91
+ cardNumberPlaceholder?: string;
92
+ cvvPlaceholder?: string;
93
+ expirationPlaceholder?: string;
94
+ showCardIcon?: boolean;
89
95
  };
90
96
  interface BaseCustomerInfo {
91
97
  verificationId?: string;
@@ -28,3 +28,9 @@ export interface FullName {
28
28
  lastName: string;
29
29
  }
30
30
  export declare function getCustomerName(info: CustomerInfo | undefined): FullName | undefined;
31
+ export declare function recordFrontendError({ event, error, env, merchantId, }: {
32
+ event: string;
33
+ error: any;
34
+ env: CoinflowEnvs;
35
+ merchantId?: string;
36
+ }): void;
@@ -1,2 +1,2 @@
1
- declare function fun(): string | null;
2
- export default fun;
1
+ declare function getNSureDeviceId(): string | null;
2
+ export default getNSureDeviceId;
@@ -1,2 +1,2 @@
1
- declare function fun(): string | null;
2
- export default fun;
1
+ declare function getNSureDeviceId(): string | null;
2
+ export default getNSureDeviceId;
@@ -9,3 +9,5 @@ export * from './types/AnyObject';
9
9
  export * from './types/giftCardCartItem';
10
10
  export * from './types/nftCartItem';
11
11
  export * from './types/cryptoCartItem';
12
+ export * from './CoinflowPurchaseProtectionHeaders';
13
+ export * from './CoinflowProtectionInit';
@@ -193,6 +193,16 @@ export interface TypedCurrencyCents<T extends Currency> extends Cents {
193
193
  currency: T;
194
194
  }
195
195
  export declare function isTypedCurrencyCents<T extends Currency>(cents: CurrencyCents, currency: T): cents is TypedCurrencyCents<T>;
196
+ export interface ExchangeRate<T extends Currency = Currency> {
197
+ base: Currency;
198
+ rate: number;
199
+ to: T;
200
+ }
201
+ export declare function invertRate<T extends Currency = Currency>(ex: {
202
+ base: T;
203
+ rate: number;
204
+ to: Currency;
205
+ }): ExchangeRate<T>;
196
206
  export interface TokenSubtotal {
197
207
  /**
198
208
  * The tokens address
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coinflowlabs/vue",
3
3
  "private": false,
4
- "version": "1.10.0",
4
+ "version": "1.12.0",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
package/dist/index.d.ts DELETED
@@ -1,12 +0,0 @@
1
- import { default as CoinflowIframe } from './components/CoinflowIframe.vue';
2
- import { default as CoinflowWithdraw } from './components/CoinflowWithdraw.vue';
3
- import { default as CoinflowPurchase } from './components/CoinflowPurchase.vue';
4
- import { default as CoinflowCardNumberInput } from './components/card-form/CoinflowCardNumberInput.vue';
5
- import { default as CoinflowCvvInput } from './components/card-form/CoinflowCvvInput.vue';
6
- import { default as CoinflowCvvOnlyInput } from './components/card-form/CoinflowCvvOnlyInput.vue';
7
- import { default as CoinflowPurchaseProtection } from './components/CoinflowPurchaseProtection.vue';
8
- import { default as CoinflowCardNumberOnlyInput } from './components/card-form/CoinflowCardNumberOnlyInput.vue';
9
- import { default as CoinflowApplePayButton } from './components/mobile-wallet/CoinflowApplePayButton.vue';
10
- import { default as CoinflowGooglePayButton } from './components/mobile-wallet/CoinflowGooglePayButton.vue';
11
- export * from './lib/common';
12
- export { CoinflowIframe, CoinflowWithdraw, CoinflowCvvInput, CoinflowCardNumberInput, CoinflowPurchase, CoinflowCvvOnlyInput, CoinflowPurchaseProtection, CoinflowCardNumberOnlyInput, CoinflowApplePayButton, CoinflowGooglePayButton, };