export type PairingStatus = 'pending' | 'claimed' | 'consumed'; export interface PairingClaimer { openId: string; unionId?: string; name?: string; /** The bot app the user ran `/pair` with — open_id is scoped to THIS app. */ larkAppId?: string; } export interface StartedPairing { pairingId: string; code: string; browserToken: string; expiresAt: number; } /** Begin a pairing. Returns the code to show the user + a private browserToken. */ export declare function createPairing(dataDir: string, ttlMs?: number, now?: number): StartedPairing; export type ClaimResult = { ok: true; pairingId: string; } | { ok: false; reason: 'not_found' | 'expired' | 'already_claimed'; }; /** Claim a pending pairing for a Feishu identity (called by the daemon on the bot side). */ export declare function claimPairing(dataDir: string, code: string, claimer: PairingClaimer, now?: number): ClaimResult; export type PairingView = { status: 'pending'; } | { status: 'claimed'; claimedBy: PairingClaimer; } | { status: 'consumed'; } | { status: 'not_found'; }; /** Browser-side status poll; requires the matching browserToken. */ export declare function getPairingStatus(dataDir: string, pairingId: string, browserToken: string, now?: number): PairingView; export type ConsumeResult = { ok: true; claimedBy: PairingClaimer; } | { ok: false; reason: 'not_found' | 'not_claimed' | 'already_consumed'; }; /** Single-use: turn a claimed pairing into a session. Requires the browserToken. */ export declare function consumePairing(dataDir: string, pairingId: string, browserToken: string, now?: number): ConsumeResult; //# sourceMappingURL=pairing-store.d.ts.map