UNPKG

@piiano/vault-client

Version:

Piiano Vault generated typescript client

53 lines 3.04 kB
import type { InputObject } from './InputObject'; import type { PropertyName } from './PropertyName'; import type { Tag } from './Tag'; import type { TokenType } from './TokenType'; export type TokenizeRequest = { type: TokenType; object: InputObject; /** * A list of the properties to tokenize. */ props?: Array<PropertyName>; /** * User provided token ID, up to 128 chars, using letters (a-z, A-Z), numbers (0-9), hyphens (-), and underscores (_). The user provided ID can not be used with 'fptemplate' and 'fpprops' parameters. For `randomized` and `pointer` types, it must be unique. For `pci` and `pci_oneway` types, it must reuse the ID of any existing token which was created on the same collection with the same values and scope. Otherwise, it should be unique. For `deterministic` type, it must align exactly with the deterministic ID based on the collection, tokenized object, property values, and scope. */ token_id?: string; /** * A classification for the token. * By default for these token types: `deterministic`, `pci` and `pci_oneway`, the scope is bound per collection. This implies that two identical tokens with the same scope on different collection will result with different token_ids. You can force the scope to apply globally by setting the suffix of the scope value to start with `global:`. * */ scope?: string; /** * Tags to attach to the token. Maximum 10. * */ tags?: Array<Tag>; /** * Tags to validate as unique in tenant scope. Must be subset of 'tags'. Note: this operation has a performance impact to be able to ensure the uniqueness of the tags prior to the insertion operation. * */ ensure_unique_tenant_tags?: Array<Tag>; /** * When `fields` is included in the request body, whether to store the property values as an object in the collection. The token is owned by the new object. Default is false. * */ store_object?: boolean; /** * Properties used by the format preserving template for the ID generation. The templates require these properties: * - the `primary_account_number` template requires a property of type `CC_NUMBER`. The token ID is generated from this property by retaining the first six and last four digits and randomizing the remaining digits. * - [custom format-preserving templates](/guides/tokenize-personal-data/custom-js-format-preserving-template) do not require any properties. * */ fpprops?: Array<string>; /** * The template used to format the generated ID. Supports: * - `primary_account_number` that generates an ID that is a valid 16-digit PAN (credit card number). * - function name formatted as `<bundle-name>.<function-name>` for [custom format-preserving templates](/guides/tokenize-personal-data/custom-js-format-preserving-template). * If empty, the format of the ID is a UUID. * */ fptemplate?: string; }; //# sourceMappingURL=TokenizeRequest.d.ts.map