import type { PendingStore } from "../auth/pending-store.js"; import type { MailboxRegistry } from "../auth/mailbox-registry.js"; export type StartResult = { status: "pending"; userCode: string; verificationUri: string; verificationUriComplete: string; expiresInSec: number; intervalSec: number; } | { status: "in-progress"; message: string; }; export type PollResult = { status: "registered"; graphUserId: string; mail: string | null; scopes: string[]; tokenExpSec: number; } | { status: "pending"; intervalSec: number; } | { status: "expired"; message?: string; } | { status: "denied"; } | { status: "error"; aadsts: string | null; suberror: string | null; message: string; }; /** * Start the device-code flow: request a code, persist a pending entry, and * surface the user code + verification URL. The `devicecode-issued` line is * logged BEFORE returning so the code is observable even if the caller drops * the result. Returns immediately — no blocking wait. */ export declare function runAccountRegisterStart(args: { accountId: string; clientId: string; tenantId: string; pendingStore: PendingStore; }): Promise; /** * One poll of the device-code flow. On success, the unchanged path runs: fetch * /me, persist tokens, and clear the pending entry (verified by re-stat). The * TTL is checked before hitting the network so an elapsed code names its own * expiry rather than surfacing an opaque error. */ export declare function runAccountRegisterPoll(args: { accountId: string; clientId: string; tenantId: string; registry: MailboxRegistry; pendingStore: PendingStore; }): Promise; //# sourceMappingURL=account-register.d.ts.map