import type { InternalConfig, StringConfig } from "@digital-alchemy/core"; import type { CleanupModes, HassDeviceMetadata } from "./helpers/index.mts"; import { ConfigurationService, DatabaseMySQLService, DatabasePostgreSQLService, DatabaseService, DatabaseSQLiteService, DeviceService, DomainGeneratorService, ServiceService, StorageService, SynapseLocalsService, SynapseWebSocketService, VirtualBinarySensor, VirtualButton, VirtualDate, VirtualDateTime, VirtualLock, VirtualNumber, VirtualScene, VirtualSelect, VirtualSensor, VirtualSwitch, VirtualText, VirtualTime } from "./services/index.mts"; export declare const LIB_SYNAPSE: import("@digital-alchemy/core").LibraryDefinition<{ binary_sensor: typeof VirtualBinarySensor; button: typeof VirtualButton; /** * ### Customize date type * * Provides `YYYY-MM-DD` format by default * * > Available options: `iso` | `date` | `dayjs` * * ```typescript * synapse.date<{ date_type: "dayjs" }>({ ... }) * ``` */ date: typeof VirtualDate; /** * ### Customize datetime type * * > Available options: `iso` | `date` | `dayjs` * * ```typescript * synapse.datetime<{ date_type: "dayjs" }>({ ... }) * ``` */ datetime: typeof VirtualDateTime; lock: typeof VirtualLock; number: typeof VirtualNumber; scene: typeof VirtualScene; select: typeof VirtualSelect; /** * ### Sensor * * Creates sensor entities for various measurements and states. * * The state type is determined by the `device_class` property, not by generic type parameters. * For example, `device_class: "temperature"` will result in a numeric state, * while `device_class: "enum"` will result in a string state. * * ```typescript * synapse.sensor({ * device_class: "temperature", * unit_of_measurement: "°C", * state: 22.5 * }); * ``` */ sensor: typeof VirtualSensor; switch: typeof VirtualSwitch; text: typeof VirtualText; time: typeof VirtualTime; /** * @internal */ configure: typeof ConfigurationService; /** * @internal * * Used to persist entity state */ database: typeof DatabaseService; /** * internal use */ db_mysql: typeof DatabaseMySQLService; /** * internal use */ db_postgres: typeof DatabasePostgreSQLService; /** * internal use */ db_sqlite: typeof DatabaseSQLiteService; /** * Internal tools to create the device that registers with entities */ device: typeof DeviceService; /** * @internal * * Used to assist creation of domains */ generator: typeof DomainGeneratorService; /** * @internal * * Used to power `synapseEntity.locals` */ locals: typeof SynapseLocalsService; /** * lol */ service: typeof ServiceService; /** * @internal */ socket: typeof SynapseWebSocketService; /** * @internal */ storage: typeof StorageService; }, { DATABASE_TYPE: StringConfig<"sqlite" | "postgresql" | "mysql">; DATABASE_URL: { default: string; description: string; type: "string"; }; DEFAULT_SERVICE_DOMAIN: { default: string; description: string; type: "string"; }; EMIT_HEARTBEAT: { default: true; description: string[]; type: "boolean"; }; ENTITY_CLEANUP_METHOD: StringConfig; EVENT_NAMESPACE: { default: string; description: string[]; type: "string"; }; HEARTBEAT_INTERVAL: { default: number; description: string; type: "number"; }; METADATA: InternalConfig; METADATA_TITLE: { description: string[]; type: "string"; }; METADATA_UNIQUE_ID: { description: string[]; type: "string"; }; REBUILD_ON_ENTITY_CHANGE: { default: false; description: string; type: "boolean"; }; }>; declare module "@digital-alchemy/core" { interface LoadedModules { /** * tools for creating new entities within home assistant */ synapse: typeof LIB_SYNAPSE; } }