@evervault/js 2.1.0 → 2.2.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.
@@ -42,6 +42,14 @@ declare type ApplePayButtonOptions = {
42
42
  disbursementOverrides?: {
43
43
  disbursementDetails?: PaymentDetailsInit;
44
44
  };
45
+ onShippingAddressChange?: (newAddress: ShippingAddress) => Promise<{
46
+ amount: number;
47
+ lineItems?: TransactionLineItem[];
48
+ }>;
49
+ prepareTransaction?: () => Promise<{
50
+ amount?: number;
51
+ lineItems?: TransactionLineItem[];
52
+ }>;
45
53
  process: (data: EncryptedApplePayData, helpers: {
46
54
  fail: (error?: ApplePayErrorMessage) => void;
47
55
  }) => Promise<void>;
@@ -795,6 +803,8 @@ declare interface EncryptedDPAN<P> {
795
803
  token: PaymentToken<P>;
796
804
  card: {
797
805
  brand: string;
806
+ lastFour?: string;
807
+ displayName?: string;
798
808
  };
799
809
  cryptogram: string;
800
810
  eci: string;
@@ -804,6 +814,8 @@ declare interface EncryptedFPAN {
804
814
  card: {
805
815
  brand: string;
806
816
  number: string;
817
+ lastFour?: string;
818
+ displayName?: string;
807
819
  expiry: {
808
820
  month: string;
809
821
  year: string;
@@ -815,7 +827,7 @@ declare type EncryptedGooglePayData = (
815
827
  | EncryptedDPAN<"google">
816
828
  | EncryptedFPAN
817
829
  ) & {
818
- billingAddress: google.payments.api.Address | null;
830
+ billingAddress?: google.payments.api.Address | null;
819
831
  };
820
832
 
821
833
  declare const encryptionConstants: {
@@ -918,7 +930,7 @@ declare class EvervaultClient {
918
930
  }>;
919
931
  isInDebugMode(): boolean;
920
932
  get transactions(): {
921
- create: (details: CreateTransactionDetails | DisbursementTransactionDetails) => Transaction;
933
+ create: (details: CreateTransactionDetails | RecurringTransactionDetails | DisbursementTransactionDetails) => Transaction;
922
934
  };
923
935
  }
924
936
 
@@ -4223,6 +4235,19 @@ declare namespace Property {
4223
4235
  type VectorEffect = Globals | "non-scaling-stroke" | "none";
4224
4236
  }
4225
4237
 
4238
+ declare interface RecurringTransactionDetails extends BaseTransactionDetails {
4239
+ type: "recurring";
4240
+ managementURL: string;
4241
+ billingAgreement: string;
4242
+ description: string;
4243
+ regularBilling: TransactionLineItem & {
4244
+ recurringPaymentStartDate: Date;
4245
+ };
4246
+ trialBilling?: TransactionLineItem & {
4247
+ trialPaymentStartDate: Date;
4248
+ };
4249
+ }
4250
+
4226
4251
  declare type RequiredRecipientDetail = "email" | "phone" | "name" | "address";
4227
4252
 
4228
4253
  declare class Reveal {
@@ -4305,6 +4330,19 @@ declare type SdkContext = "inputs" | "default";
4305
4330
 
4306
4331
  declare type SelectorType = string | HTMLElement;
4307
4332
 
4333
+ declare interface ShippingAddress {
4334
+ addressLine: string[];
4335
+ city: string;
4336
+ country: string;
4337
+ dependentLocality: string;
4338
+ organization: string;
4339
+ phone: string;
4340
+ postalCode: string;
4341
+ recipient: string;
4342
+ region: string;
4343
+ sortingCode: string;
4344
+ }
4345
+
4308
4346
  declare interface StandardLonghandProperties<TLength = (string & {}) | 0, TTime = string & {}> {
4309
4347
  /**
4310
4348
  * The **`accent-color`** CSS property sets the accent color for user-interface controls generated by some elements.
@@ -10311,11 +10349,12 @@ declare interface ThreeDSecureOptions {
10311
10349
 
10312
10350
  declare class Transaction {
10313
10351
  details: TransactionDetailsWithDomain;
10314
- constructor(details: CreateTransactionDetails | DisbursementTransactionDetails);
10352
+ constructor(details: CreateTransactionDetails | RecurringTransactionDetails | DisbursementTransactionDetails);
10315
10353
  }
10316
10354
 
10317
10355
  declare type TransactionDetails =
10318
10356
  | PaymentTransactionDetails
10357
+ | RecurringTransactionDetails
10319
10358
  | DisbursementTransactionDetails;
10320
10359
 
10321
10360
  declare type TransactionDetailsWithDomain = TransactionDetails & {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@evervault/js",
4
- "version": "2.1.0",
4
+ "version": "2.2.0",
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.45.0",
24
- "themes": "0.1.15",
23
+ "themes": "0.1.16",
25
24
  "tsconfig": "0.1.0",
26
- "types": "0.15.0"
25
+ "types": "0.16.0",
26
+ "@evervault/browser": "2.46.0"
27
27
  },
28
28
  "scripts": {
29
29
  "build": "vite build",