@oneuptime/common 14.0.102 → 14.0.103

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 (208) hide show
  1. package/Models/DatabaseModels/Index.js +6 -0
  2. package/Models/DatabaseModels/LogSavedView.d.mts +1 -0
  3. package/Models/DatabaseModels/LogSavedView.d.ts +1 -0
  4. package/Models/DatabaseModels/LogSavedView.js +43 -1
  5. package/Models/DatabaseModels/NetworkControllerConnection.d.mts +1 -0
  6. package/Models/DatabaseModels/NetworkControllerConnection.d.ts +1 -0
  7. package/Models/DatabaseModels/NetworkControllerConnection.js +21 -0
  8. package/Models/DatabaseModels/Project.d.mts +3 -0
  9. package/Models/DatabaseModels/Project.d.ts +3 -0
  10. package/Models/DatabaseModels/Project.js +124 -0
  11. package/Models/DatabaseModels/Runner.d.mts +1 -0
  12. package/Models/DatabaseModels/Runner.d.ts +1 -0
  13. package/Models/DatabaseModels/Runner.js +40 -0
  14. package/Models/DatabaseModels/SecurityCase.d.mts +2 -1
  15. package/Models/DatabaseModels/SecurityCase.d.ts +2 -1
  16. package/Models/DatabaseModels/SecurityCase.js +27 -0
  17. package/Models/DatabaseModels/SecurityCaseCustomField.d.mts +20 -0
  18. package/Models/DatabaseModels/SecurityCaseCustomField.d.ts +20 -0
  19. package/Models/DatabaseModels/SecurityCaseCustomField.js +387 -0
  20. package/Models/DatabaseModels/SecurityCaseCustomField.mjs +2 -0
  21. package/Models/DatabaseModels/SecurityCaseNoteTemplate.d.mts +15 -0
  22. package/Models/DatabaseModels/SecurityCaseNoteTemplate.d.ts +15 -0
  23. package/Models/DatabaseModels/SecurityCaseNoteTemplate.js +309 -0
  24. package/Models/DatabaseModels/SecurityCaseNoteTemplate.mjs +2 -0
  25. package/Models/DatabaseModels/WorkspaceHomeChoice.d.mts +11 -0
  26. package/Models/DatabaseModels/WorkspaceHomeChoice.d.ts +11 -0
  27. package/Models/DatabaseModels/WorkspaceHomeChoice.js +186 -0
  28. package/Models/DatabaseModels/WorkspaceHomeChoice.mjs +2 -0
  29. package/Types/AI/AIFixReadiness.d.mts +2 -0
  30. package/Types/AI/AIFixReadiness.d.ts +2 -0
  31. package/Types/AI/AIFixReadiness.js +0 -6
  32. package/Types/AI/CodeTask.d.mts +3 -1
  33. package/Types/AI/CodeTask.d.ts +3 -1
  34. package/Types/AI/CodeTask.js +12 -0
  35. package/Types/CustomField/CustomFieldRecordKinds.js +5 -0
  36. package/Types/CustomField/CustomFieldSavedViews.js +2 -0
  37. package/Types/DateLanguage.js +3 -2
  38. package/Types/DockerSwarm/DockerSwarmInventoryExtractor.d.mts +1 -0
  39. package/Types/DockerSwarm/DockerSwarmInventoryExtractor.d.ts +1 -0
  40. package/Types/DockerSwarm/DockerSwarmInventoryExtractor.js +84 -6
  41. package/Types/DockerSwarm/DockerSwarmInventoryExtractor.mjs +1 -0
  42. package/Types/InstallScripts/InstallScripts.d.mts +1 -0
  43. package/Types/InstallScripts/InstallScripts.d.ts +1 -0
  44. package/Types/InstallScripts/InstallScripts.js +14 -0
  45. package/Types/Monitor/DockerSwarmAlertTemplates.d.mts +15 -0
  46. package/Types/Monitor/DockerSwarmAlertTemplates.d.ts +15 -0
  47. package/Types/Monitor/DockerSwarmAlertTemplates.js +168 -0
  48. package/Types/Monitor/DockerSwarmAlertTemplates.mjs +1 -0
  49. package/Types/Monitor/DockerSwarmMetricCatalog.d.mts +1 -1
  50. package/Types/Monitor/DockerSwarmMetricCatalog.d.ts +1 -1
  51. package/Types/Monitor/DockerSwarmMetricCatalog.js +43 -11
  52. package/Types/Monitor/SeriesContext/SeriesDebugHints.js +19 -0
  53. package/Types/NetworkController/NetworkControllerDeviceAdd.d.mts +70 -0
  54. package/Types/NetworkController/NetworkControllerDeviceAdd.d.ts +70 -0
  55. package/Types/NetworkController/NetworkControllerDeviceAdd.js +389 -0
  56. package/Types/NetworkController/NetworkControllerDeviceAdd.mjs +26 -0
  57. package/Types/NetworkController/NetworkControllerReadSummary.d.mts +2 -0
  58. package/Types/NetworkController/NetworkControllerReadSummary.d.ts +2 -0
  59. package/Types/NetworkController/NetworkControllerReadSummary.js +6 -1
  60. package/Types/NetworkDevice/NetworkTopologyLayout.d.mts +8 -0
  61. package/Types/NetworkDevice/NetworkTopologyLayout.d.ts +8 -0
  62. package/Types/NetworkDevice/NetworkTopologyLayout.js +49 -0
  63. package/Types/NetworkDevice/NetworkTopologyLayout.mjs +3 -0
  64. package/Types/Permission.d.mts +8 -0
  65. package/Types/Permission.d.ts +8 -0
  66. package/Types/Permission.js +87 -3
  67. package/Types/PushNotification/PushNotificationCategory.d.mts +3 -0
  68. package/Types/PushNotification/PushNotificationCategory.d.ts +3 -0
  69. package/Types/PushNotification/PushNotificationCategory.js +38 -0
  70. package/Types/PushNotification/PushNotificationCategory.mjs +4 -0
  71. package/Types/PushNotification/PushNotificationMessage.d.mts +1 -0
  72. package/Types/PushNotification/PushNotificationMessage.d.ts +1 -0
  73. package/Types/Runner/RunnerCodeFixes.d.mts +22 -0
  74. package/Types/Runner/RunnerCodeFixes.d.ts +22 -0
  75. package/Types/Runner/RunnerCodeFixes.js +129 -0
  76. package/Types/Runner/RunnerCodeFixes.mjs +9 -0
  77. package/Types/SecurityCase/SecurityCaseNumber.js +8 -4
  78. package/Types/SecurityEvent/MitreAttack.d.mts +2 -0
  79. package/Types/SecurityEvent/MitreAttack.d.ts +2 -0
  80. package/Types/SecurityEvent/MitreAttack.js +26 -0
  81. package/Types/SecurityEvent/MitreAttack.mjs +2 -0
  82. package/Types/SecurityEvent/OcsfSeverity.js +10 -1
  83. package/Types/Telemetry/TelemetrySearchQuery.js +14 -2
  84. package/Types/Workspace/WorkspaceMessagePayload.d.mts +7 -0
  85. package/Types/Workspace/WorkspaceMessagePayload.d.ts +7 -0
  86. package/Utils/CronScheduleText.d.mts +3 -0
  87. package/Utils/CronScheduleText.d.ts +3 -0
  88. package/Utils/CronScheduleText.js +307 -0
  89. package/Utils/CronScheduleText.mjs +3 -0
  90. package/Utils/Dashboard/DashboardBoardLayout.d.mts +2 -0
  91. package/Utils/Dashboard/DashboardBoardLayout.d.ts +2 -0
  92. package/Utils/Dashboard/DashboardBoardLayout.js +17 -4
  93. package/Utils/Dashboard/DashboardBoardLayout.mjs +1 -0
  94. package/Utils/DeveloperDocs/CliCommands.d.mts +114 -0
  95. package/Utils/DeveloperDocs/CliCommands.d.ts +114 -0
  96. package/Utils/DeveloperDocs/CliCommands.js +750 -0
  97. package/Utils/DeveloperDocs/CliCommands.mjs +37 -0
  98. package/Utils/DeveloperDocs/CliExamples.d.mts +59 -0
  99. package/Utils/DeveloperDocs/CliExamples.d.ts +59 -0
  100. package/Utils/DeveloperDocs/CliExamples.js +348 -0
  101. package/Utils/DeveloperDocs/CliExamples.mjs +17 -0
  102. package/Utils/DeveloperDocs/CliResources.d.mts +18 -0
  103. package/Utils/DeveloperDocs/CliResources.d.ts +18 -0
  104. package/Utils/DeveloperDocs/CliResources.js +129 -0
  105. package/Utils/DeveloperDocs/CliResources.mjs +6 -0
  106. package/Utils/DeveloperDocs/ExampleBuilder.d.mts +6 -0
  107. package/Utils/DeveloperDocs/ExampleBuilder.d.ts +6 -0
  108. package/Utils/DeveloperDocs/ExampleBuilder.js +27 -2
  109. package/Utils/DeveloperDocs/ExampleBuilder.mjs +1 -0
  110. package/Utils/DeveloperDocs/PageLookups.d.mts +1 -1
  111. package/Utils/DeveloperDocs/PageLookups.d.ts +1 -1
  112. package/Utils/DeveloperDocs/PageLookups.js +9 -2
  113. package/Utils/DeveloperDocs/TerraformSchema.d.mts +1 -0
  114. package/Utils/DeveloperDocs/TerraformSchema.d.ts +1 -0
  115. package/Utils/DeveloperDocs/TerraformSchema.js +3 -1
  116. package/Utils/DeveloperDocs/TerraformSchema.mjs +1 -0
  117. package/Utils/LookupTable.d.mts +3 -0
  118. package/Utils/LookupTable.d.ts +3 -0
  119. package/Utils/LookupTable.js +44 -0
  120. package/Utils/LookupTable.mjs +4 -0
  121. package/Utils/Monitor/MonitorCheckScheduleUtil.d.mts +62 -0
  122. package/Utils/Monitor/MonitorCheckScheduleUtil.d.ts +62 -0
  123. package/Utils/Monitor/MonitorCheckScheduleUtil.js +484 -0
  124. package/Utils/Monitor/MonitorCheckScheduleUtil.mjs +3 -0
  125. package/Utils/Monitor/MonitorOverviewFamily.d.mts +39 -0
  126. package/Utils/Monitor/MonitorOverviewFamily.d.ts +39 -0
  127. package/Utils/Monitor/MonitorOverviewFamily.js +207 -0
  128. package/Utils/Monitor/MonitorOverviewFamily.mjs +4 -0
  129. package/Utils/Monitor/MonitorOverviewPresentationUtil.d.mts +192 -0
  130. package/Utils/Monitor/MonitorOverviewPresentationUtil.d.ts +192 -0
  131. package/Utils/Monitor/MonitorOverviewPresentationUtil.js +1659 -0
  132. package/Utils/Monitor/MonitorOverviewPresentationUtil.mjs +5 -0
  133. package/Utils/Monitor/MonitorOverviewProbeUtil.d.mts +112 -0
  134. package/Utils/Monitor/MonitorOverviewProbeUtil.d.ts +112 -0
  135. package/Utils/Monitor/MonitorOverviewProbeUtil.js +640 -0
  136. package/Utils/Monitor/MonitorOverviewProbeUtil.mjs +3 -0
  137. package/Utils/Monitor/MonitorOverviewTargetUtil.d.mts +1 -1
  138. package/Utils/Monitor/MonitorOverviewTargetUtil.d.ts +1 -1
  139. package/Utils/Monitor/MonitorStatusHistoryUtil.d.mts +27 -0
  140. package/Utils/Monitor/MonitorStatusHistoryUtil.d.ts +27 -0
  141. package/Utils/Monitor/MonitorStatusHistoryUtil.js +132 -0
  142. package/Utils/Monitor/MonitorStatusHistoryUtil.mjs +2 -0
  143. package/Utils/Monitor/MonitorUptimeSummaryUtil.d.mts +44 -0
  144. package/Utils/Monitor/MonitorUptimeSummaryUtil.d.ts +44 -0
  145. package/Utils/Monitor/MonitorUptimeSummaryUtil.js +487 -0
  146. package/Utils/Monitor/MonitorUptimeSummaryUtil.mjs +2 -0
  147. package/Utils/OldestKeyMap.d.mts +10 -0
  148. package/Utils/OldestKeyMap.d.ts +10 -0
  149. package/Utils/OldestKeyMap.js +91 -0
  150. package/Utils/OldestKeyMap.mjs +2 -0
  151. package/Utils/Project/NextNumber.d.mts +4 -3
  152. package/Utils/Project/NextNumber.d.ts +4 -3
  153. package/Utils/Project/NextNumber.js +11 -2
  154. package/Utils/Project/NumberPrefix.d.mts +1 -1
  155. package/Utils/Project/NumberPrefix.d.ts +1 -1
  156. package/Utils/Project/NumberPrefix.js +12 -0
  157. package/Utils/Schema/AnalyticsModelSchema.d.mts +48 -0
  158. package/Utils/Schema/AnalyticsModelSchema.d.ts +48 -0
  159. package/Utils/Schema/AnalyticsModelSchema.js +767 -0
  160. package/Utils/Schema/AnalyticsModelSchema.mjs +2 -0
  161. package/Utils/Schema/BaseSchema.d.mts +117 -0
  162. package/Utils/Schema/BaseSchema.d.ts +117 -0
  163. package/Utils/Schema/BaseSchema.js +257 -0
  164. package/Utils/Schema/BaseSchema.mjs +3 -0
  165. package/Utils/Schema/ModelSchema.d.mts +80 -0
  166. package/Utils/Schema/ModelSchema.d.ts +80 -0
  167. package/Utils/Schema/ModelSchema.js +1727 -0
  168. package/Utils/Schema/ModelSchema.mjs +2 -0
  169. package/Utils/SecurityEvent/Connectors/AwsSecurityHubNormalizer.d.mts +0 -1
  170. package/Utils/SecurityEvent/Connectors/AwsSecurityHubNormalizer.d.ts +0 -1
  171. package/Utils/SecurityEvent/Connectors/AwsSecurityHubNormalizer.js +9 -25
  172. package/Utils/SecurityEvent/Connectors/AwsSecurityHubNormalizer.mjs +0 -1
  173. package/Utils/SecurityEvent/Connectors/EntraIdNormalizer.d.mts +1 -1
  174. package/Utils/SecurityEvent/Connectors/EntraIdNormalizer.d.ts +1 -1
  175. package/Utils/SecurityEvent/Connectors/EntraIdNormalizer.js +7 -6
  176. package/Utils/SecurityEvent/Connectors/GoogleWorkspaceNormalizer.d.mts +1 -1
  177. package/Utils/SecurityEvent/Connectors/GoogleWorkspaceNormalizer.d.ts +1 -1
  178. package/Utils/SecurityEvent/Connectors/GoogleWorkspaceNormalizer.js +10 -9
  179. package/Utils/SecurityEvent/Connectors/Microsoft365AuditNormalizer.js +4 -3
  180. package/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdrNormalizer.js +12 -28
  181. package/Utils/SecurityEvent/Connectors/MicrosoftSentinelNormalizer.d.mts +1 -1
  182. package/Utils/SecurityEvent/Connectors/MicrosoftSentinelNormalizer.d.ts +1 -1
  183. package/Utils/SecurityEvent/Connectors/MicrosoftSentinelNormalizer.js +13 -24
  184. package/Utils/SecurityEvent/Connectors/MicrosoftSentinelNormalizer.mjs +1 -1
  185. package/Utils/SecurityEvent/Connectors/OktaNormalizer.d.mts +2 -2
  186. package/Utils/SecurityEvent/Connectors/OktaNormalizer.d.ts +2 -2
  187. package/Utils/SecurityEvent/Connectors/OktaNormalizer.js +7 -6
  188. package/Utils/SecurityEvent/Connectors/SplunkNormalizer.js +7 -26
  189. package/Utils/SecurityEvent/LogParsers/AzureActivityLogParser.js +4 -3
  190. package/Utils/SecurityEvent/LogParsers/WindowsEventLogParser.d.mts +2 -2
  191. package/Utils/SecurityEvent/LogParsers/WindowsEventLogParser.d.ts +2 -2
  192. package/Utils/SecurityEvent/LogParsers/WindowsEventLogParser.js +26 -16
  193. package/Utils/SecurityEvent/LogParsers/WindowsEventRecord.d.mts +1 -1
  194. package/Utils/SecurityEvent/LogParsers/WindowsEventRecord.d.ts +1 -1
  195. package/Utils/SecurityEvent/LogParsers/WindowsEventRecord.js +10 -6
  196. package/Utils/SecurityEvent/SecurityEventNormalizer.js +17 -11
  197. package/Utils/SecurityEvent/SecurityEventSearch.js +8 -1
  198. package/Utils/SecurityEvent/Sigma/SigmaRuleSetParser.js +4 -5
  199. package/Utils/SecurityEvent/ThreatIntel/StixPatternParser.js +7 -3
  200. package/Utils/SecurityEvent/UdmNormalizer.js +10 -6
  201. package/Utils/Telemetry/SavedViewDefault.js +4 -3
  202. package/Utils/Telemetry/SavedViewScope.d.mts +33 -0
  203. package/Utils/Telemetry/SavedViewScope.d.ts +33 -0
  204. package/Utils/Telemetry/SavedViewScope.js +105 -0
  205. package/Utils/Telemetry/SavedViewScope.mjs +7 -0
  206. package/package.json +1 -11
  207. package/UI/Utils/TranslateTemplate.d.mts +0 -8
  208. package/UI/Utils/TranslateTemplate.d.ts +0 -8
@@ -216,6 +216,16 @@ var Permission;
216
216
  Permission["DeleteSecurityCasePriority"] = "DeleteSecurityCasePriority";
217
217
  Permission["EditSecurityCasePriority"] = "EditSecurityCasePriority";
218
218
  Permission["ReadSecurityCasePriority"] = "ReadSecurityCasePriority";
219
+ // Security Case Note Templates (ready-made text for a case's notes)
220
+ Permission["CreateSecurityCaseNoteTemplate"] = "CreateSecurityCaseNoteTemplate";
221
+ Permission["DeleteSecurityCaseNoteTemplate"] = "DeleteSecurityCaseNoteTemplate";
222
+ Permission["EditSecurityCaseNoteTemplate"] = "EditSecurityCaseNoteTemplate";
223
+ Permission["ReadSecurityCaseNoteTemplate"] = "ReadSecurityCaseNoteTemplate";
224
+ // Security Case Custom Fields (fields a project adds to its cases)
225
+ Permission["CreateSecurityCaseCustomField"] = "CreateSecurityCaseCustomField";
226
+ Permission["DeleteSecurityCaseCustomField"] = "DeleteSecurityCaseCustomField";
227
+ Permission["EditSecurityCaseCustomField"] = "EditSecurityCaseCustomField";
228
+ Permission["ReadSecurityCaseCustomField"] = "ReadSecurityCaseCustomField";
219
229
  // Security Detections (the signals a case is made of)
220
230
  Permission["DeleteSecurityDetection"] = "DeleteSecurityDetection";
221
231
  Permission["ReadSecurityDetection"] = "ReadSecurityDetection";
@@ -2334,7 +2344,7 @@ class PermissionHelper {
2334
2344
  {
2335
2345
  permission: Permission.SecurityAdmin,
2336
2346
  title: "Security Admin",
2337
- description: "Full control over security operations: security events, cases with their detections, notes, tasks and evidence, response playbooks and their runs, Sigma detection rules, threat intelligence feeds and their indicators, and security event connections (Google SecOps, Microsoft Sentinel, CrowdStrike Falcon and other sources). Outside the Security roles, only Project Owner and Project Admin read security data.",
2347
+ description: "Full control over security operations: security events, cases with their detections, notes, tasks and evidence, the cases' custom fields and note templates, response playbooks and their runs, Sigma detection rules, threat intelligence feeds and their indicators, and security event connections (Google SecOps, Microsoft Sentinel, CrowdStrike Falcon and other sources). Outside the Security roles, only Project Owner and Project Admin read security data.",
2338
2348
  isAssignableToTenant: true,
2339
2349
  isAccessControlPermission: false,
2340
2350
  isRolePermission: true,
@@ -2343,7 +2353,7 @@ class PermissionHelper {
2343
2353
  {
2344
2354
  permission: Permission.SecurityMember,
2345
2355
  title: "Security Member",
2346
- description: "Reads security events and threat intelligence, sends security events, works security cases (opens, assigns, changes and closes them, writes their notes, works their tasks and adds evidence), runs playbooks and approves their steps, and creates, changes and deletes detection rules and threat intel feeds. Cannot configure playbooks or security event connections, or delete security data.",
2356
+ description: "Reads security events and threat intelligence, sends security events, works security cases (opens, assigns, changes and closes them, fills in their custom fields, writes their notes, works their tasks and adds evidence), runs playbooks and approves their steps, and creates, changes and deletes detection rules and threat intel feeds. Cannot configure playbooks, security event connections or the cases' settings, or delete security data.",
2347
2357
  isAssignableToTenant: true,
2348
2358
  isAccessControlPermission: false,
2349
2359
  isRolePermission: true,
@@ -2352,7 +2362,7 @@ class PermissionHelper {
2352
2362
  {
2353
2363
  permission: Permission.SecurityViewer,
2354
2364
  title: "Security Viewer",
2355
- description: "Read-only access to security events, cases with their detections, notes, tasks and evidence, playbooks and their runs, detection rules, threat intelligence feeds and indicators, and security event connections.",
2365
+ description: "Read-only access to security events, cases with their detections, notes, tasks and evidence, the cases' custom fields and note templates, playbooks and their runs, detection rules, threat intelligence feeds and indicators, and security event connections.",
2356
2366
  isAssignableToTenant: true,
2357
2367
  isAccessControlPermission: false,
2358
2368
  isRolePermission: true,
@@ -7441,6 +7451,80 @@ class PermissionHelper {
7441
7451
  isRolePermission: false,
7442
7452
  group: PermissionGroup.Security,
7443
7453
  },
7454
+ // Security Case Note Template Permissions
7455
+ {
7456
+ permission: Permission.CreateSecurityCaseNoteTemplate,
7457
+ title: "Create Security Case Note Template",
7458
+ description: "This permission can add Security Case Note Templates to this project.",
7459
+ isAssignableToTenant: true,
7460
+ isAccessControlPermission: false,
7461
+ isRolePermission: false,
7462
+ group: PermissionGroup.Security,
7463
+ },
7464
+ {
7465
+ permission: Permission.DeleteSecurityCaseNoteTemplate,
7466
+ title: "Delete Security Case Note Template",
7467
+ description: "This permission can delete Security Case Note Templates of this project.",
7468
+ isAssignableToTenant: true,
7469
+ isAccessControlPermission: false,
7470
+ isRolePermission: false,
7471
+ group: PermissionGroup.Security,
7472
+ },
7473
+ {
7474
+ permission: Permission.EditSecurityCaseNoteTemplate,
7475
+ title: "Edit Security Case Note Template",
7476
+ description: "This permission can edit Security Case Note Templates of this project.",
7477
+ isAssignableToTenant: true,
7478
+ isAccessControlPermission: false,
7479
+ isRolePermission: false,
7480
+ group: PermissionGroup.Security,
7481
+ },
7482
+ {
7483
+ permission: Permission.ReadSecurityCaseNoteTemplate,
7484
+ title: "Read Security Case Note Template",
7485
+ description: "This permission can read Security Case Note Templates of this project, and pick them when writing a case's note.",
7486
+ isAssignableToTenant: true,
7487
+ isAccessControlPermission: false,
7488
+ isRolePermission: false,
7489
+ group: PermissionGroup.Security,
7490
+ },
7491
+ // Security Case Custom Field Permissions
7492
+ {
7493
+ permission: Permission.CreateSecurityCaseCustomField,
7494
+ title: "Create Security Case Custom Field",
7495
+ description: "This permission can add Security Case Custom Fields to this project.",
7496
+ isAssignableToTenant: true,
7497
+ isAccessControlPermission: false,
7498
+ isRolePermission: false,
7499
+ group: PermissionGroup.Security,
7500
+ },
7501
+ {
7502
+ permission: Permission.DeleteSecurityCaseCustomField,
7503
+ title: "Delete Security Case Custom Field",
7504
+ description: "This permission can delete Security Case Custom Fields of this project.",
7505
+ isAssignableToTenant: true,
7506
+ isAccessControlPermission: false,
7507
+ isRolePermission: false,
7508
+ group: PermissionGroup.Security,
7509
+ },
7510
+ {
7511
+ permission: Permission.EditSecurityCaseCustomField,
7512
+ title: "Edit Security Case Custom Field",
7513
+ description: "This permission can edit Security Case Custom Fields of this project.",
7514
+ isAssignableToTenant: true,
7515
+ isAccessControlPermission: false,
7516
+ isRolePermission: false,
7517
+ group: PermissionGroup.Security,
7518
+ },
7519
+ {
7520
+ permission: Permission.ReadSecurityCaseCustomField,
7521
+ title: "Read Security Case Custom Field",
7522
+ description: "This permission can read Security Case Custom Fields of this project.",
7523
+ isAssignableToTenant: true,
7524
+ isAccessControlPermission: false,
7525
+ isRolePermission: false,
7526
+ group: PermissionGroup.Security,
7527
+ },
7444
7528
  // Security Detection Permissions
7445
7529
  {
7446
7530
  permission: Permission.DeleteSecurityDetection,
@@ -0,0 +1,3 @@
1
+ export declare const ON_CALL_PAGE_PUSH_CATEGORY: string;
2
+ export declare const PUSH_NOTIFICATION_CATEGORIES: ReadonlyArray<string>;
3
+ export declare function isPushNotificationCategory(value: unknown): value is string;
@@ -0,0 +1,3 @@
1
+ export declare const ON_CALL_PAGE_PUSH_CATEGORY: string;
2
+ export declare const PUSH_NOTIFICATION_CATEGORIES: ReadonlyArray<string>;
3
+ export declare function isPushNotificationCategory(value: unknown): value is string;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /*
3
+ * THE ACTIONS A PHONE DRAWS UNDER A PUSH.
4
+ *
5
+ * A push can name a category, and the OneUptime On-Call app (its first
6
+ * release after 1.6.0, and later) registers what each one carries: the
7
+ * buttons under the notification, on the lock screen and in the
8
+ * notification shade. Every
9
+ * push of an on-call page - an incident, an alert or an episode, a first
10
+ * page, a person's page or a page again (UserNotificationRuleService) -
11
+ * names ON_CALL_PAGE_PUSH_CATEGORY, whose actions are Acknowledge and
12
+ * Escalate. Either opens the app on the record, after the phone is
13
+ * unlocked, and the record's screen does what was asked, signed in as the
14
+ * person, as its own buttons would.
15
+ *
16
+ * An app older than the category does not know it, and shows the push with
17
+ * no buttons, as before; so does a push that names no category. The app
18
+ * keeps its own copy of the id (MobileApp/src/notifications/categories.ts,
19
+ * built without Common's code), held to this one by
20
+ * PushNotificationCategoryMobileParity.
21
+ *
22
+ * Expo carries the category to both platforms (`categoryId`); a browser's
23
+ * web push has no categories and never reads it.
24
+ */
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.PUSH_NOTIFICATION_CATEGORIES = exports.ON_CALL_PAGE_PUSH_CATEGORY = void 0;
27
+ exports.isPushNotificationCategory = isPushNotificationCategory;
28
+ exports.ON_CALL_PAGE_PUSH_CATEGORY = "ON_CALL_PAGE";
29
+ /*
30
+ * Every category a push may name. The push relay forwards only these: what
31
+ * it passes on goes to Expo under its deployment's access token.
32
+ */
33
+ exports.PUSH_NOTIFICATION_CATEGORIES = [
34
+ exports.ON_CALL_PAGE_PUSH_CATEGORY,
35
+ ];
36
+ function isPushNotificationCategory(value) {
37
+ return (typeof value === "string" && exports.PUSH_NOTIFICATION_CATEGORIES.includes(value));
38
+ }
@@ -0,0 +1,4 @@
1
+ import commonJsModule from "./PushNotificationCategory.js";
2
+ export const ON_CALL_PAGE_PUSH_CATEGORY = commonJsModule.ON_CALL_PAGE_PUSH_CATEGORY;
3
+ export const PUSH_NOTIFICATION_CATEGORIES = commonJsModule.PUSH_NOTIFICATION_CATEGORIES;
4
+ export const isPushNotificationCategory = commonJsModule.isPushNotificationCategory;
@@ -18,5 +18,6 @@ interface PushNotificationMessage {
18
18
  isCriticalAlert?: boolean;
19
19
  criticalAlertSound?: string | undefined;
20
20
  criticalAlertVolume?: number | undefined;
21
+ categoryId?: string | undefined;
21
22
  }
22
23
  export default PushNotificationMessage;
@@ -18,5 +18,6 @@ interface PushNotificationMessage {
18
18
  isCriticalAlert?: boolean;
19
19
  criticalAlertSound?: string | undefined;
20
20
  criticalAlertVolume?: number | undefined;
21
+ categoryId?: string | undefined;
21
22
  }
22
23
  export default PushNotificationMessage;
@@ -0,0 +1,22 @@
1
+ import Version from "../Version.mjs";
2
+ export declare const GLOBAL_RUNNER_CODE_FIXES_SINCE_VERSION: string;
3
+ export declare const RUNNER_CODE_FIXES_SETTING_NAME: string;
4
+ export declare const RUNNER_CODE_FIXES_OFF_SETTING: string;
5
+ export interface RunnerCodeFixFacts {
6
+ isGlobalRunner?: boolean | null | undefined;
7
+ takesCodeFixes?: boolean | null | undefined;
8
+ agentVersion?: Version | string | null | undefined;
9
+ lastAlive?: Date | string | null | undefined;
10
+ }
11
+ export declare enum RunnerCodeFixRefusal {
12
+ TurnedOffOnHost = "turned-off-on-host",
13
+ OlderRelease = "older-release"
14
+ }
15
+ export declare function getRunnerCodeFixRefusal(runner: RunnerCodeFixFacts): RunnerCodeFixRefusal | null;
16
+ export declare function doesRunnerTakeCodeFixes(runner: RunnerCodeFixFacts): boolean;
17
+ export declare enum GlobalRunnerCodeFixAvailability {
18
+ Online = "online",
19
+ OnlineButNoneTakesCodeFixes = "online-but-none-takes-code-fixes",
20
+ Offline = "offline"
21
+ }
22
+ export declare function getGlobalRunnerCodeFixAvailability(onlineGlobalRunners: ReadonlyArray<RunnerCodeFixFacts>): GlobalRunnerCodeFixAvailability;
@@ -0,0 +1,22 @@
1
+ import Version from "../Version";
2
+ export declare const GLOBAL_RUNNER_CODE_FIXES_SINCE_VERSION: string;
3
+ export declare const RUNNER_CODE_FIXES_SETTING_NAME: string;
4
+ export declare const RUNNER_CODE_FIXES_OFF_SETTING: string;
5
+ export interface RunnerCodeFixFacts {
6
+ isGlobalRunner?: boolean | null | undefined;
7
+ takesCodeFixes?: boolean | null | undefined;
8
+ agentVersion?: Version | string | null | undefined;
9
+ lastAlive?: Date | string | null | undefined;
10
+ }
11
+ export declare enum RunnerCodeFixRefusal {
12
+ TurnedOffOnHost = "turned-off-on-host",
13
+ OlderRelease = "older-release"
14
+ }
15
+ export declare function getRunnerCodeFixRefusal(runner: RunnerCodeFixFacts): RunnerCodeFixRefusal | null;
16
+ export declare function doesRunnerTakeCodeFixes(runner: RunnerCodeFixFacts): boolean;
17
+ export declare enum GlobalRunnerCodeFixAvailability {
18
+ Online = "online",
19
+ OnlineButNoneTakesCodeFixes = "online-but-none-takes-code-fixes",
20
+ Offline = "offline"
21
+ }
22
+ export declare function getGlobalRunnerCodeFixAvailability(onlineGlobalRunners: ReadonlyArray<RunnerCodeFixFacts>): GlobalRunnerCodeFixAvailability;
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.GlobalRunnerCodeFixAvailability = exports.RunnerCodeFixRefusal = exports.RUNNER_CODE_FIXES_OFF_SETTING = exports.RUNNER_CODE_FIXES_SETTING_NAME = exports.GLOBAL_RUNNER_CODE_FIXES_SINCE_VERSION = void 0;
7
+ exports.getRunnerCodeFixRefusal = getRunnerCodeFixRefusal;
8
+ exports.doesRunnerTakeCodeFixes = doesRunnerTakeCodeFixes;
9
+ exports.getGlobalRunnerCodeFixAvailability = getGlobalRunnerCodeFixAvailability;
10
+ const VersionUtil_1 = __importDefault(require("../../Utils/VersionUtil"));
11
+ /*
12
+ * WHETHER A RUNNER TAKES ONEUPTIME AI'S CODE FIXES.
13
+ *
14
+ * The server grants a Runner the code-fix capability on every heartbeat - a
15
+ * global Runner always, a project's Runner while a code repository works on
16
+ * it (packages/App RunnerIngress) - but a Runner can refuse it on its own
17
+ * side, and the server used to count it as there to take the work all the
18
+ * same, so a repository on it looked ready while its fixes sat queued:
19
+ *
20
+ * - its host turned code fixes off: ONEUPTIME_RUNNER_ENABLE_CODE_FIXES=false,
21
+ * a local switch that can only narrow what the server grants. (The
22
+ * in-cluster Runner the Kubernetes agent chart installed never runs the
23
+ * code-fix loop either.)
24
+ * - it is a global Runner of a release from before global Runners took code
25
+ * fixes (GLOBAL_RUNNER_CODE_FIXES_SINCE_VERSION), which turns them off
26
+ * itself.
27
+ *
28
+ * So a Runner says on every heartbeat whether it takes them (its
29
+ * `takesCodeFixes`, stored as Runner.takesCodeFixes), and this is how
30
+ * OneUptime reads that - the server when it says whether anything online can
31
+ * take a repository's work (CodeRepositoryRunnerChoice: Code's gate, the
32
+ * exception page's checklist, the queue sweeper), and the dashboard when it
33
+ * draws a repository's Runner:
34
+ *
35
+ * - a Runner that said: what it said;
36
+ * - one that said nothing, a release from before the report:
37
+ * - a project's Runner takes them, as every release did while a
38
+ * repository worked on it (its host's switch is the one thing it
39
+ * cannot say);
40
+ * - a global Runner goes by the release it reported: from
41
+ * GLOBAL_RUNNER_CODE_FIXES_SINCE_VERSION it takes them (again, unless
42
+ * its host turned them off, which it cannot say), and an older one
43
+ * never does;
44
+ * - a Runner that never heartbeated is not known to refuse them. It is
45
+ * not online either way, and its first heartbeat says. Its row holds
46
+ * the 1.0.0 every new Runner row is stamped with, not a release.
47
+ *
48
+ * Pure, so the server and the dashboard answer the same way.
49
+ */
50
+ /*
51
+ * The first release in which a global Runner takes code fixes (#5302): an
52
+ * older global Runner turns them off itself, whatever the server grants.
53
+ */
54
+ exports.GLOBAL_RUNNER_CODE_FIXES_SINCE_VERSION = "14.0.94";
55
+ /*
56
+ * The setting on a Runner's host that turns AI code fixes off (packages/Runner
57
+ * Config reads ONEUPTIME_RUNNER_ENABLE_CODE_FIXES), as every page that says a
58
+ * Runner takes none names it - Code's notice, a repository's Runner, the
59
+ * Runner picker, a Runner's own page and the Admin Dashboard's Global
60
+ * Runners: put in each sentence as a value (its {{setting}}), so a
61
+ * translation never changes it and the page draws it as code.
62
+ */
63
+ exports.RUNNER_CODE_FIXES_SETTING_NAME = "ONEUPTIME_RUNNER_ENABLE_CODE_FIXES";
64
+ exports.RUNNER_CODE_FIXES_OFF_SETTING = `${exports.RUNNER_CODE_FIXES_SETTING_NAME}=false`;
65
+ // Why a Runner takes no code fixes.
66
+ var RunnerCodeFixRefusal;
67
+ (function (RunnerCodeFixRefusal) {
68
+ /*
69
+ * It said so: its host turned code fixes off
70
+ * (ONEUPTIME_RUNNER_ENABLE_CODE_FIXES=false).
71
+ */
72
+ RunnerCodeFixRefusal["TurnedOffOnHost"] = "turned-off-on-host";
73
+ /*
74
+ * A global Runner of a release from before global Runners took code fixes:
75
+ * updating it to the server's version makes it take them.
76
+ */
77
+ RunnerCodeFixRefusal["OlderRelease"] = "older-release";
78
+ })(RunnerCodeFixRefusal || (exports.RunnerCodeFixRefusal = RunnerCodeFixRefusal = {}));
79
+ /*
80
+ * Whether a release is at least another one. A release that cannot be read
81
+ * is not.
82
+ */
83
+ function isReleaseAtLeast(release, since) {
84
+ const comparison = VersionUtil_1.default.compare(release ? release.toString() : "", since);
85
+ return comparison !== null && comparison >= 0;
86
+ }
87
+ // Why the Runner takes no code fixes, or null when it takes them.
88
+ function getRunnerCodeFixRefusal(runner) {
89
+ if (runner.takesCodeFixes === true) {
90
+ return null;
91
+ }
92
+ if (runner.takesCodeFixes === false) {
93
+ return RunnerCodeFixRefusal.TurnedOffOnHost;
94
+ }
95
+ // It said nothing: a release from before the report.
96
+ if (runner.isGlobalRunner !== true || !runner.lastAlive) {
97
+ return null;
98
+ }
99
+ return isReleaseAtLeast(runner.agentVersion, exports.GLOBAL_RUNNER_CODE_FIXES_SINCE_VERSION)
100
+ ? null
101
+ : RunnerCodeFixRefusal.OlderRelease;
102
+ }
103
+ function doesRunnerTakeCodeFixes(runner) {
104
+ return getRunnerCodeFixRefusal(runner) === null;
105
+ }
106
+ /*
107
+ * Whether a global Runner is online to take a repository's AI work - what a
108
+ * repository on the Global Runner waits for.
109
+ */
110
+ var GlobalRunnerCodeFixAvailability;
111
+ (function (GlobalRunnerCodeFixAvailability) {
112
+ // A global Runner that takes AI code fixes is online.
113
+ GlobalRunnerCodeFixAvailability["Online"] = "online";
114
+ // Global Runners are online, and none of them takes AI code fixes.
115
+ GlobalRunnerCodeFixAvailability["OnlineButNoneTakesCodeFixes"] = "online-but-none-takes-code-fixes";
116
+ // No global Runner is online.
117
+ GlobalRunnerCodeFixAvailability["Offline"] = "offline";
118
+ })(GlobalRunnerCodeFixAvailability || (exports.GlobalRunnerCodeFixAvailability = GlobalRunnerCodeFixAvailability = {}));
119
+ // The answer, from the global Runners that are online now.
120
+ function getGlobalRunnerCodeFixAvailability(onlineGlobalRunners) {
121
+ if (onlineGlobalRunners.length === 0) {
122
+ return GlobalRunnerCodeFixAvailability.Offline;
123
+ }
124
+ return onlineGlobalRunners.some((runner) => {
125
+ return doesRunnerTakeCodeFixes(Object.assign(Object.assign({}, runner), { isGlobalRunner: true }));
126
+ })
127
+ ? GlobalRunnerCodeFixAvailability.Online
128
+ : GlobalRunnerCodeFixAvailability.OnlineButNoneTakesCodeFixes;
129
+ }
@@ -0,0 +1,9 @@
1
+ import commonJsModule from "./RunnerCodeFixes.js";
2
+ export const GLOBAL_RUNNER_CODE_FIXES_SINCE_VERSION = commonJsModule.GLOBAL_RUNNER_CODE_FIXES_SINCE_VERSION;
3
+ export const GlobalRunnerCodeFixAvailability = commonJsModule.GlobalRunnerCodeFixAvailability;
4
+ export const RUNNER_CODE_FIXES_OFF_SETTING = commonJsModule.RUNNER_CODE_FIXES_OFF_SETTING;
5
+ export const RUNNER_CODE_FIXES_SETTING_NAME = commonJsModule.RUNNER_CODE_FIXES_SETTING_NAME;
6
+ export const RunnerCodeFixRefusal = commonJsModule.RunnerCodeFixRefusal;
7
+ export const doesRunnerTakeCodeFixes = commonJsModule.doesRunnerTakeCodeFixes;
8
+ export const getGlobalRunnerCodeFixAvailability = commonJsModule.getGlobalRunnerCodeFixAvailability;
9
+ export const getRunnerCodeFixRefusal = commonJsModule.getRunnerCodeFixRefusal;
@@ -3,12 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SECURITY_CASE_NUMBER_PREFIX = void 0;
4
4
  exports.formatSecurityCaseNumber = formatSecurityCaseNumber;
5
5
  /*
6
- * Security cases are numbered per project, CASE-1, CASE-2, ..., the same in
7
- * every project: the number is what analysts say out loud and paste into
8
- * tickets, and one fixed form keeps a case recognisable wherever it is
9
- * pasted.
6
+ * The prefix security cases are numbered with until a project chooses its
7
+ * own (Security Events > Settings > Numbering): CASE-1, CASE-2, ... per
8
+ * project. Every project starts with it - the Project column's default
9
+ * (securityCaseNumberPrefix), projects from before the column included - so
10
+ * a case keeps the number analysts say out loud and paste into tickets
11
+ * until someone decides otherwise. A case keeps the number it was given,
12
+ * with its prefix, whatever the prefix becomes later.
10
13
  */
11
14
  exports.SECURITY_CASE_NUMBER_PREFIX = "CASE-";
15
+ // A case number with the default prefix: "CASE-42".
12
16
  function formatSecurityCaseNumber(caseNumber) {
13
17
  return `${exports.SECURITY_CASE_NUMBER_PREFIX}${caseNumber}`;
14
18
  }
@@ -16,6 +16,8 @@ export declare const MITRE_TACTIC_SHORT_NAMES: Readonly<Record<string, string>>;
16
16
  export declare const MITRE_REVOKED_TECHNIQUES: Readonly<Record<string, string>>;
17
17
  export declare function getMitreTactic(id: string): MitreTactic | undefined;
18
18
  export declare function resolveMitreTacticId(value: string): string | undefined;
19
+ export declare function getMitreTacticNameKey(name: string): string;
20
+ export declare function findMitreTacticIdByName(name: string): string | undefined;
19
21
  export declare function resolveMitreTechniqueId(value: string): string | undefined;
20
22
  export declare function getMitreTechnique(id: string): MitreTechnique | undefined;
21
23
  export declare function describeMitreId(id: string): string;
@@ -16,6 +16,8 @@ export declare const MITRE_TACTIC_SHORT_NAMES: Readonly<Record<string, string>>;
16
16
  export declare const MITRE_REVOKED_TECHNIQUES: Readonly<Record<string, string>>;
17
17
  export declare function getMitreTactic(id: string): MitreTactic | undefined;
18
18
  export declare function resolveMitreTacticId(value: string): string | undefined;
19
+ export declare function getMitreTacticNameKey(name: string): string;
20
+ export declare function findMitreTacticIdByName(name: string): string | undefined;
19
21
  export declare function resolveMitreTechniqueId(value: string): string | undefined;
20
22
  export declare function getMitreTechnique(id: string): MitreTechnique | undefined;
21
23
  export declare function describeMitreId(id: string): string;
@@ -16,6 +16,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.MITRE_REVOKED_TECHNIQUES = exports.MITRE_TACTIC_SHORT_NAMES = exports.MITRE_TECHNIQUES = exports.MITRE_TACTIC_TECHNIQUES = exports.MITRE_TACTICS = exports.MITRE_ATTACK_VERSION = void 0;
17
17
  exports.getMitreTactic = getMitreTactic;
18
18
  exports.resolveMitreTacticId = resolveMitreTacticId;
19
+ exports.getMitreTacticNameKey = getMitreTacticNameKey;
20
+ exports.findMitreTacticIdByName = findMitreTacticIdByName;
19
21
  exports.resolveMitreTechniqueId = resolveMitreTechniqueId;
20
22
  exports.getMitreTechnique = getMitreTechnique;
21
23
  exports.describeMitreId = describeMitreId;
@@ -489,6 +491,30 @@ function resolveMitreTacticId(value) {
489
491
  const key = trimmed.toLowerCase().replace(/[\s-]+/g, "_");
490
492
  return ownValue(exports.MITRE_TACTIC_SHORT_NAMES, key);
491
493
  }
494
+ /*
495
+ * A tactic as a source names it in words, read by its letters alone in any
496
+ * case: "Initial Access" (Security Hub's TTPs, Splunk's annotations),
497
+ * "InitialAccess" (Sentinel's tactics, Defender XDR's categories),
498
+ * "initial_access", "INITIAL-ACCESS". The connectors that carry a tactic
499
+ * as prose read it here, so they agree with each other and with the
500
+ * matrix - Stealth and Defense Impairment included, and Defense Evasion,
501
+ * the name rules and sources wrote before v19, as TA0005.
502
+ *
503
+ * A Map, never a plain object: a source naming its tactic "constructor"
504
+ * names no tactic (Utils/LookupTable).
505
+ */
506
+ const TACTIC_IDS_BY_LETTERS = new Map(Object.entries(exports.MITRE_TACTIC_SHORT_NAMES).map(([shortName, id]) => {
507
+ return [shortName.split("_").join(""), id];
508
+ }));
509
+ const NOT_A_LETTER_REGEX = /[^A-Za-z]/g;
510
+ // The letters a tactic's name is read by: "Command and Control" -> "commandandcontrol".
511
+ function getMitreTacticNameKey(name) {
512
+ return (name || "").replace(NOT_A_LETTER_REGEX, "").toLowerCase();
513
+ }
514
+ // The tactic id a source's tactic name stands for, or undefined for any other words.
515
+ function findMitreTacticIdByName(name) {
516
+ return TACTIC_IDS_BY_LETTERS.get(getMitreTacticNameKey(name));
517
+ }
492
518
  /*
493
519
  * The parent technique a technique or sub-technique id counts toward in the
494
520
  * current matrix: `T1110.003` -> `T1110`, a revoked id -> its replacement.
@@ -6,7 +6,9 @@ export const MITRE_TACTIC_SHORT_NAMES = commonJsModule.MITRE_TACTIC_SHORT_NAMES;
6
6
  export const MITRE_TACTIC_TECHNIQUES = commonJsModule.MITRE_TACTIC_TECHNIQUES;
7
7
  export const MITRE_TECHNIQUES = commonJsModule.MITRE_TECHNIQUES;
8
8
  export const describeMitreId = commonJsModule.describeMitreId;
9
+ export const findMitreTacticIdByName = commonJsModule.findMitreTacticIdByName;
9
10
  export const getMitreTactic = commonJsModule.getMitreTactic;
11
+ export const getMitreTacticNameKey = commonJsModule.getMitreTacticNameKey;
10
12
  export const getMitreTechnique = commonJsModule.getMitreTechnique;
11
13
  export const resolveMitreTacticId = commonJsModule.resolveMitreTacticId;
12
14
  export const resolveMitreTechniqueId = commonJsModule.resolveMitreTechniqueId;
@@ -1,8 +1,12 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.OCSF_SEVERITY_ALIASES = exports.OcsfSeverityId = void 0;
4
7
  exports.ocsfSeverityFromId = ocsfSeverityFromId;
5
8
  exports.normalizeOcsfSeverity = normalizeOcsfSeverity;
9
+ const LookupTable_1 = __importDefault(require("../../Utils/LookupTable"));
6
10
  /*
7
11
  * OCSF (Open Cybersecurity Schema Framework) severity levels.
8
12
  *
@@ -73,6 +77,11 @@ exports.OCSF_SEVERITY_ALIASES = {
73
77
  FATAL: OcsfSeverity.Fatal,
74
78
  EMERGENCY: OcsfSeverity.Fatal,
75
79
  };
80
+ /*
81
+ * The aliases above, read by a source's severity text: a Map answers only
82
+ * for them, never for what every object inherits (Utils/LookupTable).
83
+ */
84
+ const SEVERITY_BY_ALIAS = (0, LookupTable_1.default)(exports.OCSF_SEVERITY_ALIASES);
76
85
  /*
77
86
  * Loose severity text -> OCSF severity. Accepts the dialects we ingest:
78
87
  * UDM security_result severities (EMERGENCY/ALERT/CRITICAL/ERROR/HIGH/...),
@@ -85,6 +94,6 @@ function normalizeOcsfSeverity(text) {
85
94
  if (!normalized) {
86
95
  return null;
87
96
  }
88
- return exports.OCSF_SEVERITY_ALIASES[normalized] || null;
97
+ return SEVERITY_BY_ALIAS.get(normalized) || null;
89
98
  }
90
99
  exports.default = OcsfSeverity;
@@ -20,6 +20,7 @@ const Search_1 = __importDefault(require("../BaseDatabase/Search"));
20
20
  const StartsWith_1 = __importDefault(require("../BaseDatabase/StartsWith"));
21
21
  const Wildcard_1 = __importDefault(require("../BaseDatabase/Wildcard"));
22
22
  const WildcardPattern_1 = require("../BaseDatabase/WildcardPattern");
23
+ const LookupTable_1 = require("../../Utils/LookupTable");
23
24
  /*
24
25
  * The OneUptime telemetry search language — one grammar for logs, traces,
25
26
  * metrics, exceptions and every other signal with an attributes map.
@@ -394,6 +395,18 @@ const parseSearchValue = (rawValue, negated) => {
394
395
  return build(SearchValueOperator.Equals, (0, WildcardPattern_1.unescapeWildcards)(unquoted));
395
396
  };
396
397
  exports.parseSearchValue = parseSearchValue;
398
+ /*
399
+ * The column a typed field name is an alias of, looked up lowercased among
400
+ * the aliases' own names only. Every object inherits "constructor",
401
+ * "toString" and "__proto__", so `constructor:x` read the plain table as
402
+ * Object's constructor and handed a function on as the token's key - which
403
+ * broke every search surface that read the key as text. It is a field of
404
+ * that name now, as any other unknown one is.
405
+ */
406
+ function getFieldAlias(aliases, rawKey) {
407
+ const alias = (0, LookupTable_1.readOwnValue)(aliases, rawKey.toLowerCase());
408
+ return typeof alias === "string" ? alias : undefined;
409
+ }
397
410
  /**
398
411
  * Parse a whole search string into tokens.
399
412
  *
@@ -403,7 +416,6 @@ exports.parseSearchValue = parseSearchValue;
403
416
  * in any log line.
404
417
  */
405
418
  const parseSearchQuery = (raw, options) => {
406
- var _a;
407
419
  const trimmed = raw.trim();
408
420
  if (trimmed.length === 0) {
409
421
  return [];
@@ -482,7 +494,7 @@ const parseSearchQuery = (raw, options) => {
482
494
  flushFreeText();
483
495
  const key = isAttribute
484
496
  ? rawKey
485
- : ((_a = options === null || options === void 0 ? void 0 : options.fieldAliases) === null || _a === void 0 ? void 0 : _a[rawKey.toLowerCase()]) || rawKey;
497
+ : getFieldAlias(options === null || options === void 0 ? void 0 : options.fieldAliases, rawKey) || rawKey;
486
498
  tokens.push({
487
499
  type: isAttribute ? SearchTokenType.Attribute : SearchTokenType.Field,
488
500
  key,
@@ -94,6 +94,11 @@ export interface WorkspaceDropdownBlock extends WorkspaceMessageBlock {
94
94
  optional?: boolean | undefined;
95
95
  optionGroups?: Array<WorkspaceDropdownOptionGroup> | undefined;
96
96
  initialValues?: Array<string> | undefined;
97
+ optionsLoad?: WorkspaceDropdownOptionsLoad | undefined;
98
+ }
99
+ export interface WorkspaceDropdownOptionsLoad {
100
+ minQueryLength: number;
101
+ maxSelectedItems?: number | undefined;
97
102
  }
98
103
  export interface WorkspaceDropdownOptionGroup {
99
104
  label: string;
@@ -118,6 +123,8 @@ export interface WorkspacePayloadMenu {
118
123
  placeholder: string;
119
124
  options: Array<WorkspacePayloadMenuOption>;
120
125
  blockId?: string | undefined;
126
+ submitTitle?: string | undefined;
127
+ requiredMessage?: string | undefined;
121
128
  }
122
129
  export interface WorkspacePayloadMenuOption {
123
130
  label: string;
@@ -94,6 +94,11 @@ export interface WorkspaceDropdownBlock extends WorkspaceMessageBlock {
94
94
  optional?: boolean | undefined;
95
95
  optionGroups?: Array<WorkspaceDropdownOptionGroup> | undefined;
96
96
  initialValues?: Array<string> | undefined;
97
+ optionsLoad?: WorkspaceDropdownOptionsLoad | undefined;
98
+ }
99
+ export interface WorkspaceDropdownOptionsLoad {
100
+ minQueryLength: number;
101
+ maxSelectedItems?: number | undefined;
97
102
  }
98
103
  export interface WorkspaceDropdownOptionGroup {
99
104
  label: string;
@@ -118,6 +123,8 @@ export interface WorkspacePayloadMenu {
118
123
  placeholder: string;
119
124
  options: Array<WorkspacePayloadMenuOption>;
120
125
  blockId?: string | undefined;
126
+ submitTitle?: string | undefined;
127
+ requiredMessage?: string | undefined;
121
128
  }
122
129
  export interface WorkspacePayloadMenuOption {
123
130
  label: string;
@@ -0,0 +1,3 @@
1
+ import { Translator } from "../Types/Translator.mjs";
2
+ export declare const MAX_YEARLY_DATES_IN_WORDS: number;
3
+ export declare const describeCronSchedule: (expression: string, translator?: Translator | undefined) => string | null;
@@ -0,0 +1,3 @@
1
+ import { Translator } from "../Types/Translator";
2
+ export declare const MAX_YEARLY_DATES_IN_WORDS: number;
3
+ export declare const describeCronSchedule: (expression: string, translator?: Translator | undefined) => string | null;