UNPKG

homebridge-econet-rheem

Version:

Homebridge plugin for control of Rheem and Ruud thermostats and water heaters

29 lines (28 loc) 893 B
import { DeviceTokenData, UserTokenData } from './types.js'; export declare enum AuthType { DEVICE = 0, USER = 1 } declare abstract class Auth { readonly type: AuthType; constructor(type: AuthType); } export declare class UserAuth extends Auth { private readonly data; constructor(data: UserTokenData); get token(): string; get userId(): string; get accountId(): string; save(encryptionKey: string): void; static load(encryptionKey: string): UserAuth | undefined; } export declare class DeviceAuth extends Auth { private readonly data; static cache: Map<string, DeviceAuth>; private constructor(); get name(): string; get token(): string; static save(serialNumber: string, data: DeviceTokenData, encryptionKey: string): void; static load(serialNumber: string, encryptionKey: string): DeviceAuth | undefined; } export {};