/** * Removes one or more stores from the save denylist. */ export declare const allowSave: (...storeId: string[]) => Promise; /** * Removes one or more stores from the sync denylist. */ export declare const allowSync: (...storeId: string[]) => Promise; /** * Stops the autosave. */ export declare const clearAutosave: () => Promise; /** * Adds one or more stores to the save denylist. */ export declare const denySave: (...storeId: string[]) => Promise; /** * Adds one or more stores to the sync denylist. */ export declare const denySync: (...storeId: string[]) => Promise; /** * Gets the default save strategy for the stores. * It can be overridden on a per-store basis. */ export declare const getDefaultSaveStrategy: () => Promise; /** * Directory where the stores are saved. */ export declare const getStoreCollectionPath: () => Promise; /** * Gets the save strategy used by a store. **/ export declare const getSaveStrategy: (storeId: string) => Promise; /** * Lists all the store ids. */ export declare const getStoreIds: () => Promise; /** * Path where the store is saved. **/ export declare const getStorePath: (storeId: string) => Promise; /** * Gets the state of a store. */ export declare const getStoreState: (storeId: string) => Promise; /** * Saves a store to the disk. * * @example * ```ts * import { save } from '@tauri-store/pinia'; * * // Save a single store. * await save('my-store'); * * // Save some stores. * await save('my-store', 'my-store-2'); * ``` **/ export declare const save: (...storeId: (string | string[])[]) => Promise; /** * Saves all the stores to the disk. */ export declare const saveAll: () => Promise; /** * Saves all the stores to the disk immediately, ignoring the save strategy. */ export declare const saveAllNow: () => Promise; /** * Saves a store to the disk immediately, ignoring the save strategy. * * @example * ```ts * import { saveNow } from '@tauri-store/pinia'; * * // Save a single store. * await saveNow('my-store'); * * // Save some stores. * await saveNow('my-store', 'my-store-2'); * ``` */ export declare const saveNow: (...storeId: (string | string[])[]) => Promise; /** * Saves the stores periodically. * @param interval The interval in milliseconds. * * @example * ```ts * import { setAutosave } from '@tauri-store/pinia'; * * // Save all the stores every 5 minutes. * await setAutosave(5 * 60 * 1000); * ``` */ export declare const setAutosave: (interval: import('@tauri-store/shared').Option) => Promise; /** * Sets the save strategy for a store. * Calling this will abort any pending save operation. * * @example * ```ts * import { setSaveStrategy } from '@tauri-store/pinia'; * * await setSaveStrategy('my-store', 'debounce', 1000); * ``` */ export declare const setSaveStrategy: { (storeId: string, strategy: "immediate"): Promise; (storeId: string, strategy: "debounce" | "throttle", interval: number): Promise; }; /** * Sets the store options. * * @example * ```ts * import { setStoreOptions } from '@tauri-store/pinia'; * * await setStoreOptions('my-store', { * saveOnChange: true, * saveStrategy: 'debounce', * saveInterval: 1000 * }); * ``` */ export declare const setStoreOptions: (storeId: string, options: import('@tauri-store/shared').StoreBackendOptions) => Promise; /** @internal */ export declare const destroy: (storeId: string) => Promise; /** @internal */ export declare const load: (id: string) => Promise; /** @internal */ export declare const patch: (id: string, state: import('@tauri-store/shared').State) => Promise; /** @internal */ export declare const unload: (id: string) => Promise;