@getopenpay/openpay-js 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/index.d.ts +20 -5
- package/dist/index.es.js +1510 -1494
- package/dist/index.umd.js +16 -16
- package/package.json +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/// <reference types="applepayjs" />
|
|
2
|
+
/// <reference types="googlepay" />
|
|
3
|
+
|
|
1
4
|
import { PaymentRequest as PaymentRequest_2 } from '@stripe/stripe-js';
|
|
2
5
|
import { Subject } from 'rxjs';
|
|
3
6
|
import { z } from 'zod';
|
|
@@ -47,11 +50,15 @@ declare type ApplePayFlowCustomParams = {
|
|
|
47
50
|
amount: Amount;
|
|
48
51
|
pending?: boolean;
|
|
49
52
|
label?: string;
|
|
50
|
-
applePayPaymentRequest?:
|
|
53
|
+
applePayPaymentRequest?: ApplePayPaymentRequest;
|
|
51
54
|
};
|
|
52
55
|
defaultFieldValues?: DefaultFieldValues;
|
|
53
56
|
};
|
|
54
57
|
|
|
58
|
+
declare type ApplePayPaymentRequest =
|
|
59
|
+
| ((current: ApplePayJS.ApplePayPaymentRequest) => Partial<ApplePayJS.ApplePayPaymentRequest>)
|
|
60
|
+
| Partial<ApplePayJS.ApplePayPaymentRequest>;
|
|
61
|
+
|
|
55
62
|
declare enum Blockchain {
|
|
56
63
|
EVM = 'EVM',
|
|
57
64
|
SOL = 'Solana',
|
|
@@ -59,6 +66,10 @@ declare enum Blockchain {
|
|
|
59
66
|
|
|
60
67
|
declare type BlockchainNetwork = keyof typeof Blockchain;
|
|
61
68
|
|
|
69
|
+
declare type CCSubmitParams = {
|
|
70
|
+
paymentRouteId?: string;
|
|
71
|
+
};
|
|
72
|
+
|
|
62
73
|
declare type CdeConnection = {
|
|
63
74
|
send: (data: CdeMessage) => Promise<unknown>;
|
|
64
75
|
};
|
|
@@ -288,11 +299,15 @@ declare type GooglePayFlowCustomParams = {
|
|
|
288
299
|
amount: Amount;
|
|
289
300
|
pending?: boolean;
|
|
290
301
|
label?: string;
|
|
291
|
-
googlePayPaymentRequest?:
|
|
302
|
+
googlePayPaymentRequest?: GooglePayPaymentRequest;
|
|
292
303
|
};
|
|
293
304
|
defaultFieldValues?: DefaultFieldValues;
|
|
294
305
|
};
|
|
295
306
|
|
|
307
|
+
declare type GooglePayPaymentRequest =
|
|
308
|
+
| ((current: PaymentDataRequest) => Partial<PaymentDataRequest>)
|
|
309
|
+
| Partial<PaymentDataRequest>;
|
|
310
|
+
|
|
296
311
|
declare type InitApplePayFlowResult = {
|
|
297
312
|
processor: PaymentProcessor;
|
|
298
313
|
isAvailable: boolean;
|
|
@@ -744,7 +759,7 @@ export declare class OpenPayForm {
|
|
|
744
759
|
/**
|
|
745
760
|
* Runs the common credit card flow
|
|
746
761
|
*/
|
|
747
|
-
submitCard: () => void;
|
|
762
|
+
submitCard: (params?: CCSubmitParams) => void;
|
|
748
763
|
getAvailablePaymentMethods: () => ({
|
|
749
764
|
name: string;
|
|
750
765
|
} | {
|
|
@@ -786,7 +801,7 @@ export declare class OpenPayForm {
|
|
|
786
801
|
/**
|
|
787
802
|
* Alias for submitCard
|
|
788
803
|
*/
|
|
789
|
-
submit: () => void;
|
|
804
|
+
submit: (params?: CCSubmitParams) => void;
|
|
790
805
|
destroy: () => void;
|
|
791
806
|
/**
|
|
792
807
|
* Updates form callbacks after initialization
|
|
@@ -1025,7 +1040,7 @@ declare type PaymentRequestStartParams = {
|
|
|
1025
1040
|
amount: Amount;
|
|
1026
1041
|
pending?: boolean;
|
|
1027
1042
|
label?: string;
|
|
1028
|
-
applePayPaymentRequest?:
|
|
1043
|
+
applePayPaymentRequest?: ApplePayPaymentRequest;
|
|
1029
1044
|
};
|
|
1030
1045
|
};
|
|
1031
1046
|
|