/**
 * Feishu/Lark App Registration — QR scan-to-create and OAuth device flow.
 *
 * Shared between `cli-login.ts` (channels login) and `onboard-cli.ts` (onboard wizard).
 */
export type FeishuDomain = 'feishu' | 'lark';
export type AppRegistrationResult = {
    appId: string;
    appSecret: string;
    domain: FeishuDomain;
    openId?: string;
};
/**
 * Check if the Feishu/Lark app registration endpoint supports scan-to-create.
 */
export declare function initAppRegistration(domain: FeishuDomain): Promise<boolean>;
/**
 * Start the device-code flow and return a QR URL for the user to scan.
 */
export declare function beginAppRegistration(domain: FeishuDomain): Promise<{
    deviceCode: string;
    qrUrl: string;
    intervalSec: number;
    expireInSec: number;
}>;
/**
 * Poll the registration endpoint until the user scans and confirms.
 */
export declare function pollAppRegistration(params: {
    deviceCode: string;
    intervalSec: number;
    expireInSec: number;
    initialDomain: FeishuDomain;
}): Promise<{
    status: 'success';
    result: AppRegistrationResult;
} | {
    status: 'access_denied' | 'expired' | 'timeout';
    message?: string;
} | {
    status: 'error';
    message: string;
}>;
/**
 * Print a QR code to the terminal (falls back to URL if qrcode-terminal is unavailable).
 */
export declare function printQrCode(url: string): Promise<void>;
