@basis-theory/basis-theory-js 1.79.0 → 1.79.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basis-theory/basis-theory-js",
3
- "version": "1.79.0",
3
+ "version": "1.79.2",
4
4
  "repository": "https://github.com/Basis-Theory/basis-theory-js",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -1,8 +1,8 @@
1
1
  import type { BasisTheoryServiceOptions } from '../service';
2
- import type { CreateProxy, Proxy } from '../types/models';
2
+ import type { CreateProxy, Proxy, PatchProxy } from '../types/models';
3
3
  import type { ListProxyQuery } from '../types/sdk';
4
4
  export declare const BasisTheoryProxies: {
5
5
  new (options: BasisTheoryServiceOptions): {
6
6
  readonly client: import("axios").AxiosInstance;
7
7
  };
8
- } & (new (...args: any[]) => import("../types/sdk/services/shared").Create<Proxy, CreateProxy>) & (new (...args: any[]) => import("../types/sdk/services/shared").Retrieve<Proxy>) & (new (...args: any[]) => import("../types/sdk/services/shared").Update<Proxy, CreateProxy>) & (new (...args: any[]) => import("../types/sdk/services/shared").Patch<Partial<CreateProxy>>) & (new (...args: any[]) => import("../types/sdk/services/shared").Delete) & (new (...args: any[]) => import("../types/sdk/services/shared").List<Proxy, ListProxyQuery>);
8
+ } & (new (...args: any[]) => import("../types/sdk/services/shared").Create<Proxy, CreateProxy>) & (new (...args: any[]) => import("../types/sdk/services/shared").Retrieve<Proxy>) & (new (...args: any[]) => import("../types/sdk/services/shared").Update<Proxy, CreateProxy>) & (new (...args: any[]) => import("../types/sdk/services/shared").Patch<PatchProxy>) & (new (...args: any[]) => import("../types/sdk/services/shared").Delete) & (new (...args: any[]) => import("../types/sdk/services/shared").List<Proxy, ListProxyQuery>);
@@ -1,10 +1,10 @@
1
1
  import type { BasisTheoryServiceOptions } from '../service';
2
- import type { Reactor, CreateReactor, UpdateReactor, ReactResponse } from '../types/models';
2
+ import type { Reactor, CreateReactor, UpdateReactor, ReactResponse, PatchReactor } from '../types/models';
3
3
  import type { ListReactorQuery, ReactRequest, RequestOptions } from '../types/sdk';
4
4
  export declare const BasisTheoryReactors: {
5
5
  new (options: BasisTheoryServiceOptions): {
6
6
  react(reactorId: string, request: ReactRequest, options?: RequestOptions): Promise<ReactResponse>;
7
7
  readonly client: import("axios").AxiosInstance;
8
8
  };
9
- } & (new (...args: any[]) => import("../types/sdk/services/shared").Create<Reactor, CreateReactor>) & (new (...args: any[]) => import("../types/sdk/services/shared").Retrieve<Reactor>) & (new (...args: any[]) => import("../types/sdk/services/shared").Update<Reactor, UpdateReactor>) & (new (...args: any[]) => import("../types/sdk/services/shared").Patch<Partial<UpdateReactor>>) & (new (...args: any[]) => import("../types/sdk/services/shared").Delete) & (new (...args: any[]) => import("../types/sdk/services/shared").List<Reactor, ListReactorQuery>);
9
+ } & (new (...args: any[]) => import("../types/sdk/services/shared").Create<Reactor, CreateReactor>) & (new (...args: any[]) => import("../types/sdk/services/shared").Retrieve<Reactor>) & (new (...args: any[]) => import("../types/sdk/services/shared").Update<Reactor, UpdateReactor>) & (new (...args: any[]) => import("../types/sdk/services/shared").Patch<PatchReactor>) & (new (...args: any[]) => import("../types/sdk/services/shared").Delete) & (new (...args: any[]) => import("../types/sdk/services/shared").List<Reactor, ListReactorQuery>);
10
10
  export type BasisTheoryReactors = InstanceType<typeof BasisTheoryReactors>;
@@ -10,3 +10,4 @@ export * from './tokenize';
10
10
  export * from './proxies';
11
11
  export * from './banks';
12
12
  export * from './cards';
13
+ export * from './util';
@@ -158,4 +158,17 @@ Object.keys(_cards).forEach(function (key) {
158
158
  return _cards[key];
159
159
  }
160
160
  });
161
+ });
162
+
163
+ var _util = require("./util");
164
+
165
+ Object.keys(_util).forEach(function (key) {
166
+ if (key === "default" || key === "__esModule") return;
167
+ if (key in exports && exports[key] === _util[key]) return;
168
+ Object.defineProperty(exports, key, {
169
+ enumerable: true,
170
+ get: function () {
171
+ return _util[key];
172
+ }
173
+ });
161
174
  });
@@ -1,13 +1,12 @@
1
1
  import type { Application } from './applications';
2
2
  import type { Auditable } from './shared';
3
+ import type { Nullable } from './util';
3
4
  interface Proxy extends Auditable {
4
5
  id: string;
5
6
  key: string;
6
7
  tenantId: string;
7
8
  name: string;
8
9
  destinationUrl: string;
9
- requestReactorId?: string;
10
- responseReactorId?: string;
11
10
  requestTransform?: ProxyTransform;
12
11
  responseTransform?: ProxyTransform;
13
12
  applicationId?: string;
@@ -17,9 +16,11 @@ interface Proxy extends Auditable {
17
16
  interface ProxyTransform {
18
17
  code: string;
19
18
  }
20
- type CreateProxy = Pick<Proxy, 'name' | 'destinationUrl' | 'requestReactorId' | 'responseReactorId' | 'requestTransform' | 'responseTransform' | 'configuration' | 'requireAuth'> & {
19
+ type CreateProxy = Pick<Proxy, 'name' | 'destinationUrl' | 'requestTransform' | 'responseTransform' | 'configuration' | 'requireAuth'> & {
21
20
  application?: Pick<Application, 'id'>;
22
21
  };
23
22
  type UpdateProxy = CreateProxy;
24
- type PatchProxy = Partial<UpdateProxy>;
23
+ type PatchProxy = Omit<Partial<UpdateProxy>, 'configuration'> & {
24
+ configuration?: Nullable<UpdateProxy['configuration']>;
25
+ };
25
26
  export type { Proxy, CreateProxy, UpdateProxy, PatchProxy };
@@ -1,6 +1,7 @@
1
1
  import type { Application } from './applications';
2
2
  import type { ReactorFormula } from './reactor-formulas';
3
3
  import type { Auditable } from './shared';
4
+ import type { Nullable } from './util';
4
5
  interface Reactor extends Auditable {
5
6
  id: string;
6
7
  tenantId: string;
@@ -16,5 +17,7 @@ type CreateReactor = Pick<Reactor, 'name' | 'configuration'> & {
16
17
  type UpdateReactor = Pick<Reactor, 'name' | 'configuration'> & {
17
18
  application?: Pick<Application, 'id'>;
18
19
  };
19
- type PatchReactor = Partial<UpdateReactor>;
20
+ type PatchReactor = Omit<Partial<UpdateReactor>, 'configuration'> & {
21
+ configuration?: Nullable<UpdateReactor['configuration']>;
22
+ };
20
23
  export type { Reactor, CreateReactor, UpdateReactor, PatchReactor };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Make all properties in T nullable
3
+ */
4
+ type Nullable<T> = {
5
+ [P in keyof T]: T[P] | null;
6
+ };
7
+ /**
8
+ * Make selected properties in T nullable
9
+ */
10
+ type NullableProps<T, K extends keyof T> = T | Nullable<Pick<T, K>>;
11
+ export type { Nullable, NullableProps };
@@ -0,0 +1 @@
1
+ "use strict";