import type { Scope } from "../scope.ts"; import type { State, StateStore } from "../state.ts"; /** * Wraps a local or remote state store implementation * and handles serialization/deserialization. */ export declare abstract class StateStoreProxy implements StateStore { readonly scope: Scope; private dispatch?; constructor(scope: Scope); abstract provision(): Promise; private run; init(): Promise; deinit(): Promise; list(): Promise; listScopes(): Promise; count(): Promise; get(key: string): Promise; getBatch(ids: string[]): Promise>; all(): Promise>; set(key: string, value: State): Promise; delete(key: string): Promise; private deserialize; private serialize; private deserializeMany; } export declare namespace StateStoreProxy { type API = { [K in keyof Required]: NonNullable extends (...args: infer Args) => Promise ? { method: K; params: Args; result: Return; } : never; }; type Method = keyof API; type Dispatch = (method: TMethod, params: API[TMethod]["params"]) => Promise; type Request = { method: TMethod; params: API[TMethod]["params"]; context: TContext; }; type SuccessResponse = { success: true; status: number; result: API[TMethod]["result"]; }; type ErrorResponse = { success: false; status: number; error: string; }; type Response = SuccessResponse | ErrorResponse; } //# sourceMappingURL=proxy.d.ts.map