import { t } from '../common'; export declare type RefTarget = 'VALUE' | 'FUNC' | 'REF' | 'RANGE' | 'UNKNOWN'; export declare type RefDirection = 'IN' | 'OUT'; export declare type RefGetValue = (key: string) => Promise; export declare type RefGetKeys = () => Promise; export declare type IRefs = { in: IRefsIn; out: IRefsOut; }; export declare type IRefsUpdateArgs = { key: string; from?: string; to?: string; }; export declare type RefsTableUpdate = { ok: boolean; changed: IRefsUpdateArgs[]; keys: string[]; refs: IRefs; errors: t.IRefError[]; }; export declare type IRefsTable = { event$: t.Observable; cache: t.IMemoryCache; refs(args?: { range?: string | string[]; force?: boolean; }): Promise; outgoing(args?: { range?: string | string[]; force?: boolean; }): Promise; incoming(args?: { range?: string | string[]; force?: boolean; outRefs?: IRefsOut; }): Promise; reset(args?: { cache?: RefDirection[]; }): IRefsTable; update(args: IRefsUpdateArgs | IRefsUpdateArgs[]): Promise; }; export declare type IRefsOut = { [key: string]: IRefOut[]; }; export declare type IRefOut = { target: RefTarget; path: string; param?: string; error?: t.IRefError; }; export declare type IRefsIn = { [key: string]: IRefIn[]; }; export declare type IRefIn = { cell: string; }; export declare type RefsTableEvent = IRefsTableGetKeysEvent | IRefsTableGetValueEvent | IRefsTableUpdateEvent; export declare type IRefsTableGetKeysEvent = { type: 'REFS/table/getKeys'; payload: IRefsTableGetKeys; }; export declare type IRefsTableGetKeys = { keys: string[]; isModified: boolean; modify(keys: string[]): void; }; export declare type IRefsTableGetValueEvent = { type: 'REFS/table/getValue'; payload: IRefsTableGetValue; }; export declare type IRefsTableGetValue = { key: string; value?: string; isModified: boolean; modify(value?: string): void; }; export declare type IRefsTableUpdateEvent = { type: 'REFS/table/update'; payload: RefsTableUpdate; };