@authvia/payment-method-create 0.1.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/README.md +336 -0
- package/dist/components/AuthviaPaymentMethodForm.vue.d.ts +65 -0
- package/dist/components/icons/authvia-wallet-svg-icon.vue.d.ts +30 -0
- package/dist/components/internal/AuthviaForgotCardOption.vue.d.ts +11 -0
- package/dist/components/internal/AuthviaFormWithTerms.vue.d.ts +2 -0
- package/dist/components/internal/AuthviaPaymentMethodAddAch.vue.d.ts +187 -0
- package/dist/components/internal/AuthviaPaymentMethodAddAchOnline.vue.d.ts +25 -0
- package/dist/components/internal/AuthviaPaymentMethodAddAchOptions.vue.d.ts +42 -0
- package/dist/components/internal/AuthviaPaymentMethodCard.vue.d.ts +22 -0
- package/dist/components/internal/AuthviaPaymentMethodCreditCard.vue.d.ts +142 -0
- package/dist/components/internal/AuthviaPaymentMethodRestrictions.vue.d.ts +41 -0
- package/dist/components/internal/AuthviaPazeForm.vue.d.ts +48 -0
- package/dist/components/internal/AuthviaPciFooter.vue.d.ts +5 -0
- package/dist/composables/useHostService.d.ts +22 -0
- package/dist/composables/usePaymentMethodService.d.ts +34 -0
- package/dist/composables/usePazeSDK.d.ts +21 -0
- package/dist/composables/useWalletMerchantService.d.ts +15 -0
- package/dist/composables/useWalletTokenService.d.ts +16 -0
- package/dist/entry/index.d.ts +13 -0
- package/dist/entry/web-component.d.ts +92 -0
- package/dist/model/APIOptions.d.ts +3 -0
- package/dist/model/Contact.d.ts +8 -0
- package/dist/model/Merchant.d.ts +8 -0
- package/dist/model/MerchantProductSummary.d.ts +6 -0
- package/dist/model/MerchantProfile.d.ts +22 -0
- package/dist/model/MerchantTheme.d.ts +5 -0
- package/dist/model/PaymentMethod.d.ts +65 -0
- package/dist/model/PaymentMethodAPIError.d.ts +18 -0
- package/dist/model/PaymentMethodBillingAddress.d.ts +15 -0
- package/dist/model/PaymentMethodFilters.d.ts +4 -0
- package/dist/model/TokenGrants.d.ts +14 -0
- package/dist/model/index.d.ts +11 -0
- package/dist/plugins/vuetify-base.d.ts +169 -0
- package/dist/svg/index.d.ts +22 -0
- package/dist/types/index.d.ts +197 -0
- package/dist/utils/apiBaseUrl.d.ts +7 -0
- package/dist/utils/config.d.ts +40 -0
- package/dist/utils/errors.d.ts +32 -0
- package/dist/utils/index.d.ts +69 -0
- package/dist/utils/logger.d.ts +6 -0
- package/dist/utils/spacing.d.ts +39 -0
- package/dist/utils/tokenUtils.d.ts +43 -0
- package/dist/vue-plugin.d.ts +6 -0
- package/dist/vue-plugin.js +2 -0
- package/dist/vue-plugin.umd.cjs +2 -0
- package/dist/walletConstants.d.ts +8 -0
- package/package.json +136 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
|
+
showConfirmLoader: {
|
|
4
|
+
type: BooleanConstructor;
|
|
5
|
+
default: boolean;
|
|
6
|
+
};
|
|
7
|
+
errorMessage: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
required: false;
|
|
10
|
+
};
|
|
11
|
+
isPlaidVisible: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
}>, {
|
|
16
|
+
closePaymentMethodForms: () => void;
|
|
17
|
+
handleContinue: () => void;
|
|
18
|
+
formData: {
|
|
19
|
+
achOption: string;
|
|
20
|
+
};
|
|
21
|
+
isWorking: Ref<boolean, boolean>;
|
|
22
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("close-ach-options" | "ach-option-select")[], "close-ach-options" | "ach-option-select", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
23
|
+
showConfirmLoader: {
|
|
24
|
+
type: BooleanConstructor;
|
|
25
|
+
default: boolean;
|
|
26
|
+
};
|
|
27
|
+
errorMessage: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
required: false;
|
|
30
|
+
};
|
|
31
|
+
isPlaidVisible: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
}>> & Readonly<{
|
|
36
|
+
"onClose-ach-options"?: ((...args: any[]) => any) | undefined;
|
|
37
|
+
"onAch-option-select"?: ((...args: any[]) => any) | undefined;
|
|
38
|
+
}>, {
|
|
39
|
+
isPlaidVisible: boolean;
|
|
40
|
+
showConfirmLoader: boolean;
|
|
41
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
42
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PaymentMethodLogo } from '../../types';
|
|
2
|
+
export interface Props {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
logo?: PaymentMethodLogo;
|
|
7
|
+
/** Common size for logo slot (all methods use same box) */
|
|
8
|
+
logoSize?: number;
|
|
9
|
+
/** Size of SVG path icon inside slot */
|
|
10
|
+
iconSize?: number;
|
|
11
|
+
error?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
+
click: () => any;
|
|
15
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
16
|
+
onClick?: (() => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
logoSize: number;
|
|
20
|
+
iconSize: number;
|
|
21
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { ComputedRef, PropType, Ref } from 'vue';
|
|
2
|
+
import { PaymentMethodBillingAddress } from '../../model';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
demoMode: {
|
|
5
|
+
type: BooleanConstructor;
|
|
6
|
+
default: boolean;
|
|
7
|
+
};
|
|
8
|
+
borderRadius: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
required: false;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
merchantId: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
};
|
|
16
|
+
forgetHidden: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
forgetDefault: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
authToken: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
customerRef: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
};
|
|
31
|
+
billingAddress: {
|
|
32
|
+
type: PropType<PaymentMethodBillingAddress>;
|
|
33
|
+
required: false;
|
|
34
|
+
};
|
|
35
|
+
intent: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
required: false;
|
|
38
|
+
};
|
|
39
|
+
variant: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
required: false;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
color: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
required: false;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
submitLabel: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
required: false;
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
54
|
+
}>, {
|
|
55
|
+
squelch: boolean;
|
|
56
|
+
token: string;
|
|
57
|
+
prefill: Ref<any, any>;
|
|
58
|
+
inDemoMode: Ref<boolean, boolean>;
|
|
59
|
+
isFormReady: Ref<boolean, boolean>;
|
|
60
|
+
isFormSubmit: Ref<boolean, boolean>;
|
|
61
|
+
isPaymentMethodAdded: Ref<boolean, boolean>;
|
|
62
|
+
paymentMethodResponse: Ref<any, any>;
|
|
63
|
+
working: Ref<boolean, boolean>;
|
|
64
|
+
isMerchantActive: ComputedRef<boolean>;
|
|
65
|
+
errorMessage: Ref<any, any>;
|
|
66
|
+
isBillingAddressMode: Ref<boolean, boolean>;
|
|
67
|
+
name: string;
|
|
68
|
+
streetAddress: string;
|
|
69
|
+
city: string;
|
|
70
|
+
state: string;
|
|
71
|
+
postalCode: string;
|
|
72
|
+
country: string;
|
|
73
|
+
isAddressEditable: boolean;
|
|
74
|
+
variant: string;
|
|
75
|
+
submitLabel: string;
|
|
76
|
+
handleSuccess: (event: any) => void;
|
|
77
|
+
handleError: (error: any) => void;
|
|
78
|
+
apiBaseUrl: string;
|
|
79
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("error" | "success")[], "error" | "success", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
80
|
+
demoMode: {
|
|
81
|
+
type: BooleanConstructor;
|
|
82
|
+
default: boolean;
|
|
83
|
+
};
|
|
84
|
+
borderRadius: {
|
|
85
|
+
type: StringConstructor;
|
|
86
|
+
required: false;
|
|
87
|
+
default: string;
|
|
88
|
+
};
|
|
89
|
+
merchantId: {
|
|
90
|
+
type: StringConstructor;
|
|
91
|
+
};
|
|
92
|
+
forgetHidden: {
|
|
93
|
+
type: BooleanConstructor;
|
|
94
|
+
default: boolean;
|
|
95
|
+
};
|
|
96
|
+
forgetDefault: {
|
|
97
|
+
type: BooleanConstructor;
|
|
98
|
+
default: boolean;
|
|
99
|
+
};
|
|
100
|
+
authToken: {
|
|
101
|
+
type: StringConstructor;
|
|
102
|
+
required: true;
|
|
103
|
+
};
|
|
104
|
+
customerRef: {
|
|
105
|
+
type: StringConstructor;
|
|
106
|
+
};
|
|
107
|
+
billingAddress: {
|
|
108
|
+
type: PropType<PaymentMethodBillingAddress>;
|
|
109
|
+
required: false;
|
|
110
|
+
};
|
|
111
|
+
intent: {
|
|
112
|
+
type: StringConstructor;
|
|
113
|
+
required: false;
|
|
114
|
+
};
|
|
115
|
+
variant: {
|
|
116
|
+
type: StringConstructor;
|
|
117
|
+
required: false;
|
|
118
|
+
default: string;
|
|
119
|
+
};
|
|
120
|
+
color: {
|
|
121
|
+
type: StringConstructor;
|
|
122
|
+
required: false;
|
|
123
|
+
default: string;
|
|
124
|
+
};
|
|
125
|
+
submitLabel: {
|
|
126
|
+
type: StringConstructor;
|
|
127
|
+
required: false;
|
|
128
|
+
default: string;
|
|
129
|
+
};
|
|
130
|
+
}>> & Readonly<{
|
|
131
|
+
onError?: ((...args: any[]) => any) | undefined;
|
|
132
|
+
onSuccess?: ((...args: any[]) => any) | undefined;
|
|
133
|
+
}>, {
|
|
134
|
+
variant: string;
|
|
135
|
+
color: string;
|
|
136
|
+
forgetDefault: boolean;
|
|
137
|
+
demoMode: boolean;
|
|
138
|
+
borderRadius: string;
|
|
139
|
+
forgetHidden: boolean;
|
|
140
|
+
submitLabel: string;
|
|
141
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
142
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
|
+
paymentMethodRestrictions: {
|
|
4
|
+
type: {
|
|
5
|
+
(arrayLength: number): string[];
|
|
6
|
+
(...items: string[]): string[];
|
|
7
|
+
new (arrayLength: number): string[];
|
|
8
|
+
new (...items: string[]): string[];
|
|
9
|
+
isArray(arg: any): arg is any[];
|
|
10
|
+
readonly prototype: any[];
|
|
11
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
12
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
13
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
14
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
15
|
+
of<T>(...items: T[]): T[];
|
|
16
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
17
|
+
};
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
}>, {
|
|
21
|
+
isShowRestrictions: Ref<boolean, boolean>;
|
|
22
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
23
|
+
paymentMethodRestrictions: {
|
|
24
|
+
type: {
|
|
25
|
+
(arrayLength: number): string[];
|
|
26
|
+
(...items: string[]): string[];
|
|
27
|
+
new (arrayLength: number): string[];
|
|
28
|
+
new (...items: string[]): string[];
|
|
29
|
+
isArray(arg: any): arg is any[];
|
|
30
|
+
readonly prototype: any[];
|
|
31
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
32
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
33
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
34
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
35
|
+
of<T>(...items: T[]): T[];
|
|
36
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
37
|
+
};
|
|
38
|
+
required: true;
|
|
39
|
+
};
|
|
40
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
41
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export interface Props {
|
|
2
|
+
pzSettings?: {
|
|
3
|
+
clientId?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
profileId?: string;
|
|
6
|
+
};
|
|
7
|
+
amount?: number;
|
|
8
|
+
authToken?: string;
|
|
9
|
+
customerRef?: string;
|
|
10
|
+
autoStart?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare global {
|
|
13
|
+
interface Window {
|
|
14
|
+
DIGITAL_WALLET_SDK?: any;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
declare const _default: import('vue').DefineComponent<Props, {
|
|
18
|
+
startPaze: () => Promise<void>;
|
|
19
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
+
error: (error: {
|
|
21
|
+
message: string;
|
|
22
|
+
}) => any;
|
|
23
|
+
success: (paymentMethodId: string | {
|
|
24
|
+
id: string;
|
|
25
|
+
forgetCard?: boolean;
|
|
26
|
+
}) => any;
|
|
27
|
+
cancel: () => any;
|
|
28
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
29
|
+
onError?: ((error: {
|
|
30
|
+
message: string;
|
|
31
|
+
}) => any) | undefined;
|
|
32
|
+
onSuccess?: ((paymentMethodId: string | {
|
|
33
|
+
id: string;
|
|
34
|
+
forgetCard?: boolean;
|
|
35
|
+
}) => any) | undefined;
|
|
36
|
+
onCancel?: (() => any) | undefined;
|
|
37
|
+
}>, {
|
|
38
|
+
pzSettings: {
|
|
39
|
+
clientId?: string;
|
|
40
|
+
name?: string;
|
|
41
|
+
profileId?: string;
|
|
42
|
+
};
|
|
43
|
+
amount: number;
|
|
44
|
+
authToken: string;
|
|
45
|
+
customerRef: string;
|
|
46
|
+
autoStart: boolean;
|
|
47
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
48
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {
|
|
2
|
+
pciLogo: string;
|
|
3
|
+
tlsSecureLogo: string;
|
|
4
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return type for useHostService composable
|
|
3
|
+
* Compatible with original HostService.instance() API
|
|
4
|
+
*/
|
|
5
|
+
export interface UseHostServiceReturn {
|
|
6
|
+
cdn: string;
|
|
7
|
+
api: string;
|
|
8
|
+
googleAPIKey: string;
|
|
9
|
+
isPlaidVisible: boolean;
|
|
10
|
+
pazeSDKURL: string;
|
|
11
|
+
plaidEnv: string;
|
|
12
|
+
paypalSDKURL: string;
|
|
13
|
+
paypalClientId: string;
|
|
14
|
+
paypalEnvironment: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Host Service Composable
|
|
18
|
+
* Provides host configuration management without singleton class dependency
|
|
19
|
+
* Maintains singleton behavior through module-level state
|
|
20
|
+
* Compatible with original HostService.instance() API
|
|
21
|
+
*/
|
|
22
|
+
export declare function useHostService(): UseHostServiceReturn;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { PaymentMethod, APIOptions, PaymentMethodFilters, Token, PayPalSetupTokenResponse, PayPalIDTokenResponse } from '../model';
|
|
3
|
+
import { useWalletMerchantService } from './useWalletMerchantService';
|
|
4
|
+
/**
|
|
5
|
+
* Return type for usePaymentMethodService composable
|
|
6
|
+
*/
|
|
7
|
+
export interface UsePaymentMethodServiceReturn {
|
|
8
|
+
paymentMethod: Ref<PaymentMethod | undefined>;
|
|
9
|
+
all: Ref<PaymentMethod[] | undefined>;
|
|
10
|
+
options: Ref<PaymentMethod[]>;
|
|
11
|
+
filters: Ref<PaymentMethodFilters | undefined>;
|
|
12
|
+
permission: Ref<'use' | 'single-use' | undefined>;
|
|
13
|
+
setActivePaymentMethod: (paymentMethod: PaymentMethod | undefined) => void;
|
|
14
|
+
setActivePermission: (permission: 'use' | 'single-use' | undefined) => void;
|
|
15
|
+
resetPermission: () => void;
|
|
16
|
+
list: (userId: string, options: APIOptions) => Promise<PaymentMethod[]>;
|
|
17
|
+
create: (userId: string, paymentMethod: PaymentMethod, options: APIOptions, squelch?: boolean, customHeaders?: {
|
|
18
|
+
'x-avid'?: string;
|
|
19
|
+
'x-ref'?: string;
|
|
20
|
+
'x-intent'?: string;
|
|
21
|
+
}) => Promise<PaymentMethod>;
|
|
22
|
+
delete: (userId: string, options: APIOptions) => Promise<void>;
|
|
23
|
+
get: (options: APIOptions, paymentMethodId: string) => Promise<PaymentMethod>;
|
|
24
|
+
generatePlaidToken: (userId: string, options: APIOptions) => Promise<Token>;
|
|
25
|
+
filter: (filters: PaymentMethodFilters, userId: string, options: APIOptions, merchantService?: ReturnType<typeof useWalletMerchantService>) => Promise<void>;
|
|
26
|
+
generatePaypalIDToken: (options: APIOptions) => Promise<PayPalIDTokenResponse>;
|
|
27
|
+
getReturnUrl: () => string;
|
|
28
|
+
generatePaypalSetupToken: (options: APIOptions, paymentSourceType: string) => Promise<PayPalSetupTokenResponse>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Payment Method Service Composable
|
|
32
|
+
* Provides payment method management functionality
|
|
33
|
+
*/
|
|
34
|
+
export declare function usePaymentMethodService(): UsePaymentMethodServiceReturn;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Composable for Paze SDK initialization and management
|
|
4
|
+
* Provides a shared instance that can be used across components
|
|
5
|
+
*/
|
|
6
|
+
export declare function usePazeSDK(): {
|
|
7
|
+
initPaze: (clientConfig?: {
|
|
8
|
+
clientId?: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
profileId?: string;
|
|
11
|
+
}) => Promise<any>;
|
|
12
|
+
getPazeInstance: () => any;
|
|
13
|
+
resetPazeInstance: () => void;
|
|
14
|
+
isLoading: Ref<boolean, boolean>;
|
|
15
|
+
error: Ref<string, string>;
|
|
16
|
+
};
|
|
17
|
+
declare global {
|
|
18
|
+
interface Window {
|
|
19
|
+
DIGITAL_WALLET_SDK?: any;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Ref, ComputedRef } from 'vue';
|
|
2
|
+
import { Merchant } from '../model';
|
|
3
|
+
/**
|
|
4
|
+
* Return type for useWalletMerchantService composable
|
|
5
|
+
*/
|
|
6
|
+
export interface UseWalletMerchantServiceReturn {
|
|
7
|
+
merchant: Ref<Merchant | undefined>;
|
|
8
|
+
tenderTypes: ComputedRef<string[] | undefined>;
|
|
9
|
+
setActiveMerchant: (merchant: Merchant | undefined) => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Wallet Merchant Service Composable
|
|
13
|
+
* Provides merchant management functionality
|
|
14
|
+
*/
|
|
15
|
+
export declare function useWalletMerchantService(): UseWalletMerchantServiceReturn;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { TokenGrants } from '../model/TokenGrants';
|
|
3
|
+
/**
|
|
4
|
+
* Return type for useWalletTokenService composable
|
|
5
|
+
*/
|
|
6
|
+
export interface UseWalletTokenServiceReturn {
|
|
7
|
+
token: Ref<string | undefined>;
|
|
8
|
+
setActiveToken: (token: string) => void;
|
|
9
|
+
parse: (token: string) => TokenGrants;
|
|
10
|
+
isExpired: (token: string) => boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Wallet Token Service Composable
|
|
14
|
+
* Provides token management functionality
|
|
15
|
+
*/
|
|
16
|
+
export declare function useWalletTokenService(): UseWalletTokenServiceReturn;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as AuthviaPaymentMethodForm } from '../components/AuthviaPaymentMethodForm.vue';
|
|
3
|
+
declare const AuthviaPaymentMethodFormPlugin: {
|
|
4
|
+
install: (app: App) => void;
|
|
5
|
+
};
|
|
6
|
+
export default AuthviaPaymentMethodFormPlugin;
|
|
7
|
+
export { AuthviaPaymentMethodFormPlugin };
|
|
8
|
+
export { AuthviaPaymentMethodForm };
|
|
9
|
+
export type { AuthviaPaymentMethodFormProps, PaymentMethodFormData, VuetifyProps, SubmitEvent, SuccessEvent, ErrorEvent, PaymentMethodResponse, ValidationError, AVError } from '../types';
|
|
10
|
+
export { ErrorHandler, ErrorCodes } from '../utils/errors';
|
|
11
|
+
export { config, getApiEndpoint, getCdnUrl, isDevelopment, isProduction } from '../utils/config';
|
|
12
|
+
export { getInputSpacingClasses, getSpacingCSSVariables } from '../utils/spacing';
|
|
13
|
+
export { usePaymentMethodService } from '../composables/usePaymentMethodService';
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { AuthviaPaymentMethodFormProps } from '../types';
|
|
2
|
+
type VueRuntime = typeof import('vue');
|
|
3
|
+
type DependencyKey = 'vue-runtime' | 'vuetify-css' | 'mdi-css';
|
|
4
|
+
type DependencyRegistry = Record<Extract<DependencyKey, 'vuetify-css' | 'mdi-css'>, {
|
|
5
|
+
status: 'pending' | 'ready' | 'missing';
|
|
6
|
+
href?: string;
|
|
7
|
+
version?: string;
|
|
8
|
+
}>;
|
|
9
|
+
declare global {
|
|
10
|
+
interface Window {
|
|
11
|
+
__AUTHVIA_DEPENDENCY_REGISTRY__?: DependencyRegistry;
|
|
12
|
+
__AUTHVIA_WEB_COMPONENT_CSS__?: string;
|
|
13
|
+
/** Set by @authvia/customer-add-physical-address plugin when used in web component build */
|
|
14
|
+
__AUTHVIA_VUE_PLUGIN_CSS__?: string;
|
|
15
|
+
Vue?: VueRuntime;
|
|
16
|
+
}
|
|
17
|
+
interface GlobalThis {
|
|
18
|
+
Vue?: VueRuntime;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
declare class AuthviaPaymentMethodFormElement extends HTMLElement {
|
|
22
|
+
private app;
|
|
23
|
+
private shadow;
|
|
24
|
+
private container;
|
|
25
|
+
private vuetify;
|
|
26
|
+
private vueRuntime;
|
|
27
|
+
private dependencyObservers;
|
|
28
|
+
private readonly bundledMdiUrl;
|
|
29
|
+
private readonly hasBundledMdi;
|
|
30
|
+
constructor();
|
|
31
|
+
/**
|
|
32
|
+
* Copy CSS variables from document :root and host's ancestors to host element.
|
|
33
|
+
* This ensures demo/parent CSS variables are available inside Shadow DOM.
|
|
34
|
+
*/
|
|
35
|
+
private copyCssVariablesFromRoot;
|
|
36
|
+
private initializeComponent;
|
|
37
|
+
private mountComponent;
|
|
38
|
+
private ensureDependencies;
|
|
39
|
+
private getAttributeValue;
|
|
40
|
+
/**
|
|
41
|
+
* Dialog overlays mount under {@link AuthviaPaymentMethodFormElement.container}, a sibling of the
|
|
42
|
+
* Vue form root, so they do not inherit inline --avwc-* from the inner div. Mirror theme tokens here.
|
|
43
|
+
*/
|
|
44
|
+
private syncContainerThemeTokens;
|
|
45
|
+
private getComponentProps;
|
|
46
|
+
private dispatchCustomEvent;
|
|
47
|
+
static get observedAttributes(): string[];
|
|
48
|
+
connectedCallback(): void;
|
|
49
|
+
disconnectedCallback(): void;
|
|
50
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
51
|
+
private injectVuetifyOverrideStyles;
|
|
52
|
+
private getVuetifyOverrideCss;
|
|
53
|
+
private injectComponentStyles;
|
|
54
|
+
/**
|
|
55
|
+
* Injects ACH/dialog styles so inputs and buttons in dialogs get variable-based
|
|
56
|
+
* styling. Always run (with and without bundle CSS) so dialog overlay content
|
|
57
|
+
* is styled; appended last so it overrides. Scoped to .v-overlay__content for
|
|
58
|
+
* higher specificity so it wins over bundle CSS for overlay content.
|
|
59
|
+
*/
|
|
60
|
+
private injectDevFallbackDialogStyles;
|
|
61
|
+
private injectDevVariablesStyles;
|
|
62
|
+
private ensureStylesheetDependency;
|
|
63
|
+
private findParentStylesheet;
|
|
64
|
+
private observeStylesheet;
|
|
65
|
+
private injectStylesheetFromHref;
|
|
66
|
+
private insertStylesheetElement;
|
|
67
|
+
private parseVersionFromHref;
|
|
68
|
+
private injectBundledMdi;
|
|
69
|
+
private getDependencyRegistry;
|
|
70
|
+
private handleMissingDependencies;
|
|
71
|
+
private dispatchMissingDependencyEvent;
|
|
72
|
+
private logMissingDependency;
|
|
73
|
+
private loadVueRuntime;
|
|
74
|
+
private getGlobalVueRuntime;
|
|
75
|
+
private waitForGlobalVueRuntime;
|
|
76
|
+
private cleanupDependencyObservers;
|
|
77
|
+
private removeDependencyObserver;
|
|
78
|
+
private isVersionSatisfied;
|
|
79
|
+
private compareSemver;
|
|
80
|
+
private forwardComponentEvents;
|
|
81
|
+
}
|
|
82
|
+
export declare function createEmbeddedPaymentMethodForm(config: {
|
|
83
|
+
container: HTMLElement;
|
|
84
|
+
props?: Partial<AuthviaPaymentMethodFormProps>;
|
|
85
|
+
onEvents?: Record<string, (e: Event) => void>;
|
|
86
|
+
}): {
|
|
87
|
+
element: AuthviaPaymentMethodFormElement;
|
|
88
|
+
updateProps: (newProps: Partial<AuthviaPaymentMethodFormProps>) => void;
|
|
89
|
+
destroy: () => void;
|
|
90
|
+
};
|
|
91
|
+
export { AuthviaPaymentMethodFormElement };
|
|
92
|
+
export default AuthviaPaymentMethodFormElement;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MerchantTheme } from './MerchantTheme';
|
|
2
|
+
export interface MerchantProfile {
|
|
3
|
+
name: string;
|
|
4
|
+
friendlyName?: string;
|
|
5
|
+
description: string;
|
|
6
|
+
businessAddress?: {
|
|
7
|
+
street?: string;
|
|
8
|
+
city?: string;
|
|
9
|
+
region?: string;
|
|
10
|
+
postalCode?: string;
|
|
11
|
+
country?: string;
|
|
12
|
+
};
|
|
13
|
+
logo?: string;
|
|
14
|
+
website?: string;
|
|
15
|
+
theme?: MerchantTheme;
|
|
16
|
+
docLinks?: {
|
|
17
|
+
privacyPolicy?: string;
|
|
18
|
+
returnPolicy?: string;
|
|
19
|
+
cancellationPolicy?: string;
|
|
20
|
+
shippingTerms?: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export declare enum PaymentMethodType {
|
|
2
|
+
ACH = "ACH",
|
|
3
|
+
CreditCard = "CreditCard",
|
|
4
|
+
Token = "Token",
|
|
5
|
+
PLAID = "Plaid",
|
|
6
|
+
Tokenize = "Tokenize",
|
|
7
|
+
Paze = "Paze",
|
|
8
|
+
PayPal = "PayPal",
|
|
9
|
+
Venmo = "Venmo"
|
|
10
|
+
}
|
|
11
|
+
export interface PaymentMethod {
|
|
12
|
+
id: string;
|
|
13
|
+
type: PaymentMethodType;
|
|
14
|
+
identifier: string;
|
|
15
|
+
status: string;
|
|
16
|
+
userId?: string;
|
|
17
|
+
permissions?: Record<string, 'use' | 'single-use' | 'auto-charge'[]>;
|
|
18
|
+
forbidden?: string[];
|
|
19
|
+
ipAddress?: string;
|
|
20
|
+
hash?: string;
|
|
21
|
+
label?: string;
|
|
22
|
+
identity?: string;
|
|
23
|
+
}
|
|
24
|
+
export type CardType = string;
|
|
25
|
+
export type CardCategory = string;
|
|
26
|
+
export interface CreditCardIssuer {
|
|
27
|
+
name?: string;
|
|
28
|
+
website?: string;
|
|
29
|
+
phone?: string;
|
|
30
|
+
country?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface CreditCard extends PaymentMethod {
|
|
33
|
+
nameOnCard: string;
|
|
34
|
+
cardNumber: string;
|
|
35
|
+
expirationMonth: number;
|
|
36
|
+
expirationYear: number;
|
|
37
|
+
streetAddress?: string;
|
|
38
|
+
state?: string;
|
|
39
|
+
city?: string;
|
|
40
|
+
zipCode?: string;
|
|
41
|
+
country?: string;
|
|
42
|
+
cardType?: CardType;
|
|
43
|
+
cardCategory?: CardCategory;
|
|
44
|
+
isDebit?: boolean;
|
|
45
|
+
isHSA?: boolean;
|
|
46
|
+
isBusiness?: boolean;
|
|
47
|
+
isSurchargeable?: boolean;
|
|
48
|
+
issuer?: CreditCardIssuer;
|
|
49
|
+
}
|
|
50
|
+
export interface Token extends Pick<CreditCard, 'nameOnCard' | 'expirationMonth' | 'expirationYear' | 'cardType' | 'cardCategory' | 'identifier'> {
|
|
51
|
+
token: string;
|
|
52
|
+
tokenContext: {
|
|
53
|
+
type: 'CreditCard' | string;
|
|
54
|
+
provider: string;
|
|
55
|
+
merchantId: string;
|
|
56
|
+
originatingId?: string;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export interface PayPalSetupTokenResponse {
|
|
60
|
+
id: string;
|
|
61
|
+
}
|
|
62
|
+
export interface PayPalIDTokenResponse {
|
|
63
|
+
idToken: string;
|
|
64
|
+
accessToken?: string;
|
|
65
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Authvia Error
|
|
3
|
+
*/
|
|
4
|
+
export declare class PaymentMethodAPIError extends Error {
|
|
5
|
+
code: string;
|
|
6
|
+
errors?: Array<any>;
|
|
7
|
+
status?: number;
|
|
8
|
+
id?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Construct Error With Code
|
|
11
|
+
* @param code
|
|
12
|
+
* @param message
|
|
13
|
+
* @param errors
|
|
14
|
+
* @param status
|
|
15
|
+
* @param id
|
|
16
|
+
*/
|
|
17
|
+
constructor(code: string, message: string, errors?: Array<any>, status?: number, id?: string);
|
|
18
|
+
}
|