grm-shared-library 1.1.237 → 1.1.239
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/README.md +369 -369
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/kafka/topics.js +11 -0
- package/dist/cjs/kafka/topics.js.map +1 -1
- package/dist/cjs/modules/dispatch/constants/response-unit-dispatch-defaults.const.js +1 -0
- package/dist/cjs/modules/dispatch/constants/response-unit-dispatch-defaults.const.js.map +1 -1
- package/dist/cjs/modules/dispatch/dtos/response-unit-dispatch-notification.dto.js +5 -0
- package/dist/cjs/modules/dispatch/dtos/response-unit-dispatch-notification.dto.js.map +1 -1
- package/dist/cjs/modules/dispatch/dtos/update-response-unit-dispatch-status.dto.js +1 -0
- package/dist/cjs/modules/dispatch/dtos/update-response-unit-dispatch-status.dto.js.map +1 -1
- package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-status.enum.js +6 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-status.enum.js.map +1 -1
- package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-transition-source.enum.js +3 -1
- package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-transition-source.enum.js.map +1 -1
- package/dist/cjs/modules/dispatch/utils/response-unit-dispatch-status.util.js +6 -2
- package/dist/cjs/modules/dispatch/utils/response-unit-dispatch-status.util.js.map +1 -1
- package/dist/cjs/modules/incident/enums/incident-actions.enum.js +4 -0
- package/dist/cjs/modules/incident/enums/incident-actions.enum.js.map +1 -1
- package/dist/cjs/modules/incident-sla/constants/emergency-incident-workflow.const.js +53 -0
- package/dist/cjs/modules/incident-sla/constants/emergency-incident-workflow.const.js.map +1 -0
- package/dist/cjs/modules/incident-sla/constants/incident-sla-defaults.const.js +258 -0
- package/dist/cjs/modules/incident-sla/constants/incident-sla-defaults.const.js.map +1 -0
- package/dist/cjs/modules/incident-sla/constants/incident-sla-kafka.const.js +27 -0
- package/dist/cjs/modules/incident-sla/constants/incident-sla-kafka.const.js.map +1 -0
- package/dist/cjs/modules/incident-sla/dtos/emergency-notification.dto.js +419 -0
- package/dist/cjs/modules/incident-sla/dtos/emergency-notification.dto.js.map +1 -0
- package/dist/cjs/modules/incident-sla/dtos/emergency-operations.dto.js +155 -0
- package/dist/cjs/modules/incident-sla/dtos/emergency-operations.dto.js.map +1 -0
- package/dist/cjs/modules/incident-sla/dtos/emergency-workflow.dto.js +216 -0
- package/dist/cjs/modules/incident-sla/dtos/emergency-workflow.dto.js.map +1 -0
- package/dist/cjs/modules/incident-sla/dtos/incident-sla-analytics-query.dto.js +95 -0
- package/dist/cjs/modules/incident-sla/dtos/incident-sla-analytics-query.dto.js.map +1 -0
- package/dist/cjs/modules/incident-sla/dtos/incident-sla-policy.dto.js +509 -0
- package/dist/cjs/modules/incident-sla/dtos/incident-sla-policy.dto.js.map +1 -0
- package/dist/cjs/modules/incident-sla/enums/emergency-incident-stage.enum.js +32 -0
- package/dist/cjs/modules/incident-sla/enums/emergency-incident-stage.enum.js.map +1 -0
- package/dist/cjs/modules/incident-sla/enums/emergency-notification.enum.js +44 -0
- package/dist/cjs/modules/incident-sla/enums/emergency-notification.enum.js.map +1 -0
- package/dist/cjs/modules/incident-sla/enums/eta-status.enum.js +32 -0
- package/dist/cjs/modules/incident-sla/enums/eta-status.enum.js.map +1 -0
- package/dist/cjs/modules/incident-sla/enums/incident-closure.enum.js +23 -0
- package/dist/cjs/modules/incident-sla/enums/incident-closure.enum.js.map +1 -0
- package/dist/cjs/modules/incident-sla/enums/incident-sla-actor.enum.js +46 -0
- package/dist/cjs/modules/incident-sla/enums/incident-sla-actor.enum.js.map +1 -0
- package/dist/cjs/modules/incident-sla/enums/incident-sla-error-code.enum.js +26 -0
- package/dist/cjs/modules/incident-sla/enums/incident-sla-error-code.enum.js.map +1 -0
- package/dist/cjs/modules/incident-sla/enums/incident-sla-event-type.enum.js +45 -0
- package/dist/cjs/modules/incident-sla/enums/incident-sla-event-type.enum.js.map +1 -0
- package/dist/cjs/modules/incident-sla/enums/incident-sla-stage.enum.js +26 -0
- package/dist/cjs/modules/incident-sla/enums/incident-sla-stage.enum.js.map +1 -0
- package/dist/cjs/modules/incident-sla/enums/incident-sla-status.enum.js +38 -0
- package/dist/cjs/modules/incident-sla/enums/incident-sla-status.enum.js.map +1 -0
- package/dist/cjs/modules/incident-sla/enums/sla-escalation.enum.js +50 -0
- package/dist/cjs/modules/incident-sla/enums/sla-escalation.enum.js.map +1 -0
- package/dist/cjs/modules/incident-sla/enums/sla-exception.enum.js +27 -0
- package/dist/cjs/modules/incident-sla/enums/sla-exception.enum.js.map +1 -0
- package/dist/cjs/modules/incident-sla/enums/sla-overall-state.enum.js +28 -0
- package/dist/cjs/modules/incident-sla/enums/sla-overall-state.enum.js.map +1 -0
- package/dist/cjs/modules/incident-sla/enums/sla-pause.enum.js +28 -0
- package/dist/cjs/modules/incident-sla/enums/sla-pause.enum.js.map +1 -0
- package/dist/cjs/modules/incident-sla/enums/sla-policy-scope.enum.js +19 -0
- package/dist/cjs/modules/incident-sla/enums/sla-policy-scope.enum.js.map +1 -0
- package/dist/cjs/modules/incident-sla/index.js +53 -0
- package/dist/cjs/modules/incident-sla/index.js.map +1 -0
- package/dist/cjs/modules/incident-sla/interfaces/emergency-workflow.js +3 -0
- package/dist/cjs/modules/incident-sla/interfaces/emergency-workflow.js.map +1 -0
- package/dist/cjs/modules/incident-sla/interfaces/incident-sla-analytics.js +3 -0
- package/dist/cjs/modules/incident-sla/interfaces/incident-sla-analytics.js.map +1 -0
- package/dist/cjs/modules/incident-sla/interfaces/incident-sla-events.js +3 -0
- package/dist/cjs/modules/incident-sla/interfaces/incident-sla-events.js.map +1 -0
- package/dist/cjs/modules/incident-sla/interfaces/incident-sla-policy.js +3 -0
- package/dist/cjs/modules/incident-sla/interfaces/incident-sla-policy.js.map +1 -0
- package/dist/cjs/modules/incident-sla/interfaces/incident-sla-views.js +3 -0
- package/dist/cjs/modules/incident-sla/interfaces/incident-sla-views.js.map +1 -0
- package/dist/cjs/modules/incident-sla/utils/incident-sla-eta.util.js +40 -0
- package/dist/cjs/modules/incident-sla/utils/incident-sla-eta.util.js.map +1 -0
- package/dist/cjs/modules/incident-sla/utils/incident-sla-event-id.util.js +18 -0
- package/dist/cjs/modules/incident-sla/utils/incident-sla-event-id.util.js.map +1 -0
- package/dist/cjs/modules/incident-sla/utils/incident-sla-priority.util.js +31 -0
- package/dist/cjs/modules/incident-sla/utils/incident-sla-priority.util.js.map +1 -0
- package/dist/cjs/modules/incident-sla/utils/incident-sla-time.util.js +129 -0
- package/dist/cjs/modules/incident-sla/utils/incident-sla-time.util.js.map +1 -0
- package/dist/cjs/modules/permission/data/permissions.data.js +11 -0
- package/dist/cjs/modules/permission/data/permissions.data.js.map +1 -1
- package/dist/cjs/modules/permission/enums/permission-actions.enum.js +21 -0
- package/dist/cjs/modules/permission/enums/permission-actions.enum.js.map +1 -1
- package/dist/cjs/modules/permission/enums/permissions-module.enum.js +1 -0
- package/dist/cjs/modules/permission/enums/permissions-module.enum.js.map +1 -1
- package/dist/cjs/modules/role/data/roles.data.js +37 -0
- package/dist/cjs/modules/role/data/roles.data.js.map +1 -1
- package/dist/cjs/modules/sms/constants/sms-templates.config.js +27 -1
- package/dist/cjs/modules/sms/constants/sms-templates.config.js.map +1 -1
- package/dist/cjs/modules/sms/enums/sms-template.enum.js +2 -0
- package/dist/cjs/modules/sms/enums/sms-template.enum.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/kafka/topics.js +11 -0
- package/dist/esm/kafka/topics.js.map +1 -1
- package/dist/esm/modules/dispatch/constants/response-unit-dispatch-defaults.const.js +1 -0
- package/dist/esm/modules/dispatch/constants/response-unit-dispatch-defaults.const.js.map +1 -1
- package/dist/esm/modules/dispatch/dtos/response-unit-dispatch-notification.dto.js +5 -0
- package/dist/esm/modules/dispatch/dtos/response-unit-dispatch-notification.dto.js.map +1 -1
- package/dist/esm/modules/dispatch/dtos/update-response-unit-dispatch-status.dto.js +1 -0
- package/dist/esm/modules/dispatch/dtos/update-response-unit-dispatch-status.dto.js.map +1 -1
- package/dist/esm/modules/dispatch/enums/response-unit-dispatch-status.enum.js +6 -0
- package/dist/esm/modules/dispatch/enums/response-unit-dispatch-status.enum.js.map +1 -1
- package/dist/esm/modules/dispatch/enums/response-unit-dispatch-transition-source.enum.js +3 -1
- package/dist/esm/modules/dispatch/enums/response-unit-dispatch-transition-source.enum.js.map +1 -1
- package/dist/esm/modules/dispatch/utils/response-unit-dispatch-status.util.js +6 -2
- package/dist/esm/modules/dispatch/utils/response-unit-dispatch-status.util.js.map +1 -1
- package/dist/esm/modules/incident/enums/incident-actions.enum.js +4 -0
- package/dist/esm/modules/incident/enums/incident-actions.enum.js.map +1 -1
- package/dist/esm/modules/incident-sla/constants/emergency-incident-workflow.const.js +49 -0
- package/dist/esm/modules/incident-sla/constants/emergency-incident-workflow.const.js.map +1 -0
- package/dist/esm/modules/incident-sla/constants/incident-sla-defaults.const.js +255 -0
- package/dist/esm/modules/incident-sla/constants/incident-sla-defaults.const.js.map +1 -0
- package/dist/esm/modules/incident-sla/constants/incident-sla-kafka.const.js +24 -0
- package/dist/esm/modules/incident-sla/constants/incident-sla-kafka.const.js.map +1 -0
- package/dist/esm/modules/incident-sla/dtos/emergency-notification.dto.js +405 -0
- package/dist/esm/modules/incident-sla/dtos/emergency-notification.dto.js.map +1 -0
- package/dist/esm/modules/incident-sla/dtos/emergency-operations.dto.js +144 -0
- package/dist/esm/modules/incident-sla/dtos/emergency-operations.dto.js.map +1 -0
- package/dist/esm/modules/incident-sla/dtos/emergency-workflow.dto.js +206 -0
- package/dist/esm/modules/incident-sla/dtos/emergency-workflow.dto.js.map +1 -0
- package/dist/esm/modules/incident-sla/dtos/incident-sla-analytics-query.dto.js +91 -0
- package/dist/esm/modules/incident-sla/dtos/incident-sla-analytics-query.dto.js.map +1 -0
- package/dist/esm/modules/incident-sla/dtos/incident-sla-policy.dto.js +495 -0
- package/dist/esm/modules/incident-sla/dtos/incident-sla-policy.dto.js.map +1 -0
- package/dist/esm/modules/incident-sla/enums/emergency-incident-stage.enum.js +29 -0
- package/dist/esm/modules/incident-sla/enums/emergency-incident-stage.enum.js.map +1 -0
- package/dist/esm/modules/incident-sla/enums/emergency-notification.enum.js +41 -0
- package/dist/esm/modules/incident-sla/enums/emergency-notification.enum.js.map +1 -0
- package/dist/esm/modules/incident-sla/enums/eta-status.enum.js +29 -0
- package/dist/esm/modules/incident-sla/enums/eta-status.enum.js.map +1 -0
- package/dist/esm/modules/incident-sla/enums/incident-closure.enum.js +20 -0
- package/dist/esm/modules/incident-sla/enums/incident-closure.enum.js.map +1 -0
- package/dist/esm/modules/incident-sla/enums/incident-sla-actor.enum.js +43 -0
- package/dist/esm/modules/incident-sla/enums/incident-sla-actor.enum.js.map +1 -0
- package/dist/esm/modules/incident-sla/enums/incident-sla-error-code.enum.js +23 -0
- package/dist/esm/modules/incident-sla/enums/incident-sla-error-code.enum.js.map +1 -0
- package/dist/esm/modules/incident-sla/enums/incident-sla-event-type.enum.js +42 -0
- package/dist/esm/modules/incident-sla/enums/incident-sla-event-type.enum.js.map +1 -0
- package/dist/esm/modules/incident-sla/enums/incident-sla-stage.enum.js +23 -0
- package/dist/esm/modules/incident-sla/enums/incident-sla-stage.enum.js.map +1 -0
- package/dist/esm/modules/incident-sla/enums/incident-sla-status.enum.js +35 -0
- package/dist/esm/modules/incident-sla/enums/incident-sla-status.enum.js.map +1 -0
- package/dist/esm/modules/incident-sla/enums/sla-escalation.enum.js +47 -0
- package/dist/esm/modules/incident-sla/enums/sla-escalation.enum.js.map +1 -0
- package/dist/esm/modules/incident-sla/enums/sla-exception.enum.js +24 -0
- package/dist/esm/modules/incident-sla/enums/sla-exception.enum.js.map +1 -0
- package/dist/esm/modules/incident-sla/enums/sla-overall-state.enum.js +25 -0
- package/dist/esm/modules/incident-sla/enums/sla-overall-state.enum.js.map +1 -0
- package/dist/esm/modules/incident-sla/enums/sla-pause.enum.js +25 -0
- package/dist/esm/modules/incident-sla/enums/sla-pause.enum.js.map +1 -0
- package/dist/esm/modules/incident-sla/enums/sla-policy-scope.enum.js +16 -0
- package/dist/esm/modules/incident-sla/enums/sla-policy-scope.enum.js.map +1 -0
- package/dist/esm/modules/incident-sla/index.js +37 -0
- package/dist/esm/modules/incident-sla/index.js.map +1 -0
- package/dist/esm/modules/incident-sla/interfaces/emergency-workflow.js +2 -0
- package/dist/esm/modules/incident-sla/interfaces/emergency-workflow.js.map +1 -0
- package/dist/esm/modules/incident-sla/interfaces/incident-sla-analytics.js +2 -0
- package/dist/esm/modules/incident-sla/interfaces/incident-sla-analytics.js.map +1 -0
- package/dist/esm/modules/incident-sla/interfaces/incident-sla-events.js +2 -0
- package/dist/esm/modules/incident-sla/interfaces/incident-sla-events.js.map +1 -0
- package/dist/esm/modules/incident-sla/interfaces/incident-sla-policy.js +2 -0
- package/dist/esm/modules/incident-sla/interfaces/incident-sla-policy.js.map +1 -0
- package/dist/esm/modules/incident-sla/interfaces/incident-sla-views.js +2 -0
- package/dist/esm/modules/incident-sla/interfaces/incident-sla-views.js.map +1 -0
- package/dist/esm/modules/incident-sla/utils/incident-sla-eta.util.js +35 -0
- package/dist/esm/modules/incident-sla/utils/incident-sla-eta.util.js.map +1 -0
- package/dist/esm/modules/incident-sla/utils/incident-sla-event-id.util.js +14 -0
- package/dist/esm/modules/incident-sla/utils/incident-sla-event-id.util.js.map +1 -0
- package/dist/esm/modules/incident-sla/utils/incident-sla-priority.util.js +25 -0
- package/dist/esm/modules/incident-sla/utils/incident-sla-priority.util.js.map +1 -0
- package/dist/esm/modules/incident-sla/utils/incident-sla-time.util.js +119 -0
- package/dist/esm/modules/incident-sla/utils/incident-sla-time.util.js.map +1 -0
- package/dist/esm/modules/permission/data/permissions.data.js +11 -0
- package/dist/esm/modules/permission/data/permissions.data.js.map +1 -1
- package/dist/esm/modules/permission/enums/permission-actions.enum.js +21 -0
- package/dist/esm/modules/permission/enums/permission-actions.enum.js.map +1 -1
- package/dist/esm/modules/permission/enums/permissions-module.enum.js +1 -0
- package/dist/esm/modules/permission/enums/permissions-module.enum.js.map +1 -1
- package/dist/esm/modules/role/data/roles.data.js +37 -0
- package/dist/esm/modules/role/data/roles.data.js.map +1 -1
- package/dist/esm/modules/sms/constants/sms-templates.config.js +27 -1
- package/dist/esm/modules/sms/constants/sms-templates.config.js.map +1 -1
- package/dist/esm/modules/sms/enums/sms-template.enum.js +2 -0
- package/dist/esm/modules/sms/enums/sms-template.enum.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/kafka/topics.d.ts +5 -0
- package/dist/types/modules/dispatch/dtos/response-unit-dispatch-notification.dto.d.ts +1 -0
- package/dist/types/modules/dispatch/enums/response-unit-dispatch-status.enum.d.ts +7 -1
- package/dist/types/modules/dispatch/enums/response-unit-dispatch-transition-source.enum.d.ts +4 -2
- package/dist/types/modules/dispatch/interfaces/incident-response-unit-dispatch.d.ts +5 -0
- package/dist/types/modules/dispatch/interfaces/response-unit-dispatch-events.d.ts +2 -0
- package/dist/types/modules/dispatch/utils/response-unit-dispatch-status.util.d.ts +1 -1
- package/dist/types/modules/incident/enums/incident-actions.enum.d.ts +4 -0
- package/dist/types/modules/incident-sla/constants/emergency-incident-workflow.const.d.ts +46 -0
- package/dist/types/modules/incident-sla/constants/incident-sla-defaults.const.d.ts +81 -0
- package/dist/types/modules/incident-sla/constants/incident-sla-kafka.const.d.ts +22 -0
- package/dist/types/modules/incident-sla/dtos/emergency-notification.dto.d.ts +99 -0
- package/dist/types/modules/incident-sla/dtos/emergency-operations.dto.d.ts +52 -0
- package/dist/types/modules/incident-sla/dtos/emergency-workflow.dto.d.ts +55 -0
- package/dist/types/modules/incident-sla/dtos/incident-sla-analytics-query.dto.d.ts +23 -0
- package/dist/types/modules/incident-sla/dtos/incident-sla-policy.dto.d.ts +104 -0
- package/dist/types/modules/incident-sla/enums/emergency-incident-stage.enum.d.ts +27 -0
- package/dist/types/modules/incident-sla/enums/emergency-notification.enum.d.ts +37 -0
- package/dist/types/modules/incident-sla/enums/eta-status.enum.d.ts +26 -0
- package/dist/types/modules/incident-sla/enums/incident-closure.enum.d.ts +17 -0
- package/dist/types/modules/incident-sla/enums/incident-sla-actor.enum.d.ts +40 -0
- package/dist/types/modules/incident-sla/enums/incident-sla-error-code.enum.d.ts +21 -0
- package/dist/types/modules/incident-sla/enums/incident-sla-event-type.enum.d.ts +36 -0
- package/dist/types/modules/incident-sla/enums/incident-sla-stage.enum.d.ts +21 -0
- package/dist/types/modules/incident-sla/enums/incident-sla-status.enum.d.ts +33 -0
- package/dist/types/modules/incident-sla/enums/sla-escalation.enum.d.ts +42 -0
- package/dist/types/modules/incident-sla/enums/sla-exception.enum.d.ts +21 -0
- package/dist/types/modules/incident-sla/enums/sla-overall-state.enum.d.ts +22 -0
- package/dist/types/modules/incident-sla/enums/sla-pause.enum.d.ts +22 -0
- package/dist/types/modules/incident-sla/enums/sla-policy-scope.enum.d.ts +14 -0
- package/dist/types/modules/incident-sla/index.d.ts +31 -0
- package/dist/types/modules/incident-sla/interfaces/emergency-workflow.d.ts +131 -0
- package/dist/types/modules/incident-sla/interfaces/incident-sla-analytics.d.ts +356 -0
- package/dist/types/modules/incident-sla/interfaces/incident-sla-events.d.ts +173 -0
- package/dist/types/modules/incident-sla/interfaces/incident-sla-policy.d.ts +147 -0
- package/dist/types/modules/incident-sla/interfaces/incident-sla-views.d.ts +224 -0
- package/dist/types/modules/incident-sla/utils/incident-sla-eta.util.d.ts +15 -0
- package/dist/types/modules/incident-sla/utils/incident-sla-event-id.util.d.ts +8 -0
- package/dist/types/modules/incident-sla/utils/incident-sla-priority.util.d.ts +14 -0
- package/dist/types/modules/incident-sla/utils/incident-sla-time.util.d.ts +65 -0
- package/dist/types/modules/permission/enums/permission-actions.enum.d.ts +6 -0
- package/dist/types/modules/permission/enums/permissions-module.enum.d.ts +2 -1
- package/dist/types/modules/sms/enums/sms-template.enum.d.ts +2 -0
- package/package.json +72 -72
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The emergency incident workflow's names, shared by clarion-workflow-manager
|
|
3
|
+
* (which runs it) and anything that signals it. Workflow code cannot import this
|
|
4
|
+
* library (the Temporal sandbox), so workflow-manager keeps a local copy and a
|
|
5
|
+
* drift test pins it to these values.
|
|
6
|
+
*/
|
|
7
|
+
export declare const EMERGENCY_INCIDENT_WORKFLOW: {
|
|
8
|
+
readonly type: "emergencyIncidentWorkflow";
|
|
9
|
+
/** One workflow per incident: `emergency-incident-{incidentId}`. */
|
|
10
|
+
readonly idPrefix: "emergency-incident-";
|
|
11
|
+
/** The existing incident queue (IncidentWorkflowTaskQueueName.INCIDENT_QUEUE). */
|
|
12
|
+
readonly defaultTaskQueue: "incident-task-queue";
|
|
13
|
+
readonly query: "emergencyIncidentState";
|
|
14
|
+
readonly reconciliationWorkflowType: "emergencyIncidentReconciliationWorkflow";
|
|
15
|
+
readonly reconciliationScheduleId: "emergency-incident-reconciliation";
|
|
16
|
+
readonly signals: {
|
|
17
|
+
readonly acknowledgeIncident: "acknowledgeIncident";
|
|
18
|
+
readonly triageIncident: "triageIncident";
|
|
19
|
+
readonly assignResponseUnit: "assignResponseUnit";
|
|
20
|
+
readonly acceptDispatch: "acceptDispatch";
|
|
21
|
+
readonly rejectDispatch: "rejectDispatch";
|
|
22
|
+
readonly startTravel: "startTravel";
|
|
23
|
+
readonly reportArrival: "reportArrival";
|
|
24
|
+
readonly reportAssessment: "reportAssessment";
|
|
25
|
+
readonly updateIncidentStatus: "updateIncidentStatus";
|
|
26
|
+
readonly reportResolution: "reportResolution";
|
|
27
|
+
readonly pauseSla: "pauseSla";
|
|
28
|
+
readonly resumeSla: "resumeSla";
|
|
29
|
+
readonly requestSlaException: "requestSlaException";
|
|
30
|
+
readonly etaChanged: "etaChanged";
|
|
31
|
+
readonly slaChanged: "slaChanged";
|
|
32
|
+
readonly dispatchCancelled: "dispatchCancelled";
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export declare function emergencyIncidentWorkflowId(incidentId: number): string;
|
|
36
|
+
/** Internal routes clarion-incident serves to the workflow (token-protected, never proxied). */
|
|
37
|
+
export declare const EMERGENCY_INCIDENT_INTERNAL_PATHS: {
|
|
38
|
+
readonly plan: (incidentId: number) => string;
|
|
39
|
+
readonly threshold: (incidentId: number) => string;
|
|
40
|
+
readonly milestone: (incidentId: number) => string;
|
|
41
|
+
readonly escalation: (incidentId: number) => string;
|
|
42
|
+
readonly reassignment: (incidentId: number) => string;
|
|
43
|
+
readonly trackingFreshness: (incidentId: number) => string;
|
|
44
|
+
readonly autoClose: (incidentId: number) => string;
|
|
45
|
+
readonly open: "/incidents/internal/emergency/open";
|
|
46
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { IncidentPriority } from '../../incident/enums/incident-priority.enum';
|
|
2
|
+
import { Roles } from '../../role/enums/role.enum';
|
|
3
|
+
import { EmergencyIncidentStage } from '../enums/emergency-incident-stage.enum';
|
|
4
|
+
import { IncidentSlaStage } from '../enums/incident-sla-stage.enum';
|
|
5
|
+
import { IncidentSlaStatus } from '../enums/incident-sla-status.enum';
|
|
6
|
+
import { SlaEscalationLevel } from '../enums/sla-escalation.enum';
|
|
7
|
+
import { SlaPriorityLevel } from '../enums/sla-overall-state.enum';
|
|
8
|
+
import { IncidentSlaEscalationRule, IncidentSlaPolicySettings, IncidentSlaPriorityFloors } from '../interfaces/incident-sla-policy';
|
|
9
|
+
/** Every stage, in the order an emergency moves through them. */
|
|
10
|
+
export declare const INCIDENT_SLA_STAGE_ORDER: readonly IncidentSlaStage[];
|
|
11
|
+
/** Every milestone, in order. */
|
|
12
|
+
export declare const EMERGENCY_INCIDENT_STAGE_ORDER: readonly EmergencyIncidentStage[];
|
|
13
|
+
/** Stages measured once per dispatch (cycle = the dispatch's ordinal); the rest once per incident. */
|
|
14
|
+
export declare const PER_DISPATCH_INCIDENT_SLA_STAGES: readonly IncidentSlaStage[];
|
|
15
|
+
/** The milestone that completes each stage. */
|
|
16
|
+
export declare const INCIDENT_SLA_STOP_MILESTONE: Readonly<Record<IncidentSlaStage, EmergencyIncidentStage>>;
|
|
17
|
+
/**
|
|
18
|
+
* The milestone that starts each stage's clock, by default. ACCEPTANCE and
|
|
19
|
+
* MOBILIZATION are per dispatch and always start at that dispatch's own
|
|
20
|
+
* dispatch / acceptance; for the rest a policy may choose (e.g. measure ARRIVAL
|
|
21
|
+
* from the incident's creation instead of from the first dispatch).
|
|
22
|
+
*/
|
|
23
|
+
export declare const DEFAULT_INCIDENT_SLA_START_ANCHORS: Readonly<Record<IncidentSlaStage, EmergencyIncidentStage>>;
|
|
24
|
+
/** The start milestones a policy may choose per stage (the first is the default). */
|
|
25
|
+
export declare const ALLOWED_INCIDENT_SLA_START_ANCHORS: Readonly<Record<IncidentSlaStage, readonly EmergencyIncidentStage[]>>;
|
|
26
|
+
/**
|
|
27
|
+
* Clarion's DEFAULT policy, in seconds - a starting point every organization
|
|
28
|
+
* may override, not a regulatory requirement. P1 Critical ... P4 Low.
|
|
29
|
+
* RESOLUTION and CLOSURE have no default target (null = not measured).
|
|
30
|
+
*/
|
|
31
|
+
export declare const DEFAULT_INCIDENT_SLA_TARGETS: Readonly<Record<IncidentPriority, Readonly<Record<IncidentSlaStage, number | null>>>>;
|
|
32
|
+
/** The default settings. Every one is overridable per policy. */
|
|
33
|
+
export declare const DEFAULT_INCIDENT_SLA_SETTINGS: Readonly<IncidentSlaPolicySettings>;
|
|
34
|
+
/**
|
|
35
|
+
* SOS and safety alerts arrive with the priority column's default (Medium), so
|
|
36
|
+
* by default an emergency or panic alert is measured as Critical. A triage
|
|
37
|
+
* decision replaces the floor for the stages that have not started yet.
|
|
38
|
+
*/
|
|
39
|
+
export declare const DEFAULT_INCIDENT_SLA_PRIORITY_FLOORS: Readonly<IncidentSlaPriorityFloors>;
|
|
40
|
+
/** Who each escalation level reaches when a rule names no roles. */
|
|
41
|
+
export declare const DEFAULT_SLA_ESCALATION_LEVEL_ROLES: Readonly<Record<SlaEscalationLevel, readonly Roles[]>>;
|
|
42
|
+
/**
|
|
43
|
+
* The default escalation rules. A duty manager is reached only "where
|
|
44
|
+
* configured" - so there is no default rule for that level; an organization
|
|
45
|
+
* adds one with its contacts.
|
|
46
|
+
*
|
|
47
|
+
* One breach reaches a supervisor once: the general breach rules leave out
|
|
48
|
+
* acknowledgement, which the two ack rules already cover.
|
|
49
|
+
*/
|
|
50
|
+
export declare const DEFAULT_INCIDENT_SLA_ESCALATION_RULES: readonly IncidentSlaEscalationRule[];
|
|
51
|
+
/** The SLA priority level of each incident priority. */
|
|
52
|
+
export declare const INCIDENT_PRIORITY_SLA_LEVEL: Readonly<Record<IncidentPriority, SlaPriorityLevel>>;
|
|
53
|
+
/** Highest first: the order a floor and a comparison use. */
|
|
54
|
+
export declare const INCIDENT_PRIORITY_RANK: Readonly<Record<IncidentPriority, number>>;
|
|
55
|
+
/** Instance statuses whose clock is running (or paused) - the ones the workflow times. */
|
|
56
|
+
export declare const OPEN_INCIDENT_SLA_STATUSES: readonly IncidentSlaStatus[];
|
|
57
|
+
/** Instance statuses that are final (a BREACHED instance may still record completedAt). */
|
|
58
|
+
export declare const FINAL_INCIDENT_SLA_STATUSES: readonly IncidentSlaStatus[];
|
|
59
|
+
/** Bounds every stored or requested value must respect. */
|
|
60
|
+
export declare const INCIDENT_SLA_LIMITS: {
|
|
61
|
+
readonly minTargetSeconds: 5;
|
|
62
|
+
readonly maxTargetSeconds: number;
|
|
63
|
+
readonly minThresholdPercent: 10;
|
|
64
|
+
readonly maxThresholdPercent: 99;
|
|
65
|
+
readonly minRadiusMetres: 10;
|
|
66
|
+
readonly maxRadiusMetres: 5000;
|
|
67
|
+
readonly maxDwellSeconds: number;
|
|
68
|
+
readonly maxObservations: 20;
|
|
69
|
+
readonly minStaleSeconds: 15;
|
|
70
|
+
readonly maxStaleSeconds: number;
|
|
71
|
+
readonly minAutoCloseSeconds: number;
|
|
72
|
+
readonly maxAutoCloseSeconds: number;
|
|
73
|
+
readonly maxEscalationDelaySeconds: number;
|
|
74
|
+
readonly maxEscalationRules: 50;
|
|
75
|
+
readonly maxEscalationContacts: 10;
|
|
76
|
+
readonly noteMaxLength: 1000;
|
|
77
|
+
readonly reasonMaxLength: 500;
|
|
78
|
+
readonly policyNameMaxLength: 120;
|
|
79
|
+
readonly policyDescriptionMaxLength: 1000;
|
|
80
|
+
readonly ruleKeyMaxLength: 60;
|
|
81
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Grouped view of the emergency-incident / SLA topics. The strings live in
|
|
3
|
+
* {@link KAFKA_TOPICS}; this only references them.
|
|
4
|
+
*
|
|
5
|
+
* Producer clarion-incident, through its transactional outbox, keyed by
|
|
6
|
+
* incident id so one incident's history stays in order:
|
|
7
|
+
* MILESTONE_RECORDED, SLA_CHANGED, ETA_CHANGED (domain events - no names,
|
|
8
|
+
* numbers or addresses) and NOTIFICATION_REQUESTED (a command to
|
|
9
|
+
* clarion-notification). Producer clarion-notification: NOTIFICATION_RESULT.
|
|
10
|
+
*
|
|
11
|
+
* A consumer of a topic that does not exist yet fails its boot in prod
|
|
12
|
+
* (Strimzi): declare each as a KafkaTopic BEFORE deploying a consumer.
|
|
13
|
+
*/
|
|
14
|
+
export declare const INCIDENT_SLA_KAFKA_TOPICS: {
|
|
15
|
+
readonly MILESTONE_RECORDED: string;
|
|
16
|
+
readonly SLA_CHANGED: string;
|
|
17
|
+
readonly ETA_CHANGED: string;
|
|
18
|
+
readonly NOTIFICATION_REQUESTED: string;
|
|
19
|
+
readonly NOTIFICATION_RESULT: string;
|
|
20
|
+
};
|
|
21
|
+
/** Current schema version of every emergency-incident / SLA event. */
|
|
22
|
+
export declare const INCIDENT_SLA_SCHEMA_VERSION: 1;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { IncidentPriority } from '../../incident/enums/incident-priority.enum';
|
|
2
|
+
import { EmergencyNotificationAudience, EmergencyNotificationEvent, EmergencyNotificationResultStatus } from '../enums/emergency-notification.enum';
|
|
3
|
+
import { EtaStatus } from '../enums/eta-status.enum';
|
|
4
|
+
import { IncidentSlaStage } from '../enums/incident-sla-stage.enum';
|
|
5
|
+
import { IncidentSlaStatus } from '../enums/incident-sla-status.enum';
|
|
6
|
+
import { SlaEscalationLevel, SlaEscalationTrigger, SlaNotificationChannel } from '../enums/sla-escalation.enum';
|
|
7
|
+
import { SlaPriorityLevel } from '../enums/sla-overall-state.enum';
|
|
8
|
+
import { EmergencyNotificationAudienceSpec, EmergencyNotificationDelivery, EmergencyNotificationIncidentFacts, EmergencyNotificationRequestedV1, EmergencyNotificationResultV1 } from '../interfaces/incident-sla-events';
|
|
9
|
+
import { IncidentSlaEscalationContact } from '../interfaces/incident-sla-policy';
|
|
10
|
+
export declare class EmergencyNotificationContactDto implements IncidentSlaEscalationContact {
|
|
11
|
+
name?: string | null;
|
|
12
|
+
phoneNumber?: string | null;
|
|
13
|
+
email?: string | null;
|
|
14
|
+
}
|
|
15
|
+
export declare class EmergencyNotificationAudienceDto implements EmergencyNotificationAudienceSpec {
|
|
16
|
+
audience: EmergencyNotificationAudience;
|
|
17
|
+
channels: SlaNotificationChannel[];
|
|
18
|
+
roles: string[];
|
|
19
|
+
contacts: EmergencyNotificationContactDto[];
|
|
20
|
+
}
|
|
21
|
+
export declare class EmergencyNotificationIncidentDto implements EmergencyNotificationIncidentFacts {
|
|
22
|
+
reference: string;
|
|
23
|
+
typeName: string | null;
|
|
24
|
+
categoryName: string | null;
|
|
25
|
+
priority: IncidentPriority | null;
|
|
26
|
+
priorityLevel: SlaPriorityLevel | null;
|
|
27
|
+
status: string;
|
|
28
|
+
summary: string | null;
|
|
29
|
+
address: string | null;
|
|
30
|
+
latitude: number | null;
|
|
31
|
+
longitude: number | null;
|
|
32
|
+
createdAt: string;
|
|
33
|
+
reporterUserId: number | null;
|
|
34
|
+
anonymous: boolean;
|
|
35
|
+
assigneeIds: number[];
|
|
36
|
+
}
|
|
37
|
+
export declare class EmergencyNotificationSlaDto {
|
|
38
|
+
stage: IncidentSlaStage;
|
|
39
|
+
status: IncidentSlaStatus;
|
|
40
|
+
targetSeconds: number | null;
|
|
41
|
+
deadlineAt: string | null;
|
|
42
|
+
overdueSeconds: number | null;
|
|
43
|
+
}
|
|
44
|
+
export declare class EmergencyNotificationEtaDto {
|
|
45
|
+
status: EtaStatus;
|
|
46
|
+
etaSeconds: number | null;
|
|
47
|
+
predictedArrivalAt: string | null;
|
|
48
|
+
distanceMetres: number | null;
|
|
49
|
+
}
|
|
50
|
+
export declare class EmergencyNotificationUnitDto {
|
|
51
|
+
responseUnitId: number;
|
|
52
|
+
name: string | null;
|
|
53
|
+
}
|
|
54
|
+
export declare class EmergencyNotificationAlternativeDto extends EmergencyNotificationUnitDto {
|
|
55
|
+
distanceMetres: number | null;
|
|
56
|
+
etaSeconds: number | null;
|
|
57
|
+
}
|
|
58
|
+
export declare class EmergencyNotificationEscalationDto {
|
|
59
|
+
ruleKey: string;
|
|
60
|
+
trigger: SlaEscalationTrigger;
|
|
61
|
+
level: SlaEscalationLevel;
|
|
62
|
+
}
|
|
63
|
+
export declare class EmergencyNotificationRequestedDto implements EmergencyNotificationRequestedV1 {
|
|
64
|
+
schemaVersion: 1;
|
|
65
|
+
eventId: string;
|
|
66
|
+
occurredAt: string;
|
|
67
|
+
incidentId: number;
|
|
68
|
+
organizationId: number;
|
|
69
|
+
controlCentreId: number | null;
|
|
70
|
+
event: EmergencyNotificationEvent;
|
|
71
|
+
audiences: EmergencyNotificationAudienceDto[];
|
|
72
|
+
incident: EmergencyNotificationIncidentDto;
|
|
73
|
+
sla: EmergencyNotificationSlaDto | null;
|
|
74
|
+
eta: EmergencyNotificationEtaDto | null;
|
|
75
|
+
unit: EmergencyNotificationUnitDto | null;
|
|
76
|
+
alternative: EmergencyNotificationAlternativeDto | null;
|
|
77
|
+
escalation: EmergencyNotificationEscalationDto | null;
|
|
78
|
+
workflowId: string | null;
|
|
79
|
+
correlationId: string | null;
|
|
80
|
+
}
|
|
81
|
+
export declare class EmergencyNotificationDeliveryDto implements EmergencyNotificationDelivery {
|
|
82
|
+
audience: EmergencyNotificationAudience;
|
|
83
|
+
channel: SlaNotificationChannel;
|
|
84
|
+
recipients: number;
|
|
85
|
+
sent: number;
|
|
86
|
+
failed: number;
|
|
87
|
+
}
|
|
88
|
+
export declare class EmergencyNotificationResultDto implements EmergencyNotificationResultV1 {
|
|
89
|
+
schemaVersion: 1;
|
|
90
|
+
eventId: string;
|
|
91
|
+
requestEventId: string;
|
|
92
|
+
incidentId: number;
|
|
93
|
+
organizationId: number;
|
|
94
|
+
event: EmergencyNotificationEvent;
|
|
95
|
+
status: EmergencyNotificationResultStatus;
|
|
96
|
+
deliveries: EmergencyNotificationDeliveryDto[];
|
|
97
|
+
failureReason: string | null;
|
|
98
|
+
occurredAt: string;
|
|
99
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { IncidentPriority } from '../../incident/enums/incident-priority.enum';
|
|
2
|
+
import { SlaExceptionReason } from '../enums/sla-exception.enum';
|
|
3
|
+
import { SlaPauseReason } from '../enums/sla-pause.enum';
|
|
4
|
+
/** `POST /incidents/:id/sla/acknowledge` - the control room has seen the emergency. */
|
|
5
|
+
export declare class AcknowledgeEmergencyIncidentDto {
|
|
6
|
+
note?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* `POST /incidents/:id/sla/triage` - the emergency has been assessed and its
|
|
10
|
+
* priority confirmed (or changed). A changed priority applies to the stages
|
|
11
|
+
* that have not started yet; running clocks keep their deadlines.
|
|
12
|
+
*/
|
|
13
|
+
export declare class TriageEmergencyIncidentDto {
|
|
14
|
+
priority?: IncidentPriority;
|
|
15
|
+
note?: string;
|
|
16
|
+
}
|
|
17
|
+
/** `POST /incidents/:id/sla/assessment` - the first unit on scene reported its initial assessment. */
|
|
18
|
+
export declare class RecordEmergencyAssessmentDto {
|
|
19
|
+
note?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* `POST /incidents/:id/sla/pauses` - ask to pause running clocks. Pauses
|
|
23
|
+
* nothing until a supervisor approves, unless the caller is one (or the policy
|
|
24
|
+
* needs no approval). A breached clock cannot be paused.
|
|
25
|
+
*/
|
|
26
|
+
export declare class RequestSlaPauseDto {
|
|
27
|
+
reason: SlaPauseReason;
|
|
28
|
+
note?: string;
|
|
29
|
+
/** The instances to pause; every running, unbreached one when omitted. */
|
|
30
|
+
instanceIds?: number[];
|
|
31
|
+
}
|
|
32
|
+
/** Approving or rejecting a pause or an exception, and ending a pause. */
|
|
33
|
+
export declare class DecideSlaRequestDto {
|
|
34
|
+
note?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* `POST /incidents/:id/sla/instances/:instanceId/exception` - ask for a breach
|
|
38
|
+
* to be excused in compliance reporting. The breach itself stays on record.
|
|
39
|
+
*/
|
|
40
|
+
export declare class RequestSlaExceptionDto {
|
|
41
|
+
reason: SlaExceptionReason;
|
|
42
|
+
note: string;
|
|
43
|
+
}
|
|
44
|
+
/** `POST /incidents/:id/sla/instances/:instanceId/waive` - a supervisor declares an unfinished stage not applicable. */
|
|
45
|
+
export declare class WaiveSlaInstanceDto {
|
|
46
|
+
reason: string;
|
|
47
|
+
}
|
|
48
|
+
/** `GET /incidents/:id/sla/events`. */
|
|
49
|
+
export declare class IncidentSlaEventsQueryDto {
|
|
50
|
+
page?: number;
|
|
51
|
+
limit?: number;
|
|
52
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { EmergencyIncidentStage } from '../enums/emergency-incident-stage.enum';
|
|
2
|
+
import { IncidentArrivalSource } from '../enums/incident-closure.enum';
|
|
3
|
+
import { IncidentActorType, IncidentSlaEventSource } from '../enums/incident-sla-actor.enum';
|
|
4
|
+
import { IncidentSlaStatus } from '../enums/incident-sla-status.enum';
|
|
5
|
+
import { SlaEscalationTrigger } from '../enums/sla-escalation.enum';
|
|
6
|
+
/** The thresholds a timer can report. */
|
|
7
|
+
export declare const SLA_THRESHOLD_STATUSES: readonly [IncidentSlaStatus.WARNING, IncidentSlaStatus.AT_RISK, IncidentSlaStatus.BREACHED];
|
|
8
|
+
export type SlaThresholdStatus = (typeof SLA_THRESHOLD_STATUSES)[number];
|
|
9
|
+
/** The milestones a workflow (or a future responder integration through it) may record directly. */
|
|
10
|
+
export declare const DIRECTLY_RECORDABLE_MILESTONES: readonly EmergencyIncidentStage[];
|
|
11
|
+
export declare class EmergencyPlanRequestDto {
|
|
12
|
+
workflowId?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class RecordSlaThresholdDto {
|
|
15
|
+
instanceId: number;
|
|
16
|
+
threshold: SlaThresholdStatus;
|
|
17
|
+
workflowId?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare class RecordEmergencyMilestoneDto {
|
|
20
|
+
milestone: EmergencyIncidentStage;
|
|
21
|
+
/** When it happened; defaults to now. Never in the future. */
|
|
22
|
+
at?: string;
|
|
23
|
+
actorType: IncidentActorType;
|
|
24
|
+
source: IncidentSlaEventSource;
|
|
25
|
+
actorUserId?: number;
|
|
26
|
+
/** Required for the dispatch milestones (accepted, en route, on scene). */
|
|
27
|
+
dispatchId?: number;
|
|
28
|
+
arrivalSource?: IncidentArrivalSource;
|
|
29
|
+
note?: string;
|
|
30
|
+
eventKey: string;
|
|
31
|
+
workflowId?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare class EmergencyEscalationRequestDto {
|
|
34
|
+
ruleKey: string;
|
|
35
|
+
trigger: SlaEscalationTrigger;
|
|
36
|
+
instanceId?: number;
|
|
37
|
+
dispatchId?: number;
|
|
38
|
+
eventKey: string;
|
|
39
|
+
workflowId?: string;
|
|
40
|
+
}
|
|
41
|
+
export declare class EmergencyReassignmentRequestDto {
|
|
42
|
+
fromDispatchId: number;
|
|
43
|
+
toResponseUnitId: number;
|
|
44
|
+
trigger: SlaEscalationTrigger;
|
|
45
|
+
eventKey: string;
|
|
46
|
+
workflowId?: string;
|
|
47
|
+
}
|
|
48
|
+
export declare class EmergencyTrackingFreshnessRequestDto {
|
|
49
|
+
workflowId?: string;
|
|
50
|
+
}
|
|
51
|
+
export declare class EmergencyAutoCloseRequestDto {
|
|
52
|
+
workflowId: string;
|
|
53
|
+
/** The resolution the timer was armed for; a later re-resolution reschedules instead of closing early. */
|
|
54
|
+
expectedResolvedAt?: string;
|
|
55
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IncidentPriority } from '../../incident/enums/incident-priority.enum';
|
|
2
|
+
import { IncidentSlaStage } from '../enums/incident-sla-stage.enum';
|
|
3
|
+
/**
|
|
4
|
+
* `GET /incident-sla/analytics` - the emergencies raised in a period. Both ends
|
|
5
|
+
* optional: no `from` is "forever", no `to` is now.
|
|
6
|
+
*/
|
|
7
|
+
export declare class IncidentSlaAnalyticsQueryDto {
|
|
8
|
+
from?: string;
|
|
9
|
+
to?: string;
|
|
10
|
+
timeZone?: string;
|
|
11
|
+
/** Honoured for Super-Admin only; everybody else is held to their own scope. */
|
|
12
|
+
organizationId?: number;
|
|
13
|
+
/** Narrows an organization's figures to one control centre; a control centre's staff are held to their own. */
|
|
14
|
+
controlCentreId?: number;
|
|
15
|
+
/** The priority each emergency was measured at. */
|
|
16
|
+
priority?: IncidentPriority;
|
|
17
|
+
/** Narrows the stage figures (compliance, durations) to one stage. */
|
|
18
|
+
stage?: IncidentSlaStage;
|
|
19
|
+
typeId?: number;
|
|
20
|
+
categoryId?: number;
|
|
21
|
+
/** The emergencies a unit was dispatched to. */
|
|
22
|
+
responseUnitId?: number;
|
|
23
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { IncidentEmergencyType } from '../../incident/enums/incident-emergency-type.enum';
|
|
2
|
+
import { IncidentPriority } from '../../incident/enums/incident-priority.enum';
|
|
3
|
+
import { Roles } from '../../role/enums/role.enum';
|
|
4
|
+
import { EmergencyIncidentStage } from '../enums/emergency-incident-stage.enum';
|
|
5
|
+
import { IncidentSlaStage } from '../enums/incident-sla-stage.enum';
|
|
6
|
+
import { SlaEscalationAction, SlaEscalationLevel, SlaEscalationTrigger, SlaNotificationChannel } from '../enums/sla-escalation.enum';
|
|
7
|
+
/** Policy settings - every field optional: an absent field inherits from the less specific policy. */
|
|
8
|
+
export declare class IncidentSlaPolicySettingsDto {
|
|
9
|
+
warningThresholdPercent?: number;
|
|
10
|
+
atRiskThresholdPercent?: number;
|
|
11
|
+
arrivalRadiusMetres?: number;
|
|
12
|
+
arrivalExitRadiusMetres?: number;
|
|
13
|
+
arrivalDwellSeconds?: number;
|
|
14
|
+
arrivalMinObservations?: number;
|
|
15
|
+
maxLocationAccuracyMetres?: number;
|
|
16
|
+
trackingStaleSeconds?: number;
|
|
17
|
+
etaAtRiskMarginPercent?: number;
|
|
18
|
+
etaAssumedSpeedKph?: number;
|
|
19
|
+
etaRoadFactor?: number;
|
|
20
|
+
autoCloseEnabled?: boolean;
|
|
21
|
+
autoCloseAfterSeconds?: number;
|
|
22
|
+
allowAutomaticReassignment?: boolean;
|
|
23
|
+
pauseRequiresApproval?: boolean;
|
|
24
|
+
notifyReporter?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** One stage's target for one priority. `targetSeconds: null` switches the stage off for that priority. */
|
|
27
|
+
export declare class IncidentSlaTargetDto {
|
|
28
|
+
stage: IncidentSlaStage;
|
|
29
|
+
priority: IncidentPriority;
|
|
30
|
+
targetSeconds: number | null;
|
|
31
|
+
}
|
|
32
|
+
export declare class IncidentSlaStartAnchorDto {
|
|
33
|
+
stage: IncidentSlaStage;
|
|
34
|
+
milestone: EmergencyIncidentStage;
|
|
35
|
+
}
|
|
36
|
+
export declare class IncidentSlaPriorityFloorDto {
|
|
37
|
+
emergencyType: IncidentEmergencyType;
|
|
38
|
+
priority: IncidentPriority;
|
|
39
|
+
}
|
|
40
|
+
export declare class IncidentSlaEscalationContactDto {
|
|
41
|
+
name?: string;
|
|
42
|
+
phoneNumber?: string;
|
|
43
|
+
email?: string;
|
|
44
|
+
}
|
|
45
|
+
export declare class IncidentSlaEscalationRuleDto {
|
|
46
|
+
key: string;
|
|
47
|
+
trigger: SlaEscalationTrigger;
|
|
48
|
+
stages?: IncidentSlaStage[];
|
|
49
|
+
priorities?: IncidentPriority[];
|
|
50
|
+
level: SlaEscalationLevel;
|
|
51
|
+
channels: SlaNotificationChannel[];
|
|
52
|
+
actions?: SlaEscalationAction[];
|
|
53
|
+
delaySeconds?: number;
|
|
54
|
+
recipientRoles?: Roles[];
|
|
55
|
+
contacts?: IncidentSlaEscalationContactDto[];
|
|
56
|
+
}
|
|
57
|
+
/** What a policy version carries apart from its scope. */
|
|
58
|
+
export declare class IncidentSlaPolicyContentDto {
|
|
59
|
+
name: string;
|
|
60
|
+
description?: string;
|
|
61
|
+
/** Defaults to now. A version only governs incidents created at or after it. */
|
|
62
|
+
effectiveFrom?: string;
|
|
63
|
+
effectiveTo?: string;
|
|
64
|
+
settings?: IncidentSlaPolicySettingsDto;
|
|
65
|
+
targets?: IncidentSlaTargetDto[];
|
|
66
|
+
startAnchors?: IncidentSlaStartAnchorDto[];
|
|
67
|
+
priorityFloors?: IncidentSlaPriorityFloorDto[];
|
|
68
|
+
/** Absent = inherit the less specific policy's rules; [] = no escalation at all. */
|
|
69
|
+
escalationRules?: IncidentSlaEscalationRuleDto[];
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* `POST /incident-sla/policies` - a new policy (version 1). The scope fields
|
|
73
|
+
* pick what it governs; none set = a platform policy (Super-Admin only).
|
|
74
|
+
*/
|
|
75
|
+
export declare class CreateIncidentSlaPolicyDto extends IncidentSlaPolicyContentDto {
|
|
76
|
+
organizationId?: number;
|
|
77
|
+
controlCentreId?: number;
|
|
78
|
+
categoryId?: number;
|
|
79
|
+
typeId?: number;
|
|
80
|
+
priority?: IncidentPriority;
|
|
81
|
+
zoneId?: number;
|
|
82
|
+
}
|
|
83
|
+
/** `POST /incident-sla/policies/:id/versions` - the next version of a policy (same scope). */
|
|
84
|
+
export declare class CreateIncidentSlaPolicyVersionDto extends IncidentSlaPolicyContentDto {
|
|
85
|
+
}
|
|
86
|
+
/** `GET /incident-sla/policies`. */
|
|
87
|
+
export declare class IncidentSlaPolicyQueryDto {
|
|
88
|
+
organizationId?: number;
|
|
89
|
+
activeOnly?: boolean;
|
|
90
|
+
/** Include the platform policies alongside the organization's (default true). */
|
|
91
|
+
includePlatform?: boolean;
|
|
92
|
+
}
|
|
93
|
+
/** `GET /incident-sla/policies/effective` - which policy an incident like this would run under. */
|
|
94
|
+
export declare class EffectiveIncidentSlaPolicyQueryDto {
|
|
95
|
+
organizationId: number;
|
|
96
|
+
controlCentreId?: number;
|
|
97
|
+
categoryId?: number;
|
|
98
|
+
typeId?: number;
|
|
99
|
+
priority?: IncidentPriority;
|
|
100
|
+
emergencyType?: IncidentEmergencyType;
|
|
101
|
+
zoneId?: number;
|
|
102
|
+
/** Resolve as at this instant (default now). */
|
|
103
|
+
at?: string;
|
|
104
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The operational lifecycle of an emergency (INCIDENT-class) incident, as
|
|
3
|
+
* milestones. Each is recorded once, with when it happened, who or what
|
|
4
|
+
* recorded it and from where; the incident's current stage is the latest one
|
|
5
|
+
* reached.
|
|
6
|
+
*
|
|
7
|
+
* This is deliberately NOT a second status machine. The incident's status
|
|
8
|
+
* (Received, In-Progress, Resolved, Closed...) is unchanged and still owned by
|
|
9
|
+
* the incident's own transitions; these milestones say how far the RESPONSE
|
|
10
|
+
* has got, which is what an emergency SLA measures.
|
|
11
|
+
*
|
|
12
|
+
* STABILIZING is the stage after the first unit's initial assessment is
|
|
13
|
+
* reported (the "stabilizing / responding" phase).
|
|
14
|
+
*/
|
|
15
|
+
export declare enum EmergencyIncidentStage {
|
|
16
|
+
INCIDENT_CREATED = "INCIDENT_CREATED",
|
|
17
|
+
ACKNOWLEDGED = "ACKNOWLEDGED",
|
|
18
|
+
TRIAGED = "TRIAGED",
|
|
19
|
+
DISPATCH_INITIATED = "DISPATCH_INITIATED",
|
|
20
|
+
RESPONSE_UNIT_ASSIGNED = "RESPONSE_UNIT_ASSIGNED",
|
|
21
|
+
RESPONSE_UNIT_ACCEPTED = "RESPONSE_UNIT_ACCEPTED",
|
|
22
|
+
EN_ROUTE = "EN_ROUTE",
|
|
23
|
+
ON_SCENE = "ON_SCENE",
|
|
24
|
+
STABILIZING = "STABILIZING",
|
|
25
|
+
RESOLVED = "RESOLVED",
|
|
26
|
+
CLOSED = "CLOSED"
|
|
27
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The emergency (INCIDENT-class) notifications - a namespace of their own,
|
|
3
|
+
* never the grievance templates. Each value names one message, rendered per
|
|
4
|
+
* channel by clarion-notification (`templates/incident/`).
|
|
5
|
+
*/
|
|
6
|
+
export declare enum EmergencyNotificationEvent {
|
|
7
|
+
EMERGENCY_CREATED = "emergency-created",
|
|
8
|
+
EMERGENCY_ACKNOWLEDGED = "emergency-acknowledged",
|
|
9
|
+
EMERGENCY_DISPATCHED = "emergency-dispatched",
|
|
10
|
+
EMERGENCY_UNIT_ASSIGNED = "emergency-unit-assigned",
|
|
11
|
+
EMERGENCY_UNIT_EN_ROUTE = "emergency-unit-en-route",
|
|
12
|
+
EMERGENCY_ARRIVED = "emergency-arrived",
|
|
13
|
+
EMERGENCY_AT_RISK = "emergency-at-risk",
|
|
14
|
+
EMERGENCY_SLA_BREACHED = "emergency-sla-breached",
|
|
15
|
+
EMERGENCY_ESCALATED = "emergency-escalated",
|
|
16
|
+
EMERGENCY_RESOLVED = "emergency-resolved",
|
|
17
|
+
EMERGENCY_CLOSED = "emergency-closed"
|
|
18
|
+
}
|
|
19
|
+
/** Who an emergency notification is addressed to. */
|
|
20
|
+
export declare enum EmergencyNotificationAudience {
|
|
21
|
+
REPORTER = "REPORTER",
|
|
22
|
+
DISPATCHER = "DISPATCHER",
|
|
23
|
+
SUPERVISOR = "SUPERVISOR",
|
|
24
|
+
DUTY_MANAGER = "DUTY_MANAGER",
|
|
25
|
+
ORGANIZATION_ADMIN = "ORGANIZATION_ADMIN"
|
|
26
|
+
}
|
|
27
|
+
/** clarion-notification's answer to one emergency notification request. */
|
|
28
|
+
export declare enum EmergencyNotificationResultStatus {
|
|
29
|
+
/** Every attempted delivery went out. */
|
|
30
|
+
SENT = "SENT",
|
|
31
|
+
/** Some deliveries went out, some failed. */
|
|
32
|
+
PARTIAL = "PARTIAL",
|
|
33
|
+
/** Nothing went out, though somebody should have received it. */
|
|
34
|
+
FAILED = "FAILED",
|
|
35
|
+
/** Nobody to deliver to (no recipients resolved, no contact configured). */
|
|
36
|
+
NOT_POSSIBLE = "NOT_POSSIBLE"
|
|
37
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a dispatched unit is predicted to make the arrival deadline, from its
|
|
3
|
+
* live position. UNCERTAIN is a first-class answer: a stale or missing position
|
|
4
|
+
* must never produce confidence the data does not support.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum EtaStatus {
|
|
7
|
+
/** Predicted arrival comfortably before the deadline. */
|
|
8
|
+
ON_TRACK = "ON_TRACK",
|
|
9
|
+
/** Predicted arrival inside the at-risk margin before the deadline. */
|
|
10
|
+
AT_RISK = "AT_RISK",
|
|
11
|
+
/** Predicted arrival after the deadline. */
|
|
12
|
+
LIKELY_BREACH = "LIKELY_BREACH",
|
|
13
|
+
/** No current position (stale, offline, never tracked, poor accuracy). */
|
|
14
|
+
UNCERTAIN = "UNCERTAIN",
|
|
15
|
+
/** The incident has no arrival target to compare with. */
|
|
16
|
+
NO_TARGET = "NO_TARGET",
|
|
17
|
+
/** The unit is on scene. */
|
|
18
|
+
ARRIVED = "ARRIVED"
|
|
19
|
+
}
|
|
20
|
+
/** How an ETA was worked out. */
|
|
21
|
+
export declare enum EtaBasis {
|
|
22
|
+
/** Straight-line distance x road factor at an assumed urban speed (clarion-gis's ESTIMATE profile). */
|
|
23
|
+
ESTIMATE = "ESTIMATE",
|
|
24
|
+
/** A road route with traffic from clarion-gis. */
|
|
25
|
+
ROAD_ROUTE = "ROAD_ROUTE"
|
|
26
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Why an emergency incident was closed. */
|
|
2
|
+
export declare enum IncidentClosureReason {
|
|
3
|
+
/** A control-room user closed it. */
|
|
4
|
+
MANUAL = "MANUAL",
|
|
5
|
+
/** The policy's resolution-to-closure period passed with nobody closing it. */
|
|
6
|
+
AUTO_CLOSED_AFTER_RESOLUTION_TIMEOUT = "AUTO_CLOSED_AFTER_RESOLUTION_TIMEOUT"
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* How a unit's arrival on scene came to be known. Kept apart on purpose: an
|
|
10
|
+
* arrival inferred from GPS is evidence, a responder's confirmation is a claim
|
|
11
|
+
* from the scene, and an auditor must be able to tell them apart.
|
|
12
|
+
*/
|
|
13
|
+
export declare enum IncidentArrivalSource {
|
|
14
|
+
ARRIVAL_CONFIRMED_BY_RESPONDER = "ARRIVAL_CONFIRMED_BY_RESPONDER",
|
|
15
|
+
ARRIVAL_CONFIRMED_BY_CONTROL_CENTRE = "ARRIVAL_CONFIRMED_BY_CONTROL_CENTRE",
|
|
16
|
+
ARRIVAL_INFERRED_FROM_TRACKING = "ARRIVAL_INFERRED_FROM_TRACKING"
|
|
17
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who an operational event came from. The workflow contract never assumes the
|
|
3
|
+
* control room is the source: today almost everything is CONTROL_CENTRE, and a
|
|
4
|
+
* responder app will send the same events as RESPONDER without any redesign.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum IncidentActorType {
|
|
7
|
+
/** A control-room user (dispatcher, supervisor, administrator). */
|
|
8
|
+
CONTROL_CENTRE = "CONTROL_CENTRE",
|
|
9
|
+
/** A responder, through the future responder app. */
|
|
10
|
+
RESPONDER = "RESPONDER",
|
|
11
|
+
/** The platform itself - the workflow, a timer, a lifecycle rule. Uses the system user. */
|
|
12
|
+
SYSTEM = "SYSTEM",
|
|
13
|
+
/** Inferred from live tracking (e.g. arrival in the geofence). */
|
|
14
|
+
TRACKING = "TRACKING",
|
|
15
|
+
/** The person who raised the incident. */
|
|
16
|
+
REPORTER = "REPORTER",
|
|
17
|
+
/** A third-party partner (e.g. an ambulance provider) through its integration. */
|
|
18
|
+
PARTNER = "PARTNER"
|
|
19
|
+
}
|
|
20
|
+
/** The channel an SLA event arrived through - recorded beside the actor for the audit trail. */
|
|
21
|
+
export declare enum IncidentSlaEventSource {
|
|
22
|
+
/** The admin's incident view or the gateway API, by a control-room user. */
|
|
23
|
+
CONTROL_ROOM = "CONTROL_ROOM",
|
|
24
|
+
/** Reserved: the responder app. */
|
|
25
|
+
RESPONDER_APP = "RESPONDER_APP",
|
|
26
|
+
/** clarion-workflow-manager's emergency incident workflow (timers, escalation, auto-close). */
|
|
27
|
+
WORKFLOW = "WORKFLOW",
|
|
28
|
+
/** clarion-incident's evaluation of live tracking positions. */
|
|
29
|
+
TRACKING = "TRACKING",
|
|
30
|
+
/** A change of the incident's own status (resolved, closed...). */
|
|
31
|
+
INCIDENT_LIFECYCLE = "INCIDENT_LIFECYCLE",
|
|
32
|
+
/** A response-unit dispatch record (created, acknowledged, en route, on scene...). */
|
|
33
|
+
DISPATCH = "DISPATCH",
|
|
34
|
+
/** A third-party partner's progress (partner routing). */
|
|
35
|
+
PARTNER = "PARTNER",
|
|
36
|
+
/** clarion-notification reporting a delivery. */
|
|
37
|
+
NOTIFICATION = "NOTIFICATION",
|
|
38
|
+
/** Anything else the platform does on its own (initialisation, reconciliation). */
|
|
39
|
+
SYSTEM = "SYSTEM"
|
|
40
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Machine-readable `code` on a refused SLA request. */
|
|
2
|
+
export declare enum IncidentSlaErrorCode {
|
|
3
|
+
/** Grievances, alerts that never reach the control room, and incidents with SLA switched off. */
|
|
4
|
+
SLA_NOT_TRACKED = "SLA_NOT_TRACKED",
|
|
5
|
+
SLA_INSTANCE_NOT_FOUND = "SLA_INSTANCE_NOT_FOUND",
|
|
6
|
+
SLA_PAUSE_NOT_FOUND = "SLA_PAUSE_NOT_FOUND",
|
|
7
|
+
SLA_POLICY_NOT_FOUND = "SLA_POLICY_NOT_FOUND",
|
|
8
|
+
/** The instance is not in a state that allows this (e.g. pausing a breached one). */
|
|
9
|
+
SLA_INVALID_STATE = "SLA_INVALID_STATE",
|
|
10
|
+
/** Approving needs a supervisor (Control-Centre:Admin, Organization Owner/Admin). */
|
|
11
|
+
SLA_APPROVER_REQUIRED = "SLA_APPROVER_REQUIRED",
|
|
12
|
+
/** Somebody may not approve their own request. */
|
|
13
|
+
SLA_SELF_APPROVAL = "SLA_SELF_APPROVAL",
|
|
14
|
+
SLA_POLICY_INVALID = "SLA_POLICY_INVALID",
|
|
15
|
+
/** Only Super-Admin manages platform policies; an organization manages its own. */
|
|
16
|
+
SLA_POLICY_FORBIDDEN = "SLA_POLICY_FORBIDDEN",
|
|
17
|
+
INCIDENT_NOT_EMERGENCY = "INCIDENT_NOT_EMERGENCY",
|
|
18
|
+
INCIDENT_ENDED = "INCIDENT_ENDED",
|
|
19
|
+
/** No escalation rule with that key in the incident's frozen policy. */
|
|
20
|
+
SLA_ESCALATION_RULE_NOT_FOUND = "SLA_ESCALATION_RULE_NOT_FOUND"
|
|
21
|
+
}
|