@basis-theory/basis-theory-js 2.3.0 → 2.3.2
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
|
@@ -166,7 +166,8 @@ class BasisTheory {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
const elements = await (0, _elements.loadElements)(this.initOptions.elementsClientUrl);
|
|
169
|
-
|
|
169
|
+
const elementsUseNgApi = this.initOptions.elementsUseNgApi || false;
|
|
170
|
+
await elements.init(apiKey, elementsBaseUrl.toString().replace(/\/$/u, ''), elementsUseNgApi);
|
|
170
171
|
this.elements = elements;
|
|
171
172
|
} // these should be set by the init call only.
|
|
172
173
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basis-theory/basis-theory-js",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"repository": "https://github.com/Basis-Theory/basis-theory-js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"!*.bundle.js"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"axios": "^1.
|
|
18
|
+
"axios": "^1.6.0",
|
|
19
19
|
"camelcase-keys": "^6.2.2",
|
|
20
20
|
"csstype": "^3.0.11",
|
|
21
21
|
"os": "^0.1.2",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"resolutions": {
|
|
27
27
|
"glob-parent": "^5.1.2",
|
|
28
|
-
"postcss": "^8.
|
|
28
|
+
"postcss": "^8.4.31",
|
|
29
29
|
"normalize-url": "^5.3.1",
|
|
30
30
|
"is-svg": "^4.2.2",
|
|
31
31
|
"yargs-parser": "^21.0.0",
|
|
@@ -53,7 +53,7 @@ interface BasisTheoryElements extends Tokenize {
|
|
|
53
53
|
createElement(type: 'cardVerificationCode', options: CreateCardVerificationCodeElementOptions): CardVerificationCodeElement;
|
|
54
54
|
}
|
|
55
55
|
interface BasisTheoryElementsInternal extends BasisTheoryElements {
|
|
56
|
-
init: (apiKey: string | undefined, elementsBaseUrl: string) => Promise<BasisTheoryElements>;
|
|
56
|
+
init: (apiKey: string | undefined, elementsBaseUrl: string, elementsUseNgApi: boolean | undefined) => Promise<BasisTheoryElements>;
|
|
57
57
|
hasElement: (payload: unknown) => boolean;
|
|
58
58
|
client: HttpClient;
|
|
59
59
|
}
|
package/types/sdk/sdk.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ interface BasisTheoryInitOptionsWithElements extends BasisTheoryInitOptions {
|
|
|
17
17
|
elements: true;
|
|
18
18
|
elementsBaseUrl?: string;
|
|
19
19
|
elementsClientUrl?: string;
|
|
20
|
+
elementsUseNgApi?: boolean;
|
|
20
21
|
}
|
|
21
22
|
interface BasisTheoryInit {
|
|
22
23
|
init(apiKey: string, options?: BasisTheoryInitOptionsWithoutElements): Promise<BasisTheory>;
|