clarion-shared-types 1.0.115 → 1.0.117

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.
Files changed (74) hide show
  1. package/dist/cjs/index.js +2 -0
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-enums.js +137 -0
  4. package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-enums.js.map +1 -0
  5. package/dist/cjs/modules/dispatch/index.js +23 -0
  6. package/dist/cjs/modules/dispatch/index.js.map +1 -0
  7. package/dist/cjs/modules/dispatch/interfaces/response-unit-dispatch.dto.js +3 -0
  8. package/dist/cjs/modules/dispatch/interfaces/response-unit-dispatch.dto.js.map +1 -0
  9. package/dist/cjs/modules/dispatch/utils/response-unit-dispatch-display.util.js +202 -0
  10. package/dist/cjs/modules/dispatch/utils/response-unit-dispatch-display.util.js.map +1 -0
  11. package/dist/cjs/modules/incident/enums/incident-actions.enum.js +6 -0
  12. package/dist/cjs/modules/incident/enums/incident-actions.enum.js.map +1 -1
  13. package/dist/cjs/modules/incident-sla/enums/incident-sla-enums.js +225 -0
  14. package/dist/cjs/modules/incident-sla/enums/incident-sla-enums.js.map +1 -0
  15. package/dist/cjs/modules/incident-sla/index.js +23 -0
  16. package/dist/cjs/modules/incident-sla/index.js.map +1 -0
  17. package/dist/cjs/modules/incident-sla/interfaces/incident-sla.dto.js +3 -0
  18. package/dist/cjs/modules/incident-sla/interfaces/incident-sla.dto.js.map +1 -0
  19. package/dist/cjs/modules/incident-sla/utils/incident-sla-display.util.js +250 -0
  20. package/dist/cjs/modules/incident-sla/utils/incident-sla-display.util.js.map +1 -0
  21. package/dist/cjs/modules/permission/enums/permission-actions.enum.js +14 -0
  22. package/dist/cjs/modules/permission/enums/permission-actions.enum.js.map +1 -1
  23. package/dist/cjs/modules/permission/enums/permissions-moudule.enum.js +2 -0
  24. package/dist/cjs/modules/permission/enums/permissions-moudule.enum.js.map +1 -1
  25. package/dist/cjs/modules/response-unit/enums/response-unit/response-capability.enum.js +28 -0
  26. package/dist/cjs/modules/response-unit/enums/response-unit/response-capability.enum.js.map +1 -0
  27. package/dist/cjs/modules/response-unit/index.js +1 -0
  28. package/dist/cjs/modules/response-unit/index.js.map +1 -1
  29. package/dist/esm/index.js +2 -0
  30. package/dist/esm/index.js.map +1 -1
  31. package/dist/esm/modules/dispatch/enums/response-unit-dispatch-enums.js +134 -0
  32. package/dist/esm/modules/dispatch/enums/response-unit-dispatch-enums.js.map +1 -0
  33. package/dist/esm/modules/dispatch/index.js +7 -0
  34. package/dist/esm/modules/dispatch/index.js.map +1 -0
  35. package/dist/esm/modules/dispatch/interfaces/response-unit-dispatch.dto.js +2 -0
  36. package/dist/esm/modules/dispatch/interfaces/response-unit-dispatch.dto.js.map +1 -0
  37. package/dist/esm/modules/dispatch/utils/response-unit-dispatch-display.util.js +192 -0
  38. package/dist/esm/modules/dispatch/utils/response-unit-dispatch-display.util.js.map +1 -0
  39. package/dist/esm/modules/incident/enums/incident-actions.enum.js +6 -0
  40. package/dist/esm/modules/incident/enums/incident-actions.enum.js.map +1 -1
  41. package/dist/esm/modules/incident-sla/enums/incident-sla-enums.js +222 -0
  42. package/dist/esm/modules/incident-sla/enums/incident-sla-enums.js.map +1 -0
  43. package/dist/esm/modules/incident-sla/index.js +7 -0
  44. package/dist/esm/modules/incident-sla/index.js.map +1 -0
  45. package/dist/esm/modules/incident-sla/interfaces/incident-sla.dto.js +2 -0
  46. package/dist/esm/modules/incident-sla/interfaces/incident-sla.dto.js.map +1 -0
  47. package/dist/esm/modules/incident-sla/utils/incident-sla-display.util.js +239 -0
  48. package/dist/esm/modules/incident-sla/utils/incident-sla-display.util.js.map +1 -0
  49. package/dist/esm/modules/permission/enums/permission-actions.enum.js +14 -0
  50. package/dist/esm/modules/permission/enums/permission-actions.enum.js.map +1 -1
  51. package/dist/esm/modules/permission/enums/permissions-moudule.enum.js +2 -0
  52. package/dist/esm/modules/permission/enums/permissions-moudule.enum.js.map +1 -1
  53. package/dist/esm/modules/response-unit/enums/response-unit/response-capability.enum.js +25 -0
  54. package/dist/esm/modules/response-unit/enums/response-unit/response-capability.enum.js.map +1 -0
  55. package/dist/esm/modules/response-unit/index.js +1 -0
  56. package/dist/esm/modules/response-unit/index.js.map +1 -1
  57. package/dist/types/index.d.ts +2 -0
  58. package/dist/types/modules/dispatch/enums/response-unit-dispatch-enums.d.ts +113 -0
  59. package/dist/types/modules/dispatch/index.d.ts +3 -0
  60. package/dist/types/modules/dispatch/interfaces/response-unit-dispatch.dto.d.ts +170 -0
  61. package/dist/types/modules/dispatch/utils/response-unit-dispatch-display.util.d.ts +30 -0
  62. package/dist/types/modules/incident/enums/incident-actions.enum.d.ts +6 -0
  63. package/dist/types/modules/incident/intefaces/incident-category.d.ts +6 -0
  64. package/dist/types/modules/incident/intefaces/incident-type.d.ts +6 -0
  65. package/dist/types/modules/incident-sla/enums/incident-sla-enums.d.ts +196 -0
  66. package/dist/types/modules/incident-sla/index.d.ts +3 -0
  67. package/dist/types/modules/incident-sla/interfaces/incident-sla.dto.d.ts +286 -0
  68. package/dist/types/modules/incident-sla/utils/incident-sla-display.util.d.ts +38 -0
  69. package/dist/types/modules/permission/enums/permission-actions.enum.d.ts +9 -0
  70. package/dist/types/modules/permission/enums/permissions-moudule.enum.d.ts +3 -1
  71. package/dist/types/modules/response-unit/enums/response-unit/response-capability.enum.d.ts +22 -0
  72. package/dist/types/modules/response-unit/index.d.ts +1 -0
  73. package/dist/types/modules/response-unit/interfaces/response-unit/response-unit.d.ts +3 -0
  74. package/package.json +45 -45
@@ -0,0 +1,286 @@
1
+ import { IncidentEmergencyType } from '../../incident/enums/incident-emergency-type.enum';
2
+ import { IncidentPriority } from '../../incident/enums/incident-priority.enum';
3
+ import { EmergencyIncidentStage, EtaBasis, EtaStatus, IncidentActorType, IncidentArrivalSource, IncidentClosureReason, IncidentSlaEventSource, IncidentSlaEventType, IncidentSlaStage, IncidentSlaStatus, SlaEscalationLevel, SlaEscalationTrigger, SlaExceptionReason, SlaExceptionStatus, SlaOverallState, SlaPauseReason, SlaPauseStatus, SlaPolicyScope, SlaPriorityLevel } from '../enums/incident-sla-enums';
4
+ export interface IncidentSlaExceptionDto {
5
+ status: SlaExceptionStatus;
6
+ reason: SlaExceptionReason | null;
7
+ note: string | null;
8
+ requestedBy: number | null;
9
+ requestedAt: string | null;
10
+ decidedBy: number | null;
11
+ decidedAt: string | null;
12
+ decisionNote: string | null;
13
+ }
14
+ export interface IncidentSlaInstanceDto {
15
+ id: number;
16
+ stage: IncidentSlaStage;
17
+ cycle: number;
18
+ responseUnitDispatchId: number | null;
19
+ responseUnitId: number | null;
20
+ responseUnitName: string | null;
21
+ priority: IncidentPriority;
22
+ status: IncidentSlaStatus;
23
+ targetSeconds: number | null;
24
+ startedAt: string | null;
25
+ deadlineAt: string | null;
26
+ originalDeadlineAt: string | null;
27
+ warningAt: string | null;
28
+ atRiskAt: string | null;
29
+ warnedAt: string | null;
30
+ atRiskSince: string | null;
31
+ breachedAt: string | null;
32
+ completedAt: string | null;
33
+ endedAt: string | null;
34
+ endReason: string | null;
35
+ pausedAt: string | null;
36
+ totalPausedSeconds: number;
37
+ elapsedSeconds: number | null;
38
+ remainingSeconds: number | null;
39
+ overdueSeconds: number | null;
40
+ exception: IncidentSlaExceptionDto | null;
41
+ waivedBy: number | null;
42
+ waivedAt: string | null;
43
+ waiveReason: string | null;
44
+ slaPolicyId: number | null;
45
+ slaPolicyVersion: number | null;
46
+ }
47
+ export type IncidentSlaTimelineState = 'DONE' | 'CURRENT' | 'PENDING' | 'SKIPPED';
48
+ export interface IncidentSlaTimelineItemDto {
49
+ milestone: EmergencyIncidentStage;
50
+ state: IncidentSlaTimelineState;
51
+ at: string | null;
52
+ implied: boolean;
53
+ actorType: IncidentActorType | null;
54
+ source: IncidentSlaEventSource | null;
55
+ stage: IncidentSlaStage | null;
56
+ slaStatus: IncidentSlaStatus | null;
57
+ targetAt: string | null;
58
+ etaAt: string | null;
59
+ arrivalSource: IncidentArrivalSource | null;
60
+ }
61
+ export interface IncidentSlaStatsDto {
62
+ total: number;
63
+ decided: number;
64
+ met: number;
65
+ breached: number;
66
+ breachedWithApprovedException: number;
67
+ open: number;
68
+ warnings: number;
69
+ atRisk: number;
70
+ compliancePercent: number | null;
71
+ complianceWithExceptionsPercent: number | null;
72
+ }
73
+ export interface IncidentEtaDto {
74
+ dispatchId: number;
75
+ responseUnitId: number;
76
+ responseUnitName: string | null;
77
+ status: EtaStatus;
78
+ etaSeconds: number | null;
79
+ predictedArrivalAt: string | null;
80
+ distanceMetres: number | null;
81
+ basis: EtaBasis | null;
82
+ computedAt: string | null;
83
+ lastLocationAt: string | null;
84
+ locationAgeSeconds: number | null;
85
+ arrivalDeadlineAt: string | null;
86
+ }
87
+ export interface IncidentSlaPauseDto {
88
+ id: number;
89
+ instanceId: number;
90
+ stage: IncidentSlaStage;
91
+ reason: SlaPauseReason;
92
+ note: string | null;
93
+ status: SlaPauseStatus;
94
+ requestedBy: number | null;
95
+ requestedAt: string;
96
+ decidedBy: number | null;
97
+ decidedAt: string | null;
98
+ decisionNote: string | null;
99
+ startedAt: string | null;
100
+ endedAt: string | null;
101
+ pausedSeconds: number;
102
+ }
103
+ export interface IncidentSlaAlternativeDto {
104
+ responseUnitId: number;
105
+ responseUnitName: string | null;
106
+ distanceMetres: number | null;
107
+ etaSeconds: number | null;
108
+ trigger: SlaEscalationTrigger;
109
+ forDispatchId: number | null;
110
+ recommendedAt: string;
111
+ }
112
+ export interface IncidentSlaAllowedActionsDto {
113
+ acknowledge: boolean;
114
+ triage: boolean;
115
+ recordAssessment: boolean;
116
+ requestPause: boolean;
117
+ approvePause: boolean;
118
+ endPause: boolean;
119
+ requestException: boolean;
120
+ approveException: boolean;
121
+ waive: boolean;
122
+ }
123
+ export interface IncidentSlaClosureDto {
124
+ resolvedAt: string | null;
125
+ closedAt: string | null;
126
+ closureReason: IncidentClosureReason | null;
127
+ closedBy: number | null;
128
+ autoCloseEnabled: boolean;
129
+ autoCloseAt: string | null;
130
+ }
131
+ export interface IncidentSlaContributingPolicyDto {
132
+ policyId: number;
133
+ policyKey: string;
134
+ version: number;
135
+ name: string;
136
+ scope: SlaPolicyScope;
137
+ }
138
+ export interface IncidentSlaPolicyReferenceDto {
139
+ id: number | null;
140
+ key: string | null;
141
+ version: number | null;
142
+ name: string;
143
+ scope: SlaPolicyScope;
144
+ contributingPolicies: IncidentSlaContributingPolicyDto[];
145
+ }
146
+ /** `GET /api/incidents/:id/sla`. */
147
+ export interface IncidentSlaSummaryDto {
148
+ incidentId: number;
149
+ tracked: boolean;
150
+ notTrackedReason: string | null;
151
+ serverTime: string;
152
+ priority: IncidentPriority | null;
153
+ priorityLevel: SlaPriorityLevel | null;
154
+ policy: IncidentSlaPolicyReferenceDto | null;
155
+ overall: SlaOverallState;
156
+ currentStage: EmergencyIncidentStage | null;
157
+ currentInstance: IncidentSlaInstanceDto | null;
158
+ instances: IncidentSlaInstanceDto[];
159
+ timeline: IncidentSlaTimelineItemDto[];
160
+ stats: IncidentSlaStatsDto;
161
+ etas: IncidentEtaDto[];
162
+ primaryEta: IncidentEtaDto | null;
163
+ pauses: IncidentSlaPauseDto[];
164
+ alternative: IncidentSlaAlternativeDto | null;
165
+ closure: IncidentSlaClosureDto;
166
+ allowedActions: IncidentSlaAllowedActionsDto;
167
+ workflowId: string | null;
168
+ }
169
+ /** One row of `GET /api/incidents/:id/sla/events`. */
170
+ export interface IncidentSlaEventDto {
171
+ id: number;
172
+ eventType: IncidentSlaEventType;
173
+ stage: IncidentSlaStage | null;
174
+ cycle: number | null;
175
+ instanceId: number | null;
176
+ milestone: EmergencyIncidentStage | null;
177
+ fromStatus: IncidentSlaStatus | null;
178
+ toStatus: IncidentSlaStatus | null;
179
+ actorUserId: number | null;
180
+ actorType: IncidentActorType;
181
+ source: IncidentSlaEventSource;
182
+ reason: string | null;
183
+ note: string | null;
184
+ metadata: Record<string, unknown> | null;
185
+ correlationId: string | null;
186
+ workflowId: string | null;
187
+ occurredAt: string;
188
+ recordedAt: string;
189
+ }
190
+ export interface IncidentSlaEventPageDto {
191
+ data: IncidentSlaEventDto[];
192
+ total: number;
193
+ page: number;
194
+ limit: number;
195
+ }
196
+ /** Bodies of the SLA write routes. */
197
+ export interface TriageEmergencyIncidentRequest {
198
+ priority?: IncidentPriority;
199
+ note?: string;
200
+ }
201
+ export interface RequestSlaPauseRequest {
202
+ reason: SlaPauseReason;
203
+ note?: string;
204
+ instanceIds?: number[];
205
+ }
206
+ export interface RequestSlaExceptionRequest {
207
+ reason: SlaExceptionReason;
208
+ note: string;
209
+ }
210
+ /** A stored SLA policy version (`GET /api/incident-sla/policies`). */
211
+ export interface IncidentSlaPolicyDto {
212
+ id: number;
213
+ policyKey: string;
214
+ version: number;
215
+ name: string;
216
+ description: string | null;
217
+ scope: SlaPolicyScope;
218
+ organizationId: number | null;
219
+ controlCentreId: number | null;
220
+ categoryId: number | null;
221
+ typeId: number | null;
222
+ priority: IncidentPriority | null;
223
+ zoneId: number | null;
224
+ incidentClass: string;
225
+ effectiveFrom: string;
226
+ effectiveTo: string | null;
227
+ active: boolean;
228
+ settings: Record<string, number | boolean>;
229
+ priorityFloors: Partial<Record<IncidentEmergencyType, IncidentPriority>> | null;
230
+ startAnchors: Partial<Record<IncidentSlaStage, EmergencyIncidentStage>> | null;
231
+ targets: {
232
+ stage: IncidentSlaStage;
233
+ priority: IncidentPriority;
234
+ targetSeconds: number | null;
235
+ }[];
236
+ escalationRules: {
237
+ key: string;
238
+ trigger: SlaEscalationTrigger;
239
+ stages: IncidentSlaStage[];
240
+ priorities: IncidentPriority[];
241
+ level: SlaEscalationLevel;
242
+ channels: string[];
243
+ actions: string[];
244
+ delaySeconds: number;
245
+ recipientRoles: string[];
246
+ contacts: {
247
+ name?: string | null;
248
+ phoneNumber?: string | null;
249
+ email?: string | null;
250
+ }[];
251
+ }[] | null;
252
+ usageCount?: number;
253
+ createdBy: number | null;
254
+ updatedBy: number | null;
255
+ createdAt: string;
256
+ updatedAt: string;
257
+ }
258
+ export interface IncidentSlaDurationPercentilesDto {
259
+ p50: number | null;
260
+ p75: number | null;
261
+ p90: number | null;
262
+ p95: number | null;
263
+ p99: number | null;
264
+ average: number | null;
265
+ }
266
+ export interface IncidentSlaStageAnalyticsDto {
267
+ stage: IncidentSlaStage;
268
+ instances: number;
269
+ met: number;
270
+ breached: number;
271
+ breachedWithApprovedException: number;
272
+ compliancePercent: number | null;
273
+ complianceWithExceptionsPercent: number | null;
274
+ duration: IncidentSlaDurationPercentilesDto;
275
+ }
276
+ /** `GET /api/incident-sla/analytics`. */
277
+ export interface IncidentSlaAnalyticsDto {
278
+ from: string;
279
+ to: string;
280
+ organizationId: number | null;
281
+ controlCentreId: number | null;
282
+ incidents: number;
283
+ breachedIncidents: number;
284
+ stages: IncidentSlaStageAnalyticsDto[];
285
+ generatedAt: string;
286
+ }
@@ -0,0 +1,38 @@
1
+ import { EmergencyIncidentStage, EtaStatus, IncidentActorType, IncidentArrivalSource, IncidentSlaEventType, IncidentSlaStage, IncidentSlaStatus, SlaExceptionReason, SlaExceptionStatus, SlaOverallState, SlaPauseReason } from '../enums/incident-sla-enums';
2
+ import { IncidentSlaInstanceDto } from '../interfaces/incident-sla.dto';
3
+ /** A Clarion colour family: bg-light-{tone} text-{tone}. */
4
+ export type SlaTone = 'success' | 'info' | 'warning' | 'error' | 'grey' | 'primary' | 'accent';
5
+ export declare const INCIDENT_SLA_STAGE_LABELS: Readonly<Record<IncidentSlaStage, string>>;
6
+ export declare const INCIDENT_SLA_STATUS_LABELS: Readonly<Record<IncidentSlaStatus, string>>;
7
+ export declare const SLA_OVERALL_STATE_LABELS: Readonly<Record<SlaOverallState, string>>;
8
+ export declare const EMERGENCY_INCIDENT_STAGE_LABELS: Readonly<Record<EmergencyIncidentStage, string>>;
9
+ export declare const SLA_PAUSE_REASON_LABELS: Readonly<Record<SlaPauseReason, string>>;
10
+ export declare const SLA_EXCEPTION_REASON_LABELS: Readonly<Record<SlaExceptionReason, string>>;
11
+ export declare const SLA_EXCEPTION_STATUS_LABELS: Readonly<Record<SlaExceptionStatus, string>>;
12
+ export declare const ETA_STATUS_LABELS: Readonly<Record<EtaStatus, string>>;
13
+ export declare const INCIDENT_ARRIVAL_SOURCE_LABELS: Readonly<Record<IncidentArrivalSource, string>>;
14
+ export declare const INCIDENT_ACTOR_TYPE_LABELS: Readonly<Record<IncidentActorType, string>>;
15
+ export declare const INCIDENT_SLA_EVENT_TYPE_LABELS: Readonly<Record<IncidentSlaEventType, string>>;
16
+ /** The colour of an instance's status chip. */
17
+ export declare function incidentSlaStatusTone(status: IncidentSlaStatus | string | null | undefined, exceptionStatus?: SlaExceptionStatus | string | null): SlaTone;
18
+ export declare function slaOverallStateTone(state: SlaOverallState | string | null | undefined): SlaTone;
19
+ export declare function etaStatusTone(status: EtaStatus | string | null | undefined): SlaTone;
20
+ /** "01:12", "12:05", "1:05:00", and overdue as "+00:45". */
21
+ export declare function formatSlaClock(seconds: number | null | undefined): string;
22
+ /** "15 sec", "2 min", "1 h 30 min", "1 d 2 h". */
23
+ export declare function formatSlaTarget(seconds: number | null | undefined): string;
24
+ /**
25
+ * Seconds left on an instance at the browser's `nowMs`, corrected for the
26
+ * difference between the server's clock and the browser's (`skewMs` = server -
27
+ * browser, measured when the summary arrived). Null when its clock is not
28
+ * running. Display only - the server decides every transition.
29
+ */
30
+ export declare function liveRemainingSeconds(instance: Pick<IncidentSlaInstanceDto, 'status' | 'deadlineAt'>, nowMs: number, skewMs?: number): number | null;
31
+ /**
32
+ * The status an open instance shows at `nowMs`: what the server said, or the
33
+ * next threshold if the clock has passed it since (the server's own event
34
+ * follows within seconds). Never goes backwards.
35
+ */
36
+ export declare function liveIncidentSlaStatus(instance: Pick<IncidentSlaInstanceDto, 'status' | 'warningAt' | 'atRiskAt' | 'deadlineAt' | 'completedAt'>, nowMs: number, skewMs?: number): IncidentSlaStatus;
37
+ /** Statuses whose clock is running (or paused). */
38
+ export declare function isOpenIncidentSlaStatus(status: IncidentSlaStatus | string | null | undefined): boolean;
@@ -53,6 +53,9 @@ export declare enum PermissionActions {
53
53
  READ_TRACKING_HISTORY = "read:tracking-history",
54
54
  READ_TRACKING_OPERATIONS = "read:tracking-operations",
55
55
  MANAGE_TRACKING_OPERATIONS = "manage:tracking-operations",
56
+ READ_RESPONSE_UNIT_DISPATCH = "read:response-unit-dispatch",
57
+ CREATE_RESPONSE_UNIT_DISPATCH = "create:response-unit-dispatch",
58
+ UPDATE_RESPONSE_UNIT_DISPATCH = "update:response-unit-dispatch",
56
59
  CREATE_SUPPORT_TICKET = "create:support-ticket",
57
60
  READ_SUPPORT_TICKET = "read:support-ticket",
58
61
  UPDATE_SUPPORT_TICKET = "update:support-ticket",
@@ -190,6 +193,12 @@ export declare enum PermissionActions {
190
193
  READ_FOLLOW_ME = "read:follow-me",
191
194
  TRACK_FOLLOW_ME = "track:follow-me",
192
195
  MANAGE_SAVED_PLACE = "manage:saved-place",
196
+ READ_INCIDENT_SLA = "read:incident-sla",
197
+ UPDATE_INCIDENT_SLA = "update:incident-sla",
198
+ APPROVE_INCIDENT_SLA = "approve:incident-sla",
199
+ READ_INCIDENT_SLA_POLICY = "read:incident-sla-policy",
200
+ MANAGE_INCIDENT_SLA_POLICY = "manage:incident-sla-policy",
201
+ READ_INCIDENT_SLA_ANALYTICS = "read:incident-sla-analytics",
193
202
  /** @deprecated Retiring: split into the connection / message / screened-message / analytics actions. */
194
203
  READ_ALERT_INTAKE = "read:alert-intake",
195
204
  /** @deprecated Retiring: split into the connection / message / screened-message / analytics actions. */
@@ -8,11 +8,13 @@ export declare enum PermissionsModule {
8
8
  INCIDENT = "Grievance",
9
9
  RESPONSE_UNIT = "Response Unit",
10
10
  TRACKING = "Tracking",
11
+ RESPONSE_UNIT_DISPATCH = "Response Unit Dispatch",
11
12
  BILLING = "Billing",
12
13
  NEWSFEED = "Newsfeed",
13
14
  SUPPORT = "Support",
14
15
  NOTIFICATION = "Notification",
15
16
  ALERT_INTAKE = "Alert Intake",
16
17
  SAFETY = "Safety",
17
- PLACES = "Places"
18
+ PLACES = "Places",
19
+ INCIDENT_SLA = "Incident SLA"
18
20
  }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * What kind of emergency a response unit can answer. Mirrors
3
+ * grm-shared-library's ResponseCapability.
4
+ *
5
+ * A unit with no configured capabilities is treated as having what its type
6
+ * implies (an ambulance is MEDICAL_RESPONSE, a security vehicle
7
+ * SECURITY_RESPONSE), so configuring them is only needed where a unit differs
8
+ * from its type.
9
+ */
10
+ export declare enum ResponseCapability {
11
+ MEDICAL_RESPONSE = "MEDICAL_RESPONSE",
12
+ SECURITY_RESPONSE = "SECURITY_RESPONSE",
13
+ FIRE_RESPONSE = "FIRE_RESPONSE",
14
+ ROADSIDE_ASSISTANCE = "ROADSIDE_ASSISTANCE"
15
+ }
16
+ /** Can a unit be sent right now - from its manual status and its active dispatches. */
17
+ export declare enum ResponseUnitAvailability {
18
+ AVAILABLE = "AVAILABLE",
19
+ ENGAGED = "ENGAGED",
20
+ UNAVAILABLE = "UNAVAILABLE",
21
+ INACTIVE = "INACTIVE"
22
+ }
@@ -10,6 +10,7 @@ export * from './interfaces/vehicle-unit/vehicle-type/security-vehicle';
10
10
  export * from './interfaces/vehicle-unit/vehicle-type/fire-vehicle';
11
11
  export * from './interfaces/vehicle-unit/vehicle-type/road-rescue-vehicle';
12
12
  export * from './enums/response-unit/response-unit-type.enum';
13
+ export * from './enums/response-unit/response-capability.enum';
13
14
  export * from './enums/person-unit/person-unit-category.enum';
14
15
  export * from './enums/person-unit/person-unit-status.enum';
15
16
  export * from './enums/vehicle-unit/vehicle-unit-ownership.enum';
@@ -1,5 +1,6 @@
1
1
  import { MapAddress, MapLocation } from "../../../common";
2
2
  import { ResponseUnitType } from "../../enums/response-unit/response-unit-type.enum";
3
+ import { ResponseCapability } from "../../enums/response-unit/response-capability.enum";
3
4
  export interface ResponseUnit {
4
5
  id: number;
5
6
  name: string;
@@ -11,6 +12,8 @@ export interface ResponseUnit {
11
12
  name: string;
12
13
  address: MapAddress;
13
14
  };
15
+ /** Configured capabilities; empty = derived from the unit's type. */
16
+ capabilities?: ResponseCapability[];
14
17
  controlCentreId: number;
15
18
  organizationId: number;
16
19
  createdAt?: Date;
package/package.json CHANGED
@@ -1,45 +1,45 @@
1
- {
2
- "name": "clarion-shared-types",
3
- "version": "1.0.115",
4
- "main": "dist/cjs/index.js",
5
- "module": "dist/esm/index.js",
6
- "types": "dist/types/index.d.ts",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/types/index.d.ts",
10
- "import": "./dist/esm/index.js",
11
- "require": "./dist/cjs/index.js"
12
- },
13
- "./dist/modules/*": {
14
- "types": "./dist/types/modules/*.d.ts",
15
- "import": "./dist/esm/modules/*.js",
16
- "require": "./dist/cjs/modules/*.js"
17
- }
18
- },
19
- "files": [
20
- "dist/**/*"
21
- ],
22
- "scripts": {
23
- "clean": "rimraf dist dist-test",
24
- "build:cjs": "tsc -p tsconfig.cjs.json",
25
- "build:esm": "tsc -p tsconfig.esm.json",
26
- "build:types": "tsc -p tsconfig.types.json",
27
- "build": "npm run clean && npm run build:types && npm run build:cjs && npm run build:esm",
28
- "prepublishOnly": "npm run build",
29
- "pretest": "rimraf dist-test",
30
- "test": "tsc -p tsconfig.spec.json && node --test \"dist-test/**/*.spec.js\""
31
- },
32
- "keywords": [],
33
- "author": "vince_lawino",
34
- "license": "ISC",
35
- "description": "",
36
- "publishConfig": {
37
- "access": "public"
38
- },
39
- "devDependencies": {
40
- "@types/geojson": "^7946.0.16",
41
- "@types/node": "^20.11.2",
42
- "rimraf": "^5.0.5",
43
- "typescript": "^5.7.3"
44
- }
45
- }
1
+ {
2
+ "name": "clarion-shared-types",
3
+ "version": "1.0.117",
4
+ "main": "dist/cjs/index.js",
5
+ "module": "dist/esm/index.js",
6
+ "types": "dist/types/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/types/index.d.ts",
10
+ "import": "./dist/esm/index.js",
11
+ "require": "./dist/cjs/index.js"
12
+ },
13
+ "./dist/modules/*": {
14
+ "types": "./dist/types/modules/*.d.ts",
15
+ "import": "./dist/esm/modules/*.js",
16
+ "require": "./dist/cjs/modules/*.js"
17
+ }
18
+ },
19
+ "files": [
20
+ "dist/**/*"
21
+ ],
22
+ "scripts": {
23
+ "clean": "rimraf dist dist-test",
24
+ "build:cjs": "tsc -p tsconfig.cjs.json",
25
+ "build:esm": "tsc -p tsconfig.esm.json",
26
+ "build:types": "tsc -p tsconfig.types.json",
27
+ "build": "npm run clean && npm run build:types && npm run build:cjs && npm run build:esm",
28
+ "prepublishOnly": "npm run build",
29
+ "pretest": "rimraf dist-test",
30
+ "test": "tsc -p tsconfig.spec.json && node --test \"dist-test/**/*.spec.js\""
31
+ },
32
+ "keywords": [],
33
+ "author": "vince_lawino",
34
+ "license": "ISC",
35
+ "description": "",
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "devDependencies": {
40
+ "@types/geojson": "^7946.0.16",
41
+ "@types/node": "^20.11.2",
42
+ "rimraf": "^5.0.5",
43
+ "typescript": "^5.7.3"
44
+ }
45
+ }