export interface Session { token: string; accountId: string; countryCode?: string | null; region: string; apiBaseUrl: string; authFlowUsed?: 'legacy' | 'new'; /** * Identifies this installation to VeSync. Issued tokens are bound to it (the JWT payload carries a * `terminalId` claim), so it must stay stable across logins and restarts — a fresh id makes every login * look like a brand-new device to VeSync. */ terminalId?: string; /** Client app id, kept alongside `terminalId` so the client identity is stable too. */ appId?: string; issuedAt?: number | null; expiresAt?: number | null; lastValidatedAt?: number | null; libraryVersion?: string; } export interface SessionStore { load(): Promise; save(session: Session): Promise; clear(): Promise; } /** * Decode a JWT token payload to extract iat/exp without verifying the signature. */ export declare function decodeJwtTimestamps(token: string): { iat?: number; exp?: number; } | null;