import { Event } from "../../../../base/common/event.js"; /** `accessToken` is only carried when the provider authenticates with a bearer. */ export interface IExtensionGalleryAccount { readonly accessToken?: string; } export declare enum ExtensionGalleryAccountStatus { /** None signed in, or several with no choice made. */ SignedOut = "signedOut", Ineligible = "ineligible", Eligible = "eligible", /** Could not be resolved — a transient auth failure, not a sign-out. */ Unknown = "unknown" } /** * The authentication half of marketplace access. Implementations live in the Electron layer and * are supplied through {@link IExtensionGalleryAccountService.setAccountProvider}, so the service * itself never depends on authentication. */ export interface IExtensionGalleryAccountProvider { readonly accountStatus: ExtensionGalleryAccountStatus; readonly onDidChangeAccountStatus: Event; readonly onDidChangeAccount: Event; /** Never prompts. Check {@link accountStatus} for whether the account may actually be used. */ getAccount(serviceIndexUrl: string): Promise; /** Interactive. The provider owns account selection and how the session is obtained. */ signIn(): Promise; }