grm-shared-library 1.1.235 → 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.
Files changed (262) hide show
  1. package/README.md +24 -0
  2. package/dist/cjs/index.js +1 -0
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/kafka/topics.js +10 -0
  5. package/dist/cjs/kafka/topics.js.map +1 -1
  6. package/dist/cjs/modules/dispatch/constants/response-unit-dispatch-defaults.const.js +55 -0
  7. package/dist/cjs/modules/dispatch/constants/response-unit-dispatch-defaults.const.js.map +1 -0
  8. package/dist/cjs/modules/dispatch/constants/response-unit-dispatch-kafka.const.js +21 -0
  9. package/dist/cjs/modules/dispatch/constants/response-unit-dispatch-kafka.const.js.map +1 -0
  10. package/dist/cjs/modules/dispatch/dtos/dispatch-response-unit.dto.js +58 -0
  11. package/dist/cjs/modules/dispatch/dtos/dispatch-response-unit.dto.js.map +1 -0
  12. package/dist/cjs/modules/dispatch/dtos/response-unit-dispatch-notification.dto.js +230 -0
  13. package/dist/cjs/modules/dispatch/dtos/response-unit-dispatch-notification.dto.js.map +1 -0
  14. package/dist/cjs/modules/dispatch/dtos/response-unit-dispatch-profile-query.dto.js +61 -0
  15. package/dist/cjs/modules/dispatch/dtos/response-unit-dispatch-profile-query.dto.js.map +1 -0
  16. package/dist/cjs/modules/dispatch/dtos/response-unit-nearby-query.dto.js +66 -0
  17. package/dist/cjs/modules/dispatch/dtos/response-unit-nearby-query.dto.js.map +1 -0
  18. package/dist/cjs/modules/dispatch/dtos/update-response-unit-dispatch-status.dto.js +41 -0
  19. package/dist/cjs/modules/dispatch/dtos/update-response-unit-dispatch-status.dto.js.map +1 -0
  20. package/dist/cjs/modules/dispatch/enums/incident-dispatch-blocker.enum.js +21 -0
  21. package/dist/cjs/modules/dispatch/enums/incident-dispatch-blocker.enum.js.map +1 -0
  22. package/dist/cjs/modules/dispatch/enums/response-capability-requirement-source.enum.js +12 -0
  23. package/dist/cjs/modules/dispatch/enums/response-capability-requirement-source.enum.js.map +1 -0
  24. package/dist/cjs/modules/dispatch/enums/response-unit-capability-match.enum.js +24 -0
  25. package/dist/cjs/modules/dispatch/enums/response-unit-capability-match.enum.js.map +1 -0
  26. package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-constraint.enum.js +34 -0
  27. package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-constraint.enum.js.map +1 -0
  28. package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-error-code.enum.js +26 -0
  29. package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-error-code.enum.js.map +1 -0
  30. package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-notification-failure.enum.js +18 -0
  31. package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-notification-failure.enum.js.map +1 -0
  32. package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-notification-status.enum.js +16 -0
  33. package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-notification-status.enum.js.map +1 -0
  34. package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-status.enum.js +33 -0
  35. package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-status.enum.js.map +1 -0
  36. package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-transition-source.enum.js +16 -0
  37. package/dist/cjs/modules/dispatch/enums/response-unit-dispatch-transition-source.enum.js.map +1 -0
  38. package/dist/cjs/modules/dispatch/enums/response-unit-distance-basis.enum.js +12 -0
  39. package/dist/cjs/modules/dispatch/enums/response-unit-distance-basis.enum.js.map +1 -0
  40. package/dist/cjs/modules/dispatch/enums/response-unit-location-freshness.enum.js +21 -0
  41. package/dist/cjs/modules/dispatch/enums/response-unit-location-freshness.enum.js.map +1 -0
  42. package/dist/cjs/modules/dispatch/enums/response-unit-location-source.enum.js +17 -0
  43. package/dist/cjs/modules/dispatch/enums/response-unit-location-source.enum.js.map +1 -0
  44. package/dist/cjs/modules/dispatch/enums/response-unit-recommendation-reason.enum.js +25 -0
  45. package/dist/cjs/modules/dispatch/enums/response-unit-recommendation-reason.enum.js.map +1 -0
  46. package/dist/cjs/modules/dispatch/enums/response-unit-recommendation-status.enum.js +23 -0
  47. package/dist/cjs/modules/dispatch/enums/response-unit-recommendation-status.enum.js.map +1 -0
  48. package/dist/cjs/modules/dispatch/index.js +53 -0
  49. package/dist/cjs/modules/dispatch/index.js.map +1 -0
  50. package/dist/cjs/modules/dispatch/interfaces/incident-response-unit-dispatch.js +3 -0
  51. package/dist/cjs/modules/dispatch/interfaces/incident-response-unit-dispatch.js.map +1 -0
  52. package/dist/cjs/modules/dispatch/interfaces/response-unit-dispatch-events.js +3 -0
  53. package/dist/cjs/modules/dispatch/interfaces/response-unit-dispatch-events.js.map +1 -0
  54. package/dist/cjs/modules/dispatch/interfaces/response-unit-dispatch-profile.js +3 -0
  55. package/dist/cjs/modules/dispatch/interfaces/response-unit-dispatch-profile.js.map +1 -0
  56. package/dist/cjs/modules/dispatch/interfaces/response-unit-proximity.js +3 -0
  57. package/dist/cjs/modules/dispatch/interfaces/response-unit-proximity.js.map +1 -0
  58. package/dist/cjs/modules/dispatch/interfaces/response-unit-recommendation.js +3 -0
  59. package/dist/cjs/modules/dispatch/interfaces/response-unit-recommendation.js.map +1 -0
  60. package/dist/cjs/modules/dispatch/utils/dispatch-geo.util.js +44 -0
  61. package/dist/cjs/modules/dispatch/utils/dispatch-geo.util.js.map +1 -0
  62. package/dist/cjs/modules/dispatch/utils/incident-dispatchability.util.js +42 -0
  63. package/dist/cjs/modules/dispatch/utils/incident-dispatchability.util.js.map +1 -0
  64. package/dist/cjs/modules/dispatch/utils/response-capability-match.util.js +44 -0
  65. package/dist/cjs/modules/dispatch/utils/response-capability-match.util.js.map +1 -0
  66. package/dist/cjs/modules/dispatch/utils/response-unit-dispatch-event.util.js +19 -0
  67. package/dist/cjs/modules/dispatch/utils/response-unit-dispatch-event.util.js.map +1 -0
  68. package/dist/cjs/modules/dispatch/utils/response-unit-dispatch-status.util.js +49 -0
  69. package/dist/cjs/modules/dispatch/utils/response-unit-dispatch-status.util.js.map +1 -0
  70. package/dist/cjs/modules/incident/dtos/category/create-incident-category.dto.js +9 -0
  71. package/dist/cjs/modules/incident/dtos/category/create-incident-category.dto.js.map +1 -1
  72. package/dist/cjs/modules/incident/dtos/type/create-incident-type.dto.js +9 -0
  73. package/dist/cjs/modules/incident/dtos/type/create-incident-type.dto.js.map +1 -1
  74. package/dist/cjs/modules/incident/enums/incident-actions.enum.js +4 -0
  75. package/dist/cjs/modules/incident/enums/incident-actions.enum.js.map +1 -1
  76. package/dist/cjs/modules/notification/dtos/notification-analytics-query.dto.js +56 -0
  77. package/dist/cjs/modules/notification/dtos/notification-analytics-query.dto.js.map +1 -0
  78. package/dist/cjs/modules/notification/index.js +3 -0
  79. package/dist/cjs/modules/notification/index.js.map +1 -1
  80. package/dist/cjs/modules/notification/interfaces/notification-analytics.js +27 -0
  81. package/dist/cjs/modules/notification/interfaces/notification-analytics.js.map +1 -0
  82. package/dist/cjs/modules/permission/data/permissions.data.js +9 -0
  83. package/dist/cjs/modules/permission/data/permissions.data.js.map +1 -1
  84. package/dist/cjs/modules/permission/enums/permission-actions.enum.js +19 -0
  85. package/dist/cjs/modules/permission/enums/permission-actions.enum.js.map +1 -1
  86. package/dist/cjs/modules/permission/enums/permissions-module.enum.js +1 -0
  87. package/dist/cjs/modules/permission/enums/permissions-module.enum.js.map +1 -1
  88. package/dist/cjs/modules/response-unit/dtos/response-unit/base-response-unit.dto.js +9 -0
  89. package/dist/cjs/modules/response-unit/dtos/response-unit/base-response-unit.dto.js.map +1 -1
  90. package/dist/cjs/modules/response-unit/enums/response-unit/response-capability.enum.js +29 -0
  91. package/dist/cjs/modules/response-unit/enums/response-unit/response-capability.enum.js.map +1 -0
  92. package/dist/cjs/modules/response-unit/enums/response-unit/response-unit-availability.enum.js +27 -0
  93. package/dist/cjs/modules/response-unit/enums/response-unit/response-unit-availability.enum.js.map +1 -0
  94. package/dist/cjs/modules/response-unit/index.js +5 -0
  95. package/dist/cjs/modules/response-unit/index.js.map +1 -1
  96. package/dist/cjs/modules/response-unit/utils/response-capability.util.js +74 -0
  97. package/dist/cjs/modules/response-unit/utils/response-capability.util.js.map +1 -0
  98. package/dist/cjs/modules/response-unit/utils/response-unit-availability.util.js +46 -0
  99. package/dist/cjs/modules/response-unit/utils/response-unit-availability.util.js.map +1 -0
  100. package/dist/cjs/modules/role/data/roles.data.js +27 -0
  101. package/dist/cjs/modules/role/data/roles.data.js.map +1 -1
  102. package/dist/cjs/modules/sms/constants/sms-templates.config.js +18 -0
  103. package/dist/cjs/modules/sms/constants/sms-templates.config.js.map +1 -1
  104. package/dist/cjs/modules/sms/enums/sms-template.enum.js +1 -0
  105. package/dist/cjs/modules/sms/enums/sms-template.enum.js.map +1 -1
  106. package/dist/esm/index.js +1 -0
  107. package/dist/esm/index.js.map +1 -1
  108. package/dist/esm/kafka/topics.js +10 -0
  109. package/dist/esm/kafka/topics.js.map +1 -1
  110. package/dist/esm/modules/dispatch/constants/response-unit-dispatch-defaults.const.js +52 -0
  111. package/dist/esm/modules/dispatch/constants/response-unit-dispatch-defaults.const.js.map +1 -0
  112. package/dist/esm/modules/dispatch/constants/response-unit-dispatch-kafka.const.js +18 -0
  113. package/dist/esm/modules/dispatch/constants/response-unit-dispatch-kafka.const.js.map +1 -0
  114. package/dist/esm/modules/dispatch/dtos/dispatch-response-unit.dto.js +54 -0
  115. package/dist/esm/modules/dispatch/dtos/dispatch-response-unit.dto.js.map +1 -0
  116. package/dist/esm/modules/dispatch/dtos/response-unit-dispatch-notification.dto.js +223 -0
  117. package/dist/esm/modules/dispatch/dtos/response-unit-dispatch-notification.dto.js.map +1 -0
  118. package/dist/esm/modules/dispatch/dtos/response-unit-dispatch-profile-query.dto.js +57 -0
  119. package/dist/esm/modules/dispatch/dtos/response-unit-dispatch-profile-query.dto.js.map +1 -0
  120. package/dist/esm/modules/dispatch/dtos/response-unit-nearby-query.dto.js +62 -0
  121. package/dist/esm/modules/dispatch/dtos/response-unit-nearby-query.dto.js.map +1 -0
  122. package/dist/esm/modules/dispatch/dtos/update-response-unit-dispatch-status.dto.js +37 -0
  123. package/dist/esm/modules/dispatch/dtos/update-response-unit-dispatch-status.dto.js.map +1 -0
  124. package/dist/esm/modules/dispatch/enums/incident-dispatch-blocker.enum.js +18 -0
  125. package/dist/esm/modules/dispatch/enums/incident-dispatch-blocker.enum.js.map +1 -0
  126. package/dist/esm/modules/dispatch/enums/response-capability-requirement-source.enum.js +9 -0
  127. package/dist/esm/modules/dispatch/enums/response-capability-requirement-source.enum.js.map +1 -0
  128. package/dist/esm/modules/dispatch/enums/response-unit-capability-match.enum.js +21 -0
  129. package/dist/esm/modules/dispatch/enums/response-unit-capability-match.enum.js.map +1 -0
  130. package/dist/esm/modules/dispatch/enums/response-unit-dispatch-constraint.enum.js +31 -0
  131. package/dist/esm/modules/dispatch/enums/response-unit-dispatch-constraint.enum.js.map +1 -0
  132. package/dist/esm/modules/dispatch/enums/response-unit-dispatch-error-code.enum.js +23 -0
  133. package/dist/esm/modules/dispatch/enums/response-unit-dispatch-error-code.enum.js.map +1 -0
  134. package/dist/esm/modules/dispatch/enums/response-unit-dispatch-notification-failure.enum.js +15 -0
  135. package/dist/esm/modules/dispatch/enums/response-unit-dispatch-notification-failure.enum.js.map +1 -0
  136. package/dist/esm/modules/dispatch/enums/response-unit-dispatch-notification-status.enum.js +13 -0
  137. package/dist/esm/modules/dispatch/enums/response-unit-dispatch-notification-status.enum.js.map +1 -0
  138. package/dist/esm/modules/dispatch/enums/response-unit-dispatch-status.enum.js +30 -0
  139. package/dist/esm/modules/dispatch/enums/response-unit-dispatch-status.enum.js.map +1 -0
  140. package/dist/esm/modules/dispatch/enums/response-unit-dispatch-transition-source.enum.js +13 -0
  141. package/dist/esm/modules/dispatch/enums/response-unit-dispatch-transition-source.enum.js.map +1 -0
  142. package/dist/esm/modules/dispatch/enums/response-unit-distance-basis.enum.js +9 -0
  143. package/dist/esm/modules/dispatch/enums/response-unit-distance-basis.enum.js.map +1 -0
  144. package/dist/esm/modules/dispatch/enums/response-unit-location-freshness.enum.js +18 -0
  145. package/dist/esm/modules/dispatch/enums/response-unit-location-freshness.enum.js.map +1 -0
  146. package/dist/esm/modules/dispatch/enums/response-unit-location-source.enum.js +14 -0
  147. package/dist/esm/modules/dispatch/enums/response-unit-location-source.enum.js.map +1 -0
  148. package/dist/esm/modules/dispatch/enums/response-unit-recommendation-reason.enum.js +22 -0
  149. package/dist/esm/modules/dispatch/enums/response-unit-recommendation-reason.enum.js.map +1 -0
  150. package/dist/esm/modules/dispatch/enums/response-unit-recommendation-status.enum.js +20 -0
  151. package/dist/esm/modules/dispatch/enums/response-unit-recommendation-status.enum.js.map +1 -0
  152. package/dist/esm/modules/dispatch/index.js +37 -0
  153. package/dist/esm/modules/dispatch/index.js.map +1 -0
  154. package/dist/esm/modules/dispatch/interfaces/incident-response-unit-dispatch.js +2 -0
  155. package/dist/esm/modules/dispatch/interfaces/incident-response-unit-dispatch.js.map +1 -0
  156. package/dist/esm/modules/dispatch/interfaces/response-unit-dispatch-events.js +2 -0
  157. package/dist/esm/modules/dispatch/interfaces/response-unit-dispatch-events.js.map +1 -0
  158. package/dist/esm/modules/dispatch/interfaces/response-unit-dispatch-profile.js +2 -0
  159. package/dist/esm/modules/dispatch/interfaces/response-unit-dispatch-profile.js.map +1 -0
  160. package/dist/esm/modules/dispatch/interfaces/response-unit-proximity.js +2 -0
  161. package/dist/esm/modules/dispatch/interfaces/response-unit-proximity.js.map +1 -0
  162. package/dist/esm/modules/dispatch/interfaces/response-unit-recommendation.js +2 -0
  163. package/dist/esm/modules/dispatch/interfaces/response-unit-recommendation.js.map +1 -0
  164. package/dist/esm/modules/dispatch/utils/dispatch-geo.util.js +39 -0
  165. package/dist/esm/modules/dispatch/utils/dispatch-geo.util.js.map +1 -0
  166. package/dist/esm/modules/dispatch/utils/incident-dispatchability.util.js +37 -0
  167. package/dist/esm/modules/dispatch/utils/incident-dispatchability.util.js.map +1 -0
  168. package/dist/esm/modules/dispatch/utils/response-capability-match.util.js +40 -0
  169. package/dist/esm/modules/dispatch/utils/response-capability-match.util.js.map +1 -0
  170. package/dist/esm/modules/dispatch/utils/response-unit-dispatch-event.util.js +15 -0
  171. package/dist/esm/modules/dispatch/utils/response-unit-dispatch-event.util.js.map +1 -0
  172. package/dist/esm/modules/dispatch/utils/response-unit-dispatch-status.util.js +42 -0
  173. package/dist/esm/modules/dispatch/utils/response-unit-dispatch-status.util.js.map +1 -0
  174. package/dist/esm/modules/incident/dtos/category/create-incident-category.dto.js +10 -1
  175. package/dist/esm/modules/incident/dtos/category/create-incident-category.dto.js.map +1 -1
  176. package/dist/esm/modules/incident/dtos/type/create-incident-type.dto.js +10 -1
  177. package/dist/esm/modules/incident/dtos/type/create-incident-type.dto.js.map +1 -1
  178. package/dist/esm/modules/incident/enums/incident-actions.enum.js +4 -0
  179. package/dist/esm/modules/incident/enums/incident-actions.enum.js.map +1 -1
  180. package/dist/esm/modules/notification/dtos/notification-analytics-query.dto.js +52 -0
  181. package/dist/esm/modules/notification/dtos/notification-analytics-query.dto.js.map +1 -0
  182. package/dist/esm/modules/notification/index.js +3 -0
  183. package/dist/esm/modules/notification/index.js.map +1 -1
  184. package/dist/esm/modules/notification/interfaces/notification-analytics.js +26 -0
  185. package/dist/esm/modules/notification/interfaces/notification-analytics.js.map +1 -0
  186. package/dist/esm/modules/permission/data/permissions.data.js +9 -0
  187. package/dist/esm/modules/permission/data/permissions.data.js.map +1 -1
  188. package/dist/esm/modules/permission/enums/permission-actions.enum.js +19 -0
  189. package/dist/esm/modules/permission/enums/permission-actions.enum.js.map +1 -1
  190. package/dist/esm/modules/permission/enums/permissions-module.enum.js +1 -0
  191. package/dist/esm/modules/permission/enums/permissions-module.enum.js.map +1 -1
  192. package/dist/esm/modules/response-unit/dtos/response-unit/base-response-unit.dto.js +10 -1
  193. package/dist/esm/modules/response-unit/dtos/response-unit/base-response-unit.dto.js.map +1 -1
  194. package/dist/esm/modules/response-unit/enums/response-unit/response-capability.enum.js +26 -0
  195. package/dist/esm/modules/response-unit/enums/response-unit/response-capability.enum.js.map +1 -0
  196. package/dist/esm/modules/response-unit/enums/response-unit/response-unit-availability.enum.js +24 -0
  197. package/dist/esm/modules/response-unit/enums/response-unit/response-unit-availability.enum.js.map +1 -0
  198. package/dist/esm/modules/response-unit/index.js +5 -0
  199. package/dist/esm/modules/response-unit/index.js.map +1 -1
  200. package/dist/esm/modules/response-unit/utils/response-capability.util.js +68 -0
  201. package/dist/esm/modules/response-unit/utils/response-capability.util.js.map +1 -0
  202. package/dist/esm/modules/response-unit/utils/response-unit-availability.util.js +42 -0
  203. package/dist/esm/modules/response-unit/utils/response-unit-availability.util.js.map +1 -0
  204. package/dist/esm/modules/role/data/roles.data.js +27 -0
  205. package/dist/esm/modules/role/data/roles.data.js.map +1 -1
  206. package/dist/esm/modules/sms/constants/sms-templates.config.js +18 -0
  207. package/dist/esm/modules/sms/constants/sms-templates.config.js.map +1 -1
  208. package/dist/esm/modules/sms/enums/sms-template.enum.js +1 -0
  209. package/dist/esm/modules/sms/enums/sms-template.enum.js.map +1 -1
  210. package/dist/types/index.d.ts +1 -0
  211. package/dist/types/kafka/topics.d.ts +4 -0
  212. package/dist/types/modules/dispatch/constants/response-unit-dispatch-defaults.const.d.ts +43 -0
  213. package/dist/types/modules/dispatch/constants/response-unit-dispatch-kafka.const.d.ts +16 -0
  214. package/dist/types/modules/dispatch/dtos/dispatch-response-unit.dto.d.ts +20 -0
  215. package/dist/types/modules/dispatch/dtos/response-unit-dispatch-notification.dto.d.ts +47 -0
  216. package/dist/types/modules/dispatch/dtos/response-unit-dispatch-profile-query.dto.d.ts +13 -0
  217. package/dist/types/modules/dispatch/dtos/response-unit-nearby-query.dto.d.ts +15 -0
  218. package/dist/types/modules/dispatch/dtos/update-response-unit-dispatch-status.dto.d.ts +9 -0
  219. package/dist/types/modules/dispatch/enums/incident-dispatch-blocker.enum.d.ts +16 -0
  220. package/dist/types/modules/dispatch/enums/response-capability-requirement-source.enum.d.ts +7 -0
  221. package/dist/types/modules/dispatch/enums/response-unit-capability-match.enum.d.ts +19 -0
  222. package/dist/types/modules/dispatch/enums/response-unit-dispatch-constraint.enum.d.ts +27 -0
  223. package/dist/types/modules/dispatch/enums/response-unit-dispatch-error-code.enum.d.ts +21 -0
  224. package/dist/types/modules/dispatch/enums/response-unit-dispatch-notification-failure.enum.d.ts +13 -0
  225. package/dist/types/modules/dispatch/enums/response-unit-dispatch-notification-status.enum.d.ts +11 -0
  226. package/dist/types/modules/dispatch/enums/response-unit-dispatch-status.enum.d.ts +28 -0
  227. package/dist/types/modules/dispatch/enums/response-unit-dispatch-transition-source.enum.d.ts +11 -0
  228. package/dist/types/modules/dispatch/enums/response-unit-distance-basis.enum.d.ts +7 -0
  229. package/dist/types/modules/dispatch/enums/response-unit-location-freshness.enum.d.ts +16 -0
  230. package/dist/types/modules/dispatch/enums/response-unit-location-source.enum.d.ts +12 -0
  231. package/dist/types/modules/dispatch/enums/response-unit-recommendation-reason.enum.d.ts +20 -0
  232. package/dist/types/modules/dispatch/enums/response-unit-recommendation-status.enum.d.ts +18 -0
  233. package/dist/types/modules/dispatch/index.d.ts +31 -0
  234. package/dist/types/modules/dispatch/interfaces/incident-response-unit-dispatch.d.ts +121 -0
  235. package/dist/types/modules/dispatch/interfaces/response-unit-dispatch-events.d.ts +103 -0
  236. package/dist/types/modules/dispatch/interfaces/response-unit-dispatch-profile.d.ts +52 -0
  237. package/dist/types/modules/dispatch/interfaces/response-unit-proximity.d.ts +45 -0
  238. package/dist/types/modules/dispatch/interfaces/response-unit-recommendation.d.ts +130 -0
  239. package/dist/types/modules/dispatch/utils/dispatch-geo.util.d.ts +16 -0
  240. package/dist/types/modules/dispatch/utils/incident-dispatchability.util.d.ts +18 -0
  241. package/dist/types/modules/dispatch/utils/response-capability-match.util.d.ts +26 -0
  242. package/dist/types/modules/dispatch/utils/response-unit-dispatch-event.util.d.ts +9 -0
  243. package/dist/types/modules/dispatch/utils/response-unit-dispatch-status.util.d.ts +16 -0
  244. package/dist/types/modules/incident/dtos/category/create-incident-category.dto.d.ts +6 -0
  245. package/dist/types/modules/incident/dtos/type/create-incident-type.dto.d.ts +6 -0
  246. package/dist/types/modules/incident/enums/incident-actions.enum.d.ts +4 -0
  247. package/dist/types/modules/incident/intefaces/incident-category.d.ts +6 -0
  248. package/dist/types/modules/incident/intefaces/incident-type.d.ts +6 -0
  249. package/dist/types/modules/notification/dtos/notification-analytics-query.dto.d.ts +14 -0
  250. package/dist/types/modules/notification/index.d.ts +2 -0
  251. package/dist/types/modules/notification/interfaces/notification-analytics.d.ts +273 -0
  252. package/dist/types/modules/permission/enums/permission-actions.enum.d.ts +4 -0
  253. package/dist/types/modules/permission/enums/permissions-module.enum.d.ts +1 -0
  254. package/dist/types/modules/response-unit/dtos/response-unit/base-response-unit.dto.d.ts +7 -0
  255. package/dist/types/modules/response-unit/enums/response-unit/response-capability.enum.d.ts +24 -0
  256. package/dist/types/modules/response-unit/enums/response-unit/response-unit-availability.enum.d.ts +22 -0
  257. package/dist/types/modules/response-unit/index.d.ts +4 -0
  258. package/dist/types/modules/response-unit/interfaces/response-unit/response-unit.d.ts +3 -0
  259. package/dist/types/modules/response-unit/utils/response-capability.util.d.ts +31 -0
  260. package/dist/types/modules/response-unit/utils/response-unit-availability.util.d.ts +21 -0
  261. package/dist/types/modules/sms/enums/sms-template.enum.d.ts +1 -0
  262. package/package.json +1 -1
@@ -0,0 +1,103 @@
1
+ import { ResponseUnitDispatchNotificationFailure } from '../enums/response-unit-dispatch-notification-failure.enum';
2
+ import { ResponseUnitDispatchNotificationStatus } from '../enums/response-unit-dispatch-notification-status.enum';
3
+ import { ResponseUnitDispatchStatus } from '../enums/response-unit-dispatch-status.enum';
4
+ import { ResponseUnitDispatchTransitionSource } from '../enums/response-unit-dispatch-transition-source.enum';
5
+ /** Fields every dispatch event carries. */
6
+ export interface ResponseUnitDispatchEventBase {
7
+ schemaVersion: 1;
8
+ /** Deterministic per (dispatch, change) so a redelivery can be recognised. */
9
+ eventId: string;
10
+ occurredAt: string;
11
+ dispatchId: number;
12
+ dispatchReference: string;
13
+ incidentId: number;
14
+ organizationId: number;
15
+ controlCentreId: number | null;
16
+ responseUnitId: number;
17
+ }
18
+ /**
19
+ * `incident.response-unit-dispatch.created.v1` - a unit was sent to an incident.
20
+ *
21
+ * Identifiers and decisions only: no names, numbers or addresses. Every future
22
+ * consumer (clarion-workflow, the responder app's backend, analytics, audit)
23
+ * reads it; the few that need the incident's details look them up by id with
24
+ * their own authorization.
25
+ */
26
+ export interface IncidentResponseUnitDispatchedEventV1 extends ResponseUnitDispatchEventBase {
27
+ status: ResponseUnitDispatchStatus.DISPATCHED;
28
+ responseUnitControlCentreId: number | null;
29
+ dispatchedByUserId: number;
30
+ dispatchedAt: string;
31
+ wasRecommended: boolean;
32
+ recommendedResponseUnitId: number | null;
33
+ distanceMetres: number | null;
34
+ notificationStatus: ResponseUnitDispatchNotificationStatus;
35
+ }
36
+ /**
37
+ * `incident.response-unit-dispatch.status-changed.v1` - acknowledged, en route,
38
+ * on scene, completed or stood down. Ordered per incident (keyed by incident id).
39
+ */
40
+ export interface IncidentResponseUnitDispatchStatusChangedEventV1 extends ResponseUnitDispatchEventBase {
41
+ previousStatus: ResponseUnitDispatchStatus;
42
+ status: ResponseUnitDispatchStatus;
43
+ source: ResponseUnitDispatchTransitionSource;
44
+ changedByUserId: number | null;
45
+ reason: string | null;
46
+ }
47
+ /** The incident facts a dispatch message is written from. */
48
+ export interface ResponseUnitDispatchMessageIncident {
49
+ /** As the control room quotes it, e.g. `#1234`. */
50
+ reference: string;
51
+ typeName: string | null;
52
+ categoryName: string | null;
53
+ priority: string | null;
54
+ /** The description, clamped. */
55
+ summary: string | null;
56
+ address: string | null;
57
+ latitude: number | null;
58
+ longitude: number | null;
59
+ /** Null when the reporter is anonymous. */
60
+ reporterName: string | null;
61
+ /** Null when the reporter is anonymous or left none. */
62
+ reporterPhoneNumber: string | null;
63
+ anonymous: boolean;
64
+ }
65
+ /**
66
+ * `incident.response-unit-dispatch.notification-requested.v1` - a COMMAND to
67
+ * clarion-notification: tell this unit it has been dispatched.
68
+ *
69
+ * Kept apart from the domain event on purpose. It is the one message that needs
70
+ * the unit's phone number and the incident's details (an SMS cannot be written
71
+ * from identifiers), and it goes to one consumer; the domain event goes to
72
+ * everyone and carries neither. Self-contained so the message can be sent even
73
+ * when clarion-incident is down - an SMS that waits on a lookup is an SMS that
74
+ * arrives after the unit should have left.
75
+ */
76
+ export interface ResponseUnitDispatchNotificationRequestedEventV1 extends ResponseUnitDispatchEventBase {
77
+ /** 1 for the dispatch itself, then 2, 3... for each "send again". */
78
+ attempt: number;
79
+ /** For organization branding and sender resolution. */
80
+ appId: string | null;
81
+ recipient: {
82
+ /** E.164. */
83
+ phoneNumber: string;
84
+ responseUnitName: string;
85
+ };
86
+ incident: ResponseUnitDispatchMessageIncident;
87
+ }
88
+ /**
89
+ * `notification.response-unit-dispatch.notification-result.v1` - what became of
90
+ * one request. clarion-incident records it on the dispatch.
91
+ */
92
+ export interface ResponseUnitDispatchNotificationResultEventV1 {
93
+ schemaVersion: 1;
94
+ eventId: string;
95
+ occurredAt: string;
96
+ dispatchId: number;
97
+ incidentId: number;
98
+ organizationId: number;
99
+ attempt: number;
100
+ status: ResponseUnitDispatchNotificationStatus;
101
+ failureReason: ResponseUnitDispatchNotificationFailure | null;
102
+ providerCode: string | null;
103
+ }
@@ -0,0 +1,52 @@
1
+ import { ResponseCapability } from '../../response-unit/enums/response-unit/response-capability.enum';
2
+ import { ResponseUnitAvailability } from '../../response-unit/enums/response-unit/response-unit-availability.enum';
3
+ /**
4
+ * A response unit as dispatch sees it: the slim, authoritative row
5
+ * clarion-organization serves from `GET /response-units/dispatch-profiles`.
6
+ *
7
+ * Everything the recommendation engine needs to decide "could this unit go?"
8
+ * and nothing it does not - no crew, no device, no address book. The phone
9
+ * number is present ONLY when the caller asked for contact details (the
10
+ * dispatch command, never a recommendation), already in E.164 for the
11
+ * organization's country so clarion-notification can route it without
12
+ * guessing.
13
+ */
14
+ export interface ResponseUnitDispatchProfile {
15
+ responseUnitId: number;
16
+ organizationId: number;
17
+ controlCentreId: number | null;
18
+ name: string;
19
+ /** `Vehicle` / `Person` / `Team`. */
20
+ responseUnitType: string;
21
+ /** `Ambulance` / `Security` / `Fire` / `Road Rescue` for vehicles; null otherwise. */
22
+ vehicleType: string | null;
23
+ registrationNumber: string | null;
24
+ isActive: boolean;
25
+ /** The manual status, whichever subtype field holds it (`Operational`, `On Duty`...). */
26
+ operationalStatus: string | null;
27
+ /** From the manual status only - clarion-incident layers active dispatches on top. */
28
+ availability: ResponseUnitAvailability;
29
+ /** The capabilities the unit is treated as having (configured, else derived from its type). */
30
+ capabilities: ResponseCapability[];
31
+ /** True when `capabilities` was configured on the unit rather than derived. */
32
+ capabilitiesConfigured: boolean;
33
+ /** The unit's configured base position; null when unset or obviously invalid (0,0). */
34
+ baseLocation: {
35
+ latitude: number;
36
+ longitude: number;
37
+ } | null;
38
+ stationName: string | null;
39
+ /** Whether a dispatch SMS could be sent at all. */
40
+ hasPhoneNumber: boolean;
41
+ /** E.164. Present only with `includeContact=true`. */
42
+ phoneNumber?: string | null;
43
+ }
44
+ /** One page of dispatch profiles - in practice the whole scope, capped. */
45
+ export interface ResponseUnitDispatchProfileList {
46
+ organizationId: number;
47
+ /** Every unit in the caller's scope, before the cap. */
48
+ total: number;
49
+ units: ResponseUnitDispatchProfile[];
50
+ /** True when `total` exceeded the cap and `units` is the first slice. */
51
+ truncated: boolean;
52
+ }
@@ -0,0 +1,45 @@
1
+ import { TrackingUnitOnlineStatus } from '../../tracking/enums/tracking-unit-online-status.enum';
2
+ /**
3
+ * One live-tracked unit near a point, as clarion-response-tracking answers
4
+ * `GET /tracking/response-units/nearby`.
5
+ *
6
+ * Found through the tracking service's Redis GEO index (maintained on every
7
+ * GPS fix), so the answer never involves reading every unit's state. The
8
+ * distance is great-circle, computed by Redis from the same position the live
9
+ * map shows.
10
+ */
11
+ export interface ResponseUnitLivePosition {
12
+ responseUnitId: number;
13
+ organizationId: number;
14
+ controlCentreId: number | null;
15
+ latitude: number;
16
+ longitude: number;
17
+ /** Straight-line distance from the query point. */
18
+ distanceMetres: number;
19
+ /** The tracking service's own ONLINE / STALE / OFFLINE classification. */
20
+ status: TrackingUnitOnlineStatus;
21
+ /** When the fix was taken (provider time). */
22
+ eventTime: string;
23
+ /** Seconds between `eventTime` and the moment the answer was produced. */
24
+ ageSeconds: number;
25
+ accuracyMetres: number | null;
26
+ }
27
+ export interface ResponseUnitNearbyResult {
28
+ organizationId: number;
29
+ /** Set when the answer was confined to one control centre. */
30
+ controlCentreId: number | null;
31
+ latitude: number;
32
+ longitude: number;
33
+ radiusMetres: number;
34
+ limit: number;
35
+ generatedAt: string;
36
+ /** Nearest first. */
37
+ units: ResponseUnitLivePosition[];
38
+ /**
39
+ * Units in scope that ARE live-tracked but were not returned - beyond the
40
+ * radius or past the limit. Lets a consumer say "outside the search area"
41
+ * instead of falling back to a base location that would put a moving vehicle
42
+ * back in its depot.
43
+ */
44
+ outsideSearchUnitIds: number[];
45
+ }
@@ -0,0 +1,130 @@
1
+ import { ResponseCapability } from '../../response-unit/enums/response-unit/response-capability.enum';
2
+ import { ResponseUnitAvailability } from '../../response-unit/enums/response-unit/response-unit-availability.enum';
3
+ import { IncidentDispatchBlocker } from '../enums/incident-dispatch-blocker.enum';
4
+ import { ResponseCapabilityRequirementSource } from '../enums/response-capability-requirement-source.enum';
5
+ import { ResponseUnitCapabilityMatch } from '../enums/response-unit-capability-match.enum';
6
+ import { ResponseUnitDispatchConstraint } from '../enums/response-unit-dispatch-constraint.enum';
7
+ import { ResponseUnitDistanceBasis } from '../enums/response-unit-distance-basis.enum';
8
+ import { ResponseUnitLocationFreshness } from '../enums/response-unit-location-freshness.enum';
9
+ import { ResponseUnitLocationSource } from '../enums/response-unit-location-source.enum';
10
+ import { ResponseUnitRecommendationReason } from '../enums/response-unit-recommendation-reason.enum';
11
+ import { ResponseUnitRecommendationStatus } from '../enums/response-unit-recommendation-status.enum';
12
+ import { IncidentResponseUnitDispatch } from './incident-response-unit-dispatch';
13
+ /** What the incident needs, and where that came from. */
14
+ export interface ResponseCapabilityRequirement {
15
+ /** A unit with ANY of these is suitable. Empty = no requirement. */
16
+ capabilities: ResponseCapability[];
17
+ source: ResponseCapabilityRequirementSource;
18
+ }
19
+ /** Where a candidate is, and how far that can be trusted. */
20
+ export interface ResponseUnitCandidateLocation {
21
+ source: ResponseUnitLocationSource;
22
+ freshness: ResponseUnitLocationFreshness;
23
+ latitude: number | null;
24
+ longitude: number | null;
25
+ /** When the position was recorded. Null for a base location. */
26
+ recordedAt: string | null;
27
+ /** Age of the position when the recommendation was produced. */
28
+ ageSeconds: number | null;
29
+ accuracyMetres: number | null;
30
+ }
31
+ /** How far, and - when road routing is on - how long. */
32
+ export interface ResponseUnitTravelEstimate {
33
+ distanceMetres: number;
34
+ /** Only for a road route; a straight line has no honest duration. */
35
+ durationSeconds: number | null;
36
+ basis: ResponseUnitDistanceBasis;
37
+ trafficAware: boolean;
38
+ }
39
+ /**
40
+ * One unit, as the dispatcher sees it. The scoring that ordered the list is
41
+ * internal; what is exposed is the facts behind it (`reasons`, distance,
42
+ * freshness, match) - enough for the admin to say why, nothing to reverse-
43
+ * engineer weights from.
44
+ */
45
+ export interface ResponseUnitCandidate {
46
+ responseUnitId: number;
47
+ name: string;
48
+ responseUnitType: string;
49
+ vehicleType: string | null;
50
+ registrationNumber: string | null;
51
+ controlCentreId: number | null;
52
+ /** The unit belongs to the incident's control centre. */
53
+ sameControlCentre: boolean;
54
+ operationalStatus: string | null;
55
+ availability: ResponseUnitAvailability;
56
+ /** The other incident this unit is out on, when it is ENGAGED by a dispatch. */
57
+ engagedIncidentId: number | null;
58
+ capabilities: ResponseCapability[];
59
+ capabilityMatch: ResponseUnitCapabilityMatch;
60
+ /** The required capabilities this unit has. */
61
+ matchedCapabilities: ResponseCapability[];
62
+ location: ResponseUnitCandidateLocation;
63
+ /** Straight-line distance to the incident; null without a usable position. */
64
+ distanceMetres: number | null;
65
+ /** A road estimate, for the top candidates when routing is enabled. */
66
+ travel: ResponseUnitTravelEstimate | null;
67
+ /** Whether a dispatch SMS could be sent. */
68
+ hasPhoneNumber: boolean;
69
+ /** The server would accept a dispatch of this unit now. */
70
+ dispatchable: boolean;
71
+ /** Dispatchable AND good enough to be suggested. */
72
+ recommendable: boolean;
73
+ /** Why it cannot be dispatched (blockers) and why it is not recommended (cautions). */
74
+ constraints: ResponseUnitDispatchConstraint[];
75
+ /** Why it ranks where it does. Empty for a unit that is not recommendable. */
76
+ reasons: ResponseUnitRecommendationReason[];
77
+ /** 1 = recommended. Null for units outside the recommendable ranking. */
78
+ rank: number | null;
79
+ }
80
+ export interface ResponseUnitRecommendationSummary {
81
+ /** Units in the caller's scope for this incident's organization. */
82
+ configuredUnits: number;
83
+ dispatchableUnits: number;
84
+ recommendableUnits: number;
85
+ engagedUnits: number;
86
+ /** Inactive or operationally unavailable. */
87
+ unavailableUnits: number;
88
+ /** Units with no usable position (offline, never tracked and no base). */
89
+ unitsWithoutLocation: number;
90
+ /** The unit list was capped; some units were not considered. */
91
+ truncated: boolean;
92
+ }
93
+ /**
94
+ * `GET /incidents/:id/response-unit-recommendation`.
95
+ *
96
+ * Advisory and side-effect free: generating one assigns nothing and reserves
97
+ * nothing. The dispatch command re-evaluates everything when it arrives.
98
+ */
99
+ export interface ResponseUnitRecommendation {
100
+ incidentId: number;
101
+ organizationId: number;
102
+ controlCentreId: number | null;
103
+ generatedAt: string;
104
+ status: ResponseUnitRecommendationStatus;
105
+ /** Why the incident cannot take a dispatch; empty unless NOT_DISPATCHABLE. */
106
+ incidentBlockers: IncidentDispatchBlocker[];
107
+ requirement: ResponseCapabilityRequirement;
108
+ recommended: ResponseUnitCandidate | null;
109
+ /** Further recommendable units, best first. */
110
+ alternatives: ResponseUnitCandidate[];
111
+ /** Everything else in scope: dispatchable-by-hand first, then blocked. Capped. */
112
+ otherUnits: ResponseUnitCandidate[];
113
+ /** Units already out on THIS incident. */
114
+ activeDispatches: IncidentResponseUnitDispatch[];
115
+ summary: ResponseUnitRecommendationSummary;
116
+ /**
117
+ * False when the incident has no usable location. Nothing can be "nearest"
118
+ * then, so nothing is recommended - every dispatchable unit is listed for the
119
+ * dispatcher to choose from.
120
+ */
121
+ incidentLocationAvailable: boolean;
122
+ /**
123
+ * False when clarion-response-tracking could not be asked. Live positions are
124
+ * then unknown, so nothing is recommended (a depot location would put moving
125
+ * vehicles back at base); units are listed by base location, labelled as such.
126
+ */
127
+ liveTrackingAvailable: boolean;
128
+ /** True when road travel times were requested for the top candidates. */
129
+ travelTimeEnabled: boolean;
130
+ }
@@ -0,0 +1,16 @@
1
+ /** Great-circle distance in metres. */
2
+ export declare function haversineMetres(lat1: number, lng1: number, lat2: number, lng2: number): number;
3
+ /**
4
+ * A coordinate worth computing a distance from: finite, in range, and not the
5
+ * (0,0) a form leaves behind when nobody picked a point (Null Island, in the
6
+ * Gulf of Guinea, is where every unset location in the world quietly sits).
7
+ */
8
+ export declare function isUsableCoordinate(latitude: unknown, longitude: unknown): boolean;
9
+ /**
10
+ * Read a {lat,lng} / {latitude,longitude} / {lat,lon} shaped location - the
11
+ * platform stores all three - as a usable coordinate, or null.
12
+ */
13
+ export declare function readCoordinate(location: unknown): {
14
+ latitude: number;
15
+ longitude: number;
16
+ } | null;
@@ -0,0 +1,18 @@
1
+ import { IncidentStatus } from '../../incident/enums/incident-status.enum';
2
+ import { IncidentDispatchBlocker } from '../enums/incident-dispatch-blocker.enum';
3
+ /** Incident statuses after which nothing is sent to it. */
4
+ export declare const INCIDENT_STATUSES_ENDING_DISPATCH: readonly IncidentStatus[];
5
+ /** The incident facts dispatchability reads. */
6
+ export interface DispatchableIncidentFacts {
7
+ class?: string | null;
8
+ status?: string | null;
9
+ notifyServiceProvider?: boolean | null;
10
+ entitlementTier?: string | null;
11
+ }
12
+ /**
13
+ * Why this incident cannot take a dispatch - empty when it can. Every reason is
14
+ * returned, not just the first, so the admin can say all of it at once.
15
+ */
16
+ export declare function resolveIncidentDispatchBlockers(incident: DispatchableIncidentFacts): IncidentDispatchBlocker[];
17
+ /** Whether an incident status ends every dispatch still active on it. */
18
+ export declare function incidentStatusEndsDispatch(status: string | null | undefined): boolean;
@@ -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'>>>;
@@ -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,10 @@ 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",
11
15
  REOPENED = "Reopened",
12
16
  REPORT_CREATED = "Report Created",
13
17
  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,14 @@
1
+ import { CountryCode } from '../../country/enums/country-code.enum';
2
+ /**
3
+ * The period a notification analytics read covers, and optionally one country. Both
4
+ * ends optional: no `from` is "forever", no `to` is now.
5
+ */
6
+ export declare class NotificationAnalyticsQueryDto {
7
+ from?: string;
8
+ to?: string;
9
+ timeZone?: string;
10
+ /** Super-Admin only: one organization's figures instead of every organization's. Ignored for anybody else. */
11
+ organizationId?: number;
12
+ /** Push, in-app and devices by the recipient's country, SMS by the number's. Email is never narrowed. */
13
+ countryCode?: CountryCode;
14
+ }
@@ -23,3 +23,5 @@ export * from './enums/billing-notification.enum';
23
23
  export * from './dtos/billing-notification.dto';
24
24
  export * from './interfaces/billing-notification-result';
25
25
  export * from './dtos/alert-acknowledgement.dto';
26
+ export * from './interfaces/notification-analytics';
27
+ export * from './dtos/notification-analytics-query.dto';