import { CancellationToken } from "../../../base/common/cancellation.js"; import { Event } from "../../../base/common/event.js"; import { IMarkdownString } from "../../../base/common/htmlContent.js"; import { IPager } from "../../../base/common/paging.js"; import { URI } from "../../../base/common/uri.js"; import { TargetPlatform, IExtensionManifest, type ExtensionType, type IExtension } from "../../extensions/common/extensions.js"; import { IQueryOptions, IGalleryExtension, IExtensionInfo, IExtensionQueryOptions, IProductVersion, IExtensionIdentifier, IGalleryExtensionVersion, InstallOperation, StatisticType, ITranslation, IExtensionsControlManifest, type DidUninstallExtensionEvent, type DidUpdateExtensionMetadata, type IExtensionManagementParticipant, type ILocalExtension, type InstallExtensionEvent, type InstallExtensionInfo, type InstallExtensionResult, type InstallOptions, type Metadata, type UninstallExtensionEvent, type UninstallExtensionInfo, type UninstallOptions, type IConfigBasedExtensionTip, type IExecutableBasedExtensionTip, type AllowedExtensionsConfigValueType } from "./extensionManagement.js"; export declare const IExtensionGalleryService: import("../../instantiation/common/instantiation.js").ServiceIdentifier; /** * Service to interact with the Visual Studio Code Marketplace to get extensions. * @throws Error if the Marketplace is not enabled or not reachable. */ export interface IExtensionGalleryService { readonly _serviceBrand: undefined; isEnabled(): boolean; query(options: IQueryOptions, token: CancellationToken): Promise>; getExtensions(extensionInfos: ReadonlyArray, token: CancellationToken): Promise; getExtensions(extensionInfos: ReadonlyArray, options: IExtensionQueryOptions, token: CancellationToken): Promise; isExtensionCompatible(extension: IGalleryExtension, includePreRelease: boolean, targetPlatform: TargetPlatform, productVersion?: IProductVersion): Promise; getCompatibleExtension(extension: IGalleryExtension, includePreRelease: boolean, targetPlatform: TargetPlatform, productVersion?: IProductVersion): Promise; getAllCompatibleVersions(extensionIdentifier: IExtensionIdentifier, includePreRelease: boolean, targetPlatform: TargetPlatform): Promise; getAllVersions(extensionIdentifier: IExtensionIdentifier): Promise; download(extension: IGalleryExtension, location: URI, operation: InstallOperation): Promise; downloadSignatureArchive(extension: IGalleryExtension, location: URI): Promise; reportStatistic(publisher: string, name: string, version: string, type: StatisticType): Promise; getReadme(extension: IGalleryExtension, token: CancellationToken): Promise; getManifest(extension: IGalleryExtension, token: CancellationToken): Promise; getChangelog(extension: IGalleryExtension, token: CancellationToken): Promise; getCoreTranslation(extension: IGalleryExtension, languageId: string): Promise; getExtensionsControlManifest(): Promise; } export declare const IExtensionManagementService: import("../../instantiation/common/instantiation.js").ServiceIdentifier; export interface IExtensionManagementService { readonly _serviceBrand: undefined; readonly preferPreReleases: boolean; onInstallExtension: Event; onDidInstallExtensions: Event; onUninstallExtension: Event; onDidUninstallExtension: Event; onDidUpdateExtensionMetadata: Event; zip(extension: ILocalExtension): Promise; getManifest(vsix: URI): Promise; install(vsix: URI, options?: InstallOptions): Promise; canInstall(extension: IGalleryExtension): Promise; installFromGallery(extension: IGalleryExtension, options?: InstallOptions): Promise; installGalleryExtensions(extensions: InstallExtensionInfo[]): Promise; installFromLocation(location: URI, profileLocation: URI): Promise; installExtensionsFromProfile(extensions: IExtensionIdentifier[], fromProfileLocation: URI, toProfileLocation: URI): Promise; uninstall(extension: ILocalExtension, options?: UninstallOptions): Promise; uninstallExtensions(extensions: UninstallExtensionInfo[]): Promise; toggleApplicationScope(extension: ILocalExtension, fromProfileLocation: URI): Promise; getInstalled(type?: ExtensionType, profileLocation?: URI, productVersion?: IProductVersion, language?: string): Promise; getExtensionsControlManifest(): Promise; copyExtensions(fromProfileLocation: URI, toProfileLocation: URI): Promise; updateMetadata(local: ILocalExtension, metadata: Partial, profileLocation: URI): Promise; resetPinnedStateForAllUserExtensions(pinned: boolean): Promise; download(extension: IGalleryExtension, operation: InstallOperation, donotVerifySignature: boolean): Promise; registerParticipant(pariticipant: IExtensionManagementParticipant): void; getTargetPlatform(): Promise; cleanUp(): Promise; } export declare const IGlobalExtensionEnablementService: import("../../instantiation/common/instantiation.js").ServiceIdentifier; export interface IGlobalExtensionEnablementService { readonly _serviceBrand: undefined; readonly onDidChangeEnablement: Event<{ readonly extensions: IExtensionIdentifier[]; readonly source?: string; }>; getDisabledExtensions(): IExtensionIdentifier[]; enableExtension(extension: IExtensionIdentifier, source?: string): Promise; disableExtension(extension: IExtensionIdentifier, source?: string): Promise; } export declare const IExtensionTipsService: import("../../instantiation/common/instantiation.js").ServiceIdentifier; export interface IExtensionTipsService { readonly _serviceBrand: undefined; getConfigBasedTips(folder: URI): Promise; getImportantExecutableBasedTips(): Promise; getOtherExecutableBasedTips(): Promise; } export declare const IAllowedExtensionsService: import("../../instantiation/common/instantiation.js").ServiceIdentifier; export interface IAllowedExtensionsService { readonly _serviceBrand: undefined; readonly allowedExtensionsConfigValue: AllowedExtensionsConfigValueType | undefined; readonly onDidChangeAllowedExtensionsConfigValue: Event; isAllowed(extension: IGalleryExtension | IExtension): true | IMarkdownString; isAllowed(extension: { id: string; publisherDisplayName: string | undefined; version?: string; prerelease?: boolean; targetPlatform?: TargetPlatform; }): true | IMarkdownString; }