Appearance
Type Definitions
All shared TypeScript types are defined in lib/src/types/. These are .d.ts declaration files (except enums.ts which has runtime values).
Query Result Types (query.d.ts)
Database query result types used across the server.
Core Entities
| Type | Fields | Purpose |
|---|---|---|
QueryResultUser | id, email, password, is_admin | User account |
QueryResultBeacon | id, mac, name, type, location_id, ... | BLE beacon |
QueryResultLocation | id, name | Physical location |
QueryResultGateway | id, mac, mac2, name, ip, location_id, map_id | BLE gateway |
QueryResultGatewayWithLocation | ...gateway fields + location_name | Gateway with joined location |
Maps & Zones
| Type | Purpose |
|---|---|
QueryResultMap | Floor map image metadata |
QueryResultFloor | Navigation floor metadata |
QueryResultZone | Zone with rectangle coordinates |
QueryResultZoneConnection | Zone adjacency edge |
Navigation
| Type | Purpose |
|---|---|
QueryResultNode | Navigation graph node (x, y, floor) |
QueryResultEdge | Navigation graph edge (from, to, weight) |
QueryResultNavigationToken | Read-only navigation access token |
Events & Logs
| Type | Purpose |
|---|---|
QueryResultLog | System log entry |
QueryResultBeaconLog | Beacon-specific log |
QueryResultBeaconEvent | Panic/SOS event |
QueryResultTrackingLog | Tracking interval |
Devices
| Type | Purpose |
|---|---|
QueryDevicesGateway | Gateway device sync record |
QueryDevicesBeacon | Beacon device sync record |
HTTP Types (http.d.ts)
Types for the HTTP server and WebSocket communication.
MQTT Types (mqtt.d.ts)
Types for MQTT message payloads (beacon advertisements, gateway alive).
JOSE Types (jose.d.ts)
Types for JWT keys and token payloads.
Zone Types (zone.d.ts)
Types for zone rectangles, connections, and tracking state.
Beacon Types (beacon.d.ts)
Types for beacon state, push types, and cache entries.
Pixi Types (pixi.d.ts)
Types for Pixi.js canvas components used in the web frontend (zone rectangles, gateway markers, tracking overlays).
LLD Types (lld.d.ts)
Types for Zabbix Low-Level Discovery data formats.
Cache/Bridge Types (cache_bridge.d.ts)
Types for the bridge cache (beacon and gateway lists from REST API).
Enums (enums.ts)
Shared runtime enumerations used across the project.
Response Types (rs.d.ts)
Types for standardized HTTP responses.
Request Types (rq.d.ts)
Types for HTTP request payloads.
Generic Types (generic.d.ts)
General-purpose utility types.
Database Types (db.d.ts)
Types for database configuration and migration state.