import { Operation } from './json-patch-lib' // revise a collection of nodes. export type Revision = { id: number, patch: Operation[], expireId: string | null } // dump/replace the entire store with T export type Dump = { id: number, value: T, expireId: string | null } export type Update = Revision | Dump export enum PatchOp { ADD = 'add', REMOVE = 'remove', REPLACE = 'replace', } export interface Http { getRevisions (since: number): Promise> getDump (): Promise> } export interface Bootstrapper { init (): Promise> update (cache: DBCache): Promise } export interface DBCache{ sequence: number, data: T }