@basis-theory/basis-theory-js 4.13.0 → 4.15.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basis-theory/basis-theory-js",
3
- "version": "4.13.0",
3
+ "version": "4.15.0",
4
4
  "repository": "https://github.com/Basis-Theory/basis-theory-js",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -59,11 +59,17 @@ interface CardElementValue<T extends ElementValueType> {
59
59
  expiration_year?: T extends 'reference' ? DataElementReference : number;
60
60
  number?: T extends 'reference' ? DataElementReference : string;
61
61
  }
62
+ interface CardElementPlaceholder {
63
+ cardNumber?: string;
64
+ cardExpirationDate?: string;
65
+ cardSecurityCode?: string;
66
+ }
62
67
  interface CardExpirationDateValue<T extends ElementValueType> {
63
68
  month: T extends 'reference' ? DataElementReference : number;
64
69
  year: T extends 'reference' ? DataElementReference : number;
65
70
  }
66
71
  type CreateCardElementOptions = CustomizableElementOptions & Pick<ElementOptions, 'cardTypes' | 'skipLuhnValidation'> & {
72
+ placeholder?: CardElementPlaceholder;
67
73
  value?: CardElementValue<'static'>;
68
74
  };
69
75
  type UpdateCardElementOptions = Omit<CreateCardElementOptions, 'validateOnChange' | 'enableCopy'>;
@@ -87,5 +93,5 @@ type CreateCardVerificationCodeElementOptions = CustomizableElementOptions & Pic
87
93
  value?: string;
88
94
  };
89
95
  type UpdateCardVerificationCodeElementOptions = Omit<CreateCardVerificationCodeElementOptions, 'targetId' | 'validateOnChange' | 'enableCopy'>;
90
- export type { CardElementValue, CardExpirationDateValue, CreateCardElementOptions, CreateCardExpirationDateElementOptions, CreateCardNumberElementOptions, CreateCardVerificationCodeElementOptions, CreateTextElementOptions, CustomizableElementOptions, ElementInternalOptions, ElementOptions, ElementType, InputMode, SanitizedElementOptions, Transform, UpdateCardElementOptions, UpdateCardExpirationDateElementOptions, UpdateCardNumberElementOptions, UpdateCardVerificationCodeElementOptions, UpdateTextElementOptions, };
96
+ export type { CardElementPlaceholder, CardElementValue, CardExpirationDateValue, CreateCardElementOptions, CreateCardExpirationDateElementOptions, CreateCardNumberElementOptions, CreateCardVerificationCodeElementOptions, CreateTextElementOptions, CustomizableElementOptions, ElementInternalOptions, ElementOptions, ElementType, InputMode, SanitizedElementOptions, Transform, UpdateCardElementOptions, UpdateCardExpirationDateElementOptions, UpdateCardNumberElementOptions, UpdateCardVerificationCodeElementOptions, UpdateTextElementOptions, };
91
97
  export { ELEMENTS_TYPES };
@@ -1,5 +1,10 @@
1
1
  interface CreateThreeDSSessionRequest {
2
- pan: string;
2
+ /**
3
+ * @deprecated Use `tokenId` instead.
4
+ */
5
+ pan?: string;
6
+ tokenId?: string;
7
+ tokenIntentId?: string;
3
8
  type: 'customer' | 'merchant';
4
9
  device?: string;
5
10
  deviceInfo?: ThreeDSDeviceInfo;
@@ -17,6 +22,8 @@ interface AuthenticateThreeDSSessionRequest {
17
22
  authenticationCategory: string;
18
23
  authenticationType: string;
19
24
  challengePreference?: string;
25
+ requestDecoupledChallenge?: boolean;
26
+ decoupledChallengeMaxTime?: number;
20
27
  purchaseInfo?: ThreeDSPurchaseInfo;
21
28
  merchantInfo?: ThreeDSMerchantInfo;
22
29
  requestorInfo?: ThreeDSRequestorInfo;