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 { SetSensorRoleDto } from '../dto/sensor-role.dto'; import { SpaceSensorRoleEntity } from '../entities/space-sensor-role.entity'; import { SensorRole } from '../spaces.constants'; import { SpacesService } from './spaces.service'; export interface SensorTargetInfo { deviceId: string; deviceName: string; deviceCategory: DeviceCategory; channelId: string; channelName: string; channelCategory: ChannelCategory; role: SensorRole | null; priority: number; } export interface BulkSensorRoleResultItem { deviceId: string; channelId: string; success: boolean; role: SensorRole | null; error: string | null; } export interface BulkSensorRoleResult { success: boolean; totalCount: number; successCount: number; failureCount: number; results: BulkSensorRoleResultItem[]; } export interface SensorTargetEventPayload { id: string; space_id: string; device_id: string; device_name: string; device_category: DeviceCategory; channel_id: string; channel_name: string; channel_category: ChannelCategory; role: SensorRole | null; priority: number; } export declare class SpaceSensorRoleService { 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): Promise; setRole(spaceId: string, dto: SetSensorRoleDto): Promise; bulkSetRoles(spaceId: string, roles: SetSensorRoleDto[]): Promise; deleteRole(spaceId: string, deviceId: string, channelId: string): Promise; getSensorTargetsInSpace(spaceId: string): Promise; inferDefaultSensorRoles(spaceId: string): Promise; private inferRoleFromTarget; private inferRoleFromChannelCategory; getRoleMap(spaceId: string): Promise>; private buildSensorTargetEventPayload; }