import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service"; import { IEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service"; import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service"; import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service"; import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service"; import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service"; import { IResourceRefHandle } from "@codingame/monaco-vscode-api/vscode/vs/platform/userDataSync/common/userDataSync"; import { IAuthenticationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authentication.service"; import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service"; import { EditSession, SyncResource } from "../common/editSessions.js"; import { IEditSessionsLogService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/editSessions/common/editSessions.service"; import { IEditSessionsStorageService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/editSessions/common/editSessions.service"; import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service"; import { EditSessionsStoreClient } from "../common/editSessionsStorageClient.js"; import { ISecretStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/secrets/common/secrets.service"; export declare class EditSessionsWorkbenchService extends Disposable implements IEditSessionsStorageService { private readonly fileService; private readonly storageService; private readonly quickInputService; private readonly authenticationService; private readonly extensionService; private readonly environmentService; private readonly logService; private readonly productService; private readonly contextKeyService; private readonly dialogService; private readonly secretStorageService; _serviceBrand: undefined; readonly SIZE_LIMIT: number; private serverConfiguration; private machineClient; private authenticationInfo; private static CACHED_SESSION_STORAGE_KEY; private initialized; private readonly signedInContext; get isSignedIn(): boolean; private _didSignIn; get onDidSignIn(): import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event; private _didSignOut; get onDidSignOut(): import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event; private _lastWrittenResources; get lastWrittenResources(): Map; private _lastReadResources; get lastReadResources(): Map; storeClient: EditSessionsStoreClient | undefined; constructor(fileService: IFileService, storageService: IStorageService, quickInputService: IQuickInputService, authenticationService: IAuthenticationService, extensionService: IExtensionService, environmentService: IEnvironmentService, logService: IEditSessionsLogService, productService: IProductService, contextKeyService: IContextKeyService, dialogService: IDialogService, secretStorageService: ISecretStorageService); /** * @param resource: The resource to retrieve content for. * @param content An object representing resource state to be restored. * @returns The ref of the stored state. */ write(resource: SyncResource, content: string | EditSession): Promise; /** * @param resource: The resource to retrieve content for. * @param ref: A specific content ref to retrieve content for, if it exists. * If undefined, this method will return the latest saved edit session, if any. * * @returns An object representing the requested or latest state, if any. */ read(resource: SyncResource, ref: string | undefined): Promise<{ ref: string; content: string; } | undefined>; delete(resource: SyncResource, ref: string | null): Promise; list(resource: SyncResource): Promise; initialize(reason: "read" | "write", silent?: boolean): Promise; /** * * Ensures that the store client is initialized, * meaning that authentication is configured and it * can be used to communicate with the remote storage service */ private doInitialize; private cachedMachines; getMachineById(machineId: string): Promise; private getOrCreateCurrentMachineId; private getAuthenticationSession; private shouldAttemptEditSessionInit; /** * * Prompts the user to pick an authentication option for storing and getting edit sessions. */ private getAccountPreference; private createQuickpickItems; /** * * Returns all authentication sessions available from {@link getAuthenticationProviders}. */ private getAllSessions; /** * * Returns all authentication providers which can be used to authenticate * to the remote storage service, based on product.json configuration * and registered authentication providers. */ private getAuthenticationProviders; private get existingSessionId(); private set existingSessionId(value); private getExistingSession; private onDidChangeStorage; private clearAuthenticationPreference; private onDidChangeSessions; private registerSignInAction; private registerResetAuthenticationAction; }