@basis-theory/basis-theory-js 1.51.0 → 1.52.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.
@@ -10,5 +10,5 @@ export declare const BasisTheoryApplications: {
10
10
  regenerateKey(id: string, options?: RequestOptions | undefined): Promise<Application>;
11
11
  readonly client: import("axios").AxiosInstance;
12
12
  };
13
- } & (new (...args: any[]) => import("../types/sdk/services/shared").Create<Application, CreateApplication>) & (new (...args: any[]) => import("../types/sdk/services/shared").Retrieve<Application>) & (new (...args: any[]) => import("../types/sdk/services/shared").Update<Application, Partial<Pick<Application, "name" | "permissions">>>) & (new (...args: any[]) => import("../types/sdk/services/shared").Delete) & (new (...args: any[]) => import("../types/sdk/services/shared").List<Application, ListApplicationsQuery>);
13
+ } & (new (...args: any[]) => import("../types/sdk/services/shared").Create<Application, CreateApplication>) & (new (...args: any[]) => import("../types/sdk/services/shared").Retrieve<Application>) & (new (...args: any[]) => import("../types/sdk/services/shared").Update<Application, Partial<Pick<Application, "name" | "permissions" | "rules">>>) & (new (...args: any[]) => import("../types/sdk/services/shared").Delete) & (new (...args: any[]) => import("../types/sdk/services/shared").List<Application, ListApplicationsQuery>);
14
14
  export declare type BasisTheoryApplications = InstanceType<typeof BasisTheoryApplications>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basis-theory/basis-theory-js",
3
- "version": "1.51.0",
3
+ "version": "1.52.0",
4
4
  "repository": "https://github.com/Basis-Theory/basis-theory-js",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -1,15 +1,25 @@
1
1
  import type { Auditable } from './shared';
2
2
  declare const APPLICATION_TYPES: readonly ["private", "public", "management"];
3
+ declare const TRANSFORM_TYPES: readonly ["mask", "redact", "reveal"];
3
4
  declare type ApplicationType = typeof APPLICATION_TYPES[number];
5
+ declare type TransformType = typeof TRANSFORM_TYPES[number];
4
6
  interface Application extends Auditable {
5
7
  id: string;
6
8
  tenantId: string;
7
9
  name: string;
8
10
  key?: string;
9
11
  type: ApplicationType;
12
+ permissions?: string[];
13
+ rules?: AccessRule[];
14
+ }
15
+ interface AccessRule {
16
+ description: string;
17
+ priority: number;
18
+ container: string;
19
+ transform: TransformType;
10
20
  permissions: string[];
11
21
  }
12
- declare type CreateApplication = Pick<Application, 'name' | 'type'> & Partial<Pick<Application, 'permissions'>>;
13
- declare type UpdateApplication = Partial<Pick<Application, 'name' | 'permissions'>>;
14
- export type { ApplicationType, Application, CreateApplication, UpdateApplication, };
15
- export { APPLICATION_TYPES };
22
+ declare type CreateApplication = Pick<Application, 'name' | 'type'> & Partial<Pick<Application, 'permissions' | 'rules'>>;
23
+ declare type UpdateApplication = Partial<Pick<Application, 'name' | 'permissions' | 'rules'>>;
24
+ export type { ApplicationType, Application, CreateApplication, TransformType, UpdateApplication, };
25
+ export { APPLICATION_TYPES, TRANSFORM_TYPES };
@@ -3,6 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.APPLICATION_TYPES = void 0;
6
+ exports.TRANSFORM_TYPES = exports.APPLICATION_TYPES = void 0;
7
7
  const APPLICATION_TYPES = ['private', 'public', 'management'];
8
- exports.APPLICATION_TYPES = APPLICATION_TYPES;
8
+ exports.APPLICATION_TYPES = APPLICATION_TYPES;
9
+ const TRANSFORM_TYPES = ['mask', 'redact', 'reveal'];
10
+ exports.TRANSFORM_TYPES = TRANSFORM_TYPES;
@@ -31,18 +31,18 @@ interface TokenPrivacy {
31
31
  interface Token<DataType = Primitive> extends TokenBase {
32
32
  data: TokenData<DataType>;
33
33
  privacy?: TokenPrivacy;
34
- container?: string;
34
+ containers?: string[];
35
35
  encryption?: TokenEncryption;
36
36
  searchIndexes?: string[];
37
37
  fingerprintExpression?: string;
38
38
  mask?: TokenMask;
39
39
  expiresAt?: string;
40
40
  }
41
- declare type CreateToken<DataType = Primitive> = Pick<Token<DataType>, 'type' | 'data' | 'privacy' | 'container' | 'metadata' | 'encryption' | 'searchIndexes' | 'fingerprintExpression' | 'mask' | 'expiresAt'> & {
41
+ declare type CreateToken<DataType = Primitive> = Pick<Token<DataType>, 'type' | 'data' | 'privacy' | 'containers' | 'metadata' | 'encryption' | 'searchIndexes' | 'fingerprintExpression' | 'mask' | 'expiresAt'> & {
42
42
  deduplicateToken?: boolean;
43
43
  id?: string;
44
44
  };
45
- declare type UpdateToken<DataType = Primitive> = Partial<Pick<Token<DataType>, 'data' | 'container' | 'metadata' | 'encryption' | 'searchIndexes' | 'fingerprintExpression' | 'mask'> & {
45
+ declare type UpdateToken<DataType = Primitive> = Partial<Pick<Token<DataType>, 'data' | 'containers' | 'metadata' | 'encryption' | 'searchIndexes' | 'fingerprintExpression' | 'mask'> & {
46
46
  privacy: Omit<TokenPrivacy, 'classification'>;
47
47
  deduplicateToken: boolean;
48
48
  }>;