import { Credential } from "../types"; export interface DeviceFlowOptions { client_id?: string; onDeviceCode?: (data: { user_code: string; verification_uri?: string; device_code: string; expires_in: number; }) => void; /** 自定义 OAuth API 请求的 endpoint */ getOAuthEndpoint?: (rawEndpoint: string) => string; /** 自定义授权跳转链接 */ getAuthUrl?: (rawUrl: string) => string; /** 静默模式,不打印任何日志 */ silent?: boolean; /** * 自定义授权流程模式 * 为 true 时,device/code 和 token 接口的返回值没有外层 { code, result, reqId } 包装, * 直接就是 result 本体;同时 verification_uri 直接使用接口返回值,不再由客户端拼接。 */ custom?: boolean; } export declare function getAuthTokenByDeviceFlow(options?: DeviceFlowOptions): Promise;