@oneuptime/common 14.0.109 → 14.0.110

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 (285) hide show
  1. package/Models/AnalyticsModels/SecurityEvent.js +1 -1
  2. package/Models/DatabaseModels/AIInsight.js +2 -2
  3. package/Models/DatabaseModels/Alert.js +2 -2
  4. package/Models/DatabaseModels/AlertEpisode.js +2 -2
  5. package/Models/DatabaseModels/AlertEpisodeOnCallRule.js +3 -3
  6. package/Models/DatabaseModels/AlertGroupingRule.d.mts +1 -0
  7. package/Models/DatabaseModels/AlertGroupingRule.d.ts +1 -0
  8. package/Models/DatabaseModels/AlertGroupingRule.js +48 -2
  9. package/Models/DatabaseModels/AlertOnCallRule.js +3 -3
  10. package/Models/DatabaseModels/AlertSeverity.js +13 -4
  11. package/Models/DatabaseModels/AlertState.js +1 -1
  12. package/Models/DatabaseModels/CallLog.js +12 -12
  13. package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.d.mts +2 -0
  14. package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.d.ts +2 -0
  15. package/Models/DatabaseModels/EmailLog.js +12 -12
  16. package/Models/DatabaseModels/FormSubmission.js +2 -2
  17. package/Models/DatabaseModels/GlobalConfig.d.mts +1 -0
  18. package/Models/DatabaseModels/GlobalConfig.d.ts +1 -0
  19. package/Models/DatabaseModels/GlobalConfig.js +28 -0
  20. package/Models/DatabaseModels/Incident.js +2 -2
  21. package/Models/DatabaseModels/IncidentEpisode.js +2 -2
  22. package/Models/DatabaseModels/IncidentEpisodeOnCallRule.js +3 -3
  23. package/Models/DatabaseModels/IncidentGroupingRule.d.mts +1 -0
  24. package/Models/DatabaseModels/IncidentGroupingRule.d.ts +1 -0
  25. package/Models/DatabaseModels/IncidentGroupingRule.js +48 -2
  26. package/Models/DatabaseModels/IncidentOnCallRule.js +3 -3
  27. package/Models/DatabaseModels/IncidentSeverity.js +13 -4
  28. package/Models/DatabaseModels/IncidentState.js +1 -1
  29. package/Models/DatabaseModels/IncidentTemplate.js +2 -2
  30. package/Models/DatabaseModels/Monitor.js +3 -3
  31. package/Models/DatabaseModels/NetworkDevice.d.mts +1 -0
  32. package/Models/DatabaseModels/NetworkDevice.d.ts +1 -0
  33. package/Models/DatabaseModels/NetworkDevice.js +41 -0
  34. package/Models/DatabaseModels/OnCallDutyPolicy.js +4 -2
  35. package/Models/DatabaseModels/OnCallDutyPolicyEscalationRule.js +1 -1
  36. package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleSchedule.js +8 -5
  37. package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleTeam.js +5 -2
  38. package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleUser.js +5 -2
  39. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +9 -6
  40. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.js +10 -7
  41. package/Models/DatabaseModels/OnCallDutyPolicyFeed.js +14 -11
  42. package/Models/DatabaseModels/OnCallDutyPolicyOwnerTeam.js +7 -4
  43. package/Models/DatabaseModels/OnCallDutyPolicyOwnerUser.js +7 -4
  44. package/Models/DatabaseModels/OnCallDutyPolicySchedule.js +6 -3
  45. package/Models/DatabaseModels/OnCallDutyPolicyScheduleCalendarFeed.js +4 -4
  46. package/Models/DatabaseModels/OnCallDutyPolicyScheduleLayer.js +3 -3
  47. package/Models/DatabaseModels/OnCallDutyPolicyScheduleLayerUser.js +6 -6
  48. package/Models/DatabaseModels/OnCallDutyPolicyTimeLog.js +9 -6
  49. package/Models/DatabaseModels/Project.d.mts +2 -0
  50. package/Models/DatabaseModels/Project.d.ts +2 -0
  51. package/Models/DatabaseModels/Project.js +96 -2
  52. package/Models/DatabaseModels/ProxmoxCluster.d.mts +1 -0
  53. package/Models/DatabaseModels/ProxmoxCluster.d.ts +1 -0
  54. package/Models/DatabaseModels/ProxmoxCluster.js +52 -3
  55. package/Models/DatabaseModels/PushNotificationLog.js +12 -12
  56. package/Models/DatabaseModels/Reseller.js +8 -2
  57. package/Models/DatabaseModels/ResellerPlan.js +8 -2
  58. package/Models/DatabaseModels/ScheduledMaintenance.js +6 -3
  59. package/Models/DatabaseModels/ScheduledMaintenanceInternalNote.js +7 -4
  60. package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +2 -2
  61. package/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +7 -4
  62. package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +1 -1
  63. package/Models/DatabaseModels/Service.js +1 -1
  64. package/Models/DatabaseModels/ServiceLevelObjectiveBurnRateRule.js +4 -4
  65. package/Models/DatabaseModels/ServiceLevelObjectiveErrorBudgetPolicyTier.js +4 -4
  66. package/Models/DatabaseModels/SmsLog.js +12 -12
  67. package/Models/DatabaseModels/StatusPage.js +5 -5
  68. package/Models/DatabaseModels/StatusPageSubscriber.js +2 -2
  69. package/Models/DatabaseModels/TelegramLog.js +12 -12
  70. package/Models/DatabaseModels/TelemetryIngestionKey.js +8 -5
  71. package/Models/DatabaseModels/TelemetryIngestionKeyRefusal.js +7 -4
  72. package/Models/DatabaseModels/User.d.mts +4 -0
  73. package/Models/DatabaseModels/User.d.ts +4 -0
  74. package/Models/DatabaseModels/User.js +100 -0
  75. package/Models/DatabaseModels/UserOnCallLog.js +6 -6
  76. package/Models/DatabaseModels/UserOnCallLogTimeline.js +3 -3
  77. package/Models/DatabaseModels/UserOnCallShiftReminderLog.js +2 -2
  78. package/Models/DatabaseModels/WebhookLog.js +12 -12
  79. package/Models/DatabaseModels/WhatsAppLog.js +12 -12
  80. package/Models/DatabaseModels/WorkspaceNotificationLog.js +12 -12
  81. package/Types/AI/AIChatTypes.d.mts +2 -1
  82. package/Types/AI/AIChatTypes.d.ts +2 -1
  83. package/Types/AI/AIChatTypes.js +5 -0
  84. package/Types/Analytics/ProductEvent.d.mts +6 -1
  85. package/Types/Analytics/ProductEvent.d.ts +6 -1
  86. package/Types/Analytics/ProductEvent.js +41 -0
  87. package/Types/AuditLog/AuditLogCoverage.d.mts +1 -0
  88. package/Types/AuditLog/AuditLogCoverage.d.ts +1 -0
  89. package/Types/AuditLog/AuditLogCoverage.js +4 -2
  90. package/Types/Cloud/CloudResourceCatalog.d.mts +2 -0
  91. package/Types/Cloud/CloudResourceCatalog.d.ts +2 -0
  92. package/Types/Cloud/CloudResourceCatalog.js +33 -3
  93. package/Types/Cloud/CloudResourceCatalog.mjs +1 -0
  94. package/Types/DataObservability/DataCheckSuggestions.d.mts +25 -0
  95. package/Types/DataObservability/DataCheckSuggestions.d.ts +25 -0
  96. package/Types/DataObservability/DataCheckSuggestions.js +102 -65
  97. package/Types/DataObservability/DataCheckSuggestions.mjs +1 -0
  98. package/Types/Database/TableMetadata.d.mts +2 -0
  99. package/Types/Database/TableMetadata.d.ts +2 -0
  100. package/Types/Database/TableMetadata.js +6 -0
  101. package/Types/Date.d.mts +20 -1
  102. package/Types/Date.d.ts +20 -1
  103. package/Types/Date.js +42 -2
  104. package/Types/DateLanguage.d.mts +2 -0
  105. package/Types/DateLanguage.d.ts +2 -0
  106. package/Types/DateLanguage.js +44 -2
  107. package/Types/DateLanguage.mjs +2 -0
  108. package/Types/DirectionArrow.d.mts +7 -0
  109. package/Types/DirectionArrow.d.ts +7 -0
  110. package/Types/DirectionArrow.js +88 -0
  111. package/Types/DirectionArrow.mjs +7 -0
  112. package/Types/Docs/GlossaryTerm.d.mts +1 -0
  113. package/Types/Docs/GlossaryTerm.d.ts +1 -0
  114. package/Types/Docs/GlossaryTerm.js +2 -0
  115. package/Types/Docs/RetiredNames.d.mts +11 -0
  116. package/Types/Docs/RetiredNames.d.ts +11 -0
  117. package/Types/Docs/RetiredNames.js +139 -0
  118. package/Types/Docs/RetiredNames.mjs +3 -0
  119. package/Types/Exception/RefusalWithValues.d.mts +7 -0
  120. package/Types/Exception/RefusalWithValues.d.ts +7 -0
  121. package/Types/Exception/RefusalWithValues.js +76 -0
  122. package/Types/Exception/RefusalWithValues.mjs +3 -0
  123. package/Types/Exception/UnexplainedError.d.mts +13 -0
  124. package/Types/Exception/UnexplainedError.d.ts +13 -0
  125. package/Types/Exception/UnexplainedError.js +53 -1
  126. package/Types/Exception/UnexplainedError.mjs +1 -0
  127. package/Types/File/FileSize.d.mts +4 -1
  128. package/Types/File/FileSize.d.ts +4 -1
  129. package/Types/File/FileSize.js +18 -17
  130. package/Types/HostCollector/HostCollector.d.mts +1 -0
  131. package/Types/HostCollector/HostCollector.d.ts +1 -0
  132. package/Types/HostCollector/HostCollector.js +26 -10
  133. package/Types/HostCollector/HostCollector.mjs +1 -0
  134. package/Types/Monitor/MonitorCriteria.js +2 -2
  135. package/Types/Monitor/MonitorStep.js +1 -1
  136. package/Types/Monitor/MonitorTemplateSyncField.d.mts +6 -0
  137. package/Types/Monitor/MonitorTemplateSyncField.d.ts +6 -0
  138. package/Types/Monitor/MonitorTemplateSyncField.js +106 -64
  139. package/Types/Monitor/NtpMonitor/NtpMonitorUtil.d.mts +1 -0
  140. package/Types/Monitor/NtpMonitor/NtpMonitorUtil.d.ts +1 -0
  141. package/Types/Monitor/NtpMonitor/NtpMonitorUtil.js +11 -3
  142. package/Types/Monitor/WhoIsTold.d.mts +3 -1
  143. package/Types/Monitor/WhoIsTold.d.ts +3 -1
  144. package/Types/Monitor/WhoIsTold.js +2 -1
  145. package/Types/NotificationRule/PagingLadder.d.mts +137 -0
  146. package/Types/NotificationRule/PagingLadder.d.ts +137 -0
  147. package/Types/NotificationRule/PagingLadder.js +682 -0
  148. package/Types/NotificationRule/PagingLadder.mjs +28 -0
  149. package/Types/NotificationSetting/NotificationEmailRollupCategory.js +1 -1
  150. package/Types/OnCallDutyPolicy/OnCallPageLine.d.mts +26 -0
  151. package/Types/OnCallDutyPolicy/OnCallPageLine.d.ts +26 -0
  152. package/Types/OnCallDutyPolicy/OnCallPageLine.js +136 -0
  153. package/Types/OnCallDutyPolicy/OnCallPageLine.mjs +18 -0
  154. package/Types/OnCallDutyPolicy/OnCallTestPage.d.mts +44 -0
  155. package/Types/OnCallDutyPolicy/OnCallTestPage.d.ts +44 -0
  156. package/Types/OnCallDutyPolicy/OnCallTestPage.js +96 -5
  157. package/Types/OnCallDutyPolicy/OnCallTestPage.mjs +1 -0
  158. package/Types/OnCallDutyPolicy/OnCallTestPageLine.d.mts +19 -0
  159. package/Types/OnCallDutyPolicy/OnCallTestPageLine.d.ts +19 -0
  160. package/Types/OnCallDutyPolicy/OnCallTestPageLine.js +222 -0
  161. package/Types/OnCallDutyPolicy/OnCallTestPageLine.mjs +6 -0
  162. package/Types/OnCallDutyPolicy/ScheduleLayerDefaults.js +5 -2
  163. package/Types/OnCallDutyPolicy/UserOverrideCoverRequest.js +9 -1
  164. package/Types/Permission.d.mts +2 -2
  165. package/Types/Permission.d.ts +2 -2
  166. package/Types/Permission.js +194 -193
  167. package/Types/Product/ProductCatalog.d.mts +10 -0
  168. package/Types/Product/ProductCatalog.d.ts +10 -0
  169. package/Types/Product/ProductCatalog.js +208 -0
  170. package/Types/Product/ProductCatalog.mjs +6 -0
  171. package/Types/Product/ProductOfTable.d.mts +3 -0
  172. package/Types/Product/ProductOfTable.d.ts +3 -0
  173. package/Types/Product/ProductOfTable.js +68 -0
  174. package/Types/Product/ProductOfTable.mjs +3 -0
  175. package/Types/Product/ProjectProductsAnswer.d.mts +3 -0
  176. package/Types/Product/ProjectProductsAnswer.d.ts +3 -0
  177. package/Types/Product/ProjectProductsAnswer.js +35 -2
  178. package/Types/Product/ProjectProductsAnswer.mjs +1 -0
  179. package/Types/Product/ServerProducts.d.mts +65 -0
  180. package/Types/Product/ServerProducts.d.ts +65 -0
  181. package/Types/Product/ServerProducts.js +383 -0
  182. package/Types/Product/ServerProducts.mjs +26 -0
  183. package/Types/Product/ServerProductsAnswer.d.mts +21 -0
  184. package/Types/Product/ServerProductsAnswer.d.ts +21 -0
  185. package/Types/Product/ServerProductsAnswer.js +78 -0
  186. package/Types/Product/ServerProductsAnswer.mjs +5 -0
  187. package/Types/ProductFeedback/ProductFeedback.d.mts +3 -1
  188. package/Types/ProductFeedback/ProductFeedback.d.ts +3 -1
  189. package/Types/ProductFeedback/ProductFeedback.js +8 -0
  190. package/Types/Rum/SessionReplayCustomEvents.d.mts +1 -0
  191. package/Types/Rum/SessionReplayCustomEvents.d.ts +1 -0
  192. package/Types/SampleProject/SampleProject.d.mts +54 -0
  193. package/Types/SampleProject/SampleProject.d.ts +54 -0
  194. package/Types/SampleProject/SampleProject.js +177 -0
  195. package/Types/SampleProject/SampleProject.mjs +22 -0
  196. package/Types/SampleProject/SampleProjectContent.d.mts +127 -0
  197. package/Types/SampleProject/SampleProjectContent.d.ts +127 -0
  198. package/Types/SampleProject/SampleProjectContent.js +397 -0
  199. package/Types/SampleProject/SampleProjectContent.mjs +18 -0
  200. package/Types/Telemetry/TelemetryIngestSurface.js +6 -5
  201. package/Types/Translator.d.mts +1 -0
  202. package/Types/Translator.d.ts +1 -0
  203. package/Types/Translator.js +40 -2
  204. package/Types/Translator.mjs +1 -0
  205. package/Types/UsedBy/UsedBy.d.mts +103 -0
  206. package/Types/UsedBy/UsedBy.d.ts +103 -0
  207. package/Types/UsedBy/UsedBy.js +389 -0
  208. package/Types/UsedBy/UsedBy.mjs +20 -0
  209. package/Types/UsedBy/UsedByServerProducts.d.mts +4 -0
  210. package/Types/UsedBy/UsedByServerProducts.d.ts +4 -0
  211. package/Types/UsedBy/UsedByServerProducts.js +48 -0
  212. package/Types/UsedBy/UsedByServerProducts.mjs +3 -0
  213. package/Types/WelcomeChecklist/WelcomeChecklist.d.mts +6 -0
  214. package/Types/WelcomeChecklist/WelcomeChecklist.d.ts +6 -0
  215. package/Types/WelcomeChecklist/WelcomeChecklist.js +54 -2
  216. package/Types/WelcomeChecklist/WelcomeChecklist.mjs +4 -0
  217. package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.mts +1 -0
  218. package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.ts +1 -0
  219. package/Types/WelcomeChecklist/WelcomeChecklistAnswer.js +3 -0
  220. package/Types/Workflow/PassedOnFields.js +2 -1
  221. package/Types/Workflow/Templates.js +1 -1
  222. package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +2 -0
  223. package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +2 -0
  224. package/Utils/AI/MeaningMatch.d.mts +36 -0
  225. package/Utils/AI/MeaningMatch.d.ts +36 -0
  226. package/Utils/AI/MeaningMatch.js +535 -0
  227. package/Utils/AI/MeaningMatch.mjs +7 -0
  228. package/Utils/ArchivableValues.js +1 -1
  229. package/Utils/AuditLog/AuditLogValues.js +2 -2
  230. package/Utils/Dashboard/ClockWidgetFormat.d.mts +14 -2
  231. package/Utils/Dashboard/ClockWidgetFormat.d.ts +14 -2
  232. package/Utils/Dashboard/ClockWidgetFormat.js +105 -2
  233. package/Utils/Dashboard/DashboardViewConfigSignature.d.mts +3 -0
  234. package/Utils/Dashboard/DashboardViewConfigSignature.d.ts +3 -0
  235. package/Utils/Dashboard/DashboardViewConfigSignature.js +45 -0
  236. package/Utils/Dashboard/DashboardViewConfigSignature.mjs +3 -0
  237. package/Utils/DataSecurity/TextScanner.js +2 -2
  238. package/Utils/DeveloperDocs/AiAssistantExamples.js +4 -4
  239. package/Utils/DeveloperDocs/CliCommands.d.mts +1 -0
  240. package/Utils/DeveloperDocs/CliCommands.d.ts +1 -0
  241. package/Utils/DeveloperDocs/CliCommands.js +2 -1
  242. package/Utils/DeveloperDocs/CliResources.js +2 -1
  243. package/Utils/DeveloperDocs/TerraformSchema.js +3 -1
  244. package/Utils/Markdown/LinkReferenceDefinitions.d.mts +8 -0
  245. package/Utils/Markdown/LinkReferenceDefinitions.d.ts +8 -0
  246. package/Utils/Markdown/LinkReferenceDefinitions.js +1493 -131
  247. package/Utils/Markdown/LinkReferenceDefinitions.mjs +1 -0
  248. package/Utils/Markdown/MarkdownTableCell.js +2 -1
  249. package/Utils/Markdown/OverLongText.js +523 -5
  250. package/Utils/Markdown/SlowMarkdown.d.mts +14 -0
  251. package/Utils/Markdown/SlowMarkdown.d.ts +14 -0
  252. package/Utils/Markdown/SlowMarkdown.js +595 -11
  253. package/Utils/Markdown/SlowMarkdown.mjs +6 -0
  254. package/Utils/ModelApiName.d.mts +11 -0
  255. package/Utils/ModelApiName.d.ts +11 -0
  256. package/Utils/ModelApiName.js +72 -0
  257. package/Utils/ModelApiName.mjs +5 -0
  258. package/Utils/Monitor/DeviceMacLearningUtil.d.mts +2 -1
  259. package/Utils/Monitor/DeviceMacLearningUtil.d.ts +2 -1
  260. package/Utils/Monitor/DeviceMacLearningUtil.js +26 -0
  261. package/Utils/Monitor/EndpointAttachmentUtil.js +8 -3
  262. package/Utils/Monitor/ExternalStatusPageReading.d.mts +3 -0
  263. package/Utils/Monitor/ExternalStatusPageReading.d.ts +3 -0
  264. package/Utils/Monitor/ExternalStatusPageReading.js +35 -1
  265. package/Utils/Monitor/ExternalStatusPageReading.mjs +2 -0
  266. package/Utils/Monitor/MonitorTemplateLinkRefusal.d.mts +9 -0
  267. package/Utils/Monitor/MonitorTemplateLinkRefusal.d.ts +9 -0
  268. package/Utils/Monitor/MonitorTemplateLinkRefusal.js +45 -0
  269. package/Utils/Monitor/MonitorTemplateLinkRefusal.mjs +6 -0
  270. package/Utils/OpenStack/OpenStackCheckName.js +2 -1
  271. package/Utils/OpenStack/OpenStackLogScrub.js +1 -1
  272. package/Utils/OpenStack/OpenStackLogs.js +3 -2
  273. package/Utils/OpenStack/OpenStackTraces.js +2 -1
  274. package/Utils/Project/NotificationChannels.js +5 -5
  275. package/Utils/Project/ProjectBalance.js +2 -2
  276. package/Utils/Project/TwilioAccount.js +2 -2
  277. package/Utils/ScheduledMaintenanceStart.d.mts +3 -0
  278. package/Utils/ScheduledMaintenanceStart.d.ts +3 -0
  279. package/Utils/ScheduledMaintenanceStart.js +9 -0
  280. package/Utils/Schema/ModelSchema.js +10 -1
  281. package/Utils/Uptime/UptimeMaintenanceUtil.js +2 -1
  282. package/Utils/ValueFormatter.d.mts +8 -6
  283. package/Utils/ValueFormatter.d.ts +8 -6
  284. package/Utils/ValueFormatter.js +145 -0
  285. package/package.json +1 -1
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.resolveClockFace = exports.getClockAnalogDialSizeInPx = exports.getClockDigitalFontSizeInPx = exports.getClockTimeWidthInFontUnits = exports.getClockContentBox = exports.getClockCaptionLineCount = exports.CLOCK_SECONDARY_FONT_SCALE = exports.isDaytimeAtClock = exports.getMillisecondsUntilNextClockTick = exports.getClockHandAngles = exports.getClockGmtOffsetText = exports.getClockWidgetDisplay = exports.isClockTimezoneFallback = exports.resolveUse12HourFormat = exports.getClockLabel = exports.getCityFromTimezone = exports.resolveClockTimezone = exports.isSupportedClockTimezone = void 0;
37
37
  const DashboardClockComponent_1 = require("../../Types/Dashboard/DashboardComponents/DashboardClockComponent");
38
38
  const Date_1 = __importStar(require("../../Types/Date"));
39
+ const DateLanguage_1 = require("../../Types/DateLanguage");
39
40
  /**
40
41
  * Every derivation the dashboard Clock widget needs to turn "now" into what
41
42
  * it draws — the digit strings, the caption, the analog hand angles, and how
@@ -116,16 +117,68 @@ const isClockTimezoneFallback = (timezone) => {
116
117
  return !(0, exports.isSupportedClockTimezone)(timezone);
117
118
  };
118
119
  exports.isClockTimezoneFallback = isClockTimezoneFallback;
120
+ /*
121
+ * THE DATE AND THE AM/PM, IN THE READER'S LANGUAGE (#7093).
122
+ *
123
+ * The clock wrote its date and its meridiem with fixed English formats:
124
+ * every board read "Thu, Nov 12" and "PM", and a Persian one drew Latin
125
+ * digits beside Persian words. In another language than English they are
126
+ * Intl's words for it, in the clock's zone and on the Gregorian calendar
127
+ * (getDateLocale): "Do., 12. Nov." and "PM" in German, "پنجشنبه ۱۲ نوامبر"
128
+ * and "ب.ظ." in Persian, "11月12日(木)" and "午後" - before the time - in
129
+ * Japanese. The digits are the ones the Dashboard writes in that language
130
+ * (writeDigitsInLocale): Persian ones in Persian, Latin ones everywhere
131
+ * else, Arabic too. English is written as it always was.
132
+ */
133
+ // The weekday, the month and the day: "Thu, Nov 12".
134
+ const CLOCK_DATE_OPTIONS = {
135
+ weekday: "short",
136
+ month: "short",
137
+ day: "numeric",
138
+ };
139
+ // An hour on a 12-hour clock, for its day period: "9 PM", "午後9時".
140
+ const CLOCK_MERIDIEM_OPTIONS = {
141
+ hour: "numeric",
142
+ hour12: true,
143
+ };
144
+ /*
145
+ * The meridiem the reader's language writes at `date` in `timezone`, and
146
+ * whether it comes before the hour; null when Intl cannot say.
147
+ */
148
+ const getClockMeridiemInLocale = (data) => {
149
+ var _a;
150
+ const format = (0, DateLanguage_1.getDateTimeFormat)({
151
+ locale: data.locale,
152
+ timezones: [data.timezone],
153
+ options: CLOCK_MERIDIEM_OPTIONS,
154
+ });
155
+ if (!format) {
156
+ return null;
157
+ }
158
+ const parts = format.formatToParts(data.date);
159
+ const dayPeriodIndex = parts.findIndex((part) => {
160
+ return part.type === "dayPeriod";
161
+ });
162
+ const hourIndex = parts.findIndex((part) => {
163
+ return part.type === "hour";
164
+ });
165
+ const text = (((_a = parts[dayPeriodIndex]) === null || _a === void 0 ? void 0 : _a.value) || "").trim();
166
+ if (dayPeriodIndex < 0 || !text) {
167
+ return null;
168
+ }
169
+ return { text: text, isFirst: hourIndex >= 0 && dayPeriodIndex < hourIndex };
170
+ };
119
171
  const getClockWidgetDisplay = (data) => {
120
172
  const isFallbackTimezone = (0, exports.isClockTimezoneFallback)(data.timezone);
121
173
  const timezone = (0, exports.resolveClockTimezone)(data.timezone);
122
174
  const use12HourFormat = (0, exports.resolveUse12HourFormat)(data.hourFormat);
123
175
  const zoned = (0, Date_1.Moment)(data.date).tz(timezone);
124
- return {
176
+ const display = {
125
177
  label: (0, exports.getClockLabel)({ label: data.label, timezone: timezone }),
126
178
  time: zoned.format(use12HourFormat ? "h:mm" : "HH:mm"),
127
179
  seconds: data.showSeconds ? zoned.format("ss") : null,
128
180
  meridiem: use12HourFormat ? zoned.format("A") : null,
181
+ isMeridiemFirst: false,
129
182
  dateText: data.showDate ? zoned.format("ddd, MMM D") : null,
130
183
  zoneAbbreviation: data.showTimezoneAbbreviation
131
184
  ? Date_1.default.getZoneAbbrByTimezone(timezone, data.date)
@@ -133,6 +186,38 @@ const getClockWidgetDisplay = (data) => {
133
186
  timezone: timezone,
134
187
  isFallbackTimezone: isFallbackTimezone,
135
188
  };
189
+ if ((0, DateLanguage_1.isEnglishDateLanguage)(data.language)) {
190
+ return display;
191
+ }
192
+ const locale = (0, DateLanguage_1.getDateLocale)(data.language);
193
+ display.time = (0, DateLanguage_1.writeDigitsInLocale)(display.time, locale);
194
+ display.seconds =
195
+ display.seconds === null
196
+ ? null
197
+ : (0, DateLanguage_1.writeDigitsInLocale)(display.seconds, locale);
198
+ if (use12HourFormat) {
199
+ const meridiem = getClockMeridiemInLocale({
200
+ date: data.date,
201
+ timezone: timezone,
202
+ locale: locale,
203
+ });
204
+ // Where Intl has no words for it, the English ones, as before.
205
+ if (meridiem) {
206
+ display.meridiem = meridiem.text;
207
+ display.isMeridiemFirst = meridiem.isFirst;
208
+ }
209
+ }
210
+ if (data.showDate) {
211
+ const dateFormat = (0, DateLanguage_1.getDateTimeFormat)({
212
+ locale: locale,
213
+ timezones: [timezone],
214
+ options: CLOCK_DATE_OPTIONS,
215
+ });
216
+ if (dateFormat) {
217
+ display.dateText = dateFormat.format(data.date);
218
+ }
219
+ }
220
+ return display;
136
221
  };
137
222
  exports.getClockWidgetDisplay = getClockWidgetDisplay;
138
223
  const getClockGmtOffsetText = (data) => {
@@ -193,6 +278,24 @@ exports.isDaytimeAtClock = isDaytimeAtClock;
193
278
  exports.CLOCK_SECONDARY_FONT_SCALE = 0.45;
194
279
  /** Advance width of one tabular-numeral, as a fraction of the font size. */
195
280
  const TABULAR_DIGIT_WIDTH_RATIO = 0.62;
281
+ /*
282
+ * A character set as wide as it is tall - Chinese, Japanese and Korean,
283
+ * and the full-width forms - in a meridiem: "午後", "오후", "下午".
284
+ */
285
+ const FULL_WIDTH_CHARACTER = /[\u1100-\u115f\u2e80-\ua4cf\uac00-\ud7a3\uf900-\ufaff\ufe30-\ufe4f\uff00-\uff60\uffe0-\uffe6]/;
286
+ /*
287
+ * How many digit widths `text` takes: one for each character, and a
288
+ * full-width one's own width (an em) for each of those.
289
+ */
290
+ const getWidthInDigits = (text) => {
291
+ let width = 0;
292
+ for (const character of text) {
293
+ width += FULL_WIDTH_CHARACTER.test(character)
294
+ ? 1 / TABULAR_DIGIT_WIDTH_RATIO
295
+ : 1;
296
+ }
297
+ return width;
298
+ };
196
299
  /** Vertical space one secondary line (label / date / zone) occupies. */
197
300
  const SECONDARY_LINE_HEIGHT_IN_PX = 16;
198
301
  /** The `gap-1` the renderer puts between every stacked row. */
@@ -244,7 +347,7 @@ const getClockTimeWidthInFontUnits = (display) => {
244
347
  ? (display.seconds.length + 1) * exports.CLOCK_SECONDARY_FONT_SCALE
245
348
  : 0;
246
349
  const meridiemChars = display.meridiem
247
- ? (display.meridiem.length + 1) * exports.CLOCK_SECONDARY_FONT_SCALE
350
+ ? (getWidthInDigits(display.meridiem) + 1) * exports.CLOCK_SECONDARY_FONT_SCALE
248
351
  : 0;
249
352
  return ((display.time.length + secondsChars + meridiemChars) *
250
353
  TABULAR_DIGIT_WIDTH_RATIO);
@@ -0,0 +1,3 @@
1
+ import DashboardViewConfig from "../../Types/Dashboard/DashboardViewConfig.mjs";
2
+ export declare const getDashboardViewConfigSignature: (config: DashboardViewConfig) => string;
3
+ export declare const isSameDashboardViewConfig: (first: DashboardViewConfig, second: DashboardViewConfig) => boolean;
@@ -0,0 +1,3 @@
1
+ import DashboardViewConfig from "../../Types/Dashboard/DashboardViewConfig";
2
+ export declare const getDashboardViewConfigSignature: (config: DashboardViewConfig) => string;
3
+ export declare const isSameDashboardViewConfig: (first: DashboardViewConfig, second: DashboardViewConfig) => boolean;
@@ -0,0 +1,45 @@
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.isSameDashboardViewConfig = exports.getDashboardViewConfigSignature = void 0;
7
+ const JSONFunctions_1 = __importDefault(require("../../Types/JSONFunctions"));
8
+ const StableStringify_1 = __importDefault(require("../StableStringify"));
9
+ /*
10
+ * A dashboard's board as Save Changes writes it, in one string: the words
11
+ * the request carries (JSONFunctions.serializeValue, then JSON), with every
12
+ * object's keys sorted and a key left undefined left out.
13
+ *
14
+ * The same board gives the same string however its objects were built - a
15
+ * widget handed back by its settings unchanged, a key spread into a copy in
16
+ * another order, an id as a class or as the JSON it is sent as. Any change
17
+ * Save would write gives another: a widget added, moved, resized, removed
18
+ * or set up differently, a variable, the default time range or
19
+ * auto-refresh, the board's height.
20
+ *
21
+ * No variables at all and an empty list of them are one board: the
22
+ * Variables dialog's Save writes the list, empty for a board that has none,
23
+ * and a board that never had one has no list.
24
+ *
25
+ * The dashboard compares the board with the one editing started from, so a
26
+ * board opened for editing and left as it was holds nothing unsaved.
27
+ */
28
+ const getDashboardViewConfigSignature = (config) => {
29
+ const asSent = JSON.stringify(JSONFunctions_1.default.serializeValue(config));
30
+ const board = asSent === undefined ? null : JSON.parse(asSent);
31
+ if (board &&
32
+ typeof board === "object" &&
33
+ !Array.isArray(board) &&
34
+ Array.isArray(board.variables) &&
35
+ board.variables.length === 0) {
36
+ delete board.variables;
37
+ }
38
+ return (0, StableStringify_1.default)(board);
39
+ };
40
+ exports.getDashboardViewConfigSignature = getDashboardViewConfigSignature;
41
+ const isSameDashboardViewConfig = (first, second) => {
42
+ return ((0, exports.getDashboardViewConfigSignature)(first) ===
43
+ (0, exports.getDashboardViewConfigSignature)(second));
44
+ };
45
+ exports.isSameDashboardViewConfig = isSameDashboardViewConfig;
@@ -0,0 +1,3 @@
1
+ import commonJsModule from "./DashboardViewConfigSignature.js";
2
+ export const getDashboardViewConfigSignature = commonJsModule.getDashboardViewConfigSignature;
3
+ export const isSameDashboardViewConfig = commonJsModule.isSameDashboardViewConfig;
@@ -56,8 +56,8 @@ const Index_1 = __importDefault(require("./Detectors/Index"));
56
56
  * wherever it sits, and a match is kept only by the window it starts in, so
57
57
  * none is counted twice. Windows bound what one regular expression sees,
58
58
  * which keeps V8's backtracking shallow however long the text is
59
- * (AGENTS.md, "Megabyte-long values"), and MAX_SCANNED_TEXT_LENGTH bounds
60
- * the work one value can ask for.
59
+ * (Docs/notifications/README.md, "Megabyte-long values"), and
60
+ * MAX_SCANNED_TEXT_LENGTH bounds the work one value can ask for.
61
61
  */
62
62
  exports.WINDOW_SIZE = 65536;
63
63
  exports.WINDOW_OVERLAP = 4096;
@@ -10,6 +10,7 @@ exports.describeResourceForPrompt = describeResourceForPrompt;
10
10
  exports.getAssistantPrompts = getAssistantPrompts;
11
11
  const ExampleValues_1 = require("./ExampleValues");
12
12
  const TerraformSchema_1 = require("./TerraformSchema");
13
+ const ModelApiName_1 = require("../ModelApiName");
13
14
  /*
14
15
  * The MCP server's tool-name rule (MCP/Tools/SchemaConverter.ts
15
16
  * sanitizeToolName): "On-Call Policy" -> on_call_policy.
@@ -33,10 +34,9 @@ function getMcpToolNames(modelType) {
33
34
  return null;
34
35
  }
35
36
  const model = new modelType();
36
- const singularName = model.singularName || model.tableName || "";
37
- const pluralName = model.pluralName || `${singularName}s`;
38
- const singular = sanitizeMcpToolName(singularName);
39
- const plural = sanitizeMcpToolName(pluralName);
37
+ // By the names the API keeps: a model renamed on screen keeps its tools.
38
+ const singular = sanitizeMcpToolName((0, ModelApiName_1.getApiSingularName)(model));
39
+ const plural = sanitizeMcpToolName((0, ModelApiName_1.getApiPluralName)(model));
40
40
  return {
41
41
  create: `create_${singular}`,
42
42
  get: `get_${singular}`,
@@ -32,6 +32,7 @@ export declare function toCliCommandName(singularName: string): string;
32
32
  export declare function getCliResourceName(model: {
33
33
  tableName: string | null | undefined;
34
34
  singularName: string | null | undefined;
35
+ apiSingularName?: string | null | undefined;
35
36
  }): string;
36
37
  export declare function toCliFlag(columnName: string): string;
37
38
  export declare function toCommanderAttributeName(flag: string): string;
@@ -32,6 +32,7 @@ export declare function toCliCommandName(singularName: string): string;
32
32
  export declare function getCliResourceName(model: {
33
33
  tableName: string | null | undefined;
34
34
  singularName: string | null | undefined;
35
+ apiSingularName?: string | null | undefined;
35
36
  }): string;
36
37
  export declare function toCliFlag(columnName: string): string;
37
38
  export declare function toCommanderAttributeName(flag: string): string;
@@ -47,6 +47,7 @@ const HeldPermissions_1 = require("../../Types/HeldPermissions");
47
47
  const ObjectID_1 = __importDefault(require("../../Types/ObjectID"));
48
48
  const StateOrder_1 = require("../StateOrder");
49
49
  const ClientResourceNames_1 = require("./ClientResourceNames");
50
+ const ModelApiName_1 = require("../ModelApiName");
50
51
  const PeopleByEmail_1 = require("./PeopleByEmail");
51
52
  const TerraformSchema_1 = require("./TerraformSchema");
52
53
  /*
@@ -156,7 +157,7 @@ function toCliCommandName(singularName) {
156
157
  */
157
158
  function getCliResourceName(model) {
158
159
  const tableName = model.tableName || "";
159
- return toCliCommandName((0, ClientResourceNames_1.getClientResourceName)(tableName, model.singularName || tableName));
160
+ return toCliCommandName((0, ClientResourceNames_1.getClientResourceName)(tableName, (0, ModelApiName_1.getApiSingularName)(model) || tableName));
160
161
  }
161
162
  // A field's flag: incidentSeverityId -> --incident-severity-id.
162
163
  function toCliFlag(columnName) {
@@ -40,7 +40,8 @@ function databaseResource(modelType, taken) {
40
40
  const tableName = model.tableName || modelType.name;
41
41
  const singularName = model.singularName || tableName;
42
42
  return {
43
- name: uniqueName({ tableName, singularName }, taken),
43
+ // The command keeps the name the API keeps; its help says the new one.
44
+ name: uniqueName({ tableName, singularName, apiSingularName: model.apiSingularName }, taken),
44
45
  singularName,
45
46
  pluralName: model.pluralName || `${singularName}s`,
46
47
  tableName,
@@ -24,6 +24,7 @@ const TableColumnType_1 = __importDefault(require("../../Types/Database/TableCol
24
24
  const Permission_1 = __importDefault(require("../../Types/Permission"));
25
25
  const PeopleByEmail_1 = require("./PeopleByEmail");
26
26
  const TerraformValues_1 = require("./TerraformValues");
27
+ const ModelApiName_1 = require("../ModelApiName");
27
28
  /*
28
29
  * What the OneUptime Terraform provider makes of a model, worked out in the
29
30
  * browser from the same metadata the provider is generated from.
@@ -265,7 +266,8 @@ function getTerraformTypeName(modelType) {
265
266
  return null;
266
267
  }
267
268
  const model = new modelType();
268
- const name = (0, ClientResourceNames_1.getClientResourceName)(model.tableName || "", model.singularName || model.tableName || "");
269
+ // By the name the API keeps: a model renamed on screen keeps its resource.
270
+ const name = (0, ClientResourceNames_1.getClientResourceName)(model.tableName || "", (0, ModelApiName_1.getApiSingularName)(model));
269
271
  return `oneuptime_${toTerraformTypeSnakeCase(name)}`;
270
272
  }
271
273
  function getKindForColumn(column) {
@@ -1,3 +1,9 @@
1
+ export interface NestedLinkReferenceDefinition {
2
+ text: string;
3
+ labelStart: number;
4
+ labelEnd: number;
5
+ destinationEnd: number;
6
+ }
1
7
  export interface LinkReferenceDefinition {
2
8
  start: number;
3
9
  labelStart: number;
@@ -6,7 +12,9 @@ export interface LinkReferenceDefinition {
6
12
  destinationStart: number;
7
13
  destinationEnd: number;
8
14
  end: number;
15
+ nested?: NestedLinkReferenceDefinition;
9
16
  }
17
+ export declare const MAX_DEFINITION_NESTING_DEPTH: number;
10
18
  export declare const normalizeLinkLabel: (label: string) => string;
11
19
  export declare const getLinkReferenceDefinitions: (text: string) => Array<LinkReferenceDefinition>;
12
20
  export declare const forEachBracketedLabel: (text: string, start: number, end: number, found: (label: string) => void) => void;
@@ -1,3 +1,9 @@
1
+ export interface NestedLinkReferenceDefinition {
2
+ text: string;
3
+ labelStart: number;
4
+ labelEnd: number;
5
+ destinationEnd: number;
6
+ }
1
7
  export interface LinkReferenceDefinition {
2
8
  start: number;
3
9
  labelStart: number;
@@ -6,7 +12,9 @@ export interface LinkReferenceDefinition {
6
12
  destinationStart: number;
7
13
  destinationEnd: number;
8
14
  end: number;
15
+ nested?: NestedLinkReferenceDefinition;
9
16
  }
17
+ export declare const MAX_DEFINITION_NESTING_DEPTH: number;
10
18
  export declare const normalizeLinkLabel: (label: string) => string;
11
19
  export declare const getLinkReferenceDefinitions: (text: string) => Array<LinkReferenceDefinition>;
12
20
  export declare const forEachBracketedLabel: (text: string, start: number, end: number, found: (label: string) => void) => void;