import { Disposable, DisposableStore, IDisposable } from "../../../../base/common/lifecycle.js"; import { IStorage, IStorageDatabase, IStorageItemsChangeEvent, IUpdateRequest } from "../../../../base/parts/storage/common/storage.js"; import { ILogService } from "../../../../platform/log/common/log.service.js"; import { AbstractStorageService, StorageScope } from "../../../../platform/storage/common/storage.js"; import { IUserDataProfile } from "../../../../platform/userDataProfile/common/userDataProfile.js"; import { IAnyWorkspaceIdentifier } from "../../../../platform/workspace/common/workspace.js"; import { IUserDataProfileService } from "../../userDataProfile/common/userDataProfile.service.js"; export declare class BrowserStorageService extends AbstractStorageService { private workspace; private readonly userDataProfileService; private readonly logService; private static BROWSER_DEFAULT_FLUSH_INTERVAL; private applicationStorage; private applicationStorageDatabase; private readonly applicationStoragePromise; private readonly applicationStorageDisposables; private profileStorage; private profileStorageDatabase; private profileStorageProfile; private readonly profileStorageDisposables; private workspaceStorage; private workspaceStorageDatabase; private readonly workspaceStorageDisposables; get hasPendingUpdate(): boolean; constructor(workspace: IAnyWorkspaceIdentifier, userDataProfileService: IUserDataProfileService, logService: ILogService); private registerListeners; protected doInitialize(): Promise; private createApplicationStorage; protected createApplicationStorageDatabase(disposableStore: DisposableStore): Promise; private createProfileStorage; protected createProfileStorageDatabase(profile: IUserDataProfile, disposableStore: DisposableStore): Promise; private createWorkspaceStorage; protected createWorkspaceStorageDatabase(workspace: IAnyWorkspaceIdentifier, disposableStore: DisposableStore): Promise; private updateIsNew; protected getStorage(scope: StorageScope): IStorage | undefined; protected getLogDetails(scope: StorageScope): string | undefined; protected switchToProfile(toProfile: IUserDataProfile): Promise; protected switchToWorkspace(toWorkspace: IAnyWorkspaceIdentifier, preserveData: boolean): Promise; protected shouldFlushWhenIdle(): boolean; close(): void; clear(): Promise; hasScope(scope: IAnyWorkspaceIdentifier | IUserDataProfile): boolean; } interface IIndexedDBStorageDatabase extends IStorageDatabase, IDisposable { /** * Name of the database. */ readonly name: string; /** * Whether an update in the DB is currently pending * (either update or delete operation). */ readonly hasPendingUpdate: boolean; /** * For testing only. */ clear(): Promise; } interface IndexedDBStorageDatabaseOptions { id: string; broadcastChanges?: boolean; } export declare class IndexedDBStorageDatabase extends Disposable implements IIndexedDBStorageDatabase { private readonly logService; static createApplicationStorage(logService: ILogService): Promise; static createProfileStorage(profile: IUserDataProfile, logService: ILogService): Promise; static createWorkspaceStorage(workspaceId: string, logService: ILogService): Promise; static create(options: IndexedDBStorageDatabaseOptions, logService: ILogService): Promise; private static readonly STORAGE_DATABASE_PREFIX; private static readonly STORAGE_OBJECT_STORE; private readonly _onDidChangeItemsExternal; readonly onDidChangeItemsExternal: import("../../../../base/common/event.js").Event; private broadcastChannel; private pendingUpdate; get hasPendingUpdate(): boolean; readonly name: string; private readonly whenConnected; private constructor(); private registerListeners; private connect; getItems(): Promise>; updateItems(request: IUpdateRequest): Promise; private doUpdateItems; optimize(): Promise; close(): Promise; clear(): Promise; } export {};