@basis-theory/react-elements 1.17.0 → 1.19.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/README.md CHANGED
@@ -8,13 +8,13 @@ A React wrapper for [Basis Theory](https://basistheory.com/) JS SDK.
8
8
 
9
9
  ## Installation
10
10
 
11
- Using [Node Package Manager](https://docs.npmjs.com/)
11
+ Using [Node Package Manager]([https://docs.npmjs.com/](https://www.npmjs.com/package/@basis-theory/react-elements))
12
12
 
13
13
  ```sh
14
14
  npm install --save @basis-theory/react-elements
15
15
  ```
16
16
 
17
- Using [Yarn](https://classic.yarnpkg.com/en/docs/)
17
+ Using [Yarn]([https://classic.yarnpkg.com/en/docs/](https://classic.yarnpkg.com/en/package/@basis-theory/react-elements))
18
18
 
19
19
  ```sh
20
20
  yarn add @basis-theory/react-elements
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basis-theory/react-elements",
3
- "version": "1.17.0",
3
+ "version": "1.19.0",
4
4
  "repository": "https://github.com/basis-theory/react-elements",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -30,7 +30,7 @@
30
30
  "tag": "latest"
31
31
  },
32
32
  "dependencies": {
33
- "@basis-theory/web-elements": "1.17.0"
33
+ "@basis-theory/web-elements": "1.19.0"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
package/types/index.d.ts CHANGED
@@ -352,14 +352,17 @@ export type Token<DataType = Primitive> = TokenBase<DataType> & {
352
352
  tenantId: string;
353
353
  fingerprint?: string;
354
354
  metadata?: Record<string, string>;
355
+ _debug?: Record<string, unknown>;
355
356
  };
356
357
  export type CreateTokenModel<DataType = Primitive> = Pick<Token<DataType>, 'type' | 'data' | 'privacy' | 'containers' | 'metadata' | 'encryption' | 'searchIndexes' | 'fingerprintExpression' | 'mask' | 'expiresAt'> & {
357
358
  deduplicateToken?: boolean;
358
359
  id?: string;
360
+ _debug?: Record<string, unknown>;
359
361
  };
360
362
  export type UpdateTokenModel<DataType = Primitive> = Partial<Pick<Token<DataType>, 'data' | 'containers' | 'metadata' | 'encryption' | 'searchIndexes' | 'fingerprintExpression' | 'mask' | 'expiresAt'> & {
361
363
  privacy: Omit<TokenPrivacy, 'classification'>;
362
364
  deduplicateToken: boolean;
365
+ _debug?: Record<string, unknown>;
363
366
  }>;
364
367
  export type EncryptTokenModel<DataType = Primitive> = {
365
368
  tokenRequests: {
@@ -368,15 +371,19 @@ export type EncryptTokenModel<DataType = Primitive> = {
368
371
  public_key: string;
369
372
  key_id: string;
370
373
  };
371
- export type EncryptedToken = {
374
+ type EncryptedSingleToken = {
372
375
  encrypted: string;
373
376
  type: TokenBase['type'];
374
377
  };
378
+ type EncryptedMultipleTokens = Record<string, EncryptedSingleToken>;
379
+ export type EncryptedToken = EncryptedSingleToken | EncryptedMultipleTokens;
375
380
  export type TokenizeObject<DataType = Primitive> = {
376
381
  [key: string]: Primitive | TokenizeObject<DataType> | TokenizeArray<DataType> | DataType;
377
382
  };
378
383
  export type TokenizeArray<DataType = Primitive> = Array<Primitive | TokenizeObject<DataType> | TokenizeArray<DataType> | DataType>;
379
- export type TokenizeDataModel<DataType = Primitive> = TokenizeArray<DataType> | TokenizeObject<DataType>;
384
+ export type TokenizeDataModel<DataType = Primitive> = TokenizeArray<DataType> | (TokenizeObject<DataType> & {
385
+ _debug?: Record<string, unknown>;
386
+ });
380
387
  export interface Card {
381
388
  number: string;
382
389
  expirationMonth?: number;
@@ -428,6 +435,7 @@ export type TokenIntent<DataType = DataObject> = (TokenBase<DataType> & Omit<Aud
428
435
  tenantId: string;
429
436
  expiresAt: string;
430
437
  fingerprint?: string;
438
+ _debug?: Record<string, unknown>;
431
439
  }) & (TokenTypeMap[TokenTypesForTokenIntents] | TokenIntentCardDetails | TokenIntentBankDetails | {
432
440
  type: 'token';
433
441
  });