import { Logger, ResolveOnce, Result, URI } from "@adviser/cement"; import { type AnyBlock, type AnyLink, type CommitOpts, type DataSaveOpts, type DbMeta, type WALStore as WALStore, type WALState, type LoadHandler, type CryptoAction, type Loadable, type CarClockHead, type DbMetaEvent, type MetaStore, type DataAndMetaStore, type CarStore, type FileStore, SerdeGateway, SerdeGatewayInterceptor, CommitQueueIf } from "@fireproof/core-types-blockstore"; import { Falsy, StoreType, SuperThis } from "@fireproof/core-types-base"; import { InterceptorGateway } from "@fireproof/core-gateways-base"; export interface StoreOpts { readonly gateway: SerdeGateway; readonly gatewayInterceptor?: SerdeGatewayInterceptor; readonly loader: Loadable; } export interface BaseStoreOpts { readonly gateway: InterceptorGateway; readonly loader: Loadable; } export declare abstract class BaseStoreImpl { abstract readonly storeType: StoreType; private _url; readonly logger: Logger; readonly sthis: SuperThis; readonly gateway: InterceptorGateway; get realGateway(): SerdeGateway; readonly opts: StoreOpts; readonly loader: Loadable; readonly myId: string; constructor(sthis: SuperThis, url: URI, opts: BaseStoreOpts, logger: Logger); url(): URI; readonly _id: ResolveOnce; id(): string; readonly _onStarted: ((dam: DataAndMetaStore) => void)[]; onStarted(fn: (dam: DataAndMetaStore) => void): void; readonly _onClosed: (() => void)[]; onClosed(fn: () => void): void; abstract close(): Promise>; ready(): Promise; keyedCrypto(): Promise; start(dam: DataAndMetaStore): Promise>; } export declare function createDbMetaEvent(sthis: SuperThis, dbMeta: DbMeta, parents: CarClockHead): Promise; export declare class MetaStoreImpl extends BaseStoreImpl implements MetaStore { readonly storeType: string; readonly subscribers: Map; parents: CarClockHead; constructor(sthis: SuperThis, url: URI, opts: BaseStoreOpts); private updateParentsFromDbMetas; cnt: number; stream(branch?: string): ReadableStream; save(meta: DbMeta, branch?: string): Promise>; close(): Promise>; destroy(): Promise>; } declare abstract class DataStoreImpl extends BaseStoreImpl { constructor(sthis: SuperThis, url: URI, opts: BaseStoreOpts, logger: Logger); load(cid: AnyLink): Promise; save(car: AnyBlock, opts?: DataSaveOpts): Promise; remove(cid: AnyLink): Promise>; close(): Promise>; destroy(): Promise>; } export declare class CarStoreImpl extends DataStoreImpl implements CarStore { readonly storeType: string; constructor(sthis: SuperThis, url: URI, opts: BaseStoreOpts); } export declare class FileStoreImpl extends DataStoreImpl implements FileStore { readonly storeType: string; constructor(sthis: SuperThis, url: URI, opts: BaseStoreOpts); } export declare class WALStoreImpl extends BaseStoreImpl implements WALStore { readonly storeType: string; readonly _ready: ResolveOnce; readonly walState: WALState; readonly processing?: Promise; readonly processQueue: CommitQueueIf; constructor(sthis: SuperThis, url: URI, opts: BaseStoreOpts); ready(): Promise; enqueue(dbMeta: DbMeta, opts: CommitOpts): Promise; enqueueFile(fileCid: AnyLink, publicFile?: boolean): Promise; process(): Promise; _doProcess(): Promise; load(): Promise; save(state: WALState): Promise; close(): Promise>; destroy(): Promise>; } export {};