@basis-theory/basis-theory-js 1.62.2 → 1.64.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": "1.62.2",
3
+ "version": "1.64.0",
4
4
  "repository": "https://github.com/Basis-Theory/basis-theory-js",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -44,7 +44,7 @@ interface BasisTheoryElements extends Tokenize {
44
44
  createElement(type: 'cardVerificationCode', options: CreateCardVerificationCodeElementOptions): CardVerificationCodeElement;
45
45
  }
46
46
  interface BasisTheoryElementsInternal extends BasisTheoryElements {
47
- init: (apiKey: string, elementsBaseUrl: string) => Promise<BasisTheoryElements>;
47
+ init: (apiKey: string | undefined, elementsBaseUrl: string) => Promise<BasisTheoryElements>;
48
48
  hasElement: (payload: unknown) => boolean;
49
49
  }
50
50
  declare global {
@@ -3,11 +3,12 @@ import type { ElementStyle } from './styles';
3
3
  declare const ELEMENTS_TYPES: readonly ["card", "text", "cardNumber", "cardExpirationDate", "cardVerificationCode", "data"];
4
4
  declare type ElementType = typeof ELEMENTS_TYPES[number];
5
5
  interface ElementInternalOptions {
6
- apiKey: string;
6
+ apiKey: string | undefined;
7
7
  type: ElementType;
8
8
  baseUrl: string;
9
9
  }
10
10
  interface SanitizedElementOptions {
11
+ validateOnChange?: boolean;
11
12
  style?: ElementStyle;
12
13
  disabled?: boolean;
13
14
  targetId?: string;
@@ -30,7 +31,7 @@ interface TransformOption {
30
31
  interface AutoCompleteOption {
31
32
  autoComplete?: AutoCompleteValue;
32
33
  }
33
- declare type CustomizableElementOptions = Pick<ElementOptions, 'style' | 'disabled'> & AutoCompleteOption;
34
+ declare type CustomizableElementOptions = Pick<ElementOptions, 'style' | 'disabled' | 'validateOnChange'> & AutoCompleteOption;
34
35
  declare type ElementValueType = 'static' | 'reference';
35
36
  interface CardElementValue<T extends ElementValueType> {
36
37
  number?: T extends 'reference' ? DataElementReference : string;