clarion-shared-types 1.0.119 → 1.0.120
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/dist/cjs/modules/dispatch/index.js +1 -0
- package/dist/cjs/modules/dispatch/index.js.map +1 -1
- package/dist/cjs/modules/dispatch/interfaces/dispatch-analytics.js +3 -0
- package/dist/cjs/modules/dispatch/interfaces/dispatch-analytics.js.map +1 -0
- package/dist/cjs/modules/permission/enums/permission-actions.enum.js +2 -0
- package/dist/cjs/modules/permission/enums/permission-actions.enum.js.map +1 -1
- package/dist/cjs/modules/tracking/index.js +1 -0
- package/dist/cjs/modules/tracking/index.js.map +1 -1
- package/dist/cjs/modules/tracking/interfaces/tracking-analytics.js +14 -0
- package/dist/cjs/modules/tracking/interfaces/tracking-analytics.js.map +1 -0
- package/dist/esm/modules/dispatch/index.js +1 -0
- package/dist/esm/modules/dispatch/index.js.map +1 -1
- package/dist/esm/modules/dispatch/interfaces/dispatch-analytics.js +2 -0
- package/dist/esm/modules/dispatch/interfaces/dispatch-analytics.js.map +1 -0
- package/dist/esm/modules/permission/enums/permission-actions.enum.js +2 -0
- package/dist/esm/modules/permission/enums/permission-actions.enum.js.map +1 -1
- package/dist/esm/modules/tracking/index.js +1 -0
- package/dist/esm/modules/tracking/index.js.map +1 -1
- package/dist/esm/modules/tracking/interfaces/tracking-analytics.js +13 -0
- package/dist/esm/modules/tracking/interfaces/tracking-analytics.js.map +1 -0
- package/dist/types/modules/dispatch/index.d.ts +1 -0
- package/dist/types/modules/dispatch/interfaces/dispatch-analytics.d.ts +158 -0
- package/dist/types/modules/permission/enums/permission-actions.enum.d.ts +1 -0
- package/dist/types/modules/tracking/index.d.ts +1 -0
- package/dist/types/modules/tracking/interfaces/tracking-analytics.d.ts +205 -0
- package/package.json +1 -1
|
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
__exportStar(require("./enums/response-unit-dispatch-enums"), exports);
|
|
19
19
|
// Interfaces
|
|
20
20
|
__exportStar(require("./interfaces/response-unit-dispatch.dto"), exports);
|
|
21
|
+
__exportStar(require("./interfaces/dispatch-analytics"), exports);
|
|
21
22
|
// Utilities
|
|
22
23
|
__exportStar(require("./utils/response-unit-dispatch-display.util"), exports);
|
|
23
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/dispatch/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,uEAAqD;AAErD,aAAa;AACb,0EAAwD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/dispatch/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,uEAAqD;AAErD,aAAa;AACb,0EAAwD;AACxD,kEAAgD;AAEhD,YAAY;AACZ,8EAA4D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispatch-analytics.js","sourceRoot":"","sources":["../../../../../src/modules/dispatch/interfaces/dispatch-analytics.ts"],"names":[],"mappings":""}
|
|
@@ -81,6 +81,8 @@ var PermissionActions;
|
|
|
81
81
|
PermissionActions["READ_TRACKING_POSITION"] = "read:tracking-position";
|
|
82
82
|
PermissionActions["READ_TRACKING_HISTORY"] = "read:tracking-history";
|
|
83
83
|
PermissionActions["READ_TRACKING_OPERATIONS"] = "read:tracking-operations";
|
|
84
|
+
// Units & Tracking Analytics (the tracking and dispatch halves).
|
|
85
|
+
PermissionActions["READ_TRACKING_ANALYTICS"] = "read:tracking-analytics";
|
|
84
86
|
PermissionActions["MANAGE_TRACKING_OPERATIONS"] = "manage:tracking-operations";
|
|
85
87
|
// Module: Response Unit Dispatch - the recommendation, sending a unit, and
|
|
86
88
|
// recording its progress. Deliberately not update:incident, which every app
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permission-actions.enum.js","sourceRoot":"","sources":["../../../../../src/modules/permission/enums/permission-actions.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"permission-actions.enum.js","sourceRoot":"","sources":["../../../../../src/modules/permission/enums/permission-actions.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAiUX;AAjUD,WAAY,iBAAiB;IACzB,uBAAuB;IACvB,gEAA2C,CAAA;IAC3C,4DAAuC,CAAA;IACvC,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAE3C,kBAAkB;IAClB,sDAAiC,CAAA;IACjC,kDAA6B,CAAA;IAC7B,sDAAiC,CAAA;IACjC,sDAAiC,CAAA;IACjC,wEAAwE;IACxE,mEAAmE;IACnE,oEAA+C,CAAA;IAC/C,0EAAqD,CAAA;IACrD,wEAAmD,CAAA;IACnD,wEAAmD,CAAA;IACnD,wEAAmD,CAAA;IACnD,2EAA2E;IAC3E,4EAA4E;IAC5E,qEAAqE;IACrE,uDAAuD;IACvD,wEAAmD,CAAA;IACnD,4EAAuD,CAAA;IACvD,+EAA+E;IAC/E,2EAA2E;IAC3E,6EAA6E;IAC7E,8EAA8E;IAC9E,2EAA2E;IAC3E,sEAAiD,CAAA;IAEjD,wBAAwB;IACxB,oEAA+C,CAAA;IAC/C,gEAA2C,CAAA;IAC3C,oEAA+C,CAAA;IAC/C,oEAA+C,CAAA;IAE/C,eAAe;IACf,gDAA2B,CAAA;IAC3B,4CAAuB,CAAA;IACvB,gDAA2B,CAAA;IAC3B,gDAA2B,CAAA;IAE3B,eAAe;IACf,gDAA2B,CAAA;IAC3B,4CAAuB,CAAA;IACvB,gDAA2B,CAAA;IAC3B,gDAA2B,CAAA;IAC3B,4GAA4G;IAC5G,gEAA2C,CAAA;IAE3C,mBAAmB;IACnB,wDAAmC,CAAA;IACnC,oDAA+B,CAAA;IAC/B,wDAAmC,CAAA;IACnC,wDAAmC,CAAA;IACnC,oFAAoF;IACpF,gEAAgE;IAChE,gEAA2C,CAAA;IAC3C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AAA;IAC3D,gFAAgF;IAChF,sFAAsF;IACtF,kFAA6D,CAAA;IAE7D,gFAAgF;IAChF,0EAA0E;IAC1E,gDAAgD;IAChD,0DAAqC,CAAA;IACrC,4DAAuC,CAAA;IACvC,8EAAyD,CAAA;IACzD,2EAA2E;IAC3E,oEAA+C,CAAA;IAC/C,iFAAiF;IACjF,4EAA4E;IAC5E,mEAAmE;IACnE,oDAA+B,CAAA;IAC/B,sDAAiC,CAAA;IACjC,wDAAmC,CAAA;IAEnC,4DAA4D;IAC5D,8DAAyC,CAAA;IAEzC,wEAAwE;IACxE,0DAA0D;IAC1D,4DAAuC,CAAA;IACvC,gEAA2C,CAAA;IAC3C,kEAA6C,CAAA;IAC7C,0EAAqD,CAAA;IACrD,8EAAyD,CAAA;IACzD,gFAA2D,CAAA;IAE3D,6EAA6E;IAC7E,sEAAsE;IACtE,6EAA6E;IAC7E,2EAA2E;IAC3E,+BAA+B;IAC/B,4DAAuC,CAAA;IACvC,sFAAiE,CAAA;IACjE,4EAAuD,CAAA;IACvD,wGAAwG;IACxG,4DAAuC,CAAA;IACvC,wGAAwG;IACxG,gEAA2C,CAAA;AAC/C,CAAC,EAjUW,iBAAiB,iCAAjB,iBAAiB,QAiU5B"}
|
|
@@ -27,4 +27,5 @@ __exportStar(require("./interfaces/tracking-position.dto"), exports);
|
|
|
27
27
|
__exportStar(require("./interfaces/tracking-socket-events"), exports);
|
|
28
28
|
__exportStar(require("./interfaces/tracking-operations.dto"), exports);
|
|
29
29
|
__exportStar(require("./interfaces/tracking-playback.dto"), exports);
|
|
30
|
+
__exportStar(require("./interfaces/tracking-analytics"), exports);
|
|
30
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/tracking/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,sEAAoD;AACpD,uEAAqD;AACrD,0EAAwD;AACxD,2EAAyD;AAEzD,oBAAoB;AACpB,gFAA8D;AAC9D,4EAA0D;AAC1D,2EAAyD;AACzD,qEAAmD;AACnD,sEAAoD;AACpD,uEAAqD;AACrD,qEAAmD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/tracking/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,sEAAoD;AACpD,uEAAqD;AACrD,0EAAwD;AACxD,2EAAyD;AAEzD,oBAAoB;AACpB,gFAA8D;AAC9D,4EAA0D;AAC1D,2EAAyD;AACzD,qEAAmD;AACnD,sEAAoD;AACpD,uEAAqD;AACrD,qEAAmD;AACnD,kEAAgD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Units & Tracking analytics, the tracking half (the admin's Units & Tracking
|
|
4
|
+
* Analytics): the response units in scope and how they are tracked - computed by
|
|
5
|
+
* clarion-response-tracking. The other half, what was dispatched and how it went, is
|
|
6
|
+
* DispatchAnalytics (clarion-incident); both answer the same query.
|
|
7
|
+
*
|
|
8
|
+
* The fleet and its live status are as they stand NOW. Everything else is the period's,
|
|
9
|
+
* counted by the hour a position was recorded (`eventTime`): the service keeps an hourly
|
|
10
|
+
* rollup of the position history, so a year costs no more to read than a day. Counts,
|
|
11
|
+
* rates and durations only - never a position, a route or a device identifier.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
//# sourceMappingURL=tracking-analytics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracking-analytics.js","sourceRoot":"","sources":["../../../../../src/modules/tracking/interfaces/tracking-analytics.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export * from './enums/response-unit-dispatch-enums';
|
|
3
3
|
// Interfaces
|
|
4
4
|
export * from './interfaces/response-unit-dispatch.dto';
|
|
5
|
+
export * from './interfaces/dispatch-analytics';
|
|
5
6
|
// Utilities
|
|
6
7
|
export * from './utils/response-unit-dispatch-display.util';
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/dispatch/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,sCAAsC,CAAC;AAErD,aAAa;AACb,cAAc,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/dispatch/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,sCAAsC,CAAC;AAErD,aAAa;AACb,cAAc,yCAAyC,CAAC;AACxD,cAAc,iCAAiC,CAAC;AAEhD,YAAY;AACZ,cAAc,6CAA6C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispatch-analytics.js","sourceRoot":"","sources":["../../../../../src/modules/dispatch/interfaces/dispatch-analytics.ts"],"names":[],"mappings":""}
|
|
@@ -78,6 +78,8 @@ export var PermissionActions;
|
|
|
78
78
|
PermissionActions["READ_TRACKING_POSITION"] = "read:tracking-position";
|
|
79
79
|
PermissionActions["READ_TRACKING_HISTORY"] = "read:tracking-history";
|
|
80
80
|
PermissionActions["READ_TRACKING_OPERATIONS"] = "read:tracking-operations";
|
|
81
|
+
// Units & Tracking Analytics (the tracking and dispatch halves).
|
|
82
|
+
PermissionActions["READ_TRACKING_ANALYTICS"] = "read:tracking-analytics";
|
|
81
83
|
PermissionActions["MANAGE_TRACKING_OPERATIONS"] = "manage:tracking-operations";
|
|
82
84
|
// Module: Response Unit Dispatch - the recommendation, sending a unit, and
|
|
83
85
|
// recording its progress. Deliberately not update:incident, which every app
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permission-actions.enum.js","sourceRoot":"","sources":["../../../../../src/modules/permission/enums/permission-actions.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"permission-actions.enum.js","sourceRoot":"","sources":["../../../../../src/modules/permission/enums/permission-actions.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,iBAiUX;AAjUD,WAAY,iBAAiB;IACzB,uBAAuB;IACvB,gEAA2C,CAAA;IAC3C,4DAAuC,CAAA;IACvC,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAE3C,kBAAkB;IAClB,sDAAiC,CAAA;IACjC,kDAA6B,CAAA;IAC7B,sDAAiC,CAAA;IACjC,sDAAiC,CAAA;IACjC,wEAAwE;IACxE,mEAAmE;IACnE,oEAA+C,CAAA;IAC/C,0EAAqD,CAAA;IACrD,wEAAmD,CAAA;IACnD,wEAAmD,CAAA;IACnD,wEAAmD,CAAA;IACnD,2EAA2E;IAC3E,4EAA4E;IAC5E,qEAAqE;IACrE,uDAAuD;IACvD,wEAAmD,CAAA;IACnD,4EAAuD,CAAA;IACvD,+EAA+E;IAC/E,2EAA2E;IAC3E,6EAA6E;IAC7E,8EAA8E;IAC9E,2EAA2E;IAC3E,sEAAiD,CAAA;IAEjD,wBAAwB;IACxB,oEAA+C,CAAA;IAC/C,gEAA2C,CAAA;IAC3C,oEAA+C,CAAA;IAC/C,oEAA+C,CAAA;IAE/C,eAAe;IACf,gDAA2B,CAAA;IAC3B,4CAAuB,CAAA;IACvB,gDAA2B,CAAA;IAC3B,gDAA2B,CAAA;IAE3B,eAAe;IACf,gDAA2B,CAAA;IAC3B,4CAAuB,CAAA;IACvB,gDAA2B,CAAA;IAC3B,gDAA2B,CAAA;IAC3B,4GAA4G;IAC5G,gEAA2C,CAAA;IAE3C,mBAAmB;IACnB,wDAAmC,CAAA;IACnC,oDAA+B,CAAA;IAC/B,wDAAmC,CAAA;IACnC,wDAAmC,CAAA;IACnC,oFAAoF;IACpF,gEAAgE;IAChE,gEAA2C,CAAA;IAC3C,oFAA+D,CAAA;IAC/D,gFAA2D,CAAA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ACtF,kFAA6D,CAAA;IAE7D,gFAAgF;IAChF,0EAA0E;IAC1E,gDAAgD;IAChD,0DAAqC,CAAA;IACrC,4DAAuC,CAAA;IACvC,8EAAyD,CAAA;IACzD,2EAA2E;IAC3E,oEAA+C,CAAA;IAC/C,iFAAiF;IACjF,4EAA4E;IAC5E,mEAAmE;IACnE,oDAA+B,CAAA;IAC/B,sDAAiC,CAAA;IACjC,wDAAmC,CAAA;IAEnC,4DAA4D;IAC5D,8DAAyC,CAAA;IAEzC,wEAAwE;IACxE,0DAA0D;IAC1D,4DAAuC,CAAA;IACvC,gEAA2C,CAAA;IAC3C,kEAA6C,CAAA;IAC7C,0EAAqD,CAAA;IACrD,8EAAyD,CAAA;IACzD,gFAA2D,CAAA;IAE3D,6EAA6E;IAC7E,sEAAsE;IACtE,6EAA6E;IAC7E,2EAA2E;IAC3E,+BAA+B;IAC/B,4DAAuC,CAAA;IACvC,sFAAiE,CAAA;IACjE,4EAAuD,CAAA;IACvD,wGAAwG;IACxG,4DAAuC,CAAA;IACvC,wGAAwG;IACxG,gEAA2C,CAAA;AAC/C,CAAC,EAjUW,iBAAiB,KAAjB,iBAAiB,QAiU5B"}
|
|
@@ -11,4 +11,5 @@ export * from './interfaces/tracking-position.dto';
|
|
|
11
11
|
export * from './interfaces/tracking-socket-events';
|
|
12
12
|
export * from './interfaces/tracking-operations.dto';
|
|
13
13
|
export * from './interfaces/tracking-playback.dto';
|
|
14
|
+
export * from './interfaces/tracking-analytics';
|
|
14
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/tracking/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AAEzD,oBAAoB;AACpB,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0CAA0C,CAAC;AACzD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/tracking/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AAEzD,oBAAoB;AACpB,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0CAA0C,CAAC;AACzD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Units & Tracking analytics, the tracking half (the admin's Units & Tracking
|
|
3
|
+
* Analytics): the response units in scope and how they are tracked - computed by
|
|
4
|
+
* clarion-response-tracking. The other half, what was dispatched and how it went, is
|
|
5
|
+
* DispatchAnalytics (clarion-incident); both answer the same query.
|
|
6
|
+
*
|
|
7
|
+
* The fleet and its live status are as they stand NOW. Everything else is the period's,
|
|
8
|
+
* counted by the hour a position was recorded (`eventTime`): the service keeps an hourly
|
|
9
|
+
* rollup of the position history, so a year costs no more to read than a day. Counts,
|
|
10
|
+
* rates and durations only - never a position, a route or a device identifier.
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=tracking-analytics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracking-analytics.js","sourceRoot":"","sources":["../../../../../src/modules/tracking/interfaces/tracking-analytics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { UnitsAnalyticsCount, UnitsAnalyticsDuration, UnitsAnalyticsRange, UnitsAnalyticsScope } from '../../tracking/interfaces/tracking-analytics';
|
|
2
|
+
/**
|
|
3
|
+
* Units & Tracking analytics, the dispatch half: the response units sent to emergencies
|
|
4
|
+
* and what became of each - computed by clarion-incident, for the same query as
|
|
5
|
+
* TrackingAnalytics.
|
|
6
|
+
*
|
|
7
|
+
* Dispatches are counted by when they were made (`dispatchedAt`) and shown as they stand
|
|
8
|
+
* now: a dispatch made in the period and completed after it counts as completed. Times
|
|
9
|
+
* are measured between the timestamps a dispatch records. Emergencies are the period's
|
|
10
|
+
* incidents (not grievances) that reached the control room. Counts, rates and durations
|
|
11
|
+
* only - never a dispatcher, a crew's phone number, a reason someone typed or a note.
|
|
12
|
+
*/
|
|
13
|
+
export interface DispatchAnalyticsTotals {
|
|
14
|
+
dispatches: number;
|
|
15
|
+
/** The previous period of the same length; null for "forever". */
|
|
16
|
+
previousDispatches: number | null;
|
|
17
|
+
/** Emergencies a unit was sent to in the period. */
|
|
18
|
+
incidentsDispatched: number;
|
|
19
|
+
/** Emergencies raised in the period (reaching the control room), and those a unit was ever sent to. */
|
|
20
|
+
emergencies: number;
|
|
21
|
+
emergenciesDispatched: number;
|
|
22
|
+
/** emergenciesDispatched / emergencies, as a percentage. */
|
|
23
|
+
dispatchRate: number | null;
|
|
24
|
+
unitsDispatched: number;
|
|
25
|
+
dispatchers: number;
|
|
26
|
+
/** Dispatches per emergency dispatched in the period. */
|
|
27
|
+
unitsPerIncident: number | null;
|
|
28
|
+
}
|
|
29
|
+
export interface DispatchAnalyticsOutcomes {
|
|
30
|
+
/** Still out: dispatched, acknowledged, en route or on scene. */
|
|
31
|
+
active: number;
|
|
32
|
+
completed: number;
|
|
33
|
+
/** Stood down (CANCELLED) - and of those, refused by the responder. */
|
|
34
|
+
cancelled: number;
|
|
35
|
+
rejected: number;
|
|
36
|
+
/** Reached the scene. */
|
|
37
|
+
reachedScene: number;
|
|
38
|
+
/** Completed, as a percentage of the dispatches no longer out. */
|
|
39
|
+
completionRate: number | null;
|
|
40
|
+
/** Every status, in the order a dispatch lives through them, zero counts included. */
|
|
41
|
+
byStatus: UnitsAnalyticsCount[];
|
|
42
|
+
/** How the arrival was recorded (responder, control centre, inferred from tracking). */
|
|
43
|
+
arrivalBySource: UnitsAnalyticsCount[];
|
|
44
|
+
/** Who recorded each dispatch's latest status. */
|
|
45
|
+
statusBySource: UnitsAnalyticsCount[];
|
|
46
|
+
}
|
|
47
|
+
export interface DispatchAnalyticsTimes {
|
|
48
|
+
/** From an emergency being raised to its first unit being sent (the period's emergencies). */
|
|
49
|
+
toFirstDispatch: UnitsAnalyticsDuration;
|
|
50
|
+
/** From the unit being sent to it acknowledging, setting off, arriving and being done. */
|
|
51
|
+
toAcknowledge: UnitsAnalyticsDuration;
|
|
52
|
+
toEnRoute: UnitsAnalyticsDuration;
|
|
53
|
+
toOnScene: UnitsAnalyticsDuration;
|
|
54
|
+
/** From arriving to being done. */
|
|
55
|
+
onScene: UnitsAnalyticsDuration;
|
|
56
|
+
toComplete: UnitsAnalyticsDuration;
|
|
57
|
+
}
|
|
58
|
+
export interface DispatchAnalyticsRecommendation {
|
|
59
|
+
/** Dispatches made with a recommendation on screen. */
|
|
60
|
+
recommended: number;
|
|
61
|
+
/** ...that sent the recommended unit. */
|
|
62
|
+
followed: number;
|
|
63
|
+
/** ...that sent another unit, and of those, with a reason given. */
|
|
64
|
+
overridden: number;
|
|
65
|
+
overriddenWithReason: number;
|
|
66
|
+
/** Dispatches made when no unit was recommended. */
|
|
67
|
+
withoutRecommendation: number;
|
|
68
|
+
/** followed / recommended, as a percentage. */
|
|
69
|
+
followRate: number | null;
|
|
70
|
+
/** The sent unit as the recommendation saw it: how its capabilities matched, its availability, how fresh its position was. */
|
|
71
|
+
capabilityMatch: UnitsAnalyticsCount[];
|
|
72
|
+
availability: UnitsAnalyticsCount[];
|
|
73
|
+
locationFreshness: UnitsAnalyticsCount[];
|
|
74
|
+
/** Straight-line distance from the unit to the emergency when it was sent. */
|
|
75
|
+
distance: {
|
|
76
|
+
samples: number;
|
|
77
|
+
medianMetres: number | null;
|
|
78
|
+
p90Metres: number | null;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/** The dispatch message (SMS) to the crew. */
|
|
82
|
+
export interface DispatchAnalyticsNotification {
|
|
83
|
+
sent: number;
|
|
84
|
+
failed: number;
|
|
85
|
+
/** Could not be sent at all: no phone number, not configured, ... */
|
|
86
|
+
notPossible: number;
|
|
87
|
+
pending: number;
|
|
88
|
+
failures: UnitsAnalyticsCount[];
|
|
89
|
+
/** sent / (sent + failed), as a percentage. */
|
|
90
|
+
deliveryRate: number | null;
|
|
91
|
+
/** From the message being requested to the provider's answer. */
|
|
92
|
+
toResult: UnitsAnalyticsDuration;
|
|
93
|
+
/** Dispatches whose message was sent more than once. */
|
|
94
|
+
resent: number;
|
|
95
|
+
}
|
|
96
|
+
export interface DispatchAnalyticsTimelinePoint {
|
|
97
|
+
/** Start of the bucket, ISO 8601. */
|
|
98
|
+
at: string;
|
|
99
|
+
dispatches: number;
|
|
100
|
+
completed: number;
|
|
101
|
+
cancelled: number;
|
|
102
|
+
}
|
|
103
|
+
export interface DispatchAnalyticsUnitRow {
|
|
104
|
+
responseUnitId: number;
|
|
105
|
+
organizationId: number;
|
|
106
|
+
/** As it was named when last sent. */
|
|
107
|
+
name: string;
|
|
108
|
+
responseUnitType: string | null;
|
|
109
|
+
dispatches: number;
|
|
110
|
+
completed: number;
|
|
111
|
+
cancelled: number;
|
|
112
|
+
rejected: number;
|
|
113
|
+
medianSecondsToAcknowledge: number | null;
|
|
114
|
+
medianSecondsToOnScene: number | null;
|
|
115
|
+
lastDispatchedAt: string;
|
|
116
|
+
}
|
|
117
|
+
export interface DispatchAnalyticsTypeRow {
|
|
118
|
+
responseUnitType: string;
|
|
119
|
+
dispatches: number;
|
|
120
|
+
completed: number;
|
|
121
|
+
medianSecondsToOnScene: number | null;
|
|
122
|
+
}
|
|
123
|
+
export interface DispatchAnalyticsHourOfWeek {
|
|
124
|
+
/** 0 = Monday ... 6 = Sunday, in the period's time zone. */
|
|
125
|
+
day: number;
|
|
126
|
+
hour: number;
|
|
127
|
+
dispatches: number;
|
|
128
|
+
}
|
|
129
|
+
/** Platform view only: one row per organization. */
|
|
130
|
+
export interface DispatchAnalyticsOrganizationRow {
|
|
131
|
+
organizationId: number;
|
|
132
|
+
dispatches: number;
|
|
133
|
+
emergencies: number;
|
|
134
|
+
emergenciesDispatched: number;
|
|
135
|
+
completed: number;
|
|
136
|
+
medianSecondsToOnScene: number | null;
|
|
137
|
+
}
|
|
138
|
+
export interface DispatchAnalytics {
|
|
139
|
+
generatedAt: string;
|
|
140
|
+
range: UnitsAnalyticsRange;
|
|
141
|
+
scope: UnitsAnalyticsScope;
|
|
142
|
+
totals: DispatchAnalyticsTotals;
|
|
143
|
+
outcomes: DispatchAnalyticsOutcomes;
|
|
144
|
+
times: DispatchAnalyticsTimes;
|
|
145
|
+
recommendation: DispatchAnalyticsRecommendation;
|
|
146
|
+
notification: DispatchAnalyticsNotification;
|
|
147
|
+
timeline: DispatchAnalyticsTimelinePoint[];
|
|
148
|
+
byUnitType: DispatchAnalyticsTypeRow[];
|
|
149
|
+
/** The dispatched emergencies by their emergency type. */
|
|
150
|
+
byEmergencyType: UnitsAnalyticsCount[];
|
|
151
|
+
/** Dispatches by weekday and hour; only cells with dispatches. */
|
|
152
|
+
hourOfWeek: DispatchAnalyticsHourOfWeek[];
|
|
153
|
+
/** Units sent in the period, most dispatches first; capped (see `unitsTruncated`). */
|
|
154
|
+
units: DispatchAnalyticsUnitRow[];
|
|
155
|
+
unitsTruncated: boolean;
|
|
156
|
+
/** Platform view only; null otherwise. */
|
|
157
|
+
byOrganization: DispatchAnalyticsOrganizationRow[] | null;
|
|
158
|
+
}
|
|
@@ -52,6 +52,7 @@ export declare enum PermissionActions {
|
|
|
52
52
|
READ_TRACKING_POSITION = "read:tracking-position",
|
|
53
53
|
READ_TRACKING_HISTORY = "read:tracking-history",
|
|
54
54
|
READ_TRACKING_OPERATIONS = "read:tracking-operations",
|
|
55
|
+
READ_TRACKING_ANALYTICS = "read:tracking-analytics",
|
|
55
56
|
MANAGE_TRACKING_OPERATIONS = "manage:tracking-operations",
|
|
56
57
|
READ_RESPONSE_UNIT_DISPATCH = "read:response-unit-dispatch",
|
|
57
58
|
CREATE_RESPONSE_UNIT_DISPATCH = "create:response-unit-dispatch",
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Units & Tracking analytics, the tracking half (the admin's Units & Tracking
|
|
3
|
+
* Analytics): the response units in scope and how they are tracked - computed by
|
|
4
|
+
* clarion-response-tracking. The other half, what was dispatched and how it went, is
|
|
5
|
+
* DispatchAnalytics (clarion-incident); both answer the same query.
|
|
6
|
+
*
|
|
7
|
+
* The fleet and its live status are as they stand NOW. Everything else is the period's,
|
|
8
|
+
* counted by the hour a position was recorded (`eventTime`): the service keeps an hourly
|
|
9
|
+
* rollup of the position history, so a year costs no more to read than a day. Counts,
|
|
10
|
+
* rates and durations only - never a position, a route or a device identifier.
|
|
11
|
+
*/
|
|
12
|
+
/** How the period is cut into points for the charts. Chosen by the service from the length of the period. */
|
|
13
|
+
export type UnitsAnalyticsBucket = 'hour' | 'day' | 'week' | 'month';
|
|
14
|
+
export interface UnitsAnalyticsRange {
|
|
15
|
+
/** Inclusive, ISO 8601. For "forever", the start of the data in scope. */
|
|
16
|
+
from: string;
|
|
17
|
+
/** Exclusive, ISO 8601. */
|
|
18
|
+
to: string;
|
|
19
|
+
bucket: UnitsAnalyticsBucket;
|
|
20
|
+
/** IANA time zone the buckets (and the dispatch hour-of-week grid) are cut in. */
|
|
21
|
+
timeZone: string;
|
|
22
|
+
}
|
|
23
|
+
/** Whose figures these are, as the service decided from the caller. */
|
|
24
|
+
export interface UnitsAnalyticsScope {
|
|
25
|
+
/** Null: every organization (a Super-Admin's platform view). */
|
|
26
|
+
organizationId: number | null;
|
|
27
|
+
/** Null: every control centre of the organization. */
|
|
28
|
+
controlCentreId: number | null;
|
|
29
|
+
platform: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** A count by a key (a type, a status, a provider), largest first unless the section says otherwise. */
|
|
32
|
+
export interface UnitsAnalyticsCount<K extends string = string> {
|
|
33
|
+
key: K;
|
|
34
|
+
count: number;
|
|
35
|
+
}
|
|
36
|
+
/** Median and 90th percentile of one duration, in seconds; null when nothing was measured. */
|
|
37
|
+
export interface UnitsAnalyticsDuration {
|
|
38
|
+
samples: number;
|
|
39
|
+
medianSeconds: number | null;
|
|
40
|
+
p90Seconds: number | null;
|
|
41
|
+
}
|
|
42
|
+
/** The response units in scope, as they stand now (deleted units are left out). */
|
|
43
|
+
export interface TrackingAnalyticsFleet {
|
|
44
|
+
total: number;
|
|
45
|
+
enabled: number;
|
|
46
|
+
disabled: number;
|
|
47
|
+
byType: UnitsAnalyticsCount[];
|
|
48
|
+
byOperationalStatus: UnitsAnalyticsCount[];
|
|
49
|
+
/** Enabled units with an enabled device binding: the service is told where they are. */
|
|
50
|
+
tracked: number;
|
|
51
|
+
/** Enabled units with no enabled binding. */
|
|
52
|
+
untracked: number;
|
|
53
|
+
/** Tracked units by the provider of their binding's connection (a unit bound twice counts under each). */
|
|
54
|
+
trackedByProvider: UnitsAnalyticsCount[];
|
|
55
|
+
}
|
|
56
|
+
/** The tracked units' state now - the same states as the live map. */
|
|
57
|
+
export interface TrackingAnalyticsLive {
|
|
58
|
+
online: number;
|
|
59
|
+
stale: number;
|
|
60
|
+
offline: number;
|
|
61
|
+
/** Tracked units with no position in the live store (never reported, or not for a long while). */
|
|
62
|
+
noPosition: number;
|
|
63
|
+
}
|
|
64
|
+
/** Which units reported in the period. */
|
|
65
|
+
export interface TrackingAnalyticsReporting {
|
|
66
|
+
/** Units that reported at least one position. */
|
|
67
|
+
reportingUnits: number;
|
|
68
|
+
/** The same for the previous period of the same length; null for "forever". */
|
|
69
|
+
previousReportingUnits: number | null;
|
|
70
|
+
/** Tracked units (now) that reported nothing in the period. */
|
|
71
|
+
silentTrackedUnits: number;
|
|
72
|
+
/** Tracked units that reported, as a percentage of the tracked units; null without tracked units. */
|
|
73
|
+
reportingRate: number | null;
|
|
74
|
+
}
|
|
75
|
+
/** The positions recorded in the period. */
|
|
76
|
+
export interface TrackingAnalyticsPositions {
|
|
77
|
+
total: number;
|
|
78
|
+
/** Null for "forever". */
|
|
79
|
+
previousTotal: number | null;
|
|
80
|
+
/** Positions per reporting unit per hour it reported in. */
|
|
81
|
+
perUnitHour: number | null;
|
|
82
|
+
/** Percentages of the positions that say: reported while moving, with the ignition on. */
|
|
83
|
+
movingRate: number | null;
|
|
84
|
+
ignitionOnRate: number | null;
|
|
85
|
+
byProvider: UnitsAnalyticsCount[];
|
|
86
|
+
}
|
|
87
|
+
/** How long a position took to reach Clarion once the device recorded it, in bands. */
|
|
88
|
+
export type TrackingDelayBand = 'WITHIN_5S' | 'WITHIN_10S' | 'WITHIN_30S' | 'WITHIN_1M' | 'WITHIN_2M' | 'WITHIN_5M' | 'WITHIN_15M' | 'LATER';
|
|
89
|
+
/** Delivery delay: `receivedAt - eventTime` of every position in the period. */
|
|
90
|
+
export interface TrackingAnalyticsDelivery {
|
|
91
|
+
/** Estimated from the bands (interpolated within the band the percentile falls in). */
|
|
92
|
+
medianSeconds: number | null;
|
|
93
|
+
p90Seconds: number | null;
|
|
94
|
+
meanSeconds: number | null;
|
|
95
|
+
/** Every band, fastest first, zero counts included. */
|
|
96
|
+
bands: UnitsAnalyticsCount<TrackingDelayBand>[];
|
|
97
|
+
/** Positions that took longer than 5 minutes, as a percentage. */
|
|
98
|
+
lateRate: number | null;
|
|
99
|
+
}
|
|
100
|
+
/** What the ingestion flagged about the period's positions, and the provider units nobody has bound. */
|
|
101
|
+
export interface TrackingAnalyticsQuality {
|
|
102
|
+
outOfOrder: number;
|
|
103
|
+
duplicates: number;
|
|
104
|
+
invalidCoordinates: number;
|
|
105
|
+
/** Positions that jumped implausibly far from the previous one. */
|
|
106
|
+
jumpSuspected: number;
|
|
107
|
+
/** Positions with an accuracy worse than 100 m. */
|
|
108
|
+
poorAccuracy: number;
|
|
109
|
+
/** Provider units reporting without a binding: open now, resolved, and how often they were seen. */
|
|
110
|
+
unmappedOpen: number;
|
|
111
|
+
unmappedResolved: number;
|
|
112
|
+
unmappedOccurrences: number;
|
|
113
|
+
}
|
|
114
|
+
export interface TrackingAnalyticsTimelinePoint {
|
|
115
|
+
/** Start of the bucket, ISO 8601. */
|
|
116
|
+
at: string;
|
|
117
|
+
positions: number;
|
|
118
|
+
reportingUnits: number;
|
|
119
|
+
/** Positions that took longer than 5 minutes to arrive. */
|
|
120
|
+
late: number;
|
|
121
|
+
}
|
|
122
|
+
/** A provider connection in scope: its configuration and health now, and its positions in the period. */
|
|
123
|
+
export interface TrackingAnalyticsConnectionRow {
|
|
124
|
+
id: number;
|
|
125
|
+
organizationId: number;
|
|
126
|
+
controlCentreId: number | null;
|
|
127
|
+
name: string;
|
|
128
|
+
providerCode: string;
|
|
129
|
+
enabled: boolean;
|
|
130
|
+
connectionStatus: string;
|
|
131
|
+
lastEventAt: string | null;
|
|
132
|
+
lastErrorAt: string | null;
|
|
133
|
+
lastErrorCode: string | null;
|
|
134
|
+
/** Enabled bindings through it now. */
|
|
135
|
+
boundUnits: number;
|
|
136
|
+
positions: number;
|
|
137
|
+
reportingUnits: number;
|
|
138
|
+
medianDelaySeconds: number | null;
|
|
139
|
+
lateRate: number | null;
|
|
140
|
+
}
|
|
141
|
+
/** A response unit in scope: what it is and how it is tracked now, and what it reported in the period. */
|
|
142
|
+
export interface TrackingAnalyticsUnitRow {
|
|
143
|
+
responseUnitId: number;
|
|
144
|
+
organizationId: number;
|
|
145
|
+
controlCentreId: number | null;
|
|
146
|
+
name: string | null;
|
|
147
|
+
responseUnitType: string | null;
|
|
148
|
+
enabled: boolean;
|
|
149
|
+
tracked: boolean;
|
|
150
|
+
/** The providers its enabled bindings use. */
|
|
151
|
+
providers: string[];
|
|
152
|
+
/** ONLINE, STALE or OFFLINE now; null when not tracked or without a position. */
|
|
153
|
+
liveStatus: string | null;
|
|
154
|
+
/** Its newest position in the period. */
|
|
155
|
+
lastPositionAt: string | null;
|
|
156
|
+
positions: number;
|
|
157
|
+
/** Hours in which it reported at least once. */
|
|
158
|
+
hoursReporting: number;
|
|
159
|
+
medianDelaySeconds: number | null;
|
|
160
|
+
}
|
|
161
|
+
/** Platform view only: one row per organization. */
|
|
162
|
+
export interface TrackingAnalyticsOrganizationRow {
|
|
163
|
+
organizationId: number;
|
|
164
|
+
units: number;
|
|
165
|
+
tracked: number;
|
|
166
|
+
reportingUnits: number;
|
|
167
|
+
positions: number;
|
|
168
|
+
connections: number;
|
|
169
|
+
lateRate: number | null;
|
|
170
|
+
}
|
|
171
|
+
export interface TrackingAnalytics {
|
|
172
|
+
generatedAt: string;
|
|
173
|
+
range: UnitsAnalyticsRange;
|
|
174
|
+
scope: UnitsAnalyticsScope;
|
|
175
|
+
fleet: TrackingAnalyticsFleet;
|
|
176
|
+
live: TrackingAnalyticsLive;
|
|
177
|
+
reporting: TrackingAnalyticsReporting;
|
|
178
|
+
positions: TrackingAnalyticsPositions;
|
|
179
|
+
delivery: TrackingAnalyticsDelivery;
|
|
180
|
+
quality: TrackingAnalyticsQuality;
|
|
181
|
+
timeline: TrackingAnalyticsTimelinePoint[];
|
|
182
|
+
connections: TrackingAnalyticsConnectionRow[];
|
|
183
|
+
/** The units in scope, most positions first; capped (see `unitsTruncated`). */
|
|
184
|
+
units: TrackingAnalyticsUnitRow[];
|
|
185
|
+
unitsTruncated: boolean;
|
|
186
|
+
/** Platform view only; null otherwise. */
|
|
187
|
+
byOrganization: TrackingAnalyticsOrganizationRow[] | null;
|
|
188
|
+
/** The rollup is complete up to this instant: positions recorded later are not counted yet. */
|
|
189
|
+
rollupThrough: string | null;
|
|
190
|
+
/** History older than this is still being rolled up (the first hours after release); null once complete. */
|
|
191
|
+
backfillingBefore: string | null;
|
|
192
|
+
}
|
|
193
|
+
/** The query both halves answer (UnitsAnalyticsQueryDto in grm-shared-library). All optional. */
|
|
194
|
+
export interface UnitsAnalyticsQuery {
|
|
195
|
+
/** Inclusive, ISO 8601. Omit for "forever". */
|
|
196
|
+
from?: string;
|
|
197
|
+
/** Exclusive, ISO 8601. Omit for "now". */
|
|
198
|
+
to?: string;
|
|
199
|
+
/** IANA time zone for the buckets and the hour-of-week grid. */
|
|
200
|
+
timeZone?: string;
|
|
201
|
+
/** Super-Admin only. */
|
|
202
|
+
organizationId?: number;
|
|
203
|
+
/** One control centre of the organization. */
|
|
204
|
+
controlCentreId?: number;
|
|
205
|
+
}
|