import { BehaviorSubject } from 'rxjs'; import { OnModuleDestroy } from '@nestjs/common'; import { Optional } from '~ultimate-govee-common'; import { GoveeDeviceStatus } from '~ultimate-govee-data'; import { CommandBus, EventBus } from '@nestjs/cqrs'; import { DeviceModel } from './devices.model'; import { DeviceState } from './states/device.state'; import { DeviceStateValues, DeviceStatesType, DeviceType } from './devices.types'; import { Version } from './version.info'; export declare const DefaultFactory: 'default'; export type DeviceImage = { sku?: string; on?: string; off?: string; }; export type StateFactory> = (device: DeviceModel) => TDevice; type ModelStateFactoryValue = StateFactory> | StateFactory>[]; export type ModelStateFactory = Record | StateFactory>; export type StateFactories = ModelStateFactory[]; export declare class Device extends BehaviorSubject>> implements DeviceType, OnModuleDestroy { readonly device: DeviceModel; protected readonly eventBus: EventBus; protected readonly commandBus: CommandBus; private readonly logger; static readonly deviceType: string; get deviceType(): string; private readonly deviceStates; private readonly opIdentifiers; private readonly refresh$; private readonly subscriptions; protected isDebug: boolean; protected addState>(state: TDevice): TDevice; get id(): string; get model(): string; get name(): string; get goodsType(): number; get pactCode(): number; get images(): Optional; get pactType(): number; get iotTopic(): Optional; get bleAddress(): Optional; get version(): Version; get states(): States; currentStates(): DeviceStateValues; previousStates(): DeviceStateValues; state = DeviceState>(stateName: string): Optional; deviceStatus(status: GoveeDeviceStatus): void; refresh(): void; setState(stateName: string, nextState: any): any; debug(isDebug: boolean): this; constructor(device: DeviceModel, eventBus: EventBus, commandBus: CommandBus, stateFactories: StateFactories); loggableState(deviceId: string): { deviceId: string; name: string; model: string; type: string; iotTopic: Optional; bleAddress: Optional; states: any; history: any; }; logState(): void; closeSubscriptions(): void; onModuleDestroy(): void; } export {}; //# sourceMappingURL=device.d.ts.map