@evervault/js 2.0.0 → 2.0.2
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/evervault.d.ts +73 -9
- package/package.json +4 -4
package/dist/evervault.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ declare class ApplePay {
|
|
|
18
18
|
disbursementOverrides: {
|
|
19
19
|
disbursementDetails?: PaymentDetailsInit;
|
|
20
20
|
} | undefined;
|
|
21
|
+
requestPayerDetails: ("name" | "email" | "phone")[] | undefined;
|
|
21
22
|
};
|
|
22
23
|
};
|
|
23
24
|
mount(selector: SelectorType): this;
|
|
@@ -26,6 +27,16 @@ declare class ApplePay {
|
|
|
26
27
|
on<T extends keyof ApplePayEvents>(event: T, callback: ApplePayEvents[T]): () => void;
|
|
27
28
|
}
|
|
28
29
|
|
|
30
|
+
declare class ApplePayButton {
|
|
31
|
+
#private;
|
|
32
|
+
client: EvervaultClient;
|
|
33
|
+
transaction: Transaction;
|
|
34
|
+
constructor(client: EvervaultClient, transaction: Transaction, options: ApplePayButtonOptions);
|
|
35
|
+
on(event: keyof ApplePayEvents_2, callback: ApplePayEvents_2[keyof ApplePayEvents_2]): () => void;
|
|
36
|
+
mount(selector: SelectorType): void;
|
|
37
|
+
unmount(): void;
|
|
38
|
+
}
|
|
39
|
+
|
|
29
40
|
declare type ApplePayButtonLocale =
|
|
30
41
|
| "ar-AB"
|
|
31
42
|
| "ca-ES"
|
|
@@ -67,8 +78,38 @@ declare type ApplePayButtonLocale =
|
|
|
67
78
|
| "zh-HK"
|
|
68
79
|
| "zh-TW";
|
|
69
80
|
|
|
81
|
+
declare type ApplePayButtonLocale_2 = "ar-AB" | "ca-ES" | "cs-CZ" | "da-DK" | "de-DE" | "el-GR" | "en-AU" | "en-GB" | "en-US" | "es-ES" | "es-MX" | "fi-FI" | "fr-CA" | "fr-FR" | "he-IL" | "hi-IN" | "hr-HR" | "hu-HU" | "id-ID" | "it-IT" | "ja-JP" | "ko-KR" | "ms-MY" | "nb-NO" | "nl-NL" | "pl-PL" | "pt-BR" | "pt-PT" | "ro-RO" | "ru-RU" | "sk-SK" | "sv-SE" | "th-TH" | "tr-TR" | "uk-UA" | "vi-VN" | "zh-CN" | "zh-HK" | "zh-TW";
|
|
82
|
+
|
|
83
|
+
declare type ApplePayButtonOptions = {
|
|
84
|
+
type?: ApplePayButtonType_2;
|
|
85
|
+
style?: ApplePayButtonStyle_2;
|
|
86
|
+
locale?: ApplePayButtonLocale_2;
|
|
87
|
+
padding?: string;
|
|
88
|
+
borderRadius?: string;
|
|
89
|
+
size?: {
|
|
90
|
+
width: string | number;
|
|
91
|
+
height: string | number;
|
|
92
|
+
};
|
|
93
|
+
allowedCardNetworks?: ApplePayCardNetwork_2[];
|
|
94
|
+
requestPayerDetails?: ("name" | "email" | "phone")[];
|
|
95
|
+
requestBillingAddress?: boolean;
|
|
96
|
+
requestShipping?: boolean;
|
|
97
|
+
paymentOverrides?: {
|
|
98
|
+
paymentMethodData?: PaymentMethodData[];
|
|
99
|
+
paymentDetails?: PaymentDetailsInit;
|
|
100
|
+
};
|
|
101
|
+
disbursementOverrides?: {
|
|
102
|
+
disbursementDetails?: PaymentDetailsInit;
|
|
103
|
+
};
|
|
104
|
+
process: (data: EncryptedApplePayData, helpers: {
|
|
105
|
+
fail: (error?: ApplePayErrorMessage) => void;
|
|
106
|
+
}) => Promise<void>;
|
|
107
|
+
};
|
|
108
|
+
|
|
70
109
|
declare type ApplePayButtonStyle = "black" | "white" | "white-outline";
|
|
71
110
|
|
|
111
|
+
declare type ApplePayButtonStyle_2 = "black" | "white" | "white-outline";
|
|
112
|
+
|
|
72
113
|
declare type ApplePayButtonType =
|
|
73
114
|
| "add-money"
|
|
74
115
|
| "book"
|
|
@@ -88,6 +129,8 @@ declare type ApplePayButtonType =
|
|
|
88
129
|
| "tip"
|
|
89
130
|
| "top-up";
|
|
90
131
|
|
|
132
|
+
declare type ApplePayButtonType_2 = "add-money" | "book" | "buy" | "check-out" | "continue" | "contribute" | "donate" | "order" | "pay" | "plain" | "reload" | "rent" | "set-up" | "subscribe" | "support" | "tip" | "top-up";
|
|
133
|
+
|
|
91
134
|
declare type ApplePayCardNetwork =
|
|
92
135
|
| "amex"
|
|
93
136
|
| "bancomat"
|
|
@@ -110,6 +153,8 @@ declare type ApplePayCardNetwork =
|
|
|
110
153
|
| "visa"
|
|
111
154
|
| "vPay";
|
|
112
155
|
|
|
156
|
+
declare type ApplePayCardNetwork_2 = "amex" | "bancomat" | "bancontact" | "cartesBancaires" | "chinaUnionPay" | "dankort" | "discover" | "eftpos" | "electron" | "elo" | "girocard" | "interac" | "jcb" | "mada" | "maestro" | "masterCard" | "mir" | "privateLabel" | "visa" | "vPay";
|
|
157
|
+
|
|
113
158
|
declare interface ApplePayErrorMessage {
|
|
114
159
|
message: string;
|
|
115
160
|
}
|
|
@@ -121,6 +166,12 @@ declare interface ApplePayEvents {
|
|
|
121
166
|
cancel: () => void;
|
|
122
167
|
}
|
|
123
168
|
|
|
169
|
+
declare interface ApplePayEvents_2 {
|
|
170
|
+
success: () => void;
|
|
171
|
+
error: (message?: string) => void;
|
|
172
|
+
cancel: () => void;
|
|
173
|
+
}
|
|
174
|
+
|
|
124
175
|
declare interface ApplePayOptions {
|
|
125
176
|
process: (
|
|
126
177
|
data: EncryptedApplePayData,
|
|
@@ -143,6 +194,7 @@ declare interface ApplePayOptions {
|
|
|
143
194
|
disbursementOverrides?: {
|
|
144
195
|
disbursementDetails?: PaymentDetailsInit;
|
|
145
196
|
};
|
|
197
|
+
requestPayerDetails?: ("name" | "email" | "phone")[];
|
|
146
198
|
}
|
|
147
199
|
|
|
148
200
|
declare interface BaseTransactionDetails {
|
|
@@ -851,7 +903,8 @@ declare interface DisbursementTransactionDetails extends BaseTransactionDetails
|
|
|
851
903
|
requiredRecipientDetails?: RequiredRecipientDetail[];
|
|
852
904
|
}
|
|
853
905
|
|
|
854
|
-
declare type EncryptedApplePayData = EncryptedDPAN<"apple"> & {
|
|
906
|
+
declare type EncryptedApplePayData = Omit<EncryptedDPAN<"apple">, "token"> & {
|
|
907
|
+
networkToken: PaymentToken<"apple"> & { rawExpiry: string };
|
|
855
908
|
billingContact?: {
|
|
856
909
|
givenName?: string;
|
|
857
910
|
familyName?: string;
|
|
@@ -859,17 +912,18 @@ declare type EncryptedApplePayData = EncryptedDPAN<"apple"> & {
|
|
|
859
912
|
phoneNumber?: string;
|
|
860
913
|
address?: unknown;
|
|
861
914
|
};
|
|
915
|
+
paymentDataType: string;
|
|
916
|
+
deviceManufacturerIdentifier: string;
|
|
917
|
+
shippingContact?: {
|
|
918
|
+
givenName?: string;
|
|
919
|
+
familyName?: string;
|
|
920
|
+
emailAddress?: string;
|
|
921
|
+
phoneNumber?: string;
|
|
922
|
+
};
|
|
862
923
|
};
|
|
863
924
|
|
|
864
925
|
declare interface EncryptedDPAN<P> {
|
|
865
|
-
token:
|
|
866
|
-
tokenServiceProvider: P;
|
|
867
|
-
number: string;
|
|
868
|
-
expiry: {
|
|
869
|
-
month: string;
|
|
870
|
-
year: string;
|
|
871
|
-
};
|
|
872
|
-
};
|
|
926
|
+
token: PaymentToken<P>;
|
|
873
927
|
card: {
|
|
874
928
|
brand: string;
|
|
875
929
|
};
|
|
@@ -2541,6 +2595,15 @@ declare interface ObsoleteProperties<TLength = (string & {}) | 0, TTime = string
|
|
|
2541
2595
|
WebkitScrollSnapPointsY?: Property.ScrollSnapPointsY | undefined;
|
|
2542
2596
|
}
|
|
2543
2597
|
|
|
2598
|
+
declare interface PaymentToken<P> {
|
|
2599
|
+
tokenServiceProvider: P;
|
|
2600
|
+
number: string;
|
|
2601
|
+
expiry: {
|
|
2602
|
+
month: string;
|
|
2603
|
+
year: string;
|
|
2604
|
+
};
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2544
2607
|
declare interface PaymentTransactionDetails extends BaseTransactionDetails {
|
|
2545
2608
|
type: "payment";
|
|
2546
2609
|
}
|
|
@@ -10396,6 +10459,7 @@ declare class UIComponents {
|
|
|
10396
10459
|
threeDSecure(session: string, opts?: ThreeDSecureOptions): ThreeDSecure;
|
|
10397
10460
|
googlePay(tx: Transaction, opts: GooglePayOptions): GooglePay;
|
|
10398
10461
|
applePay(tx: Transaction, opts: ApplePayOptions): ApplePay;
|
|
10462
|
+
applePayButton(tx: Transaction, opts: ApplePayButtonOptions): ApplePayButton;
|
|
10399
10463
|
}
|
|
10400
10464
|
|
|
10401
10465
|
declare interface VendorLonghandProperties<TLength = (string & {}) | 0, TTime = string & {}> {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@evervault/js",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"description": "Evervault.js loader for client-side browser applications",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"typescript": "5.5.4",
|
|
21
21
|
"vite": "^5.4.11",
|
|
22
22
|
"vite-plugin-dts": "^4.3.0",
|
|
23
|
-
"@evervault/browser": "2.
|
|
23
|
+
"@evervault/browser": "2.42.3",
|
|
24
24
|
"tsconfig": "0.1.0",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
25
|
+
"types": "0.13.0",
|
|
26
|
+
"themes": "0.1.13"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"build": "vite build",
|