import { Repository } from 'typeorm'; import { EventEmitter2 } from '@nestjs/event-emitter'; import { ChannelCategory, DeviceCategory } from '../../devices/devices.constants'; import { ChannelEntity, DeviceEntity } from '../../devices/entities/devices.entity'; import { SetClimateRoleDto } from '../dto/climate-role.dto'; import { SpaceClimateRoleEntity } from '../entities/space-climate-role.entity'; import { ClimateRole } from '../spaces.constants'; import { SpacesService } from './spaces.service'; export interface ClimateTargetInfo { deviceId: string; deviceName: string; deviceCategory: DeviceCategory; channelId: string | null; channelName: string | null; channelCategory: ChannelCategory | null; role: ClimateRole | null; priority: number; hasTemperature: boolean; hasHumidity: boolean; hasAirQuality: boolean; hasAirParticulate: boolean; hasCarbonDioxide: boolean; hasVolatileOrganicCompounds: boolean; hasPressure: boolean; hasMode: boolean; } export interface BulkClimateRoleResultItem { deviceId: string; channelId: string | null; success: boolean; role: ClimateRole | null; error: string | null; } export interface BulkClimateRoleResult { success: boolean; totalCount: number; successCount: number; failureCount: number; results: BulkClimateRoleResultItem[]; } export interface ClimateTargetEventPayload { id: string; space_id: string; device_id: string; device_name: string; device_category: DeviceCategory; channel_id: string | null; channel_name: string | null; channel_category: ChannelCategory | null; role: ClimateRole | null; priority: number; has_temperature: boolean; has_humidity: boolean; has_air_quality: boolean; has_air_particulate: boolean; has_carbon_dioxide: boolean; has_volatile_organic_compounds: boolean; has_pressure: boolean; has_mode: boolean; } export declare class SpaceClimateRoleService { private readonly repository; private readonly deviceRepository; private readonly channelRepository; private readonly spacesService; private readonly eventEmitter; private readonly logger; constructor(repository: Repository, deviceRepository: Repository, channelRepository: Repository, spacesService: SpacesService, eventEmitter: EventEmitter2); findBySpace(spaceId: string): Promise; findOne(spaceId: string, deviceId: string, channelId?: string | null): Promise; setRole(spaceId: string, dto: SetClimateRoleDto): Promise; bulkSetRoles(spaceId: string, roles: SetClimateRoleDto[]): Promise; deleteRole(spaceId: string, deviceId: string, channelId?: string | null): Promise; getClimateTargetsInSpace(spaceId: string): Promise; inferDefaultClimateRoles(spaceId: string): Promise; getRoleMap(spaceId: string): Promise>; private buildClimateTargetEventPayload; }