@basis-theory/basis-theory-js
Advanced tools
Comparing version 2.3.0 to 2.3.1
@@ -169,3 +169,4 @@ "use strict"; | ||
const elements = await (0, _elements.loadElements)(this.initOptions.elementsClientUrl); | ||
await elements.init(apiKey, elementsBaseUrl.toString().replace(/\/$/u, '')); | ||
const elementsUseNgApi = this.initOptions.elementsUseNgApi || false; | ||
await elements.init(apiKey, elementsBaseUrl.toString().replace(/\/$/u, ''), elementsUseNgApi); | ||
this.elements = elements; | ||
@@ -172,0 +173,0 @@ } // these should be set by the init call only. |
{ | ||
"name": "@basis-theory/basis-theory-js", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"repository": "https://github.com/Basis-Theory/basis-theory-js", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -56,3 +56,3 @@ import type { HttpClient } from '../../types/sdk'; | ||
interface BasisTheoryElementsInternal extends BasisTheoryElements { | ||
init: (apiKey: string | undefined, elementsBaseUrl: string) => Promise<BasisTheoryElements>; | ||
init: (apiKey: string | undefined, elementsBaseUrl: string, elementsUseNgApi: boolean | undefined) => Promise<BasisTheoryElements>; | ||
hasElement: (payload: unknown) => boolean; | ||
@@ -59,0 +59,0 @@ client: HttpClient; |
@@ -9,2 +9,3 @@ import { AutoCompleteValue, DataElementReference } from './shared'; | ||
type: ElementType; | ||
useNgApi: boolean | undefined; | ||
} | ||
@@ -11,0 +12,0 @@ declare enum InputMode { |
@@ -20,2 +20,3 @@ import type { BasisTheoryElements } from '../../types/elements'; | ||
elementsClientUrl?: string; | ||
elementsUseNgApi?: boolean; | ||
} | ||
@@ -22,0 +23,0 @@ interface BasisTheoryInit { |
156421
3410