@oneuptime/common 14.0.96 → 14.0.98

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 (271) hide show
  1. package/Models/AnalyticsModels/NetworkFlow.d.mts +4 -0
  2. package/Models/AnalyticsModels/NetworkFlow.d.ts +4 -0
  3. package/Models/AnalyticsModels/NetworkFlow.js +50 -0
  4. package/Models/DatabaseModels/Alert.d.mts +2 -0
  5. package/Models/DatabaseModels/Alert.d.ts +2 -0
  6. package/Models/DatabaseModels/Alert.js +63 -0
  7. package/Models/DatabaseModels/CodeRepository.d.mts +3 -0
  8. package/Models/DatabaseModels/CodeRepository.d.ts +3 -0
  9. package/Models/DatabaseModels/CodeRepository.js +104 -0
  10. package/Models/DatabaseModels/Incident.d.mts +2 -0
  11. package/Models/DatabaseModels/Incident.d.ts +2 -0
  12. package/Models/DatabaseModels/Incident.js +63 -0
  13. package/Models/DatabaseModels/Index.js +12 -0
  14. package/Models/DatabaseModels/NetworkAddressName.d.mts +14 -0
  15. package/Models/DatabaseModels/NetworkAddressName.d.ts +14 -0
  16. package/Models/DatabaseModels/NetworkAddressName.js +300 -0
  17. package/Models/DatabaseModels/NetworkAddressName.mjs +2 -0
  18. package/Models/DatabaseModels/NetworkDevice.d.mts +1 -0
  19. package/Models/DatabaseModels/NetworkDevice.d.ts +1 -0
  20. package/Models/DatabaseModels/NetworkDevice.js +38 -0
  21. package/Models/DatabaseModels/SecurityCase.d.mts +8 -0
  22. package/Models/DatabaseModels/SecurityCase.d.ts +8 -0
  23. package/Models/DatabaseModels/SecurityCase.js +145 -0
  24. package/Models/DatabaseModels/SecurityCaseEvidence.d.mts +32 -0
  25. package/Models/DatabaseModels/SecurityCaseEvidence.d.ts +32 -0
  26. package/Models/DatabaseModels/SecurityCaseEvidence.js +548 -0
  27. package/Models/DatabaseModels/SecurityCaseEvidence.mjs +2 -0
  28. package/Models/DatabaseModels/SecurityCaseFeed.d.mts +4 -1
  29. package/Models/DatabaseModels/SecurityCaseFeed.d.ts +4 -1
  30. package/Models/DatabaseModels/SecurityCaseFeed.js +6 -0
  31. package/Models/DatabaseModels/SecurityCasePriority.d.mts +2 -0
  32. package/Models/DatabaseModels/SecurityCasePriority.d.ts +2 -0
  33. package/Models/DatabaseModels/SecurityCasePriority.js +44 -0
  34. package/Models/DatabaseModels/SecurityCaseTask.d.mts +22 -0
  35. package/Models/DatabaseModels/SecurityCaseTask.d.ts +22 -0
  36. package/Models/DatabaseModels/SecurityCaseTask.js +467 -0
  37. package/Models/DatabaseModels/SecurityCaseTask.mjs +2 -0
  38. package/Models/DatabaseModels/SecurityHunt.d.mts +34 -0
  39. package/Models/DatabaseModels/SecurityHunt.d.ts +34 -0
  40. package/Models/DatabaseModels/SecurityHunt.js +608 -0
  41. package/Models/DatabaseModels/SecurityHunt.mjs +2 -0
  42. package/Models/DatabaseModels/SecurityWatchlist.d.mts +22 -0
  43. package/Models/DatabaseModels/SecurityWatchlist.d.ts +22 -0
  44. package/Models/DatabaseModels/SecurityWatchlist.js +411 -0
  45. package/Models/DatabaseModels/SecurityWatchlist.mjs +2 -0
  46. package/Models/DatabaseModels/SecurityWatchlistItem.d.mts +17 -0
  47. package/Models/DatabaseModels/SecurityWatchlistItem.d.ts +17 -0
  48. package/Models/DatabaseModels/SecurityWatchlistItem.js +321 -0
  49. package/Models/DatabaseModels/SecurityWatchlistItem.mjs +2 -0
  50. package/Types/AI/AIChatTypes.d.mts +1 -0
  51. package/Types/AI/AIChatTypes.d.ts +1 -0
  52. package/Types/AI/AIRunEventType.d.mts +1 -0
  53. package/Types/AI/AIRunEventType.d.ts +1 -0
  54. package/Types/AI/AIRunEventType.js +8 -0
  55. package/Types/AI/AiAffectedResources.d.mts +2 -1
  56. package/Types/AI/AiAffectedResources.d.ts +2 -1
  57. package/Types/AI/AiAffectedResources.js +12 -1
  58. package/Types/AI/AiTokenCount.d.mts +22 -1
  59. package/Types/AI/AiTokenCount.d.ts +22 -1
  60. package/Types/AI/AiTokenCount.js +126 -57
  61. package/Types/AI/AiTokenCount.mjs +2 -0
  62. package/Types/AI/CodeFixTaskContext.d.mts +1 -0
  63. package/Types/AI/CodeFixTaskContext.d.ts +1 -0
  64. package/Types/AffectedResources/AffectedResourceSearch.d.mts +53 -0
  65. package/Types/AffectedResources/AffectedResourceSearch.d.ts +53 -0
  66. package/Types/AffectedResources/AffectedResourceSearch.js +224 -0
  67. package/Types/AffectedResources/AffectedResourceSearch.mjs +11 -0
  68. package/Types/ArchivableValue/ArchivableValueUsage.d.mts +21 -2
  69. package/Types/ArchivableValue/ArchivableValueUsage.d.ts +21 -2
  70. package/Types/ArchivableValue/ArchivableValueUsage.js +91 -12
  71. package/Types/ArchivableValue/ArchivableValueUsage.mjs +1 -0
  72. package/Types/CodeRepository/CodeRepositorySetting.d.mts +1 -0
  73. package/Types/CodeRepository/CodeRepositorySetting.d.ts +1 -0
  74. package/Types/CodeRepository/CodeRepositorySetting.js +2 -0
  75. package/Types/Color.d.mts +0 -2
  76. package/Types/Color.d.ts +0 -2
  77. package/Types/Color.js +0 -14
  78. package/Types/Database/DatabaseProperty.d.mts +0 -2
  79. package/Types/Database/DatabaseProperty.d.ts +0 -2
  80. package/Types/Database/DatabaseProperty.js +0 -3
  81. package/Types/Date.d.mts +0 -2
  82. package/Types/Date.d.ts +0 -2
  83. package/Types/Date.js +0 -23
  84. package/Types/Domain.d.mts +0 -2
  85. package/Types/Domain.d.ts +0 -2
  86. package/Types/Domain.js +0 -14
  87. package/Types/Email/EmailTemplateType.d.mts +3 -0
  88. package/Types/Email/EmailTemplateType.d.ts +3 -0
  89. package/Types/Email/EmailTemplateType.js +4 -0
  90. package/Types/Email.d.mts +0 -2
  91. package/Types/Email.d.ts +0 -2
  92. package/Types/Email.js +0 -15
  93. package/Types/IP/IP.d.mts +0 -2
  94. package/Types/IP/IP.d.ts +0 -2
  95. package/Types/IP/IP.js +0 -14
  96. package/Types/Link.d.mts +1 -0
  97. package/Types/Link.d.ts +1 -0
  98. package/Types/Monitor/CriteriaAlert.d.mts +0 -2
  99. package/Types/Monitor/CriteriaAlert.d.ts +0 -2
  100. package/Types/Monitor/CriteriaAlert.js +0 -18
  101. package/Types/Monitor/CriteriaAlert.mjs +1 -2
  102. package/Types/Monitor/CriteriaFilter.d.mts +0 -2
  103. package/Types/Monitor/CriteriaFilter.d.ts +0 -2
  104. package/Types/Monitor/CriteriaFilter.js +1 -42
  105. package/Types/Monitor/CriteriaFilter.mjs +0 -1
  106. package/Types/Monitor/CriteriaIncident.d.mts +0 -2
  107. package/Types/Monitor/CriteriaIncident.d.ts +0 -2
  108. package/Types/Monitor/CriteriaIncident.js +0 -23
  109. package/Types/Monitor/CriteriaIncident.mjs +1 -2
  110. package/Types/Monitor/IncomingMonitor/IncidentGroupingConfig.d.mts +0 -2
  111. package/Types/Monitor/IncomingMonitor/IncidentGroupingConfig.d.ts +0 -2
  112. package/Types/Monitor/IncomingMonitor/IncidentGroupingConfig.js +0 -11
  113. package/Types/Monitor/IncomingMonitor/IncidentGroupingConfig.mjs +1 -2
  114. package/Types/Monitor/MonitorCriteria.d.mts +0 -2
  115. package/Types/Monitor/MonitorCriteria.d.ts +0 -2
  116. package/Types/Monitor/MonitorCriteria.js +0 -21
  117. package/Types/Monitor/MonitorCriteriaInstance.d.mts +0 -2
  118. package/Types/Monitor/MonitorCriteriaInstance.d.ts +0 -2
  119. package/Types/Monitor/MonitorCriteriaInstance.js +0 -54
  120. package/Types/Monitor/MonitorStep.d.mts +0 -2
  121. package/Types/Monitor/MonitorStep.d.ts +0 -2
  122. package/Types/Monitor/MonitorStep.js +0 -80
  123. package/Types/Monitor/MonitorSteps.d.mts +0 -2
  124. package/Types/Monitor/MonitorSteps.d.ts +0 -2
  125. package/Types/Monitor/MonitorSteps.js +0 -31
  126. package/Types/Name.d.mts +0 -2
  127. package/Types/Name.d.ts +0 -2
  128. package/Types/Name.js +0 -14
  129. package/Types/NetFlow/NetworkAddressName.d.mts +30 -0
  130. package/Types/NetFlow/NetworkAddressName.d.ts +30 -0
  131. package/Types/NetFlow/NetworkAddressName.js +149 -0
  132. package/Types/NetFlow/NetworkAddressName.mjs +6 -0
  133. package/Types/NetFlow/NetworkTraffic.d.mts +20 -0
  134. package/Types/NetFlow/NetworkTraffic.d.ts +20 -0
  135. package/Types/NetFlow/NetworkTraffic.js +5 -1
  136. package/Types/NetFlow/NetworkTraffic.mjs +2 -0
  137. package/Types/NetworkController/NetworkControllerReadSummary.d.mts +2 -0
  138. package/Types/NetworkController/NetworkControllerReadSummary.d.ts +2 -0
  139. package/Types/NetworkController/NetworkControllerReadSummary.js +7 -1
  140. package/Types/NetworkDevice/NetworkDeviceDiscoveredDetails.d.mts +47 -1
  141. package/Types/NetworkDevice/NetworkDeviceDiscoveredDetails.d.ts +47 -1
  142. package/Types/NetworkDevice/NetworkDeviceDiscoveredDetails.js +173 -8
  143. package/Types/NetworkDevice/NetworkDeviceDiscoveredDetails.mjs +7 -0
  144. package/Types/NotificationSetting/NotificationEmailRollupCategory.d.mts +1 -0
  145. package/Types/NotificationSetting/NotificationEmailRollupCategory.d.ts +1 -0
  146. package/Types/NotificationSetting/NotificationEmailRollupCategory.js +12 -0
  147. package/Types/NotificationSetting/NotificationEmailRollupPolicy.js +6 -0
  148. package/Types/NotificationSetting/NotificationSettingEventType.d.mts +3 -0
  149. package/Types/NotificationSetting/NotificationSettingEventType.d.ts +3 -0
  150. package/Types/NotificationSetting/NotificationSettingEventType.js +15 -0
  151. package/Types/ObjectID.d.mts +0 -1
  152. package/Types/ObjectID.d.ts +0 -1
  153. package/Types/ObjectID.js +0 -9
  154. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunEnding.d.mts +4 -0
  155. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunEnding.d.ts +4 -0
  156. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunEnding.js +25 -1
  157. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunEnding.mjs +4 -0
  158. package/Types/OnCallDutyPolicy/OnCallEmptyLevel.d.mts +15 -0
  159. package/Types/OnCallDutyPolicy/OnCallEmptyLevel.d.ts +15 -0
  160. package/Types/OnCallDutyPolicy/OnCallEmptyLevel.js +118 -0
  161. package/Types/OnCallDutyPolicy/OnCallEmptyLevel.mjs +9 -0
  162. package/Types/Permission.d.mts +8 -0
  163. package/Types/Permission.d.ts +8 -0
  164. package/Types/Permission.js +87 -3
  165. package/Types/Phone.d.mts +0 -2
  166. package/Types/Phone.d.ts +0 -2
  167. package/Types/Phone.js +0 -14
  168. package/Types/Port.d.mts +0 -2
  169. package/Types/Port.d.ts +0 -2
  170. package/Types/Port.js +0 -14
  171. package/Types/ProviderLogo/ProviderLogo.d.mts +8 -1
  172. package/Types/ProviderLogo/ProviderLogo.d.ts +8 -1
  173. package/Types/ProviderLogo/ProviderLogo.js +14 -0
  174. package/Types/SecurityCase/SecurityCaseEventEvidence.d.mts +67 -0
  175. package/Types/SecurityCase/SecurityCaseEventEvidence.d.ts +67 -0
  176. package/Types/SecurityCase/SecurityCaseEventEvidence.js +271 -0
  177. package/Types/SecurityCase/SecurityCaseEventEvidence.mjs +13 -0
  178. package/Types/SecurityCase/SecurityCaseEvidenceKind.d.mts +8 -0
  179. package/Types/SecurityCase/SecurityCaseEvidenceKind.d.ts +8 -0
  180. package/Types/SecurityCase/SecurityCaseEvidenceKind.js +34 -0
  181. package/Types/SecurityCase/SecurityCaseEvidenceKind.mjs +4 -0
  182. package/Types/SecurityEvent/SecurityHunt.d.mts +122 -0
  183. package/Types/SecurityEvent/SecurityHunt.d.ts +122 -0
  184. package/Types/SecurityEvent/SecurityHunt.js +391 -0
  185. package/Types/SecurityEvent/SecurityHunt.mjs +32 -0
  186. package/Types/SecurityEvent/SecurityWatchlist.d.mts +167 -0
  187. package/Types/SecurityEvent/SecurityWatchlist.d.ts +167 -0
  188. package/Types/SecurityEvent/SecurityWatchlist.js +648 -0
  189. package/Types/SecurityEvent/SecurityWatchlist.mjs +51 -0
  190. package/Types/SecurityEvent/SigmaRule.d.mts +2 -0
  191. package/Types/SecurityEvent/SigmaRule.d.ts +2 -0
  192. package/Types/SecurityEvent/SigmaRule.js +5 -0
  193. package/Types/Telemetry/OpenTelemetryGuides.js +177 -5
  194. package/Types/Version.d.mts +0 -2
  195. package/Types/Version.d.ts +0 -2
  196. package/Types/Version.js +0 -14
  197. package/Types/Workflow/AffectedResourcesSetting.d.mts +13 -0
  198. package/Types/Workflow/AffectedResourcesSetting.d.ts +13 -0
  199. package/Types/Workflow/AffectedResourcesSetting.js +120 -0
  200. package/Types/Workflow/AffectedResourcesSetting.mjs +8 -0
  201. package/Types/Workflow/Components/BaseModel.js +15 -3
  202. package/Types/Workflow/Documentation/DatabaseDocumentation.js +36 -0
  203. package/Types/Workflow/RunRecord.d.mts +3 -14
  204. package/Types/Workflow/RunRecord.d.ts +3 -14
  205. package/Types/Workflow/RunRecord.js +10 -51
  206. package/Utils/AI/InvestigationLogStall.d.mts +38 -0
  207. package/Utils/AI/InvestigationLogStall.d.ts +38 -0
  208. package/Utils/AI/InvestigationLogStall.js +163 -0
  209. package/Utils/AI/InvestigationLogStall.mjs +11 -0
  210. package/Utils/Inventory/AssetFactSource.d.mts +6 -2
  211. package/Utils/Inventory/AssetFactSource.d.ts +6 -2
  212. package/Utils/Inventory/AssetFactSource.js +18 -1
  213. package/Utils/Inventory/AssetFactSource.mjs +1 -0
  214. package/Utils/Markdown/FeedLead.d.mts +10 -0
  215. package/Utils/Markdown/FeedLead.d.ts +10 -0
  216. package/Utils/Markdown/FeedLead.js +198 -0
  217. package/Utils/Markdown/FeedLead.mjs +8 -0
  218. package/Utils/NetworkDevice/NetworkDeviceAssetFacts.d.mts +9 -1
  219. package/Utils/NetworkDevice/NetworkDeviceAssetFacts.d.ts +9 -1
  220. package/Utils/NetworkDevice/NetworkDeviceAssetFacts.js +139 -18
  221. package/Utils/NetworkDevice/NetworkDeviceAssetFacts.mjs +1 -0
  222. package/Utils/NetworkDevice/NetworkDeviceRefresh.d.mts +88 -0
  223. package/Utils/NetworkDevice/NetworkDeviceRefresh.d.ts +88 -0
  224. package/Utils/NetworkDevice/NetworkDeviceRefresh.js +232 -0
  225. package/Utils/NetworkDevice/NetworkDeviceRefresh.mjs +16 -0
  226. package/Utils/NetworkTraffic/NetworkAddressBlock.d.mts +20 -0
  227. package/Utils/NetworkTraffic/NetworkAddressBlock.d.ts +20 -0
  228. package/Utils/NetworkTraffic/NetworkAddressBlock.js +264 -0
  229. package/Utils/NetworkTraffic/NetworkAddressBlock.mjs +3 -0
  230. package/Utils/Project/RecordNumber.d.mts +43 -0
  231. package/Utils/Project/RecordNumber.d.ts +43 -0
  232. package/Utils/Project/RecordNumber.js +151 -0
  233. package/Utils/Project/RecordNumber.mjs +6 -0
  234. package/Utils/Schema/MonitorSchemas.d.mts +9 -0
  235. package/Utils/Schema/MonitorSchemas.d.ts +9 -0
  236. package/Utils/Schema/MonitorSchemas.js +291 -0
  237. package/Utils/Schema/MonitorSchemas.mjs +9 -0
  238. package/Utils/Schema/TypeSchemas.d.mts +12 -0
  239. package/Utils/Schema/TypeSchemas.d.ts +12 -0
  240. package/Utils/Schema/TypeSchemas.js +176 -0
  241. package/Utils/Schema/TypeSchemas.mjs +11 -0
  242. package/Utils/Schema/Zod.js +17 -17
  243. package/Utils/SecurityCase/SecurityCaseMarkdown.d.mts +43 -0
  244. package/Utils/SecurityCase/SecurityCaseMarkdown.d.ts +43 -0
  245. package/Utils/SecurityCase/SecurityCaseMarkdown.js +89 -0
  246. package/Utils/SecurityCase/SecurityCaseMarkdown.mjs +11 -0
  247. package/Utils/SecurityCase/SecurityCasePriorities.d.mts +2 -0
  248. package/Utils/SecurityCase/SecurityCasePriorities.d.ts +2 -0
  249. package/Utils/SecurityCase/SecurityCasePriorities.js +15 -1
  250. package/Utils/SecurityCase/SecurityCaseTargets.d.mts +128 -0
  251. package/Utils/SecurityCase/SecurityCaseTargets.d.ts +128 -0
  252. package/Utils/SecurityCase/SecurityCaseTargets.js +482 -0
  253. package/Utils/SecurityCase/SecurityCaseTargets.mjs +28 -0
  254. package/Utils/SecurityEvent/SecurityEventSearch.d.mts +56 -0
  255. package/Utils/SecurityEvent/SecurityEventSearch.d.ts +56 -0
  256. package/Utils/SecurityEvent/SecurityEventSearch.js +422 -0
  257. package/Utils/SecurityEvent/SecurityEventSearch.mjs +21 -0
  258. package/Utils/SecurityEvent/SecurityHuntSearch.d.mts +12 -0
  259. package/Utils/SecurityEvent/SecurityHuntSearch.d.ts +12 -0
  260. package/Utils/SecurityEvent/SecurityHuntSearch.js +51 -0
  261. package/Utils/SecurityEvent/SecurityHuntSearch.mjs +3 -0
  262. package/Utils/SecurityEvent/Sigma/SigmaRuleParser.js +22 -0
  263. package/Utils/SecurityEvent/Sigma/SigmaWatchlists.d.mts +24 -0
  264. package/Utils/SecurityEvent/Sigma/SigmaWatchlists.d.ts +24 -0
  265. package/Utils/SecurityEvent/Sigma/SigmaWatchlists.js +183 -0
  266. package/Utils/SecurityEvent/Sigma/SigmaWatchlists.mjs +9 -0
  267. package/Utils/Suggestions/TracePerformanceFixSuggestion.d.mts +9 -0
  268. package/Utils/Suggestions/TracePerformanceFixSuggestion.d.ts +9 -0
  269. package/Utils/Suggestions/TracePerformanceFixSuggestion.js +69 -1
  270. package/Utils/Suggestions/TracePerformanceFixSuggestion.mjs +4 -0
  271. package/package.json +1 -1
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.MAX_DISCOVERY_READER_NAME_LENGTH = exports.MAX_DISCOVERY_READER_ID_LENGTH = exports.MAX_DISCOVERED_VALUE_LENGTH = exports.NETWORK_DEVICE_DISCOVERED_SNMP_FIELDS = exports.NETWORK_DEVICE_DISCOVERED_FIELDS = exports.DISCOVERED_DETAILS_OTHER_MACHINE_KEY = exports.DISCOVERED_DETAILS_FOUND_BY_KEY = exports.NetworkDeviceDiscoveryReaderType = exports.NetworkDeviceDiscoveryMethod = exports.NetworkDeviceDiscoveredField = void 0;
6
+ exports.MAX_DISCOVERY_READER_NAME_LENGTH = exports.MAX_DISCOVERY_READER_ID_LENGTH = exports.MAX_DISCOVERED_VALUE_LENGTH = exports.NETWORK_DEVICE_DISCOVERED_SNMP_FIELDS = exports.NETWORK_DEVICE_DISCOVERED_FIELDS = exports.DISCOVERED_DETAILS_OTHER_MACHINE_KEY = exports.DISCOVERED_DETAILS_FOUND_BY_KEY = exports.DISCOVERED_DETAILS_CONTROLLER_KEY = exports.MAX_CONTROLLER_VALUE_LENGTH = exports.NETWORK_CONTROLLER_PRODUCT_TYPES = exports.NETWORK_DEVICE_CONTROLLER_FIELDS = exports.NetworkDeviceControllerField = exports.NetworkDeviceDiscoveryReaderType = exports.NetworkDeviceDiscoveryMethod = exports.NetworkDeviceDiscoveredField = void 0;
7
7
  exports.isNetworkDeviceDiscoveredField = isNetworkDeviceDiscoveredField;
8
8
  exports.isDiscoveredDetailsKey = isDiscoveredDetailsKey;
9
9
  exports.getDiscoveryMethodForField = getDiscoveryMethodForField;
@@ -15,11 +15,14 @@ exports.readDiscoveryReader = readDiscoveryReader;
15
15
  exports.buildDiscoveredValue = buildDiscoveredValue;
16
16
  exports.buildDiscoverySighting = buildDiscoverySighting;
17
17
  exports.buildOtherMachineSighting = buildOtherMachineSighting;
18
+ exports.normalizeControllerValue = normalizeControllerValue;
19
+ exports.buildControllerReading = buildControllerReading;
18
20
  exports.readNetworkDeviceDiscoveredDetails = readNetworkDeviceDiscoveredDetails;
19
21
  exports.toDiscoveredDetailsJson = toDiscoveredDetailsJson;
20
22
  exports.sanitizeDiscoveredDetailsOnWrite = sanitizeDiscoveredDetailsOnWrite;
21
23
  exports.getDiscoveredTime = getDiscoveredTime;
22
24
  const IP_1 = __importDefault(require("../IP/IP"));
25
+ const NetworkControllerProvider_1 = require("../NetworkController/NetworkControllerProvider");
23
26
  const EndpointAttachmentUtil_1 = require("../../Utils/Monitor/EndpointAttachmentUtil");
24
27
  const NetbiosNameUtil_1 = require("../../Utils/NetworkDiscovery/NetbiosNameUtil");
25
28
  const ReverseDnsNameUtil_1 = require("../../Utils/NetworkDiscovery/ReverseDnsNameUtil");
@@ -56,10 +59,12 @@ const ReverseDnsNameUtil_1 = require("../../Utils/NetworkDiscovery/ReverseDnsNam
56
59
  * discovery read, both are shown.
57
60
  *
58
61
  * FLAT, ON PURPOSE. Each entry is a top-level key of the jsonb column, so the
59
- * three writers - the discovery engine (scan results), the ARP learner (MACs)
60
- * and the poll pipeline (resolved addresses) - each merge their own keys with
61
- * jsonb `||` in one statement (NetworkDeviceService.mergeDiscoveredDetails)
62
- * and never overwrite one another's.
62
+ * four writers - the discovery engine (scan results), the ARP learner (MACs),
63
+ * the poll pipeline (resolved addresses) and a network controller connection
64
+ * (what the device's controller says it is, under one key of its own) - each
65
+ * merge their own keys with jsonb `||` in one statement
66
+ * (NetworkDeviceService.mergeDiscoveredDetails) and never overwrite one
67
+ * another's.
63
68
  *
64
69
  * EVERY VALUE IS UNTRUSTED. A PTR name is chosen by whoever runs DNS for the
65
70
  * scanned subnet, a NetBIOS name and an SNMP system group by the machine at
@@ -101,7 +106,86 @@ var NetworkDeviceDiscoveryReaderType;
101
106
  // A walked device: the router or switch whose ARP table it is.
102
107
  NetworkDeviceDiscoveryReaderType["NetworkDevice"] = "networkDevice";
103
108
  NetworkDeviceDiscoveryReaderType["Probe"] = "probe";
109
+ /*
110
+ * A network controller connection - a Meraki organization the project
111
+ * reads (NetworkControllerConnection): what its controller says about the
112
+ * device. Only the controller reading below is read by one.
113
+ */
114
+ NetworkDeviceDiscoveryReaderType["NetworkController"] = "networkController";
104
115
  })(NetworkDeviceDiscoveryReaderType || (exports.NetworkDeviceDiscoveryReaderType = NetworkDeviceDiscoveryReaderType = {}));
116
+ /*
117
+ * What a device's network controller says it is: one reading of the
118
+ * controller's device list (the Meraki dashboard's, for a Meraki
119
+ * organization the project reads), recorded whole by the connection that
120
+ * read it - unlike the per-field entries above, every value of it was read
121
+ * at the same moment by the same reader, and it is replaced whole by the next
122
+ * reading. Integration data as a source of a device's details (the
123
+ * follow-ups of #5185 and #5225).
124
+ *
125
+ * The controller knows the box by its serial number, so what it says is the
126
+ * device's own: its model, serial number, firmware, MAC address and
127
+ * management address, the name it carries in the controller, its product
128
+ * type, the controller network it belongs to and the street address the
129
+ * controller files it under.
130
+ */
131
+ var NetworkDeviceControllerField;
132
+ (function (NetworkDeviceControllerField) {
133
+ NetworkDeviceControllerField["Name"] = "name";
134
+ NetworkDeviceControllerField["Model"] = "model";
135
+ NetworkDeviceControllerField["SerialNumber"] = "serialNumber";
136
+ NetworkDeviceControllerField["MacAddress"] = "macAddress";
137
+ NetworkDeviceControllerField["IpAddress"] = "ipAddress";
138
+ NetworkDeviceControllerField["FirmwareVersion"] = "firmwareVersion";
139
+ NetworkDeviceControllerField["ProductType"] = "productType";
140
+ NetworkDeviceControllerField["NetworkName"] = "networkName";
141
+ NetworkDeviceControllerField["Address"] = "address";
142
+ })(NetworkDeviceControllerField || (exports.NetworkDeviceControllerField = NetworkDeviceControllerField = {}));
143
+ exports.NETWORK_DEVICE_CONTROLLER_FIELDS = [
144
+ NetworkDeviceControllerField.Name,
145
+ NetworkDeviceControllerField.Model,
146
+ NetworkDeviceControllerField.SerialNumber,
147
+ NetworkDeviceControllerField.MacAddress,
148
+ NetworkDeviceControllerField.IpAddress,
149
+ NetworkDeviceControllerField.FirmwareVersion,
150
+ NetworkDeviceControllerField.ProductType,
151
+ NetworkDeviceControllerField.NetworkName,
152
+ NetworkDeviceControllerField.Address,
153
+ ];
154
+ /*
155
+ * The product types a Meraki device list names
156
+ * (developer.cisco.com/meraki/api-v1/get-organization-devices). Anything
157
+ * else is not one and is dropped, never shown.
158
+ */
159
+ exports.NETWORK_CONTROLLER_PRODUCT_TYPES = [
160
+ "appliance",
161
+ "switch",
162
+ "wireless",
163
+ "camera",
164
+ "sensor",
165
+ "cellularGateway",
166
+ "wirelessController",
167
+ "campusGateway",
168
+ "secureConnect",
169
+ "systemsManager",
170
+ ];
171
+ /*
172
+ * The longest each controller value is kept: a name, model, serial number,
173
+ * firmware and network name as wide as the device columns that hold the
174
+ * same kind of detail (varchar(100)); a street address 255.
175
+ */
176
+ exports.MAX_CONTROLLER_VALUE_LENGTH = {
177
+ [NetworkDeviceControllerField.Name]: 100,
178
+ [NetworkDeviceControllerField.Model]: 100,
179
+ [NetworkDeviceControllerField.SerialNumber]: 100,
180
+ [NetworkDeviceControllerField.MacAddress]: 17,
181
+ [NetworkDeviceControllerField.IpAddress]: 45,
182
+ [NetworkDeviceControllerField.FirmwareVersion]: 100,
183
+ [NetworkDeviceControllerField.ProductType]: 32,
184
+ [NetworkDeviceControllerField.NetworkName]: 100,
185
+ [NetworkDeviceControllerField.Address]: 255,
186
+ };
187
+ // The jsonb key of the controller reading.
188
+ exports.DISCOVERED_DETAILS_CONTROLLER_KEY = "controller";
105
189
  // The jsonb keys of the two address notes.
106
190
  exports.DISCOVERED_DETAILS_FOUND_BY_KEY = "foundBy";
107
191
  exports.DISCOVERED_DETAILS_OTHER_MACHINE_KEY = "otherMachine";
@@ -184,13 +268,15 @@ function isNetworkDeviceDiscoveredField(value) {
184
268
  return typeof value === "string" && KNOWN_FIELDS.has(value);
185
269
  }
186
270
  /*
187
- * True for a top-level key of the jsonb column: a field, or one of the two
188
- * address notes. A writer may set or drop only these.
271
+ * True for a top-level key of the jsonb column: a field, one of the two
272
+ * address notes, or the controller reading. A writer may set or drop only
273
+ * these.
189
274
  */
190
275
  function isDiscoveredDetailsKey(value) {
191
276
  return (isNetworkDeviceDiscoveredField(value) ||
192
277
  value === exports.DISCOVERED_DETAILS_FOUND_BY_KEY ||
193
- value === exports.DISCOVERED_DETAILS_OTHER_MACHINE_KEY);
278
+ value === exports.DISCOVERED_DETAILS_OTHER_MACHINE_KEY ||
279
+ value === exports.DISCOVERED_DETAILS_CONTROLLER_KEY);
194
280
  }
195
281
  function getDiscoveryMethodForField(field) {
196
282
  return METHOD_BY_FIELD[field];
@@ -418,6 +504,70 @@ function buildOtherMachineSighting(data) {
418
504
  }
419
505
  return note;
420
506
  }
507
+ /**
508
+ * One value of a controller reading as it may be stored and shown, or
509
+ * undefined when it is not usable as one: a MAC through the one MAC
510
+ * normaliser, an address only when it is an address literal, a product type
511
+ * only when it is one the controller names, and cleaned, bounded text for the
512
+ * rest. The controller's answer is outside text, and so is the column an API
513
+ * create can carry: both pass through here.
514
+ */
515
+ function normalizeControllerValue(field, value) {
516
+ switch (field) {
517
+ case NetworkDeviceControllerField.MacAddress:
518
+ return typeof value === "string"
519
+ ? (0, EndpointAttachmentUtil_1.normalizeMac)(value.substring(0, MAX_INPUT_SCAN_LENGTH))
520
+ : undefined;
521
+ case NetworkDeviceControllerField.IpAddress: {
522
+ const text = cleanDiscoveredText(value, exports.MAX_CONTROLLER_VALUE_LENGTH[NetworkDeviceControllerField.IpAddress]);
523
+ return text && IP_1.default.isIP(text) ? text : undefined;
524
+ }
525
+ case NetworkDeviceControllerField.ProductType: {
526
+ const text = cleanDiscoveredText(value, exports.MAX_CONTROLLER_VALUE_LENGTH[NetworkDeviceControllerField.ProductType]);
527
+ return text && exports.NETWORK_CONTROLLER_PRODUCT_TYPES.includes(text)
528
+ ? text
529
+ : undefined;
530
+ }
531
+ default:
532
+ return cleanDiscoveredText(value, exports.MAX_CONTROLLER_VALUE_LENGTH[field]);
533
+ }
534
+ }
535
+ /**
536
+ * A controller reading, ready to store - or undefined when the controller is
537
+ * not one OneUptime reads, the reader is not a network controller
538
+ * connection, the time does not parse, or nothing it holds is usable. Every
539
+ * writer builds its reading here, and the reader below reads stored ones
540
+ * through it, so what is stored is what is read back.
541
+ */
542
+ function buildControllerReading(data) {
543
+ if (!(0, NetworkControllerProvider_1.isNetworkControllerProvider)(data.provider)) {
544
+ return undefined;
545
+ }
546
+ const readBy = readDiscoveryReader(data.readBy);
547
+ const readAt = readDiscoveryTime(data.readAt);
548
+ if (!readBy ||
549
+ readBy.type !== NetworkDeviceDiscoveryReaderType.NetworkController ||
550
+ !readAt ||
551
+ !isPlainObject(data.values)) {
552
+ return undefined;
553
+ }
554
+ const values = {};
555
+ for (const field of exports.NETWORK_DEVICE_CONTROLLER_FIELDS) {
556
+ const value = normalizeControllerValue(field, data.values[field]);
557
+ if (value) {
558
+ values[field] = value;
559
+ }
560
+ }
561
+ if (Object.keys(values).length === 0) {
562
+ return undefined;
563
+ }
564
+ return {
565
+ provider: data.provider,
566
+ readBy: readBy,
567
+ readAt: readAt,
568
+ values: values,
569
+ };
570
+ }
421
571
  /**
422
572
  * A device's discovered details, read defensively out of its jsonb column:
423
573
  * every entry that is not exactly what OneUptime writes - an unknown key, a
@@ -460,6 +610,18 @@ function readNetworkDeviceDiscoveredDetails(raw) {
460
610
  details.otherMachine = note;
461
611
  }
462
612
  }
613
+ const controller = raw[exports.DISCOVERED_DETAILS_CONTROLLER_KEY];
614
+ if (isPlainObject(controller)) {
615
+ const reading = buildControllerReading({
616
+ provider: controller["provider"],
617
+ readBy: controller["readBy"],
618
+ readAt: controller["readAt"],
619
+ values: controller["values"],
620
+ });
621
+ if (reading) {
622
+ details.controller = reading;
623
+ }
624
+ }
463
625
  return details;
464
626
  }
465
627
  /**
@@ -481,6 +643,9 @@ function toDiscoveredDetailsJson(details) {
481
643
  if (details.otherMachine) {
482
644
  json[exports.DISCOVERED_DETAILS_OTHER_MACHINE_KEY] = details.otherMachine;
483
645
  }
646
+ if (details.controller) {
647
+ json[exports.DISCOVERED_DETAILS_CONTROLLER_KEY] = details.controller;
648
+ }
484
649
  return json;
485
650
  }
486
651
  /**
@@ -1,14 +1,20 @@
1
1
  import commonJsModule from "./NetworkDeviceDiscoveredDetails.js";
2
+ export const DISCOVERED_DETAILS_CONTROLLER_KEY = commonJsModule.DISCOVERED_DETAILS_CONTROLLER_KEY;
2
3
  export const DISCOVERED_DETAILS_FOUND_BY_KEY = commonJsModule.DISCOVERED_DETAILS_FOUND_BY_KEY;
3
4
  export const DISCOVERED_DETAILS_OTHER_MACHINE_KEY = commonJsModule.DISCOVERED_DETAILS_OTHER_MACHINE_KEY;
5
+ export const MAX_CONTROLLER_VALUE_LENGTH = commonJsModule.MAX_CONTROLLER_VALUE_LENGTH;
4
6
  export const MAX_DISCOVERED_VALUE_LENGTH = commonJsModule.MAX_DISCOVERED_VALUE_LENGTH;
5
7
  export const MAX_DISCOVERY_READER_ID_LENGTH = commonJsModule.MAX_DISCOVERY_READER_ID_LENGTH;
6
8
  export const MAX_DISCOVERY_READER_NAME_LENGTH = commonJsModule.MAX_DISCOVERY_READER_NAME_LENGTH;
9
+ export const NETWORK_CONTROLLER_PRODUCT_TYPES = commonJsModule.NETWORK_CONTROLLER_PRODUCT_TYPES;
10
+ export const NETWORK_DEVICE_CONTROLLER_FIELDS = commonJsModule.NETWORK_DEVICE_CONTROLLER_FIELDS;
7
11
  export const NETWORK_DEVICE_DISCOVERED_FIELDS = commonJsModule.NETWORK_DEVICE_DISCOVERED_FIELDS;
8
12
  export const NETWORK_DEVICE_DISCOVERED_SNMP_FIELDS = commonJsModule.NETWORK_DEVICE_DISCOVERED_SNMP_FIELDS;
13
+ export const NetworkDeviceControllerField = commonJsModule.NetworkDeviceControllerField;
9
14
  export const NetworkDeviceDiscoveredField = commonJsModule.NetworkDeviceDiscoveredField;
10
15
  export const NetworkDeviceDiscoveryMethod = commonJsModule.NetworkDeviceDiscoveryMethod;
11
16
  export const NetworkDeviceDiscoveryReaderType = commonJsModule.NetworkDeviceDiscoveryReaderType;
17
+ export const buildControllerReading = commonJsModule.buildControllerReading;
12
18
  export const buildDiscoveredValue = commonJsModule.buildDiscoveredValue;
13
19
  export const buildDiscoverySighting = commonJsModule.buildDiscoverySighting;
14
20
  export const buildOtherMachineSighting = commonJsModule.buildOtherMachineSighting;
@@ -18,6 +24,7 @@ export const getDiscoveryMethodForField = commonJsModule.getDiscoveryMethodForFi
18
24
  export const getDiscoveryReaderTypeForField = commonJsModule.getDiscoveryReaderTypeForField;
19
25
  export const isDiscoveredDetailsKey = commonJsModule.isDiscoveredDetailsKey;
20
26
  export const isNetworkDeviceDiscoveredField = commonJsModule.isNetworkDeviceDiscoveredField;
27
+ export const normalizeControllerValue = commonJsModule.normalizeControllerValue;
21
28
  export const normalizeDiscoveredValue = commonJsModule.normalizeDiscoveredValue;
22
29
  export const readDiscoveryReader = commonJsModule.readDiscoveryReader;
23
30
  export const readDiscoveryTime = commonJsModule.readDiscoveryTime;
@@ -12,6 +12,7 @@ export declare enum RollupCategory {
12
12
  Slos = "slos",
13
13
  IncomingCalls = "incoming-calls",
14
14
  SecurityCases = "security-cases",
15
+ SecurityHunts = "security-hunts",
15
16
  OnCall = "on-call",
16
17
  Other = "other"
17
18
  }
@@ -12,6 +12,7 @@ export declare enum RollupCategory {
12
12
  Slos = "slos",
13
13
  IncomingCalls = "incoming-calls",
14
14
  SecurityCases = "security-cases",
15
+ SecurityHunts = "security-hunts",
15
16
  OnCall = "on-call",
16
17
  Other = "other"
17
18
  }
@@ -40,6 +40,7 @@ var RollupCategory;
40
40
  RollupCategory["Slos"] = "slos";
41
41
  RollupCategory["IncomingCalls"] = "incoming-calls";
42
42
  RollupCategory["SecurityCases"] = "security-cases";
43
+ RollupCategory["SecurityHunts"] = "security-hunts";
43
44
  RollupCategory["OnCall"] = "on-call";
44
45
  RollupCategory["Other"] = "other";
45
46
  })(RollupCategory || (exports.RollupCategory = RollupCategory = {}));
@@ -61,6 +62,7 @@ exports.ROLLUP_CATEGORY_LABEL = {
61
62
  [RollupCategory.Slos]: "SLOs",
62
63
  [RollupCategory.IncomingCalls]: "Incoming Calls",
63
64
  [RollupCategory.SecurityCases]: "Security Cases",
65
+ [RollupCategory.SecurityHunts]: "Security Hunts",
64
66
  [RollupCategory.OnCall]: "On Call",
65
67
  [RollupCategory.Other]: "Other",
66
68
  };
@@ -146,6 +148,15 @@ exports.ROLLUP_CATEGORY_BY_EVENT_TYPE = {
146
148
  [NotificationSettingEventType_1.default.SEND_SECURITY_CASE_OPENED_NOTIFICATION]: RollupCategory.SecurityCases,
147
149
  [NotificationSettingEventType_1.default.SEND_SECURITY_CASE_ASSIGNED_NOTIFICATION]: RollupCategory.SecurityCases,
148
150
  [NotificationSettingEventType_1.default.SEND_SECURITY_PLAYBOOK_APPROVAL_NOTIFICATION]: RollupCategory.SecurityCases,
151
+ // Never held back (NEVER_ROLLED_UP_EVENT_TYPES): filed here all the same.
152
+ [NotificationSettingEventType_1.default.SEND_SECURITY_CASE_TARGET_NOTIFICATION]: RollupCategory.SecurityCases,
153
+ [NotificationSettingEventType_1.default.SEND_SECURITY_CASE_TASK_ASSIGNED_NOTIFICATION]: RollupCategory.SecurityCases,
154
+ /*
155
+ * Scheduled hunts. A category of their own: twenty hunts that run on the
156
+ * hour and all find something roll up with each other, never with a
157
+ * case's email.
158
+ */
159
+ [NotificationSettingEventType_1.default.SEND_SECURITY_HUNT_FOUND_NOTIFICATION]: RollupCategory.SecurityHunts,
149
160
  /*
150
161
  * On Call Notifications, including the two shift reminders. Five of these
151
162
  * seven are never rolled up at all (see NotificationEmailRollupPolicy); they
@@ -189,6 +200,7 @@ exports.ROLLUP_CATEGORY_ORDER = [
189
200
  RollupCategory.AlertEpisodes,
190
201
  RollupCategory.IncomingCalls,
191
202
  RollupCategory.SecurityCases,
203
+ RollupCategory.SecurityHunts,
192
204
  RollupCategory.Slos,
193
205
  RollupCategory.Monitors,
194
206
  RollupCategory.ScheduledMaintenance,
@@ -38,6 +38,12 @@ exports.NEVER_ROLLED_UP_EVENT_TYPES = new Set([
38
38
  NotificationSettingEventType_1.default.SEND_BEFORE_USER_ON_CALL_SHIFT_STARTS,
39
39
  NotificationSettingEventType_1.default.SEND_WHEN_USER_ON_CALL_SHIFT_IS_REASSIGNED,
40
40
  NotificationSettingEventType_1.default.SEND_INCIDENT_SLA_BREACHED_OWNER_NOTIFICATION,
41
+ /*
42
+ * A security case about to miss a response target, or missing it: a
43
+ * deadline, like an incident's SLA breach. Held back for five minutes, a
44
+ * three-minute warning would arrive after the target it warns of.
45
+ */
46
+ NotificationSettingEventType_1.default.SEND_SECURITY_CASE_TARGET_NOTIFICATION,
41
47
  ]);
42
48
  /*
43
49
  * SHRINK-ONLY. These two carry ON_CALL in their member name and are still
@@ -44,6 +44,9 @@ declare enum NotificationSettingEventType {
44
44
  SEND_SECURITY_CASE_OPENED_NOTIFICATION = "Send notification when a security case opens or rises to my chosen priority",
45
45
  SEND_SECURITY_CASE_ASSIGNED_NOTIFICATION = "Send notification when a security case is assigned to me or to a team I am on",
46
46
  SEND_SECURITY_PLAYBOOK_APPROVAL_NOTIFICATION = "Send notification when a playbook step on a security case is waiting for my approval",
47
+ SEND_SECURITY_CASE_TARGET_NOTIFICATION = "Send notification when a security case is about to miss, or misses, a response target",
48
+ SEND_SECURITY_CASE_TASK_ASSIGNED_NOTIFICATION = "Send notification when a task on a security case is assigned to me",
49
+ SEND_SECURITY_HUNT_FOUND_NOTIFICATION = "Send notification when a scheduled hunt that names me or my team finds security events",
47
50
  SEND_WHEN_USER_IS_ON_CALL_ROSTER = "When user is on-call roster",
48
51
  SEND_WHEN_USER_IS_NEXT_ON_CALL_ROSTER = "When user is next on-call roster",
49
52
  SEND_WHEN_USER_IS_ADDED_TO_ON_CALL_POLICY = "When user is added to on-call policy",
@@ -44,6 +44,9 @@ declare enum NotificationSettingEventType {
44
44
  SEND_SECURITY_CASE_OPENED_NOTIFICATION = "Send notification when a security case opens or rises to my chosen priority",
45
45
  SEND_SECURITY_CASE_ASSIGNED_NOTIFICATION = "Send notification when a security case is assigned to me or to a team I am on",
46
46
  SEND_SECURITY_PLAYBOOK_APPROVAL_NOTIFICATION = "Send notification when a playbook step on a security case is waiting for my approval",
47
+ SEND_SECURITY_CASE_TARGET_NOTIFICATION = "Send notification when a security case is about to miss, or misses, a response target",
48
+ SEND_SECURITY_CASE_TASK_ASSIGNED_NOTIFICATION = "Send notification when a task on a security case is assigned to me",
49
+ SEND_SECURITY_HUNT_FOUND_NOTIFICATION = "Send notification when a scheduled hunt that names me or my team finds security events",
47
50
  SEND_WHEN_USER_IS_ON_CALL_ROSTER = "When user is on-call roster",
48
51
  SEND_WHEN_USER_IS_NEXT_ON_CALL_ROSTER = "When user is next on-call roster",
49
52
  SEND_WHEN_USER_IS_ADDED_TO_ON_CALL_POLICY = "When user is added to on-call policy",
@@ -70,6 +70,21 @@ var NotificationSettingEventType;
70
70
  NotificationSettingEventType["SEND_SECURITY_CASE_OPENED_NOTIFICATION"] = "Send notification when a security case opens or rises to my chosen priority";
71
71
  NotificationSettingEventType["SEND_SECURITY_CASE_ASSIGNED_NOTIFICATION"] = "Send notification when a security case is assigned to me or to a team I am on";
72
72
  NotificationSettingEventType["SEND_SECURITY_PLAYBOOK_APPROVAL_NOTIFICATION"] = "Send notification when a playbook step on a security case is waiting for my approval";
73
+ /*
74
+ * A case is about to miss, or misses, a response target its priority sets
75
+ * (SecurityCaseTargetCheck): told to the people on the case - its assignee
76
+ * and its team - or, when nobody is, to the people told about cases at its
77
+ * priority. Never held back in a rollup: it is about a deadline.
78
+ */
79
+ NotificationSettingEventType["SEND_SECURITY_CASE_TARGET_NOTIFICATION"] = "Send notification when a security case is about to miss, or misses, a response target";
80
+ // A task on a security case is handed to the person (SecurityCaseTaskService).
81
+ NotificationSettingEventType["SEND_SECURITY_CASE_TASK_ASSIGNED_NOTIFICATION"] = "Send notification when a task on a security case is assigned to me";
82
+ /*
83
+ * A scheduled hunt found security events (SecurityHuntNotifications): told
84
+ * to the people the hunt names and the members of the teams it names, who
85
+ * can read its project's hunts and security events.
86
+ */
87
+ NotificationSettingEventType["SEND_SECURITY_HUNT_FOUND_NOTIFICATION"] = "Send notification when a scheduled hunt that names me or my team finds security events";
73
88
  // On Call Notifications
74
89
  NotificationSettingEventType["SEND_WHEN_USER_IS_ON_CALL_ROSTER"] = "When user is on-call roster";
75
90
  NotificationSettingEventType["SEND_WHEN_USER_IS_NEXT_ON_CALL_ROSTER"] = "When user is next on-call roster";
@@ -33,5 +33,4 @@ export default class ObjectID extends DatabaseProperty {
33
33
  * Validate that a string is a valid UUID, throw BadDataException if not
34
34
  */
35
35
  static validateUUID(id: string): void;
36
- static getSchema(): any;
37
36
  }
@@ -33,5 +33,4 @@ export default class ObjectID extends DatabaseProperty {
33
33
  * Validate that a string is a valid UUID, throw BadDataException if not
34
34
  */
35
35
  static validateUUID(id: string): void;
36
- static getSchema(): any;
37
36
  }
package/Types/ObjectID.js CHANGED
@@ -8,7 +8,6 @@ const UUID_1 = __importDefault(require("../Utils/UUID"));
8
8
  const DatabaseProperty_1 = __importDefault(require("./Database/DatabaseProperty"));
9
9
  const BadDataException_1 = __importDefault(require("./Exception/BadDataException"));
10
10
  const JSON_1 = require("./JSON");
11
- const Zod_1 = __importDefault(require("../Utils/Schema/Zod"));
12
11
  const RefusedValue_1 = require("../Utils/RefusedValue");
13
12
  // UUID validation regex - matches standard UUID format
14
13
  const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
@@ -124,13 +123,5 @@ class ObjectID extends DatabaseProperty_1.default {
124
123
  throw new BadDataException_1.default(`Invalid ID format: "${(0, RefusedValue_1.refusedValue)(id)}". Expected a valid UUID (e.g., "550e8400-e29b-41d4-a716-446655440000").`);
125
124
  }
126
125
  }
127
- static getSchema() {
128
- return Zod_1.default.string().openapi({
129
- type: "string",
130
- example: "123e4567-e89b-12d3-a456-426614174000",
131
- format: "uuid",
132
- description: "A unique identifier for an object, represented as a UUID.",
133
- });
134
- }
135
126
  }
136
127
  exports.default = ObjectID;
@@ -2,6 +2,10 @@ export declare const ON_CALL_POLICY_RUN_WENT_THROUGH_EVERY_RULE_MESSAGE: string;
2
2
  export declare const ON_CALL_POLICY_RUN_EVERYBODY_PASSED_ON_MESSAGE: string;
3
3
  export declare const LEGACY_ON_CALL_POLICY_RUN_EVERYBODY_PASSED_ON_MESSAGE: string;
4
4
  export declare function isOnCallPolicyRunEverybodyPassedOnMessage(message: string | undefined | null): boolean;
5
+ export declare const ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_FIX: string;
6
+ export declare const ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_MESSAGE: string;
7
+ export declare const LEGACY_ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_MESSAGE: string;
8
+ export declare function isOnCallPolicyRunNobodyNotifiedMessage(message: string | undefined | null): boolean;
5
9
  export declare const ON_CALL_POLICY_RUN_RECORD_HANDLED_MESSAGE_START: string;
6
10
  export declare function getOnCallPolicyRunRecordHandledMessage(recordKind: string): string;
7
11
  export declare function getOnCallPolicyRunRecordResolvedMessage(recordKind: string): string;
@@ -2,6 +2,10 @@ export declare const ON_CALL_POLICY_RUN_WENT_THROUGH_EVERY_RULE_MESSAGE: string;
2
2
  export declare const ON_CALL_POLICY_RUN_EVERYBODY_PASSED_ON_MESSAGE: string;
3
3
  export declare const LEGACY_ON_CALL_POLICY_RUN_EVERYBODY_PASSED_ON_MESSAGE: string;
4
4
  export declare function isOnCallPolicyRunEverybodyPassedOnMessage(message: string | undefined | null): boolean;
5
+ export declare const ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_FIX: string;
6
+ export declare const ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_MESSAGE: string;
7
+ export declare const LEGACY_ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_MESSAGE: string;
8
+ export declare function isOnCallPolicyRunNobodyNotifiedMessage(message: string | undefined | null): boolean;
5
9
  export declare const ON_CALL_POLICY_RUN_RECORD_HANDLED_MESSAGE_START: string;
6
10
  export declare function getOnCallPolicyRunRecordHandledMessage(recordKind: string): string;
7
11
  export declare function getOnCallPolicyRunRecordResolvedMessage(recordKind: string): string;
@@ -12,8 +12,9 @@
12
12
  * it from here.
13
13
  */
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.ON_CALL_POLICY_RUN_RECORD_HANDLED_MESSAGE_START = exports.LEGACY_ON_CALL_POLICY_RUN_EVERYBODY_PASSED_ON_MESSAGE = exports.ON_CALL_POLICY_RUN_EVERYBODY_PASSED_ON_MESSAGE = exports.ON_CALL_POLICY_RUN_WENT_THROUGH_EVERY_RULE_MESSAGE = void 0;
15
+ exports.ON_CALL_POLICY_RUN_RECORD_HANDLED_MESSAGE_START = exports.LEGACY_ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_MESSAGE = exports.ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_MESSAGE = exports.ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_FIX = exports.LEGACY_ON_CALL_POLICY_RUN_EVERYBODY_PASSED_ON_MESSAGE = exports.ON_CALL_POLICY_RUN_EVERYBODY_PASSED_ON_MESSAGE = exports.ON_CALL_POLICY_RUN_WENT_THROUGH_EVERY_RULE_MESSAGE = void 0;
16
16
  exports.isOnCallPolicyRunEverybodyPassedOnMessage = isOnCallPolicyRunEverybodyPassedOnMessage;
17
+ exports.isOnCallPolicyRunNobodyNotifiedMessage = isOnCallPolicyRunNobodyNotifiedMessage;
17
18
  exports.getOnCallPolicyRunRecordHandledMessage = getOnCallPolicyRunRecordHandledMessage;
18
19
  exports.getOnCallPolicyRunRecordResolvedMessage = getOnCallPolicyRunRecordResolvedMessage;
19
20
  // A run that went through every escalation rule, and every repeat.
@@ -36,6 +37,29 @@ function isOnCallPolicyRunEverybodyPassedOnMessage(message) {
36
37
  return (trimmed === exports.ON_CALL_POLICY_RUN_EVERYBODY_PASSED_ON_MESSAGE ||
37
38
  trimmed === exports.LEGACY_ON_CALL_POLICY_RUN_EVERYBODY_PASSED_ON_MESSAGE);
38
39
  }
40
+ /*
41
+ * A RUN THAT PAGED NOBODY AT ALL: no escalation rule of its policy had
42
+ * anybody it could page - no responders, empty teams, nobody on call,
43
+ * everybody away, gone or unreachable. Such a run stops as soon as it has
44
+ * gone through its rules, since every rule that pages nobody is passed at
45
+ * once (OnCallEmptyLevel), and it ends as "Completed - No One Notified".
46
+ *
47
+ * Its message says who can put it right: the people who look after the
48
+ * policy - its owners, who are also the ones emailed about a page that
49
+ * could not be delivered. The record's feed says the second sentence alone
50
+ * after its own (OnCallFeedText): "went through every escalation rule and
51
+ * paged nobody" is the first.
52
+ */
53
+ exports.ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_FIX = "This policy's owners should add responders to its escalation rules, or check who is on call in its schedules.";
54
+ exports.ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_MESSAGE = `Execution completed, but no one was notified: no escalation rule of this policy had anybody to page. ${exports.ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_FIX}`;
55
+ // The same ending as runs wrote it before it said who can put it right.
56
+ exports.LEGACY_ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_MESSAGE = "Execution completed, but no one was notified. Every escalation rule in this policy reached no one - usually because the on-call schedules it targets had nobody on call.";
57
+ // Whether a run ended having paged nobody at all - in either words.
58
+ function isOnCallPolicyRunNobodyNotifiedMessage(message) {
59
+ const trimmed = (message || "").trim();
60
+ return (trimmed === exports.ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_MESSAGE ||
61
+ trimmed === exports.LEGACY_ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_MESSAGE);
62
+ }
39
63
  // How the message of a run that stopped because its record was handled starts.
40
64
  exports.ON_CALL_POLICY_RUN_RECORD_HANDLED_MESSAGE_START = "Execution completed because ";
41
65
  // "Execution completed because incident is acknowledged or resolved."
@@ -1,8 +1,12 @@
1
1
  import commonJsModule from "./OnCallDutyPolicyRunEnding.js";
2
2
  export const LEGACY_ON_CALL_POLICY_RUN_EVERYBODY_PASSED_ON_MESSAGE = commonJsModule.LEGACY_ON_CALL_POLICY_RUN_EVERYBODY_PASSED_ON_MESSAGE;
3
+ export const LEGACY_ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_MESSAGE = commonJsModule.LEGACY_ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_MESSAGE;
3
4
  export const ON_CALL_POLICY_RUN_EVERYBODY_PASSED_ON_MESSAGE = commonJsModule.ON_CALL_POLICY_RUN_EVERYBODY_PASSED_ON_MESSAGE;
5
+ export const ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_FIX = commonJsModule.ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_FIX;
6
+ export const ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_MESSAGE = commonJsModule.ON_CALL_POLICY_RUN_NOBODY_NOTIFIED_MESSAGE;
4
7
  export const ON_CALL_POLICY_RUN_RECORD_HANDLED_MESSAGE_START = commonJsModule.ON_CALL_POLICY_RUN_RECORD_HANDLED_MESSAGE_START;
5
8
  export const ON_CALL_POLICY_RUN_WENT_THROUGH_EVERY_RULE_MESSAGE = commonJsModule.ON_CALL_POLICY_RUN_WENT_THROUGH_EVERY_RULE_MESSAGE;
6
9
  export const getOnCallPolicyRunRecordHandledMessage = commonJsModule.getOnCallPolicyRunRecordHandledMessage;
7
10
  export const getOnCallPolicyRunRecordResolvedMessage = commonJsModule.getOnCallPolicyRunRecordResolvedMessage;
8
11
  export const isOnCallPolicyRunEverybodyPassedOnMessage = commonJsModule.isOnCallPolicyRunEverybodyPassedOnMessage;
12
+ export const isOnCallPolicyRunNobodyNotifiedMessage = commonJsModule.isOnCallPolicyRunNobodyNotifiedMessage;
@@ -0,0 +1,15 @@
1
+ import OnCallDutyExecutionLogTimelineStatus from "./OnCalDutyExecutionLogTimelineStatus.mjs";
2
+ export declare const ON_CALL_LEVEL_HAS_NO_RESPONDERS_TIMELINE_MESSAGE: string;
3
+ export declare const ON_CALL_LEVEL_PAGED_NOBODY_TIMELINE_MESSAGE: string;
4
+ export declare const LEGACY_ON_CALL_LEVEL_NO_USERS_TIMELINE_MESSAGE: string;
5
+ export declare enum OnCallEmptyLevelLine {
6
+ NoResponders = "NoResponders",
7
+ PagedNobody = "PagedNobody",
8
+ Legacy = "Legacy"
9
+ }
10
+ export declare function readOnCallEmptyLevelLine(statusMessage: string | undefined | null): OnCallEmptyLevelLine | null;
11
+ export declare function isOnCallEmptyLevelMovedOnAtOnce(statusMessage: string | undefined | null): boolean;
12
+ export declare function getOnCallEmptyLevelTimelineMessage(data: {
13
+ namesAnybody: boolean;
14
+ }): string;
15
+ export declare function isOnCallPageLineReached(status: OnCallDutyExecutionLogTimelineStatus | string | undefined | null): boolean;
@@ -0,0 +1,15 @@
1
+ import OnCallDutyExecutionLogTimelineStatus from "./OnCalDutyExecutionLogTimelineStatus";
2
+ export declare const ON_CALL_LEVEL_HAS_NO_RESPONDERS_TIMELINE_MESSAGE: string;
3
+ export declare const ON_CALL_LEVEL_PAGED_NOBODY_TIMELINE_MESSAGE: string;
4
+ export declare const LEGACY_ON_CALL_LEVEL_NO_USERS_TIMELINE_MESSAGE: string;
5
+ export declare enum OnCallEmptyLevelLine {
6
+ NoResponders = "NoResponders",
7
+ PagedNobody = "PagedNobody",
8
+ Legacy = "Legacy"
9
+ }
10
+ export declare function readOnCallEmptyLevelLine(statusMessage: string | undefined | null): OnCallEmptyLevelLine | null;
11
+ export declare function isOnCallEmptyLevelMovedOnAtOnce(statusMessage: string | undefined | null): boolean;
12
+ export declare function getOnCallEmptyLevelTimelineMessage(data: {
13
+ namesAnybody: boolean;
14
+ }): string;
15
+ export declare function isOnCallPageLineReached(status: OnCallDutyExecutionLogTimelineStatus | string | undefined | null): boolean;