import type { Environment } from '../config/environments.js'; import type { StoredCredentials } from '../config/credentials.js'; export interface DeviceCodeGrant { deviceCode: string; userCode: string; verificationUri: string; verificationUriComplete: string; expiresInSeconds: number; intervalSeconds: number; } export interface DeviceFlowDeps { fetch: typeof globalThis.fetch; sleep: (ms: number) => Promise; now?: () => number; } export declare function requestDeviceCode(environment: Environment, clientId: string, deps: DeviceFlowDeps): Promise; export declare function pollForToken(environment: Environment, clientId: string, grant: DeviceCodeGrant, deps: DeviceFlowDeps): Promise; export declare function refreshAccessToken(environment: Environment, clientId: string, refreshToken: string, deps: DeviceFlowDeps): Promise;