import { IAuthenticationService } from '../../../../../../platform/authentication/common/authentication';
import { CopilotToken } from '../../../../../../platform/authentication/common/copilotToken';
import { Disposable } from '../../../../../../util/vs/base/common/lifecycle';
export { CopilotToken } from '../../../../../../platform/authentication/common/copilotToken';
export declare const ICompletionsCopilotTokenManager: import("../../../../../../util/common/services").ServiceIdentifier<ICompletionsCopilotTokenManager>;
export interface ICompletionsCopilotTokenManager {
    readonly _serviceBrand: undefined;
    get token(): CopilotToken | undefined;
    primeToken(): Promise<boolean>;
    getToken(): Promise<CopilotToken>;
    resetToken(httpError?: number): void;
    getLastToken(): Omit<CopilotToken, 'token'> | undefined;
}
export declare class CopilotTokenManagerImpl extends Disposable implements ICompletionsCopilotTokenManager {
    protected primed: boolean;
    private readonly authenticationService;
    _serviceBrand: undefined;
    private tokenRefetcher;
    private _token;
    get token(): CopilotToken | undefined;
    constructor(primed: boolean | undefined, authenticationService: IAuthenticationService);
    /**
     * Ensure we have a token and that the `StatusReporter` is up to date.
     */
    primeToken(): Promise<boolean>;
    getToken(): Promise<CopilotToken>;
    private updateCachedToken;
    resetToken(httpError?: number): void;
    getLastToken(): Omit<CopilotToken, 'token'> | undefined;
}
//# sourceMappingURL=copilotTokenManager.d.ts.map