import { t } from '../common'; export declare type FuncParam = t.Json | undefined; export declare type FuncResponse = any; export declare type FuncInvoker = (args: { params: FuncParam[]; }) => Promise; export declare type GetFunc = (args: IGetFuncArgs) => Promise; export declare type IGetFuncArgs = { namespace: string; name: string; }; export declare type FuncPromise = Promise & { eid: string; }; export declare type IFuncResponse = { ok: boolean; eid: string; elapsed: number; type: t.RefTarget; cell: string; formula: string; data?: T; error?: t.IFuncError; }; export declare type IFuncResponseMap = { [key: string]: t.IFuncResponse; }; export declare type IFuncManyResponse = { ok: boolean; eid: string; elapsed: number; list: t.IFuncResponse[]; map: IFuncResponseMap; }; export declare type IFuncTable = { cache: t.IMemoryCache; getCells: t.GetCells; refsTable: t.IRefsTable; getFunc: t.GetFunc; calculate(args?: { cells?: string | string[]; event$?: t.Subject; }): t.FuncPromise; }; export declare type IFuncTableResponse = { ok: boolean; eid: string; elapsed: number; list: t.IFuncResponse[]; map: t.ICellMap; }; export declare type FuncEvent = FuncOneEvent | FuncManyEvent; export declare type FuncOneEvent = IFuncBeginEvent | IFuncEndEvent; export declare type FuncManyEvent = IFuncManyBeginEvent | IFuncManyEndEvent; export declare type IFuncBeginEvent = { type: 'FUNC/begin'; payload: IFuncBegin; }; export declare type IFuncBegin = { eid: string; cell: string; formula: string; }; export declare type IFuncEndEvent = { type: 'FUNC/end'; payload: IFuncEnd; }; export declare type IFuncEnd = IFuncResponse; export declare type IFuncManyBeginEvent = { type: 'FUNC/many/begin'; payload: IFuncManyBegin; }; export declare type IFuncManyBegin = { eid: string; cells: string[]; }; export declare type IFuncManyEndEvent = { type: 'FUNC/many/end'; payload: IFuncManyEnd; }; export declare type IFuncManyEnd = IFuncManyResponse;