import { recordAuth as defaultRecordAuth } from "./telemetry.js"; import type { AuthLogFunction, AutoLoginOptions, ManualTokenOptions, SmartLoginOptions } from "./types.js"; interface AuthenticatedTeamsClient { setEmail(email: string): void; } interface TeamsClientAuthFactory { create(options: AutoLoginOptions): Promise; connect(options?: SmartLoginOptions): Promise; fromDebugSession(options?: ManualTokenOptions): Promise; fromToken(skypeToken: string, region: string, bearerToken?: string, substrateToken?: string): Client; } type AuthRecord = Parameters[0]; type RecordAuthFunction = (record: AuthRecord) => void; type CanAttemptAutoLoginFunction = () => boolean; interface McpAuthEnvironment { TEAMS_AUTO?: string; TEAMS_BEARER_TOKEN?: string; TEAMS_DEBUG?: string; TEAMS_DEBUG_PORT?: string; TEAMS_EMAIL?: string; TEAMS_HEADLESS?: string; TEAMS_LOGIN?: string; TEAMS_REGION?: string; TEAMS_SUBSTRATE_TOKEN?: string; TEAMS_TOKEN?: string; } export interface McpAuthManagerOptions { canAttemptAutoLogin?: CanAttemptAutoLoginFunction; clientFactory: TeamsClientAuthFactory; environment?: McpAuthEnvironment; log?: AuthLogFunction; recordAuth?: RecordAuthFunction; } export declare class NeedsEmailError extends Error { constructor(); } export declare class AuthenticationInProgressError extends Error { constructor(); } export declare class McpAuthManager { private readonly canAttemptAutoLogin; private readonly clientFactory; private readonly environment; private readonly log; private readonly recordAuth; private authenticationPromise; private clientInstance; constructor(options: McpAuthManagerOptions); authenticateOnStartup(): Promise; getClient(toolEmail?: string): Promise; private shouldUseTwoPhaseAuthentication; private startAuthentication; private authenticate; } export {}; //# sourceMappingURL=mcp-auth.d.ts.map