UNPKG

tsvesync

Version:

A TypeScript library for interacting with VeSync smart home devices

20 lines (19 loc) 643 B
/** * VeSync API Error Codes */ export declare const CREDENTIAL_ERROR_CODES: number[]; export declare const CROSS_REGION_ERROR_CODES: number[]; export declare const TOKEN_ERROR_CODES: number[]; export declare const APP_VERSION_ERROR_CODES: number[]; /** * Check if an error code indicates bad credentials */ export declare function isCredentialError(code: number): boolean; /** * Check if an error code indicates cross-region issue */ export declare function isCrossRegionError(code: number): boolean; /** * Check if an error code indicates the token is invalid/expired. */ export declare function isTokenError(code: number): boolean;