@getopenpay/openpay-js-react 0.0.3 → 0.0.4-alpha.4be53e6
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 +29 -0
- package/dist/index.js +632 -567
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ 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;
|
|
26
27
|
};
|
|
27
28
|
|
|
@@ -29,6 +30,7 @@ export declare const ElementsForm: FC<ElementsFormProps>;
|
|
|
29
30
|
|
|
30
31
|
declare type ElementsFormChildrenProps = {
|
|
31
32
|
submit: () => void;
|
|
33
|
+
applePay: PaymentRequestStatus;
|
|
32
34
|
};
|
|
33
35
|
|
|
34
36
|
export declare type ElementsFormProps = {
|
|
@@ -92,12 +94,39 @@ export declare enum FieldName {
|
|
|
92
94
|
PHONE = "phone"
|
|
93
95
|
}
|
|
94
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Payment requests
|
|
99
|
+
*/
|
|
100
|
+
declare const PaymentRequestStatus: z.ZodObject<{
|
|
101
|
+
isLoading: z.ZodBoolean;
|
|
102
|
+
isAvailable: z.ZodBoolean;
|
|
103
|
+
startFlow: z.ZodFunction<z.ZodTuple<[], null>, z.ZodVoid>;
|
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
isLoading: boolean;
|
|
106
|
+
isAvailable: boolean;
|
|
107
|
+
startFlow: () => void;
|
|
108
|
+
}, {
|
|
109
|
+
isLoading: boolean;
|
|
110
|
+
isAvailable: boolean;
|
|
111
|
+
startFlow: () => void;
|
|
112
|
+
}>;
|
|
113
|
+
|
|
114
|
+
declare type PaymentRequestStatus = z.infer<typeof PaymentRequestStatus>;
|
|
115
|
+
|
|
95
116
|
declare enum PrivateFieldName {
|
|
96
117
|
CARD_NUMBER = "cardNumber",
|
|
97
118
|
CARD_EXPIRY = "cardExpiry",
|
|
98
119
|
CARD_CVC = "cardCvc"
|
|
99
120
|
}
|
|
100
121
|
|
|
122
|
+
declare type StripeContext = {
|
|
123
|
+
isStripeAvailable: true;
|
|
124
|
+
stripePubKey: string;
|
|
125
|
+
} | {
|
|
126
|
+
isStripeAvailable: false;
|
|
127
|
+
stripePubKey: undefined;
|
|
128
|
+
};
|
|
129
|
+
|
|
101
130
|
export declare const useOpenPayElements: () => ElementsContextValue;
|
|
102
131
|
|
|
103
132
|
export { }
|