import type { TContext } from "@digital-alchemy/core"; import type { ByIdProxy } from "@digital-alchemy/hass"; export type OnOff = "on" | "off" | "unavailable"; export interface ISynapseBrand { _synapse: symbol; } export interface ISynapseDeviceBrand { _synapse_device: symbol; } export type TSynapseId = string & ISynapseBrand; export type TSynapseDeviceId = string & ISynapseDeviceBrand; export declare const STORAGE_BOOTSTRAP_PRIORITY = 1; export type SynapseDescribeResponse = { hostname: string; host: string; title: string; app: string; device: HassDeviceMetadata; secondary_devices: HassDeviceMetadata[]; unique_id: string; username: string; }; export type BasicAddParams = { locals?: object; attributes?: object; }; export type HassDeviceMetadata = { /** * A URL on which the device or service can be configured, linking to paths inside the Home Assistant UI can be done by using `homeassistant://`. */ configuration_url?: string; /** * The manufacturer of the device, will be overridden if `manufacturer` is set. Useful for example for an integration showing all devices on the network. */ manufacturer?: string; /** * The model of the device, will be overridden if `model` is set. Useful for example for an integration showing all devices on the network. */ model?: string; /** * Default name of this device, will be overridden if `name` is set. Useful for example for an integration showing all devices on the network. */ name?: string; /** * The hardware version of the device. */ hw_version?: string; /** * The serial number of the device. Unlike a serial number in the `identifiers` set, this does not need to be unique. */ serial_number?: string; /** * The suggested name for the area where the device is located. * * Use readable name, not area id ("Living Room" not "living_room") */ suggested_area?: string; /** * The firmware version of the device. */ sw_version?: string; }; export declare const md5ToUUID: (md5: string) => string; export declare class SynapseEntityException extends Error { context: TContext; cause: string; constructor(context: TContext, cause: string, message: string); } /** * Utility type that extracts the return type of getEntity() from a SynapseEntityProxy */ export type GetGeneratedEntity = T extends { getEntity: () => ByIdProxy; } ? ByIdProxy : never; export declare const EVENT_SYNAPSE_PULL_DB = "EVENT_SYNAPSE_PULL_DB";