import type { WorkBook, WorkSheet } from 'xlsx'; import type { RevisionIdMeta } from '@feedmepos/inventory-core'; import type { FdoMenuV4 } from '@feedmepos/menu/entity'; export declare enum ReservedSheetNames { Ingredients = "Ingredients" } export interface AdjustmentItemRow { type?: string; code?: string | null; name?: string; /** abbrev for base unit or measurement unit */ unit?: string; enabled?: boolean; } export interface TemplateInfo { id: string; name: string; reference: string; locations: string[]; } export interface ImportCreateResult { type: 'create'; template: Omit; excelSheetName: string; errors: string[]; } export interface ImportUpdateResult { type: 'update'; original: FdoAdjustmentTemplate; template: FdoAdjustmentTemplate & RevisionIdMeta; excelSheetName: string; errors: string[]; } export type ImportResult = { invalidExcel: boolean; invalidExcelMessage?: string; importCreateResult: ImportCreateResult[]; importUpdateResult: ImportUpdateResult[]; }; export type ObjectWithIndex = { index: number; data: T; }; export declare const FakeUnit: FdoInventoryUnit; export declare function templateItemToExcelRow(item: FdoAdjustmentTemplateItem, inventory: FdoInventory, menu?: FdoMenuV4 | null): AdjustmentItemRow[]; export type ColIdHeader = { id: keyof T; name: string; }; export declare function getExcelHeaders(): ColIdHeader[]; export declare function exportTemplates(templates: FdoAdjustmentTemplate[]): string; export declare function exportImportTemplate(): string; /** @returns empty array if for all locations */ export declare function extractLocations(locationRow: string[]): { location?: FdoInventoryLocation; errors: string[]; }[]; export declare function worksheetToTemplateMeta(sheet: WorkSheet): TemplateInfo; export declare function worksheetToItemRow(sheet: WorkSheet): ObjectWithIndex[]; export declare function getItemToCreateUpdate(workbook: WorkBook): ImportResult;