@getopenpay/openpay-js-react 0.2.32 → 0.2.34
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/.tsbuildinfo +1 -1
- package/dist/index.d.ts +21 -6
- package/dist/index.js +1710 -1687
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/// <reference types="applepayjs" />
|
|
2
|
+
/// <reference types="googlepay" />
|
|
3
|
+
|
|
1
4
|
import { FC } from 'react';
|
|
2
5
|
import { z } from 'zod';
|
|
3
6
|
|
|
@@ -6,7 +9,7 @@ declare type AirwallexApplePayFlowCustomParams = {
|
|
|
6
9
|
amount: Amount;
|
|
7
10
|
pending?: boolean;
|
|
8
11
|
label?: string;
|
|
9
|
-
applePayPaymentRequest?:
|
|
12
|
+
applePayPaymentRequest?: ApplePayPaymentRequest;
|
|
10
13
|
};
|
|
11
14
|
defaultFieldValues?: DefaultFieldValues;
|
|
12
15
|
};
|
|
@@ -15,7 +18,7 @@ declare type AirwallexGooglePayFlowCustomParams = {
|
|
|
15
18
|
overridePaymentRequest?: {
|
|
16
19
|
amount: Amount;
|
|
17
20
|
pending?: boolean;
|
|
18
|
-
googlePayPaymentRequest?:
|
|
21
|
+
googlePayPaymentRequest?: GooglePayPaymentRequest;
|
|
19
22
|
};
|
|
20
23
|
defaultFieldValues?: DefaultFieldValues;
|
|
21
24
|
};
|
|
@@ -65,11 +68,15 @@ declare type ApplePayFlowCustomParams = {
|
|
|
65
68
|
amount: Amount;
|
|
66
69
|
pending?: boolean;
|
|
67
70
|
label?: string;
|
|
68
|
-
applePayPaymentRequest?:
|
|
71
|
+
applePayPaymentRequest?: ApplePayPaymentRequest;
|
|
69
72
|
};
|
|
70
73
|
defaultFieldValues?: DefaultFieldValues;
|
|
71
74
|
};
|
|
72
75
|
|
|
76
|
+
declare type ApplePayPaymentRequest =
|
|
77
|
+
| ((current: ApplePayJS.ApplePayPaymentRequest) => Partial<ApplePayJS.ApplePayPaymentRequest>)
|
|
78
|
+
| Partial<ApplePayJS.ApplePayPaymentRequest>;
|
|
79
|
+
|
|
73
80
|
declare enum Blockchain {
|
|
74
81
|
EVM = 'EVM',
|
|
75
82
|
SOL = 'Solana',
|
|
@@ -93,6 +100,10 @@ declare const CardPlaceholder = z.object({
|
|
|
93
100
|
|
|
94
101
|
declare type CardPlaceholder = z.infer<typeof CardPlaceholder>;
|
|
95
102
|
|
|
103
|
+
declare type CCSubmitParams = {
|
|
104
|
+
paymentRouteId?: string;
|
|
105
|
+
};
|
|
106
|
+
|
|
96
107
|
declare type CommonSubmitSettings = {
|
|
97
108
|
defaultFieldValues?: DefaultFieldValues;
|
|
98
109
|
};
|
|
@@ -183,7 +194,7 @@ declare type ElementsContextValue = {
|
|
|
183
194
|
export declare const ElementsForm: FC<ElementsFormPropsReact>;
|
|
184
195
|
|
|
185
196
|
export declare type ElementsFormChildrenProps = {
|
|
186
|
-
submit: () => void;
|
|
197
|
+
submit: (params?: CCSubmitParams) => void;
|
|
187
198
|
submitWith: <T extends SubmitMethod>(method: T, settings?: SubmitSettings<T>) => void | Promise<void>;
|
|
188
199
|
applePay: PaymentRequestStatus;
|
|
189
200
|
googlePay: PaymentRequestStatus;
|
|
@@ -299,11 +310,15 @@ declare type GooglePayFlowCustomParams = {
|
|
|
299
310
|
amount: Amount;
|
|
300
311
|
pending?: boolean;
|
|
301
312
|
label?: string;
|
|
302
|
-
googlePayPaymentRequest?:
|
|
313
|
+
googlePayPaymentRequest?: GooglePayPaymentRequest;
|
|
303
314
|
};
|
|
304
315
|
defaultFieldValues?: DefaultFieldValues;
|
|
305
316
|
};
|
|
306
317
|
|
|
318
|
+
declare type GooglePayPaymentRequest =
|
|
319
|
+
| ((current: PaymentDataRequest) => Partial<PaymentDataRequest>)
|
|
320
|
+
| Partial<PaymentDataRequest>;
|
|
321
|
+
|
|
307
322
|
export declare type InitAirwallexApplePayFlowResult = {
|
|
308
323
|
isAvailable: boolean;
|
|
309
324
|
isLoading: boolean;
|
|
@@ -643,7 +658,7 @@ export declare type PaymentRequestStartParams = {
|
|
|
643
658
|
amount: Amount;
|
|
644
659
|
pending?: boolean;
|
|
645
660
|
label?: string;
|
|
646
|
-
applePayPaymentRequest?:
|
|
661
|
+
applePayPaymentRequest?: ApplePayPaymentRequest;
|
|
647
662
|
};
|
|
648
663
|
};
|
|
649
664
|
|