@authvia/payment-method-create 0.1.1 → 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 +4 -8
- package/dist/components/internal/AuthviaPaymentMethodAddAch.vue.d.ts +2 -3
- package/dist/components/internal/AuthviaPaymentMethodAddPayoutsPayPal.vue.d.ts +48 -0
- package/dist/types/index.d.ts +17 -8
- 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 +1 -1
|
@@ -15,19 +15,15 @@ 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;
|
|
@@ -43,12 +39,12 @@ declare const _default: import('vue').DefineComponent<Props, {
|
|
|
43
39
|
country?: string;
|
|
44
40
|
postalCode?: string;
|
|
45
41
|
};
|
|
42
|
+
venmo: boolean;
|
|
46
43
|
color: string;
|
|
47
44
|
forgetDefault: boolean | string;
|
|
48
45
|
customerRef: string;
|
|
49
46
|
token: string;
|
|
50
47
|
borderRadius: string;
|
|
51
|
-
merchantId: string;
|
|
52
48
|
forgetHidden: boolean | string;
|
|
53
49
|
intent: string;
|
|
54
50
|
restrictions: PaymentMethodRestrictions[];
|
|
@@ -14,7 +14,6 @@ export interface P_ACHValues {
|
|
|
14
14
|
}
|
|
15
15
|
type AchFieldKey = 'routingNumber' | 'accountNumber' | 'nameOnAccount';
|
|
16
16
|
type ValidationRule = (value: unknown) => true | string;
|
|
17
|
-
type VuetifyFieldVariant = 'outlined' | 'plain' | 'underlined' | 'filled' | 'solo' | 'solo-filled' | 'solo-inverted';
|
|
18
17
|
export interface Props {
|
|
19
18
|
demoMode?: boolean;
|
|
20
19
|
submitBtnText?: string;
|
|
@@ -94,8 +93,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
94
93
|
savings: string;
|
|
95
94
|
checking: string;
|
|
96
95
|
};
|
|
97
|
-
fieldVariant: ComputedRef<
|
|
98
|
-
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">;
|
|
99
98
|
formData: P_ACHValues;
|
|
100
99
|
isWorking: Ref<boolean, boolean>;
|
|
101
100
|
isFormValid: ComputedRef<boolean>;
|
|
@@ -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;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -20,6 +20,19 @@ export interface TermsConfig {
|
|
|
20
20
|
privacyPolicy?: TermsLinkConfig;
|
|
21
21
|
termsOfService?: TermsLinkConfig;
|
|
22
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;
|
|
23
36
|
export interface AuthviaPaymentMethodFormProps {
|
|
24
37
|
token?: string;
|
|
25
38
|
merchantId?: string;
|
|
@@ -55,12 +68,8 @@ export interface AuthviaPaymentMethodFormProps {
|
|
|
55
68
|
country?: string;
|
|
56
69
|
postalCode?: string;
|
|
57
70
|
};
|
|
58
|
-
paypal?:
|
|
59
|
-
|
|
60
|
-
merchantId: string;
|
|
61
|
-
clientId: string;
|
|
62
|
-
redirectUrl: string;
|
|
63
|
-
};
|
|
71
|
+
paypal?: boolean | PayPalConfig;
|
|
72
|
+
venmo?: boolean;
|
|
64
73
|
paze?: {
|
|
65
74
|
amount?: string;
|
|
66
75
|
clientId?: string;
|
|
@@ -98,8 +107,8 @@ export interface VuetifyProps {
|
|
|
98
107
|
success?: string;
|
|
99
108
|
};
|
|
100
109
|
density?: 'default' | 'compact' | 'comfortable';
|
|
101
|
-
variant?:
|
|
102
|
-
textVariant?:
|
|
110
|
+
variant?: VuetifyFieldVariant;
|
|
111
|
+
textVariant?: VuetifyFieldVariant;
|
|
103
112
|
spacing?: {
|
|
104
113
|
inputGap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
105
114
|
rowGap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
@@ -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;
|