UNPKG

matterbridge-roborock-vacuum-plugin

Version:
81 lines 2.05 kB
import { Device, DeviceModel, Home, UserData } from '../../roborockCommunication/models/index.js'; /** * Fluent builder for creating Device objects in tests. * Provides sensible defaults for all required fields. */ export declare class DeviceBuilder { private device; /** * Set the device unique identifier. */ withDuid(duid: string): this; /** * Set the device name. */ withName(name: string): this; /** * Set the device model. */ withModel(model: DeviceModel): this; /** * Set the battery level (0-100). */ withBattery(level: number): this; /** * Set the device online status. */ withOnlineStatus(online: boolean): this; /** * Set the firmware version. */ withFirmwareVersion(version: string): this; /** * Set the serial number. */ withSerialNumber(sn: string): this; /** * Set the local key for authentication. */ withLocalKey(key: string): this; /** * Set the protocol version. */ withProtocolVersion(pv: string): this; /** * Set user data for the device. */ withUserData(userData: UserData): this; /** * Set the home ID. */ withHomeId(homeId: number): this; /** * Add home data to the device store. */ withHomeData(homeData: Home): this; /** * Build the device object. * @returns Complete Device instance */ build(): Device; /** * Creates default user data for testing. */ private createDefaultUserData; /** * Creates default home data for testing. */ private createDefaultHomeData; } /** * Quick helper to create a basic test device. * @param overrides - Optional property overrides * @returns Device instance with defaults * * @example * ```typescript * const device = createTestDevice({ duid: 'my-device', battery: 50 }); * ``` */ export declare function createTestDevice(overrides?: Partial<Device>): Device; //# sourceMappingURL=device-builder.d.ts.map