// SPDX-License-Identifier: AGPL-3.0-or-later export interface AppStoreOptions { path: string; derivationVersion?: string | null; } export interface AppStoreInitialization { path: string; schemaVersion: number; previousSchemaVersion: number; appliedMigrations: number; quarantinedPath: string | null; quarantineReason: 'newer' | 'schema' | 'corrupt' | 'derivation' | null; } export interface AppStoreAccount { storageKey: string; record: unknown; } export interface AppStoreAccountCompareAndSwapRequest { expected: AppStoreAccount; replacement: AppStoreAccount; } export interface AppStoreKnownInstance { key: string; record: unknown; } export interface AppStoreEntry { store: string; scope: string; key: string; value: string; updatedAt: number; } export interface AppStoreMarker { key: string; value: string; } export interface AppStoreAccountImport { records: ReadonlyArray; marker?: AppStoreMarker | null; } export interface AppStoreEntryImport { entries: ReadonlyArray; marker?: AppStoreMarker | null; } export interface AppStoreSkippedRecord { key: string; reason: string; } export interface AppStoreAccountImportReport { imported: number; skipped: ReadonlyArray; unusableInstances: ReadonlyArray; } export interface AppStoreEntryImportReport { imported: number; skipped: ReadonlyArray; } export interface AppStorePruneRequest { knownStorageKeys: ReadonlyArray; listIsAuthoritative: boolean; } export interface AppStorePruneReport { pruned: ReadonlyArray; refusedReason: string | null; } export interface AppStoreClearStoreExceptRequest { store: string; keysToKeep: ReadonlyArray; } export declare class AppStoreBinding { constructor(options: AppStoreOptions); readonly initialization: string; close(): void; getMetadata(key: string): Promise; setMetadata(key: string, value: string): Promise; getAllAccounts(): Promise; getAccount(storageKey: string): Promise; upsertAccount(payload: string): Promise; compareAndSwapAccount(payload: string): Promise; deleteAccount(storageKey: string): Promise; importAccounts(payload: string): Promise; getAllKnownInstances(): Promise; upsertKnownInstance(payload: string): Promise; deleteKnownInstance(key: string): Promise; getEntries(store: string, scope: string): Promise; getEntry(store: string, scope: string, key: string): Promise; setEntry(payload: string): Promise; deleteEntry(store: string, scope: string, key: string): Promise; clearScope(scope: string): Promise; clearStoreExcept(payload: string): Promise; importEntries(payload: string): Promise; prune(payload: string): Promise; } export declare const AppStore: (new (options: AppStoreOptions) => AppStoreBinding) | null; export declare const loadError: Error | null;