@basis-theory/basis-theory-js 1.62.1 → 1.63.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.1",
3
+ "version": "1.63.0",
4
4
  "repository": "https://github.com/Basis-Theory/basis-theory-js",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -23,12 +23,11 @@ class BasisTheorySessions extends _service.BasisTheoryService {
23
23
  }
24
24
 
25
25
  create(options = {}) {
26
- const url = `/sessions`;
27
- return this.client.post(url, undefined, (0, _common.createRequestConfig)(options)).then(_utils.dataExtractor);
26
+ return this.client.post('/', undefined, (0, _common.createRequestConfig)(options)).then(_utils.dataExtractor);
28
27
  }
29
28
 
30
29
  authorize(authorizeSessionRequest, options = {}) {
31
- const url = `/sessions/authorize`;
30
+ const url = `/authorize`;
32
31
  return this.client.post(url, authorizeSessionRequest, (0, _common.createRequestConfig)(options)).then(_utils.dataExtractor);
33
32
  }
34
33
 
@@ -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,7 +3,7 @@ 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
  }