UNPKG

tsvesync

Version:

A TypeScript library for interacting with VeSync smart home devices

25 lines (24 loc) 652 B
export interface Session { token: string; accountId: string; countryCode?: string | null; region: string; apiBaseUrl: string; authFlowUsed?: 'legacy' | 'new'; issuedAt?: number | null; expiresAt?: number | null; lastValidatedAt?: number | null; libraryVersion?: string; } export interface SessionStore { load(): Promise<Session | null>; save(session: Session): Promise<void>; clear(): Promise<void>; } /** * Decode a JWT token payload to extract iat/exp without verifying the signature. */ export declare function decodeJwtTimestamps(token: string): { iat?: number; exp?: number; } | null;