export interface IHueConfig {
  bridgeId: string;
  host: string;
  appKey: string;
  port?: number;
  resources?: IHueResourceResponse;
}

export interface IHueLightStatePatch {
  on?: boolean;
  brightness?: number;
}

export interface IHueDeviceResource {
  id: string;
  idV1?: string;
  productData?: {
    manufacturerName?: string;
    modelId?: string;
    productName?: string;
    softwareVersion?: string;
  };
  metadata?: {
    name?: string;
    archetype?: string;
  };
}

export interface IHueLightResource {
  id: string;
  idV1?: string;
  owner?: {
    rid: string;
    rtype: string;
  };
  metadata?: {
    name?: string;
    archetype?: string;
  };
  on?: {
    on: boolean;
  };
  dimming?: {
    brightness: number;
  };
}

export interface IHueResourceResponse {
  bridge?: IHueDeviceResource;
  devices: IHueDeviceResource[];
  lights: IHueLightResource[];
}

export interface IHueMdnsRecord {
  host?: string;
  port?: number;
  txt?: {
    bridgeid?: string;
    modelid?: string;
    [key: string]: string | undefined;
  };
}

export interface IHueEvent {
  id: string;
  type: string;
  data: unknown;
}
