grm-shared-library 1.1.236 → 1.1.238
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 -345
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/kafka/topics.js +21 -0
- package/dist/cjs/kafka/topics.js.map +1 -1
- package/dist/cjs/modules/dispatch/constants/response-unit-dispatch-defaults.const.js +56 -0
- package/dist/cjs/modules/dispatch/constants/response-unit-dispatch-defaults.const.js.map +1 -0
- package/dist/cjs/modules/dispatch/constants/response-unit-dispatch-kafka.const.js +21 -0
- package/dist/cjs/modules/dispatch/constants/response-unit-dispatch-kafka.const.js.map +1 -0
- package/dist/cjs/modules/dispatch/dtos/dispatch-response-unit.dto.js +58 -0
- package/dist/cjs/modules/dispatch/dtos/dispatch-response-unit.dto.js.map +1 -0
- package/dist/cjs/modules/dispatch/dtos/response-unit-dispatch-notification.dto.js +235 -0
- package/dist/cjs/modules/dispatch/dtos/response-unit-dispatch-notification.dto.js.map +1 -0
- package/dist/cjs/modules/dispatch/dtos/response-unit-dispatch-profile-query.dto.js +61 -0
- package/dist/cjs/modules/dispatch/dtos/response-unit-dispatch-profile-query.dto.js.map +1 -0
- package/dist/cjs/modules/dispatch/dtos/response-unit-nearby-query.dto.js +66 -0
- package/dist/cjs/modules/dispatch/dtos/response-unit-nearby-query.dto.js.map +1 -0
- package/dist/cjs/modules/dispatch/dtos/update-response-unit-dispatch-status.dto.js +42 -0
- package/dist/cjs/modules/dispatch/dtos/update-response-unit-dispatch-status.dto.js.map +1 -0
- package/dist/cjs/modules/dispatch/enums/incident-dispatch-blocker.enum.js +21 -0
- package/dist/cjs/modules/dispatch/enums/incident-dispatch-blocker.enum.js.map +1 -0
- package/dist/cjs/modules/dispatch/enums/response-capability-requirement-source.enum.js +12 -0
- package/dist/cjs/modules/dispatch/enums/response-capability-requirement-source.enum.js.map +1 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-capability-match.enum.js +24 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-capability-match.enum.js.map +1 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-constraint.enum.js +34 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-constraint.enum.js.map +1 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-error-code.enum.js +26 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-error-code.enum.js.map +1 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-notification-failure.enum.js +18 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-notification-failure.enum.js.map +1 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-notification-status.enum.js +16 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-notification-status.enum.js.map +1 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-status.enum.js +39 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-status.enum.js.map +1 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-transition-source.enum.js +18 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-transition-source.enum.js.map +1 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-distance-basis.enum.js +12 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-distance-basis.enum.js.map +1 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-location-freshness.enum.js +21 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-location-freshness.enum.js.map +1 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-location-source.enum.js +17 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-location-source.enum.js.map +1 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-recommendation-reason.enum.js +25 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-recommendation-reason.enum.js.map +1 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-recommendation-status.enum.js +23 -0
- package/dist/cjs/modules/dispatch/enums/response-unit-recommendation-status.enum.js.map +1 -0
- package/dist/cjs/modules/dispatch/index.js +53 -0
- package/dist/cjs/modules/dispatch/index.js.map +1 -0
- package/dist/cjs/modules/dispatch/interfaces/incident-response-unit-dispatch.js +3 -0
- package/dist/cjs/modules/dispatch/interfaces/incident-response-unit-dispatch.js.map +1 -0
- package/dist/cjs/modules/dispatch/interfaces/response-unit-dispatch-events.js +3 -0
- package/dist/cjs/modules/dispatch/interfaces/response-unit-dispatch-events.js.map +1 -0
- package/dist/cjs/modules/dispatch/interfaces/response-unit-dispatch-profile.js +3 -0
- package/dist/cjs/modules/dispatch/interfaces/response-unit-dispatch-profile.js.map +1 -0
- package/dist/cjs/modules/dispatch/interfaces/response-unit-proximity.js +3 -0
- package/dist/cjs/modules/dispatch/interfaces/response-unit-proximity.js.map +1 -0
- package/dist/cjs/modules/dispatch/interfaces/response-unit-recommendation.js +3 -0
- package/dist/cjs/modules/dispatch/interfaces/response-unit-recommendation.js.map +1 -0
- package/dist/cjs/modules/dispatch/utils/dispatch-geo.util.js +44 -0
- package/dist/cjs/modules/dispatch/utils/dispatch-geo.util.js.map +1 -0
- package/dist/cjs/modules/dispatch/utils/incident-dispatchability.util.js +42 -0
- package/dist/cjs/modules/dispatch/utils/incident-dispatchability.util.js.map +1 -0
- package/dist/cjs/modules/dispatch/utils/response-capability-match.util.js +44 -0
- package/dist/cjs/modules/dispatch/utils/response-capability-match.util.js.map +1 -0
- package/dist/cjs/modules/dispatch/utils/response-unit-dispatch-event.util.js +19 -0
- package/dist/cjs/modules/dispatch/utils/response-unit-dispatch-event.util.js.map +1 -0
- package/dist/cjs/modules/dispatch/utils/response-unit-dispatch-status.util.js +53 -0
- package/dist/cjs/modules/dispatch/utils/response-unit-dispatch-status.util.js.map +1 -0
- package/dist/cjs/modules/incident/dtos/category/create-incident-category.dto.js +9 -0
- package/dist/cjs/modules/incident/dtos/category/create-incident-category.dto.js.map +1 -1
- package/dist/cjs/modules/incident/dtos/type/create-incident-type.dto.js +9 -0
- package/dist/cjs/modules/incident/dtos/type/create-incident-type.dto.js.map +1 -1
- package/dist/cjs/modules/incident/enums/incident-actions.enum.js +8 -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 +86 -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 +19 -0
- package/dist/cjs/modules/permission/data/permissions.data.js.map +1 -1
- package/dist/cjs/modules/permission/enums/permission-actions.enum.js +34 -0
- package/dist/cjs/modules/permission/enums/permission-actions.enum.js.map +1 -1
- package/dist/cjs/modules/permission/enums/permissions-module.enum.js +2 -0
- package/dist/cjs/modules/permission/enums/permissions-module.enum.js.map +1 -1
- package/dist/cjs/modules/response-unit/dtos/response-unit/base-response-unit.dto.js +9 -0
- package/dist/cjs/modules/response-unit/dtos/response-unit/base-response-unit.dto.js.map +1 -1
- package/dist/cjs/modules/response-unit/enums/response-unit/response-capability.enum.js +29 -0
- package/dist/cjs/modules/response-unit/enums/response-unit/response-capability.enum.js.map +1 -0
- package/dist/cjs/modules/response-unit/enums/response-unit/response-unit-availability.enum.js +27 -0
- package/dist/cjs/modules/response-unit/enums/response-unit/response-unit-availability.enum.js.map +1 -0
- package/dist/cjs/modules/response-unit/index.js +5 -0
- package/dist/cjs/modules/response-unit/index.js.map +1 -1
- package/dist/cjs/modules/response-unit/utils/response-capability.util.js +74 -0
- package/dist/cjs/modules/response-unit/utils/response-capability.util.js.map +1 -0
- package/dist/cjs/modules/response-unit/utils/response-unit-availability.util.js +46 -0
- package/dist/cjs/modules/response-unit/utils/response-unit-availability.util.js.map +1 -0
- package/dist/cjs/modules/role/data/roles.data.js +61 -0
- package/dist/cjs/modules/role/data/roles.data.js.map +1 -1
- package/dist/cjs/modules/sms/constants/sms-templates.config.js +44 -0
- package/dist/cjs/modules/sms/constants/sms-templates.config.js.map +1 -1
- package/dist/cjs/modules/sms/enums/sms-template.enum.js +3 -0
- package/dist/cjs/modules/sms/enums/sms-template.enum.js.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/kafka/topics.js +21 -0
- package/dist/esm/kafka/topics.js.map +1 -1
- package/dist/esm/modules/dispatch/constants/response-unit-dispatch-defaults.const.js +53 -0
- package/dist/esm/modules/dispatch/constants/response-unit-dispatch-defaults.const.js.map +1 -0
- package/dist/esm/modules/dispatch/constants/response-unit-dispatch-kafka.const.js +18 -0
- package/dist/esm/modules/dispatch/constants/response-unit-dispatch-kafka.const.js.map +1 -0
- package/dist/esm/modules/dispatch/dtos/dispatch-response-unit.dto.js +54 -0
- package/dist/esm/modules/dispatch/dtos/dispatch-response-unit.dto.js.map +1 -0
- package/dist/esm/modules/dispatch/dtos/response-unit-dispatch-notification.dto.js +228 -0
- package/dist/esm/modules/dispatch/dtos/response-unit-dispatch-notification.dto.js.map +1 -0
- package/dist/esm/modules/dispatch/dtos/response-unit-dispatch-profile-query.dto.js +57 -0
- package/dist/esm/modules/dispatch/dtos/response-unit-dispatch-profile-query.dto.js.map +1 -0
- package/dist/esm/modules/dispatch/dtos/response-unit-nearby-query.dto.js +62 -0
- package/dist/esm/modules/dispatch/dtos/response-unit-nearby-query.dto.js.map +1 -0
- package/dist/esm/modules/dispatch/dtos/update-response-unit-dispatch-status.dto.js +38 -0
- package/dist/esm/modules/dispatch/dtos/update-response-unit-dispatch-status.dto.js.map +1 -0
- package/dist/esm/modules/dispatch/enums/incident-dispatch-blocker.enum.js +18 -0
- package/dist/esm/modules/dispatch/enums/incident-dispatch-blocker.enum.js.map +1 -0
- package/dist/esm/modules/dispatch/enums/response-capability-requirement-source.enum.js +9 -0
- package/dist/esm/modules/dispatch/enums/response-capability-requirement-source.enum.js.map +1 -0
- package/dist/esm/modules/dispatch/enums/response-unit-capability-match.enum.js +21 -0
- package/dist/esm/modules/dispatch/enums/response-unit-capability-match.enum.js.map +1 -0
- package/dist/esm/modules/dispatch/enums/response-unit-dispatch-constraint.enum.js +31 -0
- package/dist/esm/modules/dispatch/enums/response-unit-dispatch-constraint.enum.js.map +1 -0
- package/dist/esm/modules/dispatch/enums/response-unit-dispatch-error-code.enum.js +23 -0
- package/dist/esm/modules/dispatch/enums/response-unit-dispatch-error-code.enum.js.map +1 -0
- package/dist/esm/modules/dispatch/enums/response-unit-dispatch-notification-failure.enum.js +15 -0
- package/dist/esm/modules/dispatch/enums/response-unit-dispatch-notification-failure.enum.js.map +1 -0
- package/dist/esm/modules/dispatch/enums/response-unit-dispatch-notification-status.enum.js +13 -0
- package/dist/esm/modules/dispatch/enums/response-unit-dispatch-notification-status.enum.js.map +1 -0
- package/dist/esm/modules/dispatch/enums/response-unit-dispatch-status.enum.js +36 -0
- package/dist/esm/modules/dispatch/enums/response-unit-dispatch-status.enum.js.map +1 -0
- package/dist/esm/modules/dispatch/enums/response-unit-dispatch-transition-source.enum.js +15 -0
- package/dist/esm/modules/dispatch/enums/response-unit-dispatch-transition-source.enum.js.map +1 -0
- package/dist/esm/modules/dispatch/enums/response-unit-distance-basis.enum.js +9 -0
- package/dist/esm/modules/dispatch/enums/response-unit-distance-basis.enum.js.map +1 -0
- package/dist/esm/modules/dispatch/enums/response-unit-location-freshness.enum.js +18 -0
- package/dist/esm/modules/dispatch/enums/response-unit-location-freshness.enum.js.map +1 -0
- package/dist/esm/modules/dispatch/enums/response-unit-location-source.enum.js +14 -0
- package/dist/esm/modules/dispatch/enums/response-unit-location-source.enum.js.map +1 -0
- package/dist/esm/modules/dispatch/enums/response-unit-recommendation-reason.enum.js +22 -0
- package/dist/esm/modules/dispatch/enums/response-unit-recommendation-reason.enum.js.map +1 -0
- package/dist/esm/modules/dispatch/enums/response-unit-recommendation-status.enum.js +20 -0
- package/dist/esm/modules/dispatch/enums/response-unit-recommendation-status.enum.js.map +1 -0
- package/dist/esm/modules/dispatch/index.js +37 -0
- package/dist/esm/modules/dispatch/index.js.map +1 -0
- package/dist/esm/modules/dispatch/interfaces/incident-response-unit-dispatch.js +2 -0
- package/dist/esm/modules/dispatch/interfaces/incident-response-unit-dispatch.js.map +1 -0
- package/dist/esm/modules/dispatch/interfaces/response-unit-dispatch-events.js +2 -0
- package/dist/esm/modules/dispatch/interfaces/response-unit-dispatch-events.js.map +1 -0
- package/dist/esm/modules/dispatch/interfaces/response-unit-dispatch-profile.js +2 -0
- package/dist/esm/modules/dispatch/interfaces/response-unit-dispatch-profile.js.map +1 -0
- package/dist/esm/modules/dispatch/interfaces/response-unit-proximity.js +2 -0
- package/dist/esm/modules/dispatch/interfaces/response-unit-proximity.js.map +1 -0
- package/dist/esm/modules/dispatch/interfaces/response-unit-recommendation.js +2 -0
- package/dist/esm/modules/dispatch/interfaces/response-unit-recommendation.js.map +1 -0
- package/dist/esm/modules/dispatch/utils/dispatch-geo.util.js +39 -0
- package/dist/esm/modules/dispatch/utils/dispatch-geo.util.js.map +1 -0
- package/dist/esm/modules/dispatch/utils/incident-dispatchability.util.js +37 -0
- package/dist/esm/modules/dispatch/utils/incident-dispatchability.util.js.map +1 -0
- package/dist/esm/modules/dispatch/utils/response-capability-match.util.js +40 -0
- package/dist/esm/modules/dispatch/utils/response-capability-match.util.js.map +1 -0
- package/dist/esm/modules/dispatch/utils/response-unit-dispatch-event.util.js +15 -0
- package/dist/esm/modules/dispatch/utils/response-unit-dispatch-event.util.js.map +1 -0
- package/dist/esm/modules/dispatch/utils/response-unit-dispatch-status.util.js +46 -0
- package/dist/esm/modules/dispatch/utils/response-unit-dispatch-status.util.js.map +1 -0
- package/dist/esm/modules/incident/dtos/category/create-incident-category.dto.js +10 -1
- package/dist/esm/modules/incident/dtos/category/create-incident-category.dto.js.map +1 -1
- package/dist/esm/modules/incident/dtos/type/create-incident-type.dto.js +10 -1
- package/dist/esm/modules/incident/dtos/type/create-incident-type.dto.js.map +1 -1
- package/dist/esm/modules/incident/enums/incident-actions.enum.js +8 -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 +82 -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 +19 -0
- package/dist/esm/modules/permission/data/permissions.data.js.map +1 -1
- package/dist/esm/modules/permission/enums/permission-actions.enum.js +34 -0
- package/dist/esm/modules/permission/enums/permission-actions.enum.js.map +1 -1
- package/dist/esm/modules/permission/enums/permissions-module.enum.js +2 -0
- package/dist/esm/modules/permission/enums/permissions-module.enum.js.map +1 -1
- package/dist/esm/modules/response-unit/dtos/response-unit/base-response-unit.dto.js +10 -1
- package/dist/esm/modules/response-unit/dtos/response-unit/base-response-unit.dto.js.map +1 -1
- package/dist/esm/modules/response-unit/enums/response-unit/response-capability.enum.js +26 -0
- package/dist/esm/modules/response-unit/enums/response-unit/response-capability.enum.js.map +1 -0
- package/dist/esm/modules/response-unit/enums/response-unit/response-unit-availability.enum.js +24 -0
- package/dist/esm/modules/response-unit/enums/response-unit/response-unit-availability.enum.js.map +1 -0
- package/dist/esm/modules/response-unit/index.js +5 -0
- package/dist/esm/modules/response-unit/index.js.map +1 -1
- package/dist/esm/modules/response-unit/utils/response-capability.util.js +68 -0
- package/dist/esm/modules/response-unit/utils/response-capability.util.js.map +1 -0
- package/dist/esm/modules/response-unit/utils/response-unit-availability.util.js +42 -0
- package/dist/esm/modules/response-unit/utils/response-unit-availability.util.js.map +1 -0
- package/dist/esm/modules/role/data/roles.data.js +61 -0
- package/dist/esm/modules/role/data/roles.data.js.map +1 -1
- package/dist/esm/modules/sms/constants/sms-templates.config.js +44 -0
- package/dist/esm/modules/sms/constants/sms-templates.config.js.map +1 -1
- package/dist/esm/modules/sms/enums/sms-template.enum.js +3 -0
- package/dist/esm/modules/sms/enums/sms-template.enum.js.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/kafka/topics.d.ts +9 -0
- package/dist/types/modules/dispatch/constants/response-unit-dispatch-defaults.const.d.ts +43 -0
- package/dist/types/modules/dispatch/constants/response-unit-dispatch-kafka.const.d.ts +16 -0
- package/dist/types/modules/dispatch/dtos/dispatch-response-unit.dto.d.ts +20 -0
- package/dist/types/modules/dispatch/dtos/response-unit-dispatch-notification.dto.d.ts +48 -0
- package/dist/types/modules/dispatch/dtos/response-unit-dispatch-profile-query.dto.d.ts +13 -0
- package/dist/types/modules/dispatch/dtos/response-unit-nearby-query.dto.d.ts +15 -0
- package/dist/types/modules/dispatch/dtos/update-response-unit-dispatch-status.dto.d.ts +9 -0
- package/dist/types/modules/dispatch/enums/incident-dispatch-blocker.enum.d.ts +16 -0
- package/dist/types/modules/dispatch/enums/response-capability-requirement-source.enum.d.ts +7 -0
- package/dist/types/modules/dispatch/enums/response-unit-capability-match.enum.d.ts +19 -0
- package/dist/types/modules/dispatch/enums/response-unit-dispatch-constraint.enum.d.ts +27 -0
- package/dist/types/modules/dispatch/enums/response-unit-dispatch-error-code.enum.d.ts +21 -0
- package/dist/types/modules/dispatch/enums/response-unit-dispatch-notification-failure.enum.d.ts +13 -0
- package/dist/types/modules/dispatch/enums/response-unit-dispatch-notification-status.enum.d.ts +11 -0
- package/dist/types/modules/dispatch/enums/response-unit-dispatch-status.enum.d.ts +34 -0
- package/dist/types/modules/dispatch/enums/response-unit-dispatch-transition-source.enum.d.ts +13 -0
- package/dist/types/modules/dispatch/enums/response-unit-distance-basis.enum.d.ts +7 -0
- package/dist/types/modules/dispatch/enums/response-unit-location-freshness.enum.d.ts +16 -0
- package/dist/types/modules/dispatch/enums/response-unit-location-source.enum.d.ts +12 -0
- package/dist/types/modules/dispatch/enums/response-unit-recommendation-reason.enum.d.ts +20 -0
- package/dist/types/modules/dispatch/enums/response-unit-recommendation-status.enum.d.ts +18 -0
- package/dist/types/modules/dispatch/index.d.ts +31 -0
- package/dist/types/modules/dispatch/interfaces/incident-response-unit-dispatch.d.ts +126 -0
- package/dist/types/modules/dispatch/interfaces/response-unit-dispatch-events.d.ts +105 -0
- package/dist/types/modules/dispatch/interfaces/response-unit-dispatch-profile.d.ts +52 -0
- package/dist/types/modules/dispatch/interfaces/response-unit-proximity.d.ts +45 -0
- package/dist/types/modules/dispatch/interfaces/response-unit-recommendation.d.ts +130 -0
- package/dist/types/modules/dispatch/utils/dispatch-geo.util.d.ts +16 -0
- package/dist/types/modules/dispatch/utils/incident-dispatchability.util.d.ts +18 -0
- package/dist/types/modules/dispatch/utils/response-capability-match.util.d.ts +26 -0
- package/dist/types/modules/dispatch/utils/response-unit-dispatch-event.util.d.ts +9 -0
- package/dist/types/modules/dispatch/utils/response-unit-dispatch-status.util.d.ts +16 -0
- package/dist/types/modules/incident/dtos/category/create-incident-category.dto.d.ts +6 -0
- package/dist/types/modules/incident/dtos/type/create-incident-type.dto.d.ts +6 -0
- package/dist/types/modules/incident/enums/incident-actions.enum.d.ts +8 -0
- package/dist/types/modules/incident/intefaces/incident-category.d.ts +6 -0
- package/dist/types/modules/incident/intefaces/incident-type.d.ts +6 -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 +15 -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 +35 -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 +9 -0
- package/dist/types/modules/permission/enums/permissions-module.enum.d.ts +3 -1
- package/dist/types/modules/response-unit/dtos/response-unit/base-response-unit.dto.d.ts +7 -0
- package/dist/types/modules/response-unit/enums/response-unit/response-capability.enum.d.ts +24 -0
- package/dist/types/modules/response-unit/enums/response-unit/response-unit-availability.enum.d.ts +22 -0
- package/dist/types/modules/response-unit/index.d.ts +4 -0
- package/dist/types/modules/response-unit/interfaces/response-unit/response-unit.d.ts +3 -0
- package/dist/types/modules/response-unit/utils/response-capability.util.d.ts +31 -0
- package/dist/types/modules/response-unit/utils/response-unit-availability.util.d.ts +21 -0
- package/dist/types/modules/sms/enums/sms-template.enum.d.ts +3 -0
- package/package.json +72 -72
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ResponseCapability } from '../../response-unit/enums/response-unit/response-capability.enum';
|
|
2
|
+
import { ResponseUnitCapabilityMatch } from '../enums/response-unit-capability-match.enum';
|
|
3
|
+
import { ResponseCapabilityRequirement } from '../interfaces/response-unit-recommendation';
|
|
4
|
+
/**
|
|
5
|
+
* What an incident needs: its TYPE's list when the type names one, otherwise
|
|
6
|
+
* its CATEGORY's, otherwise nothing. A type's list replaces the category's
|
|
7
|
+
* rather than adding to it - "Road accident with casualties" under a "Traffic"
|
|
8
|
+
* category that asks for roadside assistance must be able to ask for an
|
|
9
|
+
* ambulance instead.
|
|
10
|
+
*/
|
|
11
|
+
export declare function resolveResponseCapabilityRequirement(type: {
|
|
12
|
+
responseCapabilities?: unknown;
|
|
13
|
+
} | null | undefined, category: {
|
|
14
|
+
responseCapabilities?: unknown;
|
|
15
|
+
} | null | undefined): ResponseCapabilityRequirement;
|
|
16
|
+
export interface ResponseCapabilityMatchResult {
|
|
17
|
+
match: ResponseUnitCapabilityMatch;
|
|
18
|
+
/** The required capabilities the unit has. */
|
|
19
|
+
matched: ResponseCapability[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Compare a unit with a requirement. A unit qualifies with ANY required
|
|
23
|
+
* capability - a requirement is the set of services that would do, not a
|
|
24
|
+
* checklist one vehicle must tick.
|
|
25
|
+
*/
|
|
26
|
+
export declare function matchResponseCapabilities(required: readonly ResponseCapability[], unitCapabilities: readonly ResponseCapability[]): ResponseCapabilityMatchResult;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deterministic event id: the same change always produces the same id, so a
|
|
3
|
+
* consumer that sees one twice (an outbox re-publish, a Kafka redelivery) knows
|
|
4
|
+
* it already handled it. `discriminator` separates changes of the same kind on
|
|
5
|
+
* one dispatch (the target status, the notification attempt number).
|
|
6
|
+
*/
|
|
7
|
+
export declare function buildResponseUnitDispatchEventId(kind: 'created' | 'status-changed' | 'notification-requested' | 'notification-result', dispatchId: number, discriminator?: string | number): string;
|
|
8
|
+
/** An incident as a control room quotes it: `#1234`. */
|
|
9
|
+
export declare function formatIncidentReference(incidentId: number): string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ResponseUnitDispatchStatus } from '../enums/response-unit-dispatch-status.enum';
|
|
2
|
+
/**
|
|
3
|
+
* Where a dispatch may go next. Forward only, and steps may be skipped: a crew
|
|
4
|
+
* that radios in "on scene" never said "en route", and refusing to record the
|
|
5
|
+
* truth because a step was missed would leave the record wrong. Nothing leaves
|
|
6
|
+
* COMPLETED or CANCELLED - a unit sent again is a new dispatch, with its own
|
|
7
|
+
* audit trail, not a resurrected one.
|
|
8
|
+
*/
|
|
9
|
+
export declare const RESPONSE_UNIT_DISPATCH_TRANSITIONS: Readonly<Record<ResponseUnitDispatchStatus, readonly ResponseUnitDispatchStatus[]>>;
|
|
10
|
+
export declare function isActiveResponseUnitDispatchStatus(status: string | null | undefined): boolean;
|
|
11
|
+
export declare function isTerminalResponseUnitDispatchStatus(status: string | null | undefined): boolean;
|
|
12
|
+
export declare function canTransitionResponseUnitDispatch(from: ResponseUnitDispatchStatus, to: ResponseUnitDispatchStatus): boolean;
|
|
13
|
+
/** The statuses a dispatch in `from` may be moved to. */
|
|
14
|
+
export declare function nextResponseUnitDispatchStatuses(from: ResponseUnitDispatchStatus): ResponseUnitDispatchStatus[];
|
|
15
|
+
/** The milestone column each status stamps, for the statuses that have one. */
|
|
16
|
+
export declare const RESPONSE_UNIT_DISPATCH_MILESTONE_FIELD: Readonly<Partial<Record<ResponseUnitDispatchStatus, 'acknowledgedAt' | 'enRouteAt' | 'onSceneAt' | 'completedAt' | 'cancelledAt' | 'rejectedAt'>>>;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
import { ResponseCapability } from "../../../response-unit/enums/response-unit/response-capability.enum";
|
|
1
2
|
export declare class CreateIncidentCategoryDto {
|
|
2
3
|
name: string;
|
|
3
4
|
description?: string;
|
|
4
5
|
organizationId: number;
|
|
6
|
+
/**
|
|
7
|
+
* Response capabilities an incident in this category needs, unless its type names its own; a unit with ANY of them is suitable.
|
|
8
|
+
* Empty or absent = no requirement, so every available unit is suitable.
|
|
9
|
+
*/
|
|
10
|
+
responseCapabilities?: ResponseCapability[];
|
|
5
11
|
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import { ResponseCapability } from "../../../response-unit/enums/response-unit/response-capability.enum";
|
|
1
2
|
export declare class CreateIncidentTypeDto {
|
|
2
3
|
name: string;
|
|
3
4
|
description?: string;
|
|
4
5
|
categoryId?: number;
|
|
5
6
|
organizationId: number;
|
|
7
|
+
/**
|
|
8
|
+
* Response capabilities an incident of this type needs; a unit with ANY of them is suitable. Overrides the category's requirement.
|
|
9
|
+
* Empty or absent = no requirement, so every available unit is suitable.
|
|
10
|
+
*/
|
|
11
|
+
responseCapabilities?: ResponseCapability[];
|
|
6
12
|
}
|
|
@@ -8,6 +8,14 @@ export declare enum IncidentActions {
|
|
|
8
8
|
AUTO_STOPPED = "Auto-Stopped",
|
|
9
9
|
ASSIGNED = "Assigned",
|
|
10
10
|
RESPONSE_UNIT_ASSIGNED = "Response Unit Assigned",
|
|
11
|
+
/** A unit was dispatched through the dispatch command (recommend + dispatch). */
|
|
12
|
+
RESPONSE_UNIT_DISPATCHED = "Response Unit Dispatched",
|
|
13
|
+
/** A dispatch moved on (acknowledged, en route, on scene, completed, stood down) or its message was reported on. */
|
|
14
|
+
RESPONSE_UNIT_DISPATCH_UPDATED = "Response Unit Dispatch Updated",
|
|
15
|
+
/** The emergency response reached a milestone (acknowledged, triaged, arrival inferred, assessed...). */
|
|
16
|
+
EMERGENCY_MILESTONE = "Emergency Milestone",
|
|
17
|
+
/** The emergency SLA changed (a clock warned, breached, paused, was excused...) or escalated. */
|
|
18
|
+
SLA_UPDATED = "SLA Updated",
|
|
11
19
|
REOPENED = "Reopened",
|
|
12
20
|
REPORT_CREATED = "Report Created",
|
|
13
21
|
COMMENTED = "Commented",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ResponseCapability } from "../../response-unit/enums/response-unit/response-capability.enum";
|
|
1
2
|
import { IncidentType } from "./incident-type";
|
|
2
3
|
export interface IncidentCategory {
|
|
3
4
|
id?: number;
|
|
@@ -14,5 +15,10 @@ export interface IncidentCategory {
|
|
|
14
15
|
* sheet and from package configuration, and not editable or deletable.
|
|
15
16
|
*/
|
|
16
17
|
isSystem?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Response capabilities this kind of incident needs (a unit with ANY of them
|
|
20
|
+
* is suitable). A type's list overrides its category's; empty = no requirement.
|
|
21
|
+
*/
|
|
22
|
+
responseCapabilities?: ResponseCapability[];
|
|
17
23
|
types?: IncidentType[];
|
|
18
24
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ResponseCapability } from "../../response-unit/enums/response-unit/response-capability.enum";
|
|
1
2
|
import { IncidentCategory } from "./incident-category";
|
|
2
3
|
export interface IncidentType {
|
|
3
4
|
id?: number;
|
|
@@ -15,5 +16,10 @@ export interface IncidentType {
|
|
|
15
16
|
* sheet and from package configuration, and not editable or deletable.
|
|
16
17
|
*/
|
|
17
18
|
isSystem?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Response capabilities this kind of incident needs (a unit with ANY of them
|
|
21
|
+
* is suitable). A type's list overrides its category's; empty = no requirement.
|
|
22
|
+
*/
|
|
23
|
+
responseCapabilities?: ResponseCapability[];
|
|
18
24
|
category?: IncidentCategory;
|
|
19
25
|
}
|
|
@@ -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,15 @@
|
|
|
1
|
+
import { IncidentPriority } from '../../incident/enums/incident-priority.enum';
|
|
2
|
+
import { IncidentSlaStage } from '../enums/incident-sla-stage.enum';
|
|
3
|
+
/** `GET /incident-sla/analytics` - by instance start time, default the last 30 days. */
|
|
4
|
+
export declare class IncidentSlaAnalyticsQueryDto {
|
|
5
|
+
from?: string;
|
|
6
|
+
to?: string;
|
|
7
|
+
/** Honoured for Super-Admin only; everybody else is held to their own scope. */
|
|
8
|
+
organizationId?: number;
|
|
9
|
+
controlCentreId?: number;
|
|
10
|
+
priority?: IncidentPriority;
|
|
11
|
+
stage?: IncidentSlaStage;
|
|
12
|
+
typeId?: number;
|
|
13
|
+
categoryId?: number;
|
|
14
|
+
responseUnitId?: number;
|
|
15
|
+
}
|
|
@@ -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
|
+
}
|