grm-shared-library 1.1.236 → 1.1.237
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 +24 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/kafka/topics.js +10 -0
- package/dist/cjs/kafka/topics.js.map +1 -1
- package/dist/cjs/modules/dispatch/constants/response-unit-dispatch-defaults.const.js +55 -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 +230 -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 +41 -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 +33 -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 +16 -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 +49 -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 +4 -0
- package/dist/cjs/modules/incident/enums/incident-actions.enum.js.map +1 -1
- package/dist/cjs/modules/permission/data/permissions.data.js +8 -0
- package/dist/cjs/modules/permission/data/permissions.data.js.map +1 -1
- package/dist/cjs/modules/permission/enums/permission-actions.enum.js +13 -0
- package/dist/cjs/modules/permission/enums/permission-actions.enum.js.map +1 -1
- package/dist/cjs/modules/permission/enums/permissions-module.enum.js +1 -0
- package/dist/cjs/modules/permission/enums/permissions-module.enum.js.map +1 -1
- package/dist/cjs/modules/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 +24 -0
- package/dist/cjs/modules/role/data/roles.data.js.map +1 -1
- package/dist/cjs/modules/sms/constants/sms-templates.config.js +18 -0
- package/dist/cjs/modules/sms/constants/sms-templates.config.js.map +1 -1
- package/dist/cjs/modules/sms/enums/sms-template.enum.js +1 -0
- package/dist/cjs/modules/sms/enums/sms-template.enum.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/kafka/topics.js +10 -0
- package/dist/esm/kafka/topics.js.map +1 -1
- package/dist/esm/modules/dispatch/constants/response-unit-dispatch-defaults.const.js +52 -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 +223 -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 +37 -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 +30 -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 +13 -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 +42 -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 +4 -0
- package/dist/esm/modules/incident/enums/incident-actions.enum.js.map +1 -1
- package/dist/esm/modules/permission/data/permissions.data.js +8 -0
- package/dist/esm/modules/permission/data/permissions.data.js.map +1 -1
- package/dist/esm/modules/permission/enums/permission-actions.enum.js +13 -0
- package/dist/esm/modules/permission/enums/permission-actions.enum.js.map +1 -1
- package/dist/esm/modules/permission/enums/permissions-module.enum.js +1 -0
- package/dist/esm/modules/permission/enums/permissions-module.enum.js.map +1 -1
- package/dist/esm/modules/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 +24 -0
- package/dist/esm/modules/role/data/roles.data.js.map +1 -1
- package/dist/esm/modules/sms/constants/sms-templates.config.js +18 -0
- package/dist/esm/modules/sms/constants/sms-templates.config.js.map +1 -1
- package/dist/esm/modules/sms/enums/sms-template.enum.js +1 -0
- package/dist/esm/modules/sms/enums/sms-template.enum.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/kafka/topics.d.ts +4 -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 +47 -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 +28 -0
- package/dist/types/modules/dispatch/enums/response-unit-dispatch-transition-source.enum.d.ts +11 -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 +121 -0
- package/dist/types/modules/dispatch/interfaces/response-unit-dispatch-events.d.ts +103 -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 +4 -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/permission/enums/permission-actions.enum.d.ts +3 -0
- package/dist/types/modules/permission/enums/permissions-module.enum.d.ts +1 -0
- 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 +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Type } from 'class-transformer';
|
|
11
|
+
import { Equals, IsBoolean, IsEnum, IsInt, IsISO8601, IsNotEmpty, IsNumber, IsOptional, IsPositive, IsString, MaxLength, Min, ValidateNested, } from 'class-validator';
|
|
12
|
+
import { ResponseUnitDispatchNotificationFailure } from '../enums/response-unit-dispatch-notification-failure.enum';
|
|
13
|
+
import { ResponseUnitDispatchNotificationStatus } from '../enums/response-unit-dispatch-notification-status.enum';
|
|
14
|
+
/*
|
|
15
|
+
* Class forms of the two notification events, for consumers that validate a
|
|
16
|
+
* Kafka payload with `ValidationPipe({ whitelist: true })`. Declared here, once,
|
|
17
|
+
* next to the interfaces they implement - a consumer-local copy would silently
|
|
18
|
+
* strip any field added to the event later.
|
|
19
|
+
*/
|
|
20
|
+
export class ResponseUnitDispatchMessageIncidentDto {
|
|
21
|
+
}
|
|
22
|
+
__decorate([
|
|
23
|
+
IsString(),
|
|
24
|
+
IsNotEmpty(),
|
|
25
|
+
MaxLength(32),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], ResponseUnitDispatchMessageIncidentDto.prototype, "reference", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
IsOptional(),
|
|
30
|
+
IsString(),
|
|
31
|
+
MaxLength(100),
|
|
32
|
+
__metadata("design:type", Object)
|
|
33
|
+
], ResponseUnitDispatchMessageIncidentDto.prototype, "typeName", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
IsOptional(),
|
|
36
|
+
IsString(),
|
|
37
|
+
MaxLength(100),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], ResponseUnitDispatchMessageIncidentDto.prototype, "categoryName", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
IsOptional(),
|
|
42
|
+
IsString(),
|
|
43
|
+
MaxLength(30),
|
|
44
|
+
__metadata("design:type", Object)
|
|
45
|
+
], ResponseUnitDispatchMessageIncidentDto.prototype, "priority", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
IsOptional(),
|
|
48
|
+
IsString(),
|
|
49
|
+
MaxLength(500),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], ResponseUnitDispatchMessageIncidentDto.prototype, "summary", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
IsOptional(),
|
|
54
|
+
IsString(),
|
|
55
|
+
MaxLength(500),
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
|
+
], ResponseUnitDispatchMessageIncidentDto.prototype, "address", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
IsOptional(),
|
|
60
|
+
IsNumber(),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], ResponseUnitDispatchMessageIncidentDto.prototype, "latitude", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
IsOptional(),
|
|
65
|
+
IsNumber(),
|
|
66
|
+
__metadata("design:type", Object)
|
|
67
|
+
], ResponseUnitDispatchMessageIncidentDto.prototype, "longitude", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
IsOptional(),
|
|
70
|
+
IsString(),
|
|
71
|
+
MaxLength(200),
|
|
72
|
+
__metadata("design:type", Object)
|
|
73
|
+
], ResponseUnitDispatchMessageIncidentDto.prototype, "reporterName", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
IsOptional(),
|
|
76
|
+
IsString(),
|
|
77
|
+
MaxLength(32),
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
|
+
], ResponseUnitDispatchMessageIncidentDto.prototype, "reporterPhoneNumber", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
IsBoolean(),
|
|
82
|
+
__metadata("design:type", Boolean)
|
|
83
|
+
], ResponseUnitDispatchMessageIncidentDto.prototype, "anonymous", void 0);
|
|
84
|
+
export class ResponseUnitDispatchRecipientDto {
|
|
85
|
+
}
|
|
86
|
+
__decorate([
|
|
87
|
+
IsString(),
|
|
88
|
+
IsNotEmpty(),
|
|
89
|
+
MaxLength(32),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], ResponseUnitDispatchRecipientDto.prototype, "phoneNumber", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
IsString(),
|
|
94
|
+
IsNotEmpty(),
|
|
95
|
+
MaxLength(300),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], ResponseUnitDispatchRecipientDto.prototype, "responseUnitName", void 0);
|
|
98
|
+
export class ResponseUnitDispatchNotificationRequestedDto {
|
|
99
|
+
}
|
|
100
|
+
__decorate([
|
|
101
|
+
Equals(1),
|
|
102
|
+
__metadata("design:type", Number)
|
|
103
|
+
], ResponseUnitDispatchNotificationRequestedDto.prototype, "schemaVersion", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
IsString(),
|
|
106
|
+
IsNotEmpty(),
|
|
107
|
+
__metadata("design:type", String)
|
|
108
|
+
], ResponseUnitDispatchNotificationRequestedDto.prototype, "eventId", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
IsISO8601(),
|
|
111
|
+
__metadata("design:type", String)
|
|
112
|
+
], ResponseUnitDispatchNotificationRequestedDto.prototype, "occurredAt", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
Type(() => Number),
|
|
115
|
+
IsInt(),
|
|
116
|
+
IsPositive(),
|
|
117
|
+
__metadata("design:type", Number)
|
|
118
|
+
], ResponseUnitDispatchNotificationRequestedDto.prototype, "dispatchId", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
IsString(),
|
|
121
|
+
IsNotEmpty(),
|
|
122
|
+
__metadata("design:type", String)
|
|
123
|
+
], ResponseUnitDispatchNotificationRequestedDto.prototype, "dispatchReference", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
Type(() => Number),
|
|
126
|
+
IsInt(),
|
|
127
|
+
IsPositive(),
|
|
128
|
+
__metadata("design:type", Number)
|
|
129
|
+
], ResponseUnitDispatchNotificationRequestedDto.prototype, "incidentId", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
Type(() => Number),
|
|
132
|
+
IsInt(),
|
|
133
|
+
IsPositive(),
|
|
134
|
+
__metadata("design:type", Number)
|
|
135
|
+
], ResponseUnitDispatchNotificationRequestedDto.prototype, "organizationId", void 0);
|
|
136
|
+
__decorate([
|
|
137
|
+
IsOptional(),
|
|
138
|
+
Type(() => Number),
|
|
139
|
+
IsInt(),
|
|
140
|
+
__metadata("design:type", Object)
|
|
141
|
+
], ResponseUnitDispatchNotificationRequestedDto.prototype, "controlCentreId", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
Type(() => Number),
|
|
144
|
+
IsInt(),
|
|
145
|
+
IsPositive(),
|
|
146
|
+
__metadata("design:type", Number)
|
|
147
|
+
], ResponseUnitDispatchNotificationRequestedDto.prototype, "responseUnitId", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
Type(() => Number),
|
|
150
|
+
IsInt(),
|
|
151
|
+
Min(1),
|
|
152
|
+
__metadata("design:type", Number)
|
|
153
|
+
], ResponseUnitDispatchNotificationRequestedDto.prototype, "attempt", void 0);
|
|
154
|
+
__decorate([
|
|
155
|
+
IsOptional(),
|
|
156
|
+
IsString(),
|
|
157
|
+
__metadata("design:type", Object)
|
|
158
|
+
], ResponseUnitDispatchNotificationRequestedDto.prototype, "appId", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
ValidateNested(),
|
|
161
|
+
Type(() => ResponseUnitDispatchRecipientDto),
|
|
162
|
+
__metadata("design:type", ResponseUnitDispatchRecipientDto)
|
|
163
|
+
], ResponseUnitDispatchNotificationRequestedDto.prototype, "recipient", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
ValidateNested(),
|
|
166
|
+
Type(() => ResponseUnitDispatchMessageIncidentDto),
|
|
167
|
+
__metadata("design:type", ResponseUnitDispatchMessageIncidentDto)
|
|
168
|
+
], ResponseUnitDispatchNotificationRequestedDto.prototype, "incident", void 0);
|
|
169
|
+
export class ResponseUnitDispatchNotificationResultDto {
|
|
170
|
+
}
|
|
171
|
+
__decorate([
|
|
172
|
+
Equals(1),
|
|
173
|
+
__metadata("design:type", Number)
|
|
174
|
+
], ResponseUnitDispatchNotificationResultDto.prototype, "schemaVersion", void 0);
|
|
175
|
+
__decorate([
|
|
176
|
+
IsString(),
|
|
177
|
+
IsNotEmpty(),
|
|
178
|
+
__metadata("design:type", String)
|
|
179
|
+
], ResponseUnitDispatchNotificationResultDto.prototype, "eventId", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
IsISO8601(),
|
|
182
|
+
__metadata("design:type", String)
|
|
183
|
+
], ResponseUnitDispatchNotificationResultDto.prototype, "occurredAt", void 0);
|
|
184
|
+
__decorate([
|
|
185
|
+
Type(() => Number),
|
|
186
|
+
IsInt(),
|
|
187
|
+
IsPositive(),
|
|
188
|
+
__metadata("design:type", Number)
|
|
189
|
+
], ResponseUnitDispatchNotificationResultDto.prototype, "dispatchId", void 0);
|
|
190
|
+
__decorate([
|
|
191
|
+
Type(() => Number),
|
|
192
|
+
IsInt(),
|
|
193
|
+
IsPositive(),
|
|
194
|
+
__metadata("design:type", Number)
|
|
195
|
+
], ResponseUnitDispatchNotificationResultDto.prototype, "incidentId", void 0);
|
|
196
|
+
__decorate([
|
|
197
|
+
Type(() => Number),
|
|
198
|
+
IsInt(),
|
|
199
|
+
IsPositive(),
|
|
200
|
+
__metadata("design:type", Number)
|
|
201
|
+
], ResponseUnitDispatchNotificationResultDto.prototype, "organizationId", void 0);
|
|
202
|
+
__decorate([
|
|
203
|
+
Type(() => Number),
|
|
204
|
+
IsInt(),
|
|
205
|
+
Min(1),
|
|
206
|
+
__metadata("design:type", Number)
|
|
207
|
+
], ResponseUnitDispatchNotificationResultDto.prototype, "attempt", void 0);
|
|
208
|
+
__decorate([
|
|
209
|
+
IsEnum(ResponseUnitDispatchNotificationStatus),
|
|
210
|
+
__metadata("design:type", String)
|
|
211
|
+
], ResponseUnitDispatchNotificationResultDto.prototype, "status", void 0);
|
|
212
|
+
__decorate([
|
|
213
|
+
IsOptional(),
|
|
214
|
+
IsEnum(ResponseUnitDispatchNotificationFailure),
|
|
215
|
+
__metadata("design:type", Object)
|
|
216
|
+
], ResponseUnitDispatchNotificationResultDto.prototype, "failureReason", void 0);
|
|
217
|
+
__decorate([
|
|
218
|
+
IsOptional(),
|
|
219
|
+
IsString(),
|
|
220
|
+
MaxLength(20),
|
|
221
|
+
__metadata("design:type", Object)
|
|
222
|
+
], ResponseUnitDispatchNotificationResultDto.prototype, "providerCode", void 0);
|
|
223
|
+
//# sourceMappingURL=response-unit-dispatch-notification.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-unit-dispatch-notification.dto.js","sourceRoot":"","sources":["../../../../../src/modules/dispatch/dtos/response-unit-dispatch-notification.dto.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Transform, Type } from 'class-transformer';
|
|
11
|
+
import { ArrayMaxSize, IsArray, IsBoolean, IsInt, IsOptional, IsPositive } from 'class-validator';
|
|
12
|
+
/** Accepts `ids=1,2,3` or repeated `ids=1&ids=2`. */
|
|
13
|
+
const toIdList = ({ value }) => {
|
|
14
|
+
if (value === undefined || value === null || value === '')
|
|
15
|
+
return undefined;
|
|
16
|
+
const raw = Array.isArray(value) ? value : String(value).split(',');
|
|
17
|
+
return raw.map((item) => Number(String(item).trim())).filter((item) => item !== 0);
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* `GET /response-units/dispatch-profiles` (clarion-organization, internal).
|
|
21
|
+
*
|
|
22
|
+
* Scoped by the forwarded user context; `organizationId` is honoured for a
|
|
23
|
+
* Super-Admin only. `includeContact` adds the unit's phone number and is used by
|
|
24
|
+
* the dispatch command alone - a recommendation never carries one.
|
|
25
|
+
*/
|
|
26
|
+
export class ResponseUnitDispatchProfileQueryDto {
|
|
27
|
+
}
|
|
28
|
+
__decorate([
|
|
29
|
+
IsOptional(),
|
|
30
|
+
Type(() => Number),
|
|
31
|
+
IsInt(),
|
|
32
|
+
IsPositive(),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], ResponseUnitDispatchProfileQueryDto.prototype, "organizationId", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
IsOptional(),
|
|
37
|
+
Type(() => Number),
|
|
38
|
+
IsInt(),
|
|
39
|
+
IsPositive(),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], ResponseUnitDispatchProfileQueryDto.prototype, "controlCentreId", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
IsOptional(),
|
|
44
|
+
Transform(toIdList),
|
|
45
|
+
IsArray(),
|
|
46
|
+
ArrayMaxSize(500),
|
|
47
|
+
IsInt({ each: true }),
|
|
48
|
+
IsPositive({ each: true }),
|
|
49
|
+
__metadata("design:type", Array)
|
|
50
|
+
], ResponseUnitDispatchProfileQueryDto.prototype, "ids", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
IsOptional(),
|
|
53
|
+
Transform(({ value }) => value === true || value === 'true' || value === '1'),
|
|
54
|
+
IsBoolean(),
|
|
55
|
+
__metadata("design:type", Boolean)
|
|
56
|
+
], ResponseUnitDispatchProfileQueryDto.prototype, "includeContact", void 0);
|
|
57
|
+
//# sourceMappingURL=response-unit-dispatch-profile-query.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-unit-dispatch-profile-query.dto.js","sourceRoot":"","sources":["../../../../../src/modules/dispatch/dtos/response-unit-dispatch-profile-query.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElG,qDAAqD;AACrD,MAAM,QAAQ,GAAG,CAAC,EAAE,KAAK,EAAsB,EAAW,EAAE;IACxD,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,SAAS,CAAC;IAC5E,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpE,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC;AACvF,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,OAAO,mCAAmC;CAyB/C;AApBG;IAJC,UAAU,EAAE;IACZ,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,KAAK,EAAE;IACP,UAAU,EAAE;;2EACW;AAMxB;IAJC,UAAU,EAAE;IACZ,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,KAAK,EAAE;IACP,UAAU,EAAE;;4EACY;AAQzB;IANC,UAAU,EAAE;IACZ,SAAS,CAAC,QAAQ,CAAC;IACnB,OAAO,EAAE;IACT,YAAY,CAAC,GAAG,CAAC;IACjB,KAAK,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACrB,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;gEACZ;AAKf;IAHC,UAAU,EAAE;IACZ,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,GAAG,CAAC;IAC7E,SAAS,EAAE;;2EACa"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Type } from 'class-transformer';
|
|
11
|
+
import { IsInt, IsLatitude, IsLongitude, IsNumber, IsOptional, IsPositive, Max, Min } from 'class-validator';
|
|
12
|
+
import { RESPONSE_UNIT_NEARBY_LIMITS } from '../constants/response-unit-dispatch-defaults.const';
|
|
13
|
+
/**
|
|
14
|
+
* `GET /tracking/response-units/nearby` (clarion-response-tracking).
|
|
15
|
+
*
|
|
16
|
+
* Tenancy is NOT in the query: the tracking service takes it from the forwarded
|
|
17
|
+
* user context. `organizationId` is honoured for a Super-Admin only and a
|
|
18
|
+
* control-centre caller is pinned to their own centre whatever they pass.
|
|
19
|
+
*/
|
|
20
|
+
export class ResponseUnitNearbyQueryDto {
|
|
21
|
+
}
|
|
22
|
+
__decorate([
|
|
23
|
+
Type(() => Number),
|
|
24
|
+
IsLatitude(),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], ResponseUnitNearbyQueryDto.prototype, "latitude", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
Type(() => Number),
|
|
29
|
+
IsLongitude(),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], ResponseUnitNearbyQueryDto.prototype, "longitude", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
IsOptional(),
|
|
34
|
+
Type(() => Number),
|
|
35
|
+
IsInt(),
|
|
36
|
+
IsPositive(),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], ResponseUnitNearbyQueryDto.prototype, "organizationId", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
IsOptional(),
|
|
41
|
+
Type(() => Number),
|
|
42
|
+
IsInt(),
|
|
43
|
+
IsPositive(),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], ResponseUnitNearbyQueryDto.prototype, "controlCentreId", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
IsOptional(),
|
|
48
|
+
Type(() => Number),
|
|
49
|
+
IsNumber(),
|
|
50
|
+
Min(RESPONSE_UNIT_NEARBY_LIMITS.minRadiusMetres),
|
|
51
|
+
Max(RESPONSE_UNIT_NEARBY_LIMITS.maxRadiusMetres),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], ResponseUnitNearbyQueryDto.prototype, "radiusMetres", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
IsOptional(),
|
|
56
|
+
Type(() => Number),
|
|
57
|
+
IsInt(),
|
|
58
|
+
Min(1),
|
|
59
|
+
Max(RESPONSE_UNIT_NEARBY_LIMITS.maxLimit),
|
|
60
|
+
__metadata("design:type", Number)
|
|
61
|
+
], ResponseUnitNearbyQueryDto.prototype, "limit", void 0);
|
|
62
|
+
//# sourceMappingURL=response-unit-nearby-query.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-unit-nearby-query.dto.js","sourceRoot":"","sources":["../../../../../src/modules/dispatch/dtos/response-unit-nearby-query.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAC7G,OAAO,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAC;AAEjG;;;;;;GAMG;AACH,MAAM,OAAO,0BAA0B;CAkCtC;AA/BG;IAFC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,UAAU,EAAE;;4DACK;AAIlB;IAFC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,WAAW,EAAE;;6DACK;AAMnB;IAJC,UAAU,EAAE;IACZ,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,KAAK,EAAE;IACP,UAAU,EAAE;;kEACW;AAMxB;IAJC,UAAU,EAAE;IACZ,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,KAAK,EAAE;IACP,UAAU,EAAE;;mEACY;AAOzB;IALC,UAAU,EAAE;IACZ,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,QAAQ,EAAE;IACV,GAAG,CAAC,2BAA2B,CAAC,eAAe,CAAC;IAChD,GAAG,CAAC,2BAA2B,CAAC,eAAe,CAAC;;gEAC3B;AAOtB;IALC,UAAU,EAAE;IACZ,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,KAAK,EAAE;IACP,GAAG,CAAC,CAAC,CAAC;IACN,GAAG,CAAC,2BAA2B,CAAC,QAAQ,CAAC;;yDAC3B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
11
|
+
import { IsIn, IsOptional, IsString, MaxLength } from 'class-validator';
|
|
12
|
+
import { RESPONSE_UNIT_DISPATCH_FIELD_LIMITS } from '../constants/response-unit-dispatch-defaults.const';
|
|
13
|
+
import { ResponseUnitDispatchStatus } from '../enums/response-unit-dispatch-status.enum';
|
|
14
|
+
/** Every status a dispatch can be MOVED to (DISPATCHED is only ever its first). */
|
|
15
|
+
export const SETTABLE_RESPONSE_UNIT_DISPATCH_STATUSES = [
|
|
16
|
+
ResponseUnitDispatchStatus.ACKNOWLEDGED,
|
|
17
|
+
ResponseUnitDispatchStatus.EN_ROUTE,
|
|
18
|
+
ResponseUnitDispatchStatus.ON_SCENE,
|
|
19
|
+
ResponseUnitDispatchStatus.COMPLETED,
|
|
20
|
+
ResponseUnitDispatchStatus.CANCELLED,
|
|
21
|
+
];
|
|
22
|
+
/** `POST /incidents/:id/response-unit-dispatches/:dispatchId/status`. */
|
|
23
|
+
export class UpdateResponseUnitDispatchStatusDto {
|
|
24
|
+
}
|
|
25
|
+
__decorate([
|
|
26
|
+
ApiProperty({ enum: SETTABLE_RESPONSE_UNIT_DISPATCH_STATUSES, example: ResponseUnitDispatchStatus.ON_SCENE }),
|
|
27
|
+
IsIn(SETTABLE_RESPONSE_UNIT_DISPATCH_STATUSES),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], UpdateResponseUnitDispatchStatusDto.prototype, "status", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
ApiPropertyOptional({ maxLength: RESPONSE_UNIT_DISPATCH_FIELD_LIMITS.statusReason }),
|
|
32
|
+
IsOptional(),
|
|
33
|
+
IsString(),
|
|
34
|
+
MaxLength(RESPONSE_UNIT_DISPATCH_FIELD_LIMITS.statusReason),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], UpdateResponseUnitDispatchStatusDto.prototype, "reason", void 0);
|
|
37
|
+
//# sourceMappingURL=update-response-unit-dispatch-status.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-response-unit-dispatch-status.dto.js","sourceRoot":"","sources":["../../../../../src/modules/dispatch/dtos/update-response-unit-dispatch-status.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,mCAAmC,EAAE,MAAM,oDAAoD,CAAC;AACzG,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAEzF,mFAAmF;AACnF,MAAM,CAAC,MAAM,wCAAwC,GAA0C;IAC3F,0BAA0B,CAAC,YAAY;IACvC,0BAA0B,CAAC,QAAQ;IACnC,0BAA0B,CAAC,QAAQ;IACnC,0BAA0B,CAAC,SAAS;IACpC,0BAA0B,CAAC,SAAS;CACvC,CAAC;AAEF,yEAAyE;AACzE,MAAM,OAAO,mCAAmC;CAW/C;AARG;IAFC,WAAW,CAAC,EAAE,IAAI,EAAE,wCAAwC,EAAE,OAAO,EAAE,0BAA0B,CAAC,QAAQ,EAAE,CAAC;IAC7G,IAAI,CAAC,wCAAwE,CAAC;;mEAC3C;AAOpC;IAJC,mBAAmB,CAAC,EAAE,SAAS,EAAE,mCAAmC,CAAC,YAAY,EAAE,CAAC;IACpF,UAAU,EAAE;IACZ,QAAQ,EAAE;IACV,SAAS,CAAC,mCAAmC,CAAC,YAAY,CAAC;;mEAC5C"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Why an INCIDENT cannot take a response-unit dispatch, whatever unit is chosen. */
|
|
2
|
+
export var IncidentDispatchBlocker;
|
|
3
|
+
(function (IncidentDispatchBlocker) {
|
|
4
|
+
/** Resolved, closed, unresolved or archived. */
|
|
5
|
+
IncidentDispatchBlocker["INCIDENT_ENDED"] = "INCIDENT_ENDED";
|
|
6
|
+
/** A grievance, not an emergency. */
|
|
7
|
+
IncidentDispatchBlocker["NOT_AN_EMERGENCY_INCIDENT"] = "NOT_AN_EMERGENCY_INCIDENT";
|
|
8
|
+
/**
|
|
9
|
+
* The incident does not reach the control room: the reporter was not
|
|
10
|
+
* entitled to a provider response, or declined one. Sending a unit IS the
|
|
11
|
+
* provider response, so the rule that keeps the alert off the control room's
|
|
12
|
+
* screens also keeps it from being dispatched - see `reachesControlRoom`.
|
|
13
|
+
*/
|
|
14
|
+
IncidentDispatchBlocker["PROVIDER_RESPONSE_NOT_REQUESTED"] = "PROVIDER_RESPONSE_NOT_REQUESTED";
|
|
15
|
+
/** Response-unit dispatch is switched off platform-wide. */
|
|
16
|
+
IncidentDispatchBlocker["DISPATCH_DISABLED"] = "DISPATCH_DISABLED";
|
|
17
|
+
})(IncidentDispatchBlocker || (IncidentDispatchBlocker = {}));
|
|
18
|
+
//# sourceMappingURL=incident-dispatch-blocker.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"incident-dispatch-blocker.enum.js","sourceRoot":"","sources":["../../../../../src/modules/dispatch/enums/incident-dispatch-blocker.enum.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,MAAM,CAAN,IAAY,uBAcX;AAdD,WAAY,uBAAuB;IAC/B,gDAAgD;IAChD,4DAAiC,CAAA;IACjC,qCAAqC;IACrC,kFAAuD,CAAA;IACvD;;;;;OAKG;IACH,8FAAmE,CAAA;IACnE,4DAA4D;IAC5D,kEAAuC,CAAA;AAC3C,CAAC,EAdW,uBAAuB,KAAvB,uBAAuB,QAclC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Where an incident's capability requirement came from. */
|
|
2
|
+
export var ResponseCapabilityRequirementSource;
|
|
3
|
+
(function (ResponseCapabilityRequirementSource) {
|
|
4
|
+
ResponseCapabilityRequirementSource["INCIDENT_TYPE"] = "INCIDENT_TYPE";
|
|
5
|
+
ResponseCapabilityRequirementSource["INCIDENT_CATEGORY"] = "INCIDENT_CATEGORY";
|
|
6
|
+
/** Neither the type nor the category names one. */
|
|
7
|
+
ResponseCapabilityRequirementSource["NONE"] = "NONE";
|
|
8
|
+
})(ResponseCapabilityRequirementSource || (ResponseCapabilityRequirementSource = {}));
|
|
9
|
+
//# sourceMappingURL=response-capability-requirement-source.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-capability-requirement-source.enum.js","sourceRoot":"","sources":["../../../../../src/modules/dispatch/enums/response-capability-requirement-source.enum.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,MAAM,CAAN,IAAY,mCAKX;AALD,WAAY,mCAAmC;IAC3C,sEAA+B,CAAA;IAC/B,8EAAuC,CAAA;IACvC,mDAAmD;IACnD,oDAAa,CAAA;AACjB,CAAC,EALW,mCAAmC,KAAnC,mCAAmC,QAK9C"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a unit's capabilities compare with what the incident needs.
|
|
3
|
+
*
|
|
4
|
+
* UNKNOWN and NOT_SUITED are deliberately different answers: UNKNOWN means
|
|
5
|
+
* nobody said what the unit does (it ranks below a match but stays
|
|
6
|
+
* recommendable), NOT_SUITED means somebody did and it is not this. Treating
|
|
7
|
+
* missing configuration as "not suitable" would hide every unit of an
|
|
8
|
+
* organization that has not configured capabilities yet.
|
|
9
|
+
*/
|
|
10
|
+
export var ResponseUnitCapabilityMatch;
|
|
11
|
+
(function (ResponseUnitCapabilityMatch) {
|
|
12
|
+
/** The incident needs a capability and the unit has one of them. */
|
|
13
|
+
ResponseUnitCapabilityMatch["MATCH"] = "MATCH";
|
|
14
|
+
/** The incident's type and category name no requirement - any unit fits. */
|
|
15
|
+
ResponseUnitCapabilityMatch["NOT_REQUIRED"] = "NOT_REQUIRED";
|
|
16
|
+
/** The incident needs a capability; the unit's capabilities are unknown. */
|
|
17
|
+
ResponseUnitCapabilityMatch["UNKNOWN"] = "UNKNOWN";
|
|
18
|
+
/** The unit's known capabilities do not include what the incident needs. */
|
|
19
|
+
ResponseUnitCapabilityMatch["NOT_SUITED"] = "NOT_SUITED";
|
|
20
|
+
})(ResponseUnitCapabilityMatch || (ResponseUnitCapabilityMatch = {}));
|
|
21
|
+
//# sourceMappingURL=response-unit-capability-match.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-unit-capability-match.enum.js","sourceRoot":"","sources":["../../../../../src/modules/dispatch/enums/response-unit-capability-match.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,2BASX;AATD,WAAY,2BAA2B;IACnC,oEAAoE;IACpE,8CAAe,CAAA;IACf,4EAA4E;IAC5E,4DAA6B,CAAA;IAC7B,4EAA4E;IAC5E,kDAAmB,CAAA;IACnB,4EAA4E;IAC5E,wDAAyB,CAAA;AAC7B,CAAC,EATW,2BAA2B,KAA3B,2BAA2B,QAStC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Why a unit cannot be dispatched (a BLOCKER) or, while it can be dispatched by
|
|
3
|
+
* hand, is not recommended (a CAUTION). One vocabulary for both so the admin
|
|
4
|
+
* explains either with the same words.
|
|
5
|
+
*/
|
|
6
|
+
export var ResponseUnitDispatchConstraint;
|
|
7
|
+
(function (ResponseUnitDispatchConstraint) {
|
|
8
|
+
// ---- Blockers: the server refuses a dispatch of this unit ----
|
|
9
|
+
/** Switched off in the organization. */
|
|
10
|
+
ResponseUnitDispatchConstraint["INACTIVE"] = "INACTIVE";
|
|
11
|
+
/** Non-operational, off duty, on leave or in training. */
|
|
12
|
+
ResponseUnitDispatchConstraint["OPERATIONALLY_UNAVAILABLE"] = "OPERATIONALLY_UNAVAILABLE";
|
|
13
|
+
/** Out on another job (an active dispatch, or a manual Engaged / On Mission status). */
|
|
14
|
+
ResponseUnitDispatchConstraint["ENGAGED"] = "ENGAGED";
|
|
15
|
+
/** Already has an active dispatch to THIS incident. */
|
|
16
|
+
ResponseUnitDispatchConstraint["ALREADY_DISPATCHED"] = "ALREADY_DISPATCHED";
|
|
17
|
+
/** Belongs to another control centre and cross-control-centre dispatch is off. */
|
|
18
|
+
ResponseUnitDispatchConstraint["OTHER_CONTROL_CENTRE"] = "OTHER_CONTROL_CENTRE";
|
|
19
|
+
/** Not suited, and the platform is configured to require a capability match. */
|
|
20
|
+
ResponseUnitDispatchConstraint["CAPABILITY_REQUIRED"] = "CAPABILITY_REQUIRED";
|
|
21
|
+
// ---- Cautions: dispatchable by hand, never recommended ----
|
|
22
|
+
/** Its known capabilities do not include what the incident needs. */
|
|
23
|
+
ResponseUnitDispatchConstraint["NOT_SUITED"] = "NOT_SUITED";
|
|
24
|
+
/** No position at all, or the tracking service has it offline. */
|
|
25
|
+
ResponseUnitDispatchConstraint["NO_LOCATION"] = "NO_LOCATION";
|
|
26
|
+
/** A stale live fix, and stale positions are configured not to be recommended. */
|
|
27
|
+
ResponseUnitDispatchConstraint["LOCATION_STALE"] = "LOCATION_STALE";
|
|
28
|
+
/** Live-tracked, but outside the search radius. */
|
|
29
|
+
ResponseUnitDispatchConstraint["OUTSIDE_SEARCH_AREA"] = "OUTSIDE_SEARCH_AREA";
|
|
30
|
+
})(ResponseUnitDispatchConstraint || (ResponseUnitDispatchConstraint = {}));
|
|
31
|
+
//# sourceMappingURL=response-unit-dispatch-constraint.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-unit-dispatch-constraint.enum.js","sourceRoot":"","sources":["../../../../../src/modules/dispatch/enums/response-unit-dispatch-constraint.enum.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAN,IAAY,8BAwBX;AAxBD,WAAY,8BAA8B;IACtC,iEAAiE;IACjE,wCAAwC;IACxC,uDAAqB,CAAA;IACrB,0DAA0D;IAC1D,yFAAuD,CAAA;IACvD,wFAAwF;IACxF,qDAAmB,CAAA;IACnB,uDAAuD;IACvD,2EAAyC,CAAA;IACzC,kFAAkF;IAClF,+EAA6C,CAAA;IAC7C,gFAAgF;IAChF,6EAA2C,CAAA;IAE3C,8DAA8D;IAC9D,qEAAqE;IACrE,2DAAyB,CAAA;IACzB,kEAAkE;IAClE,6DAA2B,CAAA;IAC3B,kFAAkF;IAClF,mEAAiC,CAAA;IACjC,mDAAmD;IACnD,6EAA2C,CAAA;AAC/C,CAAC,EAxBW,8BAA8B,KAA9B,8BAA8B,QAwBzC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Machine-readable codes on a refused recommend/dispatch request (the `code` of
|
|
3
|
+
* the error body), so a client can react without parsing a sentence. A 409 says
|
|
4
|
+
* "the world changed since you looked - refresh"; other 4xx say "this was never
|
|
5
|
+
* going to work".
|
|
6
|
+
*/
|
|
7
|
+
export var ResponseUnitDispatchErrorCode;
|
|
8
|
+
(function (ResponseUnitDispatchErrorCode) {
|
|
9
|
+
ResponseUnitDispatchErrorCode["INCIDENT_NOT_DISPATCHABLE"] = "INCIDENT_NOT_DISPATCHABLE";
|
|
10
|
+
ResponseUnitDispatchErrorCode["RESPONSE_UNIT_NOT_FOUND"] = "RESPONSE_UNIT_NOT_FOUND";
|
|
11
|
+
ResponseUnitDispatchErrorCode["RESPONSE_UNIT_NOT_DISPATCHABLE"] = "RESPONSE_UNIT_NOT_DISPATCHABLE";
|
|
12
|
+
/** Another dispatcher got there first - the unit is out on a job. */
|
|
13
|
+
ResponseUnitDispatchErrorCode["RESPONSE_UNIT_ENGAGED"] = "RESPONSE_UNIT_ENGAGED";
|
|
14
|
+
ResponseUnitDispatchErrorCode["RESPONSE_UNIT_ALREADY_DISPATCHED"] = "RESPONSE_UNIT_ALREADY_DISPATCHED";
|
|
15
|
+
/** The same Idempotency-Key was used for a different unit. */
|
|
16
|
+
ResponseUnitDispatchErrorCode["IDEMPOTENCY_KEY_REUSED"] = "IDEMPOTENCY_KEY_REUSED";
|
|
17
|
+
ResponseUnitDispatchErrorCode["DISPATCH_NOT_FOUND"] = "DISPATCH_NOT_FOUND";
|
|
18
|
+
ResponseUnitDispatchErrorCode["INVALID_STATUS_TRANSITION"] = "INVALID_STATUS_TRANSITION";
|
|
19
|
+
ResponseUnitDispatchErrorCode["NOTIFICATION_NOT_RESENDABLE"] = "NOTIFICATION_NOT_RESENDABLE";
|
|
20
|
+
/** clarion-organization could not be reached: nothing can be verified, so nothing is sent. */
|
|
21
|
+
ResponseUnitDispatchErrorCode["ORGANIZATION_UNAVAILABLE"] = "ORGANIZATION_UNAVAILABLE";
|
|
22
|
+
})(ResponseUnitDispatchErrorCode || (ResponseUnitDispatchErrorCode = {}));
|
|
23
|
+
//# sourceMappingURL=response-unit-dispatch-error-code.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-unit-dispatch-error-code.enum.js","sourceRoot":"","sources":["../../../../../src/modules/dispatch/enums/response-unit-dispatch-error-code.enum.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,6BAcX;AAdD,WAAY,6BAA6B;IACrC,wFAAuD,CAAA;IACvD,oFAAmD,CAAA;IACnD,kGAAiE,CAAA;IACjE,qEAAqE;IACrE,gFAA+C,CAAA;IAC/C,sGAAqE,CAAA;IACrE,8DAA8D;IAC9D,kFAAiD,CAAA;IACjD,0EAAyC,CAAA;IACzC,wFAAuD,CAAA;IACvD,4FAA2D,CAAA;IAC3D,8FAA8F;IAC9F,sFAAqD,CAAA;AACzD,CAAC,EAdW,6BAA6B,KAA7B,6BAA6B,QAcxC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Why a dispatch message was not sent. */
|
|
2
|
+
export var ResponseUnitDispatchNotificationFailure;
|
|
3
|
+
(function (ResponseUnitDispatchNotificationFailure) {
|
|
4
|
+
/** The unit has no phone number. */
|
|
5
|
+
ResponseUnitDispatchNotificationFailure["NO_PHONE_NUMBER"] = "NO_PHONE_NUMBER";
|
|
6
|
+
/** The number on the unit is not one any provider can send to. */
|
|
7
|
+
ResponseUnitDispatchNotificationFailure["INVALID_PHONE_NUMBER"] = "INVALID_PHONE_NUMBER";
|
|
8
|
+
/** Every provider in the country's chain failed. */
|
|
9
|
+
ResponseUnitDispatchNotificationFailure["PROVIDER_FAILURE"] = "PROVIDER_FAILURE";
|
|
10
|
+
/** No SMS provider is configured for the number's country. */
|
|
11
|
+
ResponseUnitDispatchNotificationFailure["NOT_CONFIGURED"] = "NOT_CONFIGURED";
|
|
12
|
+
/** clarion-notification never answered, so nobody knows. Sending again is the remedy. */
|
|
13
|
+
ResponseUnitDispatchNotificationFailure["NO_RESPONSE"] = "NO_RESPONSE";
|
|
14
|
+
})(ResponseUnitDispatchNotificationFailure || (ResponseUnitDispatchNotificationFailure = {}));
|
|
15
|
+
//# sourceMappingURL=response-unit-dispatch-notification-failure.enum.js.map
|
package/dist/esm/modules/dispatch/enums/response-unit-dispatch-notification-failure.enum.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-unit-dispatch-notification-failure.enum.js","sourceRoot":"","sources":["../../../../../src/modules/dispatch/enums/response-unit-dispatch-notification-failure.enum.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,MAAM,CAAN,IAAY,uCAWX;AAXD,WAAY,uCAAuC;IAC/C,oCAAoC;IACpC,8EAAmC,CAAA;IACnC,kEAAkE;IAClE,wFAA6C,CAAA;IAC7C,oDAAoD;IACpD,gFAAqC,CAAA;IACrC,8DAA8D;IAC9D,4EAAiC,CAAA;IACjC,yFAAyF;IACzF,sEAA2B,CAAA;AAC/B,CAAC,EAXW,uCAAuC,KAAvC,uCAAuC,QAWlD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** What happened to the message telling the unit it was dispatched. */
|
|
2
|
+
export var ResponseUnitDispatchNotificationStatus;
|
|
3
|
+
(function (ResponseUnitDispatchNotificationStatus) {
|
|
4
|
+
/** Requested from clarion-notification; no answer yet. */
|
|
5
|
+
ResponseUnitDispatchNotificationStatus["PENDING"] = "PENDING";
|
|
6
|
+
/** A provider accepted it. (Handset delivery is not tracked by the platform.) */
|
|
7
|
+
ResponseUnitDispatchNotificationStatus["SENT"] = "SENT";
|
|
8
|
+
/** Every provider refused or failed; it can be sent again. */
|
|
9
|
+
ResponseUnitDispatchNotificationStatus["FAILED"] = "FAILED";
|
|
10
|
+
/** Could never be sent - the unit has no usable phone number. The dispatch stands. */
|
|
11
|
+
ResponseUnitDispatchNotificationStatus["NOT_POSSIBLE"] = "NOT_POSSIBLE";
|
|
12
|
+
})(ResponseUnitDispatchNotificationStatus || (ResponseUnitDispatchNotificationStatus = {}));
|
|
13
|
+
//# sourceMappingURL=response-unit-dispatch-notification-status.enum.js.map
|
package/dist/esm/modules/dispatch/enums/response-unit-dispatch-notification-status.enum.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-unit-dispatch-notification-status.enum.js","sourceRoot":"","sources":["../../../../../src/modules/dispatch/enums/response-unit-dispatch-notification-status.enum.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,MAAM,CAAN,IAAY,sCASX;AATD,WAAY,sCAAsC;IAC9C,0DAA0D;IAC1D,6DAAmB,CAAA;IACnB,iFAAiF;IACjF,uDAAa,CAAA;IACb,8DAA8D;IAC9D,2DAAiB,CAAA;IACjB,sFAAsF;IACtF,uEAA6B,CAAA;AACjC,CAAC,EATW,sCAAsC,KAAtC,sCAAsC,QASjD"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where one response unit is in answering one incident.
|
|
3
|
+
*
|
|
4
|
+
* Only DISPATCHED is set by the dispatch command itself. The middle states exist
|
|
5
|
+
* so the record can be advanced by whoever learns of progress - a dispatcher
|
|
6
|
+
* relaying a radio call today, the responder app or clarion-workflow later -
|
|
7
|
+
* without a schema change. Nothing in this platform advances them on a timer:
|
|
8
|
+
* escalation, reassignment and SLA belong to the workflow layer.
|
|
9
|
+
*
|
|
10
|
+
* ACTIVE = DISPATCHED, ACKNOWLEDGED, EN_ROUTE, ON_SCENE. A unit may hold at most
|
|
11
|
+
* ONE active dispatch across every incident - a partial unique index in
|
|
12
|
+
* clarion-incident enforces it, which is what stops two dispatchers sending the
|
|
13
|
+
* same unit to two emergencies.
|
|
14
|
+
*/
|
|
15
|
+
export var ResponseUnitDispatchStatus;
|
|
16
|
+
(function (ResponseUnitDispatchStatus) {
|
|
17
|
+
/** Sent: the command was accepted and the unit was asked to respond. */
|
|
18
|
+
ResponseUnitDispatchStatus["DISPATCHED"] = "DISPATCHED";
|
|
19
|
+
/** The unit confirmed it received the job. */
|
|
20
|
+
ResponseUnitDispatchStatus["ACKNOWLEDGED"] = "ACKNOWLEDGED";
|
|
21
|
+
/** On the way. */
|
|
22
|
+
ResponseUnitDispatchStatus["EN_ROUTE"] = "EN_ROUTE";
|
|
23
|
+
/** Arrived at the incident. */
|
|
24
|
+
ResponseUnitDispatchStatus["ON_SCENE"] = "ON_SCENE";
|
|
25
|
+
/** Finished - by the dispatcher, or because the incident itself ended. */
|
|
26
|
+
ResponseUnitDispatchStatus["COMPLETED"] = "COMPLETED";
|
|
27
|
+
/** Stood down before finishing. Frees the unit. */
|
|
28
|
+
ResponseUnitDispatchStatus["CANCELLED"] = "CANCELLED";
|
|
29
|
+
})(ResponseUnitDispatchStatus || (ResponseUnitDispatchStatus = {}));
|
|
30
|
+
//# sourceMappingURL=response-unit-dispatch-status.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-unit-dispatch-status.enum.js","sourceRoot":"","sources":["../../../../../src/modules/dispatch/enums/response-unit-dispatch-status.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAN,IAAY,0BAaX;AAbD,WAAY,0BAA0B;IAClC,wEAAwE;IACxE,uDAAyB,CAAA;IACzB,8CAA8C;IAC9C,2DAA6B,CAAA;IAC7B,kBAAkB;IAClB,mDAAqB,CAAA;IACrB,+BAA+B;IAC/B,mDAAqB,CAAA;IACrB,0EAA0E;IAC1E,qDAAuB,CAAA;IACvB,mDAAmD;IACnD,qDAAuB,CAAA;AAC3B,CAAC,EAbW,0BAA0B,KAA1B,0BAA0B,QAarC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Who moved a dispatch to its current status. Recorded for the audit trail. */
|
|
2
|
+
export var ResponseUnitDispatchTransitionSource;
|
|
3
|
+
(function (ResponseUnitDispatchTransitionSource) {
|
|
4
|
+
/** A control-room user, through the admin or the API. */
|
|
5
|
+
ResponseUnitDispatchTransitionSource["DISPATCHER"] = "DISPATCHER";
|
|
6
|
+
/** The incident ended (resolved, closed...), so its active dispatches were completed. */
|
|
7
|
+
ResponseUnitDispatchTransitionSource["INCIDENT_LIFECYCLE"] = "INCIDENT_LIFECYCLE";
|
|
8
|
+
/** Reserved for the responder app. */
|
|
9
|
+
ResponseUnitDispatchTransitionSource["RESPONDER"] = "RESPONDER";
|
|
10
|
+
/** Reserved for clarion-workflow orchestration. */
|
|
11
|
+
ResponseUnitDispatchTransitionSource["WORKFLOW"] = "WORKFLOW";
|
|
12
|
+
})(ResponseUnitDispatchTransitionSource || (ResponseUnitDispatchTransitionSource = {}));
|
|
13
|
+
//# sourceMappingURL=response-unit-dispatch-transition-source.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-unit-dispatch-transition-source.enum.js","sourceRoot":"","sources":["../../../../../src/modules/dispatch/enums/response-unit-dispatch-transition-source.enum.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,MAAM,CAAN,IAAY,oCASX;AATD,WAAY,oCAAoC;IAC5C,yDAAyD;IACzD,iEAAyB,CAAA;IACzB,yFAAyF;IACzF,iFAAyC,CAAA;IACzC,sCAAsC;IACtC,+DAAuB,CAAA;IACvB,mDAAmD;IACnD,6DAAqB,CAAA;AACzB,CAAC,EATW,oCAAoC,KAApC,oCAAoC,QAS/C"}
|