import type { EventEmitter } from "node:events"; export declare function getSettingsEmitter(): EventEmitter; export declare function getSetting(key: string): Promise | null>; export interface StoreWriteOptions { /** Tag identifying who initiated this write (e.g. a tab ID). */ requestSource?: string; } /** * Atomically derive and persist one setting with an optimistic raw-value CAS. * This works across SQLite/libSQL and Postgres and remains safe across * horizontally scaled processes where an in-memory mutex would not. * The updater may run more than once after contention and must not perform * external side effects. */ export declare function mutateSetting(key: string, updater: (current: Record | null) => Record | Promise>, options?: StoreWriteOptions): Promise>; export declare function putSetting(key: string, value: Record, options?: StoreWriteOptions): Promise; export declare function deleteSetting(key: string, options?: StoreWriteOptions): Promise; /** * Delete every setting whose key starts with `prefix`. Returns the number of * rows removed. Used when an owning entity is deleted (e.g. an organization * takes its `o::*` keys with it). */ export declare function deleteSettingsByPrefix(prefix: string, options?: StoreWriteOptions): Promise; export declare function getAllSettings(): Promise>>; //# sourceMappingURL=store.d.ts.map