@felixgeelhaar/govee-api-client
Version:
Enterprise-grade TypeScript client library for the Govee Developer REST API
59 lines • 1.71 kB
TypeScript
interface GoveeCapability {
type: string;
instance: string;
parameters?: {
dataType: string;
options?: Array<{
name: string;
value: unknown;
}>;
};
}
export declare class GoveeDevice {
private readonly _deviceId;
private readonly _sku;
private readonly _deviceName;
private readonly _capabilities;
private readonly _controllable;
private readonly _retrievable;
private readonly _supportedCmds;
constructor(deviceId: string, sku: string, deviceName: string, capabilities: GoveeCapability[]);
private validateDeviceId;
private validateSku;
private validateDeviceName;
private validateCapabilities;
private deriveControllable;
private deriveRetrievable;
private deriveSupportedCommands;
get deviceId(): string;
get model(): string;
get sku(): string;
get capabilities(): readonly GoveeCapability[];
get deviceName(): string;
get controllable(): boolean;
get retrievable(): boolean;
get supportedCmds(): readonly string[];
equals(other: GoveeDevice): boolean;
toString(): string;
supportsCommand(command: string): boolean;
canControl(): boolean;
canRetrieve(): boolean;
toObject(): {
deviceId: string;
model: string;
deviceName: string;
controllable: boolean;
retrievable: boolean;
supportedCmds: string[];
};
static fromObject(obj: {
deviceId: string;
model: string;
deviceName: string;
controllable: boolean;
retrievable: boolean;
supportedCmds: string[];
}): GoveeDevice;
}
export {};
//# sourceMappingURL=GoveeDevice.d.ts.map