@evervault/js 2.12.0 → 2.14.0

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.
@@ -6,6 +6,12 @@ declare class ApplePayButton {
6
6
  transaction: Transaction;
7
7
  constructor(client: EvervaultClient, transaction: Transaction, options: ApplePayButtonOptions);
8
8
  on(event: keyof ApplePayEvents, callback: ApplePayEvents[keyof ApplePayEvents]): () => void;
9
+ /**
10
+ * Programmatically dismiss the Apple Pay sheet while a session is active.
11
+ * Maps to PaymentRequest.abort(). Fires the `cancel` event on success.
12
+ * No-op if no session is in progress or abort is not possible.
13
+ */
14
+ abort(): Promise<void>;
9
15
  /**
10
16
  * Checks the availability of Apple Pay on the current device.
11
17
  *
@@ -100,6 +106,18 @@ declare interface BillingContact {
100
106
  subLocality?: string;
101
107
  }
102
108
 
109
+ declare interface BrandOptions {
110
+ numberValidationRules: {
111
+ luhnCheck?: boolean;
112
+ ranges: Array<number | [number, number]>;
113
+ lengths: number[];
114
+ };
115
+ securityCodeValidationRules: {
116
+ lengths: (3 | 4)[];
117
+ };
118
+ iconSrc?: string;
119
+ }
120
+
103
121
  declare interface CageKey {
104
122
  teamUuid: string;
105
123
  appUuid: string;
@@ -123,6 +141,7 @@ declare class Card {
123
141
  hiddenFields: string;
124
142
  fields: CardField[] | undefined;
125
143
  acceptedBrands: CardBrandName[] | undefined;
144
+ customBrands: CustomBrand[] | undefined;
126
145
  defaultValues: {
127
146
  name?: string;
128
147
  } | undefined;
@@ -206,6 +225,7 @@ declare interface CardOptions {
206
225
  hiddenFields?: ("number" | "expiry" | "cvc")[]; // deprecated
207
226
  fields?: CardField[];
208
227
  acceptedBrands?: CardBrandName[];
228
+ customBrands?: CustomBrand[];
209
229
  translations?: Partial<CardTranslations>;
210
230
  autoProgress?: boolean;
211
231
  redactCVC?: boolean;
@@ -411,6 +431,20 @@ PaymentTransactionDetails,
411
431
  "type"
412
432
  > & { type?: "payment" };
413
433
 
434
+ declare interface CustomBrand {
435
+ name: string;
436
+ isLocal: true;
437
+ numberValidationRules: {
438
+ luhnCheck: boolean;
439
+ ranges: Array<number | [number, number]>;
440
+ lengths: number[];
441
+ };
442
+ securityCodeValidationRules: {
443
+ lengths: (3 | 4)[];
444
+ };
445
+ iconSrc?: string;
446
+ }
447
+
414
448
  declare interface CustomConfig {
415
449
  isDebugMode?: boolean;
416
450
  urls?: ConfigUrls;
@@ -985,6 +1019,9 @@ declare class EvervaultClient {
985
1019
  get transactions(): {
986
1020
  create: (details: CreateTransactionDetails | RecurringTransactionDetails | DisbursementTransactionDetails) => Transaction;
987
1021
  };
1022
+ get brands(): {
1023
+ create: (name: string, options: BrandOptions) => CustomBrand;
1024
+ };
988
1025
  }
989
1026
 
990
1027
  export declare type EvervaultConstructor = typeof EvervaultClient;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@evervault/js",
4
- "version": "2.12.0",
4
+ "version": "2.14.0",
5
5
  "description": "Evervault.js loader for client-side browser applications",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -17,13 +17,13 @@
17
17
  "module": "dist/evervault-js.js",
18
18
  "types": "dist/evervault.d.ts",
19
19
  "devDependencies": {
20
- "typescript": "5.5.4",
20
+ "typescript": "5.6.3",
21
21
  "vite": "^7.3.2",
22
22
  "vite-plugin-dts": "^4.5.4",
23
23
  "themes": "0.1.23",
24
24
  "tsconfig": "0.1.0",
25
- "@evervault/browser": "2.55.1",
26
- "types": "0.23.0"
25
+ "types": "0.23.0",
26
+ "@evervault/browser": "2.57.0"
27
27
  },
28
28
  "scripts": {
29
29
  "build": "vite build",