@basis-theory/basis-theory-js 1.38.0 → 1.39.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.38.0",
3
+ "version": "1.39.0",
4
4
  "repository": "https://github.com/Basis-Theory/basis-theory-js",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -10,6 +10,11 @@ declare type DataObject<DataType = Primitive> = {
10
10
  };
11
11
  declare type DataArray<DataType> = Array<TokenData<DataType>>;
12
12
  declare type TokenData<DataType = Primitive> = Primitive | DataObject<DataType> | DataArray<DataType> | DataType;
13
+ declare type MaskObject = {
14
+ [member: string]: TokenMask;
15
+ };
16
+ declare type MaskArray = Array<TokenMask>;
17
+ declare type TokenMask = string | MaskObject | MaskArray;
13
18
  interface TokenEncryptionKey {
14
19
  key: string;
15
20
  alg: string;
@@ -29,11 +34,12 @@ interface Token<DataType = Primitive> extends TokenBase {
29
34
  encryption?: TokenEncryption;
30
35
  searchIndexes?: string[];
31
36
  fingerprintExpression?: string;
37
+ mask?: TokenMask;
32
38
  }
33
- declare type CreateToken<DataType = Primitive> = Pick<Token<DataType>, 'type' | 'data' | 'privacy' | 'metadata' | 'encryption' | 'searchIndexes' | 'fingerprintExpression'> & {
39
+ declare type CreateToken<DataType = Primitive> = Pick<Token<DataType>, 'type' | 'data' | 'privacy' | 'metadata' | 'encryption' | 'searchIndexes' | 'fingerprintExpression' | 'mask'> & {
34
40
  deduplicateToken?: boolean;
35
41
  };
36
- declare type UpdateToken<DataType = Primitive> = Partial<Pick<Token<DataType>, 'data' | 'metadata' | 'encryption' | 'searchIndexes' | 'fingerprintExpression'> & {
42
+ declare type UpdateToken<DataType = Primitive> = Partial<Pick<Token<DataType>, 'data' | 'metadata' | 'encryption' | 'searchIndexes' | 'fingerprintExpression' | 'mask'> & {
37
43
  privacy: Omit<TokenPrivacy, 'classification'>;
38
44
  deduplicateToken: boolean;
39
45
  }>;