import type { LiveStoreSchema } from '@livestore/common/schema'; import { type WebDatabaseMetadataOpfs } from '@livestore/sqlite-wasm/browser'; import { Effect, Schema } from '@livestore/utils/effect'; import { Opfs, type WebError } from '@livestore/utils/effect/browser'; import type * as WorkerSchema from './worker-schema.ts'; declare const PersistedSqliteError_base: Schema.TaggedErrorClass; } & { message: typeof Schema.String; cause: Schema.optional; }>; export declare class PersistedSqliteError extends PersistedSqliteError_base { } export declare const readPersistedStateDbFromClientSession: (args: { storageOptions: WorkerSchema.StorageType; storeId: string; schema: LiveStoreSchema; }) => Effect.Effect, PersistedSqliteError | WebError.UnknownError | WebError.TypeError | WebError.NotFoundError | WebError.NotAllowedError | WebError.TypeMismatchError | WebError.SecurityError | Opfs.OpfsError, Opfs.Opfs>; export declare const resetPersistedDataFromClientSession: (args_0: { storageOptions: WorkerSchema.StorageType; storeId: string; }) => Effect.Effect; export declare const sanitizeOpfsDir: (directory: string | undefined, storeId: string) => Effect.Effect; export declare const getStateDbFileName: (schema: LiveStoreSchema) => string; export declare const MAX_ARCHIVED_STATE_DBS_IN_DEV = 3; export declare const ARCHIVE_DIR_NAME = "archive"; /** * Cleanup old state database files after successful migration. * This prevents OPFS file pool capacity from being exhausted by accumulated schema files. * * @param vfs - The AccessHandlePoolVFS instance for safe file operations * @param currentSchema - Current schema (to avoid deleting the active database) */ export declare const cleanupOldStateDbFiles: (options: { vfs: WebDatabaseMetadataOpfs['vfs']; currentSchema: LiveStoreSchema; opfsDirectory: string; }) => Effect.Effect; export {}; //# sourceMappingURL=persisted-sqlite.d.ts.map