@oneuptime/common 14.1.0 → 14.2.0

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 (249) hide show
  1. package/Models/DatabaseModels/Alert.d.mts +1 -0
  2. package/Models/DatabaseModels/Alert.d.ts +1 -0
  3. package/Models/DatabaseModels/Alert.js +34 -0
  4. package/Models/DatabaseModels/AutoRemediationSuggestion.d.mts +2 -0
  5. package/Models/DatabaseModels/AutoRemediationSuggestion.d.ts +2 -0
  6. package/Models/DatabaseModels/AutoRemediationSuggestion.js +62 -0
  7. package/Models/DatabaseModels/Incident.d.mts +1 -0
  8. package/Models/DatabaseModels/Incident.d.ts +1 -0
  9. package/Models/DatabaseModels/Incident.js +35 -0
  10. package/Models/DatabaseModels/IncidentPostmortemActionItem.d.mts +31 -0
  11. package/Models/DatabaseModels/IncidentPostmortemActionItem.d.ts +31 -0
  12. package/Models/DatabaseModels/IncidentPostmortemActionItem.js +591 -0
  13. package/Models/DatabaseModels/IncidentPostmortemActionItem.mjs +3 -0
  14. package/Models/DatabaseModels/Index.js +2 -0
  15. package/Models/DatabaseModels/TelemetryIngestionKey.js +1 -1
  16. package/Types/AI/AIActionWords.d.mts +3 -1
  17. package/Types/AI/AIActionWords.d.ts +3 -1
  18. package/Types/AI/AIActionWords.js +70 -1
  19. package/Types/AI/AIActionWords.mjs +2 -0
  20. package/Types/AI/AIChatTypes.d.mts +2 -1
  21. package/Types/AI/AIChatTypes.d.ts +2 -1
  22. package/Types/AI/AIReadTableWords.d.mts +192 -0
  23. package/Types/AI/AIReadTableWords.d.ts +192 -0
  24. package/Types/AI/AIReadTableWords.js +368 -0
  25. package/Types/AI/AIReadTableWords.mjs +18 -0
  26. package/Types/AI/AiRunRefusal.d.mts +3 -0
  27. package/Types/AI/AiRunRefusal.d.ts +3 -0
  28. package/Types/AI/AiRunRefusal.js +22 -1
  29. package/Types/AI/ResourceAiAccessPermissions.js +7 -18
  30. package/Types/AuditLog/AuditLogActionLabel.js +19 -9
  31. package/Types/BaseDatabase/AggregationIntervalUtil.d.mts +16 -0
  32. package/Types/BaseDatabase/AggregationIntervalUtil.d.ts +16 -0
  33. package/Types/BaseDatabase/AggregationIntervalUtil.js +123 -16
  34. package/Types/Cloud/CloudResourceHealth.d.mts +30 -1
  35. package/Types/Cloud/CloudResourceHealth.d.ts +30 -1
  36. package/Types/Cloud/CloudResourceHealth.js +405 -13
  37. package/Types/Cloud/CloudResourceHealth.mjs +28 -0
  38. package/Types/DataObservability/DataCheckRefusals.d.mts +32 -0
  39. package/Types/DataObservability/DataCheckRefusals.d.ts +32 -0
  40. package/Types/DataObservability/DataCheckRefusals.js +77 -0
  41. package/Types/DataObservability/DataCheckRefusals.mjs +8 -0
  42. package/Types/Database/AccessControl/PermissionScopeNarrowing.js +4 -0
  43. package/Types/Date.d.mts +2 -0
  44. package/Types/Date.d.ts +2 -0
  45. package/Types/Date.js +22 -0
  46. package/Types/DateLanguage.d.mts +2 -0
  47. package/Types/DateLanguage.d.ts +2 -0
  48. package/Types/DateLanguage.js +8 -5
  49. package/Types/Email/EmailTemplateType.d.mts +1 -0
  50. package/Types/Email/EmailTemplateType.d.ts +1 -0
  51. package/Types/Email/EmailTemplateType.js +2 -0
  52. package/Types/Exception/EgressGuardException.js +1 -1
  53. package/Types/Exception/ErrorMessageRule.d.mts +1 -0
  54. package/Types/Exception/ErrorMessageRule.d.ts +1 -0
  55. package/Types/Exception/ErrorMessageRule.js +67 -13
  56. package/Types/Exception/ErrorMessageRule.mjs +1 -0
  57. package/Types/Exception/ExceptionMessages.d.mts +2 -0
  58. package/Types/Exception/ExceptionMessages.d.ts +2 -0
  59. package/Types/Exception/ExceptionMessages.js +2 -0
  60. package/Types/Incident/PostmortemActionItemStatus.d.mts +17 -0
  61. package/Types/Incident/PostmortemActionItemStatus.d.ts +17 -0
  62. package/Types/Incident/PostmortemActionItemStatus.js +74 -0
  63. package/Types/Incident/PostmortemActionItemStatus.mjs +5 -0
  64. package/Types/JSONFunctions.js +10 -3
  65. package/Types/Link.d.mts +1 -0
  66. package/Types/Link.d.ts +1 -0
  67. package/Types/MeaningKeys.d.mts +4 -0
  68. package/Types/MeaningKeys.d.ts +4 -0
  69. package/Types/MeaningKeys.js +74 -0
  70. package/Types/MeaningKeys.mjs +5 -0
  71. package/Types/Monitor/WhoIsTold.d.mts +3 -0
  72. package/Types/Monitor/WhoIsTold.d.ts +3 -0
  73. package/Types/Monitor/WhoIsTold.js +63 -13
  74. package/Types/NoBreakSpaces.d.mts +16 -0
  75. package/Types/NoBreakSpaces.d.ts +16 -0
  76. package/Types/NoBreakSpaces.js +419 -0
  77. package/Types/NoBreakSpaces.mjs +9 -0
  78. package/Types/NotificationRule/PagingLadder.d.mts +12 -0
  79. package/Types/NotificationRule/PagingLadder.d.ts +12 -0
  80. package/Types/NotificationRule/PagingLadder.js +159 -11
  81. package/Types/NotificationRule/PagingLadder.mjs +3 -0
  82. package/Types/OnCallDutyPolicy/OnCallPageRecordGone.d.mts +3 -0
  83. package/Types/OnCallDutyPolicy/OnCallPageRecordGone.d.ts +3 -0
  84. package/Types/OnCallDutyPolicy/OnCallPageRecordGone.js +42 -0
  85. package/Types/OnCallDutyPolicy/OnCallPageRecordGone.mjs +4 -0
  86. package/Types/OnCallDutyPolicy/OnCallPageWords.d.mts +6 -2
  87. package/Types/OnCallDutyPolicy/OnCallPageWords.d.ts +6 -2
  88. package/Types/OnCallDutyPolicy/OnCallPageWords.js +21 -20
  89. package/Types/OnCallDutyPolicy/OnCallPersonPage.d.mts +4 -0
  90. package/Types/OnCallDutyPolicy/OnCallPersonPage.d.ts +4 -0
  91. package/Types/OnCallDutyPolicy/OnCallPersonPage.js +125 -1
  92. package/Types/OnCallDutyPolicy/OnCallPersonPage.mjs +1 -0
  93. package/Types/OnCallDutyPolicy/OnCallTestPage.d.mts +2 -0
  94. package/Types/OnCallDutyPolicy/OnCallTestPage.d.ts +2 -0
  95. package/Types/OnCallDutyPolicy/OnCallTestPage.js +12 -0
  96. package/Types/OnCallDutyPolicy/OnCallTestPage.mjs +1 -0
  97. package/Types/OpenStack/OpenStackCapacity.js +12 -5
  98. package/Types/Permission.d.mts +4 -0
  99. package/Types/Permission.d.ts +4 -0
  100. package/Types/Permission.js +64 -8
  101. package/Types/Product/ProductUsage.js +2 -1
  102. package/Types/Product/ProjectProductsAnswer.js +2 -1
  103. package/Types/ResourceAiAgent/AiResourceType.d.mts +1 -0
  104. package/Types/ResourceAiAgent/AiResourceType.d.ts +1 -0
  105. package/Types/ResourceAiAgent/AiResourceType.js +12 -0
  106. package/Types/Rum/ProductAnalyticsEventReads.js +10 -1
  107. package/Types/Rum/ProductAnalyticsEvents.js +13 -1
  108. package/Types/Rum/SessionReplayCustomEvents.d.mts +4 -1
  109. package/Types/Rum/SessionReplayCustomEvents.d.ts +4 -1
  110. package/Types/Rum/SessionReplayCustomEvents.js +12 -0
  111. package/Types/Rum/SessionReplayCustomEvents.mjs +1 -0
  112. package/Types/SetupHealth/SetupHealth.d.mts +1 -0
  113. package/Types/SetupHealth/SetupHealth.d.ts +1 -0
  114. package/Types/SetupHealth/SetupHealth.js +13 -5
  115. package/Types/StatusPage/DefaultStatusNames.d.mts +11 -3
  116. package/Types/StatusPage/DefaultStatusNames.d.ts +11 -3
  117. package/Types/StatusPage/DefaultStatusNames.js +74 -28
  118. package/Types/StatusPage/DefaultStatusNames.mjs +9 -2
  119. package/Types/StatusPage/StateChangeNoteMessage.d.mts +3 -2
  120. package/Types/StatusPage/StateChangeNoteMessage.d.ts +3 -2
  121. package/Types/StatusPage/StateChangeNoteMessage.js +16 -13
  122. package/Types/Telemetry/TelemetryIngestionKeyType.js +7 -6
  123. package/Types/Translator.d.mts +1 -0
  124. package/Types/Translator.d.ts +1 -0
  125. package/Types/Translator.js +100 -19
  126. package/Types/Translator.mjs +1 -0
  127. package/Types/UserSession/SessionLength.d.mts +33 -0
  128. package/Types/UserSession/SessionLength.d.ts +33 -0
  129. package/Types/UserSession/SessionLength.js +134 -5
  130. package/Types/UserSession/SessionLength.mjs +5 -0
  131. package/Types/Workflow/WorkflowStatus.js +21 -10
  132. package/Utils/AI/InvestigationReport.js +2 -2
  133. package/Utils/API.d.mts +0 -11
  134. package/Utils/API.d.ts +0 -11
  135. package/Utils/API.js +0 -432
  136. package/Utils/AiRemediation/Resource/ResourceCommandPolicy.js +2 -2
  137. package/Utils/AiRemediation/VerifiedFixRunbook.d.mts +39 -0
  138. package/Utils/AiRemediation/VerifiedFixRunbook.d.ts +39 -0
  139. package/Utils/AiRemediation/VerifiedFixRunbook.js +231 -0
  140. package/Utils/AiRemediation/VerifiedFixRunbook.mjs +10 -0
  141. package/Utils/Dashboard/DashboardWidgetSorts.js +11 -2
  142. package/Utils/Dashboard/MonitorListWidgetFormat.d.mts +2 -1
  143. package/Utils/Dashboard/MonitorListWidgetFormat.d.ts +2 -1
  144. package/Utils/Dashboard/MonitorListWidgetFormat.js +5 -3
  145. package/Utils/DefaultRecordNames.d.mts +6 -0
  146. package/Utils/DefaultRecordNames.d.ts +6 -0
  147. package/Utils/DefaultRecordNames.js +122 -0
  148. package/Utils/DefaultRecordNames.mjs +6 -0
  149. package/Utils/Grok/Grok.js +7 -4
  150. package/Utils/Incident/PostmortemActionItemCodeTask.d.mts +20 -0
  151. package/Utils/Incident/PostmortemActionItemCodeTask.d.ts +20 -0
  152. package/Utils/Incident/PostmortemActionItemCodeTask.js +107 -0
  153. package/Utils/Incident/PostmortemActionItemCodeTask.mjs +10 -0
  154. package/Utils/Incident/PostmortemActionItemMarkdown.d.mts +39 -0
  155. package/Utils/Incident/PostmortemActionItemMarkdown.d.ts +39 -0
  156. package/Utils/Incident/PostmortemActionItemMarkdown.js +118 -0
  157. package/Utils/Incident/PostmortemActionItemMarkdown.mjs +12 -0
  158. package/Utils/Incident/PostmortemNoteActionItems.d.mts +29 -0
  159. package/Utils/Incident/PostmortemNoteActionItems.d.ts +29 -0
  160. package/Utils/Incident/PostmortemNoteActionItems.js +544 -0
  161. package/Utils/Incident/PostmortemNoteActionItems.mjs +7 -0
  162. package/Utils/LookupTable.d.mts +3 -0
  163. package/Utils/LookupTable.d.ts +3 -0
  164. package/Utils/LookupTable.js +61 -0
  165. package/Utils/LookupTable.mjs +3 -0
  166. package/Utils/Markdown/LinkReferenceDefinitions.d.mts +2 -0
  167. package/Utils/Markdown/LinkReferenceDefinitions.d.ts +2 -0
  168. package/Utils/Markdown/LinkReferenceDefinitions.js +101 -1
  169. package/Utils/Markdown/LinkReferenceDefinitions.mjs +2 -0
  170. package/Utils/Markdown/OverLongText.js +296 -2
  171. package/Utils/Markdown/SlowMarkdown.d.mts +1 -0
  172. package/Utils/Markdown/SlowMarkdown.d.ts +1 -0
  173. package/Utils/Markdown/SlowMarkdown.js +354 -4
  174. package/Utils/Markdown/SlowMarkdown.mjs +1 -0
  175. package/Utils/Metrics/MetricFormulaEvaluator.js +10 -4
  176. package/Utils/Metrics/MetricSeriesFingerprint.js +13 -4
  177. package/Utils/Metrics/MetricSeriesScope.d.mts +5 -0
  178. package/Utils/Metrics/MetricSeriesScope.d.ts +5 -0
  179. package/Utils/Metrics/MetricSeriesScope.js +5 -1
  180. package/Utils/Monitor/MonitorRootCauseWording.d.mts +3 -0
  181. package/Utils/Monitor/MonitorRootCauseWording.d.ts +3 -0
  182. package/Utils/Monitor/MonitorRootCauseWording.js +100 -11
  183. package/Utils/Monitor/ProbeAgreementRule.d.mts +10 -0
  184. package/Utils/Monitor/ProbeAgreementRule.d.ts +10 -0
  185. package/Utils/Monitor/ProbeAgreementRule.js +58 -0
  186. package/Utils/Monitor/ProbeAgreementRule.mjs +3 -0
  187. package/Utils/Monitor/ProbeFailureReading.d.mts +4 -0
  188. package/Utils/Monitor/ProbeFailureReading.d.ts +4 -0
  189. package/Utils/Monitor/ProbeFailureReading.js +30 -1
  190. package/Utils/Monitor/ProbeFailureReading.mjs +1 -0
  191. package/Utils/Monitor/RequestFailureDescriptions.d.mts +61 -0
  192. package/Utils/Monitor/RequestFailureDescriptions.d.ts +61 -0
  193. package/Utils/Monitor/RequestFailureDescriptions.js +252 -0
  194. package/Utils/Monitor/RequestFailureDescriptions.mjs +6 -0
  195. package/Utils/PromQL/PromQLEngine.js +18 -9
  196. package/Utils/PromQL/PromQLFunctionEvaluators.js +114 -58
  197. package/Utils/PromQL/PromQLLabelOrder.d.mts +8 -0
  198. package/Utils/PromQL/PromQLLabelOrder.d.ts +8 -0
  199. package/Utils/PromQL/PromQLLabelOrder.js +212 -0
  200. package/Utils/PromQL/PromQLLabelOrder.mjs +6 -0
  201. package/Utils/PromQL/PromQLLabels.js +4 -3
  202. package/Utils/PromQL/PromQLMetricNames.js +8 -2
  203. package/Utils/PromQL/PromQLParser.js +11 -6
  204. package/Utils/PromQL/PromQLRegex.d.mts +11 -0
  205. package/Utils/PromQL/PromQLRegex.d.ts +11 -0
  206. package/Utils/PromQL/PromQLRegex.js +990 -50
  207. package/Utils/PromQL/PromQLRegex.mjs +3 -0
  208. package/Utils/PromQL/PrometheusResponse.js +3 -1
  209. package/Utils/PromQL/RE2CharacterClass.d.mts +24 -0
  210. package/Utils/PromQL/RE2CharacterClass.d.ts +24 -0
  211. package/Utils/PromQL/RE2CharacterClass.js +532 -0
  212. package/Utils/PromQL/RE2CharacterClass.mjs +16 -0
  213. package/Utils/RequestFailedDetailsUtil.d.mts +15 -0
  214. package/Utils/RequestFailedDetailsUtil.d.ts +15 -0
  215. package/Utils/RequestFailedDetailsUtil.js +452 -0
  216. package/Utils/RequestFailedDetailsUtil.mjs +2 -0
  217. package/Utils/Rum/UrlScrubber.d.mts +1 -1
  218. package/Utils/Rum/UrlScrubber.d.ts +1 -1
  219. package/Utils/Rum/UrlScrubber.js +10 -4
  220. package/Utils/Rum/UserFlow.js +22 -4
  221. package/Utils/SecurityCase/SecurityOverviewMetrics.d.mts +11 -1
  222. package/Utils/SecurityCase/SecurityOverviewMetrics.d.ts +11 -1
  223. package/Utils/SecurityCase/SecurityOverviewMetrics.js +99 -17
  224. package/Utils/SecurityCase/SecurityOverviewMetrics.mjs +3 -0
  225. package/Utils/Sms/OnCallPageSms.d.mts +2 -0
  226. package/Utils/Sms/OnCallPageSms.d.ts +2 -0
  227. package/Utils/Sms/OnCallPageSms.js +3 -1
  228. package/Utils/StateListType.d.mts +11 -0
  229. package/Utils/StateListType.d.ts +11 -0
  230. package/Utils/StateListType.js +21 -0
  231. package/Utils/StateListType.mjs +2 -0
  232. package/Utils/StateOrder.d.mts +8 -11
  233. package/Utils/StateOrder.d.ts +8 -11
  234. package/Utils/StateOrder.js +49 -84
  235. package/Utils/StateOrder.mjs +2 -0
  236. package/Utils/Suggestions/ActionItemCodeTaskSuggestion.d.mts +9 -0
  237. package/Utils/Suggestions/ActionItemCodeTaskSuggestion.d.ts +9 -0
  238. package/Utils/Suggestions/ActionItemCodeTaskSuggestion.js +25 -0
  239. package/Utils/Suggestions/ActionItemCodeTaskSuggestion.mjs +2 -0
  240. package/Utils/Suggestions/VerifiedFixRunbookSuggestion.d.mts +5 -0
  241. package/Utils/Suggestions/VerifiedFixRunbookSuggestion.d.ts +5 -0
  242. package/Utils/Suggestions/VerifiedFixRunbookSuggestion.js +39 -0
  243. package/Utils/Suggestions/VerifiedFixRunbookSuggestion.mjs +2 -0
  244. package/Utils/Syslog/SyslogMessageParser.js +16 -6
  245. package/Utils/Telemetry/HeartbeatAvailability.js +16 -21
  246. package/Utils/ValueFormatter.d.mts +1 -0
  247. package/Utils/ValueFormatter.d.ts +1 -0
  248. package/Utils/ValueFormatter.js +258 -18
  249. package/package.json +1 -1
@@ -2,6 +2,7 @@ import NotificationRuleType from "../NotificationRule/NotificationRuleType.mjs";
2
2
  import UserNotificationEventType from "../UserNotification/UserNotificationEventType.mjs";
3
3
  import UserNotificationStatus from "../UserNotification/UserNotificationStatus.mjs";
4
4
  import { OnCallPageChannel } from "./OnCallPageChannel.mjs";
5
+ import { StateListType } from "../../Utils/StateOrder.mjs";
5
6
  export declare enum OnCallTestPageRecordKind {
6
7
  Incident = "Incident",
7
8
  Alert = "Alert"
@@ -9,6 +10,7 @@ export declare enum OnCallTestPageRecordKind {
9
10
  export declare const ON_CALL_TEST_PAGE_RECORD_KINDS: ReadonlyArray<OnCallTestPageRecordKind>;
10
11
  export declare function isOnCallTestPageRecordKind(value: unknown): value is OnCallTestPageRecordKind;
11
12
  export declare function getOnCallTestPageRuleType(kind: OnCallTestPageRecordKind): NotificationRuleType;
13
+ export declare function getOnCallTestPageSeverityList(kind: OnCallTestPageRecordKind): StateListType.IncidentSeverity | StateListType.AlertSeverity;
12
14
  export interface OnCallTestPageRun {
13
15
  userNotificationEventType?: UserNotificationEventType | string | null;
14
16
  }
@@ -2,6 +2,7 @@ import NotificationRuleType from "../NotificationRule/NotificationRuleType";
2
2
  import UserNotificationEventType from "../UserNotification/UserNotificationEventType";
3
3
  import UserNotificationStatus from "../UserNotification/UserNotificationStatus";
4
4
  import { OnCallPageChannel } from "./OnCallPageChannel";
5
+ import { StateListType } from "../../Utils/StateOrder";
5
6
  export declare enum OnCallTestPageRecordKind {
6
7
  Incident = "Incident",
7
8
  Alert = "Alert"
@@ -9,6 +10,7 @@ export declare enum OnCallTestPageRecordKind {
9
10
  export declare const ON_CALL_TEST_PAGE_RECORD_KINDS: ReadonlyArray<OnCallTestPageRecordKind>;
10
11
  export declare function isOnCallTestPageRecordKind(value: unknown): value is OnCallTestPageRecordKind;
11
12
  export declare function getOnCallTestPageRuleType(kind: OnCallTestPageRecordKind): NotificationRuleType;
13
+ export declare function getOnCallTestPageSeverityList(kind: OnCallTestPageRecordKind): StateListType.IncidentSeverity | StateListType.AlertSeverity;
12
14
  export interface OnCallTestPageRun {
13
15
  userNotificationEventType?: UserNotificationEventType | string | null;
14
16
  }
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.OnCallTestPageNotPagedCode = exports.OnCallTestPageWarningCode = exports.OnCallTestPageReachedThroughCode = exports.OnCallTestPageStepStatus = exports.OnCallTestPageLineCode = exports.OnCallTestPageFix = exports.OnCallTestPageDeliveryStatus = exports.OnCallTestPageStatus = exports.OnCallTestPageKind = exports.ON_CALL_TEST_PAGE_NOTIFICATION_ACKNOWLEDGED_MESSAGE = exports.ON_CALL_TEST_PAGE_ANSWERED_MESSAGE = exports.ON_CALL_TEST_PAGE_ANSWERED_TITLE = exports.ON_CALL_TEST_PAGE_ACKNOWLEDGE_MESSAGE = exports.ON_CALL_TEST_PAGE_ACKNOWLEDGE_TITLE = exports.ON_CALL_TEST_PAGE_ACKNOWLEDGEABLE_CHANNELS = exports.ON_CALL_TEST_PAGE_RUN_UNREADABLE_MESSAGE = exports.ON_CALL_TEST_PAGE_RULES_RAN_MESSAGE = exports.ON_CALL_TEST_PAGE_WENT_THROUGH_EVERY_LEVEL_MESSAGE = exports.ON_CALL_TEST_PAGE_ENDED_UNANSWERED_MESSAGE = exports.ON_CALL_TEST_PAGE_FIRST_LEVEL_REACHED_NOBODY_MESSAGE = exports.ON_CALL_TEST_PAGE_FIRST_LEVEL_PAGED_MESSAGE = exports.ON_CALL_TEST_PAGE_NOBODY_PAGED_MESSAGE = exports.ON_CALL_TEST_PAGE_STARTED_ELSEWHERE_MESSAGE = exports.ON_CALL_TEST_PAGE_LIMIT_UNREADABLE_MESSAGE = exports.ON_CALL_TEST_PAGE_PROJECT_LIMIT_MESSAGE = exports.ON_CALL_TEST_PAGES_PER_PROJECT_PER_HOUR = exports.ON_CALL_TEST_PAGE_POLICY_INTERVAL_IN_SECONDS = exports.ON_CALL_TEST_PAGE_PERSON_INTERVAL_IN_SECONDS = exports.ON_CALL_TEST_PAGE_ESCALATION_WAIT_IN_MINUTES = exports.ON_CALL_TEST_PAGE_ANSWER_WINDOW_IN_MINUTES = exports.ON_CALL_TEST_PAGE_RECORD_KINDS = exports.OnCallTestPageRecordKind = void 0;
7
7
  exports.isOnCallTestPageRecordKind = isOnCallTestPageRecordKind;
8
8
  exports.getOnCallTestPageRuleType = getOnCallTestPageRuleType;
9
+ exports.getOnCallTestPageSeverityList = getOnCallTestPageSeverityList;
9
10
  exports.isOnCallTestPage = isOnCallTestPage;
10
11
  exports.hasOnCallTestPageAnswerWindowPassed = hasOnCallTestPageAnswerWindowPassed;
11
12
  exports.getOnCallTestPageEndsAt = getOnCallTestPageEndsAt;
@@ -28,6 +29,7 @@ const NotificationRuleType_1 = __importDefault(require("../NotificationRule/Noti
28
29
  const UserNotificationEventType_1 = __importDefault(require("../UserNotification/UserNotificationEventType"));
29
30
  const UserNotificationStatus_1 = __importDefault(require("../UserNotification/UserNotificationStatus"));
30
31
  const OnCallPageChannel_1 = require("./OnCallPageChannel");
32
+ const StateOrder_1 = require("../../Utils/StateOrder");
31
33
  /*
32
34
  * A TEST PAGE: PROVE THAT A PAGE REACHES SOMEBODY, WITHOUT AN INCIDENT.
33
35
  *
@@ -95,6 +97,16 @@ function getOnCallTestPageRuleType(kind) {
95
97
  ? NotificationRuleType_1.default.ON_CALL_EXECUTED_ALERT
96
98
  : NotificationRuleType_1.default.ON_CALL_EXECUTED_INCIDENT;
97
99
  }
100
+ /*
101
+ * The list a test page's severity comes from: an incident severity, or an
102
+ * alert severity - so its name is read against that list's defaults alone
103
+ * (OnCallPageWords.getOnCallPageStateName).
104
+ */
105
+ function getOnCallTestPageSeverityList(kind) {
106
+ return kind === OnCallTestPageRecordKind.Alert
107
+ ? StateOrder_1.StateListType.AlertSeverity
108
+ : StateOrder_1.StateListType.IncidentSeverity;
109
+ }
98
110
  // Whether a run (or one of its logs) is a test page.
99
111
  function isOnCallTestPage(run) {
100
112
  return Boolean(run && run.userNotificationEventType === UserNotificationEventType_1.default.TestPage);
@@ -44,6 +44,7 @@ export const getOnCallTestPagePagingMessage = commonJsModule.getOnCallTestPagePa
44
44
  export const getOnCallTestPagePersonTooSoonMessage = commonJsModule.getOnCallTestPagePersonTooSoonMessage;
45
45
  export const getOnCallTestPagePolicyTooSoonMessage = commonJsModule.getOnCallTestPagePolicyTooSoonMessage;
46
46
  export const getOnCallTestPageRuleType = commonJsModule.getOnCallTestPageRuleType;
47
+ export const getOnCallTestPageSeverityList = commonJsModule.getOnCallTestPageSeverityList;
47
48
  export const getOnCallTestPageWalkStart = commonJsModule.getOnCallTestPageWalkStart;
48
49
  export const hasOnCallTestPageAnswerWindowPassed = commonJsModule.hasOnCallTestPageAnswerWindowPassed;
49
50
  export const isOnCallTestPage = commonJsModule.isOnCallTestPage;
@@ -21,6 +21,7 @@ exports.readOpenStackAllocationCandidates = readOpenStackAllocationCandidates;
21
21
  exports.getOpenStackPlacementAnswer = getOpenStackPlacementAnswer;
22
22
  exports.getOpenStackOvercommit = getOpenStackOvercommit;
23
23
  exports.getOpenStackAllocationMismatches = getOpenStackAllocationMismatches;
24
+ const LookupTable_1 = require("../../Utils/LookupTable");
24
25
  const OpenStackHealthRules_1 = require("./OpenStackHealthRules");
25
26
  /*
26
27
  * HOW MANY MORE FIT.
@@ -279,9 +280,15 @@ function readOpenStackInventories(facts) {
279
280
  }
280
281
  const resourceClass = key.substring(INVENTORY_FACT_PREFIX.length, lastColon);
281
282
  const field = key.substring(lastColon + 1);
282
- const reading = readings[resourceClass] || {};
283
- reading[field] = value;
284
- readings[resourceClass] = reading;
283
+ /*
284
+ * The class's own reading only, written back as its own key: a
285
+ * resource class is named by the exporter, and a plain read of one
286
+ * named __proto__ found the prototype every object shares, which the
287
+ * line below then wrote the field onto.
288
+ */
289
+ const reading = (0, LookupTable_1.readOwnValue)(readings, resourceClass) || {};
290
+ (0, LookupTable_1.writeOwnValue)(reading, field, value);
291
+ (0, LookupTable_1.writeOwnValue)(readings, resourceClass, reading);
285
292
  if (field === "seen" && value > newestSeen) {
286
293
  newestSeen = value;
287
294
  }
@@ -297,12 +304,12 @@ function readOpenStackInventories(facts) {
297
304
  if (reading["seen"] !== undefined && newestSeen - reading["seen"] > 2) {
298
305
  continue;
299
306
  }
300
- inventories[resourceClass] = {
307
+ (0, LookupTable_1.writeOwnValue)(inventories, resourceClass, {
301
308
  total: reading["total"],
302
309
  reserved: (_a = reading["reserved"]) !== null && _a !== void 0 ? _a : 0,
303
310
  allocationRatio: (_b = reading["ratio"]) !== null && _b !== void 0 ? _b : 1,
304
311
  used: (_c = reading["used"]) !== null && _c !== void 0 ? _c : 0,
305
- };
312
+ });
306
313
  }
307
314
  return inventories;
308
315
  }
@@ -959,6 +959,10 @@ declare enum Permission {
959
959
  EditIncidentInternalNote = "EditIncidentInternalNote",
960
960
  DeleteIncidentInternalNote = "DeleteIncidentInternalNote",
961
961
  ReadIncidentInternalNote = "ReadIncidentInternalNote",
962
+ CreateIncidentPostmortemActionItem = "CreateIncidentPostmortemActionItem",
963
+ EditIncidentPostmortemActionItem = "EditIncidentPostmortemActionItem",
964
+ DeleteIncidentPostmortemActionItem = "DeleteIncidentPostmortemActionItem",
965
+ ReadIncidentPostmortemActionItem = "ReadIncidentPostmortemActionItem",
962
966
  CreateAlertInternalNote = "CreateAlertInternalNote",
963
967
  EditAlertInternalNote = "EditAlertInternalNote",
964
968
  DeleteAlertInternalNote = "DeleteAlertInternalNote",
@@ -959,6 +959,10 @@ declare enum Permission {
959
959
  EditIncidentInternalNote = "EditIncidentInternalNote",
960
960
  DeleteIncidentInternalNote = "DeleteIncidentInternalNote",
961
961
  ReadIncidentInternalNote = "ReadIncidentInternalNote",
962
+ CreateIncidentPostmortemActionItem = "CreateIncidentPostmortemActionItem",
963
+ EditIncidentPostmortemActionItem = "EditIncidentPostmortemActionItem",
964
+ DeleteIncidentPostmortemActionItem = "DeleteIncidentPostmortemActionItem",
965
+ ReadIncidentPostmortemActionItem = "ReadIncidentPostmortemActionItem",
962
966
  CreateAlertInternalNote = "CreateAlertInternalNote",
963
967
  EditAlertInternalNote = "EditAlertInternalNote",
964
968
  DeleteAlertInternalNote = "DeleteAlertInternalNote",
@@ -1154,6 +1154,11 @@ var Permission;
1154
1154
  Permission["EditIncidentInternalNote"] = "EditIncidentInternalNote";
1155
1155
  Permission["DeleteIncidentInternalNote"] = "DeleteIncidentInternalNote";
1156
1156
  Permission["ReadIncidentInternalNote"] = "ReadIncidentInternalNote";
1157
+ // Postmortem Action Items (what a postmortem says the team will do, and who does it)
1158
+ Permission["CreateIncidentPostmortemActionItem"] = "CreateIncidentPostmortemActionItem";
1159
+ Permission["EditIncidentPostmortemActionItem"] = "EditIncidentPostmortemActionItem";
1160
+ Permission["DeleteIncidentPostmortemActionItem"] = "DeleteIncidentPostmortemActionItem";
1161
+ Permission["ReadIncidentPostmortemActionItem"] = "ReadIncidentPostmortemActionItem";
1157
1162
  Permission["CreateAlertInternalNote"] = "CreateAlertInternalNote";
1158
1163
  Permission["EditAlertInternalNote"] = "EditAlertInternalNote";
1159
1164
  Permission["DeleteAlertInternalNote"] = "DeleteAlertInternalNote";
@@ -1666,6 +1671,15 @@ var Permission;
1666
1671
  Permission["DeleteService"] = "DeleteService";
1667
1672
  Permission["EditService"] = "EditService";
1668
1673
  Permission["ReadService"] = "ReadService";
1674
+ /*
1675
+ * Retired: they guarded the links between a service and its telemetry
1676
+ * services (the ServiceTelemetryService model), which went when telemetry
1677
+ * came to name its service directly. No model, API or page checks them, so
1678
+ * they are not offered (isAssignableToTenant: false), and the migration
1679
+ * RemoveServiceTelemetryLinkPermissions took them from every team, API key
1680
+ * and custom role. The values stay, so a permission an API call still
1681
+ * sends parses and shows its title.
1682
+ */
1669
1683
  Permission["CreateServiceTelemetryService"] = "CreateServiceTelemetryService";
1670
1684
  Permission["DeleteServiceTelemetryService"] = "DeleteServiceTelemetryService";
1671
1685
  Permission["EditServiceTelemetryService"] = "EditServiceTelemetryService";
@@ -5565,6 +5579,43 @@ class PermissionHelper {
5565
5579
  isRolePermission: false,
5566
5580
  group: PermissionGroup.Incident,
5567
5581
  },
5582
+ // Postmortem Action Item Permissions
5583
+ {
5584
+ permission: Permission.CreateIncidentPostmortemActionItem,
5585
+ title: "Create Postmortem Action Item",
5586
+ description: "This permission can add action items to the postmortems of incidents of this project.",
5587
+ isAssignableToTenant: true,
5588
+ isAccessControlPermission: false,
5589
+ isRolePermission: false,
5590
+ group: PermissionGroup.Incident,
5591
+ },
5592
+ {
5593
+ permission: Permission.DeleteIncidentPostmortemActionItem,
5594
+ title: "Delete Postmortem Action Item",
5595
+ description: "This permission can delete action items of the postmortems of incidents of this project.",
5596
+ isAssignableToTenant: true,
5597
+ isAccessControlPermission: false,
5598
+ isRolePermission: false,
5599
+ group: PermissionGroup.Incident,
5600
+ },
5601
+ {
5602
+ permission: Permission.EditIncidentPostmortemActionItem,
5603
+ title: "Edit Postmortem Action Item",
5604
+ description: "This permission can edit action items of the postmortems of incidents of this project: rename them, give them an owner and a due date, and mark them done.",
5605
+ isAssignableToTenant: true,
5606
+ isAccessControlPermission: false,
5607
+ isRolePermission: false,
5608
+ group: PermissionGroup.Incident,
5609
+ },
5610
+ {
5611
+ permission: Permission.ReadIncidentPostmortemActionItem,
5612
+ title: "Read Postmortem Action Item",
5613
+ description: "This permission can read action items of the postmortems of incidents of this project.",
5614
+ isAssignableToTenant: true,
5615
+ isAccessControlPermission: false,
5616
+ isRolePermission: false,
5617
+ group: PermissionGroup.Incident,
5618
+ },
5568
5619
  {
5569
5620
  permission: Permission.CreateAlertInternalNote,
5570
5621
  title: "Create Alert Internal Note",
@@ -11950,11 +12001,16 @@ class PermissionHelper {
11950
12001
  isRolePermission: false,
11951
12002
  group: PermissionGroup.ServiceCatalog,
11952
12003
  },
12004
+ /*
12005
+ * Retired (see the enum): nothing checks them, so a team, an API key
12006
+ * or a custom role is never offered them. Their props stay so a stored
12007
+ * or sent value still has a title.
12008
+ */
11953
12009
  {
11954
12010
  permission: Permission.CreateServiceTelemetryService,
11955
12011
  title: "Create Service Telemetry Link",
11956
- description: "This permission can create the links between services and their telemetry in this project.",
11957
- isAssignableToTenant: true,
12012
+ description: "Grants nothing: OneUptime no longer keeps links between services and their telemetry, so no record checks this permission.",
12013
+ isAssignableToTenant: false,
11958
12014
  isAccessControlPermission: false,
11959
12015
  isRolePermission: false,
11960
12016
  group: PermissionGroup.ServiceCatalog,
@@ -11962,8 +12018,8 @@ class PermissionHelper {
11962
12018
  {
11963
12019
  permission: Permission.DeleteServiceTelemetryService,
11964
12020
  title: "Delete Service Telemetry Link",
11965
- description: "This permission can delete the links between services and their telemetry in this project.",
11966
- isAssignableToTenant: true,
12021
+ description: "Grants nothing: OneUptime no longer keeps links between services and their telemetry, so no record checks this permission.",
12022
+ isAssignableToTenant: false,
11967
12023
  isAccessControlPermission: false,
11968
12024
  isRolePermission: false,
11969
12025
  group: PermissionGroup.ServiceCatalog,
@@ -11971,8 +12027,8 @@ class PermissionHelper {
11971
12027
  {
11972
12028
  permission: Permission.EditServiceTelemetryService,
11973
12029
  title: "Edit Service Telemetry Link",
11974
- description: "This permission can edit the links between services and their telemetry in this project.",
11975
- isAssignableToTenant: true,
12030
+ description: "Grants nothing: OneUptime no longer keeps links between services and their telemetry, so no record checks this permission.",
12031
+ isAssignableToTenant: false,
11976
12032
  isAccessControlPermission: false,
11977
12033
  isRolePermission: false,
11978
12034
  group: PermissionGroup.ServiceCatalog,
@@ -11980,8 +12036,8 @@ class PermissionHelper {
11980
12036
  {
11981
12037
  permission: Permission.ReadServiceTelemetryService,
11982
12038
  title: "Read Service Telemetry Link",
11983
- description: "This permission can read the links between services and their telemetry in this project.",
11984
- isAssignableToTenant: true,
12039
+ description: "Grants nothing: OneUptime no longer keeps links between services and their telemetry, so no record checks this permission.",
12040
+ isAssignableToTenant: false,
11985
12041
  isAccessControlPermission: false,
11986
12042
  isRolePermission: false,
11987
12043
  group: PermissionGroup.ServiceCatalog,
@@ -46,7 +46,8 @@ const ActivationMilestone_1 = __importDefault(require("../Analytics/ActivationMi
46
46
  * come first in their category, and one you set up that has nothing in it
47
47
  * yet carries a quiet "Not set up". One request answers it for the whole
48
48
  * catalog (GET /project-products), and the server keeps the answer for a
49
- * few minutes per project (ProjectProductsService).
49
+ * few minutes per project, or until a product's first record or first data
50
+ * changes it (ProjectProductsService, ProjectUsageCache).
50
51
  *
51
52
  * A product has something in it when:
52
53
  *
@@ -10,7 +10,8 @@ const ServerProducts_1 = require("./ServerProducts");
10
10
  /*
11
11
  * THE ONE ANSWER THE DASHBOARD READS ABOUT A PROJECT'S PRODUCTS (#6814):
12
12
  * GET /api/project-products, for the project in the `tenantid` header and
13
- * the person asking. Read once per page load and kept (the Dashboard's
13
+ * the person asking. Read when the page loads, and again as the person
14
+ * looks at their products once it is a few seconds old (the Dashboard's
14
15
  * ProjectProducts store), it holds what the products menu, Home, Search and
15
16
  * Project Settings > Products draw:
16
17
  *
@@ -24,6 +24,7 @@ export declare function isAiResourceType(value: unknown): value is AiResourceTyp
24
24
  export interface AiResourceTypeInfo {
25
25
  type: AiResourceType;
26
26
  displayName: string;
27
+ sentenceName: string;
27
28
  agentDisplayName: string;
28
29
  agentAlias: string;
29
30
  programs: ReadonlyArray<string>;
@@ -24,6 +24,7 @@ export declare function isAiResourceType(value: unknown): value is AiResourceTyp
24
24
  export interface AiResourceTypeInfo {
25
25
  type: AiResourceType;
26
26
  displayName: string;
27
+ sentenceName: string;
27
28
  agentDisplayName: string;
28
29
  agentAlias: string;
29
30
  programs: ReadonlyArray<string>;
@@ -139,6 +139,7 @@ exports.AI_RESOURCE_TYPE_INFO = {
139
139
  [AiResourceType.DockerHost]: {
140
140
  type: AiResourceType.DockerHost,
141
141
  displayName: "Docker host",
142
+ sentenceName: "Docker host",
142
143
  agentDisplayName: "Docker AI agent",
143
144
  agentAlias: "docker",
144
145
  programs: ["docker"],
@@ -153,6 +154,7 @@ exports.AI_RESOURCE_TYPE_INFO = {
153
154
  [AiResourceType.PodmanHost]: {
154
155
  type: AiResourceType.PodmanHost,
155
156
  displayName: "Podman host",
157
+ sentenceName: "Podman host",
156
158
  agentDisplayName: "Podman AI agent",
157
159
  agentAlias: "podman",
158
160
  programs: ["docker"],
@@ -167,6 +169,7 @@ exports.AI_RESOURCE_TYPE_INFO = {
167
169
  [AiResourceType.DockerSwarmCluster]: {
168
170
  type: AiResourceType.DockerSwarmCluster,
169
171
  displayName: "Docker Swarm cluster",
172
+ sentenceName: "Docker Swarm cluster",
170
173
  agentDisplayName: "Docker Swarm AI agent",
171
174
  agentAlias: "docker-swarm",
172
175
  programs: ["docker"],
@@ -183,6 +186,7 @@ exports.AI_RESOURCE_TYPE_INFO = {
183
186
  [AiResourceType.ProxmoxCluster]: {
184
187
  type: AiResourceType.ProxmoxCluster,
185
188
  displayName: "Proxmox cluster",
189
+ sentenceName: "Proxmox cluster",
186
190
  agentDisplayName: "Proxmox AI agent",
187
191
  agentAlias: "proxmox",
188
192
  programs: ["pvesh"],
@@ -193,6 +197,7 @@ exports.AI_RESOURCE_TYPE_INFO = {
193
197
  [AiResourceType.VMwareVCenter]: {
194
198
  type: AiResourceType.VMwareVCenter,
195
199
  displayName: "VMware vCenter",
200
+ sentenceName: "VMware vCenter",
196
201
  agentDisplayName: "VMware AI agent",
197
202
  agentAlias: "vmware",
198
203
  programs: ["govc"],
@@ -203,6 +208,7 @@ exports.AI_RESOURCE_TYPE_INFO = {
203
208
  [AiResourceType.CephCluster]: {
204
209
  type: AiResourceType.CephCluster,
205
210
  displayName: "Ceph cluster",
211
+ sentenceName: "Ceph cluster",
206
212
  agentDisplayName: "Ceph AI agent",
207
213
  agentAlias: "ceph",
208
214
  programs: ["ceph"],
@@ -219,6 +225,7 @@ exports.AI_RESOURCE_TYPE_INFO = {
219
225
  [AiResourceType.DatabaseServer]: {
220
226
  type: AiResourceType.DatabaseServer,
221
227
  displayName: "Database server",
228
+ sentenceName: "database server",
222
229
  agentDisplayName: "Database AI agent",
223
230
  agentAlias: "database",
224
231
  programs: ["db"],
@@ -235,6 +242,7 @@ exports.AI_RESOURCE_TYPE_INFO = {
235
242
  [AiResourceType.Host]: {
236
243
  type: AiResourceType.Host,
237
244
  displayName: "Host",
245
+ sentenceName: "host",
238
246
  agentDisplayName: "Host AI agent",
239
247
  agentAlias: "host",
240
248
  programs: HOST_PROGRAMS,
@@ -253,6 +261,7 @@ exports.AI_RESOURCE_TYPE_INFO = {
253
261
  [AiResourceType.AwsAccount]: {
254
262
  type: AiResourceType.AwsAccount,
255
263
  displayName: "AWS account",
264
+ sentenceName: "AWS account",
256
265
  agentDisplayName: "Cloud AI agent",
257
266
  agentAlias: "aws",
258
267
  programs: ["cloud"],
@@ -263,6 +272,7 @@ exports.AI_RESOURCE_TYPE_INFO = {
263
272
  [AiResourceType.AzureSubscription]: {
264
273
  type: AiResourceType.AzureSubscription,
265
274
  displayName: "Azure subscription",
275
+ sentenceName: "Azure subscription",
266
276
  agentDisplayName: "Cloud AI agent",
267
277
  agentAlias: "azure",
268
278
  programs: ["cloud"],
@@ -273,6 +283,7 @@ exports.AI_RESOURCE_TYPE_INFO = {
273
283
  [AiResourceType.GoogleCloudProject]: {
274
284
  type: AiResourceType.GoogleCloudProject,
275
285
  displayName: "Google Cloud project",
286
+ sentenceName: "Google Cloud project",
276
287
  agentDisplayName: "Cloud AI agent",
277
288
  agentAlias: "gcp",
278
289
  programs: ["cloud"],
@@ -289,6 +300,7 @@ exports.AI_RESOURCE_TYPE_INFO = {
289
300
  [AiResourceType.OpenStackCloud]: {
290
301
  type: AiResourceType.OpenStackCloud,
291
302
  displayName: "OpenStack cloud",
303
+ sentenceName: "OpenStack cloud",
292
304
  agentDisplayName: "OpenStack AI agent",
293
305
  agentAlias: "openstack",
294
306
  programs: ["openstack"],
@@ -96,7 +96,16 @@ function toProductAnalyticsSegmentFilter(value) {
96
96
  if (typeof raw !== "string") {
97
97
  return null;
98
98
  }
99
- return Object.assign(Object.assign({}, ref), { value: raw.slice(0, exports.PRODUCT_ANALYTICS_MAX_SEGMENT_VALUE_LENGTH) });
99
+ const kept = raw.slice(0, exports.PRODUCT_ANALYTICS_MAX_SEGMENT_VALUE_LENGTH);
100
+ return Object.assign(Object.assign({}, ref), {
101
+ /*
102
+ * A page as the events keep one, in its one spelling: a link or a saved
103
+ * segment with "/caf%c3%a9" names the page stored as "/caf%C3%A9". ""
104
+ * is still "no page".
105
+ */
106
+ value: ref.field === ProductAnalyticsEventField.Page
107
+ ? (0, ProductAnalyticsEvents_1.toProductAnalyticsPage)(kept).slice(0, exports.PRODUCT_ANALYTICS_MAX_SEGMENT_VALUE_LENGTH)
108
+ : kept });
100
109
  }
101
110
  function toProductAnalyticsEventRef(value) {
102
111
  if (value === null || typeof value !== "object" || Array.isArray(value)) {
@@ -25,6 +25,9 @@
25
25
  * answers) live in ProductAnalyticsEventReads.ts, so the script on
26
26
  * customers' pages carries none of them.
27
27
  */
28
+ var __importDefault = (this && this.__importDefault) || function (mod) {
29
+ return (mod && mod.__esModule) ? mod : { "default": mod };
30
+ };
28
31
  Object.defineProperty(exports, "__esModule", { value: true });
29
32
  exports.PRODUCT_ANALYTICS_EVENT_KINDS = exports.ProductAnalyticsEventKind = exports.PRODUCT_ANALYTICS_DERIVED_METRIC_INTERVAL_MS = exports.PRODUCT_ANALYTICS_DEVICE_TYPE_ATTRIBUTE = exports.PRODUCT_ANALYTICS_EVENT_NAME_ATTRIBUTE = exports.PRODUCT_ANALYTICS_DERIVED_METRICS = exports.ProductAnalyticsDerivedMetric = exports.PRODUCT_ANALYTICS_DERIVED_METRIC_PREFIX = exports.PRODUCT_ANALYTICS_RESERVED_METRIC_PREFIX = exports.PRODUCT_ANALYTICS_MAX_METRIC_NAME_LENGTH = exports.PRODUCT_ANALYTICS_MAX_ITEMS_PER_PROJECT_PER_MINUTE = exports.PRODUCT_ANALYTICS_MAX_EVENT_AGE_MS = exports.PRODUCT_ANALYTICS_MAX_CONTEXT_VALUE_LENGTH = exports.PRODUCT_ANALYTICS_MAX_PAGE_LENGTH = exports.PRODUCT_ANALYTICS_USER_PROPERTY_LIMITS = exports.PRODUCT_ANALYTICS_PROPERTY_LIMITS = exports.PRODUCT_ANALYTICS_MAX_EVENT_NAME_LENGTH = exports.PRODUCT_ANALYTICS_MAX_PENDING_EVENTS = exports.PRODUCT_ANALYTICS_FLUSH_INTERVAL_MS = exports.PRODUCT_ANALYTICS_TARGET_BATCH_BYTES = exports.PRODUCT_ANALYTICS_MAX_BATCH_BYTES = exports.PRODUCT_ANALYTICS_MAX_METRICS_PER_BATCH = exports.PRODUCT_ANALYTICS_MAX_EVENTS_PER_BATCH = exports.PRODUCT_ANALYTICS_CONTENT_TYPE = exports.PRODUCT_ANALYTICS_WIRE_VERSION = exports.PRODUCT_ANALYTICS_EVENTS_PATH = exports.PRODUCT_ANALYTICS_EVENTS_ROUTE = void 0;
30
33
  exports.isProductAnalyticsDerivedMetricName = isProductAnalyticsDerivedMetricName;
@@ -40,6 +43,7 @@ exports.pickProductAnalyticsUserProperties = pickProductAnalyticsUserProperties;
40
43
  exports.parseProductAnalyticsBatch = parseProductAnalyticsBatch;
41
44
  exports.readProductAnalyticsRecorderConfig = readProductAnalyticsRecorderConfig;
42
45
  const SessionReplayStringMap_1 = require("../../Utils/Rum/SessionReplayStringMap");
46
+ const UrlScrubber_1 = __importDefault(require("../../Utils/Rum/UrlScrubber"));
43
47
  const SessionReplay_1 = require("./SessionReplay");
44
48
  /* ---- Where the recorders post. ---- */
45
49
  /*
@@ -217,6 +221,14 @@ function toProductAnalyticsEventName(value) {
217
221
  * A page as stored: its path, from the first "/", without a query or a
218
222
  * fragment. A mobile app's screen name ("Checkout") becomes "/Checkout",
219
223
  * the path part one files its sessions' pages under. "" when there is none.
224
+ *
225
+ * In the path's one spelling (UrlScrubber.normalizePathSpelling), the one
226
+ * Session Replay stores and User Flows keys a page by: "/caf%c3%a9",
227
+ * "/cafe%CC%81" and "/café" are all "/caf%C3%A9". The recorder writes that
228
+ * spelling, but an older or cached recorder still sends the one the browser
229
+ * had, and the server runs this over what it was sent. Every read of a page
230
+ * a request names runs it too (toProductAnalyticsEventRef), so a link or a
231
+ * saved funnel with an older spelling names the same page.
220
232
  */
221
233
  function toProductAnalyticsPage(value) {
222
234
  if (typeof value !== "string") {
@@ -238,7 +250,7 @@ function toProductAnalyticsPage(value) {
238
250
  if (!page.startsWith("/")) {
239
251
  page = `/${page}`;
240
252
  }
241
- return page.slice(0, exports.PRODUCT_ANALYTICS_MAX_PAGE_LENGTH);
253
+ return UrlScrubber_1.default.normalizePathSpelling(page).slice(0, exports.PRODUCT_ANALYTICS_MAX_PAGE_LENGTH);
242
254
  }
243
255
  function toContextValue(value) {
244
256
  return typeof value === "string"
@@ -143,14 +143,16 @@ export interface SessionReplayIdentifyPayload {
143
143
  export interface SessionReplayTagsPayload {
144
144
  tags: Record<string, string>;
145
145
  }
146
+ export type SessionReplayPauseReason = "page";
146
147
  export interface SessionReplayIdlePausedPayload {
147
148
  idleSinceUnixMs: number;
148
149
  pausedAtUnixMs: number;
149
- reason?: "page";
150
+ reason?: SessionReplayPauseReason;
150
151
  }
151
152
  export interface SessionReplayIdleResumedPayload {
152
153
  pausedAtUnixMs: number;
153
154
  resumedAtUnixMs: number;
155
+ reason?: SessionReplayPauseReason;
154
156
  }
155
157
  export declare function isSessionReplayCustomEventTag(value: unknown): value is SessionReplayCustomEventTagValue;
156
158
  export declare function isSessionReplayCustomEventData(value: unknown): value is SessionReplayCustomEventData;
@@ -175,3 +177,4 @@ export declare function isSessionReplayIdentifyPayload(value: unknown): value is
175
177
  export declare function isSessionReplayTagsPayload(value: unknown): value is SessionReplayTagsPayload;
176
178
  export declare function isSessionReplayIdlePausedPayload(value: unknown): value is SessionReplayIdlePausedPayload;
177
179
  export declare function isSessionReplayIdleResumedPayload(value: unknown): value is SessionReplayIdleResumedPayload;
180
+ export declare function readSessionReplayPauseReason(value: unknown): SessionReplayPauseReason | undefined;
@@ -143,14 +143,16 @@ export interface SessionReplayIdentifyPayload {
143
143
  export interface SessionReplayTagsPayload {
144
144
  tags: Record<string, string>;
145
145
  }
146
+ export type SessionReplayPauseReason = "page";
146
147
  export interface SessionReplayIdlePausedPayload {
147
148
  idleSinceUnixMs: number;
148
149
  pausedAtUnixMs: number;
149
- reason?: "page";
150
+ reason?: SessionReplayPauseReason;
150
151
  }
151
152
  export interface SessionReplayIdleResumedPayload {
152
153
  pausedAtUnixMs: number;
153
154
  resumedAtUnixMs: number;
155
+ reason?: SessionReplayPauseReason;
154
156
  }
155
157
  export declare function isSessionReplayCustomEventTag(value: unknown): value is SessionReplayCustomEventTagValue;
156
158
  export declare function isSessionReplayCustomEventData(value: unknown): value is SessionReplayCustomEventData;
@@ -175,3 +177,4 @@ export declare function isSessionReplayIdentifyPayload(value: unknown): value is
175
177
  export declare function isSessionReplayTagsPayload(value: unknown): value is SessionReplayTagsPayload;
176
178
  export declare function isSessionReplayIdlePausedPayload(value: unknown): value is SessionReplayIdlePausedPayload;
177
179
  export declare function isSessionReplayIdleResumedPayload(value: unknown): value is SessionReplayIdleResumedPayload;
180
+ export declare function readSessionReplayPauseReason(value: unknown): SessionReplayPauseReason | undefined;
@@ -24,6 +24,7 @@ exports.isSessionReplayIdentifyPayload = isSessionReplayIdentifyPayload;
24
24
  exports.isSessionReplayTagsPayload = isSessionReplayTagsPayload;
25
25
  exports.isSessionReplayIdlePausedPayload = isSessionReplayIdlePausedPayload;
26
26
  exports.isSessionReplayIdleResumedPayload = isSessionReplayIdleResumedPayload;
27
+ exports.readSessionReplayPauseReason = readSessionReplayPauseReason;
27
28
  const SessionIdentity_1 = require("../../Utils/Rum/SessionIdentity");
28
29
  const SessionReplayStringMap_1 = require("../../Utils/Rum/SessionReplayStringMap");
29
30
  const SessionReplayFrustrationSignals_1 = require("./SessionReplayFrustrationSignals");
@@ -226,3 +227,14 @@ function isSessionReplayIdleResumedPayload(value) {
226
227
  isFiniteNumber(value["resumedAtUnixMs"]) &&
227
228
  value["resumedAtUnixMs"] >= value["pausedAtUnixMs"]);
228
229
  }
230
+ /*
231
+ * The reason an idle-pause marker's payload gives, either edge: "page", or
232
+ * undefined for an idle pause, for a recorder from before the field, and
233
+ * for any value this player does not know (a newer recorder's), which it
234
+ * reads as the pause it has always drawn. Read apart from the guards
235
+ * above, so a marker whose stamps are malformed still says whose pause it
236
+ * was.
237
+ */
238
+ function readSessionReplayPauseReason(value) {
239
+ return isRecord(value) && value["reason"] === "page" ? "page" : undefined;
240
+ }
@@ -26,3 +26,4 @@ export const isSessionReplaySessionRotatedPayload = commonJsModule.isSessionRepl
26
26
  export const isSessionReplayTagsPayload = commonJsModule.isSessionReplayTagsPayload;
27
27
  export const isSessionReplayVisibilityPayload = commonJsModule.isSessionReplayVisibilityPayload;
28
28
  export const isSessionReplayWebVitalPayload = commonJsModule.isSessionReplayWebVitalPayload;
29
+ export const readSessionReplayPauseReason = commonJsModule.readSessionReplayPauseReason;
@@ -49,6 +49,7 @@ export declare enum SetupHealthFix {
49
49
  CreateMonitor = "CreateMonitor",
50
50
  IncidentOnCallRules = "IncidentOnCallRules",
51
51
  AlertOnCallRules = "AlertOnCallRules",
52
+ OnCallGuidedSetup = "OnCallGuidedSetup",
52
53
  OnCallPolicy = "OnCallPolicy",
53
54
  OnCallSchedule = "OnCallSchedule",
54
55
  OnCallReadiness = "OnCallReadiness",
@@ -49,6 +49,7 @@ export declare enum SetupHealthFix {
49
49
  CreateMonitor = "CreateMonitor",
50
50
  IncidentOnCallRules = "IncidentOnCallRules",
51
51
  AlertOnCallRules = "AlertOnCallRules",
52
+ OnCallGuidedSetup = "OnCallGuidedSetup",
52
53
  OnCallPolicy = "OnCallPolicy",
53
54
  OnCallSchedule = "OnCallSchedule",
54
55
  OnCallReadiness = "OnCallReadiness",
@@ -160,6 +160,8 @@ var SetupHealthFix;
160
160
  SetupHealthFix["CreateMonitor"] = "CreateMonitor";
161
161
  SetupHealthFix["IncidentOnCallRules"] = "IncidentOnCallRules";
162
162
  SetupHealthFix["AlertOnCallRules"] = "AlertOnCallRules";
163
+ // No on-call policy yet: the on-call guided setup makes the first (#7369).
164
+ SetupHealthFix["OnCallGuidedSetup"] = "OnCallGuidedSetup";
163
165
  SetupHealthFix["OnCallPolicy"] = "OnCallPolicy";
164
166
  SetupHealthFix["OnCallSchedule"] = "OnCallSchedule";
165
167
  SetupHealthFix["OnCallReadiness"] = "OnCallReadiness";
@@ -390,18 +392,24 @@ function getBreakFinding(data) {
390
392
  : SetupHealthEventKind.Incident;
391
393
  /*
392
394
  * In a project with no on-call policy yet, email to the owners may be
393
- * just what they want: a suggestion, not a problem.
395
+ * just what they want: a suggestion, not a problem - and its fix is
396
+ * the on-call guided setup, which makes the first policy with the
397
+ * rules that run it, not the rules builder, whose rules would have no
398
+ * policy to page (#7369).
394
399
  */
400
+ const hasPolicies = data.facts.policies.length > 0;
395
401
  return makeSetupHealthFinding({
396
402
  check: SetupHealthCheck.MonitorPagesNobody,
397
- level: data.facts.policies.length > 0
403
+ level: hasPolicies
398
404
  ? SetupHealthLevel.WorthFixing
399
405
  : SetupHealthLevel.Suggestion,
400
406
  record: data.monitor,
401
407
  subject: kind,
402
- fix: kind === SetupHealthEventKind.Alert
403
- ? SetupHealthFix.AlertOnCallRules
404
- : SetupHealthFix.IncidentOnCallRules,
408
+ fix: !hasPolicies
409
+ ? SetupHealthFix.OnCallGuidedSetup
410
+ : kind === SetupHealthEventKind.Alert
411
+ ? SetupHealthFix.AlertOnCallRules
412
+ : SetupHealthFix.IncidentOnCallRules,
405
413
  words: exports.SETUP_HEALTH_WORDS.monitorPagesNobody[kind],
406
414
  values: data.values,
407
415
  });
@@ -1,4 +1,12 @@
1
- import { Translator } from "../Translator.mjs";
1
+ import { StateListType } from "../../Utils/StateOrder.mjs";
2
+ export declare const DEFAULT_INCIDENT_STATE_NAMES: ReadonlyArray<string>;
3
+ export declare const DEFAULT_ALERT_STATE_NAMES: ReadonlyArray<string>;
4
+ export declare const DEFAULT_INCIDENT_SEVERITY_NAMES: ReadonlyArray<string>;
5
+ export declare const DEFAULT_ALERT_SEVERITY_NAMES: ReadonlyArray<string>;
6
+ export declare const DEFAULT_MONITOR_STATUS_NAMES: ReadonlyArray<string>;
7
+ export declare const DEFAULT_SCHEDULED_MAINTENANCE_STATE_NAMES: ReadonlyArray<string>;
8
+ export declare const DEFAULT_POSTMORTEM_STATUS_NAMES: ReadonlyArray<string>;
9
+ export declare const DEFAULT_SECURITY_CASE_STATUS_NAMES: ReadonlyArray<string>;
10
+ export declare const DEFAULT_SECURITY_CASE_PRIORITY_NAMES: ReadonlyArray<string>;
11
+ export type StatusPageNameList = StateListType.IncidentState | StateListType.IncidentSeverity | StateListType.MonitorStatus | StateListType.ScheduledMaintenanceState;
2
12
  export declare const DEFAULT_STATUS_NAMES: ReadonlyArray<string>;
3
- export declare const isDefaultStatusName: (name: string | null | undefined) => boolean;
4
- export declare const translateStateName: (translator: Translator, name: string | null | undefined) => string;
@@ -1,4 +1,12 @@
1
- import { Translator } from "../Translator";
1
+ import { StateListType } from "../../Utils/StateOrder";
2
+ export declare const DEFAULT_INCIDENT_STATE_NAMES: ReadonlyArray<string>;
3
+ export declare const DEFAULT_ALERT_STATE_NAMES: ReadonlyArray<string>;
4
+ export declare const DEFAULT_INCIDENT_SEVERITY_NAMES: ReadonlyArray<string>;
5
+ export declare const DEFAULT_ALERT_SEVERITY_NAMES: ReadonlyArray<string>;
6
+ export declare const DEFAULT_MONITOR_STATUS_NAMES: ReadonlyArray<string>;
7
+ export declare const DEFAULT_SCHEDULED_MAINTENANCE_STATE_NAMES: ReadonlyArray<string>;
8
+ export declare const DEFAULT_POSTMORTEM_STATUS_NAMES: ReadonlyArray<string>;
9
+ export declare const DEFAULT_SECURITY_CASE_STATUS_NAMES: ReadonlyArray<string>;
10
+ export declare const DEFAULT_SECURITY_CASE_PRIORITY_NAMES: ReadonlyArray<string>;
11
+ export type StatusPageNameList = StateListType.IncidentState | StateListType.IncidentSeverity | StateListType.MonitorStatus | StateListType.ScheduledMaintenanceState;
2
12
  export declare const DEFAULT_STATUS_NAMES: ReadonlyArray<string>;
3
- export declare const isDefaultStatusName: (name: string | null | undefined) => boolean;
4
- export declare const translateStateName: (translator: Translator, name: string | null | undefined) => string;