@evervault/js 2.11.0 → 2.13.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.
@@ -100,6 +100,18 @@ declare interface BillingContact {
100
100
  subLocality?: string;
101
101
  }
102
102
 
103
+ declare interface BrandOptions {
104
+ numberValidationRules: {
105
+ luhnCheck?: boolean;
106
+ ranges: Array<number | [number, number]>;
107
+ lengths: number[];
108
+ };
109
+ securityCodeValidationRules: {
110
+ lengths: (3 | 4)[];
111
+ };
112
+ iconSrc?: string;
113
+ }
114
+
103
115
  declare interface CageKey {
104
116
  teamUuid: string;
105
117
  appUuid: string;
@@ -123,6 +135,7 @@ declare class Card {
123
135
  hiddenFields: string;
124
136
  fields: CardField[] | undefined;
125
137
  acceptedBrands: CardBrandName[] | undefined;
138
+ customBrands: CustomBrand[] | undefined;
126
139
  defaultValues: {
127
140
  name?: string;
128
141
  } | undefined;
@@ -139,6 +152,9 @@ declare class Card {
139
152
  name?: {
140
153
  regex?: RegExp;
141
154
  };
155
+ cvc?: {
156
+ optional?: boolean;
157
+ };
142
158
  } | undefined;
143
159
  };
144
160
  };
@@ -203,6 +219,7 @@ declare interface CardOptions {
203
219
  hiddenFields?: ("number" | "expiry" | "cvc")[]; // deprecated
204
220
  fields?: CardField[];
205
221
  acceptedBrands?: CardBrandName[];
222
+ customBrands?: CustomBrand[];
206
223
  translations?: Partial<CardTranslations>;
207
224
  autoProgress?: boolean;
208
225
  redactCVC?: boolean;
@@ -220,6 +237,9 @@ declare interface CardOptions {
220
237
  name?: {
221
238
  regex?: RegExp;
222
239
  };
240
+ cvc?: {
241
+ optional?: boolean;
242
+ };
223
243
  };
224
244
  }
225
245
 
@@ -405,6 +425,20 @@ PaymentTransactionDetails,
405
425
  "type"
406
426
  > & { type?: "payment" };
407
427
 
428
+ declare interface CustomBrand {
429
+ name: string;
430
+ isLocal: true;
431
+ numberValidationRules: {
432
+ luhnCheck: boolean;
433
+ ranges: Array<number | [number, number]>;
434
+ lengths: number[];
435
+ };
436
+ securityCodeValidationRules: {
437
+ lengths: (3 | 4)[];
438
+ };
439
+ iconSrc?: string;
440
+ }
441
+
408
442
  declare interface CustomConfig {
409
443
  isDebugMode?: boolean;
410
444
  urls?: ConfigUrls;
@@ -979,6 +1013,9 @@ declare class EvervaultClient {
979
1013
  get transactions(): {
980
1014
  create: (details: CreateTransactionDetails | RecurringTransactionDetails | DisbursementTransactionDetails) => Transaction;
981
1015
  };
1016
+ get brands(): {
1017
+ create: (name: string, options: BrandOptions) => CustomBrand;
1018
+ };
982
1019
  }
983
1020
 
984
1021
  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.11.0",
4
+ "version": "2.13.0",
5
5
  "description": "Evervault.js loader for client-side browser applications",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -18,12 +18,12 @@
18
18
  "types": "dist/evervault.d.ts",
19
19
  "devDependencies": {
20
20
  "typescript": "5.5.4",
21
- "vite": "^7.3.1",
21
+ "vite": "^7.3.2",
22
22
  "vite-plugin-dts": "^4.5.4",
23
- "themes": "0.1.22",
23
+ "@evervault/browser": "2.56.0",
24
+ "themes": "0.1.23",
24
25
  "tsconfig": "0.1.0",
25
- "@evervault/browser": "2.54.0",
26
- "types": "0.22.0"
26
+ "types": "0.23.0"
27
27
  },
28
28
  "scripts": {
29
29
  "build": "vite build",