import { Observable } from 'rxjs';
import { PersistentWorkItemState } from './persistent-work-item-state';
import { PersistentWorkflowSnapshot } from './persistent-workflow-snapshot';
import { PersistentWorkflowStore } from './persistent-workflow-store';
/**
 * Implementation of PersistentWorkflowStore by local storage.
 */
export declare class PersistentLocalStorage extends PersistentWorkflowStore {
    private nextInstanceId;
    /**
     * Save the work item snapshot to the local storage.
     *
     * @param version the version number.
     * @param workItemId the id of work item.
     * @param workItemState the state of work item.
     * @param workItemData the persistent data of work item.
     * @param instanceId the instance ID if it has already.
     */
    save(version: number, workItemId: number, workItemState: PersistentWorkItemState, workItemData: any, instanceId?: number): Observable<PersistentWorkflowSnapshot>;
    /**
     * Restore the snapshot data for the workflow.
     */
    restore(): Observable<PersistentWorkflowSnapshot[]>;
    /**
     * Clear the snapshot for the instance id.
     * If not specified, clear all snapshots.
     *
     * @param instanceId the instance id.
     */
    clear(instanceId?: number): Observable<void>;
    /**
     * Gets the key of index data.
     */
    private indexKey;
    /**
     * Gets the key of snapshot instance.
     *
     * @param instanceId the instance Id.
     */
    private instanceKey;
    /**
     * Reads the index data to enumerate all snapshots.
     */
    private readIndexData;
    /**
     * Writes the index data.
     *
     * @param indexData the index data.
     */
    private writeIndexData;
    /**
     * Reads the snapshot of the instance.
     *
     * @param instanceId the instance ID.
     */
    private readInstance;
    /**
     * Writes the snapshot.
     *
     * @param snapshot the snapshot.
     */
    private writeInstance;
}
