Skip to content

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

TypeFieldsPurpose
QueryResultUserid, email, password, is_adminUser account
QueryResultBeaconid, mac, name, type, location_id, ...BLE beacon
QueryResultLocationid, namePhysical location
QueryResultGatewayid, mac, mac2, name, ip, location_id, map_idBLE gateway
QueryResultGatewayWithLocation...gateway fields + location_nameGateway with joined location

Maps & Zones

TypePurpose
QueryResultMapFloor map image metadata
QueryResultFloorNavigation floor metadata
QueryResultZoneZone with rectangle coordinates
QueryResultZoneConnectionZone adjacency edge
TypePurpose
QueryResultNodeNavigation graph node (x, y, floor)
QueryResultEdgeNavigation graph edge (from, to, weight)
QueryResultNavigationTokenRead-only navigation access token

Events & Logs

TypePurpose
QueryResultLogSystem log entry
QueryResultBeaconLogBeacon-specific log
QueryResultBeaconEventPanic/SOS event
QueryResultTrackingLogTracking interval

Devices

TypePurpose
QueryDevicesGatewayGateway device sync record
QueryDevicesBeaconBeacon 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.