import { RestoVersion, VATMode, VATLevel } from './globalConst'; import { IR8Phone } from './IR8Phone'; import { IR8Address } from './IR8Address'; import { IR8Config } from './IR8Config'; import { IR8ApiKeys } from './IR8ApiKeys'; /** FireStore Database Etab JSON Format. Same as IR8Etab. */ export declare type IR8EtabFS = IR8Etab; /** * Etab aka Restaurant * - Store Restomax Registration Info * - guid is used as entry in Map * - Firestore.docId === etab.guid * - Lic Etab have cmaxnum set by the COBOL accounting pgm * Trial Etab does not have a cmaxnum * * objClass: 1 * firestore.path: $db/etabs/etabs/$guid */ export interface IR8Etab { guid: string; cmaxnum?: string; cmaxGroup?: string; name: string; restoVersion?: RestoVersion; eol?: string; licToken?: string; currency: string; vatMode: VATMode; vatRates: { [key in VATLevel]: number; }; description?: string; companyName?: string; headOffice?: string; vatNr?: string; phoneNumbers?: { [key: string]: IR8Phone; }; addresses?: { [key: string]: IR8Address; }; config?: IR8Config; apiKeys?: IR8ApiKeys[]; } export declare function EtabInitialValue(): Partial; /** Default Validation Etab * Throw Error if fail */ export declare function CheckEtabIsValid(Obj: Partial | Partial): void; /** Default Validation Etab * return Error message if failure */ export declare function EtabIsValid(Obj: Partial | Partial): string; /** Serialize IR8Etab to Firestore JSON */ export declare function Etab2JSON(Obj: Partial): IR8EtabFS; /** Serialize Firestore JSON to IR8Etab. json can be undefined */ export declare function JSON2Etab(json: Partial | undefined, target: IR8Etab): void; /** New Etab from Firestore JSON */ export declare function JSONAsEtab(json?: Partial): IR8Etab;