import { UnknownError } from '@livestore/common'; import type { CfTypes } from '@livestore/common-cf'; import type { LiveStoreEvent } from '@livestore/common/schema'; import { Effect, Option, Stream } from '@livestore/utils/effect'; import { SyncMetadata } from '../../common/sync-message-types.ts'; import { type StoreId } from '../shared.ts'; export type SyncStorage = { dbName: string; getEvents: (cursor: number | undefined) => Effect.Effect<{ total: number; stream: Stream.Stream<{ eventEncoded: LiveStoreEvent.Global.Encoded; metadata: Option.Option; }, UnknownError>; }, UnknownError>; appendEvents: (batch: ReadonlyArray, createdAt: string) => Effect.Effect; resetStore: Effect.Effect; }; export declare const makeStorage: (ctx: CfTypes.DurableObjectState, storeId: StoreId, engine: { _tag: "d1"; db: CfTypes.D1Database; } | { _tag: "do-sqlite"; }) => SyncStorage; //# sourceMappingURL=sync-storage.d.ts.map