@authvia/payment-method-create 0.4.0 → 0.6.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.
Files changed (51) hide show
  1. package/README.md +26 -7
  2. package/dist/components/AuthviaPaymentMethodForm.vue.d.ts +10 -11
  3. package/dist/components/internal/AuthviaPaymentMethodAddAch.vue.d.ts +134 -63
  4. package/dist/components/internal/AuthviaPaymentMethodAddAchOnline.vue.d.ts +4 -4
  5. package/dist/components/internal/AuthviaPaymentMethodAddAchOptions.vue.d.ts +1 -1
  6. package/dist/components/internal/AuthviaPaymentMethodAddPaymentsPayPal.vue.d.ts +10 -15
  7. package/dist/components/internal/AuthviaPaymentMethodAddPayoutsPayPal.vue.d.ts +7 -13
  8. package/dist/components/internal/AuthviaPaymentMethodCard.vue.d.ts +1 -1
  9. package/dist/components/internal/AuthviaPaymentMethodCreditCard.vue.d.ts +6 -6
  10. package/dist/components/internal/AuthviaPaymentMethodOptions.vue.d.ts +585 -0
  11. package/dist/components/internal/AuthviaPazeForm.vue.d.ts +54 -0
  12. package/dist/components/internal/ach/AchFormPlaidBannerAndTypeToggle.vue.d.ts +31 -0
  13. package/dist/components/internal/ach/AchFormRoutingAccountNameFields.vue.d.ts +29 -0
  14. package/dist/components/internal/ach/AchFormSubmitBar.vue.d.ts +28 -0
  15. package/dist/components/internal/paymentMethodOptions/AuthviaPaymentMethodOptionsAchFlowDialogs.vue.d.ts +53 -0
  16. package/dist/components/internal/paymentMethodOptions/AuthviaPaymentMethodOptionsBankPlaceDialog.vue.d.ts +14 -0
  17. package/dist/components/internal/paymentMethodOptions/AuthviaPaymentMethodOptionsPickerCard.vue.d.ts +15 -0
  18. package/dist/components/internal/paymentMethodOptions/AuthviaPaymentMethodOptionsPlaidHost.vue.d.ts +17 -0
  19. package/dist/components/internal/paymentMethodOptions/AuthviaPaymentMethodOptionsWalletFormDialog.vue.d.ts +64 -0
  20. package/dist/composables/ach/useAchFormInputModels.d.ts +23 -0
  21. package/dist/composables/ach/useAchFormReset.d.ts +6 -0
  22. package/dist/composables/ach/useAchFormSubmitFlow.d.ts +25 -0
  23. package/dist/composables/ach/useAchFormValidation.d.ts +10 -0
  24. package/dist/composables/ach/useAuthviaPaymentMethodAddAchForm.d.ts +69 -0
  25. package/dist/composables/paymentMethodForm/paymentMethodFormTypes.d.ts +27 -0
  26. package/dist/composables/paymentMethodForm/useAuthviaPaymentMethodForm.d.ts +44 -0
  27. package/dist/composables/paymentMethodForm/usePaymentMethodFormChildProps.d.ts +25 -0
  28. package/dist/composables/paymentMethodForm/usePaymentMethodFormHandlers.d.ts +9 -0
  29. package/dist/composables/paymentMethodForm/usePaymentMethodFormPermittedTypes.d.ts +8 -0
  30. package/dist/composables/paymentMethodForm/usePaymentMethodFormTheme.d.ts +20 -0
  31. package/dist/composables/paymentMethodForm/usePaymentMethodFormTokenValidation.d.ts +10 -0
  32. package/dist/composables/paymentMethodOptions/paymentMethodOptionsTypes.d.ts +13 -0
  33. package/dist/composables/paymentMethodOptions/useAuthviaPaymentMethodOptions.d.ts +84 -0
  34. package/dist/composables/paymentMethodOptions/usePaymentMethodOptionsDisplay.d.ts +14 -0
  35. package/dist/composables/paymentMethodOptions/usePaymentMethodOptionsHandlers.d.ts +43 -0
  36. package/dist/composables/paymentMethodOptions/usePaymentMethodOptionsState.d.ts +27 -0
  37. package/dist/constants/themeAvwcDerived.d.ts +13 -4
  38. package/dist/entry/web-component.d.ts +2 -0
  39. package/dist/model/PaymentMethodAPIError.d.ts +3 -1
  40. package/dist/types/achForm.d.ts +42 -0
  41. package/dist/types/index.d.ts +11 -0
  42. package/dist/types/paymentMethodOptions.d.ts +34 -0
  43. package/dist/utils/achApiErrorMapping.d.ts +8 -0
  44. package/dist/utils/achCreatePayload.d.ts +8 -0
  45. package/dist/utils/authviaAddressFormComponent.d.ts +6 -0
  46. package/dist/utils/sentryErrorSummary.d.ts +10 -0
  47. package/dist/utils/sentryWidget.d.ts +41 -0
  48. package/dist/utils/tokenUtils.d.ts +5 -0
  49. package/dist/vue-plugin.js +2 -2
  50. package/dist/vue-plugin.umd.cjs +2 -2
  51. package/package.json +7 -4
@@ -0,0 +1,28 @@
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ isFormValid: {
3
+ type: BooleanConstructor;
4
+ required: true;
5
+ };
6
+ isWorking: {
7
+ type: BooleanConstructor;
8
+ required: true;
9
+ };
10
+ submitLabel: {
11
+ type: StringConstructor;
12
+ required: true;
13
+ };
14
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
15
+ isFormValid: {
16
+ type: BooleanConstructor;
17
+ required: true;
18
+ };
19
+ isWorking: {
20
+ type: BooleanConstructor;
21
+ required: true;
22
+ };
23
+ submitLabel: {
24
+ type: StringConstructor;
25
+ required: true;
26
+ };
27
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
28
+ export default _default;
@@ -0,0 +1,53 @@
1
+ import { MethodSuccessPayload } from '../../../composables/paymentMethodOptions/paymentMethodOptionsTypes';
2
+ import { PaymentMethodBillingAddress, PaymentMethodType } from '../../../model';
3
+ import { TermsConfig } from '../../../types';
4
+ type __VLS_Props = {
5
+ showAchTypeChoice: boolean;
6
+ dialogAttachResolved: string | HTMLElement;
7
+ methodDialogClass: string;
8
+ achOptionsTitle: string;
9
+ achOnlineProp: boolean;
10
+ showConfirmLoader: boolean;
11
+ errorMessage: string;
12
+ authToken: string;
13
+ merchantId?: string;
14
+ customerRef?: string;
15
+ intent?: string;
16
+ achDemoMode: boolean;
17
+ achSubmitBtnText?: string;
18
+ defaultAchSubmitBtnText: string;
19
+ terms?: TermsConfig;
20
+ achBillingAddress?: PaymentMethodBillingAddress;
21
+ plaidData: Record<string, unknown>;
22
+ forgetDefault: boolean;
23
+ forgetHidden: boolean;
24
+ variant?: string;
25
+ color?: string;
26
+ borderRadius?: string;
27
+ };
28
+ type __VLS_PublicProps = {
29
+ modelValue: boolean;
30
+ } & __VLS_Props;
31
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
32
+ "update:modelValue": (value: boolean) => any;
33
+ } & {
34
+ achClose: () => any;
35
+ achOptionSelect: (value: string) => any;
36
+ achSuccess: (value: MethodSuccessPayload | null) => any;
37
+ achError: (value: {
38
+ message: string;
39
+ type?: PaymentMethodType;
40
+ }) => any;
41
+ childSubmit: (value: unknown) => any;
42
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
43
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
44
+ onAchClose?: (() => any) | undefined;
45
+ onAchOptionSelect?: ((value: string) => any) | undefined;
46
+ onAchSuccess?: ((value: MethodSuccessPayload | null) => any) | undefined;
47
+ onAchError?: ((value: {
48
+ message: string;
49
+ type?: PaymentMethodType;
50
+ }) => any) | undefined;
51
+ onChildSubmit?: ((value: unknown) => any) | undefined;
52
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
53
+ export default _default;
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ dialogAttachResolved: string | HTMLElement;
3
+ methodDialogClass: string;
4
+ achDemoMode: boolean;
5
+ };
6
+ type __VLS_PublicProps = {
7
+ modelValue: boolean;
8
+ } & __VLS_Props;
9
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
+ "update:modelValue": (value: boolean) => any;
11
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
12
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import { PaymentMethodConfigItem } from '../../../types';
2
+ type PickerCardProps = {
3
+ show: boolean;
4
+ optionsCardClass: string;
5
+ optionsListClass: string;
6
+ restrictionStatements: string[] | undefined;
7
+ paymentMethodConfigs: PaymentMethodConfigItem[] | undefined;
8
+ paymentMethodOptionsContainerStyle: Record<string, string>;
9
+ };
10
+ declare const _default: import('vue').DefineComponent<PickerCardProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
11
+ methodClick: (type: string) => any;
12
+ }, string, import('vue').PublicProps, Readonly<PickerCardProps> & Readonly<{
13
+ onMethodClick?: ((type: string) => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
15
+ export default _default;
@@ -0,0 +1,17 @@
1
+ type __VLS_Props = {
2
+ showPlaidOption: boolean;
3
+ achOnlineProp: boolean;
4
+ authToken: string;
5
+ };
6
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
7
+ getPlaidData: (data: unknown) => any;
8
+ plaidInitialize: () => any;
9
+ plaidExit: () => any;
10
+ plaidError: () => any;
11
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ onGetPlaidData?: ((data: unknown) => any) | undefined;
13
+ onPlaidInitialize?: (() => any) | undefined;
14
+ onPlaidExit?: (() => any) | undefined;
15
+ onPlaidError?: (() => any) | undefined;
16
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
17
+ export default _default;
@@ -0,0 +1,64 @@
1
+ import { MethodSuccessPayload } from '../../../composables/paymentMethodOptions/paymentMethodOptionsTypes';
2
+ import { PaymentMethodBillingAddress, PaymentMethodType } from '../../../model';
3
+ import { TermsConfig } from '../../../types';
4
+ type __VLS_Props = {
5
+ activeFormType: 'creditcard' | 'paypal' | 'venmo' | null;
6
+ dialogAttachResolved: string | HTMLElement;
7
+ methodDialogClass: string;
8
+ creditCardSectionClass: string;
9
+ cardDemoMode: boolean;
10
+ paypalFormHeading: string;
11
+ venmoFormHeading: string;
12
+ authToken: string;
13
+ merchantId?: string;
14
+ customerRef?: string;
15
+ intent?: string;
16
+ cardNumber?: string;
17
+ nameOnCard?: string;
18
+ cardExpiration?: string;
19
+ cardCvv?: string;
20
+ cardBillingAddress?: PaymentMethodBillingAddress;
21
+ variant?: string;
22
+ color?: string;
23
+ borderRadius?: string;
24
+ cardSubmitLabel: string;
25
+ terms?: TermsConfig;
26
+ forgetDefault: boolean;
27
+ forgetHidden: boolean;
28
+ vuetifyOverrides?: string;
29
+ pvSettings: Record<string, unknown>;
30
+ };
31
+ type __VLS_PublicProps = {
32
+ modelValue: boolean;
33
+ } & __VLS_Props;
34
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
35
+ "update:modelValue": (value: boolean) => any;
36
+ } & {
37
+ close: () => any;
38
+ childSubmit: (value: unknown) => any;
39
+ creditCardSuccess: (value: MethodSuccessPayload | null) => any;
40
+ creditCardError: (value: {
41
+ message: string;
42
+ type?: PaymentMethodType;
43
+ }) => any;
44
+ payoutSuccess: (value: MethodSuccessPayload | null) => any;
45
+ payoutError: (value: {
46
+ message: string;
47
+ type?: PaymentMethodType;
48
+ }) => any;
49
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
50
+ onClose?: (() => any) | undefined;
51
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
52
+ onChildSubmit?: ((value: unknown) => any) | undefined;
53
+ onCreditCardSuccess?: ((value: MethodSuccessPayload | null) => any) | undefined;
54
+ onCreditCardError?: ((value: {
55
+ message: string;
56
+ type?: PaymentMethodType;
57
+ }) => any) | undefined;
58
+ onPayoutSuccess?: ((value: MethodSuccessPayload | null) => any) | undefined;
59
+ onPayoutError?: ((value: {
60
+ message: string;
61
+ type?: PaymentMethodType;
62
+ }) => any) | undefined;
63
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
64
+ export default _default;
@@ -0,0 +1,23 @@
1
+ import { ComputedRef, Reactive } from 'vue';
2
+ import { AchFieldKey, P_ACHValues } from '../../types/achForm';
3
+ type ValidationRule = (value: unknown) => true | string;
4
+ export type AchFormValidationApi = {
5
+ markFieldDirty: (field: AchFieldKey) => void;
6
+ getFieldRules: (field: AchFieldKey) => ValidationRule[];
7
+ };
8
+ /**
9
+ * v-model + keyboard/paste for ACH account fields.
10
+ */
11
+ export declare function useAchFormInputModels(formData: Reactive<P_ACHValues>, validation: AchFormValidationApi): {
12
+ markFieldDirty: (field: AchFieldKey) => void;
13
+ getFieldRules: (field: AchFieldKey) => ValidationRule[];
14
+ routingNumberModel: ComputedRef<string>;
15
+ accountNumberModel: ComputedRef<string>;
16
+ nameOnAccountModel: ComputedRef<string>;
17
+ onDigitKeydown: (event: KeyboardEvent) => void;
18
+ onNameKeydown: (event: KeyboardEvent) => void;
19
+ onRoutingPaste: (event: ClipboardEvent) => void;
20
+ onAccountPaste: (event: ClipboardEvent) => void;
21
+ onNamePaste: (event: ClipboardEvent) => void;
22
+ };
23
+ export {};
@@ -0,0 +1,6 @@
1
+ import { Reactive, Ref } from 'vue';
2
+ import { AchFieldKey, P_ACHValues } from '../../types/achForm';
3
+ export declare function useAchFormReset(formData: Reactive<P_ACHValues>, formRef: Ref<unknown>, addressFormRef: Ref<unknown>, dirtyFields: Record<AchFieldKey, Ref<boolean>>): {
4
+ clearFormData: () => void;
5
+ resetFormAddressData: () => void;
6
+ };
@@ -0,0 +1,25 @@
1
+ import { ComputedRef, Reactive, Ref } from 'vue';
2
+ import { UsePaymentMethodServiceReturn } from '../usePaymentMethodService';
3
+ import { PaymentMethod } from '../../model';
4
+ import { AchFormSubmitContextProps, P_ACHValues } from '../../types/achForm';
5
+ type EmitFn = (event: 'submit' | 'error' | 'success', ...args: unknown[]) => void;
6
+ export declare function useAchFormSubmitFlow(options: {
7
+ emit: EmitFn;
8
+ getSubmitProps: () => AchFormSubmitContextProps;
9
+ formData: Reactive<P_ACHValues>;
10
+ plaid: ComputedRef<Record<string, unknown> | undefined>;
11
+ formRef: Ref<unknown>;
12
+ isWorking: Ref<boolean>;
13
+ paymentMethodService: UsePaymentMethodServiceReturn;
14
+ clearFormData: () => void;
15
+ forgetCardValue: Ref<boolean>;
16
+ errorsType: Ref<{
17
+ other: string | undefined;
18
+ }>;
19
+ paymentMethodResponse: Ref<PaymentMethod | undefined>;
20
+ isPaymentMethodAdded: Ref<boolean>;
21
+ markRequiredFieldsDirty: (isPlaidFlow: boolean) => void;
22
+ }): {
23
+ handleSubmit: () => Promise<void>;
24
+ };
25
+ export {};
@@ -0,0 +1,10 @@
1
+ import { Ref } from 'vue';
2
+ import { AchFieldKey } from '../../types/achForm';
3
+ type ValidationRule = (value: unknown) => true | string;
4
+ export declare function useAchFormValidation(): {
5
+ dirtyFields: Record<AchFieldKey, Ref<boolean>>;
6
+ markFieldDirty: (field: AchFieldKey) => void;
7
+ markRequiredFieldsDirty: (isPlaidFlow: boolean) => void;
8
+ getFieldRules: (field: AchFieldKey) => ValidationRule[];
9
+ };
10
+ export {};
@@ -0,0 +1,69 @@
1
+ import { ComputedRef, Ref } from 'vue';
2
+ import { PaymentMethod, PaymentMethodBillingAddress } from '../../model';
3
+ import { AuthviaPaymentMethodAddAchProps, P_ACHValues } from '../../types/achForm';
4
+ type AchFormEmit = (event: 'submit' | 'error' | 'success', ...args: unknown[]) => void;
5
+ /**
6
+ * Core state and handlers for {@link AuthviaPaymentMethodAddAch} (payment-method-add-ach).
7
+ */
8
+ export declare function useAuthviaPaymentMethodAddAchForm(props: AuthviaPaymentMethodAddAchProps, emit: AchFormEmit): {
9
+ avwcPaymentMethodFormHooks: {
10
+ readonly root: "avwc-payment-method-form__root";
11
+ readonly optionsRoot: "avwc-payment-method-form__options-root";
12
+ readonly optionsCard: "avwc-payment-method-form__options-card";
13
+ readonly optionsList: "avwc-payment-method-form__options-list";
14
+ readonly methodDialog: "avwc-payment-method-form__method-dialog";
15
+ readonly methodRow: "avwc-payment-method-form__method-row";
16
+ readonly creditCardSection: "avwc-payment-method-form__credit-card-section";
17
+ readonly achRoot: "avwc-payment-method-form__ach-root";
18
+ };
19
+ accountTypes: {
20
+ savings: string;
21
+ checking: string;
22
+ };
23
+ fieldVariant: ComputedRef<"outlined" | "plain" | "underlined" | "filled" | "solo" | "solo-filled" | "solo-inverted">;
24
+ fieldVariantSafe: ComputedRef<"outlined" | "plain" | "underlined" | "filled" | "solo" | "solo-filled" | "solo-inverted">;
25
+ formData: P_ACHValues;
26
+ isWorking: Ref<boolean, boolean>;
27
+ isFormValid: ComputedRef<boolean>;
28
+ markFieldDirty: (field: import('../../types/achForm').AchFieldKey) => void;
29
+ getFieldRules: (field: import('../../types/achForm').AchFieldKey) => ((value: unknown) => true | string)[];
30
+ routingNumberModel: ComputedRef<string>;
31
+ accountNumberModel: ComputedRef<string>;
32
+ nameOnAccountModel: ComputedRef<string>;
33
+ onDigitKeydown: (event: KeyboardEvent) => void;
34
+ onNameKeydown: (event: KeyboardEvent) => void;
35
+ onRoutingPaste: (event: ClipboardEvent) => void;
36
+ onAccountPaste: (event: ClipboardEvent) => void;
37
+ onNamePaste: (event: ClipboardEvent) => void;
38
+ errorsType: Ref<{
39
+ other: string | undefined;
40
+ }, {
41
+ other: string | undefined;
42
+ }>;
43
+ computedSubmitLabel: ComputedRef<string>;
44
+ handleSubmit: () => Promise<void>;
45
+ isActiveTab: Ref<boolean, boolean>;
46
+ addButtonToggle: (value?: boolean) => void;
47
+ address: Ref<HTMLInputElement, HTMLInputElement>;
48
+ resetFormAddressData: () => void;
49
+ activeMerchant: ComputedRef<string | undefined>;
50
+ isPaymentMethodAdded: Ref<boolean, boolean>;
51
+ paymentMethodResponse: Ref<PaymentMethod | undefined, PaymentMethod | undefined>;
52
+ isAddressFieldDisabled: (fieldValue: string | undefined) => boolean;
53
+ azp: ComputedRef<string>;
54
+ handleAddressFormSubmit: (data: PaymentMethodBillingAddress) => void;
55
+ handleUpdateForgetCard: (value: boolean) => void;
56
+ addressFormRef: Ref<unknown, unknown>;
57
+ formRef: Ref<unknown, unknown>;
58
+ demoMode: ComputedRef<boolean>;
59
+ plaid: ComputedRef<Record<string, unknown> | undefined>;
60
+ billingAddress: ComputedRef<PaymentMethodBillingAddress | undefined>;
61
+ streetAddress: Ref<string, string>;
62
+ city: Ref<string, string>;
63
+ state: Ref<string, string>;
64
+ country: Ref<string, string>;
65
+ postalCode: Ref<string, string>;
66
+ googleMapsApiKey: string;
67
+ isAddressFormValid: (isValid: boolean) => void;
68
+ };
69
+ export {};
@@ -0,0 +1,27 @@
1
+ import { PaymentMethodFormData } from '../../types';
2
+ export type FormErrorPhase = 'init' | 'submit';
3
+ export type EmittedFormError = {
4
+ phase: FormErrorPhase;
5
+ error: unknown;
6
+ };
7
+ /**
8
+ * Min subset of the parent emit API used by token validation and form handlers.
9
+ */
10
+ export type AuthviaPaymentMethodFormEmit = {
11
+ (event: 'submit', data: PaymentMethodFormData): void;
12
+ (event: 'success', data: unknown): void;
13
+ (event: 'error', err: EmittedFormError | Record<string, unknown>): void;
14
+ (event: 'ready'): void;
15
+ };
16
+ /** Normalized object emitted on `success` when the child passes a string id or structured payload. */
17
+ export type EmittedFormPaymentMethodSuccess = {
18
+ paymentMethodId: string;
19
+ type?: string;
20
+ use?: boolean;
21
+ };
22
+ /** What {@link usePaymentMethodFormHandlers.handlePaymentMethodSuccess} accepts from Options. */
23
+ export type FormPaymentMethodSuccessEventPayload = string | {
24
+ type: string;
25
+ paymentMethodId: string;
26
+ use: boolean;
27
+ };
@@ -0,0 +1,44 @@
1
+ import { AuthviaPaymentMethodFormProps } from '../../types';
2
+ import { AuthviaPaymentMethodFormEmit } from './paymentMethodFormTypes';
3
+ /**
4
+ * Composes all setup logic for {@link AuthviaPaymentMethodForm} (theme, child props, permissions, token, handlers).
5
+ */
6
+ export declare function useAuthviaPaymentMethodForm(props: AuthviaPaymentMethodFormProps, emit: AuthviaPaymentMethodFormEmit): {
7
+ handlePaymentMethodSubmit: (data: unknown) => void;
8
+ handlePaymentMethodSuccess: (data: import('./paymentMethodFormTypes').FormPaymentMethodSuccessEventPayload) => Promise<void>;
9
+ handlePaymentMethodFailure: (error: unknown) => void;
10
+ tokenValidationError: import('vue').Ref<string | null, string | null>;
11
+ validateToken: () => void;
12
+ allowedPaymentMethodTypes: import('vue').Ref<string[], string[]>;
13
+ cardDemoMode: import('vue').ComputedRef<boolean>;
14
+ achDemoMode: import('vue').ComputedRef<boolean>;
15
+ achOnlineFromAch: import('vue').ComputedRef<boolean>;
16
+ cardSubmitBtnText: import('vue').ComputedRef<string | undefined>;
17
+ cardNumber: import('vue').ComputedRef<string | undefined>;
18
+ cardExpiration: import('vue').ComputedRef<string | undefined>;
19
+ cardCvv: import('vue').ComputedRef<string | undefined>;
20
+ cardNameOnCard: import('vue').ComputedRef<string | undefined>;
21
+ achSubmitBtnText: import('vue').ComputedRef<string | undefined>;
22
+ termsConfig: import('vue').ComputedRef<import('../../types').TermsConfig | undefined>;
23
+ paymentMethodDisplay: import('vue').ComputedRef<import('../../types').PaymentMethodDisplayConfigMap | undefined>;
24
+ cardBillingAddress: import('vue').ComputedRef<import('../../model').PaymentMethodBillingAddress | undefined>;
25
+ achBillingAddress: import('vue').ComputedRef<import('../../model').PaymentMethodBillingAddress | undefined>;
26
+ forgetHidden: import('vue').ComputedRef<boolean | undefined>;
27
+ forgetDefault: import('vue').ComputedRef<boolean | undefined>;
28
+ pzSettings: import('vue').ComputedRef<Record<string, unknown>>;
29
+ pvSettings: import('vue').ComputedRef<Record<string, unknown>>;
30
+ rootRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
31
+ avwcPaymentMethodFormHooks: {
32
+ readonly root: "avwc-payment-method-form__root";
33
+ readonly optionsRoot: "avwc-payment-method-form__options-root";
34
+ readonly optionsCard: "avwc-payment-method-form__options-card";
35
+ readonly optionsList: "avwc-payment-method-form__options-list";
36
+ readonly methodDialog: "avwc-payment-method-form__method-dialog";
37
+ readonly methodRow: "avwc-payment-method-form__method-row";
38
+ readonly creditCardSection: "avwc-payment-method-form__credit-card-section";
39
+ readonly achRoot: "avwc-payment-method-form__ach-root";
40
+ };
41
+ cssCustomProperties: import('vue').ComputedRef<Record<string, string>>;
42
+ inputVariant: import('vue').ComputedRef<"outlined" | "plain" | "underlined" | "filled" | "solo" | "solo-filled" | "solo-inverted">;
43
+ };
44
+ export type { AuthviaPaymentMethodFormEmit } from './paymentMethodFormTypes';
@@ -0,0 +1,25 @@
1
+ import { ComputedRef } from 'vue';
2
+ import { PaymentMethodBillingAddress } from '../../model';
3
+ import { AuthviaPaymentMethodFormProps, PaymentMethodDisplayConfigMap, TermsConfig } from '../../types';
4
+ /**
5
+ * Computed props passed from the form shell to {@link AuthviaPaymentMethodOptions} (and descendants).
6
+ */
7
+ export declare function usePaymentMethodFormChildProps(props: AuthviaPaymentMethodFormProps): {
8
+ cardDemoMode: ComputedRef<boolean>;
9
+ achDemoMode: ComputedRef<boolean>;
10
+ achOnlineFromAch: ComputedRef<boolean>;
11
+ cardSubmitBtnText: ComputedRef<string | undefined>;
12
+ cardNumber: ComputedRef<string | undefined>;
13
+ cardExpiration: ComputedRef<string | undefined>;
14
+ cardCvv: ComputedRef<string | undefined>;
15
+ cardNameOnCard: ComputedRef<string | undefined>;
16
+ achSubmitBtnText: ComputedRef<string | undefined>;
17
+ termsConfig: ComputedRef<TermsConfig | undefined>;
18
+ paymentMethodDisplay: ComputedRef<PaymentMethodDisplayConfigMap | undefined>;
19
+ cardBillingAddress: ComputedRef<PaymentMethodBillingAddress | undefined>;
20
+ achBillingAddress: ComputedRef<PaymentMethodBillingAddress | undefined>;
21
+ forgetHidden: ComputedRef<boolean | undefined>;
22
+ forgetDefault: ComputedRef<boolean | undefined>;
23
+ pzSettings: ComputedRef<Record<string, unknown>>;
24
+ pvSettings: ComputedRef<Record<string, unknown>>;
25
+ };
@@ -0,0 +1,9 @@
1
+ import { AuthviaPaymentMethodFormEmit, FormPaymentMethodSuccessEventPayload } from './paymentMethodFormTypes';
2
+ /**
3
+ * Success / error / submit bridges from {@link AuthviaPaymentMethodOptions} to the host emit API.
4
+ */
5
+ export declare function usePaymentMethodFormHandlers(emit: AuthviaPaymentMethodFormEmit): {
6
+ handlePaymentMethodSubmit: (data: unknown) => void;
7
+ handlePaymentMethodSuccess: (data: FormPaymentMethodSuccessEventPayload) => Promise<void>;
8
+ handlePaymentMethodFailure: (error: unknown) => void;
9
+ };
@@ -0,0 +1,8 @@
1
+ import { Ref } from 'vue';
2
+ import { AuthviaPaymentMethodFormProps } from '../../types';
3
+ /**
4
+ * `allowedPaymentMethodTypes` (picker list) and card script inject on first mount.
5
+ */
6
+ export declare function usePaymentMethodFormPermittedTypes(props: AuthviaPaymentMethodFormProps): {
7
+ allowedPaymentMethodTypes: Ref<string[], string[]>;
8
+ };
@@ -0,0 +1,20 @@
1
+ import { ComputedRef, Ref } from 'vue';
2
+ import { AuthviaPaymentMethodFormProps } from '../../types';
3
+ /**
4
+ * Host root ref, BEM class hook, and CSS custom properties for the payment method form shell.
5
+ */
6
+ export declare function usePaymentMethodFormTheme(props: AuthviaPaymentMethodFormProps): {
7
+ rootRef: Ref<HTMLElement | null, HTMLElement | null>;
8
+ avwcPaymentMethodFormHooks: {
9
+ readonly root: "avwc-payment-method-form__root";
10
+ readonly optionsRoot: "avwc-payment-method-form__options-root";
11
+ readonly optionsCard: "avwc-payment-method-form__options-card";
12
+ readonly optionsList: "avwc-payment-method-form__options-list";
13
+ readonly methodDialog: "avwc-payment-method-form__method-dialog";
14
+ readonly methodRow: "avwc-payment-method-form__method-row";
15
+ readonly creditCardSection: "avwc-payment-method-form__credit-card-section";
16
+ readonly achRoot: "avwc-payment-method-form__ach-root";
17
+ };
18
+ cssCustomProperties: ComputedRef<Record<string, string>>;
19
+ inputVariant: ComputedRef<"outlined" | "plain" | "underlined" | "filled" | "solo" | "solo-filled" | "solo-inverted">;
20
+ };
@@ -0,0 +1,10 @@
1
+ import { Ref } from 'vue';
2
+ import { AuthviaPaymentMethodFormProps } from '../../types';
3
+ import { AuthviaPaymentMethodFormEmit } from './paymentMethodFormTypes';
4
+ /**
5
+ * Token validation, error ref for gating the chooser, and `watch` on `props.token` (runs immediately).
6
+ */
7
+ export declare function usePaymentMethodFormTokenValidation(props: AuthviaPaymentMethodFormProps, emit: AuthviaPaymentMethodFormEmit): {
8
+ tokenValidationError: Ref<string | null, string | null>;
9
+ validateToken: () => void;
10
+ };
@@ -0,0 +1,13 @@
1
+ export type MethodSuccessPayload = {
2
+ id?: string;
3
+ use?: boolean;
4
+ forgetCard?: boolean;
5
+ data?: {
6
+ id?: string;
7
+ };
8
+ };
9
+ export type PazeSuccessPayload = string | {
10
+ id: string;
11
+ forgetCard?: boolean;
12
+ } | null;
13
+ export type PaymentMethodOptionsEmit = (event: 'on-success' | 'on-error' | 'on-submit' | 'update:forgetCard', payload?: unknown) => void;
@@ -0,0 +1,84 @@
1
+ import { PaymentMethodOptionsProps } from '../../types/paymentMethodOptions';
2
+ import { PaymentMethodOptionsEmit } from './paymentMethodOptionsTypes';
3
+ /**
4
+ * State and handlers for the payment method options chooser (AuthviaPaymentMethodOptions).
5
+ * Split across {@link usePaymentMethodOptionsState}, display config, and event handlers
6
+ * to keep the API surface in one place without a single 500+ line function.
7
+ */
8
+ export declare function useAuthviaPaymentMethodOptions(props: PaymentMethodOptionsProps, emit: PaymentMethodOptionsEmit): {
9
+ defaultCardSubmitBtnText: any;
10
+ defaultAchSubmitBtnText: any;
11
+ cardDemoMode: boolean | undefined;
12
+ achDemoMode: boolean | undefined;
13
+ pzSettings: Record<string, unknown> | undefined;
14
+ vuetifyOverrides: string | undefined;
15
+ closePaymentMethodForm: () => void;
16
+ handlePaymentMethodClick: (type: string) => void;
17
+ handleAchOptions: () => void;
18
+ handleAchClose: () => void;
19
+ handleAchOptionSelect: (option: string) => void;
20
+ handleUpdateForgetCard: (_value: boolean) => void;
21
+ pazeAmount: import('vue').ComputedRef<number | undefined>;
22
+ handlePazeSuccess: (data: import('./paymentMethodOptionsTypes').PazeSuccessPayload) => void;
23
+ handlePazeError: (error: {
24
+ message: string;
25
+ type?: import('../../model').PaymentMethodType;
26
+ }) => void;
27
+ handlePazeCancel: () => void;
28
+ handleCreditCardSuccess: (data: import('./paymentMethodOptionsTypes').MethodSuccessPayload | null) => void;
29
+ handleCreditCardError: (error: {
30
+ message: string;
31
+ type?: import('../../model').PaymentMethodType;
32
+ }) => void;
33
+ handlePayoutSuccess: (data: import('./paymentMethodOptionsTypes').MethodSuccessPayload | null) => void;
34
+ handlePayoutError: (error: {
35
+ message: string;
36
+ type?: import('../../model').PaymentMethodType;
37
+ }) => void;
38
+ handlePaymentMethodSuccess: (data: import('./paymentMethodOptionsTypes').MethodSuccessPayload | null) => void;
39
+ handlePaymentMethodError: (error: {
40
+ message: string;
41
+ type?: import('../../model').PaymentMethodType;
42
+ }) => void;
43
+ handleChildSubmit: (payload: unknown) => void;
44
+ handlePlaidResponse: (accountData: unknown) => void;
45
+ handlePlaidInitialize: () => void;
46
+ handlePlaidExit: () => void;
47
+ handlePlaidError: () => void;
48
+ restrictionStatements: import('vue').ComputedRef<string[]>;
49
+ paypalDescription: import('vue').ComputedRef<string>;
50
+ paypalFormHeading: import('vue').ComputedRef<string>;
51
+ venmoFormHeading: import('vue').ComputedRef<string>;
52
+ paymentMethodOptionsContainerStyle: import('vue').ComputedRef<Record<string, string>>;
53
+ paymentMethodConfigs: import('vue').ComputedRef<import('../../types').PaymentMethodConfigItem[]>;
54
+ dialogAttachTarget: HTMLElement | undefined;
55
+ optionsAttachId: string;
56
+ dialogAttachResolved: import('vue').ComputedRef<string | HTMLElement>;
57
+ showChoosePaymentMethodsModal: import('vue').Ref<boolean>;
58
+ showPaymentMethodForm: import('vue').Ref<boolean>;
59
+ activeFormType: import('vue').Ref<"creditcard" | "paypal" | "venmo" | null>;
60
+ showACHForm: import('vue').Ref<boolean>;
61
+ showACHOptions: import('vue').Ref<boolean>;
62
+ showPazeForm: import('vue').Ref<boolean>;
63
+ showPlaidOption: import('vue').Ref<boolean>;
64
+ showConfirmLoader: import('vue').Ref<boolean>;
65
+ errorMessage: import('vue').Ref<string>;
66
+ showAchTypeChoice: import('vue').Ref<boolean>;
67
+ plaidData: import('vue').Ref<Record<string, unknown>>;
68
+ achOptionsTitle: import('vue').ComputedRef<string>;
69
+ achOnlineProp: import('vue').ComputedRef<boolean>;
70
+ resetAchFlowState: () => void;
71
+ allPaymentMethodsAllowed: import('vue').ComputedRef<boolean>;
72
+ hasAnyPaymentMethod: import('vue').ComputedRef<boolean>;
73
+ avwcPaymentMethodFormHooks: {
74
+ readonly root: "avwc-payment-method-form__root";
75
+ readonly optionsRoot: "avwc-payment-method-form__options-root";
76
+ readonly optionsCard: "avwc-payment-method-form__options-card";
77
+ readonly optionsList: "avwc-payment-method-form__options-list";
78
+ readonly methodDialog: "avwc-payment-method-form__method-dialog";
79
+ readonly methodRow: "avwc-payment-method-form__method-row";
80
+ readonly creditCardSection: "avwc-payment-method-form__credit-card-section";
81
+ readonly achRoot: "avwc-payment-method-form__ach-root";
82
+ };
83
+ };
84
+ export type { PaymentMethodOptionsEmit } from './paymentMethodOptionsTypes';
@@ -0,0 +1,14 @@
1
+ import { ComputedRef } from 'vue';
2
+ import { PaymentMethodConfigItem } from '../../types';
3
+ import { PaymentMethodOptionsProps } from '../../types/paymentMethodOptions';
4
+ /**
5
+ * Restriction text, per-method config for the chooser, and PayPal/Venmo heading strings.
6
+ */
7
+ export declare function usePaymentMethodOptionsDisplay(props: PaymentMethodOptionsProps): {
8
+ restrictionStatements: ComputedRef<string[]>;
9
+ paypalDescription: ComputedRef<string>;
10
+ paypalFormHeading: ComputedRef<string>;
11
+ venmoFormHeading: ComputedRef<string>;
12
+ paymentMethodOptionsContainerStyle: ComputedRef<Record<string, string>>;
13
+ paymentMethodConfigs: ComputedRef<PaymentMethodConfigItem[]>;
14
+ };