matterbridge-roborock-vacuum-plugin
Version:
Matterbridge Roborock Vacuum Plugin
23 lines • 981 B
TypeScript
/**
* Platform state container.
* Holds ephemeral runtime state for the platform (device states, last home data).
* Uses strict types (no `any`) and provides simple accessor/mutator API.
*/
export type DeviceState = Record<string, unknown>;
export type HomeData = Record<string, unknown>;
export declare class PlatformState {
private readonly deviceStates;
private readonly lastHomeData;
private startupCompleted;
get isStartupCompleted(): boolean;
setStartupCompleted(completed: boolean): void;
setDeviceState(duid: string, state: DeviceState): void;
getDeviceState(duid: string): DeviceState | undefined;
updateDeviceState(duid: string, patch: Partial<DeviceState>): void;
setLastHomeData(duid: string, data: HomeData): void;
getLastHomeData(duid: string): HomeData | undefined;
clearDevice(duid: string): void;
clearAll(): void;
getAllDeviceStates(): Map<string, DeviceState>;
}
//# sourceMappingURL=platformState.d.ts.map