import { TData, TDataShowcase } from './typedata'; export declare type TOptions = { /** default root path for storage your data files, example = path.join(__dirname, 'storage', 'data') */ pathData: string; /** default path for storage map (sqlite) files, example = path.join(__dirname, 'storage', 'map') */ pathMap: string | 'MEMORY'; /** timeout(msec) for callbacks "state change", default 1000, min 100, max 100000 */ callbackStateChangeDelay?: number; states: TOptionsState[]; }; export declare type TIndex = 'number' | 'string'; export declare type TOptionsState = { /** name state */ name: string; /** path for storage state data files, default = path.join(path_data from a higher level, state name ) */ pathData?: string; /** path for storage map (sqlite) files, default = path_map from a higher level */ pathMap?: string | 'MEMORY'; /** type storaged in files data, default = json */ typeData?: TData; /** type data in get functions, default = native */ typeDataShowcase?: TDataShowcase; /** index properties, for speed up read data, for type_data = 'json' */ indexes?: TOptionsStateIndex[]; }; export declare type TOptionsStateIndex = { /** property name from json */ prop: string; /** property type from json */ type: TIndex; }; export declare type TEnvState = { name: string; pathData: string; pathMap: string | 'MEMORY'; typeData: TData; typeDataShowcase: TDataShowcase; indexes: TOptionsStateIndex[]; }; export declare type TStateRow = { path: string; file: string; data?: any | string; indexes?: { prop: string; value: number | string; type: TIndex; }[]; }; export declare type TSetCallback = { key: string; error: Error; }; export declare type TChannelWorkerFrom = { type: 'message_trace'; trace: string; } | { type: 'message_debug'; debug: string; } | { type: 'message_error'; error: string; } | { type: 'state_complete'; } | { type: 'state_change'; rows: { action: 'insert' | 'delete'; state: string; rows: TStateRow[]; }[]; sets: TSetCallback[]; } | { type: 'get.obtain'; key: string; error: Error; rows: { state: string; rows: TStateRow[]; }[]; } | { type: 'get.query'; key: string; error: Error; rows: { state: string; rows: TStateRow[]; }[]; }; export declare type TChannelWorkerTo = { type: 'get.obtain'; key: string; filter: TChannelStateFilterObtain[]; } | { type: 'get.query'; key: string; filter: TChannelStateFilterQuery[]; } | { type: 'set'; key: string; sets: TStateRowChange[]; }; export declare type TChannelStateFilterObtain = { state: string; filterPath?: string; filterFile?: string; filters?: { index: string; value: string | number; }[]; }; export declare type TChannelStateFilterQuery = { state: string; filterGlobal?: string; filters?: { index: string; query: string; }[]; }; export declare type TStateRowChange = { action: 'insert'; state: string; rows: { path: string; file: string; data: any | string; }[]; } | { action: 'delete'; state: string; rows: { path: string; file: string; }[]; }; export declare class Env { readonly pathData: string; readonly pathMap: string | 'MEMORY'; readonly callbackStateChangeDelay: number; readonly states: TEnvState[]; callback: { allowError: boolean; allowDebug: boolean; allowTrace: boolean; isStateComplete: boolean; }; constructor(options: TOptions); } //# sourceMappingURL=index.env.d.ts.map