@ixo/supamoto-bot-sdk
Version:
An SDK to easily interact with Supamoto bot db
15 lines (14 loc) • 641 B
TypeScript
import { ICustomer, ICustomerDecrypted } from '../types/db';
export declare function extractCustomerData(claimType: 'lead' | 'screening' | 'contract', claim: any): {
customerId: any;
givenName: any;
familyName: any;
nationalId: any;
} | {
customerId: any;
nationalId: any;
profileImage: any;
};
export declare function decryptCustomerDataField(field: Buffer, customerId: string, key: Buffer): string;
export declare function encryptCustomerDataField(field: string, customerId: string, key: Buffer): Buffer;
export declare function decryptCustomerData(customerData: ICustomer, encKey: Buffer): ICustomerDecrypted;