import type { ArkmeSessionCredentials } from '../keychain-store.js'; import type { ArkmeAuthSnapshot, ArkmeCancellationSnapshot, ArkmeCaptchaResult } from '../types.js'; import { ProfileService } from './profile-service.js'; import { ServiceRuntime } from './service.js'; export interface ArkmeAuthLifecycle { reconnectChatRealtime(): void; clearAccountState(userIds: readonly number[]): void; } export declare function jiwoScanLoginAvailable(config: ServiceRuntime['config']): boolean; export declare class AuthService { private readonly runtime; private readonly profile; private readonly lifecycle; private cancellationNotice; private pendingCancellationLogin; private pendingCancellationCleanup; private cancellationTask; private pendingPhoneUnbindSession; private readonly attempts; private jiwoAttemptGeneration; constructor(runtime: ServiceRuntime, profile: ProfileService, lifecycle: ArkmeAuthLifecycle); dispose(): void; logout(expected?: ArkmeSessionCredentials): Promise; authStatus(): Promise; private loginContextChanged; beginWechatLogin(): Promise; pollWechatLogin(attemptId: string): Promise; beginJiwoLogin(): Promise; pollJiwoLogin(attemptId: string): Promise; cancelJiwoLogin(attemptId: string): Promise<{ canceled: true; }>; private cancelJiwoCredentials; private jiwoPendingSnapshot; private cancelAllJiwoLoginAttempts; testLogin(userId: number): Promise; loginByPassword(account: string, password: string, signal?: AbortSignal): Promise; private emailBindingRequest; sendEmailBindCode(expectedUserId: number, email: string): Promise<{ sent: true; }>; bindEmail(expectedUserId: number, email: string, code: string): Promise<{ bound: true; }>; sendPhoneCode(phone: string, captcha: ArkmeCaptchaResult): Promise<{ sent: true; }>; verifyPhoneCode(phone: string, code: string): Promise; checkPhoneUnbindEligibility(expectedUserId: number): Promise<{ allowed: boolean; }>; sendPhoneUnbindCode(captcha: ArkmeCaptchaResult): Promise<{ sent: true; }>; unbindPhone(code: string): Promise; private reconcilePhoneUnbind; private checkPhoneUnbindResult; private authSnapshotForSession; private profileRequiresPhoneBinding; private profileHasBoundPhone; private acceptLoginSession; private cancellationLoginSnapshot; resolveCancellationLogin(continueLogin: boolean): Promise; private cancellationSession; private cancellationResult; previewCancellation(expectedUserId: number): Promise; submitCancellation(expectedUserId: number, expectedMode: string): Promise; private performCancellation; private cancellationSessionHash; private normalizedPhone; private normalizedCaptcha; } //# sourceMappingURL=auth-service.d.ts.map