@getopenpay/openpay-js-react 0.0.4-alpha.50e456b → 0.0.5-alpha.c8e4dd5
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/index.d.ts +31 -0
- package/dist/index.js +649 -581
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -22,13 +22,16 @@ declare type ElementsContextValue = {
|
|
|
22
22
|
formHeight: string;
|
|
23
23
|
referer?: string;
|
|
24
24
|
checkoutSecureToken?: string;
|
|
25
|
+
stripeContext: StripeContext | null;
|
|
25
26
|
registerIframe: (iframe: HTMLIFrameElement) => void;
|
|
27
|
+
baseUrl: string;
|
|
26
28
|
};
|
|
27
29
|
|
|
28
30
|
export declare const ElementsForm: FC<ElementsFormProps>;
|
|
29
31
|
|
|
30
32
|
declare type ElementsFormChildrenProps = {
|
|
31
33
|
submit: () => void;
|
|
34
|
+
applePay: PaymentRequestStatus;
|
|
32
35
|
};
|
|
33
36
|
|
|
34
37
|
export declare type ElementsFormProps = {
|
|
@@ -44,6 +47,7 @@ export declare type ElementsFormProps = {
|
|
|
44
47
|
onCheckoutStarted?: () => void;
|
|
45
48
|
onCheckoutSuccess?: (invoiceUrls: string[]) => void;
|
|
46
49
|
onCheckoutError?: (message: string) => void;
|
|
50
|
+
baseUrl?: string;
|
|
47
51
|
};
|
|
48
52
|
|
|
49
53
|
/**
|
|
@@ -92,12 +96,39 @@ export declare enum FieldName {
|
|
|
92
96
|
PHONE = "phone"
|
|
93
97
|
}
|
|
94
98
|
|
|
99
|
+
/**
|
|
100
|
+
* Payment requests
|
|
101
|
+
*/
|
|
102
|
+
declare const PaymentRequestStatus: z.ZodObject<{
|
|
103
|
+
isLoading: z.ZodBoolean;
|
|
104
|
+
isAvailable: z.ZodBoolean;
|
|
105
|
+
startFlow: z.ZodFunction<z.ZodTuple<[], null>, z.ZodVoid>;
|
|
106
|
+
}, "strip", z.ZodTypeAny, {
|
|
107
|
+
isLoading: boolean;
|
|
108
|
+
isAvailable: boolean;
|
|
109
|
+
startFlow: () => void;
|
|
110
|
+
}, {
|
|
111
|
+
isLoading: boolean;
|
|
112
|
+
isAvailable: boolean;
|
|
113
|
+
startFlow: () => void;
|
|
114
|
+
}>;
|
|
115
|
+
|
|
116
|
+
declare type PaymentRequestStatus = z.infer<typeof PaymentRequestStatus>;
|
|
117
|
+
|
|
95
118
|
declare enum PrivateFieldName {
|
|
96
119
|
CARD_NUMBER = "cardNumber",
|
|
97
120
|
CARD_EXPIRY = "cardExpiry",
|
|
98
121
|
CARD_CVC = "cardCvc"
|
|
99
122
|
}
|
|
100
123
|
|
|
124
|
+
declare type StripeContext = {
|
|
125
|
+
isStripeAvailable: true;
|
|
126
|
+
stripePubKey: string;
|
|
127
|
+
} | {
|
|
128
|
+
isStripeAvailable: false;
|
|
129
|
+
stripePubKey: undefined;
|
|
130
|
+
};
|
|
131
|
+
|
|
101
132
|
export declare const useOpenPayElements: () => ElementsContextValue;
|
|
102
133
|
|
|
103
134
|
export { }
|