@authvia/payment-method-create 0.1.0 → 0.2.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/dist/components/AuthviaPaymentMethodForm.vue.d.ts +13 -8
- package/dist/components/internal/AuthviaFormWithTerms.vue.d.ts +5 -1
- package/dist/components/internal/AuthviaPaymentMethodAddAch.vue.d.ts +60 -23
- package/dist/components/internal/AuthviaPaymentMethodAddPayoutsPayPal.vue.d.ts +48 -0
- package/dist/components/internal/AuthviaPaymentMethodCreditCard.vue.d.ts +50 -8
- package/dist/entry/web-component.d.ts +1 -1
- package/dist/plugins/vuetify-base.d.ts +12 -0
- package/dist/types/index.d.ts +49 -8
- package/dist/utils/achFieldHelpers.d.ts +18 -0
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/payoutIdentifier.d.ts +25 -0
- package/dist/utils/paypalConfig.d.ts +5 -0
- package/dist/vue-plugin.js +2 -2
- package/dist/vue-plugin.umd.cjs +2 -2
- package/package.json +2 -2
|
@@ -15,22 +15,21 @@ declare const _default: import('vue').DefineComponent<Props, {
|
|
|
15
15
|
onReady?: (() => any) | undefined;
|
|
16
16
|
"onPayment-method-created"?: ((paymentMethodId: string) => any) | undefined;
|
|
17
17
|
}>, {
|
|
18
|
-
variant: "outlined" | "
|
|
18
|
+
variant: "outlined" | "plain" | "underlined" | "filled" | "solo" | "solo-filled" | "solo-inverted";
|
|
19
|
+
merchantId: string;
|
|
19
20
|
paze: {
|
|
20
21
|
amount?: string;
|
|
21
22
|
clientId?: string;
|
|
22
23
|
profileId?: string;
|
|
23
24
|
name?: string;
|
|
24
25
|
};
|
|
25
|
-
paypal:
|
|
26
|
-
venmo?: boolean;
|
|
27
|
-
merchantId: string;
|
|
28
|
-
clientId: string;
|
|
29
|
-
redirectUrl: string;
|
|
30
|
-
};
|
|
26
|
+
paypal: boolean | import('../types').PayPalConfig;
|
|
31
27
|
ach: {
|
|
32
28
|
demoMode?: boolean;
|
|
33
29
|
online?: boolean;
|
|
30
|
+
title?: string;
|
|
31
|
+
subtitle?: string;
|
|
32
|
+
submitBtnText?: string;
|
|
34
33
|
nameOnAccount?: string;
|
|
35
34
|
routingNumber?: string;
|
|
36
35
|
accountNumber?: string;
|
|
@@ -40,18 +39,24 @@ declare const _default: import('vue').DefineComponent<Props, {
|
|
|
40
39
|
country?: string;
|
|
41
40
|
postalCode?: string;
|
|
42
41
|
};
|
|
42
|
+
venmo: boolean;
|
|
43
43
|
color: string;
|
|
44
44
|
forgetDefault: boolean | string;
|
|
45
45
|
customerRef: string;
|
|
46
46
|
token: string;
|
|
47
47
|
borderRadius: string;
|
|
48
|
-
merchantId: string;
|
|
49
48
|
forgetHidden: boolean | string;
|
|
50
49
|
intent: string;
|
|
51
50
|
restrictions: PaymentMethodRestrictions[];
|
|
52
51
|
card: {
|
|
53
52
|
allow?: boolean;
|
|
54
53
|
demoMode?: boolean;
|
|
54
|
+
title?: string;
|
|
55
|
+
subtitle?: string;
|
|
56
|
+
submitBtnText?: string;
|
|
57
|
+
cardNumber?: string;
|
|
58
|
+
expiration?: string;
|
|
59
|
+
cvv?: string;
|
|
55
60
|
nameOnCard?: string;
|
|
56
61
|
streetAddress?: string;
|
|
57
62
|
city?: string;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { TermsConfig } from '../../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
terms?: TermsConfig;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
2
6
|
export default _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComputedRef, PropType, Ref } from 'vue';
|
|
2
2
|
import { PaymentMethod, PaymentMethodBillingAddress } from '../../model';
|
|
3
|
+
import { TermsConfig } from '../../types';
|
|
3
4
|
export interface P_ACHValues {
|
|
4
5
|
nameOnAccount: string;
|
|
5
6
|
accountNumber: string;
|
|
@@ -11,10 +12,14 @@ export interface P_ACHValues {
|
|
|
11
12
|
country: string;
|
|
12
13
|
postalCode: string;
|
|
13
14
|
}
|
|
15
|
+
type AchFieldKey = 'routingNumber' | 'accountNumber' | 'nameOnAccount';
|
|
16
|
+
type ValidationRule = (value: unknown) => true | string;
|
|
14
17
|
export interface Props {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
demoMode?: boolean;
|
|
19
|
+
submitBtnText?: string;
|
|
20
|
+
plaid?: Record<string, unknown>;
|
|
21
|
+
billingAddress?: PaymentMethodBillingAddress;
|
|
22
|
+
terms?: TermsConfig;
|
|
18
23
|
forgetHidden?: boolean;
|
|
19
24
|
forgetDefault?: boolean;
|
|
20
25
|
authToken: string;
|
|
@@ -24,16 +29,24 @@ export interface Props {
|
|
|
24
29
|
merchantId?: string;
|
|
25
30
|
}
|
|
26
31
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
27
|
-
|
|
32
|
+
demoMode: {
|
|
28
33
|
type: BooleanConstructor;
|
|
29
|
-
|
|
34
|
+
required: false;
|
|
30
35
|
};
|
|
31
|
-
|
|
36
|
+
submitBtnText: {
|
|
32
37
|
type: StringConstructor;
|
|
33
|
-
|
|
38
|
+
required: false;
|
|
39
|
+
};
|
|
40
|
+
plaid: {
|
|
41
|
+
type: PropType<Record<string, unknown>>;
|
|
42
|
+
required: false;
|
|
43
|
+
};
|
|
44
|
+
billingAddress: {
|
|
45
|
+
type: PropType<PaymentMethodBillingAddress>;
|
|
46
|
+
required: false;
|
|
34
47
|
};
|
|
35
|
-
|
|
36
|
-
type:
|
|
48
|
+
terms: {
|
|
49
|
+
type: PropType<TermsConfig>;
|
|
37
50
|
required: false;
|
|
38
51
|
};
|
|
39
52
|
forgetHidden: {
|
|
@@ -80,11 +93,21 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
80
93
|
savings: string;
|
|
81
94
|
checking: string;
|
|
82
95
|
};
|
|
83
|
-
fieldVariant: ComputedRef<
|
|
84
|
-
fieldVariantSafe: ComputedRef<
|
|
96
|
+
fieldVariant: ComputedRef<"outlined" | "plain" | "underlined" | "filled" | "solo" | "solo-filled" | "solo-inverted">;
|
|
97
|
+
fieldVariantSafe: ComputedRef<"outlined" | "plain" | "underlined" | "filled" | "solo" | "solo-filled" | "solo-inverted">;
|
|
85
98
|
formData: P_ACHValues;
|
|
86
99
|
isWorking: Ref<boolean, boolean>;
|
|
87
100
|
isFormValid: ComputedRef<boolean>;
|
|
101
|
+
markFieldDirty: (field: AchFieldKey) => void;
|
|
102
|
+
getFieldRules: (field: AchFieldKey) => ValidationRule[];
|
|
103
|
+
routingNumberModel: ComputedRef<string>;
|
|
104
|
+
accountNumberModel: ComputedRef<string>;
|
|
105
|
+
nameOnAccountModel: ComputedRef<string>;
|
|
106
|
+
onDigitKeydown: (event: KeyboardEvent) => void;
|
|
107
|
+
onNameKeydown: (event: KeyboardEvent) => void;
|
|
108
|
+
onRoutingPaste: (event: ClipboardEvent) => void;
|
|
109
|
+
onAccountPaste: (event: ClipboardEvent) => void;
|
|
110
|
+
onNamePaste: (event: ClipboardEvent) => void;
|
|
88
111
|
errorsType: Ref<{
|
|
89
112
|
other: string | undefined;
|
|
90
113
|
}, {
|
|
@@ -103,8 +126,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
103
126
|
azp: string;
|
|
104
127
|
handleAddressFormSubmit: (data: PaymentMethodBillingAddress) => void;
|
|
105
128
|
handleUpdateForgetCard: (_value: boolean) => void;
|
|
106
|
-
addressFormRef: Ref<
|
|
107
|
-
formRef: Ref<
|
|
129
|
+
addressFormRef: Ref<unknown, unknown>;
|
|
130
|
+
formRef: Ref<unknown, unknown>;
|
|
131
|
+
demoMode: ComputedRef<boolean>;
|
|
132
|
+
plaid: ComputedRef<Record<string, unknown> | undefined>;
|
|
133
|
+
billingAddress: ComputedRef<PaymentMethodBillingAddress | undefined>;
|
|
108
134
|
streetAddress: string;
|
|
109
135
|
city: string;
|
|
110
136
|
state: string;
|
|
@@ -113,16 +139,24 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
113
139
|
googleMapsApiKey: string;
|
|
114
140
|
isAddressFormValid: (isValid: boolean) => void;
|
|
115
141
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("error" | "success" | "submit")[], "error" | "success" | "submit", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
116
|
-
|
|
142
|
+
demoMode: {
|
|
117
143
|
type: BooleanConstructor;
|
|
118
|
-
|
|
144
|
+
required: false;
|
|
119
145
|
};
|
|
120
|
-
|
|
146
|
+
submitBtnText: {
|
|
121
147
|
type: StringConstructor;
|
|
122
|
-
|
|
148
|
+
required: false;
|
|
149
|
+
};
|
|
150
|
+
plaid: {
|
|
151
|
+
type: PropType<Record<string, unknown>>;
|
|
152
|
+
required: false;
|
|
153
|
+
};
|
|
154
|
+
billingAddress: {
|
|
155
|
+
type: PropType<PaymentMethodBillingAddress>;
|
|
156
|
+
required: false;
|
|
123
157
|
};
|
|
124
|
-
|
|
125
|
-
type:
|
|
158
|
+
terms: {
|
|
159
|
+
type: PropType<TermsConfig>;
|
|
126
160
|
required: false;
|
|
127
161
|
};
|
|
128
162
|
forgetHidden: {
|
|
@@ -171,11 +205,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
171
205
|
}>, {
|
|
172
206
|
variant: string;
|
|
173
207
|
forgetDefault: boolean;
|
|
208
|
+
demoMode: boolean;
|
|
174
209
|
forgetHidden: boolean;
|
|
175
|
-
dataDemoMode: boolean;
|
|
176
|
-
dataSubmitLabel: string;
|
|
177
210
|
}, {}, {
|
|
178
|
-
AuthviaFormWithTerms: import('vue').DefineComponent<{
|
|
211
|
+
AuthviaFormWithTerms: import('vue').DefineComponent<{
|
|
212
|
+
terms?: TermsConfig;
|
|
213
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
214
|
+
terms?: TermsConfig;
|
|
215
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
179
216
|
AuthviaForgotCardOption: import('vue').DefineComponent<import('./AuthviaForgotCardOption.vue').Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
180
217
|
"update:forgetCard": (value: boolean) => any;
|
|
181
218
|
}, string, import('vue').PublicProps, Readonly<import('./AuthviaForgotCardOption.vue').Props> & Readonly<{
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { PaymentMethodType } from '../../model';
|
|
2
|
+
import { TermsConfig, Variant } from '../../types';
|
|
3
|
+
type FormType = 'paypal' | 'venmo';
|
|
4
|
+
type PayoutTraits = {
|
|
5
|
+
email?: string;
|
|
6
|
+
phone?: string;
|
|
7
|
+
handle?: string;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_Props = {
|
|
10
|
+
authToken: string;
|
|
11
|
+
merchantId?: string;
|
|
12
|
+
customerRef?: string;
|
|
13
|
+
intent?: string;
|
|
14
|
+
type?: FormType;
|
|
15
|
+
terms?: TermsConfig;
|
|
16
|
+
forgetHidden?: boolean;
|
|
17
|
+
forgetDefault?: boolean;
|
|
18
|
+
variant?: Variant | string;
|
|
19
|
+
};
|
|
20
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
21
|
+
error: (payload: {
|
|
22
|
+
message: string;
|
|
23
|
+
}) => any;
|
|
24
|
+
success: (payload: Record<string, unknown>) => any;
|
|
25
|
+
submit: (payload: {
|
|
26
|
+
type: PaymentMethodType;
|
|
27
|
+
traits: PayoutTraits;
|
|
28
|
+
}) => any;
|
|
29
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
30
|
+
onError?: ((payload: {
|
|
31
|
+
message: string;
|
|
32
|
+
}) => any) | undefined;
|
|
33
|
+
onSuccess?: ((payload: Record<string, unknown>) => any) | undefined;
|
|
34
|
+
onSubmit?: ((payload: {
|
|
35
|
+
type: PaymentMethodType;
|
|
36
|
+
traits: PayoutTraits;
|
|
37
|
+
}) => any) | undefined;
|
|
38
|
+
}>, {
|
|
39
|
+
type: FormType;
|
|
40
|
+
variant: Variant | string;
|
|
41
|
+
merchantId: string;
|
|
42
|
+
forgetDefault: boolean;
|
|
43
|
+
terms: TermsConfig;
|
|
44
|
+
customerRef: string;
|
|
45
|
+
forgetHidden: boolean;
|
|
46
|
+
intent: string;
|
|
47
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
48
|
+
export default _default;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { ComputedRef, PropType, Ref } from 'vue';
|
|
2
2
|
import { PaymentMethodBillingAddress } from '../../model';
|
|
3
|
+
type CreditCardPrefill = {
|
|
4
|
+
cardNumber?: string;
|
|
5
|
+
nameOnCard?: string;
|
|
6
|
+
expiration?: string;
|
|
7
|
+
cvv?: string;
|
|
8
|
+
};
|
|
3
9
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
10
|
demoMode: {
|
|
5
11
|
type: BooleanConstructor;
|
|
@@ -36,6 +42,22 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
36
42
|
type: StringConstructor;
|
|
37
43
|
required: false;
|
|
38
44
|
};
|
|
45
|
+
cardNumber: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
required: false;
|
|
48
|
+
};
|
|
49
|
+
nameOnCard: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
required: false;
|
|
52
|
+
};
|
|
53
|
+
expiration: {
|
|
54
|
+
type: StringConstructor;
|
|
55
|
+
required: false;
|
|
56
|
+
};
|
|
57
|
+
cvv: {
|
|
58
|
+
type: StringConstructor;
|
|
59
|
+
required: false;
|
|
60
|
+
};
|
|
39
61
|
variant: {
|
|
40
62
|
type: StringConstructor;
|
|
41
63
|
required: false;
|
|
@@ -49,20 +71,20 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
49
71
|
submitLabel: {
|
|
50
72
|
type: StringConstructor;
|
|
51
73
|
required: false;
|
|
52
|
-
default:
|
|
74
|
+
default: any;
|
|
53
75
|
};
|
|
54
76
|
}>, {
|
|
55
77
|
squelch: boolean;
|
|
56
78
|
token: string;
|
|
57
|
-
prefill: Ref<
|
|
79
|
+
prefill: Ref<CreditCardPrefill, CreditCardPrefill>;
|
|
58
80
|
inDemoMode: Ref<boolean, boolean>;
|
|
59
81
|
isFormReady: Ref<boolean, boolean>;
|
|
60
82
|
isFormSubmit: Ref<boolean, boolean>;
|
|
61
83
|
isPaymentMethodAdded: Ref<boolean, boolean>;
|
|
62
|
-
paymentMethodResponse: Ref<
|
|
84
|
+
paymentMethodResponse: Ref<unknown, unknown>;
|
|
63
85
|
working: Ref<boolean, boolean>;
|
|
64
86
|
isMerchantActive: ComputedRef<boolean>;
|
|
65
|
-
errorMessage: Ref<
|
|
87
|
+
errorMessage: Ref<unknown, unknown>;
|
|
66
88
|
isBillingAddressMode: Ref<boolean, boolean>;
|
|
67
89
|
name: string;
|
|
68
90
|
streetAddress: string;
|
|
@@ -71,10 +93,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
71
93
|
postalCode: string;
|
|
72
94
|
country: string;
|
|
73
95
|
isAddressEditable: boolean;
|
|
96
|
+
cardNumber: ComputedRef<string>;
|
|
97
|
+
nameOnCard: ComputedRef<string>;
|
|
98
|
+
expiration: ComputedRef<string>;
|
|
99
|
+
cvv: ComputedRef<string>;
|
|
74
100
|
variant: string;
|
|
75
|
-
submitLabel:
|
|
76
|
-
handleSuccess: (event:
|
|
77
|
-
handleError: (error:
|
|
101
|
+
submitLabel: any;
|
|
102
|
+
handleSuccess: (event: unknown) => void;
|
|
103
|
+
handleError: (error: unknown) => void;
|
|
78
104
|
apiBaseUrl: string;
|
|
79
105
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("error" | "success")[], "error" | "success", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
80
106
|
demoMode: {
|
|
@@ -112,6 +138,22 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
112
138
|
type: StringConstructor;
|
|
113
139
|
required: false;
|
|
114
140
|
};
|
|
141
|
+
cardNumber: {
|
|
142
|
+
type: StringConstructor;
|
|
143
|
+
required: false;
|
|
144
|
+
};
|
|
145
|
+
nameOnCard: {
|
|
146
|
+
type: StringConstructor;
|
|
147
|
+
required: false;
|
|
148
|
+
};
|
|
149
|
+
expiration: {
|
|
150
|
+
type: StringConstructor;
|
|
151
|
+
required: false;
|
|
152
|
+
};
|
|
153
|
+
cvv: {
|
|
154
|
+
type: StringConstructor;
|
|
155
|
+
required: false;
|
|
156
|
+
};
|
|
115
157
|
variant: {
|
|
116
158
|
type: StringConstructor;
|
|
117
159
|
required: false;
|
|
@@ -125,7 +167,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
125
167
|
submitLabel: {
|
|
126
168
|
type: StringConstructor;
|
|
127
169
|
required: false;
|
|
128
|
-
default:
|
|
170
|
+
default: any;
|
|
129
171
|
};
|
|
130
172
|
}>> & Readonly<{
|
|
131
173
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -10,7 +10,7 @@ declare global {
|
|
|
10
10
|
interface Window {
|
|
11
11
|
__AUTHVIA_DEPENDENCY_REGISTRY__?: DependencyRegistry;
|
|
12
12
|
__AUTHVIA_WEB_COMPONENT_CSS__?: string;
|
|
13
|
-
/** Set by @authvia/
|
|
13
|
+
/** Set by @authvia/address-create plugin when used in web component build */
|
|
14
14
|
__AUTHVIA_VUE_PLUGIN_CSS__?: string;
|
|
15
15
|
Vue?: VueRuntime;
|
|
16
16
|
}
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create a font-based MDI iconset that ALWAYS returns icon names as strings.
|
|
3
|
+
* This forces Vuetify to use font mode (CSS classes) instead of SVG mode.
|
|
4
|
+
*
|
|
5
|
+
* CRITICAL: We do NOT import 'mdi' from 'vuetify/iconsets/mdi' because
|
|
6
|
+
* that iconset automatically detects font availability and adds a 'component'
|
|
7
|
+
* property when fonts aren't detected (which happens in Shadow DOM).
|
|
8
|
+
*
|
|
9
|
+
* By creating our own iconset with only strings and NO 'component' property,
|
|
10
|
+
* we force Vuetify to always use font mode.
|
|
11
|
+
*/
|
|
12
|
+
export declare const createFontMdiIconset: () => any;
|
|
1
13
|
export declare const createVuetifyInstance: () => {
|
|
2
14
|
install: (app: import('vue').App<any>) => void;
|
|
3
15
|
unmount: () => void;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,10 +1,50 @@
|
|
|
1
1
|
import { PaymentMethodType } from '../model';
|
|
2
|
+
export interface PaymentMethodDisplayText {
|
|
3
|
+
title?: string;
|
|
4
|
+
subtitle?: string;
|
|
5
|
+
order?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface PaymentMethodDisplayConfigMap {
|
|
8
|
+
ach?: PaymentMethodDisplayText;
|
|
9
|
+
card?: PaymentMethodDisplayText;
|
|
10
|
+
paypal?: PaymentMethodDisplayText;
|
|
11
|
+
paze?: PaymentMethodDisplayText;
|
|
12
|
+
venmo?: PaymentMethodDisplayText;
|
|
13
|
+
}
|
|
14
|
+
export interface TermsLinkConfig {
|
|
15
|
+
show?: boolean;
|
|
16
|
+
text?: string;
|
|
17
|
+
href?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface TermsConfig {
|
|
20
|
+
privacyPolicy?: TermsLinkConfig;
|
|
21
|
+
termsOfService?: TermsLinkConfig;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Object shape when the `paypal` prop is a config object (not boolean `true`).
|
|
25
|
+
*/
|
|
26
|
+
export type PayPalConfig = {
|
|
27
|
+
merchantId: string;
|
|
28
|
+
clientId: string;
|
|
29
|
+
redirectUrl?: string;
|
|
30
|
+
};
|
|
31
|
+
/** Allowed values for Vuetify 3 `v-text-field` / field `variant` (shared across payment method components). */
|
|
32
|
+
export declare const VUETIFY_FIELD_VARIANTS: readonly ["outlined", "plain", "underlined", "filled", "solo", "solo-filled", "solo-inverted"];
|
|
33
|
+
export type VuetifyFieldVariant = (typeof VUETIFY_FIELD_VARIANTS)[number];
|
|
34
|
+
/** Alias for {@link VuetifyFieldVariant}. */
|
|
35
|
+
export type Variant = VuetifyFieldVariant;
|
|
2
36
|
export interface AuthviaPaymentMethodFormProps {
|
|
3
37
|
token?: string;
|
|
4
38
|
merchantId?: string;
|
|
5
39
|
card?: {
|
|
6
40
|
allow?: boolean;
|
|
7
41
|
demoMode?: boolean;
|
|
42
|
+
title?: string;
|
|
43
|
+
subtitle?: string;
|
|
44
|
+
submitBtnText?: string;
|
|
45
|
+
cardNumber?: string;
|
|
46
|
+
expiration?: string;
|
|
47
|
+
cvv?: string;
|
|
8
48
|
nameOnCard?: string;
|
|
9
49
|
streetAddress?: string;
|
|
10
50
|
city?: string;
|
|
@@ -16,6 +56,9 @@ export interface AuthviaPaymentMethodFormProps {
|
|
|
16
56
|
demoMode?: boolean;
|
|
17
57
|
/** When true, show the "Use your online credentials" (Plaid) option for ACH. */
|
|
18
58
|
online?: boolean;
|
|
59
|
+
title?: string;
|
|
60
|
+
subtitle?: string;
|
|
61
|
+
submitBtnText?: string;
|
|
19
62
|
nameOnAccount?: string;
|
|
20
63
|
routingNumber?: string;
|
|
21
64
|
accountNumber?: string;
|
|
@@ -25,12 +68,8 @@ export interface AuthviaPaymentMethodFormProps {
|
|
|
25
68
|
country?: string;
|
|
26
69
|
postalCode?: string;
|
|
27
70
|
};
|
|
28
|
-
paypal?:
|
|
29
|
-
|
|
30
|
-
merchantId: string;
|
|
31
|
-
clientId: string;
|
|
32
|
-
redirectUrl: string;
|
|
33
|
-
};
|
|
71
|
+
paypal?: boolean | PayPalConfig;
|
|
72
|
+
venmo?: boolean;
|
|
34
73
|
paze?: {
|
|
35
74
|
amount?: string;
|
|
36
75
|
clientId?: string;
|
|
@@ -43,6 +82,8 @@ export interface AuthviaPaymentMethodFormProps {
|
|
|
43
82
|
variant?: VuetifyProps['variant'];
|
|
44
83
|
color?: string;
|
|
45
84
|
borderRadius?: string;
|
|
85
|
+
paymentMethodDisplay?: PaymentMethodDisplayConfigMap;
|
|
86
|
+
terms?: TermsConfig;
|
|
46
87
|
forgetHidden?: boolean | string;
|
|
47
88
|
forgetDefault?: boolean | string;
|
|
48
89
|
primaryColor?: string;
|
|
@@ -66,8 +107,8 @@ export interface VuetifyProps {
|
|
|
66
107
|
success?: string;
|
|
67
108
|
};
|
|
68
109
|
density?: 'default' | 'compact' | 'comfortable';
|
|
69
|
-
variant?:
|
|
70
|
-
textVariant?:
|
|
110
|
+
variant?: VuetifyFieldVariant;
|
|
111
|
+
textVariant?: VuetifyFieldVariant;
|
|
71
112
|
spacing?: {
|
|
72
113
|
inputGap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
73
114
|
rowGap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const ACH_ROUTING_MAX_LENGTH: number;
|
|
2
|
+
export declare const ACH_ACCOUNT_MAX_LENGTH: number;
|
|
3
|
+
export declare const ACH_NAME_MAX_LENGTH: number;
|
|
4
|
+
export declare const ACH_NAME_MIN_LENGTH: number;
|
|
5
|
+
export declare const ACH_VALIDATION_MESSAGES: {
|
|
6
|
+
readonly routingRequired: "Routing number cannot be blank";
|
|
7
|
+
readonly routingInvalid: "Routing number is invalid";
|
|
8
|
+
readonly accountRequired: "Account number cannot be blank";
|
|
9
|
+
readonly accountInvalid: "Account number is invalid";
|
|
10
|
+
readonly nameRequired: "Account holder name cannot be blank";
|
|
11
|
+
readonly nameInvalid: "Account holder name is not valid; enter your full name and do not use special characters.";
|
|
12
|
+
};
|
|
13
|
+
export declare const normalizeAchTextValue: (value: unknown) => string;
|
|
14
|
+
export declare const sanitizeAchDigits: (value: unknown, maxLength: number) => string;
|
|
15
|
+
export declare const sanitizeAchName: (value: unknown, maxLength?: number) => string;
|
|
16
|
+
export declare const isValidAchRoutingNumber: (value: string) => boolean;
|
|
17
|
+
export declare const isValidAchAccountNumber: (value: string) => boolean;
|
|
18
|
+
export declare const isValidAchFullName: (value: string) => boolean;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -12,8 +12,6 @@ export declare const truncateString: (str: string, limit: number) => string;
|
|
|
12
12
|
* @returns cardholder truncated name
|
|
13
13
|
*/
|
|
14
14
|
export declare const cardHolderName: (name: string) => string;
|
|
15
|
-
export declare const getBrandImg: (brand: string) => string;
|
|
16
|
-
export declare const getPaymentMethodIcon: (method: any) => string;
|
|
17
15
|
export declare function hasPaymentMethodsReadScope(token: string | undefined): boolean;
|
|
18
16
|
/**
|
|
19
17
|
* Resolves a theme color for legacy callers. Prefer setting `color` / `fill` via CSS (`--avwc-color`) instead.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validate payout email input (delegates to shared {@link isValidEmailAddress} on trimmed value).
|
|
3
|
+
*/
|
|
4
|
+
export declare const isValidEmail: (value: string) => boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Validate payout phone input with common US formats (uses shared phone patterns from utils).
|
|
7
|
+
*/
|
|
8
|
+
export declare const isValidPhone: (value: string) => boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Validate payout handle input (strips leading @ then uses shared {@link isValidHandle}).
|
|
11
|
+
*/
|
|
12
|
+
export declare const isValidPayoutHandle: (value: string) => boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Strip separators and normalize to 10-digit US number when possible.
|
|
15
|
+
*/
|
|
16
|
+
export declare const normalizeUsPhone: (value: string) => string;
|
|
17
|
+
/**
|
|
18
|
+
* Format as (XXX) XXX-XXXX when possible (delegates to shared {@link mobileNumberFormat}).
|
|
19
|
+
*/
|
|
20
|
+
export declare const formatPhone: (value: string) => string;
|
|
21
|
+
/**
|
|
22
|
+
* Formats US phone while typing, e.g. (981) 828-7032.
|
|
23
|
+
* Keeps partial state as digits are entered (used by tests; progressive UX if wired later).
|
|
24
|
+
*/
|
|
25
|
+
export declare const formatPhoneTyping: (value: string) => string;
|