UNPKG

skyflow-node

Version:
118 lines (117 loc) 2.62 kB
export declare enum RedactionType { DEFAULT = "DEFAULT", PLAIN_TEXT = "PLAIN_TEXT", MASKED = "MASKED", REDACTED = "REDACTED" } export declare enum RequestMethod { GET = "GET", POST = "POST", PUT = "PUT", PATCH = "PATCH", DELETE = "DELETE" } export declare enum LogLevel { WARN = "WARN", INFO = "INFO", DEBUG = "DEBUG", ERROR = "ERROR", OFF = "OFF" } export declare enum MessageType { LOG = "LOG", WARN = "WARN", ERROR = "ERROR" } export interface IInsertRecordInput { records: IInsertRecord[]; } export interface IInsertRecord { table: string; fields: Record<string, any>; } export interface IRevealRecord { token: string; redaction?: RedactionType; } export interface IRevealResponseType { records?: Record<string, string>[]; errors?: Record<string, any>[]; } export interface IDetokenizeInput { records: IRevealRecord[]; } export interface ISkyflowIdRecord { ids?: string[]; redaction?: RedactionType; table: string; columnName?: string; columnValues?: string[]; } export interface ISkyflowRecord { ids: string[]; redaction: RedactionType; table: string; } export interface IGetByIdInput { records: ISkyflowRecord[]; } export interface IGetInput { records: ISkyflowIdRecord[]; } export interface IConnectionConfig { connectionURL: string; methodName: RequestMethod; pathParams?: any; queryParams?: any; requestBody?: any; requestHeader?: any; } export declare const TYPES: { INSERT: string; DETOKENIZE: string; GET_BY_ID: string; GET: string; INVOKE_CONNECTION: string; }; export declare enum ContentType { APPLICATIONORJSON = "application/json", TEXTORPLAIN = "text/plain", TEXTORXML = "text/xml", FORMURLENCODED = "application/x-www-form-urlencoded", FORMDATA = "multipart/form-data" } export interface IUpsertOption { table: string; column: string; } export interface IInsertOptions { tokens?: boolean; upsert?: IUpsertOption[]; continueOnError?: boolean; } export interface IUpdateRecord { id: string; table: string; fields: Record<string, any>; } export interface IUpdateInput { records: IUpdateRecord[]; } export interface IUpdateOptions { tokens: boolean; } export interface IGetOptions { tokens?: boolean; encodeURI?: boolean; } export interface IDeleteRecord { id: string; table: string; } export interface IDeleteInput { records: IDeleteRecord[]; } export interface IDeleteOptions { } export declare const SDK_METRICS_HEADER_KEY = "sky-metadata";