@oneuptime/common 14.0.94 → 14.0.96

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 (289) hide show
  1. package/Models/AnalyticsModels/ExceptionInstance.d.mts +2 -0
  2. package/Models/AnalyticsModels/ExceptionInstance.d.ts +2 -0
  3. package/Models/AnalyticsModels/ExceptionInstance.js +7 -0
  4. package/Models/AnalyticsModels/Log.d.mts +2 -0
  5. package/Models/AnalyticsModels/Log.d.ts +2 -0
  6. package/Models/AnalyticsModels/Log.js +7 -0
  7. package/Models/AnalyticsModels/SecurityEvent.d.mts +8 -0
  8. package/Models/AnalyticsModels/SecurityEvent.d.ts +8 -0
  9. package/Models/AnalyticsModels/SecurityEvent.js +55 -0
  10. package/Models/AnalyticsModels/Span.d.mts +4 -0
  11. package/Models/AnalyticsModels/Span.d.ts +4 -0
  12. package/Models/AnalyticsModels/Span.js +63 -0
  13. package/Models/DatabaseModels/CustomNotificationChannel.d.mts +16 -0
  14. package/Models/DatabaseModels/CustomNotificationChannel.d.ts +16 -0
  15. package/Models/DatabaseModels/CustomNotificationChannel.js +337 -0
  16. package/Models/DatabaseModels/CustomNotificationChannel.mjs +2 -0
  17. package/Models/DatabaseModels/DashboardPlaylist.d.mts +16 -0
  18. package/Models/DatabaseModels/DashboardPlaylist.d.ts +16 -0
  19. package/Models/DatabaseModels/DashboardPlaylist.js +314 -0
  20. package/Models/DatabaseModels/DashboardPlaylist.mjs +2 -0
  21. package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js +14 -37
  22. package/Models/DatabaseModels/DatabaseBaseModel/OnCallRuleBaseModel.d.mts +1 -0
  23. package/Models/DatabaseModels/DatabaseBaseModel/OnCallRuleBaseModel.d.ts +1 -0
  24. package/Models/DatabaseModels/DatabaseBaseModel/OnCallRuleBaseModel.js +27 -3
  25. package/Models/DatabaseModels/DetectionRuleException.d.mts +25 -0
  26. package/Models/DatabaseModels/DetectionRuleException.d.ts +25 -0
  27. package/Models/DatabaseModels/DetectionRuleException.js +412 -0
  28. package/Models/DatabaseModels/DetectionRuleException.mjs +2 -0
  29. package/Models/DatabaseModels/GlobalConfig.d.mts +5 -0
  30. package/Models/DatabaseModels/GlobalConfig.d.ts +5 -0
  31. package/Models/DatabaseModels/GlobalConfig.js +107 -0
  32. package/Models/DatabaseModels/Index.js +8 -0
  33. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.mts +2 -0
  34. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.ts +2 -0
  35. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +40 -0
  36. package/Models/DatabaseModels/SecurityTelemetrySource.d.mts +21 -0
  37. package/Models/DatabaseModels/SecurityTelemetrySource.d.ts +21 -0
  38. package/Models/DatabaseModels/SecurityTelemetrySource.js +357 -0
  39. package/Models/DatabaseModels/SecurityTelemetrySource.mjs +2 -0
  40. package/Models/DatabaseModels/TeamComplianceSetting.js +2 -2
  41. package/Models/DatabaseModels/TeamPermission.js +5 -7
  42. package/Models/DatabaseModels/UserNotificationRule.d.mts +3 -0
  43. package/Models/DatabaseModels/UserNotificationRule.d.ts +3 -0
  44. package/Models/DatabaseModels/UserNotificationRule.js +67 -0
  45. package/Models/DatabaseModels/UserNotificationSetting.d.mts +1 -0
  46. package/Models/DatabaseModels/UserNotificationSetting.d.ts +1 -0
  47. package/Models/DatabaseModels/UserNotificationSetting.js +26 -0
  48. package/Models/DatabaseModels/UserOnCallLogTimeline.d.mts +3 -0
  49. package/Models/DatabaseModels/UserOnCallLogTimeline.d.ts +3 -0
  50. package/Models/DatabaseModels/UserOnCallLogTimeline.js +53 -0
  51. package/Types/AI/AIChatPermissionMode.js +11 -5
  52. package/Types/AI/ResourceCardFacts.d.mts +11 -0
  53. package/Types/AI/ResourceCardFacts.d.ts +11 -0
  54. package/Types/AI/ResourceCardFacts.js +80 -0
  55. package/Types/AI/ResourceCardFacts.mjs +4 -0
  56. package/Types/AnalyticsDatabase/TableColumn.d.mts +4 -0
  57. package/Types/AnalyticsDatabase/TableColumn.d.ts +4 -0
  58. package/Types/AnalyticsDatabase/TableColumn.js +7 -0
  59. package/Types/AuditLog/Export/AuditLogExportDestinationCatalog.d.mts +2 -0
  60. package/Types/AuditLog/Export/AuditLogExportDestinationCatalog.d.ts +2 -0
  61. package/Types/AuditLog/Export/AuditLogExportDestinationCatalog.js +4 -0
  62. package/Types/Backup/BackupDestinationCatalog.d.mts +2 -0
  63. package/Types/Backup/BackupDestinationCatalog.d.ts +2 -0
  64. package/Types/Backup/BackupDestinationCatalog.js +8 -0
  65. package/Types/CallAndSMS/CallAndSmsGatewayPayload.d.mts +25 -0
  66. package/Types/CallAndSMS/CallAndSmsGatewayPayload.d.ts +25 -0
  67. package/Types/CallAndSMS/CallAndSmsGatewayPayload.js +86 -0
  68. package/Types/CallAndSMS/CallAndSmsGatewayPayload.mjs +6 -0
  69. package/Types/CallAndSMS/CallAndSmsProvider.d.mts +23 -0
  70. package/Types/CallAndSMS/CallAndSmsProvider.d.ts +23 -0
  71. package/Types/CallAndSMS/CallAndSmsProvider.js +107 -0
  72. package/Types/CallAndSMS/CallAndSmsProvider.mjs +7 -0
  73. package/Types/CloudConnection/CloudConnectionCatalog.d.mts +2 -0
  74. package/Types/CloudConnection/CloudConnectionCatalog.d.ts +2 -0
  75. package/Types/CloudConnection/CloudConnectionCatalog.js +4 -0
  76. package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.d.mts +95 -0
  77. package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.d.ts +95 -0
  78. package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.js +236 -0
  79. package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.mjs +16 -0
  80. package/Types/Dashboard/DashboardPlaylist.d.mts +21 -0
  81. package/Types/Dashboard/DashboardPlaylist.d.ts +21 -0
  82. package/Types/Dashboard/DashboardPlaylist.js +197 -0
  83. package/Types/Dashboard/DashboardPlaylist.mjs +19 -0
  84. package/Types/Database/TableColumn.d.mts +8 -0
  85. package/Types/Database/TableColumn.d.ts +8 -0
  86. package/Types/Database/TableColumn.js +69 -23
  87. package/Types/Database/TableColumn.mjs +1 -0
  88. package/Types/HeldPermissions.d.mts +2 -0
  89. package/Types/HeldPermissions.d.ts +2 -0
  90. package/Types/HeldPermissions.js +32 -8
  91. package/Types/Icon/IconProp.d.mts +3 -0
  92. package/Types/Icon/IconProp.d.ts +3 -0
  93. package/Types/Icon/IconProp.js +4 -0
  94. package/Types/JSONFunctions.js +16 -1
  95. package/Types/LlmObservability/LlmConnectionCatalog.d.mts +2 -0
  96. package/Types/LlmObservability/LlmConnectionCatalog.d.ts +2 -0
  97. package/Types/LlmObservability/LlmConnectionCatalog.js +8 -0
  98. package/Types/Monitor/MonitorType.js +5 -4
  99. package/Types/Monitor/TelemetryAlertRule.d.mts +111 -0
  100. package/Types/Monitor/TelemetryAlertRule.d.ts +111 -0
  101. package/Types/Monitor/TelemetryAlertRule.js +886 -0
  102. package/Types/Monitor/TelemetryAlertRule.mjs +5 -0
  103. package/Types/Monitor/TelemetryRulePreview.d.mts +57 -0
  104. package/Types/Monitor/TelemetryRulePreview.d.ts +57 -0
  105. package/Types/Monitor/TelemetryRulePreview.js +190 -0
  106. package/Types/Monitor/TelemetryRulePreview.mjs +6 -0
  107. package/Types/OnCallDutyPolicy/EveryNewEventRules.d.mts +23 -0
  108. package/Types/OnCallDutyPolicy/EveryNewEventRules.d.ts +23 -0
  109. package/Types/OnCallDutyPolicy/EveryNewEventRules.js +105 -0
  110. package/Types/OnCallDutyPolicy/EveryNewEventRules.mjs +9 -0
  111. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.d.mts +3 -0
  112. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.d.ts +3 -0
  113. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.js +23 -8
  114. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.mjs +2 -0
  115. package/Types/OnCallDutyPolicy/OnCallPolicyAiHold.d.mts +47 -0
  116. package/Types/OnCallDutyPolicy/OnCallPolicyAiHold.d.ts +47 -0
  117. package/Types/OnCallDutyPolicy/OnCallPolicyAiHold.js +122 -0
  118. package/Types/OnCallDutyPolicy/OnCallPolicyAiHold.mjs +12 -0
  119. package/Types/OnCallDutyPolicy/OnCallRuleWhenToPage.d.mts +2 -1
  120. package/Types/OnCallDutyPolicy/OnCallRuleWhenToPage.d.ts +2 -1
  121. package/Types/OnCallDutyPolicy/OnCallRuleWhenToPage.js +10 -1
  122. package/Types/Permission.d.mts +10 -0
  123. package/Types/Permission.d.ts +10 -0
  124. package/Types/Permission.js +83 -19
  125. package/Types/ProviderLogo/ProviderLogo.d.mts +87 -0
  126. package/Types/ProviderLogo/ProviderLogo.d.ts +87 -0
  127. package/Types/ProviderLogo/ProviderLogo.js +215 -0
  128. package/Types/ProviderLogo/ProviderLogo.mjs +6 -0
  129. package/Types/PushNotification/PushNotificationsTurnedOff.d.mts +3 -0
  130. package/Types/PushNotification/PushNotificationsTurnedOff.d.ts +3 -0
  131. package/Types/PushNotification/PushNotificationsTurnedOff.js +32 -0
  132. package/Types/PushNotification/PushNotificationsTurnedOff.mjs +4 -0
  133. package/Types/RollingTime/RollingTimeUtil.js +20 -10
  134. package/Types/Runbook/RunbookTriggerType.d.mts +2 -1
  135. package/Types/Runbook/RunbookTriggerType.d.ts +2 -1
  136. package/Types/Runbook/RunbookTriggerType.js +5 -1
  137. package/Types/SecurityCase/SecurityCaseContext.d.mts +188 -0
  138. package/Types/SecurityCase/SecurityCaseContext.d.ts +188 -0
  139. package/Types/SecurityCase/SecurityCaseContext.js +165 -0
  140. package/Types/SecurityCase/SecurityCaseContext.mjs +30 -0
  141. package/Types/SecurityCase/SecurityEntityRisk.d.mts +11 -0
  142. package/Types/SecurityCase/SecurityEntityRisk.d.ts +11 -0
  143. package/Types/SecurityCase/SecurityEntityRisk.js +9 -1
  144. package/Types/SecurityCase/SecurityEntityRisk.mjs +1 -0
  145. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.d.mts +2 -0
  146. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.d.ts +2 -0
  147. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js +9 -0
  148. package/Types/SecurityEvent/Destinations/SecurityEventDestinationCatalog.d.mts +2 -0
  149. package/Types/SecurityEvent/Destinations/SecurityEventDestinationCatalog.d.ts +2 -0
  150. package/Types/SecurityEvent/Destinations/SecurityEventDestinationCatalog.js +5 -0
  151. package/Types/SecurityEvent/DetectionRetrohunt.d.mts +38 -0
  152. package/Types/SecurityEvent/DetectionRetrohunt.d.ts +38 -0
  153. package/Types/SecurityEvent/DetectionRetrohunt.js +147 -0
  154. package/Types/SecurityEvent/DetectionRetrohunt.mjs +10 -0
  155. package/Types/SecurityEvent/DetectionRuleDataKind.d.mts +5 -1
  156. package/Types/SecurityEvent/DetectionRuleDataKind.d.ts +5 -1
  157. package/Types/SecurityEvent/DetectionRuleDataKind.js +42 -0
  158. package/Types/SecurityEvent/DetectionRuleException.d.mts +65 -0
  159. package/Types/SecurityEvent/DetectionRuleException.d.ts +65 -0
  160. package/Types/SecurityEvent/DetectionRuleException.js +441 -0
  161. package/Types/SecurityEvent/DetectionRuleException.mjs +24 -0
  162. package/Types/SecurityEvent/DetectionRuleLibrary.js +330 -0
  163. package/Types/SecurityEvent/NormalizedSecurityEvent.d.mts +5 -0
  164. package/Types/SecurityEvent/NormalizedSecurityEvent.d.ts +5 -0
  165. package/Types/SecurityEvent/SecurityAttackCampaign.d.mts +31 -0
  166. package/Types/SecurityEvent/SecurityAttackCampaign.d.ts +31 -0
  167. package/Types/SecurityEvent/SecurityAttackCampaign.js +81 -0
  168. package/Types/SecurityEvent/SecurityAttackCampaign.mjs +8 -0
  169. package/Types/SecurityEvent/SecurityEventRequestOutcome.d.mts +28 -0
  170. package/Types/SecurityEvent/SecurityEventRequestOutcome.d.ts +28 -0
  171. package/Types/SecurityEvent/SecurityEventRequestOutcome.js +78 -0
  172. package/Types/SecurityEvent/SecurityEventRequestOutcome.mjs +6 -0
  173. package/Types/SecurityEvent/SecurityTelemetrySource.d.mts +39 -0
  174. package/Types/SecurityEvent/SecurityTelemetrySource.d.ts +39 -0
  175. package/Types/SecurityEvent/SecurityTelemetrySource.js +127 -0
  176. package/Types/SecurityEvent/SecurityTelemetrySource.mjs +12 -0
  177. package/Types/SecurityEvent/TurnOnRecommended.d.mts +2 -0
  178. package/Types/SecurityEvent/TurnOnRecommended.d.ts +2 -0
  179. package/Types/SecurityEvent/TurnOnRecommended.js +7 -0
  180. package/Types/SecurityPlaybook/SecurityPlaybookAction.d.mts +7 -1
  181. package/Types/SecurityPlaybook/SecurityPlaybookAction.d.ts +7 -1
  182. package/Types/SecurityPlaybook/SecurityPlaybookAction.js +46 -0
  183. package/Types/SecurityPlaybook/SecurityPlaybookAction.mjs +1 -0
  184. package/Types/SecurityPlaybook/SecurityPlaybookStep.d.mts +10 -0
  185. package/Types/SecurityPlaybook/SecurityPlaybookStep.d.ts +10 -0
  186. package/Types/SecurityPlaybook/SecurityPlaybookStep.js +37 -1
  187. package/Types/SecurityPlaybook/SecurityPlaybookStep.mjs +1 -0
  188. package/Types/SecurityPlaybook/SecurityPlaybookTemplates.js +17 -0
  189. package/Types/Team/ComplianceNotificationChannel.d.mts +2 -1
  190. package/Types/Team/ComplianceNotificationChannel.d.ts +2 -1
  191. package/Types/Team/ComplianceNotificationChannel.js +10 -1
  192. package/Types/Team/ComplianceRule.d.mts +8 -3
  193. package/Types/Team/ComplianceRule.d.ts +8 -3
  194. package/Types/Team/ComplianceRule.js +34 -22
  195. package/Types/Team/TeamComplianceStatus.d.mts +1 -0
  196. package/Types/Team/TeamComplianceStatus.d.ts +1 -0
  197. package/Types/Telemetry/OpenTelemetryGuides.d.mts +52 -0
  198. package/Types/Telemetry/OpenTelemetryGuides.d.ts +52 -0
  199. package/Types/Telemetry/OpenTelemetryGuides.js +419 -0
  200. package/Types/Telemetry/OpenTelemetryGuides.mjs +17 -0
  201. package/Types/Telemetry/TelemetrySavedViewState.d.mts +1 -0
  202. package/Types/Telemetry/TelemetrySavedViewState.d.ts +1 -0
  203. package/Types/Telemetry/TraceHealth.d.mts +24 -0
  204. package/Types/Telemetry/TraceHealth.d.ts +24 -0
  205. package/Types/Telemetry/TraceHealth.js +97 -0
  206. package/Types/Telemetry/TraceHealth.mjs +4 -0
  207. package/Types/Telemetry/TraceSpanType.d.mts +90 -0
  208. package/Types/Telemetry/TraceSpanType.d.ts +90 -0
  209. package/Types/Telemetry/TraceSpanType.js +238 -0
  210. package/Types/Telemetry/TraceSpanType.mjs +19 -0
  211. package/Types/Theme/ThemePreference.d.mts +26 -0
  212. package/Types/Theme/ThemePreference.d.ts +26 -0
  213. package/Types/Theme/ThemePreference.js +104 -0
  214. package/Types/Theme/ThemePreference.mjs +12 -0
  215. package/Types/Workflow/Component.d.mts +3 -0
  216. package/Types/Workflow/Component.d.ts +3 -0
  217. package/Types/Workflow/Components/Discord.js +2 -0
  218. package/Types/Workflow/Components/Mattermost.js +2 -0
  219. package/Types/Workflow/Components/MicrosoftTeams.js +2 -0
  220. package/Types/Workflow/Components/Slack.js +2 -0
  221. package/Types/Workflow/Components/Telegram.js +2 -0
  222. package/Types/Workflow/Components.js +6 -0
  223. package/Types/Workflow/Templates.js +5 -3
  224. package/Utils/ColorContrast.d.mts +0 -3
  225. package/Utils/ColorContrast.d.ts +0 -3
  226. package/Utils/ColorContrast.js +3 -41
  227. package/Utils/ColorContrast.mjs +0 -2
  228. package/Utils/NameInitials.d.mts +5 -0
  229. package/Utils/NameInitials.d.ts +5 -0
  230. package/Utils/NameInitials.js +92 -0
  231. package/Utils/NameInitials.mjs +6 -0
  232. package/Utils/OldestKeyCursor.d.mts +7 -0
  233. package/Utils/OldestKeyCursor.d.ts +7 -0
  234. package/Utils/OldestKeyCursor.js +68 -0
  235. package/Utils/OldestKeyCursor.mjs +2 -0
  236. package/Utils/Schema/OpenApiMetadataRegistry.d.mts +4 -0
  237. package/Utils/Schema/OpenApiMetadataRegistry.d.ts +4 -0
  238. package/Utils/Schema/OpenApiMetadataRegistry.js +20 -0
  239. package/Utils/Schema/OpenApiMetadataRegistry.mjs +2 -0
  240. package/Utils/Schema/Zod.js +6 -0
  241. package/Utils/SecurityCase/SecurityCaseImpactFacts.d.mts +41 -0
  242. package/Utils/SecurityCase/SecurityCaseImpactFacts.d.ts +41 -0
  243. package/Utils/SecurityCase/SecurityCaseImpactFacts.js +215 -0
  244. package/Utils/SecurityCase/SecurityCaseImpactFacts.mjs +6 -0
  245. package/Utils/SecurityCase/SecurityCaseStoryItems.d.mts +46 -0
  246. package/Utils/SecurityCase/SecurityCaseStoryItems.d.ts +46 -0
  247. package/Utils/SecurityCase/SecurityCaseStoryItems.js +327 -0
  248. package/Utils/SecurityCase/SecurityCaseStoryItems.mjs +17 -0
  249. package/Utils/SecurityEvent/LogParsers/SecurityLogLine.d.mts +5 -0
  250. package/Utils/SecurityEvent/LogParsers/SecurityLogLine.d.ts +5 -0
  251. package/Utils/SecurityEvent/LogParsers/SecurityLogLine.js +22 -2
  252. package/Utils/SecurityEvent/LogParsers/SecurityLogLine.mjs +2 -0
  253. package/Utils/SecurityEvent/LogParsers/WebAttackLogParser.d.mts +20 -0
  254. package/Utils/SecurityEvent/LogParsers/WebAttackLogParser.d.ts +20 -0
  255. package/Utils/SecurityEvent/LogParsers/WebAttackLogParser.js +347 -31
  256. package/Utils/SecurityEvent/LogParsers/WebAttackLogParser.mjs +11 -0
  257. package/Utils/SecurityEvent/RequestFollowUp.d.mts +4 -0
  258. package/Utils/SecurityEvent/RequestFollowUp.d.ts +4 -0
  259. package/Utils/SecurityEvent/RequestFollowUp.js +127 -0
  260. package/Utils/SecurityEvent/RequestFollowUp.mjs +3 -0
  261. package/Utils/SecurityEvent/RequestOutcome.d.mts +80 -0
  262. package/Utils/SecurityEvent/RequestOutcome.d.ts +80 -0
  263. package/Utils/SecurityEvent/RequestOutcome.js +371 -0
  264. package/Utils/SecurityEvent/RequestOutcome.mjs +18 -0
  265. package/Utils/SecurityEvent/TelemetryScan/AuditLogSignals.d.mts +76 -0
  266. package/Utils/SecurityEvent/TelemetryScan/AuditLogSignals.d.ts +76 -0
  267. package/Utils/SecurityEvent/TelemetryScan/AuditLogSignals.js +348 -0
  268. package/Utils/SecurityEvent/TelemetryScan/AuditLogSignals.mjs +15 -0
  269. package/Utils/SecurityEvent/TelemetryScan/FlowSignals.d.mts +61 -0
  270. package/Utils/SecurityEvent/TelemetryScan/FlowSignals.d.ts +61 -0
  271. package/Utils/SecurityEvent/TelemetryScan/FlowSignals.js +260 -0
  272. package/Utils/SecurityEvent/TelemetryScan/FlowSignals.mjs +17 -0
  273. package/Utils/SecurityEvent/TelemetryScan/RumSignals.d.mts +30 -0
  274. package/Utils/SecurityEvent/TelemetryScan/RumSignals.d.ts +30 -0
  275. package/Utils/SecurityEvent/TelemetryScan/RumSignals.js +134 -0
  276. package/Utils/SecurityEvent/TelemetryScan/RumSignals.mjs +8 -0
  277. package/Utils/SecurityEvent/TelemetryScan/TelemetrySecurityEvent.d.mts +40 -0
  278. package/Utils/SecurityEvent/TelemetryScan/TelemetrySecurityEvent.d.ts +40 -0
  279. package/Utils/SecurityEvent/TelemetryScan/TelemetrySecurityEvent.js +190 -0
  280. package/Utils/SecurityEvent/TelemetryScan/TelemetrySecurityEvent.mjs +6 -0
  281. package/Utils/SecurityEvent/TelemetryScan/TraceSignals.d.mts +57 -0
  282. package/Utils/SecurityEvent/TelemetryScan/TraceSignals.d.ts +57 -0
  283. package/Utils/SecurityEvent/TelemetryScan/TraceSignals.js +491 -0
  284. package/Utils/SecurityEvent/TelemetryScan/TraceSignals.mjs +27 -0
  285. package/Utils/Telemetry/EntrySpan.d.mts +8 -0
  286. package/Utils/Telemetry/EntrySpan.d.ts +8 -0
  287. package/Utils/Telemetry/EntrySpan.js +53 -0
  288. package/Utils/Telemetry/EntrySpan.mjs +4 -0
  289. package/package.json +1 -1
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.MATTERMOST_INCOMING_WEBHOOK_URL_PATTERN = exports.MATTERMOST_WEBHOOK_ID_LENGTH = exports.MATTERMOST_MAX_NAME_LENGTH = exports.MATTERMOST_MAX_MESSAGE_LENGTH = void 0;
7
7
  const IconProp_1 = __importDefault(require("../../Icon/IconProp"));
8
+ const ProviderLogo_1 = __importDefault(require("../../ProviderLogo/ProviderLogo"));
8
9
  const ComponentID_1 = __importDefault(require("../ComponentID"));
9
10
  const Component_1 = require("./../Component");
10
11
  /*
@@ -44,6 +45,7 @@ const components = [
44
45
  id: ComponentID_1.default.MattermostSendMessageToChannel,
45
46
  title: "Send Message to Mattermost",
46
47
  category: "Mattermost",
48
+ logo: ProviderLogo_1.default.Mattermost,
47
49
  description: "Send message to Mattermost channel",
48
50
  iconProp: IconProp_1.default.SendMessage,
49
51
  componentType: Component_1.ComponentType.Component,
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const IconProp_1 = __importDefault(require("../../Icon/IconProp"));
7
+ const ProviderLogo_1 = __importDefault(require("../../ProviderLogo/ProviderLogo"));
7
8
  const ComponentID_1 = __importDefault(require("../ComponentID"));
8
9
  const Component_1 = require("./../Component");
9
10
  const components = [
@@ -11,6 +12,7 @@ const components = [
11
12
  id: ComponentID_1.default.MicrosoftTeamsSendMessageToChannel,
12
13
  title: "Send Message to Teams",
13
14
  category: "Microsoft Teams",
15
+ logo: ProviderLogo_1.default.MicrosoftTeams,
14
16
  description: "Send message to teams channel",
15
17
  iconProp: IconProp_1.default.SendMessage,
16
18
  componentType: Component_1.ComponentType.Component,
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const IconProp_1 = __importDefault(require("../../Icon/IconProp"));
7
+ const ProviderLogo_1 = __importDefault(require("../../ProviderLogo/ProviderLogo"));
7
8
  const ComponentID_1 = __importDefault(require("../ComponentID"));
8
9
  const Component_1 = require("./../Component");
9
10
  const components = [
@@ -11,6 +12,7 @@ const components = [
11
12
  id: ComponentID_1.default.SlackSendMessageToChannel,
12
13
  title: "Send Message to Slack",
13
14
  category: "Slack",
15
+ logo: ProviderLogo_1.default.Slack,
14
16
  description: "Send message to slack channel",
15
17
  iconProp: IconProp_1.default.SendMessage,
16
18
  componentType: Component_1.ComponentType.Component,
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const IconProp_1 = __importDefault(require("../../Icon/IconProp"));
7
+ const ProviderLogo_1 = __importDefault(require("../../ProviderLogo/ProviderLogo"));
7
8
  const ComponentID_1 = __importDefault(require("../ComponentID"));
8
9
  const Component_1 = require("./../Component");
9
10
  const components = [
@@ -11,6 +12,7 @@ const components = [
11
12
  id: ComponentID_1.default.TelegramSendMessageToChat,
12
13
  title: "Send Message to Telegram",
13
14
  category: "Telegram",
15
+ logo: ProviderLogo_1.default.Telegram,
14
16
  description: "Send message to Telegram chat",
15
17
  iconProp: IconProp_1.default.SendMessage,
16
18
  componentType: Component_1.ComponentType.Component,
@@ -38,6 +38,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.Categories = void 0;
40
40
  const IconProp_1 = __importDefault(require("../Icon/IconProp"));
41
+ const ProviderLogo_1 = __importDefault(require("../ProviderLogo/ProviderLogo"));
41
42
  const API_1 = __importDefault(require("./Components/API"));
42
43
  const AI_1 = __importDefault(require("./Components/AI"));
43
44
  const Condition_1 = __importDefault(require("./Components/Condition"));
@@ -114,21 +115,25 @@ exports.Categories = [
114
115
  name: "Slack",
115
116
  description: "Integrate OneUptime with your Slack team.",
116
117
  icon: IconProp_1.default.SendMessage,
118
+ logo: ProviderLogo_1.default.Slack,
117
119
  },
118
120
  {
119
121
  name: "Discord",
120
122
  description: "Integrate OneUptime with your Discord server.",
121
123
  icon: IconProp_1.default.SendMessage,
124
+ logo: ProviderLogo_1.default.Discord,
122
125
  },
123
126
  {
124
127
  name: "Microsoft Teams",
125
128
  description: "Integrate OneUptime with your Microsoft Teams.",
126
129
  icon: IconProp_1.default.SendMessage,
130
+ logo: ProviderLogo_1.default.MicrosoftTeams,
127
131
  },
128
132
  {
129
133
  name: "Telegram",
130
134
  description: "Integrate OneUptime with your Telegram chats and channels.",
131
135
  icon: IconProp_1.default.SendMessage,
136
+ logo: ProviderLogo_1.default.Telegram,
132
137
  },
133
138
  {
134
139
  name: "IRC",
@@ -139,6 +144,7 @@ exports.Categories = [
139
144
  name: "Mattermost",
140
145
  description: "Integrate OneUptime with your Mattermost channels.",
141
146
  icon: IconProp_1.default.SendMessage,
147
+ logo: ProviderLogo_1.default.Mattermost,
142
148
  },
143
149
  {
144
150
  name: "Conditions",
@@ -8618,7 +8618,8 @@ const TEMPLATE_DEFINITIONS = [
8618
8618
  description: "Posts a short incident summary to a Discord channel the moment the incident is declared.",
8619
8619
  teaches: "How a database trigger feeds a chat integration.",
8620
8620
  category: WorkflowTemplateCategory.Incidents,
8621
- icon: IconProp_1.default.Chat,
8621
+ // Discord's own mark, as its Slack and Microsoft Teams siblings carry theirs.
8622
+ icon: IconProp_1.default.Discord,
8622
8623
  workflowName: "Notify Discord on new incident",
8623
8624
  workflowDescription: "Posts to Discord whenever an incident is created in this project.",
8624
8625
  variables: [DISCORD_WEBHOOK_URL],
@@ -8734,7 +8735,7 @@ const TEMPLATE_DEFINITIONS = [
8734
8735
  description: "Posts a clear incident summary to a Mattermost channel the moment the incident is declared.",
8735
8736
  teaches: "How a database trigger feeds a chat on a server of your own, through its incoming webhook.",
8736
8737
  category: WorkflowTemplateCategory.Incidents,
8737
- icon: IconProp_1.default.Chat,
8738
+ icon: IconProp_1.default.Mattermost,
8738
8739
  workflowName: "Notify Mattermost on new incident",
8739
8740
  workflowDescription: "Posts to Mattermost whenever an incident is created in this project.",
8740
8741
  variables: [MATTERMOST_WEBHOOK_URL],
@@ -9429,7 +9430,8 @@ const TEMPLATE_DEFINITIONS = [
9429
9430
  description: "Posts the alert's title, severity and state to a Mattermost channel as soon as it is raised.",
9430
9431
  teaches: "How one secret setting, kept as a variable, serves the whole workflow.",
9431
9432
  category: WorkflowTemplateCategory.Alerts,
9432
- icon: IconProp_1.default.Chat,
9433
+ // Mattermost's own mark, as its Telegram sibling carries Telegram's.
9434
+ icon: IconProp_1.default.Mattermost,
9433
9435
  workflowName: "Notify Mattermost on new alert",
9434
9436
  workflowDescription: "Posts to Mattermost whenever an alert is created in this project.",
9435
9437
  variables: [MATTERMOST_WEBHOOK_URL],
@@ -8,10 +8,7 @@ export declare function getReadableShade(data: {
8
8
  background: RGB;
9
9
  minimumContrast: number;
10
10
  maximumSaturation?: number | undefined;
11
- towards?: "dark" | "light" | undefined;
12
11
  }): RGB;
13
- export declare const FILLED_TEXT_MINIMUM_CONTRAST: number;
14
- export declare function getReadableTextOnFill(fill: RGB): RGB;
15
12
  export declare function getAlphaForLuminance(data: {
16
13
  color: RGB;
17
14
  surface: RGB;
@@ -8,10 +8,7 @@ export declare function getReadableShade(data: {
8
8
  background: RGB;
9
9
  minimumContrast: number;
10
10
  maximumSaturation?: number | undefined;
11
- towards?: "dark" | "light" | undefined;
12
11
  }): RGB;
13
- export declare const FILLED_TEXT_MINIMUM_CONTRAST: number;
14
- export declare function getReadableTextOnFill(fill: RGB): RGB;
15
12
  export declare function getAlphaForLuminance(data: {
16
13
  color: RGB;
17
14
  surface: RGB;
@@ -1,12 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FILLED_TEXT_MINIMUM_CONTRAST = void 0;
4
3
  exports.parseColor = parseColor;
5
4
  exports.getRelativeLuminance = getRelativeLuminance;
6
5
  exports.getContrastRatio = getContrastRatio;
7
6
  exports.composite = composite;
8
7
  exports.getReadableShade = getReadableShade;
9
- exports.getReadableTextOnFill = getReadableTextOnFill;
10
8
  exports.getAlphaForLuminance = getAlphaForLuminance;
11
9
  // #rgb, #rrggbb, or #rrggbbaa (the alpha is ignored); the # is optional.
12
10
  const HEX_PATTERN = /^#?([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/;
@@ -134,8 +132,8 @@ function hslToRgb(hsl) {
134
132
  * The shade of `color` nearest to it that reaches `minimumContrast` against
135
133
  * `background`: the colour itself when it already does, otherwise the same
136
134
  * hue with only the lightness moved - toward black on a light background,
137
- * toward white on a dark one, or the way `towards` says. Lightness moves
138
- * luminance one way only, so a binary search finds the boundary.
135
+ * toward white on a dark one. Lightness moves luminance one way only, so a
136
+ * binary search finds the boundary.
139
137
  */
140
138
  function getReadableShade(data) {
141
139
  if (getContrastRatio(data.color, data.background) >= data.minimumContrast) {
@@ -152,13 +150,7 @@ function getReadableShade(data) {
152
150
  }
153
151
  // `low` never passes; `high` always does (black or white at the limit).
154
152
  let low = hsl.lightness;
155
- let high = data.towards
156
- ? data.towards === "light"
157
- ? 1
158
- : 0
159
- : getRelativeLuminance(data.background) < 0.5
160
- ? 1
161
- : 0;
153
+ let high = getRelativeLuminance(data.background) < 0.5 ? 1 : 0;
162
154
  for (let step = 0; step < 24; step++) {
163
155
  const middle = (low + high) / 2;
164
156
  if (passes(middle)) {
@@ -170,36 +162,6 @@ function getReadableShade(data) {
170
162
  }
171
163
  return hslToRgb(Object.assign(Object.assign({}, hsl), { lightness: high }));
172
164
  }
173
- /*
174
- * WCAG's minimum for text: what text written on a filled colour must reach.
175
- */
176
- exports.FILLED_TEXT_MINIMUM_CONTRAST = 4.5;
177
- const WHITE = { red: 255, green: 255, blue: 255 };
178
- /*
179
- * The colour of text written on a filled colour someone picked - a status
180
- * page's banner in the colour its owner gave a monitor status: white when
181
- * white reads on it at 4.5:1, otherwise the lightest shade of the fill's own
182
- * colour that does, so the words keep its family - deep green on a green
183
- * banner, deep amber on a yellow one - rather than turning grey.
184
- *
185
- * White on the default Operational green (#2ab57d) was 2.6:1, on Degraded's
186
- * yellow (#ffbf53) 1.6:1. A shade toward black always reaches 4.5:1 where
187
- * white does not (black reaches more than 4.6:1 on anything white fails
188
- * on), so there always is one. The fill itself is never changed: it is the colour
189
- * the owner chose, the same in the light theme and the dark one, and so is
190
- * the text on it.
191
- */
192
- function getReadableTextOnFill(fill) {
193
- if (getContrastRatio(WHITE, fill) >= exports.FILLED_TEXT_MINIMUM_CONTRAST) {
194
- return WHITE;
195
- }
196
- return getReadableShade({
197
- color: fill,
198
- background: fill,
199
- minimumContrast: exports.FILLED_TEXT_MINIMUM_CONTRAST,
200
- towards: "dark",
201
- });
202
- }
203
165
  /*
204
166
  * The opacity at which `color` over `surface` lands nearest to
205
167
  * `targetLuminance`, kept inside `range`. More opacity only ever moves the
@@ -1,9 +1,7 @@
1
1
  import commonJsModule from "./ColorContrast.js";
2
- export const FILLED_TEXT_MINIMUM_CONTRAST = commonJsModule.FILLED_TEXT_MINIMUM_CONTRAST;
3
2
  export const composite = commonJsModule.composite;
4
3
  export const getAlphaForLuminance = commonJsModule.getAlphaForLuminance;
5
4
  export const getContrastRatio = commonJsModule.getContrastRatio;
6
5
  export const getReadableShade = commonJsModule.getReadableShade;
7
- export const getReadableTextOnFill = commonJsModule.getReadableTextOnFill;
8
6
  export const getRelativeLuminance = commonJsModule.getRelativeLuminance;
9
7
  export const parseColor = commonJsModule.parseColor;
@@ -0,0 +1,5 @@
1
+ export declare const NAME_INITIALS_FALLBACK: string;
2
+ export declare const getNameForInitials: (name: string) => string;
3
+ export declare const getNameWordsForInitials: (name: string) => Array<string>;
4
+ export declare const getNameInitials: (name: string | null | undefined) => string;
5
+ export default getNameInitials;
@@ -0,0 +1,5 @@
1
+ export declare const NAME_INITIALS_FALLBACK: string;
2
+ export declare const getNameForInitials: (name: string) => string;
3
+ export declare const getNameWordsForInitials: (name: string) => Array<string>;
4
+ export declare const getNameInitials: (name: string | null | undefined) => string;
5
+ export default getNameInitials;
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ /*
3
+ * The letters an avatar draws for a name it has no picture for: the first
4
+ * letter of the name's first word and of its last ("Ada Byron Lovelace" is
5
+ * AL), or the first letter of a name of one word ("Platform" is P), in
6
+ * capitals.
7
+ *
8
+ * A word is a run of letters, marks and digits, so a bracket, a dash, a
9
+ * dot, a symbol or an emoji never becomes an initial - a team named
10
+ * "Security Operations Center (EMEA)" was "S(" - and a name with no letter
11
+ * or digit in it at all is "?". What a name says in brackets is left out
12
+ * while the rest has a word: a region after a team's name, or someone's
13
+ * pronouns after theirs, is not part of who they are - that team is SC,
14
+ * "Maya Chen (she/her)" is MC. A name that is all brackets, "(EMEA)", is
15
+ * read as it is.
16
+ *
17
+ * An address (no space in it, an @ after its first character) is read by
18
+ * the part before its @, so someone known only by their email,
19
+ * jane.doe@acme-commerce.example, is JD - not the J of an address read as
20
+ * one word.
21
+ *
22
+ * Each initial is one whole letter: a word starts with a letter or a digit,
23
+ * never with a mark that only changes the letter before it, and an accent
24
+ * typed as a letter and a mark is joined to its letter first (Unicode NFC),
25
+ * so a name in any script - Ünal Öz, Devanagari, Arabic, Chinese - comes
26
+ * out as two letters a font can draw, as many characters as a Latin name's.
27
+ * Persian and the Indic scripts join a word's parts with a zero-width
28
+ * non-joiner or joiner, which keeps them one word here too.
29
+ *
30
+ * React-free, so every frontend, the server and the tests read it.
31
+ */
32
+ Object.defineProperty(exports, "__esModule", { value: true });
33
+ exports.getNameInitials = exports.getNameWordsForInitials = exports.getNameForInitials = exports.NAME_INITIALS_FALLBACK = void 0;
34
+ // What a name with no letter or digit in it is drawn as.
35
+ exports.NAME_INITIALS_FALLBACK = "?";
36
+ /*
37
+ * One word: a letter or a digit, then any letters, marks, digits, the
38
+ * zero-width non-joiner and joiner, and apostrophes - straight or curly -
39
+ * so O'Brien is one word: "Conan O'Brien" is CO, never the CB of a surname
40
+ * read from its "Brien". One repeat of one class after a start that class
41
+ * also holds, so a match takes time in line with the name.
42
+ */
43
+ const NAME_WORD_REGEX = /[\p{L}\p{N}][\p{L}\p{M}\p{N}'\u{2019}\u{200C}\u{200D}]*/gu;
44
+ /*
45
+ * What a name says in brackets - round, square or curly, in the Latin or
46
+ * the full-width forms: an opening bracket, anything but a bracket, and a
47
+ * closing one. The repeat holds no bracket at all, so it can never run on
48
+ * past the next bracket and a match takes time in line with the name. A
49
+ * bracket inside a bracket is not taken apart: its letters are words like
50
+ * any others.
51
+ */
52
+ const NAME_BRACKETED_REGEX = /[([{\u{FF08}\u{FF3B}\u{FF5B}\u{3010}][^()[\]{}\u{FF08}\u{FF09}\u{FF3B}\u{FF3D}\u{FF5B}\u{FF5D}\u{3010}\u{3011}]*[)\]}\u{FF09}\u{FF3D}\u{FF5D}\u{3011}]/gu;
53
+ const WHITESPACE_REGEX = /\s/u;
54
+ // The part of a name its initials are read from: an address's local part.
55
+ const getNameForInitials = (name) => {
56
+ const text = name.trim();
57
+ const atIndex = text.indexOf("@");
58
+ if (atIndex > 0 && !WHITESPACE_REGEX.test(text)) {
59
+ return text.slice(0, atIndex);
60
+ }
61
+ return text;
62
+ };
63
+ exports.getNameForInitials = getNameForInitials;
64
+ // The words a name's initials are read from: the ones outside brackets, while there are any.
65
+ const getNameWordsForInitials = (name) => {
66
+ const text = (0, exports.getNameForInitials)(name);
67
+ const outsideBrackets = text.replace(NAME_BRACKETED_REGEX, " ").match(NAME_WORD_REGEX) || [];
68
+ if (outsideBrackets.length > 0) {
69
+ return outsideBrackets;
70
+ }
71
+ return text.match(NAME_WORD_REGEX) || [];
72
+ };
73
+ exports.getNameWordsForInitials = getNameWordsForInitials;
74
+ // A word's first letter, in capitals: one character.
75
+ const getWordInitial = (word) => {
76
+ const letter = Array.from(word.normalize("NFC"))[0] || "";
77
+ // "ß" is "SS" in capitals: one letter stands for the word, all the same.
78
+ return Array.from(letter.toUpperCase())[0] || letter;
79
+ };
80
+ const getNameInitials = (name) => {
81
+ const words = (0, exports.getNameWordsForInitials)(name || "");
82
+ if (words.length === 0) {
83
+ return exports.NAME_INITIALS_FALLBACK;
84
+ }
85
+ const first = getWordInitial(words[0]);
86
+ if (words.length === 1) {
87
+ return first;
88
+ }
89
+ return first + getWordInitial(words[words.length - 1]);
90
+ };
91
+ exports.getNameInitials = getNameInitials;
92
+ exports.default = exports.getNameInitials;
@@ -0,0 +1,6 @@
1
+ import commonJsModule from "./NameInitials.js";
2
+ export default commonJsModule.default;
3
+ export const NAME_INITIALS_FALLBACK = commonJsModule.NAME_INITIALS_FALLBACK;
4
+ export const getNameForInitials = commonJsModule.getNameForInitials;
5
+ export const getNameInitials = commonJsModule.getNameInitials;
6
+ export const getNameWordsForInitials = commonJsModule.getNameWordsForInitials;
@@ -0,0 +1,7 @@
1
+ export default class OldestKeyCursor<K> {
2
+ private readonly map;
3
+ private cursor;
4
+ constructor(map: Map<K, unknown>);
5
+ takeOldest(): K | undefined;
6
+ reset(): void;
7
+ }
@@ -0,0 +1,7 @@
1
+ export default class OldestKeyCursor<K> {
2
+ private readonly map;
3
+ private cursor;
4
+ constructor(map: Map<K, unknown>);
5
+ takeOldest(): K | undefined;
6
+ reset(): void;
7
+ }
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /*
4
+ * The oldest key of a Map - the first in insertion order - in constant time,
5
+ * however much the map has churned.
6
+ *
7
+ * A bounded cache that keeps its entries in a Map evicts its oldest entry with
8
+ * map.keys().next() when it is full. V8 leaves a deleted entry's slot in the
9
+ * map's table until the table is compacted, and a new iterator starts at the
10
+ * table's first slot, so in a cache that evicts from the front on every write
11
+ * each keys().next() walks past every slot evicted since the last compaction:
12
+ * 10 to 14 microseconds a write in a full cache of 10,000 to 50,000 entries,
13
+ * against under one here (measured 2026-10-27, Node 26).
14
+ *
15
+ * This keeps one iterator instead. A Map iterator is live: it skips entries
16
+ * deleted after it was made and reaches entries added after it, in insertion
17
+ * order. Every entry before it has been handed out as the oldest (and
18
+ * evicted) or deleted, and new entries are only ever added at the end, so the
19
+ * next live entry it reaches is the oldest live entry of the map - what
20
+ * keys().next() would have answered. A finished iterator stays finished, so
21
+ * one that ran out is replaced with a fresh one.
22
+ *
23
+ * The key it answers is meant to be deleted: asked twice without deleting it,
24
+ * it answers the next one.
25
+ *
26
+ * Keep it only while it moves. V8 rebuilds a map's table as entries come and
27
+ * go, and an iterator keeps the table it was made on alive, with every entry
28
+ * that table held, chained to each table after it, until it next moves. A
29
+ * cursor kept across changes that do not move it - writes that evict nothing,
30
+ * deletes, a sweep - holds on to everything the map stored meanwhile: 300 MB
31
+ * after a million writes and deletes of half-kilobyte values (measured
32
+ * 2026-10-27, Node 26). So its owner calls reset() after every change to the
33
+ * map other than deleting the key it was just handed (InMemoryTTLCache does),
34
+ * and the cursor lives only from one eviction to the next.
35
+ */
36
+ class OldestKeyCursor {
37
+ constructor(map) {
38
+ this.cursor = null;
39
+ this.map = map;
40
+ }
41
+ /*
42
+ * The map's oldest live key, for its caller to delete; undefined when the
43
+ * map is empty.
44
+ */
45
+ takeOldest() {
46
+ for (let attempt = 0; attempt < 2; attempt++) {
47
+ if (!this.cursor) {
48
+ this.cursor = this.map.keys();
49
+ }
50
+ const next = this.cursor.next();
51
+ if (!next.done) {
52
+ return next.value;
53
+ }
54
+ // A finished iterator never sees entries added after it finished.
55
+ this.cursor = null;
56
+ }
57
+ return undefined;
58
+ }
59
+ /*
60
+ * Lets go of the iterator: the next takeOldest starts again from the
61
+ * map's first entry. Call it after any change to the map other than
62
+ * deleting the key just handed out (see above).
63
+ */
64
+ reset() {
65
+ this.cursor = null;
66
+ }
67
+ }
68
+ exports.default = OldestKeyCursor;
@@ -0,0 +1,2 @@
1
+ import commonJsModule from "./OldestKeyCursor.js";
2
+ export default commonJsModule.default;
@@ -0,0 +1,4 @@
1
+ import { zodToOpenAPIRegistry } from "@asteasolutions/zod-to-openapi";
2
+ type Registry = typeof zodToOpenAPIRegistry;
3
+ export declare function holdOpenApiMetadataWeakly(registry: Registry): void;
4
+ export {};
@@ -0,0 +1,4 @@
1
+ import { zodToOpenAPIRegistry } from "@asteasolutions/zod-to-openapi";
2
+ type Registry = typeof zodToOpenAPIRegistry;
3
+ export declare function holdOpenApiMetadataWeakly(registry: Registry): void;
4
+ export {};
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.holdOpenApiMetadataWeakly = holdOpenApiMetadataWeakly;
4
+ function holdOpenApiMetadataWeakly(registry) {
5
+ const current = registry._map;
6
+ if (current instanceof Map) {
7
+ // Whatever was registered before this ran keeps its metadata.
8
+ const weak = new WeakMap();
9
+ for (const [schema, metadata] of current) {
10
+ weak.set(schema, metadata);
11
+ }
12
+ registry._map = weak;
13
+ }
14
+ // clear() makes a new Map in zod-to-openapi's copy.
15
+ registry.clear = function clear() {
16
+ this._map = new WeakMap();
17
+ this._idmap = new Map();
18
+ return this;
19
+ };
20
+ }
@@ -0,0 +1,2 @@
1
+ import commonJsModule from "./OpenApiMetadataRegistry.js";
2
+ export const holdOpenApiMetadataWeakly = commonJsModule.holdOpenApiMetadataWeakly;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const zod_to_openapi_1 = require("@asteasolutions/zod-to-openapi");
4
+ const OpenApiMetadataRegistry_1 = require("./OpenApiMetadataRegistry");
4
5
  const zod_1 = require("zod");
5
6
  /*
6
7
  * In a browser, zod turns no string into code. zod 4 compiles each object
@@ -31,6 +32,11 @@ if (typeof window !== "undefined" && typeof window.document !== "undefined") {
31
32
  * that alone (Tests/Utils/Schema/Zod holds it to reading only ZodType).
32
33
  */
33
34
  (0, zod_to_openapi_1.extendZodWithOpenApi)({ ZodType: zod_1.ZodType });
35
+ /*
36
+ * And what .openapi() is given lives as long as its schema, not as long as
37
+ * the process (OpenApiMetadataRegistry.ts says why).
38
+ */
39
+ (0, OpenApiMetadataRegistry_1.holdOpenApiMetadataWeakly)(zod_to_openapi_1.zodToOpenAPIRegistry);
34
40
  /*
35
41
  * The zod functions OneUptime builds its schemas with. Something else of
36
42
  * zod's - a class for instanceof, a type - comes from "zod" itself, after
@@ -0,0 +1,41 @@
1
+ import { SecurityCaseExposureEvidenceJson, SecurityCaseImpactJson, SecurityCaseImpactPeerJson, SecurityCaseImpactRecordJson, SecurityCaseInternetExposure } from "../../Types/SecurityCase/SecurityCaseContext.mjs";
2
+ import { SecurityConnectionChangeJson } from "../../Types/SecurityCase/SecurityConnection.mjs";
3
+ import { TopologyConnectionRowJSON } from "../../Types/Topology/TopologyApi.mjs";
4
+ type ChangeWithVersion = SecurityConnectionChangeJson & {
5
+ version?: string | undefined;
6
+ };
7
+ export declare function pickLastChange(changes: ReadonlyArray<ChangeWithVersion>, firstDetectedAt: Date | null): (ChangeWithVersion & {
8
+ isBeforeFirstDetection: boolean;
9
+ }) | null;
10
+ export declare function toImpactPeers(rows: ReadonlyArray<TopologyConnectionRowJSON>, max?: number): Array<SecurityCaseImpactPeerJson>;
11
+ export interface ReachedRequest {
12
+ address: string;
13
+ time: Date;
14
+ requestOutcome: string;
15
+ }
16
+ export interface RecordAddress {
17
+ recordName: string;
18
+ address: string;
19
+ }
20
+ export declare function buildInternetExposure(data: {
21
+ requests: ReadonlyArray<ReachedRequest>;
22
+ recordAddresses: ReadonlyArray<RecordAddress>;
23
+ max?: number | undefined;
24
+ }): {
25
+ exposure: SecurityCaseInternetExposure;
26
+ evidence: Array<SecurityCaseExposureEvidenceJson>;
27
+ };
28
+ export interface SecurityCaseImpactSummary {
29
+ recordCount: number;
30
+ downstreamCount: number;
31
+ upstreamCount: number;
32
+ monitorCount: number;
33
+ statusPageCount: number;
34
+ ownerTeamCount: number;
35
+ ownerUserCount: number;
36
+ isInternetFacing: boolean;
37
+ hasDependencies: boolean;
38
+ }
39
+ export declare function summarizeImpact(impact: SecurityCaseImpactJson): SecurityCaseImpactSummary;
40
+ export declare function getImpactRecordsInOrder(records: ReadonlyArray<SecurityCaseImpactRecordJson>): Array<SecurityCaseImpactRecordJson>;
41
+ export {};
@@ -0,0 +1,41 @@
1
+ import { SecurityCaseExposureEvidenceJson, SecurityCaseImpactJson, SecurityCaseImpactPeerJson, SecurityCaseImpactRecordJson, SecurityCaseInternetExposure } from "../../Types/SecurityCase/SecurityCaseContext";
2
+ import { SecurityConnectionChangeJson } from "../../Types/SecurityCase/SecurityConnection";
3
+ import { TopologyConnectionRowJSON } from "../../Types/Topology/TopologyApi";
4
+ type ChangeWithVersion = SecurityConnectionChangeJson & {
5
+ version?: string | undefined;
6
+ };
7
+ export declare function pickLastChange(changes: ReadonlyArray<ChangeWithVersion>, firstDetectedAt: Date | null): (ChangeWithVersion & {
8
+ isBeforeFirstDetection: boolean;
9
+ }) | null;
10
+ export declare function toImpactPeers(rows: ReadonlyArray<TopologyConnectionRowJSON>, max?: number): Array<SecurityCaseImpactPeerJson>;
11
+ export interface ReachedRequest {
12
+ address: string;
13
+ time: Date;
14
+ requestOutcome: string;
15
+ }
16
+ export interface RecordAddress {
17
+ recordName: string;
18
+ address: string;
19
+ }
20
+ export declare function buildInternetExposure(data: {
21
+ requests: ReadonlyArray<ReachedRequest>;
22
+ recordAddresses: ReadonlyArray<RecordAddress>;
23
+ max?: number | undefined;
24
+ }): {
25
+ exposure: SecurityCaseInternetExposure;
26
+ evidence: Array<SecurityCaseExposureEvidenceJson>;
27
+ };
28
+ export interface SecurityCaseImpactSummary {
29
+ recordCount: number;
30
+ downstreamCount: number;
31
+ upstreamCount: number;
32
+ monitorCount: number;
33
+ statusPageCount: number;
34
+ ownerTeamCount: number;
35
+ ownerUserCount: number;
36
+ isInternetFacing: boolean;
37
+ hasDependencies: boolean;
38
+ }
39
+ export declare function summarizeImpact(impact: SecurityCaseImpactJson): SecurityCaseImpactSummary;
40
+ export declare function getImpactRecordsInOrder(records: ReadonlyArray<SecurityCaseImpactRecordJson>): Array<SecurityCaseImpactRecordJson>;
41
+ export {};