import { AnyObject, AnyFn, NumberRange } from '../../../../shared/types'; import { TRANS_CMD } from '../../../../components/card-reader-sdk/src/constants'; export declare namespace InsuranceType { export type ExecType = 'hisyb' | 'login'; export type IHOWindow = Window & { chrome: { webview: { addEventListener: (type: string, handler: AnyFn) => void; removeEventListener: (type: string, handler: AnyFn) => void; postMessage: (payload: any) => void; }; }; }; export type MessageDataType = { exec: ExecType; res: { transcmd: string; }; }; export type MessageType = { data: string | MessageDataType; }; export type PostMessageResult = { result: any; exec: T; res: any; }; export type CardReadParams = Partial<{ operatorname: string; operatorcode: string; location: string | number; needLogin: boolean; interfaceid: number | string; transtime: string; serialnumber: string; transcmd: TRANS_CMD; transdata: AnyObject; loginCode: string; transtype: 'YB0000' | 'IDCARD' | ''; transsystem: '10' | '11' | '99' | '12' | ''; transchannel: '101' | '102' | '103' | '104' | '999' | ''; }>; type MapperIar = T extends [infer F, ...infer Rest] ? MapperIar : Res; export type CardReadResult = { returncode: number | string; returnmsg: string; } & Partial<{ returndata: Partial<{ personinfo: Record<'address' | 'age' | 'birthday' | 'cardnum' | 'cardpwd' | 'folk' | 'idnumber' | 'location' | 'ownpay' | 'ptname' | 'pttype' | 'recordid' | 'sex' | 'updateflag', string>; cardinfo: Partial & { [K: string]: any; }>; iar1: Record<'acf01' | 'iaa01' | 'iab02' | 'iac03' | 'iad04' | 'iai03' | 'iak04' | 'iak05' | 'iak06' | 'iak22' | 'iar01' | 'iar10' | MapperIar>[number], string>; [K: string]: any; }>; transcmd: string; }>; export type CardReadOptions = Partial<{ basicParams: CardReadParams | (() => CardReadParams); selfWindow: any; CNSystemType: 'henan'; }>; export {}; }