import { Event } from "../../../../base/common/event.js";
import { IDisposable } from "../../../../base/common/lifecycle.js";
import { IAuthorizationServerMetadata, IAuthorizationProtectedResourceMetadata } from "../../../../base/common/oauth.js";
import { URI } from "../../../../base/common/uri.js";
import { AuthenticationProviderInformation, AuthenticationSessionsChangeEvent, IAuthenticationProvider, AuthenticationSessionAccount, IAuthenticationGetSessionsOptions, AuthenticationSession, IAuthenticationCreateSessionOptions, IAuthenticationProviderHostDelegate } from "./authentication.js";
export declare const IAuthenticationService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IAuthenticationService>;
export interface IAuthenticationService {
    readonly _serviceBrand: undefined;
    readonly onDidRegisterAuthenticationProvider: Event<AuthenticationProviderInformation>;
    readonly onDidUnregisterAuthenticationProvider: Event<AuthenticationProviderInformation>;
    readonly onDidChangeSessions: Event<{
        providerId: string;
        label: string;
        event: AuthenticationSessionsChangeEvent;
    }>;
    readonly onDidChangeDeclaredProviders: Event<void>;
    readonly declaredProviders: AuthenticationProviderInformation[];
    registerDeclaredAuthenticationProvider(provider: AuthenticationProviderInformation): void;
    unregisterDeclaredAuthenticationProvider(id: string): void;
    isAuthenticationProviderRegistered(id: string): boolean;
    registerAuthenticationProvider(id: string, provider: IAuthenticationProvider): void;
    unregisterAuthenticationProvider(id: string): void;
    getProviderIds(): string[];
    getProvider(id: string): IAuthenticationProvider;
    getAccounts(id: string): Promise<ReadonlyArray<AuthenticationSessionAccount>>;
    getSessions(id: string, scopes?: string[], options?: IAuthenticationGetSessionsOptions, activateImmediate?: boolean): Promise<ReadonlyArray<AuthenticationSession>>;
    createSession(providerId: string, scopes: string[], options?: IAuthenticationCreateSessionOptions): Promise<AuthenticationSession>;
    removeSession(providerId: string, sessionId: string): Promise<void>;
    getOrActivateProviderIdForServer(authorizationServer: URI): Promise<string | undefined>;
    registerAuthenticationProviderHostDelegate(delegate: IAuthenticationProviderHostDelegate): IDisposable;
    createDynamicAuthenticationProvider(authorizationServer: URI, serverMetadata: IAuthorizationServerMetadata, resourceMetadata: IAuthorizationProtectedResourceMetadata | undefined): Promise<IAuthenticationProvider | undefined>;
}
export declare const IAuthenticationExtensionsService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IAuthenticationExtensionsService>;
export interface IAuthenticationExtensionsService {
    readonly _serviceBrand: undefined;
    onDidChangeAccountPreference: Event<{
        extensionIds: string[];
        providerId: string;
    }>;
    getAccountPreference(extensionId: string, providerId: string): string | undefined;
    updateAccountPreference(extensionId: string, providerId: string, account: AuthenticationSessionAccount): void;
    removeAccountPreference(extensionId: string, providerId: string): void;
    updateSessionPreference(providerId: string, extensionId: string, session: AuthenticationSession): void;
    getSessionPreference(providerId: string, extensionId: string, scopes: string[]): string | undefined;
    removeSessionPreference(providerId: string, extensionId: string, scopes: string[]): void;
    selectSession(providerId: string, extensionId: string, extensionName: string, scopes: string[], possibleSessions: readonly AuthenticationSession[]): Promise<AuthenticationSession>;
    requestSessionAccess(providerId: string, extensionId: string, extensionName: string, scopes: string[], possibleSessions: readonly AuthenticationSession[]): void;
    requestNewSession(providerId: string, scopes: string[], extensionId: string, extensionName: string): Promise<void>;
}
