@basis-theory/basis-theory-js 1.62.0 → 1.62.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.
@@ -5,12 +5,38 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.BasisTheoryApiError = void 0;
7
7
 
8
- class BasisTheoryApiError extends Error {
8
+ function _extendableBuiltin(cls) {
9
+ function ExtendableBuiltin() {
10
+ var instance = Reflect.construct(cls, Array.from(arguments));
11
+ Object.setPrototypeOf(instance, Object.getPrototypeOf(this));
12
+ return instance;
13
+ }
14
+
15
+ ExtendableBuiltin.prototype = Object.create(cls.prototype, {
16
+ constructor: {
17
+ value: cls,
18
+ enumerable: false,
19
+ writable: true,
20
+ configurable: true
21
+ }
22
+ });
23
+
24
+ if (Object.setPrototypeOf) {
25
+ Object.setPrototypeOf(ExtendableBuiltin, cls);
26
+ } else {
27
+ ExtendableBuiltin.__proto__ = cls;
28
+ }
29
+
30
+ return ExtendableBuiltin;
31
+ }
32
+
33
+ class BasisTheoryApiError extends _extendableBuiltin(Error) {
9
34
  constructor(message, status, data) {
10
35
  super(message);
11
36
  this.status = status;
12
37
  this.data = data;
13
38
  this.name = 'BasisTheoryApiError';
39
+ Object.setPrototypeOf(this, BasisTheoryApiError.prototype);
14
40
  }
15
41
 
16
42
  }
@@ -5,12 +5,38 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.BasisTheoryValidationError = void 0;
7
7
 
8
- class BasisTheoryValidationError extends Error {
8
+ function _extendableBuiltin(cls) {
9
+ function ExtendableBuiltin() {
10
+ var instance = Reflect.construct(cls, Array.from(arguments));
11
+ Object.setPrototypeOf(instance, Object.getPrototypeOf(this));
12
+ return instance;
13
+ }
14
+
15
+ ExtendableBuiltin.prototype = Object.create(cls.prototype, {
16
+ constructor: {
17
+ value: cls,
18
+ enumerable: false,
19
+ writable: true,
20
+ configurable: true
21
+ }
22
+ });
23
+
24
+ if (Object.setPrototypeOf) {
25
+ Object.setPrototypeOf(ExtendableBuiltin, cls);
26
+ } else {
27
+ ExtendableBuiltin.__proto__ = cls;
28
+ }
29
+
30
+ return ExtendableBuiltin;
31
+ }
32
+
33
+ class BasisTheoryValidationError extends _extendableBuiltin(Error) {
9
34
  constructor(message, details, validation) {
10
35
  super(message);
11
36
  this.details = details;
12
37
  this.validation = validation;
13
38
  this.name = 'BasisTheoryValidationError';
39
+ Object.setPrototypeOf(this, BasisTheoryValidationError.prototype);
14
40
  }
15
41
 
16
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basis-theory/basis-theory-js",
3
- "version": "1.62.0",
3
+ "version": "1.62.2",
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