@oneuptime/common 14.0.92 → 14.0.94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. package/Models/DatabaseModels/Alert.d.mts +2 -0
  2. package/Models/DatabaseModels/Alert.d.ts +2 -0
  3. package/Models/DatabaseModels/Alert.js +62 -1
  4. package/Models/DatabaseModels/AlertEpisodeMember.d.mts +1 -0
  5. package/Models/DatabaseModels/AlertEpisodeMember.d.ts +1 -0
  6. package/Models/DatabaseModels/AlertEpisodeMember.js +50 -0
  7. package/Models/DatabaseModels/CloudAccount.d.mts +29 -0
  8. package/Models/DatabaseModels/CloudAccount.d.ts +29 -0
  9. package/Models/DatabaseModels/CloudAccount.js +546 -0
  10. package/Models/DatabaseModels/CloudAccount.mjs +2 -0
  11. package/Models/DatabaseModels/CloudResource.d.mts +8 -0
  12. package/Models/DatabaseModels/CloudResource.d.ts +8 -0
  13. package/Models/DatabaseModels/CloudResource.js +169 -0
  14. package/Models/DatabaseModels/CloudResourceLabelRule.d.mts +1 -0
  15. package/Models/DatabaseModels/CloudResourceLabelRule.d.ts +1 -0
  16. package/Models/DatabaseModels/CloudResourceLabelRule.js +40 -0
  17. package/Models/DatabaseModels/CloudResourceOwnerRule.d.mts +1 -0
  18. package/Models/DatabaseModels/CloudResourceOwnerRule.d.ts +1 -0
  19. package/Models/DatabaseModels/CloudResourceOwnerRule.js +40 -0
  20. package/Models/DatabaseModels/Incident.d.mts +2 -0
  21. package/Models/DatabaseModels/Incident.d.ts +2 -0
  22. package/Models/DatabaseModels/Incident.js +54 -0
  23. package/Models/DatabaseModels/IncidentEpisodeMember.d.mts +1 -0
  24. package/Models/DatabaseModels/IncidentEpisodeMember.d.ts +1 -0
  25. package/Models/DatabaseModels/IncidentEpisodeMember.js +50 -0
  26. package/Models/DatabaseModels/IncomingCallPolicy.js +1 -1
  27. package/Models/DatabaseModels/Index.js +2 -0
  28. package/Models/DatabaseModels/LlmProvider.js +1 -1
  29. package/Models/DatabaseModels/Monitor.d.mts +2 -0
  30. package/Models/DatabaseModels/Monitor.d.ts +2 -0
  31. package/Models/DatabaseModels/Monitor.js +54 -0
  32. package/Models/DatabaseModels/MonitorTemplate.js +10 -4
  33. package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +13 -13
  34. package/Models/DatabaseModels/OnCallDutyPolicy.js +1 -1
  35. package/Models/DatabaseModels/OpenSourceDeployment.d.mts +1 -0
  36. package/Models/DatabaseModels/OpenSourceDeployment.d.ts +1 -0
  37. package/Models/DatabaseModels/OpenSourceDeployment.js +25 -6
  38. package/Models/DatabaseModels/ScheduledMaintenance.d.mts +1 -0
  39. package/Models/DatabaseModels/ScheduledMaintenance.d.ts +1 -0
  40. package/Models/DatabaseModels/ScheduledMaintenance.js +50 -0
  41. package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +1 -1
  42. package/Models/DatabaseModels/StatusPage.d.mts +2 -0
  43. package/Models/DatabaseModels/StatusPage.d.ts +2 -0
  44. package/Models/DatabaseModels/StatusPage.js +100 -0
  45. package/Types/AI/AiAffectedResources.d.mts +40 -0
  46. package/Types/AI/AiAffectedResources.d.ts +40 -0
  47. package/Types/AI/AiAffectedResources.js +292 -0
  48. package/Types/AI/AiAffectedResources.mjs +10 -0
  49. package/Types/Cloud/CloudAccountSummary.d.mts +25 -0
  50. package/Types/Cloud/CloudAccountSummary.d.ts +25 -0
  51. package/Types/Cloud/CloudAccountSummary.js +114 -0
  52. package/Types/Cloud/CloudAccountSummary.mjs +5 -0
  53. package/Types/Cloud/CloudEndpointMatch.d.mts +26 -0
  54. package/Types/Cloud/CloudEndpointMatch.d.ts +26 -0
  55. package/Types/Cloud/CloudEndpointMatch.js +134 -0
  56. package/Types/Cloud/CloudEndpointMatch.mjs +5 -0
  57. package/Types/Cloud/CloudInventory.d.mts +34 -0
  58. package/Types/Cloud/CloudInventory.d.ts +34 -0
  59. package/Types/Cloud/CloudInventory.js +362 -0
  60. package/Types/Cloud/CloudInventory.mjs +22 -0
  61. package/Types/Cloud/CloudResourceCatalog.d.mts +2 -0
  62. package/Types/Cloud/CloudResourceCatalog.d.ts +2 -0
  63. package/Types/Cloud/CloudResourceCatalog.js +29 -1
  64. package/Types/Cloud/CloudResourceCatalog.mjs +2 -0
  65. package/Types/Cloud/CloudResourceIndex.d.mts +44 -0
  66. package/Types/Cloud/CloudResourceIndex.d.ts +44 -0
  67. package/Types/Cloud/CloudResourceIndex.js +191 -0
  68. package/Types/Cloud/CloudResourceIndex.mjs +4 -0
  69. package/Types/CloudConnection/CloudConnectionCatalog.d.mts +3 -0
  70. package/Types/CloudConnection/CloudConnectionCatalog.d.ts +3 -0
  71. package/Types/CloudConnection/CloudConnectionCatalog.js +70 -12
  72. package/Types/CloudConnection/CloudConnectionCatalog.mjs +2 -0
  73. package/Types/CloudConnection/CloudConnectionPaste.js +7 -1
  74. package/Types/CloudConnection/CloudConnectionSetupCommands.d.mts +43 -3
  75. package/Types/CloudConnection/CloudConnectionSetupCommands.d.ts +43 -3
  76. package/Types/CloudConnection/CloudConnectionSetupCommands.js +280 -30
  77. package/Types/CloudConnection/CloudConnectionSetupCommands.mjs +14 -0
  78. package/Types/CloudConnection/CloudConnectionTest.d.mts +1 -0
  79. package/Types/CloudConnection/CloudConnectionTest.d.ts +1 -0
  80. package/Types/CloudConnection/CloudConnectionTest.js +1 -0
  81. package/Types/Dashboard/DashboardComponents/DashboardTableComponent.d.mts +19 -0
  82. package/Types/Dashboard/DashboardComponents/DashboardTableComponent.d.ts +19 -0
  83. package/Types/Dashboard/DashboardComponents/DashboardTableComponent.js +27 -1
  84. package/Types/Dashboard/DashboardComponents/DashboardTableComponent.mjs +3 -0
  85. package/Types/Database/BlankColumnValue.d.mts +6 -0
  86. package/Types/Database/BlankColumnValue.d.ts +6 -0
  87. package/Types/Database/BlankColumnValue.js +77 -0
  88. package/Types/Database/BlankColumnValue.mjs +4 -0
  89. package/Types/Date.d.mts +1 -0
  90. package/Types/Date.d.ts +1 -0
  91. package/Types/Date.js +32 -6
  92. package/Types/DateLanguage.d.mts +2 -0
  93. package/Types/DateLanguage.d.ts +2 -0
  94. package/Types/DateLanguage.js +67 -12
  95. package/Types/DateLanguage.mjs +2 -0
  96. package/Types/Domain.d.mts +2 -0
  97. package/Types/Domain.d.ts +2 -0
  98. package/Types/Domain.js +27 -0
  99. package/Types/Email/EmailTemplateType.d.mts +2 -0
  100. package/Types/Email/EmailTemplateType.d.ts +2 -0
  101. package/Types/Email/EmailTemplateType.js +2 -0
  102. package/Types/Email.d.mts +1 -0
  103. package/Types/Email.d.ts +1 -0
  104. package/Types/Email.js +16 -0
  105. package/Types/IncomingCall/IncomingCallPolicyRepeat.d.mts +6 -0
  106. package/Types/IncomingCall/IncomingCallPolicyRepeat.d.ts +6 -0
  107. package/Types/IncomingCall/IncomingCallPolicyRepeat.js +41 -14
  108. package/Types/IncomingCall/IncomingCallPolicyRepeat.mjs +3 -0
  109. package/Types/Monitor/CriteriaFilter.d.mts +1 -0
  110. package/Types/Monitor/CriteriaFilter.d.ts +1 -0
  111. package/Types/Monitor/CriteriaFilter.js +9 -0
  112. package/Types/Monitor/DatabaseMetricCatalog.js +2 -2
  113. package/Types/Monitor/ExternalStatusPageMonitor/ExternalStatusPageMonitorResponse.d.mts +4 -0
  114. package/Types/Monitor/ExternalStatusPageMonitor/ExternalStatusPageMonitorResponse.d.ts +4 -0
  115. package/Types/Monitor/KubernetesEventAlertTemplates.d.mts +20 -0
  116. package/Types/Monitor/KubernetesEventAlertTemplates.d.ts +20 -0
  117. package/Types/Monitor/KubernetesEventAlertTemplates.js +232 -0
  118. package/Types/Monitor/KubernetesEventAlertTemplates.mjs +8 -0
  119. package/Types/Monitor/MonitorStepExternalStatusPageMonitor.d.mts +3 -0
  120. package/Types/Monitor/MonitorStepExternalStatusPageMonitor.d.ts +3 -0
  121. package/Types/Monitor/MonitorStepExternalStatusPageMonitor.js +35 -0
  122. package/Types/Monitor/MonitorTemplateSyncField.js +6 -1
  123. package/Types/Monitor/MonitorType.js +12 -2
  124. package/Types/Monitor/Recommendation/MonitorRecommendationCatalog.js +27 -2
  125. package/Types/Monitor/Recommendation/MonitorRecommendationUtil.d.mts +1 -0
  126. package/Types/Monitor/Recommendation/MonitorRecommendationUtil.d.ts +1 -0
  127. package/Types/Monitor/Recommendation/MonitorRecommendationUtil.js +31 -1
  128. package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.d.mts +3 -1
  129. package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.d.ts +3 -1
  130. package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.js +3 -2
  131. package/Types/Monitor/SnmpMonitor/SnmpMonitorResponse.d.mts +1 -0
  132. package/Types/Monitor/SnmpMonitor/SnmpMonitorResponse.d.ts +1 -0
  133. package/Types/Monitor/UptimeBarTooltipMaintenance.d.mts +15 -0
  134. package/Types/Monitor/UptimeBarTooltipMaintenance.d.ts +15 -0
  135. package/Types/Monitor/UptimeBarTooltipMaintenance.js +2 -0
  136. package/Types/Monitor/UptimeBarTooltipMaintenance.mjs +1 -0
  137. package/Types/Monitor/UptimeHistoryLabels.d.mts +5 -0
  138. package/Types/Monitor/UptimeHistoryLabels.d.ts +5 -0
  139. package/Types/Monitor/UptimeHistoryLabels.js +5 -0
  140. package/Types/NotificationSetting/NotificationEmailRollupCategory.js +2 -0
  141. package/Types/NotificationSetting/NotificationEmailRollupPolicy.js +10 -3
  142. package/Types/NotificationSetting/NotificationSettingEventType.d.mts +1 -0
  143. package/Types/NotificationSetting/NotificationSettingEventType.d.ts +1 -0
  144. package/Types/NotificationSetting/NotificationSettingEventType.js +7 -0
  145. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRepeat.d.mts +7 -0
  146. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRepeat.d.ts +7 -0
  147. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRepeat.js +51 -0
  148. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRepeat.mjs +4 -0
  149. package/Types/ReadingDirection.d.mts +10 -0
  150. package/Types/ReadingDirection.d.ts +10 -0
  151. package/Types/ReadingDirection.js +171 -0
  152. package/Types/ReadingDirection.mjs +10 -0
  153. package/Types/Reminder/ScheduledMaintenanceReminderNeverReminds.d.mts +8 -0
  154. package/Types/Reminder/ScheduledMaintenanceReminderNeverReminds.d.ts +8 -0
  155. package/Types/Reminder/ScheduledMaintenanceReminderNeverReminds.js +55 -0
  156. package/Types/Reminder/ScheduledMaintenanceReminderNeverReminds.mjs +5 -0
  157. package/Types/Rules/RuleCriteriaFieldRegistry.js +2 -0
  158. package/Types/Runbook/HttpStepVariables.d.mts +8 -0
  159. package/Types/Runbook/HttpStepVariables.d.ts +8 -0
  160. package/Types/Runbook/HttpStepVariables.js +109 -0
  161. package/Types/Runbook/HttpStepVariables.mjs +5 -0
  162. package/Types/Runbook/RunbookStep.d.mts +1 -0
  163. package/Types/Runbook/RunbookStep.d.ts +1 -0
  164. package/Types/Runbook/RunnerFeatures.d.mts +1 -0
  165. package/Types/Runbook/RunnerFeatures.d.ts +1 -0
  166. package/Types/Runbook/RunnerFeatures.js +15 -3
  167. package/Types/Runbook/RunnerFeatures.mjs +1 -0
  168. package/Types/Runbook/SshHostKey.d.mts +22 -0
  169. package/Types/Runbook/SshHostKey.d.ts +22 -0
  170. package/Types/Runbook/SshHostKey.js +201 -0
  171. package/Types/Runbook/SshHostKey.mjs +10 -0
  172. package/Types/Runner/CodeRepositoryRunner.js +2 -3
  173. package/Types/Runner/GlobalAIAgentsGone.d.mts +1 -0
  174. package/Types/Runner/GlobalAIAgentsGone.d.ts +1 -0
  175. package/Types/Runner/GlobalAIAgentsGone.js +19 -0
  176. package/Types/Runner/GlobalAIAgentsGone.mjs +2 -0
  177. package/Types/Runner/GlobalRunnerWork.d.mts +1 -0
  178. package/Types/Runner/GlobalRunnerWork.d.ts +1 -0
  179. package/Types/Runner/GlobalRunnerWork.js +21 -1
  180. package/Types/Runner/GlobalRunnerWork.mjs +1 -0
  181. package/Types/SSO/SignInMethods.d.mts +31 -0
  182. package/Types/SSO/SignInMethods.d.ts +31 -0
  183. package/Types/SSO/SignInMethods.js +160 -0
  184. package/Types/SSO/SignInMethods.mjs +8 -0
  185. package/Types/ScheduledMaintenance/ScheduledMaintenancePublication.d.mts +24 -0
  186. package/Types/ScheduledMaintenance/ScheduledMaintenancePublication.d.ts +24 -0
  187. package/Types/ScheduledMaintenance/ScheduledMaintenancePublication.js +159 -0
  188. package/Types/ScheduledMaintenance/ScheduledMaintenancePublication.mjs +8 -0
  189. package/Types/StatusPage/StatusPageLanguage.d.mts +6 -0
  190. package/Types/StatusPage/StatusPageLanguage.d.ts +6 -0
  191. package/Types/StatusPage/StatusPageLanguage.js +17 -1
  192. package/Types/StatusPage/StatusPageLanguage.mjs +1 -0
  193. package/Types/Workflow/Templates.js +2 -5
  194. package/Types/Workflow/WorkflowPlan.d.mts +7 -0
  195. package/Types/Workflow/WorkflowPlan.d.ts +7 -0
  196. package/Types/Workflow/WorkflowPlan.js +39 -0
  197. package/Types/Workflow/WorkflowPlan.mjs +3 -0
  198. package/Types/Workspace/WorkspaceMessagePayload.d.mts +11 -0
  199. package/Types/Workspace/WorkspaceMessagePayload.d.ts +11 -0
  200. package/Utils/ColorContrast.d.mts +3 -0
  201. package/Utils/ColorContrast.d.ts +3 -0
  202. package/Utils/ColorContrast.js +41 -3
  203. package/Utils/ColorContrast.mjs +2 -0
  204. package/Utils/Dashboard/TableThresholds.d.mts +44 -0
  205. package/Utils/Dashboard/TableThresholds.d.ts +44 -0
  206. package/Utils/Dashboard/TableThresholds.js +288 -0
  207. package/Utils/Dashboard/TableThresholds.mjs +17 -0
  208. package/Utils/Dashboard/ValueWidgetSeries.d.mts +6 -0
  209. package/Utils/Dashboard/ValueWidgetSeries.d.ts +6 -0
  210. package/Utils/Dashboard/ValueWidgetSeries.js +70 -1
  211. package/Utils/Dashboard/ValueWidgetSeries.mjs +2 -0
  212. package/Utils/DeveloperDocs/ResourceProfiles.js +16 -0
  213. package/Utils/DeveloperDocs/TerraformSchema.d.mts +1 -0
  214. package/Utils/DeveloperDocs/TerraformSchema.d.ts +1 -0
  215. package/Utils/DeveloperDocs/TerraformSchema.js +17 -0
  216. package/Utils/DeveloperDocs/TerraformSchema.mjs +1 -0
  217. package/Utils/Incident/WhoOpenedItRootCause.d.mts +2 -0
  218. package/Utils/Incident/WhoOpenedItRootCause.d.ts +2 -0
  219. package/Utils/Incident/WhoOpenedItRootCause.js +50 -0
  220. package/Utils/Incident/WhoOpenedItRootCause.mjs +3 -0
  221. package/Utils/Monitor/ExternalStatusPageComponentNames.d.mts +17 -0
  222. package/Utils/Monitor/ExternalStatusPageComponentNames.d.ts +17 -0
  223. package/Utils/Monitor/ExternalStatusPageComponentNames.js +274 -0
  224. package/Utils/Monitor/ExternalStatusPageComponentNames.mjs +6 -0
  225. package/Utils/Monitor/ExternalStatusPageReading.d.mts +35 -0
  226. package/Utils/Monitor/ExternalStatusPageReading.d.ts +35 -0
  227. package/Utils/Monitor/ExternalStatusPageReading.js +380 -0
  228. package/Utils/Monitor/ExternalStatusPageReading.mjs +6 -0
  229. package/Utils/Monitor/ExternalStatusPageScope.d.mts +43 -0
  230. package/Utils/Monitor/ExternalStatusPageScope.d.ts +43 -0
  231. package/Utils/Monitor/ExternalStatusPageScope.js +213 -0
  232. package/Utils/Monitor/ExternalStatusPageScope.mjs +4 -0
  233. package/Utils/Monitor/SyntheticMonitorStepsUtil.d.mts +18 -0
  234. package/Utils/Monitor/SyntheticMonitorStepsUtil.d.ts +18 -0
  235. package/Utils/Monitor/SyntheticMonitorStepsUtil.js +129 -0
  236. package/Utils/Monitor/SyntheticMonitorStepsUtil.mjs +4 -0
  237. package/Utils/Rules/RuleRunSummary.d.mts +1 -0
  238. package/Utils/Rules/RuleRunSummary.d.ts +1 -0
  239. package/Utils/Rules/RuleRunSummary.js +19 -1
  240. package/Utils/Rules/RuleRunSummary.mjs +1 -0
  241. package/Utils/Runbook/SshHostKeyFingerprint.d.mts +8 -0
  242. package/Utils/Runbook/SshHostKeyFingerprint.d.ts +8 -0
  243. package/Utils/Runbook/SshHostKeyFingerprint.js +83 -0
  244. package/Utils/Runbook/SshHostKeyFingerprint.mjs +5 -0
  245. package/Utils/ScheduledMaintenanceStart.d.mts +6 -0
  246. package/Utils/ScheduledMaintenanceStart.d.ts +6 -0
  247. package/Utils/ScheduledMaintenanceStart.js +15 -0
  248. package/Utils/Sms/Gsm7Text.js +9 -1
  249. package/Utils/Sms/OnCallPageSms.d.mts +2 -0
  250. package/Utils/Sms/OnCallPageSms.d.ts +2 -0
  251. package/Utils/Sms/OnCallPageSms.js +19 -2
  252. package/Utils/Sms/OnCallPageSms.mjs +1 -0
  253. package/Utils/Sms/SubscriberSms.d.mts +2 -0
  254. package/Utils/Sms/SubscriberSms.d.ts +2 -0
  255. package/Utils/Sms/SubscriberSms.js +35 -0
  256. package/Utils/Sms/SubscriberSms.mjs +3 -0
  257. package/Utils/StatusPage/HistoryChartBarColors.d.mts +2 -0
  258. package/Utils/StatusPage/HistoryChartBarColors.d.ts +2 -0
  259. package/Utils/StatusPage/HistoryChartBarColors.js +12 -1
  260. package/Utils/StatusPage/HistoryChartBarColors.mjs +2 -0
  261. package/Utils/Telemetry/ChangeEventFields.d.mts +19 -1
  262. package/Utils/Telemetry/ChangeEventFields.d.ts +19 -1
  263. package/Utils/Telemetry/ChangeEventFields.js +52 -1
  264. package/Utils/Uptime/DayUptimeGraphUtil.d.mts +6 -0
  265. package/Utils/Uptime/DayUptimeGraphUtil.d.ts +6 -0
  266. package/Utils/Uptime/DayUptimeGraphUtil.js +37 -6
  267. package/Utils/Uptime/UptimeMaintenanceUtil.d.mts +60 -0
  268. package/Utils/Uptime/UptimeMaintenanceUtil.d.ts +60 -0
  269. package/Utils/Uptime/UptimeMaintenanceUtil.js +295 -0
  270. package/Utils/Uptime/UptimeMaintenanceUtil.mjs +3 -0
  271. package/package.json +1 -1
@@ -200,7 +200,7 @@ class NetworkDeviceAlertPackUtil {
200
200
  filterCondition: FilterCondition_1.default.All,
201
201
  filters: [
202
202
  {
203
- checkOn: CriteriaFilter_1.CheckOn.SnmpOidValue,
203
+ checkOn: data.checkOn || CriteriaFilter_1.CheckOn.SnmpOidValue,
204
204
  filterType: data.filterType,
205
205
  value: data.value,
206
206
  snmpMonitorOptions: { oid: oid },
@@ -213,7 +213,8 @@ class NetworkDeviceAlertPackUtil {
213
213
  changeMonitorStatus: false,
214
214
  isEnabled: true,
215
215
  name: data.name,
216
- description: `The value the device reports for ${data.name === oid ? oid : `${data.name} (${oid})`}.`,
216
+ description: data.description ||
217
+ `The value the device reports for ${data.name === oid ? oid : `${data.name} (${oid})`}.`,
217
218
  };
218
219
  return instance;
219
220
  }
@@ -14,6 +14,7 @@ export interface SnmpOidResponse {
14
14
  name?: string | undefined;
15
15
  value: string | number | null;
16
16
  type: SnmpDataType;
17
+ ratePerSecond?: number | undefined;
17
18
  }
18
19
  export default interface SnmpMonitorResponse {
19
20
  isOnline: boolean;
@@ -14,6 +14,7 @@ export interface SnmpOidResponse {
14
14
  name?: string | undefined;
15
15
  value: string | number | null;
16
16
  type: SnmpDataType;
17
+ ratePerSecond?: number | undefined;
17
18
  }
18
19
  export default interface SnmpMonitorResponse {
19
20
  isOnline: boolean;
@@ -0,0 +1,15 @@
1
+ import Color from "../Color.mjs";
2
+ import ObjectID from "../ObjectID.mjs";
3
+ import { ScheduledMaintenancePhaseOfState } from "../../Utils/ScheduledMaintenanceStart.mjs";
4
+ export default interface UptimeBarTooltipMaintenance {
5
+ id: string;
6
+ title: string;
7
+ startsAt: Date;
8
+ endsAt: Date;
9
+ currentState?: {
10
+ name: string;
11
+ color: Color;
12
+ } | undefined;
13
+ phase: ScheduledMaintenancePhaseOfState | null;
14
+ monitorIds: Array<ObjectID>;
15
+ }
@@ -0,0 +1,15 @@
1
+ import Color from "../Color";
2
+ import ObjectID from "../ObjectID";
3
+ import { ScheduledMaintenancePhaseOfState } from "../../Utils/ScheduledMaintenanceStart";
4
+ export default interface UptimeBarTooltipMaintenance {
5
+ id: string;
6
+ title: string;
7
+ startsAt: Date;
8
+ endsAt: Date;
9
+ currentState?: {
10
+ name: string;
11
+ color: Color;
12
+ } | undefined;
13
+ phase: ScheduledMaintenancePhaseOfState | null;
14
+ monitorIds: Array<ObjectID>;
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ import "./UptimeBarTooltipMaintenance.js";
@@ -13,5 +13,10 @@ export default interface UptimeHistoryLabels {
13
13
  incidentsOnThisDay: string;
14
14
  declared: string;
15
15
  close: string;
16
+ scheduledMaintenance: string;
17
+ dayLabelWithMaintenance: string;
18
+ oneMaintenanceEvent: string;
19
+ maintenanceEvents: string;
20
+ moreMaintenance: string;
16
21
  }
17
22
  export declare const DefaultUptimeHistoryLabels: UptimeHistoryLabels;
@@ -13,5 +13,10 @@ export default interface UptimeHistoryLabels {
13
13
  incidentsOnThisDay: string;
14
14
  declared: string;
15
15
  close: string;
16
+ scheduledMaintenance: string;
17
+ dayLabelWithMaintenance: string;
18
+ oneMaintenanceEvent: string;
19
+ maintenanceEvents: string;
20
+ moreMaintenance: string;
16
21
  }
17
22
  export declare const DefaultUptimeHistoryLabels: UptimeHistoryLabels;
@@ -16,4 +16,9 @@ exports.DefaultUptimeHistoryLabels = {
16
16
  incidentsOnThisDay: "{{total}} incidents reported on this day",
17
17
  declared: "Declared",
18
18
  close: "Close",
19
+ scheduledMaintenance: "Scheduled maintenance",
20
+ dayLabelWithMaintenance: "{{label}}, {{maintenance}}",
21
+ oneMaintenanceEvent: "1 scheduled maintenance event",
22
+ maintenanceEvents: "{{total}} scheduled maintenance events",
23
+ moreMaintenance: "+{{total}} more",
19
24
  };
@@ -86,6 +86,8 @@ exports.ROLLUP_CATEGORY_BY_EVENT_TYPE = {
86
86
  [NotificationSettingEventType_1.default.SEND_INCIDENT_OWNER_ADDED_NOTIFICATION]: RollupCategory.Incidents,
87
87
  [NotificationSettingEventType_1.default.SEND_INCIDENT_MEMBER_ADDED_NOTIFICATION]: RollupCategory.Incidents,
88
88
  [NotificationSettingEventType_1.default.SEND_INCIDENT_REMINDER_OWNER_NOTIFICATION]: RollupCategory.Incidents,
89
+ // Never held back (NEVER_ROLLED_UP_EVENT_TYPES): filed here all the same.
90
+ [NotificationSettingEventType_1.default.SEND_INCIDENT_SLA_BREACHED_OWNER_NOTIFICATION]: RollupCategory.Incidents,
89
91
  // Alerts
90
92
  [NotificationSettingEventType_1.default.SEND_ALERT_CREATED_OWNER_NOTIFICATION]: RollupCategory.Alerts,
91
93
  [NotificationSettingEventType_1.default.SEND_ALERT_NOTE_POSTED_OWNER_NOTIFICATION]: RollupCategory.Alerts,
@@ -15,8 +15,8 @@ const NotificationSettingEventType_1 = __importDefault(require("./NotificationSe
15
15
  * between them.
16
16
  */
17
17
  /*
18
- * Time-critical on-call mail. Never held back, never counted, never written to
19
- * the queue table at all.
18
+ * Time-critical mail. Never held back, never counted, never written to the
19
+ * queue table at all.
20
20
  *
21
21
  * A five-minute coalescing window eats a thirty-minute shift lead time, which
22
22
  * is the entire value of "your shift starts soon". And "you are on call now",
@@ -24,6 +24,12 @@ const NotificationSettingEventType_1 = __importDefault(require("./NotificationSe
24
24
  * allowed to have. The saving from rolling these up would be nil anyway: they
25
25
  * fire once per roster transition, not per resource, so they are not what
26
26
  * floods anyone's inbox.
27
+ *
28
+ * An SLA breach is a deadline that has already passed: holding it back five
29
+ * minutes to batch it with the incident chatter that caused it is exactly
30
+ * backwards, and it fires once per deadline. It borrowed "Incident created"
31
+ * until it had an event of its own, so its sender asked for the bypass
32
+ * (forceImmediate) every time; now the event type says it.
27
33
  */
28
34
  exports.NEVER_ROLLED_UP_EVENT_TYPES = new Set([
29
35
  NotificationSettingEventType_1.default.SEND_WHEN_USER_IS_ON_CALL_ROSTER,
@@ -31,6 +37,7 @@ exports.NEVER_ROLLED_UP_EVENT_TYPES = new Set([
31
37
  NotificationSettingEventType_1.default.SEND_WHEN_USER_IS_NO_LONGER_ACTIVE_ON_ON_CALL_ROSTER,
32
38
  NotificationSettingEventType_1.default.SEND_BEFORE_USER_ON_CALL_SHIFT_STARTS,
33
39
  NotificationSettingEventType_1.default.SEND_WHEN_USER_ON_CALL_SHIFT_IS_REASSIGNED,
40
+ NotificationSettingEventType_1.default.SEND_INCIDENT_SLA_BREACHED_OWNER_NOTIFICATION,
34
41
  ]);
35
42
  /*
36
43
  * SHRINK-ONLY. These two carry ON_CALL in their member name and are still
@@ -63,7 +70,7 @@ exports.ROLLUP_ELIGIBLE_ON_CALL_ADMIN_EVENT_TYPES = new Set([
63
70
  NotificationSettingEventType_1.default.SEND_WHEN_USER_IS_REMOVED_FROM_ON_CALL_POLICY,
64
71
  ]);
65
72
  /*
66
- * Everything else - the other 43 members. Derived from the enum by exclusion
73
+ * Everything else - every other member. Derived from the enum by exclusion
67
74
  * rather than listed by hand, so the two sets are a partition by construction
68
75
  * and cannot drift: there is no edit that adds a member to both, and no edit
69
76
  * that drops one from both.
@@ -5,6 +5,7 @@ declare enum NotificationSettingEventType {
5
5
  SEND_INCIDENT_OWNER_ADDED_NOTIFICATION = "Send notification when I am added as a owner to the incident",
6
6
  SEND_INCIDENT_MEMBER_ADDED_NOTIFICATION = "Send notification when I am assigned to an incident as a member",
7
7
  SEND_INCIDENT_REMINDER_OWNER_NOTIFICATION = "Send reminder notification when an incident I own is still open",
8
+ SEND_INCIDENT_SLA_BREACHED_OWNER_NOTIFICATION = "Send notification when an incident I own misses an SLA deadline",
8
9
  SEND_ALERT_CREATED_OWNER_NOTIFICATION = "Send alert created notification when I am the owner of the alert",
9
10
  SEND_ALERT_NOTE_POSTED_OWNER_NOTIFICATION = "Send alert note posted notification when I am the owner of the alert",
10
11
  SEND_ALERT_STATE_CHANGED_OWNER_NOTIFICATION = "Send alert state changed notification when I am the owner of the alert",
@@ -5,6 +5,7 @@ declare enum NotificationSettingEventType {
5
5
  SEND_INCIDENT_OWNER_ADDED_NOTIFICATION = "Send notification when I am added as a owner to the incident",
6
6
  SEND_INCIDENT_MEMBER_ADDED_NOTIFICATION = "Send notification when I am assigned to an incident as a member",
7
7
  SEND_INCIDENT_REMINDER_OWNER_NOTIFICATION = "Send reminder notification when an incident I own is still open",
8
+ SEND_INCIDENT_SLA_BREACHED_OWNER_NOTIFICATION = "Send notification when an incident I own misses an SLA deadline",
8
9
  SEND_ALERT_CREATED_OWNER_NOTIFICATION = "Send alert created notification when I am the owner of the alert",
9
10
  SEND_ALERT_NOTE_POSTED_OWNER_NOTIFICATION = "Send alert note posted notification when I am the owner of the alert",
10
11
  SEND_ALERT_STATE_CHANGED_OWNER_NOTIFICATION = "Send alert state changed notification when I am the owner of the alert",
@@ -9,6 +9,13 @@ var NotificationSettingEventType;
9
9
  NotificationSettingEventType["SEND_INCIDENT_OWNER_ADDED_NOTIFICATION"] = "Send notification when I am added as a owner to the incident";
10
10
  NotificationSettingEventType["SEND_INCIDENT_MEMBER_ADDED_NOTIFICATION"] = "Send notification when I am assigned to an incident as a member";
11
11
  NotificationSettingEventType["SEND_INCIDENT_REMINDER_OWNER_NOTIFICATION"] = "Send reminder notification when an incident I own is still open";
12
+ /*
13
+ * An incident SLA rule's response or resolution deadline passed
14
+ * (Workers IncidentSla/CheckSlaBreaches). Its own event since it had
15
+ * borrowed SEND_INCIDENT_CREATED_OWNER_NOTIFICATION, so switching off
16
+ * "Incident created" silenced SLA breaches too.
17
+ */
18
+ NotificationSettingEventType["SEND_INCIDENT_SLA_BREACHED_OWNER_NOTIFICATION"] = "Send notification when an incident I own misses an SLA deadline";
12
19
  // Alerts
13
20
  NotificationSettingEventType["SEND_ALERT_CREATED_OWNER_NOTIFICATION"] = "Send alert created notification when I am the owner of the alert";
14
21
  NotificationSettingEventType["SEND_ALERT_NOTE_POSTED_OWNER_NOTIFICATION"] = "Send alert note posted notification when I am the owner of the alert";
@@ -3,3 +3,10 @@ export interface OnCallDutyPolicyRepeatSettings {
3
3
  repeatPolicyIfNoOneAcknowledgesNoOfTimes?: number | null | undefined;
4
4
  }
5
5
  export declare function getOnCallPolicyRepeatsAllowed(policy: OnCallDutyPolicyRepeatSettings | null | undefined): number;
6
+ export declare const ON_CALL_POLICY_REPEAT_COLUMNS: ReadonlyArray<string>;
7
+ export declare const ON_CALL_POLICY_REPEAT_TIMES_REFUSAL: string;
8
+ export declare function isRepeatCountOfAtLeastOne(value: unknown): boolean;
9
+ export declare function getOnCallPolicyRepeatRefusal(policy: {
10
+ repeatPolicyIfNoOneAcknowledges?: unknown;
11
+ repeatPolicyIfNoOneAcknowledgesNoOfTimes?: unknown;
12
+ }): string | null;
@@ -3,3 +3,10 @@ export interface OnCallDutyPolicyRepeatSettings {
3
3
  repeatPolicyIfNoOneAcknowledgesNoOfTimes?: number | null | undefined;
4
4
  }
5
5
  export declare function getOnCallPolicyRepeatsAllowed(policy: OnCallDutyPolicyRepeatSettings | null | undefined): number;
6
+ export declare const ON_CALL_POLICY_REPEAT_COLUMNS: ReadonlyArray<string>;
7
+ export declare const ON_CALL_POLICY_REPEAT_TIMES_REFUSAL: string;
8
+ export declare function isRepeatCountOfAtLeastOne(value: unknown): boolean;
9
+ export declare function getOnCallPolicyRepeatRefusal(policy: {
10
+ repeatPolicyIfNoOneAcknowledges?: unknown;
11
+ repeatPolicyIfNoOneAcknowledgesNoOfTimes?: unknown;
12
+ }): string | null;
@@ -18,7 +18,10 @@
18
18
  * Slack and Microsoft Teams message of a run (OnCallPolicyRunMessage).
19
19
  */
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.ON_CALL_POLICY_REPEAT_TIMES_REFUSAL = exports.ON_CALL_POLICY_REPEAT_COLUMNS = void 0;
21
22
  exports.getOnCallPolicyRepeatsAllowed = getOnCallPolicyRepeatsAllowed;
23
+ exports.isRepeatCountOfAtLeastOne = isRepeatCountOfAtLeastOne;
24
+ exports.getOnCallPolicyRepeatRefusal = getOnCallPolicyRepeatRefusal;
22
25
  /*
23
26
  * The number of repeats a run may make: 0 while "Repeat if no one
24
27
  * acknowledges" is off, otherwise "Number of times to repeat" - a whole
@@ -35,3 +38,51 @@ function getOnCallPolicyRepeatsAllowed(policy) {
35
38
  }
36
39
  return Math.floor(times);
37
40
  }
41
+ /*
42
+ * A POLICY THAT SAYS IT REPEATS MUST REPEAT AT LEAST ONCE.
43
+ *
44
+ * "Repeat if no one acknowledges" on with "Number of times to repeat" at 0
45
+ * (or below it, or not a whole number) says the policy starts again and
46
+ * never does: the run reads 0 repeats (above), and every screen reads the
47
+ * pair as "Stop paging". The Dashboard's Repeat Policy card cannot make it -
48
+ * its "How many more times?" box takes a whole number of 1 or more - and the
49
+ * server holds the API, Terraform, MCP and workflows to the same
50
+ * (OnCallDutyPolicyService, through Server/Utils/Database/ColumnRuleCheck).
51
+ * A policy stored that way before keeps running as it did, once, and an edit
52
+ * that leaves the pair as it is still saves.
53
+ *
54
+ * A number not given is the column's default, 0: a create that turns the
55
+ * switch on must say how many times.
56
+ */
57
+ exports.ON_CALL_POLICY_REPEAT_COLUMNS = [
58
+ "repeatPolicyIfNoOneAcknowledges",
59
+ "repeatPolicyIfNoOneAcknowledgesNoOfTimes",
60
+ ];
61
+ exports.ON_CALL_POLICY_REPEAT_TIMES_REFUSAL = "An on-call policy that repeats must start again at least once: set Repeat Policy Times If No One Acknowledges to a whole number of 1 or more, or turn off Repeat Policy If No One Acknowledges.";
62
+ /*
63
+ * Whether a count, as a write sends it, is a whole number of at least 1. A
64
+ * number or its digits; anything else - nothing, an empty box, a part of a
65
+ * number, 0 or below - is not.
66
+ */
67
+ function isRepeatCountOfAtLeastOne(value) {
68
+ if (typeof value !== "number" && typeof value !== "string") {
69
+ return false;
70
+ }
71
+ if (typeof value === "string" && !value.trim()) {
72
+ return false;
73
+ }
74
+ const times = Number(value);
75
+ return Number.isFinite(times) && Number.isInteger(times) && times >= 1;
76
+ }
77
+ /*
78
+ * The refusal for a pair that says it repeats and never does, or null: the
79
+ * switch off (the number then means nothing), or on with 1 or more.
80
+ */
81
+ function getOnCallPolicyRepeatRefusal(policy) {
82
+ if (policy.repeatPolicyIfNoOneAcknowledges !== true) {
83
+ return null;
84
+ }
85
+ return isRepeatCountOfAtLeastOne(policy.repeatPolicyIfNoOneAcknowledgesNoOfTimes)
86
+ ? null
87
+ : exports.ON_CALL_POLICY_REPEAT_TIMES_REFUSAL;
88
+ }
@@ -1,2 +1,6 @@
1
1
  import commonJsModule from "./OnCallDutyPolicyRepeat.js";
2
+ export const ON_CALL_POLICY_REPEAT_COLUMNS = commonJsModule.ON_CALL_POLICY_REPEAT_COLUMNS;
3
+ export const ON_CALL_POLICY_REPEAT_TIMES_REFUSAL = commonJsModule.ON_CALL_POLICY_REPEAT_TIMES_REFUSAL;
4
+ export const getOnCallPolicyRepeatRefusal = commonJsModule.getOnCallPolicyRepeatRefusal;
2
5
  export const getOnCallPolicyRepeatsAllowed = commonJsModule.getOnCallPolicyRepeatsAllowed;
6
+ export const isRepeatCountOfAtLeastOne = commonJsModule.isRepeatCountOfAtLeastOne;
@@ -0,0 +1,10 @@
1
+ export type ReadingDirection = "ltr" | "rtl";
2
+ export declare const LEFT_TO_RIGHT: ReadingDirection;
3
+ export declare const RIGHT_TO_LEFT: ReadingDirection;
4
+ export declare const RIGHT_TO_LEFT_LANGUAGES: ReadonlyArray<string>;
5
+ export declare const RIGHT_TO_LEFT_SCRIPTS: ReadonlyArray<string>;
6
+ export declare const getReadingDirection: (language: string | null | undefined) => ReadingDirection;
7
+ export declare const isRightToLeftLanguage: (language: string | null | undefined) => boolean;
8
+ export declare const TEXT_DIRECTION_SCAN_LENGTH: number;
9
+ export declare const getTextReadingDirectionByMostLetters: (text: string | null | undefined) => ReadingDirection | null;
10
+ export declare const getTextReadingDirection: (text: string | null | undefined) => ReadingDirection | null;
@@ -0,0 +1,10 @@
1
+ export type ReadingDirection = "ltr" | "rtl";
2
+ export declare const LEFT_TO_RIGHT: ReadingDirection;
3
+ export declare const RIGHT_TO_LEFT: ReadingDirection;
4
+ export declare const RIGHT_TO_LEFT_LANGUAGES: ReadonlyArray<string>;
5
+ export declare const RIGHT_TO_LEFT_SCRIPTS: ReadonlyArray<string>;
6
+ export declare const getReadingDirection: (language: string | null | undefined) => ReadingDirection;
7
+ export declare const isRightToLeftLanguage: (language: string | null | undefined) => boolean;
8
+ export declare const TEXT_DIRECTION_SCAN_LENGTH: number;
9
+ export declare const getTextReadingDirectionByMostLetters: (text: string | null | undefined) => ReadingDirection | null;
10
+ export declare const getTextReadingDirection: (text: string | null | undefined) => ReadingDirection | null;
@@ -0,0 +1,171 @@
1
+ "use strict";
2
+ /*
3
+ * WHICH WAY A LANGUAGE IS READ.
4
+ *
5
+ * Persian - the one such language OneUptime is translated into today - is
6
+ * written from right to left, like Arabic, Hebrew and Urdu; every other
7
+ * language of the product from left to right. A page says which on <html
8
+ * dir> (Common/UI/Utils/PageLanguage), and its layout follows: rows and
9
+ * grids run from the right, and Tailwind's left and right utilities mean
10
+ * the start and the end of the line (Common/UI/Styles/
11
+ * TailwindReadingDirection.js).
12
+ *
13
+ * Read from the language tag alone, so a server, a test and every frontend
14
+ * agree without Intl: the script when the tag names one ("az-Arab",
15
+ * "ku-Latn"), the language otherwise.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.getTextReadingDirection = exports.getTextReadingDirectionByMostLetters = exports.TEXT_DIRECTION_SCAN_LENGTH = exports.isRightToLeftLanguage = exports.getReadingDirection = exports.RIGHT_TO_LEFT_SCRIPTS = exports.RIGHT_TO_LEFT_LANGUAGES = exports.RIGHT_TO_LEFT = exports.LEFT_TO_RIGHT = void 0;
19
+ exports.LEFT_TO_RIGHT = "ltr";
20
+ exports.RIGHT_TO_LEFT = "rtl";
21
+ // Languages written from right to left, by their primary subtag.
22
+ exports.RIGHT_TO_LEFT_LANGUAGES = [
23
+ "ar", // Arabic
24
+ "arc", // Aramaic
25
+ "azb", // South Azerbaijani
26
+ "ckb", // Central Kurdish (Sorani)
27
+ "dv", // Dhivehi
28
+ "fa", // Persian
29
+ "glk", // Gilaki
30
+ "he", // Hebrew
31
+ "iw", // Hebrew, the old code
32
+ "ks", // Kashmiri
33
+ "lrc", // Northern Luri
34
+ "mzn", // Mazanderani
35
+ "nqo", // N'Ko
36
+ "prs", // Dari
37
+ "ps", // Pashto
38
+ "sd", // Sindhi
39
+ "syr", // Syriac
40
+ "ug", // Uyghur
41
+ "ur", // Urdu
42
+ "yi", // Yiddish
43
+ ];
44
+ // Scripts written from right to left, by their ISO 15924 code.
45
+ exports.RIGHT_TO_LEFT_SCRIPTS = [
46
+ "adlm", // Adlam
47
+ "arab", // Arabic
48
+ "hebr", // Hebrew
49
+ "mand", // Mandaic
50
+ "nkoo", // N'Ko
51
+ "rohg", // Hanifi Rohingya
52
+ "samr", // Samaritan
53
+ "syrc", // Syriac
54
+ "thaa", // Thaana
55
+ ];
56
+ const SUBTAG_SEPARATOR_REGEX = /[-_]/;
57
+ // A script subtag is four letters ("Arab", "Latn").
58
+ const SCRIPT_SUBTAG_REGEX = /^[a-z]{4}$/;
59
+ // "fa", "fa-IR", "fa_IR", "az-Arab-IR": a language's subtags, lowercased.
60
+ const getSubtags = (language) => {
61
+ return language
62
+ .trim()
63
+ .toLowerCase()
64
+ .split(SUBTAG_SEPARATOR_REGEX)
65
+ .filter((subtag) => {
66
+ return subtag.length > 0;
67
+ });
68
+ };
69
+ // Which way `language` is read: left to right unless it is written from the right.
70
+ const getReadingDirection = (language) => {
71
+ if (!language) {
72
+ return exports.LEFT_TO_RIGHT;
73
+ }
74
+ const subtags = getSubtags(language);
75
+ const primary = subtags[0];
76
+ if (!primary) {
77
+ return exports.LEFT_TO_RIGHT;
78
+ }
79
+ // A script subtag, right after the language, decides.
80
+ const script = subtags[1];
81
+ if (script && SCRIPT_SUBTAG_REGEX.test(script)) {
82
+ return exports.RIGHT_TO_LEFT_SCRIPTS.includes(script)
83
+ ? exports.RIGHT_TO_LEFT
84
+ : exports.LEFT_TO_RIGHT;
85
+ }
86
+ return exports.RIGHT_TO_LEFT_LANGUAGES.includes(primary)
87
+ ? exports.RIGHT_TO_LEFT
88
+ : exports.LEFT_TO_RIGHT;
89
+ };
90
+ exports.getReadingDirection = getReadingDirection;
91
+ const isRightToLeftLanguage = (language) => {
92
+ return (0, exports.getReadingDirection)(language) === exports.RIGHT_TO_LEFT;
93
+ };
94
+ exports.isRightToLeftLanguage = isRightToLeftLanguage;
95
+ /*
96
+ * WHICH WAY A TEXT SOMEONE WROTE IS READ.
97
+ *
98
+ * A team's note, a description or an answer from OneUptime AI is written
99
+ * in whatever language its author wrote it in - an English note on a
100
+ * Persian page, a Persian one on an English page. While it is being typed
101
+ * it reads the way its first letter does, as a browser decides
102
+ * dir="auto": a letter of a right-to-left script makes it right to left,
103
+ * any other letter left to right, and the line does not turn round as the
104
+ * words come. Digits, punctuation and Markdown's own marks ("## ", "- ",
105
+ * "**") decide nothing. Null when there is no letter to go by, so the text
106
+ * follows the page.
107
+ *
108
+ * Only the start of the text is read (TEXT_DIRECTION_SCAN_LENGTH): a log
109
+ * of megabytes is decided by its first letter, not scanned to its end.
110
+ */
111
+ exports.TEXT_DIRECTION_SCAN_LENGTH = 4096;
112
+ const FIRST_LETTER_REGEX = /\p{L}/u;
113
+ const RIGHT_TO_LEFT_LETTER_REGEX = /[\p{Script=Arabic}\p{Script=Hebrew}\p{Script=Syriac}\p{Script=Thaana}\p{Script=Nko}\p{Script=Adlam}\p{Script=Hanifi_Rohingya}\p{Script=Mandaic}\p{Script=Samaritan}]/u;
114
+ // One letter, of any script.
115
+ const LETTER_REGEX = /^\p{L}$/u;
116
+ /*
117
+ * WHICH WAY A TEXT SHOWN ON A PAGE IS READ: the way most of its letters
118
+ * read. A name, a description or a paragraph of a note is shown, not typed,
119
+ * so it can be read as a whole: "`kubectl` را اجرا کنید" and "API پرداخت از
120
+ * کار افتاده" are Persian sentences that start with an English word, and
121
+ * laid out from that first letter their Persian words came out in the
122
+ * wrong order. "Checkout API (EU)" and "Rolled back v2.4.1." read left to
123
+ * right, their full stop at their end. A tie goes to the first letter.
124
+ * Null when there is no letter, so the text follows the page; only the
125
+ * first TEXT_DIRECTION_SCAN_LENGTH characters are read.
126
+ */
127
+ const getTextReadingDirectionByMostLetters = (text) => {
128
+ if (!text) {
129
+ return null;
130
+ }
131
+ let rightToLeftLetters = 0;
132
+ let leftToRightLetters = 0;
133
+ let firstLetterDirection = null;
134
+ // By code point, so a letter outside the Basic Multilingual Plane counts once.
135
+ for (const character of text.slice(0, exports.TEXT_DIRECTION_SCAN_LENGTH)) {
136
+ if (!LETTER_REGEX.test(character)) {
137
+ continue;
138
+ }
139
+ const direction = RIGHT_TO_LEFT_LETTER_REGEX.test(character)
140
+ ? exports.RIGHT_TO_LEFT
141
+ : exports.LEFT_TO_RIGHT;
142
+ if (direction === exports.RIGHT_TO_LEFT) {
143
+ rightToLeftLetters++;
144
+ }
145
+ else {
146
+ leftToRightLetters++;
147
+ }
148
+ firstLetterDirection = firstLetterDirection || direction;
149
+ }
150
+ if (rightToLeftLetters === leftToRightLetters) {
151
+ return firstLetterDirection;
152
+ }
153
+ return rightToLeftLetters > leftToRightLetters
154
+ ? exports.RIGHT_TO_LEFT
155
+ : exports.LEFT_TO_RIGHT;
156
+ };
157
+ exports.getTextReadingDirectionByMostLetters = getTextReadingDirectionByMostLetters;
158
+ const getTextReadingDirection = (text) => {
159
+ if (!text) {
160
+ return null;
161
+ }
162
+ const start = text.slice(0, exports.TEXT_DIRECTION_SCAN_LENGTH);
163
+ const letter = FIRST_LETTER_REGEX.exec(start);
164
+ if (!letter) {
165
+ return null;
166
+ }
167
+ return RIGHT_TO_LEFT_LETTER_REGEX.test(letter[0])
168
+ ? exports.RIGHT_TO_LEFT
169
+ : exports.LEFT_TO_RIGHT;
170
+ };
171
+ exports.getTextReadingDirection = getTextReadingDirection;
@@ -0,0 +1,10 @@
1
+ import commonJsModule from "./ReadingDirection.js";
2
+ export const LEFT_TO_RIGHT = commonJsModule.LEFT_TO_RIGHT;
3
+ export const RIGHT_TO_LEFT = commonJsModule.RIGHT_TO_LEFT;
4
+ export const RIGHT_TO_LEFT_LANGUAGES = commonJsModule.RIGHT_TO_LEFT_LANGUAGES;
5
+ export const RIGHT_TO_LEFT_SCRIPTS = commonJsModule.RIGHT_TO_LEFT_SCRIPTS;
6
+ export const TEXT_DIRECTION_SCAN_LENGTH = commonJsModule.TEXT_DIRECTION_SCAN_LENGTH;
7
+ export const getReadingDirection = commonJsModule.getReadingDirection;
8
+ export const getTextReadingDirection = commonJsModule.getTextReadingDirection;
9
+ export const getTextReadingDirectionByMostLetters = commonJsModule.getTextReadingDirectionByMostLetters;
10
+ export const isRightToLeftLanguage = commonJsModule.isRightToLeftLanguage;
@@ -0,0 +1,8 @@
1
+ export declare const SCHEDULED_MAINTENANCE_REMINDER_TIMING_COLUMNS: ReadonlyArray<string>;
2
+ export interface ScheduledMaintenanceReminderTimingValues {
3
+ remindWhileScheduled?: unknown;
4
+ stopRemindersOnState?: unknown;
5
+ }
6
+ export declare function doesScheduledMaintenanceReminderRuleNeverRemind(values: ScheduledMaintenanceReminderTimingValues): boolean;
7
+ export declare const SCHEDULED_MAINTENANCE_REMINDER_NEVER_REMINDS_REFUSAL: string;
8
+ export declare function getScheduledMaintenanceReminderRuleRefusal(values: ScheduledMaintenanceReminderTimingValues): string | null;
@@ -0,0 +1,8 @@
1
+ export declare const SCHEDULED_MAINTENANCE_REMINDER_TIMING_COLUMNS: ReadonlyArray<string>;
2
+ export interface ScheduledMaintenanceReminderTimingValues {
3
+ remindWhileScheduled?: unknown;
4
+ stopRemindersOnState?: unknown;
5
+ }
6
+ export declare function doesScheduledMaintenanceReminderRuleNeverRemind(values: ScheduledMaintenanceReminderTimingValues): boolean;
7
+ export declare const SCHEDULED_MAINTENANCE_REMINDER_NEVER_REMINDS_REFUSAL: string;
8
+ export declare function getScheduledMaintenanceReminderRuleRefusal(values: ScheduledMaintenanceReminderTimingValues): string | null;
@@ -0,0 +1,55 @@
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.SCHEDULED_MAINTENANCE_REMINDER_NEVER_REMINDS_REFUSAL = exports.SCHEDULED_MAINTENANCE_REMINDER_TIMING_COLUMNS = void 0;
7
+ exports.doesScheduledMaintenanceReminderRuleNeverRemind = doesScheduledMaintenanceReminderRuleNeverRemind;
8
+ exports.getScheduledMaintenanceReminderRuleRefusal = getScheduledMaintenanceReminderRuleRefusal;
9
+ const ScheduledMaintenanceReminderStopState_1 = __importDefault(require("./ScheduledMaintenanceReminderStopState"));
10
+ /*
11
+ * A SCHEDULED MAINTENANCE REMINDER RULE THAT WOULD NEVER REMIND.
12
+ *
13
+ * A reminder rule says when it reminds an event's owners with two columns:
14
+ * "Remind While Event is Scheduled" (remindWhileScheduled) and "Stop
15
+ * Reminders When" (stopRemindersOnState). With the switch off, the worker
16
+ * holds the first reminder back until the event starts
17
+ * (Workers/Jobs/ScheduledMaintenanceOwners/SendUnresolvedReminderNotification);
18
+ * with Ongoing, the start is where reminders stop. Together they wait for
19
+ * the start and stop at it: the rule matches every event it is meant for
20
+ * and reminds nobody.
21
+ *
22
+ * The Dashboard's form never makes that pair - it asks one question with
23
+ * three answers (Dashboard Components/Reminders/MaintenanceReminderTiming) -
24
+ * and the server holds every other way of saving a rule to the same: the
25
+ * API, Terraform, MCP and workflows (ScheduledMaintenanceReminderRuleService,
26
+ * through Server/Utils/Database/ColumnRuleCheck). A rule stored that way
27
+ * before the server refused it keeps working as it did: the rules list marks
28
+ * it "Never reminds", and an edit that leaves the pair as it is (a rename)
29
+ * still saves.
30
+ *
31
+ * Server-free and React-free: the server, the Dashboard and the tests read
32
+ * the same rule.
33
+ */
34
+ // The two columns the rule reads, as the model names them.
35
+ exports.SCHEDULED_MAINTENANCE_REMINDER_TIMING_COLUMNS = ["remindWhileScheduled", "stopRemindersOnState"];
36
+ /*
37
+ * Whether the pair waits for the event to start and stops when it starts. A
38
+ * column not given is what a new rule stores: the switch off, Completed.
39
+ */
40
+ function doesScheduledMaintenanceReminderRuleNeverRemind(values) {
41
+ return (values.remindWhileScheduled !== true &&
42
+ values.stopRemindersOnState ===
43
+ ScheduledMaintenanceReminderStopState_1.default.Ongoing);
44
+ }
45
+ /*
46
+ * What saving that pair is refused with, in the API's own column names:
47
+ * what each of the two columns does to the rule, then the two ways out.
48
+ */
49
+ exports.SCHEDULED_MAINTENANCE_REMINDER_NEVER_REMINDS_REFUSAL = "This reminder rule would never send a reminder: Remind While Event is Scheduled is off, so it waits for the event to start, and Stop Reminders When is Ongoing, so it stops when the event starts. Turn on Remind While Event is Scheduled, or set Stop Reminders When to Completed.";
50
+ // The refusal for a pair that never reminds, or null for one that reminds.
51
+ function getScheduledMaintenanceReminderRuleRefusal(values) {
52
+ return doesScheduledMaintenanceReminderRuleNeverRemind(values)
53
+ ? exports.SCHEDULED_MAINTENANCE_REMINDER_NEVER_REMINDS_REFUSAL
54
+ : null;
55
+ }
@@ -0,0 +1,5 @@
1
+ import commonJsModule from "./ScheduledMaintenanceReminderNeverReminds.js";
2
+ export const SCHEDULED_MAINTENANCE_REMINDER_NEVER_REMINDS_REFUSAL = commonJsModule.SCHEDULED_MAINTENANCE_REMINDER_NEVER_REMINDS_REFUSAL;
3
+ export const SCHEDULED_MAINTENANCE_REMINDER_TIMING_COLUMNS = commonJsModule.SCHEDULED_MAINTENANCE_REMINDER_TIMING_COLUMNS;
4
+ export const doesScheduledMaintenanceReminderRuleNeverRemind = commonJsModule.doesScheduledMaintenanceReminderRuleNeverRemind;
5
+ export const getScheduledMaintenanceReminderRuleRefusal = commonJsModule.getScheduledMaintenanceReminderRuleRefusal;
@@ -129,11 +129,13 @@ exports.RULE_CRITERIA_FIELDS_BY_MODEL = {
129
129
  "matchLabels",
130
130
  "nameRegexPattern",
131
131
  "descriptionRegexPattern",
132
+ "cloudTagPattern",
132
133
  ],
133
134
  CloudResourceOwnerRule: [
134
135
  "matchLabels",
135
136
  "nameRegexPattern",
136
137
  "descriptionRegexPattern",
138
+ "cloudTagPattern",
137
139
  ],
138
140
  DashboardLabelRule: [
139
141
  "dashboardLabels",
@@ -0,0 +1,8 @@
1
+ import { HttpRequestStepConfig } from "./RunbookStep.mjs";
2
+ import { RunbookVariableReference } from "./RunbookVariableReference.mjs";
3
+ export declare function getHttpStepVariableTexts(config: Pick<HttpRequestStepConfig, "url" | "headersJson" | "body">): Array<string>;
4
+ type GetValueFunction = (reference: RunbookVariableReference) => string | undefined;
5
+ export declare function fillHttpStepJsonText(text: string, getValue: GetValueFunction): string;
6
+ export declare function fillHttpStepConfig<T extends HttpRequestStepConfig>(config: T, getValue: GetValueFunction): T;
7
+ export declare function redactHttpStepSecrets(text: string, secretValues: Array<string>): string;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import { HttpRequestStepConfig } from "./RunbookStep";
2
+ import { RunbookVariableReference } from "./RunbookVariableReference";
3
+ export declare function getHttpStepVariableTexts(config: Pick<HttpRequestStepConfig, "url" | "headersJson" | "body">): Array<string>;
4
+ type GetValueFunction = (reference: RunbookVariableReference) => string | undefined;
5
+ export declare function fillHttpStepJsonText(text: string, getValue: GetValueFunction): string;
6
+ export declare function fillHttpStepConfig<T extends HttpRequestStepConfig>(config: T, getValue: GetValueFunction): T;
7
+ export declare function redactHttpStepSecrets(text: string, secretValues: Array<string>): string;
8
+ export {};