UNPKG

@golemio/energetics

Version:
51 lines (50 loc) 1.47 kB
export interface ICemConfig { authcookiename: string; user: string; pass: string; } /** * Helper class for requesting additional data from Unimonitor CEM API */ declare class UnimonitorCemApiHelper { private url; private config; static API_DATE_FORMAT: string; static API_DATE_TZ: string; private static COOKIE_KV_SEPARATOR; constructor(url: string, config: ICemConfig); /** * Create API session and return authorization cookie */ createSession: () => Promise<string>; /** * Terminate current session/invalidate auth cookie */ terminateSession: (authCookie: string) => Promise<void>; private getAuthCookie; /** * Return resource types/identifiers */ static get resourceType(): { readonly Devices: "46"; readonly Counters: "45"; readonly MeasurementsByCounter: "3"; readonly Measurement: "20"; readonly MeasuringEquipment: "6"; readonly MeterType: "14"; readonly TypeMeasuringEquipment: "11"; readonly Units: "7"; readonly UserLogin: "4"; readonly UserLogout: "5"; }; /** Return counter types/identifiers */ static get counterType(): { readonly ElHighTariff: 1; readonly ElLowTariff: 2; }; /** * Process and filter auth cookie from the original cookie header */ private static processAndFilterAuthCookie; } export { UnimonitorCemApiHelper };