@basis-theory/basis-theory-js 1.22.2 → 1.23.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.
@@ -1,11 +1,11 @@
1
- import type { AtomicBank, ReactRequest, ReactResponse, UpdateAtomicBank } from '@basis-theory/basis-theory-elements-interfaces/models';
1
+ import type { AtomicBank, AtomicReactRequest, ReactResponse, UpdateAtomicBank } from '@basis-theory/basis-theory-elements-interfaces/models';
2
2
  import type { PaginatedQuery, RequestOptions } from '@basis-theory/basis-theory-elements-interfaces/sdk';
3
3
  import type { BasisTheoryServiceOptions } from '../../service';
4
4
  export declare const BasisTheoryAtomicBanks: {
5
5
  new (options: BasisTheoryServiceOptions): {
6
6
  update(id: string, request: UpdateAtomicBank, options?: RequestOptions | undefined): Promise<AtomicBank>;
7
7
  retrieveDecrypted(id: string, options?: RequestOptions | undefined): Promise<AtomicBank>;
8
- react(id: string, request: ReactRequest, options?: RequestOptions | undefined): Promise<ReactResponse>;
8
+ react(tokenId: string, request: AtomicReactRequest, options?: RequestOptions | undefined): Promise<ReactResponse>;
9
9
  readonly client: import("axios").AxiosInstance;
10
10
  };
11
11
  } & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Create<AtomicBank, Pick<AtomicBank, "bank" | "metadata">>) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Retrieve<AtomicBank>) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Delete) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").List<AtomicBank, PaginatedQuery>);
@@ -30,8 +30,8 @@ const BasisTheoryAtomicBanks = new _CrudBuilder.CrudBuilder(class BasisTheoryAto
30
30
  return this.client.get(`/${id}/decrypt`, (0, _common.createRequestConfig)(options)).then(_common.dataExtractor);
31
31
  }
32
32
 
33
- react(id, request, options) {
34
- return this.client.post(`/${id}/react`, request, (0, _common.createRequestConfig)(options, {
33
+ react(tokenId, request, options) {
34
+ return this.client.post(`/${tokenId}/react`, request, (0, _common.createRequestConfig)(options, {
35
35
  transformRequest: _common.transformAtomicReactionRequestSnakeCase,
36
36
  transformResponse: _common.proxyRaw
37
37
  })).then(_common.dataExtractor);
@@ -1,11 +1,11 @@
1
- import type { AtomicCard, ReactRequest, ReactResponse, UpdateAtomicCard } from '@basis-theory/basis-theory-elements-interfaces/models';
1
+ import type { AtomicCard, AtomicReactRequest, ReactResponse, UpdateAtomicCard } from '@basis-theory/basis-theory-elements-interfaces/models';
2
2
  import type { PaginatedQuery, RequestOptions } from '@basis-theory/basis-theory-elements-interfaces/sdk';
3
3
  import type { BasisTheoryServiceOptions } from '../../service';
4
4
  export declare const BasisTheoryAtomicCards: {
5
5
  new (options: BasisTheoryServiceOptions): {
6
6
  update(id: string, request: UpdateAtomicCard, options?: RequestOptions | undefined): Promise<AtomicCard>;
7
7
  retrieveDecrypted(id: string, options?: RequestOptions | undefined): Promise<AtomicCard>;
8
- react(id: string, request: ReactRequest, options?: RequestOptions | undefined): Promise<ReactResponse>;
8
+ react(tokenId: string, request: AtomicReactRequest, options?: RequestOptions | undefined): Promise<ReactResponse>;
9
9
  readonly client: import("axios").AxiosInstance;
10
10
  };
11
11
  } & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Create<AtomicCard, Pick<AtomicCard, "card" | "metadata">>) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Retrieve<AtomicCard>) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Delete) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").List<AtomicCard, PaginatedQuery>);
@@ -32,8 +32,8 @@ const BasisTheoryAtomicCards = new _CrudBuilder.CrudBuilder(class BasisTheoryAto
32
32
  return this.client.get(`/${id}/decrypt`, (0, _common.createRequestConfig)(options)).then(_common.dataExtractor);
33
33
  }
34
34
 
35
- react(id, request, options) {
36
- return this.client.post(`/${id}/react`, request, (0, _common.createRequestConfig)(options, {
35
+ react(tokenId, request, options) {
36
+ return this.client.post(`/${tokenId}/react`, request, (0, _common.createRequestConfig)(options, {
37
37
  transformRequest: _common.transformAtomicReactionRequestSnakeCase,
38
38
  transformResponse: _common.proxyRaw
39
39
  })).then(_common.dataExtractor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basis-theory/basis-theory-js",
3
- "version": "1.22.2",
3
+ "version": "1.23.0",
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
- "@basis-theory/basis-theory-elements-interfaces": "^3.4.0",
18
+ "@basis-theory/basis-theory-elements-interfaces": "^3.5.0",
19
19
  "axios": "^0.21.2",
20
20
  "camelcase-keys": "^6.2.2",
21
21
  "os": "^0.1.2",
@@ -4,5 +4,5 @@ export declare const BasisTheoryReactorFormulas: {
4
4
  new (options: import("../service/types").BasisTheoryServiceOptions): {
5
5
  readonly client: import("axios").AxiosInstance;
6
6
  };
7
- } & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Create<ReactorFormula, Pick<ReactorFormula, "name" | "type" | "code" | "description" | "sourceTokenType" | "icon" | "configuration" | "requestParameters">>) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Retrieve<ReactorFormula>) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Update<ReactorFormula, Pick<ReactorFormula, "name" | "type" | "code" | "description" | "sourceTokenType" | "icon" | "configuration" | "requestParameters">>) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Delete) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").List<ReactorFormula, ListReactorFormulaQuery>);
7
+ } & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Create<ReactorFormula, Pick<ReactorFormula, "name" | "type" | "code" | "description" | "icon" | "configuration" | "requestParameters">>) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Retrieve<ReactorFormula>) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Update<ReactorFormula, Pick<ReactorFormula, "name" | "type" | "code" | "description" | "icon" | "configuration" | "requestParameters">>) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Delete) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").List<ReactorFormula, ListReactorFormulaQuery>);
8
8
  export declare type BasisTheoryReactorFormulas = InstanceType<typeof BasisTheoryReactorFormulas>;
@@ -1,8 +1,9 @@
1
- import type { Reactor, CreateReactor } from '@basis-theory/basis-theory-elements-interfaces/models';
2
- import type { ListReactorQuery } from '@basis-theory/basis-theory-elements-interfaces/sdk';
1
+ import type { Reactor, CreateReactor, ReactResponse } from '@basis-theory/basis-theory-elements-interfaces/models';
2
+ import type { ListReactorQuery, ReactRequest, RequestOptions } from '@basis-theory/basis-theory-elements-interfaces/sdk';
3
3
  import type { BasisTheoryServiceOptions } from '../service';
4
4
  export declare const BasisTheoryReactors: {
5
5
  new (options: BasisTheoryServiceOptions): {
6
+ react(reactorId: string, request: ReactRequest, options?: RequestOptions | undefined): Promise<ReactResponse>;
6
7
  readonly client: import("axios").AxiosInstance;
7
8
  };
8
9
  } & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Create<Reactor, CreateReactor>) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Retrieve<Reactor>) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Update<Reactor, Pick<Reactor, "name" | "configuration">>) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Delete) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").List<Reactor, ListReactorQuery>);
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.BasisTheoryReactors = void 0;
7
7
 
8
+ var _common = require("../common");
9
+
8
10
  var _utils = require("../common/utils");
9
11
 
10
12
  var _service = require("../service");
@@ -22,5 +24,12 @@ const BasisTheoryReactors = new _CrudBuilder.CrudBuilder(class BasisTheoryReacto
22
24
  super(_options);
23
25
  }
24
26
 
27
+ react(reactorId, request, options) {
28
+ return this.client.post(`/${reactorId}/react`, request, (0, _common.createRequestConfig)(options, {
29
+ transformRequest: _common.proxyRaw,
30
+ transformResponse: _common.proxyRaw
31
+ })).then(_common.dataExtractor);
32
+ }
33
+
25
34
  }).create().retrieve().update().delete().list().build();
26
35
  exports.BasisTheoryReactors = BasisTheoryReactors;