tabletcommand-backend-models 7.4.126 → 7.4.128
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/models/country.js +85 -0
- package/build/models/country.js.map +1 -0
- package/build/models/status-beacon.js +37 -0
- package/build/models/status-beacon.js.map +1 -1
- package/build/test/0index.js +1 -0
- package/build/test/0index.js.map +1 -1
- package/build/test/country.js +161 -0
- package/build/test/country.js.map +1 -0
- package/build/test/mock.js +13 -0
- package/build/test/mock.js.map +1 -1
- package/build/test/status-beacon.js +22 -0
- package/build/test/status-beacon.js.map +1 -1
- package/build/types/country.js +3 -0
- package/build/types/country.js.map +1 -0
- package/definitions/index.d.ts +6 -0
- package/definitions/index.d.ts.map +1 -1
- package/definitions/models/country.d.ts +13 -0
- package/definitions/models/country.d.ts.map +1 -0
- package/definitions/models/status-beacon.d.ts.map +1 -1
- package/definitions/test/country.d.ts +2 -0
- package/definitions/test/country.d.ts.map +1 -0
- package/definitions/test/mock.d.ts +33 -0
- package/definitions/test/mock.d.ts.map +1 -1
- package/definitions/types/country.d.ts +17 -0
- package/definitions/types/country.d.ts.map +1 -0
- package/definitions/types/status-beacon.d.ts +9 -0
- package/definitions/types/status-beacon.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/models/country.ts +97 -0
- package/src/models/status-beacon.ts +37 -0
- package/src/test/0index.ts +1 -0
- package/src/test/country.ts +163 -0
- package/src/test/mock.ts +13 -0
- package/src/test/status-beacon.ts +26 -0
- package/src/types/country.ts +18 -0
- package/src/types/status-beacon.ts +10 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface CountryStateType {
|
|
4
|
+
code: string,
|
|
5
|
+
name: string,
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface CountryType extends Record<string, unknown> {
|
|
9
|
+
_id: Types.ObjectId,
|
|
10
|
+
isoCode: string,
|
|
11
|
+
isoAlpha3: string,
|
|
12
|
+
isoNumeric: string,
|
|
13
|
+
name: string,
|
|
14
|
+
currencyCode: string,
|
|
15
|
+
preferredLanguage: string,
|
|
16
|
+
states: CountryStateType[],
|
|
17
|
+
modified: Date,
|
|
18
|
+
}
|
|
@@ -35,6 +35,7 @@ export interface StatusBeaconType {
|
|
|
35
35
|
// Identity
|
|
36
36
|
integration: string;
|
|
37
37
|
interfaceStartTime: Date; // UTC time the integration service process started; never resets — use for uptime
|
|
38
|
+
keepAliveIntervalSecs: number; // this box's beacon cadence; "beacon missing" = no beacon for 2x this + 15s
|
|
38
39
|
// Health State
|
|
39
40
|
healthState: string;
|
|
40
41
|
triggerReason: string;
|
|
@@ -52,6 +53,8 @@ export interface StatusBeaconType {
|
|
|
52
53
|
unitStatusDelta: number;
|
|
53
54
|
// Queue Depths
|
|
54
55
|
queueDepths: QueueDepthsType;
|
|
56
|
+
queueAges: Record<string, unknown>; // oldest message age per relay queue (beacon 1.2+)
|
|
57
|
+
queueDroppedDelta: number; // messages dropped after max retries since the last beacon
|
|
55
58
|
// Auth Token Health (Bearer auth only; null otherwise)
|
|
56
59
|
tokenAgeSecs?: number;
|
|
57
60
|
tokenExpiresAt?: Date;
|
|
@@ -61,6 +64,12 @@ export interface StatusBeaconType {
|
|
|
61
64
|
writeBack: WriteBackHealthType;
|
|
62
65
|
// Sync Health
|
|
63
66
|
sync: SyncHealthType;
|
|
67
|
+
// Diagnostics (beacon 1.2+) — free-form while the wire dialect settles; display only
|
|
68
|
+
channels: Record<string, unknown>; // per target (incident, vehicleStatus, avl, ...): armed, lastSuccessUtc, ageSecs, ...
|
|
69
|
+
pollers: Record<string, unknown>; // TC → CAD write-back pollers (status, event, avl)
|
|
70
|
+
auth: Record<string, unknown>; // per-message key failures
|
|
71
|
+
restartPoll: Record<string, unknown>;
|
|
72
|
+
clockSync: Record<string, unknown>;
|
|
64
73
|
// Debug & Config
|
|
65
74
|
debugPushActive: boolean;
|
|
66
75
|
lastConfigSave?: Date;
|
|
@@ -70,6 +79,7 @@ export interface StatusBeaconType {
|
|
|
70
79
|
interfaceVersion: string;
|
|
71
80
|
cadVersion: string;
|
|
72
81
|
unifiedVersion: string;
|
|
82
|
+
beaconVersion: string; // beacon payload dialect, e.g. "1.2.22"
|
|
73
83
|
// System (managed by Mongoose timestamps)
|
|
74
84
|
createdAt: Date;
|
|
75
85
|
updatedAt: Date;
|