@coinflowlabs/vue 1.0.1 → 1.0.2
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.
|
@@ -30,8 +30,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
30
30
|
email?: string;
|
|
31
31
|
chargebackProtectionData?: import('../lib/common').ChargebackProtectionData;
|
|
32
32
|
planCode?: string;
|
|
33
|
-
|
|
34
|
-
disableGooglePay?: boolean;
|
|
33
|
+
allowedPaymentMethods?: import('../lib/common').PaymentMethods[];
|
|
35
34
|
customerInfo?: import('../lib/common').CustomerInfo;
|
|
36
35
|
settlementType?: import('../lib/common').SettlementType;
|
|
37
36
|
authOnly?: boolean;
|
|
@@ -62,8 +61,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
62
61
|
email?: string;
|
|
63
62
|
chargebackProtectionData?: import('../lib/common').ChargebackProtectionData;
|
|
64
63
|
planCode?: string;
|
|
65
|
-
|
|
66
|
-
disableGooglePay?: boolean;
|
|
64
|
+
allowedPaymentMethods?: import('../lib/common').PaymentMethods[];
|
|
67
65
|
customerInfo?: import('../lib/common').CustomerInfo;
|
|
68
66
|
settlementType?: import('../lib/common').SettlementType;
|
|
69
67
|
authOnly?: boolean;
|
|
@@ -95,8 +93,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
95
93
|
email?: string;
|
|
96
94
|
chargebackProtectionData?: import('../lib/common').ChargebackProtectionData;
|
|
97
95
|
planCode?: string;
|
|
98
|
-
|
|
99
|
-
disableGooglePay?: boolean;
|
|
96
|
+
allowedPaymentMethods?: import('../lib/common').PaymentMethods[];
|
|
100
97
|
customerInfo?: import('../lib/common').CustomerInfo;
|
|
101
98
|
settlementType?: import('../lib/common').SettlementType;
|
|
102
99
|
authOnly?: boolean;
|
|
@@ -126,8 +123,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
126
123
|
email?: string;
|
|
127
124
|
chargebackProtectionData?: import('../lib/common').ChargebackProtectionData;
|
|
128
125
|
planCode?: string;
|
|
129
|
-
|
|
130
|
-
disableGooglePay?: boolean;
|
|
126
|
+
allowedPaymentMethods?: import('../lib/common').PaymentMethods[];
|
|
131
127
|
customerInfo?: import('../lib/common').CustomerInfo;
|
|
132
128
|
settlementType?: import('../lib/common').SettlementType;
|
|
133
129
|
authOnly?: boolean;
|
|
@@ -157,8 +153,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
157
153
|
email?: string;
|
|
158
154
|
chargebackProtectionData?: import('../lib/common').ChargebackProtectionData;
|
|
159
155
|
planCode?: string;
|
|
160
|
-
|
|
161
|
-
disableGooglePay?: boolean;
|
|
156
|
+
allowedPaymentMethods?: import('../lib/common').PaymentMethods[];
|
|
162
157
|
customerInfo?: import('../lib/common').CustomerInfo;
|
|
163
158
|
settlementType?: import('../lib/common').SettlementType;
|
|
164
159
|
authOnly?: boolean;
|
|
@@ -188,8 +183,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
188
183
|
email?: string;
|
|
189
184
|
chargebackProtectionData?: import('../lib/common').ChargebackProtectionData;
|
|
190
185
|
planCode?: string;
|
|
191
|
-
|
|
192
|
-
disableGooglePay?: boolean;
|
|
186
|
+
allowedPaymentMethods?: import('../lib/common').PaymentMethods[];
|
|
193
187
|
customerInfo?: import('../lib/common').CustomerInfo;
|
|
194
188
|
settlementType?: import('../lib/common').SettlementType;
|
|
195
189
|
authOnly?: boolean;
|
|
@@ -219,8 +213,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
219
213
|
email?: string;
|
|
220
214
|
chargebackProtectionData?: import('../lib/common').ChargebackProtectionData;
|
|
221
215
|
planCode?: string;
|
|
222
|
-
|
|
223
|
-
disableGooglePay?: boolean;
|
|
216
|
+
allowedPaymentMethods?: import('../lib/common').PaymentMethods[];
|
|
224
217
|
customerInfo?: import('../lib/common').CustomerInfo;
|
|
225
218
|
settlementType?: import('../lib/common').SettlementType;
|
|
226
219
|
authOnly?: boolean;
|
|
@@ -22,8 +22,7 @@ export type MerchantTheme = {
|
|
|
22
22
|
font?: string;
|
|
23
23
|
style?: MerchantStyle;
|
|
24
24
|
};
|
|
25
|
-
|
|
26
|
-
name?: string;
|
|
25
|
+
interface BaseCustomerInfo {
|
|
27
26
|
verificationId?: string;
|
|
28
27
|
displayName?: string;
|
|
29
28
|
address?: string;
|
|
@@ -35,6 +34,23 @@ export interface CustomerInfo {
|
|
|
35
34
|
lat?: string;
|
|
36
35
|
lng?: string;
|
|
37
36
|
}
|
|
37
|
+
export interface NameCustomerInfo extends BaseCustomerInfo {
|
|
38
|
+
/**
|
|
39
|
+
* @hidden
|
|
40
|
+
*/
|
|
41
|
+
name?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface SplitNameCustomerInfo extends BaseCustomerInfo {
|
|
44
|
+
/**
|
|
45
|
+
* @minLength 1
|
|
46
|
+
*/
|
|
47
|
+
firstName: string;
|
|
48
|
+
/**
|
|
49
|
+
* @minLength 1
|
|
50
|
+
*/
|
|
51
|
+
lastName: string;
|
|
52
|
+
}
|
|
53
|
+
export type CustomerInfo = SplitNameCustomerInfo | NameCustomerInfo;
|
|
38
54
|
/** Coinflow Types **/
|
|
39
55
|
export type CoinflowBlockchain = 'solana' | 'near' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'user';
|
|
40
56
|
export type CoinflowEnvs = 'prod' | 'staging' | 'staging-live' | 'sandbox' | 'local';
|
|
@@ -170,6 +186,17 @@ export declare enum ThreeDsChallengePreference {
|
|
|
170
186
|
Frictionless = "Frictionless",
|
|
171
187
|
Challenge = "Challenge"
|
|
172
188
|
}
|
|
189
|
+
export declare enum PaymentMethods {
|
|
190
|
+
card = "card",
|
|
191
|
+
ach = "ach",
|
|
192
|
+
fasterPayments = "fasterPayments",
|
|
193
|
+
sepa = "sepa",
|
|
194
|
+
pix = "pix",
|
|
195
|
+
usdc = "usdc",
|
|
196
|
+
googlePay = "googlePay",
|
|
197
|
+
applePay = "applePay",
|
|
198
|
+
credits = "credits"
|
|
199
|
+
}
|
|
173
200
|
export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
174
201
|
subtotal?: Subtotal;
|
|
175
202
|
onSuccess?: OnSuccessMethod;
|
|
@@ -180,8 +207,10 @@ export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
|
180
207
|
email?: string;
|
|
181
208
|
chargebackProtectionData?: ChargebackProtectionData;
|
|
182
209
|
planCode?: string;
|
|
183
|
-
|
|
184
|
-
|
|
210
|
+
/**
|
|
211
|
+
* The payment methods displayed on the UI. If omitted, all available payment methods will be displayed.
|
|
212
|
+
*/
|
|
213
|
+
allowedPaymentMethods?: PaymentMethods[];
|
|
185
214
|
customerInfo?: CustomerInfo;
|
|
186
215
|
settlementType?: SettlementType;
|
|
187
216
|
authOnly?: boolean;
|
|
@@ -351,7 +380,7 @@ export interface TokenRedeem extends CommonEvmRedeem {
|
|
|
351
380
|
destination: string;
|
|
352
381
|
}
|
|
353
382
|
export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | ReservoirRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem;
|
|
354
|
-
export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'subtotal' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'supportEmail'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey'> {
|
|
383
|
+
export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'subtotal' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'supportEmail' | 'allowedPaymentMethods'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey'> {
|
|
355
384
|
walletPubkey: string | null | undefined;
|
|
356
385
|
sessionKey?: string;
|
|
357
386
|
route: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CoinflowBlockchain, CoinflowEnvs, CoinflowIFrameProps, CoinflowPurchaseProps } from './CoinflowTypes';
|
|
1
|
+
import { CoinflowBlockchain, CoinflowEnvs, CoinflowIFrameProps, CoinflowPurchaseProps, CustomerInfo } from './CoinflowTypes';
|
|
2
2
|
export declare class CoinflowUtils {
|
|
3
3
|
env: CoinflowEnvs;
|
|
4
4
|
url: string;
|
|
@@ -6,7 +6,7 @@ export declare class CoinflowUtils {
|
|
|
6
6
|
getNSurePartnerId(merchantId: string): Promise<string | undefined>;
|
|
7
7
|
static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
|
|
8
8
|
static getCoinflowApiUrl(env?: CoinflowEnvs): string;
|
|
9
|
-
static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChange, bankAccountLinkRedirect, additionalWallets, nearDeposit, chargebackProtectionData, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, }: CoinflowIFrameProps): string;
|
|
9
|
+
static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChange, bankAccountLinkRedirect, additionalWallets, nearDeposit, chargebackProtectionData, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, allowedPaymentMethods, }: CoinflowIFrameProps): string;
|
|
10
10
|
static getTransaction(props: CoinflowPurchaseProps): string | undefined;
|
|
11
11
|
static byBlockchain<T>(blockchain: CoinflowBlockchain, args: {
|
|
12
12
|
solana: T;
|
|
@@ -18,3 +18,8 @@ export declare class CoinflowUtils {
|
|
|
18
18
|
user: T;
|
|
19
19
|
}): T;
|
|
20
20
|
}
|
|
21
|
+
export interface FullName {
|
|
22
|
+
firstName: string;
|
|
23
|
+
lastName: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function getCustomerName(info: CustomerInfo | undefined): FullName | undefined;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinflowlabs/vue",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/bs58": "^4.0.4",
|
|
34
|
-
"@rushstack/eslint-patch": "^1.10.
|
|
35
|
-
"@types/node": "^22.10.
|
|
34
|
+
"@rushstack/eslint-patch": "^1.10.5",
|
|
35
|
+
"@types/node": "^22.10.10",
|
|
36
36
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
37
|
-
"@vue/eslint-config-prettier": "^10.
|
|
38
|
-
"@vue/eslint-config-typescript": "^
|
|
37
|
+
"@vue/eslint-config-prettier": "^10.2.0",
|
|
38
|
+
"@vue/eslint-config-typescript": "^14.3.0",
|
|
39
39
|
"copyfiles": "^2.4.1",
|
|
40
40
|
"eslint": "^8.57.1",
|
|
41
41
|
"eslint-plugin-vue": "^9.32.0",
|
|
42
42
|
"prettier": "^3.4.2",
|
|
43
43
|
"typescript": "^5.6.3",
|
|
44
|
-
"vite": "^6.0.
|
|
44
|
+
"vite": "^6.0.11",
|
|
45
45
|
"vite-plugin-dts": "^4.4.0",
|
|
46
|
-
"vitepress": "^1.
|
|
46
|
+
"vitepress": "^1.6.3",
|
|
47
47
|
"vue": "^3.5.13",
|
|
48
48
|
"vue-tsc": "^2.2.0"
|
|
49
49
|
},
|