@basis-theory/basis-theory-js 4.17.1 → 4.18.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/BasisTheory.js CHANGED
@@ -186,7 +186,8 @@ class BasisTheory {
186
186
 
187
187
  const elements = await (0, _elements.loadElements)(this.initOptions.elementsClientUrl);
188
188
  const elementsUseNgApi = this.initOptions.elementsUseNgApi || false;
189
- await elements.init(apiKey, elementsBaseUrl.toString().replace(/\/$/u, ''), elementsUseNgApi);
189
+ const disableTelemetry = this.initOptions.disableTelemetry || false;
190
+ await elements.init(apiKey, elementsBaseUrl.toString().replace(/\/$/u, ''), elementsUseNgApi, disableTelemetry);
190
191
  this.elements = elements;
191
192
  } // these should be set by the init call only.
192
193
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basis-theory/basis-theory-js",
3
- "version": "4.17.1",
3
+ "version": "4.18.0",
4
4
  "repository": "https://github.com/Basis-Theory/basis-theory-js",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -59,7 +59,7 @@ interface BasisTheoryElements extends Tokenize {
59
59
  createElement(type: 'cardVerificationCode', options: CreateCardVerificationCodeElementOptions): CardVerificationCodeElement;
60
60
  }
61
61
  interface BasisTheoryElementsInternal extends BasisTheoryElements {
62
- init: (apiKey: string | undefined, elementsBaseUrl: string, elementsUseNgApi: boolean | undefined) => Promise<BasisTheoryElements>;
62
+ init: (apiKey: string | undefined, elementsBaseUrl: string, elementsUseNgApi: boolean | undefined, disableTelemetry: boolean | undefined) => Promise<BasisTheoryElements>;
63
63
  hasElement: (payload: unknown) => boolean;
64
64
  client: HttpClient;
65
65
  }
@@ -8,6 +8,7 @@ interface ElementInternalOptions {
8
8
  baseUrl: string;
9
9
  type: ElementType;
10
10
  useNgApi: boolean | undefined;
11
+ disableTelemetry?: boolean | undefined;
11
12
  }
12
13
  declare enum InputMode {
13
14
  DECIMAL = "decimal",
@@ -18,6 +18,7 @@ interface BasisTheoryInitOptionsWithElements extends BasisTheoryInitOptions {
18
18
  elementsBaseUrl?: string;
19
19
  elementsClientUrl?: string;
20
20
  elementsUseNgApi?: boolean;
21
+ disableTelemetry?: boolean;
21
22
  }
22
23
  interface BasisTheoryInit {
23
24
  init(apiKey: string, options?: BasisTheoryInitOptionsWithoutElements): Promise<BasisTheory>;