clarion-shared-types 1.0.121 → 1.0.123
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/gis/index.js +1 -0
- package/dist/cjs/modules/gis/index.js.map +1 -1
- package/dist/cjs/modules/gis/interfaces/county-locate.js +3 -0
- package/dist/cjs/modules/gis/interfaces/county-locate.js.map +1 -0
- package/dist/cjs/modules/incident/index.js +1 -0
- package/dist/cjs/modules/incident/index.js.map +1 -1
- package/dist/cjs/modules/incident/intefaces/incident-dashboard-analytics.js +17 -0
- package/dist/cjs/modules/incident/intefaces/incident-dashboard-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/esm/modules/gis/index.js +1 -0
- package/dist/esm/modules/gis/index.js.map +1 -1
- package/dist/esm/modules/gis/interfaces/county-locate.js +2 -0
- package/dist/esm/modules/gis/interfaces/county-locate.js.map +1 -0
- package/dist/esm/modules/incident/index.js +1 -0
- package/dist/esm/modules/incident/index.js.map +1 -1
- package/dist/esm/modules/incident/intefaces/incident-dashboard-analytics.js +16 -0
- package/dist/esm/modules/incident/intefaces/incident-dashboard-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/types/modules/gis/index.d.ts +1 -0
- package/dist/types/modules/gis/interfaces/county-locate.d.ts +37 -0
- package/dist/types/modules/incident/index.d.ts +1 -0
- package/dist/types/modules/incident/intefaces/incident-dashboard-analytics.d.ts +323 -0
- package/dist/types/modules/permission/enums/permission-actions.enum.d.ts +1 -0
- package/package.json +1 -1
|
@@ -19,6 +19,7 @@ __exportStar(require("./enums/trip-actions.enum"), exports);
|
|
|
19
19
|
__exportStar(require("./enums/zone.enums"), exports);
|
|
20
20
|
__exportStar(require("./interfaces/client-safe-trip"), exports);
|
|
21
21
|
__exportStar(require("./interfaces/control-centre-routing-result"), exports);
|
|
22
|
+
__exportStar(require("./interfaces/county-locate"), exports);
|
|
22
23
|
__exportStar(require("./interfaces/incident-routing-result"), exports);
|
|
23
24
|
__exportStar(require("./interfaces/point-containment"), exports);
|
|
24
25
|
__exportStar(require("./interfaces/point-location"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/gis/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kFAAgE;AAChE,4DAA0C;AAC1C,qDAAmC;AACnC,gEAA8C;AAC9C,6EAA2D;AAC3D,uEAAqD;AACrD,iEAA+C;AAC/C,8DAA4C;AAC5C,yEAAuD;AACvD,oDAAkC;AAClC,8DAA4C;AAC5C,iEAA+C;AAC/C,8DAA4C;AAC5C,+DAA6C;AAC7C,+DAA6C;AAC7C,uDAAqC;AACrC,0DAAwC;AACxC,uDAAqC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/gis/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kFAAgE;AAChE,4DAA0C;AAC1C,qDAAmC;AACnC,gEAA8C;AAC9C,6EAA2D;AAC3D,6DAA2C;AAC3C,uEAAqD;AACrD,iEAA+C;AAC/C,8DAA4C;AAC5C,yEAAuD;AACvD,oDAAkC;AAClC,8DAA4C;AAC5C,iEAA+C;AAC/C,8DAA4C;AAC5C,+DAA6C;AAC7C,+DAA6C;AAC7C,uDAAqC;AACrC,0DAAwC;AACxC,uDAAqC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"county-locate.js","sourceRoot":"","sources":["../../../../../src/modules/gis/interfaces/county-locate.ts"],"names":[],"mappings":""}
|
|
@@ -27,6 +27,7 @@ __exportStar(require("./enums/incident-origin-type.enum"), exports);
|
|
|
27
27
|
//Interfaces
|
|
28
28
|
__exportStar(require("./intefaces/incident"), exports);
|
|
29
29
|
__exportStar(require("./intefaces/incident-action"), exports);
|
|
30
|
+
__exportStar(require("./intefaces/incident-dashboard-analytics"), exports);
|
|
30
31
|
__exportStar(require("./intefaces/incident-attachment"), exports);
|
|
31
32
|
__exportStar(require("./intefaces/incident-category"), exports);
|
|
32
33
|
__exportStar(require("./intefaces/incident-reporter"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/incident/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO;AACP,+DAA6C;AAC7C,gEAA8C;AAC9C,8DAA4C;AAC5C,iEAA+C;AAC/C,+DAA6C;AAC7C,gEAA8C;AAC9C,4EAA0D;AAC1D,uEAAqD;AACrD,oEAAkD;AAElD,YAAY;AACZ,uDAAqC;AACrC,8DAA4C;AAC5C,kEAAgD;AAChD,gEAA8C;AAC9C,gEAA8C;AAC9C,4DAA0C;AAC1C,kEAAgD;AAChD,gFAA8D;AAC9D,sEAAoD;AACpD,sEAAoD;AACpD,sEAAoD;AACpD,8DAA4C;AAC5C,wDAAsC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/incident/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO;AACP,+DAA6C;AAC7C,gEAA8C;AAC9C,8DAA4C;AAC5C,iEAA+C;AAC/C,+DAA6C;AAC7C,gEAA8C;AAC9C,4EAA0D;AAC1D,uEAAqD;AACrD,oEAAkD;AAElD,YAAY;AACZ,uDAAqC;AACrC,8DAA4C;AAC5C,2EAAyD;AACzD,kEAAgD;AAChD,gEAA8C;AAC9C,gEAA8C;AAC9C,4DAA0C;AAC1C,kEAAgD;AAChD,gFAA8D;AAC9D,sEAAoD;AACpD,sEAAoD;AACpD,sEAAoD;AACpD,8DAA4C;AAC5C,wDAAsC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The incident analytics of the admin's Dashboard: the incidents (or grievances) raised
|
|
4
|
+
* over a period, where they stand now, how quickly they were answered and resolved, what
|
|
5
|
+
* kind they were, when and where they happened - computed by clarion-incident, with the
|
|
6
|
+
* county of each place from clarion-gis.
|
|
7
|
+
*
|
|
8
|
+
* Incidents belong to the period they were RAISED in and are shown as they stand now.
|
|
9
|
+
* "Open now" is every open incident in scope, whatever the period. Durations come from
|
|
10
|
+
* each incident's timeline (its actions). Geography follows GIS practice: places are
|
|
11
|
+
* aggregated - to counties (a choropleth, normalised by area) and to an equal-area
|
|
12
|
+
* hexagonal grid (density, and Getis-Ord Gi* hot spots) - and an incident's own position
|
|
13
|
+
* is never returned. Counts, rates and durations only - never a reporter, a description
|
|
14
|
+
* or an address.
|
|
15
|
+
*/
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
//# sourceMappingURL=incident-dashboard-analytics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"incident-dashboard-analytics.js","sourceRoot":"","sources":["../../../../../src/modules/incident/intefaces/incident-dashboard-analytics.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG"}
|
|
@@ -56,6 +56,8 @@ var PermissionActions;
|
|
|
56
56
|
PermissionActions["READ_INCIDENT"] = "read:incident";
|
|
57
57
|
PermissionActions["UPDATE_INCIDENT"] = "update:incident";
|
|
58
58
|
PermissionActions["DELETE_INCIDENT"] = "delete:incident";
|
|
59
|
+
// The Dashboard's incident analytics: raised, open, response and resolution, kind, time and place.
|
|
60
|
+
PermissionActions["READ_INCIDENT_ANALYTICS"] = "read:incident-analytics";
|
|
59
61
|
// Chat Analytics: how the chats went and how quickly members were answered - totals
|
|
60
62
|
// only. Held by exactly the roles that read the user analytics.
|
|
61
63
|
PermissionActions["READ_CHAT_ANALYTICS"] = "read:chat-analytics";
|
|
@@ -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,iBAqUX;AArUD,WAAY,iBAAiB;IACzB,uBAAuB;IACvB,gEAA2C,CAAA;IAC3C,4DAAuC,CAAA;IACvC,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAC3C,oFAAoF;IACpF,gFAA2D,CAAA;IAE3D,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,mGAAmG;IACnG,w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AyD,CAAA;IACzD,8FAAyE,CAAA;IACzE,kGAA6E,CAAA;IAC7E,gFAA2D,CAAA;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,EArUW,iBAAiB,iCAAjB,iBAAiB,QAqU5B"}
|
|
@@ -3,6 +3,7 @@ export * from './enums/trip-actions.enum';
|
|
|
3
3
|
export * from './enums/zone.enums';
|
|
4
4
|
export * from './interfaces/client-safe-trip';
|
|
5
5
|
export * from './interfaces/control-centre-routing-result';
|
|
6
|
+
export * from './interfaces/county-locate';
|
|
6
7
|
export * from './interfaces/incident-routing-result';
|
|
7
8
|
export * from './interfaces/point-containment';
|
|
8
9
|
export * from './interfaces/point-location';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/gis/index.ts"],"names":[],"mappings":"AAAA,cAAc,iDAAiD,CAAC;AAChE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wCAAwC,CAAC;AACvD,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/gis/index.ts"],"names":[],"mappings":"AAAA,cAAc,iDAAiD,CAAC;AAChE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wCAAwC,CAAC;AACvD,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"county-locate.js","sourceRoot":"","sources":["../../../../../src/modules/gis/interfaces/county-locate.ts"],"names":[],"mappings":""}
|
|
@@ -11,6 +11,7 @@ export * from './enums/incident-origin-type.enum';
|
|
|
11
11
|
//Interfaces
|
|
12
12
|
export * from './intefaces/incident';
|
|
13
13
|
export * from './intefaces/incident-action';
|
|
14
|
+
export * from './intefaces/incident-dashboard-analytics';
|
|
14
15
|
export * from './intefaces/incident-attachment';
|
|
15
16
|
export * from './intefaces/incident-category';
|
|
16
17
|
export * from './intefaces/incident-reporter';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/incident/index.ts"],"names":[],"mappings":"AAAA,OAAO;AACP,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAElD,YAAY;AACZ,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/incident/index.ts"],"names":[],"mappings":"AAAA,OAAO;AACP,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAElD,YAAY;AACZ,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0CAA0C,CAAC;AACzD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The incident analytics of the admin's Dashboard: the incidents (or grievances) raised
|
|
3
|
+
* over a period, where they stand now, how quickly they were answered and resolved, what
|
|
4
|
+
* kind they were, when and where they happened - computed by clarion-incident, with the
|
|
5
|
+
* county of each place from clarion-gis.
|
|
6
|
+
*
|
|
7
|
+
* Incidents belong to the period they were RAISED in and are shown as they stand now.
|
|
8
|
+
* "Open now" is every open incident in scope, whatever the period. Durations come from
|
|
9
|
+
* each incident's timeline (its actions). Geography follows GIS practice: places are
|
|
10
|
+
* aggregated - to counties (a choropleth, normalised by area) and to an equal-area
|
|
11
|
+
* hexagonal grid (density, and Getis-Ord Gi* hot spots) - and an incident's own position
|
|
12
|
+
* is never returned. Counts, rates and durations only - never a reporter, a description
|
|
13
|
+
* or an address.
|
|
14
|
+
*/
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=incident-dashboard-analytics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"incident-dashboard-analytics.js","sourceRoot":"","sources":["../../../../../src/modules/incident/intefaces/incident-dashboard-analytics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
@@ -53,6 +53,8 @@ export var PermissionActions;
|
|
|
53
53
|
PermissionActions["READ_INCIDENT"] = "read:incident";
|
|
54
54
|
PermissionActions["UPDATE_INCIDENT"] = "update:incident";
|
|
55
55
|
PermissionActions["DELETE_INCIDENT"] = "delete:incident";
|
|
56
|
+
// The Dashboard's incident analytics: raised, open, response and resolution, kind, time and place.
|
|
57
|
+
PermissionActions["READ_INCIDENT_ANALYTICS"] = "read:incident-analytics";
|
|
56
58
|
// Chat Analytics: how the chats went and how quickly members were answered - totals
|
|
57
59
|
// only. Held by exactly the roles that read the user analytics.
|
|
58
60
|
PermissionActions["READ_CHAT_ANALYTICS"] = "read:chat-analytics";
|
|
@@ -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,iBAqUX;AArUD,WAAY,iBAAiB;IACzB,uBAAuB;IACvB,gEAA2C,CAAA;IAC3C,4DAAuC,CAAA;IACvC,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAC3C,oFAAoF;IACpF,gFAA2D,CAAA;IAE3D,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;I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xG,gEAA2C,CAAA;AAC/C,CAAC,EArUW,iBAAiB,KAAjB,iBAAiB,QAqU5B"}
|
|
@@ -3,6 +3,7 @@ export * from './enums/trip-actions.enum';
|
|
|
3
3
|
export * from './enums/zone.enums';
|
|
4
4
|
export * from './interfaces/client-safe-trip';
|
|
5
5
|
export * from './interfaces/control-centre-routing-result';
|
|
6
|
+
export * from './interfaces/county-locate';
|
|
6
7
|
export * from './interfaces/incident-routing-result';
|
|
7
8
|
export * from './interfaces/point-containment';
|
|
8
9
|
export * from './interfaces/point-location';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** A county of the boundary data, as the county lookups and the county map name it. */
|
|
2
|
+
export interface CountySummary {
|
|
3
|
+
/** The county's code (Kenya: 1-47). */
|
|
4
|
+
code: number;
|
|
5
|
+
name: string;
|
|
6
|
+
/** ISO 3166-1 alpha-3 of its country (KEN). */
|
|
7
|
+
countryIso: string;
|
|
8
|
+
areaKm2: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The answer to a county lookup (POST /admin-boundaries/locate): the county of each point,
|
|
12
|
+
* in the order asked, and every county of the countries the points fell in - so a
|
|
13
|
+
* choropleth can show the counties with none.
|
|
14
|
+
*/
|
|
15
|
+
export interface CountyLocateResult {
|
|
16
|
+
/** The county code of point i, or null: in no county (another country, the sea). */
|
|
17
|
+
codes: Array<number | null>;
|
|
18
|
+
counties: CountySummary[];
|
|
19
|
+
}
|
|
20
|
+
/** One county on the county map (GET /admin-boundaries/county-map): simplified, for drawing. */
|
|
21
|
+
export interface CountyMapFeature {
|
|
22
|
+
type: 'Feature';
|
|
23
|
+
id: number;
|
|
24
|
+
properties: {
|
|
25
|
+
code: number;
|
|
26
|
+
name: string;
|
|
27
|
+
countryIso: string;
|
|
28
|
+
};
|
|
29
|
+
geometry: {
|
|
30
|
+
type: 'Polygon' | 'MultiPolygon';
|
|
31
|
+
coordinates: unknown;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export interface CountyMapFeatureCollection {
|
|
35
|
+
type: 'FeatureCollection';
|
|
36
|
+
features: CountyMapFeature[];
|
|
37
|
+
}
|
|
@@ -9,6 +9,7 @@ export * from './enums/incident-emergency-type.enum';
|
|
|
9
9
|
export * from './enums/incident-origin-type.enum';
|
|
10
10
|
export * from './intefaces/incident';
|
|
11
11
|
export * from './intefaces/incident-action';
|
|
12
|
+
export * from './intefaces/incident-dashboard-analytics';
|
|
12
13
|
export * from './intefaces/incident-attachment';
|
|
13
14
|
export * from './intefaces/incident-category';
|
|
14
15
|
export * from './intefaces/incident-reporter';
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The incident analytics of the admin's Dashboard: the incidents (or grievances) raised
|
|
3
|
+
* over a period, where they stand now, how quickly they were answered and resolved, what
|
|
4
|
+
* kind they were, when and where they happened - computed by clarion-incident, with the
|
|
5
|
+
* county of each place from clarion-gis.
|
|
6
|
+
*
|
|
7
|
+
* Incidents belong to the period they were RAISED in and are shown as they stand now.
|
|
8
|
+
* "Open now" is every open incident in scope, whatever the period. Durations come from
|
|
9
|
+
* each incident's timeline (its actions). Geography follows GIS practice: places are
|
|
10
|
+
* aggregated - to counties (a choropleth, normalised by area) and to an equal-area
|
|
11
|
+
* hexagonal grid (density, and Getis-Ord Gi* hot spots) - and an incident's own position
|
|
12
|
+
* is never returned. Counts, rates and durations only - never a reporter, a description
|
|
13
|
+
* or an address.
|
|
14
|
+
*/
|
|
15
|
+
/** How the period is cut into points. Chosen by the service from the length of the period. */
|
|
16
|
+
export type IncidentAnalyticsBucket = 'hour' | 'day' | 'week' | 'month';
|
|
17
|
+
export interface IncidentAnalyticsRange {
|
|
18
|
+
/** Inclusive, ISO 8601. For "forever", the first incident in scope. */
|
|
19
|
+
from: string;
|
|
20
|
+
/** Exclusive, ISO 8601. */
|
|
21
|
+
to: string;
|
|
22
|
+
bucket: IncidentAnalyticsBucket;
|
|
23
|
+
/** IANA time zone the buckets and the hour-of-week grid are cut in. */
|
|
24
|
+
timeZone: string;
|
|
25
|
+
}
|
|
26
|
+
/** Whose incidents, as the service decided from the caller. */
|
|
27
|
+
export interface IncidentAnalyticsScope {
|
|
28
|
+
/** Null: every organization (a Super-Admin's platform view). */
|
|
29
|
+
organizationId: number | null;
|
|
30
|
+
/** Null: every control centre of the organization. */
|
|
31
|
+
controlCentreId: number | null;
|
|
32
|
+
platform: boolean;
|
|
33
|
+
}
|
|
34
|
+
/** The filters applied, as the service understood them; null when not filtered on. */
|
|
35
|
+
export interface IncidentAnalyticsFilters {
|
|
36
|
+
incidentClass: string | null;
|
|
37
|
+
priority: string | null;
|
|
38
|
+
emergencyType: string | null;
|
|
39
|
+
channel: string | null;
|
|
40
|
+
typeId: number | null;
|
|
41
|
+
categoryId: number | null;
|
|
42
|
+
}
|
|
43
|
+
/** A count by a key, largest first unless the section says otherwise. */
|
|
44
|
+
export interface IncidentAnalyticsCount<K extends string = string> {
|
|
45
|
+
key: K;
|
|
46
|
+
count: number;
|
|
47
|
+
}
|
|
48
|
+
/** Median and 90th percentile of one duration, in seconds; null when nothing was measured. */
|
|
49
|
+
export interface IncidentAnalyticsDuration {
|
|
50
|
+
samples: number;
|
|
51
|
+
medianSeconds: number | null;
|
|
52
|
+
p90Seconds: number | null;
|
|
53
|
+
}
|
|
54
|
+
/** The incidents raised in the period, as they stand now. */
|
|
55
|
+
export interface IncidentAnalyticsTotals {
|
|
56
|
+
raised: number;
|
|
57
|
+
/** The previous period of the same length; null for "forever". */
|
|
58
|
+
previousRaised: number | null;
|
|
59
|
+
/** Raised as an emergency or a panic alert (SOS). */
|
|
60
|
+
emergencies: number;
|
|
61
|
+
/** Answered: an action by anybody but the reporter (a status change, an assignment, an edit, a dispatch). */
|
|
62
|
+
responded: number;
|
|
63
|
+
/** Sent to the control room (not withheld for want of a subscription, nor kept from it by the reporter). */
|
|
64
|
+
reachedControlRoom: number;
|
|
65
|
+
/**
|
|
66
|
+
* Of those sent to the control room: ended before anybody answered - the reporter
|
|
67
|
+
* cancelling their own SOS, or the system closing it. Not a missed answer.
|
|
68
|
+
*/
|
|
69
|
+
endedWithoutResponse: number;
|
|
70
|
+
/** Of those sent to the control room: still open, and nobody has answered yet. */
|
|
71
|
+
awaitingResponse: number;
|
|
72
|
+
/** Stand Resolved or Closed now. */
|
|
73
|
+
resolved: number;
|
|
74
|
+
closed: number;
|
|
75
|
+
/** Ended Unresolved. */
|
|
76
|
+
unresolved: number;
|
|
77
|
+
/** Still open now: Received, In-Progress, In-Review, On-Hold, Escalated or Appealed. */
|
|
78
|
+
stillOpen: number;
|
|
79
|
+
/** Escalated, appealed, put on hold or reopened (back to work after being resolved or closed) at least once. */
|
|
80
|
+
escalated: number;
|
|
81
|
+
appealed: number;
|
|
82
|
+
heldOnHold: number;
|
|
83
|
+
reopened: number;
|
|
84
|
+
/** With somebody assigned now. */
|
|
85
|
+
assigned: number;
|
|
86
|
+
anonymous: number;
|
|
87
|
+
sensitive: number;
|
|
88
|
+
/** resolved / raised, as a percentage; and the same for the previous period (null for "forever"). */
|
|
89
|
+
resolutionRate: number | null;
|
|
90
|
+
previousResolutionRate: number | null;
|
|
91
|
+
}
|
|
92
|
+
/** Every open incident in scope NOW, whenever it was raised. */
|
|
93
|
+
export interface IncidentAnalyticsOpenNow {
|
|
94
|
+
open: number;
|
|
95
|
+
unassigned: number;
|
|
96
|
+
byStatus: IncidentAnalyticsCount[];
|
|
97
|
+
byPriority: IncidentAnalyticsCount[];
|
|
98
|
+
/** How long they have been open: UNDER_1H, 1H_4H, 4H_24H, 1D_3D, 3D_7D, 7D_30D, OVER_30D - every band, in that order. */
|
|
99
|
+
ageBands: IncidentAnalyticsCount[];
|
|
100
|
+
/** When the oldest one was raised; null with none open. */
|
|
101
|
+
oldestRaisedAt: string | null;
|
|
102
|
+
}
|
|
103
|
+
export interface IncidentAnalyticsTimes {
|
|
104
|
+
/** From raised to the first action by anybody but the reporter. */
|
|
105
|
+
toFirstResponse: IncidentAnalyticsDuration;
|
|
106
|
+
/** From raised to somebody being assigned. */
|
|
107
|
+
toAssignment: IncidentAnalyticsDuration;
|
|
108
|
+
/** From raised to Resolved or Closed, whichever came first. */
|
|
109
|
+
toResolution: IncidentAnalyticsDuration;
|
|
110
|
+
/** From raised to Closed. */
|
|
111
|
+
toClosure: IncidentAnalyticsDuration;
|
|
112
|
+
/** The previous period's medians, for the change; null for "forever" or nothing measured. */
|
|
113
|
+
previousMedianSecondsToFirstResponse: number | null;
|
|
114
|
+
previousMedianSecondsToResolution: number | null;
|
|
115
|
+
/** How long the resolved ones took, in the same bands as `IncidentAnalyticsOpenNow.ageBands`. */
|
|
116
|
+
resolutionBands: IncidentAnalyticsCount[];
|
|
117
|
+
}
|
|
118
|
+
export interface IncidentAnalyticsBreakdowns {
|
|
119
|
+
/** Every status, in the order an incident lives through them, zero counts included. */
|
|
120
|
+
byStatus: IncidentAnalyticsCount[];
|
|
121
|
+
/** Critical, High, Medium, Low - every priority, in that order. */
|
|
122
|
+
byPriority: IncidentAnalyticsCount[];
|
|
123
|
+
/** emergency, panic, non-emergency. */
|
|
124
|
+
byEmergencyType: IncidentAnalyticsCount[];
|
|
125
|
+
/** How it reached the platform: App, Web, Phone, Chat... */
|
|
126
|
+
byChannel: IncidentAnalyticsCount[];
|
|
127
|
+
/** What raised it: MANUAL (a person), SAFETY_CHECK, FOLLOW_ME. */
|
|
128
|
+
byOrigin: IncidentAnalyticsCount[];
|
|
129
|
+
/** Incident or Grievance. */
|
|
130
|
+
byClass: IncidentAnalyticsCount[];
|
|
131
|
+
/** The reporter's entitlement when raised: PREMIUM, TRIAL, FREE, NOT_APPLICABLE. */
|
|
132
|
+
byEntitlementTier: IncidentAnalyticsCount[];
|
|
133
|
+
/** Whether it was sent to the control room (REACHED) or kept from it (NOT_SENT: a free user, or opted out). */
|
|
134
|
+
byControlRoom: IncidentAnalyticsCount[];
|
|
135
|
+
/** Third-party partner routing: NOT_ROUTED, ROUTED, ... */
|
|
136
|
+
byPartnerRouting: IncidentAnalyticsCount[];
|
|
137
|
+
}
|
|
138
|
+
export interface IncidentAnalyticsTimelinePoint {
|
|
139
|
+
/** Start of the bucket, ISO 8601. */
|
|
140
|
+
at: string;
|
|
141
|
+
raised: number;
|
|
142
|
+
emergencies: number;
|
|
143
|
+
/** Of those raised in the bucket: resolved since, and still open now. */
|
|
144
|
+
resolved: number;
|
|
145
|
+
open: number;
|
|
146
|
+
medianSecondsToFirstResponse: number | null;
|
|
147
|
+
}
|
|
148
|
+
export interface IncidentAnalyticsHourOfWeek {
|
|
149
|
+
/** 0 = Monday ... 6 = Sunday, in the period's time zone. */
|
|
150
|
+
day: number;
|
|
151
|
+
hour: number;
|
|
152
|
+
raised: number;
|
|
153
|
+
}
|
|
154
|
+
export interface IncidentAnalyticsTypeRow {
|
|
155
|
+
/** Null: raised without a type. */
|
|
156
|
+
typeId: number | null;
|
|
157
|
+
name: string;
|
|
158
|
+
categoryId: number | null;
|
|
159
|
+
categoryName: string | null;
|
|
160
|
+
raised: number;
|
|
161
|
+
previousRaised: number | null;
|
|
162
|
+
emergencies: number;
|
|
163
|
+
resolved: number;
|
|
164
|
+
resolutionRate: number | null;
|
|
165
|
+
medianSecondsToFirstResponse: number | null;
|
|
166
|
+
medianSecondsToResolution: number | null;
|
|
167
|
+
}
|
|
168
|
+
export interface IncidentAnalyticsCategoryRow {
|
|
169
|
+
categoryId: number | null;
|
|
170
|
+
name: string;
|
|
171
|
+
raised: number;
|
|
172
|
+
resolved: number;
|
|
173
|
+
resolutionRate: number | null;
|
|
174
|
+
medianSecondsToResolution: number | null;
|
|
175
|
+
}
|
|
176
|
+
/** A control centre in scope (named by the admin from its own list). */
|
|
177
|
+
export interface IncidentAnalyticsControlCentreRow {
|
|
178
|
+
controlCentreId: number;
|
|
179
|
+
organizationId: number;
|
|
180
|
+
raised: number;
|
|
181
|
+
/** Open now, whenever raised. */
|
|
182
|
+
open: number;
|
|
183
|
+
resolved: number;
|
|
184
|
+
resolutionRate: number | null;
|
|
185
|
+
escalated: number;
|
|
186
|
+
medianSecondsToFirstResponse: number | null;
|
|
187
|
+
medianSecondsToResolution: number | null;
|
|
188
|
+
}
|
|
189
|
+
/** Platform view only: one row per organization. */
|
|
190
|
+
export interface IncidentAnalyticsOrganizationRow {
|
|
191
|
+
organizationId: number;
|
|
192
|
+
raised: number;
|
|
193
|
+
previousRaised: number | null;
|
|
194
|
+
emergencies: number;
|
|
195
|
+
open: number;
|
|
196
|
+
resolutionRate: number | null;
|
|
197
|
+
medianSecondsToFirstResponse: number | null;
|
|
198
|
+
}
|
|
199
|
+
/** How many of the period's incidents could be placed. */
|
|
200
|
+
export interface IncidentAnalyticsGeoQuality {
|
|
201
|
+
raised: number;
|
|
202
|
+
/** With a usable position. */
|
|
203
|
+
located: number;
|
|
204
|
+
withoutLocation: number;
|
|
205
|
+
/** Located, but in no county of the boundary data (another country, the sea, a test device). */
|
|
206
|
+
outsideMappedArea: number;
|
|
207
|
+
/** False when clarion-gis could not be asked: no county figures this time. */
|
|
208
|
+
countiesAvailable: boolean;
|
|
209
|
+
}
|
|
210
|
+
/** One county: the period's incidents in it, normalised by its area. */
|
|
211
|
+
export interface IncidentAnalyticsCountyRow {
|
|
212
|
+
code: number;
|
|
213
|
+
name: string;
|
|
214
|
+
countryIso: string;
|
|
215
|
+
areaKm2: number;
|
|
216
|
+
incidents: number;
|
|
217
|
+
/** Null for "forever". */
|
|
218
|
+
previousIncidents: number | null;
|
|
219
|
+
/** Of the located incidents in mapped counties, as a percentage. */
|
|
220
|
+
share: number | null;
|
|
221
|
+
/** Incidents per 1,000 km² - what a choropleth should show: raw counts favour big counties. */
|
|
222
|
+
perThousandKm2: number;
|
|
223
|
+
emergencies: number;
|
|
224
|
+
resolved: number;
|
|
225
|
+
medianSecondsToFirstResponse: number | null;
|
|
226
|
+
}
|
|
227
|
+
/** Statistical significance of a hexagon's clustering (Getis-Ord Gi*). */
|
|
228
|
+
export interface IncidentAnalyticsGiStar {
|
|
229
|
+
/** The Gi* z-score: high and positive, more incidents around here than chance would put. */
|
|
230
|
+
z: number;
|
|
231
|
+
/** Two-tailed p-value. */
|
|
232
|
+
p: number;
|
|
233
|
+
/** Hot spot at this confidence after the false-discovery-rate correction: 99, 95, 90 - or 0, not significant. */
|
|
234
|
+
confidence: 0 | 90 | 95 | 99;
|
|
235
|
+
}
|
|
236
|
+
/** One hexagon of the equal-area grid with incidents in it. */
|
|
237
|
+
export interface IncidentAnalyticsHexCell {
|
|
238
|
+
/** Axial grid coordinates, "q:r". */
|
|
239
|
+
id: string;
|
|
240
|
+
centre: {
|
|
241
|
+
lat: number;
|
|
242
|
+
lng: number;
|
|
243
|
+
};
|
|
244
|
+
/** The six corners, [lat, lng], for drawing it. */
|
|
245
|
+
vertices: Array<[number, number]>;
|
|
246
|
+
incidents: number;
|
|
247
|
+
emergencies: number;
|
|
248
|
+
/** Null when hot spots were not computed (too few incidents). */
|
|
249
|
+
gi: IncidentAnalyticsGiStar | null;
|
|
250
|
+
}
|
|
251
|
+
/** How the hot-spot analysis was run, and what it found. */
|
|
252
|
+
export interface IncidentAnalyticsHotSpots {
|
|
253
|
+
/** Whether it ran; it needs at least `minimumIncidents` placed incidents. */
|
|
254
|
+
available: boolean;
|
|
255
|
+
/** Why not, when it did not. */
|
|
256
|
+
reason: string | null;
|
|
257
|
+
method: 'Getis-Ord Gi*';
|
|
258
|
+
/** Each hexagon with its six neighbours (first-order contiguity, the hexagon itself included). */
|
|
259
|
+
neighbourhood: string;
|
|
260
|
+
/** Benjamini-Hochberg false-discovery-rate correction across the hexagons tested. */
|
|
261
|
+
fdrCorrected: boolean;
|
|
262
|
+
minimumIncidents: number;
|
|
263
|
+
/** Hexagons in the study area (the incidents' convex hull, one ring wider), empty ones included. */
|
|
264
|
+
studyAreaCells: number;
|
|
265
|
+
hot99: number;
|
|
266
|
+
hot95: number;
|
|
267
|
+
hot90: number;
|
|
268
|
+
}
|
|
269
|
+
export interface IncidentAnalyticsGeography {
|
|
270
|
+
quality: IncidentAnalyticsGeoQuality;
|
|
271
|
+
/** Side of the hexagons, in km on the ground: chosen from the spread of the incidents, never under 1 km. */
|
|
272
|
+
hexSideKm: number | null;
|
|
273
|
+
/** The hexagons with incidents, most first; capped (see `hexesTruncated`). */
|
|
274
|
+
hexes: IncidentAnalyticsHexCell[];
|
|
275
|
+
hexesTruncated: boolean;
|
|
276
|
+
hotSpots: IncidentAnalyticsHotSpots;
|
|
277
|
+
/** Every county of the countries the incidents fall in, zero counts included, most incidents first. */
|
|
278
|
+
counties: IncidentAnalyticsCountyRow[];
|
|
279
|
+
/** The placed incidents' extent, for framing a map; null with none. */
|
|
280
|
+
bounds: {
|
|
281
|
+
south: number;
|
|
282
|
+
west: number;
|
|
283
|
+
north: number;
|
|
284
|
+
east: number;
|
|
285
|
+
} | null;
|
|
286
|
+
}
|
|
287
|
+
export interface IncidentDashboardAnalytics {
|
|
288
|
+
generatedAt: string;
|
|
289
|
+
range: IncidentAnalyticsRange;
|
|
290
|
+
scope: IncidentAnalyticsScope;
|
|
291
|
+
filters: IncidentAnalyticsFilters;
|
|
292
|
+
totals: IncidentAnalyticsTotals;
|
|
293
|
+
openNow: IncidentAnalyticsOpenNow;
|
|
294
|
+
times: IncidentAnalyticsTimes;
|
|
295
|
+
breakdowns: IncidentAnalyticsBreakdowns;
|
|
296
|
+
timeline: IncidentAnalyticsTimelinePoint[];
|
|
297
|
+
/** Raised by weekday and hour; only cells with incidents. */
|
|
298
|
+
hourOfWeek: IncidentAnalyticsHourOfWeek[];
|
|
299
|
+
/** The types raised, most first; capped at 50. */
|
|
300
|
+
types: IncidentAnalyticsTypeRow[];
|
|
301
|
+
categories: IncidentAnalyticsCategoryRow[];
|
|
302
|
+
controlCentres: IncidentAnalyticsControlCentreRow[];
|
|
303
|
+
/** Platform view only; null otherwise. */
|
|
304
|
+
byOrganization: IncidentAnalyticsOrganizationRow[] | null;
|
|
305
|
+
geography: IncidentAnalyticsGeography;
|
|
306
|
+
}
|
|
307
|
+
/** The query the Dashboard's incident analytics answer (IncidentDashboardAnalyticsQueryDto in the services). */
|
|
308
|
+
export interface IncidentDashboardAnalyticsQuery {
|
|
309
|
+
/** Inclusive, ISO 8601; omit for "forever". */
|
|
310
|
+
from?: string;
|
|
311
|
+
/** Exclusive, ISO 8601; omit for now. */
|
|
312
|
+
to?: string;
|
|
313
|
+
timeZone?: string;
|
|
314
|
+
/** Super-Admin only. */
|
|
315
|
+
organizationId?: number;
|
|
316
|
+
controlCentreId?: number;
|
|
317
|
+
incidentClass?: string;
|
|
318
|
+
priority?: string;
|
|
319
|
+
emergencyType?: string;
|
|
320
|
+
channel?: string;
|
|
321
|
+
typeId?: number;
|
|
322
|
+
categoryId?: number;
|
|
323
|
+
}
|
|
@@ -33,6 +33,7 @@ export declare enum PermissionActions {
|
|
|
33
33
|
READ_INCIDENT = "read:incident",
|
|
34
34
|
UPDATE_INCIDENT = "update:incident",
|
|
35
35
|
DELETE_INCIDENT = "delete:incident",
|
|
36
|
+
READ_INCIDENT_ANALYTICS = "read:incident-analytics",
|
|
36
37
|
READ_CHAT_ANALYTICS = "read:chat-analytics",
|
|
37
38
|
CREATE_INCIDENT_CATEGORY_TYPE = "create:incident-category-type",
|
|
38
39
|
READ_INCIDENT_CATEGORY_TYPE = "read:incident-category-type",
|