@getopenpay/openpay-js-react 0.0.15-alpha.2040cc2 → 0.0.17-alpha.a0c8fb9
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 +12 -1
- package/dist/index.js +1701 -1623
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -45,6 +45,12 @@ declare const CardPlaceholder: z.ZodObject<{
|
|
|
45
45
|
|
|
46
46
|
declare type CardPlaceholder = z.infer<typeof CardPlaceholder>;
|
|
47
47
|
|
|
48
|
+
declare type DynamicPreview = {
|
|
49
|
+
amount: Amount | null;
|
|
50
|
+
isLoading: boolean;
|
|
51
|
+
error: string | null;
|
|
52
|
+
};
|
|
53
|
+
|
|
48
54
|
export declare type ElementProps<PlaceholderType extends z.ZodTypeAny = z.ZodString> = {
|
|
49
55
|
styles?: ElementsStyle<z.ZodOptional<PlaceholderType>>;
|
|
50
56
|
};
|
|
@@ -65,6 +71,7 @@ declare type ElementsFormChildrenProps = {
|
|
|
65
71
|
applePay: PaymentRequestStatus;
|
|
66
72
|
googlePay: PaymentRequestStatus;
|
|
67
73
|
loaded: boolean;
|
|
74
|
+
preview: DynamicPreview;
|
|
68
75
|
};
|
|
69
76
|
|
|
70
77
|
export declare type ElementsFormProps = {
|
|
@@ -82,6 +89,7 @@ export declare type ElementsFormProps = {
|
|
|
82
89
|
onSetupPaymentMethodSuccess?: (paymentMethodId: string) => void;
|
|
83
90
|
onCheckoutError?: (message: string) => void;
|
|
84
91
|
baseUrl?: string;
|
|
92
|
+
enableDynamicPreviews?: boolean;
|
|
85
93
|
};
|
|
86
94
|
|
|
87
95
|
declare const ElementsStyle: <T extends z.ZodTypeAny>(placeholderType: T) => z.ZodObject<z.objectUtil.extendShape<{
|
|
@@ -155,7 +163,10 @@ export declare enum FieldName {
|
|
|
155
163
|
}
|
|
156
164
|
|
|
157
165
|
declare type PaymentRequestStartParams = {
|
|
158
|
-
|
|
166
|
+
overridePaymentRequest?: {
|
|
167
|
+
amount: Amount;
|
|
168
|
+
pending: boolean;
|
|
169
|
+
};
|
|
159
170
|
};
|
|
160
171
|
|
|
161
172
|
declare type PaymentRequestStatus = {
|