@oneuptime/common 14.0.94 → 14.0.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. package/Models/AnalyticsModels/ExceptionInstance.d.mts +2 -0
  2. package/Models/AnalyticsModels/ExceptionInstance.d.ts +2 -0
  3. package/Models/AnalyticsModels/ExceptionInstance.js +7 -0
  4. package/Models/AnalyticsModels/Log.d.mts +2 -0
  5. package/Models/AnalyticsModels/Log.d.ts +2 -0
  6. package/Models/AnalyticsModels/Log.js +7 -0
  7. package/Models/AnalyticsModels/SecurityEvent.d.mts +8 -0
  8. package/Models/AnalyticsModels/SecurityEvent.d.ts +8 -0
  9. package/Models/AnalyticsModels/SecurityEvent.js +55 -0
  10. package/Models/AnalyticsModels/Span.d.mts +4 -0
  11. package/Models/AnalyticsModels/Span.d.ts +4 -0
  12. package/Models/AnalyticsModels/Span.js +63 -0
  13. package/Models/DatabaseModels/CustomNotificationChannel.d.mts +16 -0
  14. package/Models/DatabaseModels/CustomNotificationChannel.d.ts +16 -0
  15. package/Models/DatabaseModels/CustomNotificationChannel.js +337 -0
  16. package/Models/DatabaseModels/CustomNotificationChannel.mjs +2 -0
  17. package/Models/DatabaseModels/DashboardPlaylist.d.mts +16 -0
  18. package/Models/DatabaseModels/DashboardPlaylist.d.ts +16 -0
  19. package/Models/DatabaseModels/DashboardPlaylist.js +314 -0
  20. package/Models/DatabaseModels/DashboardPlaylist.mjs +2 -0
  21. package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js +14 -37
  22. package/Models/DatabaseModels/DatabaseBaseModel/OnCallRuleBaseModel.d.mts +1 -0
  23. package/Models/DatabaseModels/DatabaseBaseModel/OnCallRuleBaseModel.d.ts +1 -0
  24. package/Models/DatabaseModels/DatabaseBaseModel/OnCallRuleBaseModel.js +27 -3
  25. package/Models/DatabaseModels/DetectionRuleException.d.mts +25 -0
  26. package/Models/DatabaseModels/DetectionRuleException.d.ts +25 -0
  27. package/Models/DatabaseModels/DetectionRuleException.js +412 -0
  28. package/Models/DatabaseModels/DetectionRuleException.mjs +2 -0
  29. package/Models/DatabaseModels/GlobalConfig.d.mts +5 -0
  30. package/Models/DatabaseModels/GlobalConfig.d.ts +5 -0
  31. package/Models/DatabaseModels/GlobalConfig.js +107 -0
  32. package/Models/DatabaseModels/Index.js +8 -0
  33. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.mts +2 -0
  34. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.ts +2 -0
  35. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +40 -0
  36. package/Models/DatabaseModels/SecurityTelemetrySource.d.mts +21 -0
  37. package/Models/DatabaseModels/SecurityTelemetrySource.d.ts +21 -0
  38. package/Models/DatabaseModels/SecurityTelemetrySource.js +357 -0
  39. package/Models/DatabaseModels/SecurityTelemetrySource.mjs +2 -0
  40. package/Models/DatabaseModels/TeamComplianceSetting.js +2 -2
  41. package/Models/DatabaseModels/TeamPermission.js +5 -7
  42. package/Models/DatabaseModels/UserNotificationRule.d.mts +3 -0
  43. package/Models/DatabaseModels/UserNotificationRule.d.ts +3 -0
  44. package/Models/DatabaseModels/UserNotificationRule.js +67 -0
  45. package/Models/DatabaseModels/UserNotificationSetting.d.mts +1 -0
  46. package/Models/DatabaseModels/UserNotificationSetting.d.ts +1 -0
  47. package/Models/DatabaseModels/UserNotificationSetting.js +26 -0
  48. package/Models/DatabaseModels/UserOnCallLogTimeline.d.mts +3 -0
  49. package/Models/DatabaseModels/UserOnCallLogTimeline.d.ts +3 -0
  50. package/Models/DatabaseModels/UserOnCallLogTimeline.js +53 -0
  51. package/Types/AI/AIChatPermissionMode.js +11 -5
  52. package/Types/AI/ResourceCardFacts.d.mts +11 -0
  53. package/Types/AI/ResourceCardFacts.d.ts +11 -0
  54. package/Types/AI/ResourceCardFacts.js +80 -0
  55. package/Types/AI/ResourceCardFacts.mjs +4 -0
  56. package/Types/AnalyticsDatabase/TableColumn.d.mts +4 -0
  57. package/Types/AnalyticsDatabase/TableColumn.d.ts +4 -0
  58. package/Types/AnalyticsDatabase/TableColumn.js +7 -0
  59. package/Types/AuditLog/Export/AuditLogExportDestinationCatalog.d.mts +2 -0
  60. package/Types/AuditLog/Export/AuditLogExportDestinationCatalog.d.ts +2 -0
  61. package/Types/AuditLog/Export/AuditLogExportDestinationCatalog.js +4 -0
  62. package/Types/Backup/BackupDestinationCatalog.d.mts +2 -0
  63. package/Types/Backup/BackupDestinationCatalog.d.ts +2 -0
  64. package/Types/Backup/BackupDestinationCatalog.js +8 -0
  65. package/Types/CallAndSMS/CallAndSmsGatewayPayload.d.mts +25 -0
  66. package/Types/CallAndSMS/CallAndSmsGatewayPayload.d.ts +25 -0
  67. package/Types/CallAndSMS/CallAndSmsGatewayPayload.js +86 -0
  68. package/Types/CallAndSMS/CallAndSmsGatewayPayload.mjs +6 -0
  69. package/Types/CallAndSMS/CallAndSmsProvider.d.mts +23 -0
  70. package/Types/CallAndSMS/CallAndSmsProvider.d.ts +23 -0
  71. package/Types/CallAndSMS/CallAndSmsProvider.js +107 -0
  72. package/Types/CallAndSMS/CallAndSmsProvider.mjs +7 -0
  73. package/Types/CloudConnection/CloudConnectionCatalog.d.mts +2 -0
  74. package/Types/CloudConnection/CloudConnectionCatalog.d.ts +2 -0
  75. package/Types/CloudConnection/CloudConnectionCatalog.js +4 -0
  76. package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.d.mts +95 -0
  77. package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.d.ts +95 -0
  78. package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.js +236 -0
  79. package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.mjs +16 -0
  80. package/Types/Dashboard/DashboardPlaylist.d.mts +21 -0
  81. package/Types/Dashboard/DashboardPlaylist.d.ts +21 -0
  82. package/Types/Dashboard/DashboardPlaylist.js +197 -0
  83. package/Types/Dashboard/DashboardPlaylist.mjs +19 -0
  84. package/Types/Database/TableColumn.d.mts +8 -0
  85. package/Types/Database/TableColumn.d.ts +8 -0
  86. package/Types/Database/TableColumn.js +69 -23
  87. package/Types/Database/TableColumn.mjs +1 -0
  88. package/Types/HeldPermissions.d.mts +2 -0
  89. package/Types/HeldPermissions.d.ts +2 -0
  90. package/Types/HeldPermissions.js +32 -8
  91. package/Types/Icon/IconProp.d.mts +3 -0
  92. package/Types/Icon/IconProp.d.ts +3 -0
  93. package/Types/Icon/IconProp.js +4 -0
  94. package/Types/JSONFunctions.js +16 -1
  95. package/Types/LlmObservability/LlmConnectionCatalog.d.mts +2 -0
  96. package/Types/LlmObservability/LlmConnectionCatalog.d.ts +2 -0
  97. package/Types/LlmObservability/LlmConnectionCatalog.js +8 -0
  98. package/Types/Monitor/MonitorType.js +5 -4
  99. package/Types/Monitor/TelemetryAlertRule.d.mts +111 -0
  100. package/Types/Monitor/TelemetryAlertRule.d.ts +111 -0
  101. package/Types/Monitor/TelemetryAlertRule.js +886 -0
  102. package/Types/Monitor/TelemetryAlertRule.mjs +5 -0
  103. package/Types/Monitor/TelemetryRulePreview.d.mts +57 -0
  104. package/Types/Monitor/TelemetryRulePreview.d.ts +57 -0
  105. package/Types/Monitor/TelemetryRulePreview.js +190 -0
  106. package/Types/Monitor/TelemetryRulePreview.mjs +6 -0
  107. package/Types/OnCallDutyPolicy/EveryNewEventRules.d.mts +23 -0
  108. package/Types/OnCallDutyPolicy/EveryNewEventRules.d.ts +23 -0
  109. package/Types/OnCallDutyPolicy/EveryNewEventRules.js +105 -0
  110. package/Types/OnCallDutyPolicy/EveryNewEventRules.mjs +9 -0
  111. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.d.mts +3 -0
  112. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.d.ts +3 -0
  113. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.js +23 -8
  114. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.mjs +2 -0
  115. package/Types/OnCallDutyPolicy/OnCallPolicyAiHold.d.mts +47 -0
  116. package/Types/OnCallDutyPolicy/OnCallPolicyAiHold.d.ts +47 -0
  117. package/Types/OnCallDutyPolicy/OnCallPolicyAiHold.js +122 -0
  118. package/Types/OnCallDutyPolicy/OnCallPolicyAiHold.mjs +12 -0
  119. package/Types/OnCallDutyPolicy/OnCallRuleWhenToPage.d.mts +2 -1
  120. package/Types/OnCallDutyPolicy/OnCallRuleWhenToPage.d.ts +2 -1
  121. package/Types/OnCallDutyPolicy/OnCallRuleWhenToPage.js +10 -1
  122. package/Types/Permission.d.mts +10 -0
  123. package/Types/Permission.d.ts +10 -0
  124. package/Types/Permission.js +83 -19
  125. package/Types/ProviderLogo/ProviderLogo.d.mts +87 -0
  126. package/Types/ProviderLogo/ProviderLogo.d.ts +87 -0
  127. package/Types/ProviderLogo/ProviderLogo.js +215 -0
  128. package/Types/ProviderLogo/ProviderLogo.mjs +6 -0
  129. package/Types/PushNotification/PushNotificationsTurnedOff.d.mts +3 -0
  130. package/Types/PushNotification/PushNotificationsTurnedOff.d.ts +3 -0
  131. package/Types/PushNotification/PushNotificationsTurnedOff.js +32 -0
  132. package/Types/PushNotification/PushNotificationsTurnedOff.mjs +4 -0
  133. package/Types/RollingTime/RollingTimeUtil.js +20 -10
  134. package/Types/Runbook/RunbookTriggerType.d.mts +2 -1
  135. package/Types/Runbook/RunbookTriggerType.d.ts +2 -1
  136. package/Types/Runbook/RunbookTriggerType.js +5 -1
  137. package/Types/SecurityCase/SecurityCaseContext.d.mts +188 -0
  138. package/Types/SecurityCase/SecurityCaseContext.d.ts +188 -0
  139. package/Types/SecurityCase/SecurityCaseContext.js +165 -0
  140. package/Types/SecurityCase/SecurityCaseContext.mjs +30 -0
  141. package/Types/SecurityCase/SecurityEntityRisk.d.mts +11 -0
  142. package/Types/SecurityCase/SecurityEntityRisk.d.ts +11 -0
  143. package/Types/SecurityCase/SecurityEntityRisk.js +9 -1
  144. package/Types/SecurityCase/SecurityEntityRisk.mjs +1 -0
  145. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.d.mts +2 -0
  146. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.d.ts +2 -0
  147. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js +9 -0
  148. package/Types/SecurityEvent/Destinations/SecurityEventDestinationCatalog.d.mts +2 -0
  149. package/Types/SecurityEvent/Destinations/SecurityEventDestinationCatalog.d.ts +2 -0
  150. package/Types/SecurityEvent/Destinations/SecurityEventDestinationCatalog.js +5 -0
  151. package/Types/SecurityEvent/DetectionRetrohunt.d.mts +38 -0
  152. package/Types/SecurityEvent/DetectionRetrohunt.d.ts +38 -0
  153. package/Types/SecurityEvent/DetectionRetrohunt.js +147 -0
  154. package/Types/SecurityEvent/DetectionRetrohunt.mjs +10 -0
  155. package/Types/SecurityEvent/DetectionRuleDataKind.d.mts +5 -1
  156. package/Types/SecurityEvent/DetectionRuleDataKind.d.ts +5 -1
  157. package/Types/SecurityEvent/DetectionRuleDataKind.js +42 -0
  158. package/Types/SecurityEvent/DetectionRuleException.d.mts +65 -0
  159. package/Types/SecurityEvent/DetectionRuleException.d.ts +65 -0
  160. package/Types/SecurityEvent/DetectionRuleException.js +441 -0
  161. package/Types/SecurityEvent/DetectionRuleException.mjs +24 -0
  162. package/Types/SecurityEvent/DetectionRuleLibrary.js +330 -0
  163. package/Types/SecurityEvent/NormalizedSecurityEvent.d.mts +5 -0
  164. package/Types/SecurityEvent/NormalizedSecurityEvent.d.ts +5 -0
  165. package/Types/SecurityEvent/SecurityAttackCampaign.d.mts +31 -0
  166. package/Types/SecurityEvent/SecurityAttackCampaign.d.ts +31 -0
  167. package/Types/SecurityEvent/SecurityAttackCampaign.js +81 -0
  168. package/Types/SecurityEvent/SecurityAttackCampaign.mjs +8 -0
  169. package/Types/SecurityEvent/SecurityEventRequestOutcome.d.mts +28 -0
  170. package/Types/SecurityEvent/SecurityEventRequestOutcome.d.ts +28 -0
  171. package/Types/SecurityEvent/SecurityEventRequestOutcome.js +78 -0
  172. package/Types/SecurityEvent/SecurityEventRequestOutcome.mjs +6 -0
  173. package/Types/SecurityEvent/SecurityTelemetrySource.d.mts +39 -0
  174. package/Types/SecurityEvent/SecurityTelemetrySource.d.ts +39 -0
  175. package/Types/SecurityEvent/SecurityTelemetrySource.js +127 -0
  176. package/Types/SecurityEvent/SecurityTelemetrySource.mjs +12 -0
  177. package/Types/SecurityEvent/TurnOnRecommended.d.mts +2 -0
  178. package/Types/SecurityEvent/TurnOnRecommended.d.ts +2 -0
  179. package/Types/SecurityEvent/TurnOnRecommended.js +7 -0
  180. package/Types/SecurityPlaybook/SecurityPlaybookAction.d.mts +7 -1
  181. package/Types/SecurityPlaybook/SecurityPlaybookAction.d.ts +7 -1
  182. package/Types/SecurityPlaybook/SecurityPlaybookAction.js +46 -0
  183. package/Types/SecurityPlaybook/SecurityPlaybookAction.mjs +1 -0
  184. package/Types/SecurityPlaybook/SecurityPlaybookStep.d.mts +10 -0
  185. package/Types/SecurityPlaybook/SecurityPlaybookStep.d.ts +10 -0
  186. package/Types/SecurityPlaybook/SecurityPlaybookStep.js +37 -1
  187. package/Types/SecurityPlaybook/SecurityPlaybookStep.mjs +1 -0
  188. package/Types/SecurityPlaybook/SecurityPlaybookTemplates.js +17 -0
  189. package/Types/Team/ComplianceNotificationChannel.d.mts +2 -1
  190. package/Types/Team/ComplianceNotificationChannel.d.ts +2 -1
  191. package/Types/Team/ComplianceNotificationChannel.js +10 -1
  192. package/Types/Team/ComplianceRule.d.mts +8 -3
  193. package/Types/Team/ComplianceRule.d.ts +8 -3
  194. package/Types/Team/ComplianceRule.js +34 -22
  195. package/Types/Team/TeamComplianceStatus.d.mts +1 -0
  196. package/Types/Team/TeamComplianceStatus.d.ts +1 -0
  197. package/Types/Telemetry/OpenTelemetryGuides.d.mts +52 -0
  198. package/Types/Telemetry/OpenTelemetryGuides.d.ts +52 -0
  199. package/Types/Telemetry/OpenTelemetryGuides.js +419 -0
  200. package/Types/Telemetry/OpenTelemetryGuides.mjs +17 -0
  201. package/Types/Telemetry/TelemetrySavedViewState.d.mts +1 -0
  202. package/Types/Telemetry/TelemetrySavedViewState.d.ts +1 -0
  203. package/Types/Telemetry/TraceHealth.d.mts +24 -0
  204. package/Types/Telemetry/TraceHealth.d.ts +24 -0
  205. package/Types/Telemetry/TraceHealth.js +97 -0
  206. package/Types/Telemetry/TraceHealth.mjs +4 -0
  207. package/Types/Telemetry/TraceSpanType.d.mts +90 -0
  208. package/Types/Telemetry/TraceSpanType.d.ts +90 -0
  209. package/Types/Telemetry/TraceSpanType.js +238 -0
  210. package/Types/Telemetry/TraceSpanType.mjs +19 -0
  211. package/Types/Theme/ThemePreference.d.mts +26 -0
  212. package/Types/Theme/ThemePreference.d.ts +26 -0
  213. package/Types/Theme/ThemePreference.js +104 -0
  214. package/Types/Theme/ThemePreference.mjs +12 -0
  215. package/Types/Workflow/Component.d.mts +3 -0
  216. package/Types/Workflow/Component.d.ts +3 -0
  217. package/Types/Workflow/Components/Discord.js +2 -0
  218. package/Types/Workflow/Components/Mattermost.js +2 -0
  219. package/Types/Workflow/Components/MicrosoftTeams.js +2 -0
  220. package/Types/Workflow/Components/Slack.js +2 -0
  221. package/Types/Workflow/Components/Telegram.js +2 -0
  222. package/Types/Workflow/Components.js +6 -0
  223. package/Types/Workflow/Templates.js +5 -3
  224. package/Utils/ColorContrast.d.mts +0 -3
  225. package/Utils/ColorContrast.d.ts +0 -3
  226. package/Utils/ColorContrast.js +3 -41
  227. package/Utils/ColorContrast.mjs +0 -2
  228. package/Utils/NameInitials.d.mts +5 -0
  229. package/Utils/NameInitials.d.ts +5 -0
  230. package/Utils/NameInitials.js +92 -0
  231. package/Utils/NameInitials.mjs +6 -0
  232. package/Utils/OldestKeyCursor.d.mts +7 -0
  233. package/Utils/OldestKeyCursor.d.ts +7 -0
  234. package/Utils/OldestKeyCursor.js +68 -0
  235. package/Utils/OldestKeyCursor.mjs +2 -0
  236. package/Utils/Schema/OpenApiMetadataRegistry.d.mts +4 -0
  237. package/Utils/Schema/OpenApiMetadataRegistry.d.ts +4 -0
  238. package/Utils/Schema/OpenApiMetadataRegistry.js +20 -0
  239. package/Utils/Schema/OpenApiMetadataRegistry.mjs +2 -0
  240. package/Utils/Schema/Zod.js +6 -0
  241. package/Utils/SecurityCase/SecurityCaseImpactFacts.d.mts +41 -0
  242. package/Utils/SecurityCase/SecurityCaseImpactFacts.d.ts +41 -0
  243. package/Utils/SecurityCase/SecurityCaseImpactFacts.js +215 -0
  244. package/Utils/SecurityCase/SecurityCaseImpactFacts.mjs +6 -0
  245. package/Utils/SecurityCase/SecurityCaseStoryItems.d.mts +46 -0
  246. package/Utils/SecurityCase/SecurityCaseStoryItems.d.ts +46 -0
  247. package/Utils/SecurityCase/SecurityCaseStoryItems.js +327 -0
  248. package/Utils/SecurityCase/SecurityCaseStoryItems.mjs +17 -0
  249. package/Utils/SecurityEvent/LogParsers/SecurityLogLine.d.mts +5 -0
  250. package/Utils/SecurityEvent/LogParsers/SecurityLogLine.d.ts +5 -0
  251. package/Utils/SecurityEvent/LogParsers/SecurityLogLine.js +22 -2
  252. package/Utils/SecurityEvent/LogParsers/SecurityLogLine.mjs +2 -0
  253. package/Utils/SecurityEvent/LogParsers/WebAttackLogParser.d.mts +20 -0
  254. package/Utils/SecurityEvent/LogParsers/WebAttackLogParser.d.ts +20 -0
  255. package/Utils/SecurityEvent/LogParsers/WebAttackLogParser.js +347 -31
  256. package/Utils/SecurityEvent/LogParsers/WebAttackLogParser.mjs +11 -0
  257. package/Utils/SecurityEvent/RequestFollowUp.d.mts +4 -0
  258. package/Utils/SecurityEvent/RequestFollowUp.d.ts +4 -0
  259. package/Utils/SecurityEvent/RequestFollowUp.js +127 -0
  260. package/Utils/SecurityEvent/RequestFollowUp.mjs +3 -0
  261. package/Utils/SecurityEvent/RequestOutcome.d.mts +80 -0
  262. package/Utils/SecurityEvent/RequestOutcome.d.ts +80 -0
  263. package/Utils/SecurityEvent/RequestOutcome.js +371 -0
  264. package/Utils/SecurityEvent/RequestOutcome.mjs +18 -0
  265. package/Utils/SecurityEvent/TelemetryScan/AuditLogSignals.d.mts +76 -0
  266. package/Utils/SecurityEvent/TelemetryScan/AuditLogSignals.d.ts +76 -0
  267. package/Utils/SecurityEvent/TelemetryScan/AuditLogSignals.js +348 -0
  268. package/Utils/SecurityEvent/TelemetryScan/AuditLogSignals.mjs +15 -0
  269. package/Utils/SecurityEvent/TelemetryScan/FlowSignals.d.mts +61 -0
  270. package/Utils/SecurityEvent/TelemetryScan/FlowSignals.d.ts +61 -0
  271. package/Utils/SecurityEvent/TelemetryScan/FlowSignals.js +260 -0
  272. package/Utils/SecurityEvent/TelemetryScan/FlowSignals.mjs +17 -0
  273. package/Utils/SecurityEvent/TelemetryScan/RumSignals.d.mts +30 -0
  274. package/Utils/SecurityEvent/TelemetryScan/RumSignals.d.ts +30 -0
  275. package/Utils/SecurityEvent/TelemetryScan/RumSignals.js +134 -0
  276. package/Utils/SecurityEvent/TelemetryScan/RumSignals.mjs +8 -0
  277. package/Utils/SecurityEvent/TelemetryScan/TelemetrySecurityEvent.d.mts +40 -0
  278. package/Utils/SecurityEvent/TelemetryScan/TelemetrySecurityEvent.d.ts +40 -0
  279. package/Utils/SecurityEvent/TelemetryScan/TelemetrySecurityEvent.js +190 -0
  280. package/Utils/SecurityEvent/TelemetryScan/TelemetrySecurityEvent.mjs +6 -0
  281. package/Utils/SecurityEvent/TelemetryScan/TraceSignals.d.mts +57 -0
  282. package/Utils/SecurityEvent/TelemetryScan/TraceSignals.d.ts +57 -0
  283. package/Utils/SecurityEvent/TelemetryScan/TraceSignals.js +491 -0
  284. package/Utils/SecurityEvent/TelemetryScan/TraceSignals.mjs +27 -0
  285. package/Utils/Telemetry/EntrySpan.d.mts +8 -0
  286. package/Utils/Telemetry/EntrySpan.d.ts +8 -0
  287. package/Utils/Telemetry/EntrySpan.js +53 -0
  288. package/Utils/Telemetry/EntrySpan.mjs +4 -0
  289. package/package.json +1 -1
@@ -33,6 +33,7 @@ const UserTelegram_1 = __importDefault(require("./UserTelegram"));
33
33
  const UserSlack_1 = __importDefault(require("./UserSlack"));
34
34
  const UserMicrosoftTeams_1 = __importDefault(require("./UserMicrosoftTeams"));
35
35
  const UserWebhook_1 = __importDefault(require("./UserWebhook"));
36
+ const CustomNotificationChannel_1 = __importDefault(require("./CustomNotificationChannel"));
36
37
  const UserWhatsApp_1 = __importDefault(require("./UserWhatsApp"));
37
38
  const DatabaseBaseModel_1 = __importDefault(require("./DatabaseBaseModel/DatabaseBaseModel"));
38
39
  const Route_1 = __importDefault(require("../../Types/API/Route"));
@@ -139,6 +140,13 @@ let UserOnCallLogTimeline = class UserOnCallLogTimeline extends DatabaseBaseMode
139
140
  this.userMicrosoftTeamsId = undefined;
140
141
  this.userWebhook = undefined;
141
142
  this.userWebhookId = undefined;
143
+ /*
144
+ * The custom channel a page went out on. Its name is the one column a
145
+ * relation reads (CustomNotificationChannel), which is what the on-call log
146
+ * shows; the history stays when the channel is deleted.
147
+ */
148
+ this.customNotificationChannel = undefined;
149
+ this.customNotificationChannelId = undefined;
142
150
  this.userEmail = undefined;
143
151
  this.userEmailId = undefined;
144
152
  this.userPush = undefined;
@@ -1208,6 +1216,51 @@ __decorate([
1208
1216
  }),
1209
1217
  __metadata("design:type", ObjectID_1.default)
1210
1218
  ], UserOnCallLogTimeline.prototype, "userWebhookId", void 0);
1219
+ __decorate([
1220
+ (0, ColumnAccessControl_1.default)({
1221
+ create: [],
1222
+ read: [Permission_1.default.CurrentUser],
1223
+ update: [],
1224
+ }),
1225
+ (0, TableColumn_1.default)({
1226
+ manyToOneRelationColumn: "customNotificationChannelId",
1227
+ type: TableColumnType_1.default.Entity,
1228
+ modelType: CustomNotificationChannel_1.default,
1229
+ title: "Custom Channel",
1230
+ description: "Relation to the Custom Channel this notification was sent on",
1231
+ }),
1232
+ (0, typeorm_1.ManyToOne)(() => {
1233
+ return CustomNotificationChannel_1.default;
1234
+ }, {
1235
+ eager: false,
1236
+ nullable: true,
1237
+ onDelete: "SET NULL",
1238
+ orphanedRowAction: "nullify",
1239
+ }),
1240
+ (0, typeorm_1.JoinColumn)({ name: "customNotificationChannelId" }),
1241
+ __metadata("design:type", CustomNotificationChannel_1.default)
1242
+ ], UserOnCallLogTimeline.prototype, "customNotificationChannel", void 0);
1243
+ __decorate([
1244
+ (0, ColumnAccessControl_1.default)({
1245
+ create: [],
1246
+ read: [Permission_1.default.CurrentUser],
1247
+ update: [],
1248
+ }),
1249
+ (0, typeorm_1.Index)(),
1250
+ (0, TableColumn_1.default)({
1251
+ type: TableColumnType_1.default.ObjectID,
1252
+ required: false,
1253
+ canReadOnRelationQuery: true,
1254
+ title: "Custom Channel ID",
1255
+ description: "ID of the Custom Channel this notification was sent on",
1256
+ }),
1257
+ (0, typeorm_1.Column)({
1258
+ type: ColumnType_1.default.ObjectID,
1259
+ nullable: true,
1260
+ transformer: ObjectID_1.default.getDatabaseTransformer(),
1261
+ }),
1262
+ __metadata("design:type", ObjectID_1.default)
1263
+ ], UserOnCallLogTimeline.prototype, "customNotificationChannelId", void 0);
1211
1264
  __decorate([
1212
1265
  (0, ColumnAccessControl_1.default)({
1213
1266
  create: [],
@@ -33,22 +33,28 @@ class AIChatPermissionModeHelper {
33
33
  static parse(value) {
34
34
  return this.isValid(value) ? value : this.getDefault();
35
35
  }
36
+ /*
37
+ * The modes in the order the permission menu offers them, each with the
38
+ * name the menu, its button and the docs give it, and what it means. The
39
+ * Dashboard draws the same words from its own translated keys
40
+ * (Components/AIChat/PermissionModePicker and PermissionModeWords).
41
+ */
36
42
  static getOptions() {
37
43
  return [
38
44
  {
39
45
  value: AIChatPermissionMode.AskForApproval,
40
- title: "Ask for approval",
41
- description: "The copilot pauses and asks before it changes anything (creating incidents, acknowledging alerts, etc).",
46
+ title: "Ask to act",
47
+ description: "Asks for approval before it changes anything.",
42
48
  },
43
49
  {
44
50
  value: AIChatPermissionMode.AutoRun,
45
- title: "Auto-run (bypass approvals)",
46
- description: "The copilot performs actions immediately, still limited to what your role can do.",
51
+ title: "Auto-run",
52
+ description: "Acts on clear requests right away, within your permissions.",
47
53
  },
48
54
  {
49
55
  value: AIChatPermissionMode.ReadOnly,
50
56
  title: "Read-only",
51
- description: "The copilot can investigate and answer questions but can never change anything.",
57
+ description: "Only reads and answers. It never changes anything.",
52
58
  },
53
59
  ];
54
60
  }
@@ -0,0 +1,11 @@
1
+ export interface ResourceCardFact {
2
+ label: string;
3
+ value: string;
4
+ }
5
+ export declare function isFactSaidByHeading(value: string, heading: string): boolean;
6
+ export declare function isFactSaidBySubheading(fact: ResourceCardFact, subheading: string): boolean;
7
+ export declare function getFactsNotInHeading(card: {
8
+ heading?: string | undefined;
9
+ subheading?: string | undefined;
10
+ fields?: Array<ResourceCardFact> | undefined;
11
+ }): Array<ResourceCardFact>;
@@ -0,0 +1,11 @@
1
+ export interface ResourceCardFact {
2
+ label: string;
3
+ value: string;
4
+ }
5
+ export declare function isFactSaidByHeading(value: string, heading: string): boolean;
6
+ export declare function isFactSaidBySubheading(fact: ResourceCardFact, subheading: string): boolean;
7
+ export declare function getFactsNotInHeading(card: {
8
+ heading?: string | undefined;
9
+ subheading?: string | undefined;
10
+ fields?: Array<ResourceCardFact> | undefined;
11
+ }): Array<ResourceCardFact>;
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ /*
3
+ * A card Ask AI leaves under an answer says each fact once.
4
+ *
5
+ * Its heading names the record ("#42 · Payment API down", "ALT-12 · High
6
+ * memory usage on test01") and its subheading a line about it ("Severity:
7
+ * High", "Incident #42"). The facts under them used to say both again:
8
+ * Number #42 under a heading that starts with #42, Severity High under
9
+ * "Severity: High" - lines that told the reader nothing the two lines
10
+ * above had not. A fact the heading or the subheading already says is left
11
+ * out; every other fact stays, in its order.
12
+ *
13
+ * Only exact repeats count: a value is said when it is the whole line, one
14
+ * of its parts ("#42" in "#42 · Payment API down"), or - for the
15
+ * subheading - the fact itself written as a line ("Severity: High",
16
+ * "Incident #42"). Never a word inside a title or a description: an alert
17
+ * titled "Memory is high" does not say its severity is High.
18
+ *
19
+ * Applied where a card is built (WidgetBuilder.resourceCard, for every
20
+ * write tool at once), where it is drawn (ResourceCardWidget, so a card
21
+ * saved in an older conversation reads the same) and where a conversation
22
+ * is exported (ChatWidgetMarkdown).
23
+ */
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.isFactSaidByHeading = isFactSaidByHeading;
26
+ exports.isFactSaidBySubheading = isFactSaidBySubheading;
27
+ exports.getFactsNotInHeading = getFactsNotInHeading;
28
+ // The separator a card's heading puts between its parts ("#42 · Title").
29
+ const LINE_PART_SEPARATOR = " · ";
30
+ function normalize(text) {
31
+ return text.trim().toLowerCase();
32
+ }
33
+ // The line and its parts, each as it is compared.
34
+ function getComparableParts(line) {
35
+ const shownLine = normalize(line);
36
+ if (!shownLine) {
37
+ return [];
38
+ }
39
+ return [
40
+ shownLine,
41
+ ...shownLine.split(LINE_PART_SEPARATOR).map((part) => {
42
+ return part.trim();
43
+ }),
44
+ ];
45
+ }
46
+ /*
47
+ * Whether the heading already says this value: the value is the heading,
48
+ * or one of its parts.
49
+ */
50
+ function isFactSaidByHeading(value, heading) {
51
+ const shownValue = normalize(value);
52
+ return (shownValue.length > 0 && getComparableParts(heading).includes(shownValue));
53
+ }
54
+ /*
55
+ * Whether the subheading already says this fact: its value is the line or
56
+ * one of its parts, or the line is the fact itself ("Severity: High",
57
+ * "Incident #42").
58
+ */
59
+ function isFactSaidBySubheading(fact, subheading) {
60
+ const shownValue = normalize(fact.value || "");
61
+ const shownLabel = normalize(fact.label || "");
62
+ if (!shownValue) {
63
+ return false;
64
+ }
65
+ const parts = getComparableParts(subheading);
66
+ return (parts.includes(shownValue) ||
67
+ (shownLabel.length > 0 &&
68
+ (parts.includes(`${shownLabel}: ${shownValue}`) ||
69
+ parts.includes(`${shownLabel} ${shownValue}`))));
70
+ }
71
+ /*
72
+ * The facts a card draws: those its heading and subheading do not already
73
+ * say.
74
+ */
75
+ function getFactsNotInHeading(card) {
76
+ return (card.fields || []).filter((field) => {
77
+ return !(isFactSaidByHeading(field.value || "", card.heading || "") ||
78
+ isFactSaidBySubheading(field, card.subheading || ""));
79
+ });
80
+ }
@@ -0,0 +1,4 @@
1
+ import commonJsModule from "./ResourceCardFacts.js";
2
+ export const getFactsNotInHeading = commonJsModule.getFactsNotInHeading;
3
+ export const isFactSaidByHeading = commonJsModule.isFactSaidByHeading;
4
+ export const isFactSaidBySubheading = commonJsModule.isFactSaidBySubheading;
@@ -51,6 +51,9 @@ export default class AnalyticsTableColumn {
51
51
  get defaultValue(): JSONValue;
52
52
  set defaultValue(v: JSONValue);
53
53
  get isDefaultValueColumn(): boolean;
54
+ private _defaultExpression;
55
+ get defaultExpression(): string | undefined;
56
+ set defaultExpression(v: string | undefined);
54
57
  private _billingAccessControl?;
55
58
  get billingAccessControl(): ColumnBillingAccessControl | undefined;
56
59
  set billingAccessControl(v: ColumnBillingAccessControl | undefined);
@@ -84,6 +87,7 @@ export default class AnalyticsTableColumn {
84
87
  description: string;
85
88
  required: boolean;
86
89
  defaultValue?: JSONValue | undefined;
90
+ defaultExpression?: string | undefined;
87
91
  type: TableColumnType;
88
92
  billingAccessControl?: ColumnBillingAccessControl | undefined;
89
93
  isTenantId?: boolean | undefined;
@@ -51,6 +51,9 @@ export default class AnalyticsTableColumn {
51
51
  get defaultValue(): JSONValue;
52
52
  set defaultValue(v: JSONValue);
53
53
  get isDefaultValueColumn(): boolean;
54
+ private _defaultExpression;
55
+ get defaultExpression(): string | undefined;
56
+ set defaultExpression(v: string | undefined);
54
57
  private _billingAccessControl?;
55
58
  get billingAccessControl(): ColumnBillingAccessControl | undefined;
56
59
  set billingAccessControl(v: ColumnBillingAccessControl | undefined);
@@ -84,6 +87,7 @@ export default class AnalyticsTableColumn {
84
87
  description: string;
85
88
  required: boolean;
86
89
  defaultValue?: JSONValue | undefined;
90
+ defaultExpression?: string | undefined;
87
91
  type: TableColumnType;
88
92
  billingAccessControl?: ColumnBillingAccessControl | undefined;
89
93
  isTenantId?: boolean | undefined;
@@ -81,6 +81,12 @@ class AnalyticsTableColumn {
81
81
  get isDefaultValueColumn() {
82
82
  return Boolean(this.defaultValue !== undefined);
83
83
  }
84
+ get defaultExpression() {
85
+ return this._defaultExpression;
86
+ }
87
+ set defaultExpression(v) {
88
+ this._defaultExpression = v;
89
+ }
84
90
  get billingAccessControl() {
85
91
  return this._billingAccessControl;
86
92
  }
@@ -161,6 +167,7 @@ class AnalyticsTableColumn {
161
167
  this.isTenantId = data.isTenantId || false;
162
168
  this.forceGetDefaultValueOnCreate = data.forceGetDefaultValueOnCreate;
163
169
  this.defaultValue = data.defaultValue;
170
+ this.defaultExpression = data.defaultExpression;
164
171
  this.billingAccessControl = data.billingAccessControl;
165
172
  this.allowAccessIfSubscriptionIsUnpaid =
166
173
  data.allowAccessIfSubscriptionIsUnpaid || false;
@@ -1,5 +1,6 @@
1
1
  import IconProp from "../../Icon/IconProp.mjs";
2
2
  import { JSONObject, JSONValue } from "../../JSON.mjs";
3
+ import ProviderLogo from "../../ProviderLogo/ProviderLogo.mjs";
3
4
  import { ConnectorField } from "../../SecurityEvent/Connectors/SecurityEventConnectorCatalog.mjs";
4
5
  import AuditLogExportDestinationType from "./AuditLogExportDestinationType.mjs";
5
6
  export interface AuditLogExportDestinationField extends ConnectorField {
@@ -18,6 +19,7 @@ export interface AuditLogExportDestinationDefinition {
18
19
  title: string;
19
20
  description: string;
20
21
  icon: IconProp;
22
+ logo?: ProviderLogo | undefined;
21
23
  kind: AuditLogExportDestinationKind;
22
24
  docsPath: string;
23
25
  configFields: Array<AuditLogExportDestinationField>;
@@ -1,5 +1,6 @@
1
1
  import IconProp from "../../Icon/IconProp";
2
2
  import { JSONObject, JSONValue } from "../../JSON";
3
+ import ProviderLogo from "../../ProviderLogo/ProviderLogo";
3
4
  import { ConnectorField } from "../../SecurityEvent/Connectors/SecurityEventConnectorCatalog";
4
5
  import AuditLogExportDestinationType from "./AuditLogExportDestinationType";
5
6
  export interface AuditLogExportDestinationField extends ConnectorField {
@@ -18,6 +19,7 @@ export interface AuditLogExportDestinationDefinition {
18
19
  title: string;
19
20
  description: string;
20
21
  icon: IconProp;
22
+ logo?: ProviderLogo | undefined;
21
23
  kind: AuditLogExportDestinationKind;
22
24
  docsPath: string;
23
25
  configFields: Array<AuditLogExportDestinationField>;
@@ -9,6 +9,7 @@ exports.getAuditLogExportDestinationTitle = getAuditLogExportDestinationTitle;
9
9
  exports.readAuditLogExportConfigValue = readAuditLogExportConfigValue;
10
10
  exports.isAuditLogExportFieldShown = isAuditLogExportFieldShown;
11
11
  const IconProp_1 = __importDefault(require("../../Icon/IconProp"));
12
+ const ProviderLogo_1 = __importDefault(require("../../ProviderLogo/ProviderLogo"));
12
13
  const AuditLogExportDestinationType_1 = __importDefault(require("./AuditLogExportDestinationType"));
13
14
  var AuditLogExportDestinationKind;
14
15
  (function (AuditLogExportDestinationKind) {
@@ -85,6 +86,7 @@ exports.AuditLogExportDestinationCatalog = [
85
86
  title: "Amazon S3",
86
87
  description: "Compressed NDJSON files in an S3 bucket.",
87
88
  icon: IconProp_1.default.Archive,
89
+ logo: ProviderLogo_1.default.AmazonS3,
88
90
  kind: AuditLogExportDestinationKind.Files,
89
91
  docsPath: `${exports.AUDIT_LOG_EXPORT_DOCS_PATH}#amazon-s3`,
90
92
  maxEntriesPerBatch: FILE_MAX_ENTRIES_PER_BATCH,
@@ -157,6 +159,7 @@ exports.AuditLogExportDestinationCatalog = [
157
159
  title: "Google Cloud Storage",
158
160
  description: "Compressed NDJSON files in a Cloud Storage bucket.",
159
161
  icon: IconProp_1.default.Cloud,
162
+ logo: ProviderLogo_1.default.GoogleCloudStorage,
160
163
  kind: AuditLogExportDestinationKind.Files,
161
164
  docsPath: `${exports.AUDIT_LOG_EXPORT_DOCS_PATH}#google-cloud-storage`,
162
165
  maxEntriesPerBatch: FILE_MAX_ENTRIES_PER_BATCH,
@@ -188,6 +191,7 @@ exports.AuditLogExportDestinationCatalog = [
188
191
  title: "Azure Blob Storage",
189
192
  description: "Compressed NDJSON files in a Blob Storage container.",
190
193
  icon: IconProp_1.default.CloudArrowUp,
194
+ logo: ProviderLogo_1.default.AzureBlobStorage,
191
195
  kind: AuditLogExportDestinationKind.Files,
192
196
  docsPath: `${exports.AUDIT_LOG_EXPORT_DOCS_PATH}#azure-blob-storage`,
193
197
  maxEntriesPerBatch: FILE_MAX_ENTRIES_PER_BATCH,
@@ -1,5 +1,6 @@
1
1
  import IconProp from "../Icon/IconProp.mjs";
2
2
  import { JSONObject, JSONValue } from "../JSON.mjs";
3
+ import ProviderLogo from "../ProviderLogo/ProviderLogo.mjs";
3
4
  import { AuditLogExportDestinationField } from "../AuditLog/Export/AuditLogExportDestinationCatalog.mjs";
4
5
  import BackupDestinationType from "./BackupDestinationType.mjs";
5
6
  export type BackupDestinationField = AuditLogExportDestinationField;
@@ -30,6 +31,7 @@ export interface BackupProviderDefinition {
30
31
  title: string;
31
32
  description: string;
32
33
  icon: IconProp;
34
+ logo?: ProviderLogo | undefined;
33
35
  docsPath: string;
34
36
  endpointPlaceholder?: string | undefined;
35
37
  endpointDescription?: string | undefined;
@@ -1,5 +1,6 @@
1
1
  import IconProp from "../Icon/IconProp";
2
2
  import { JSONObject, JSONValue } from "../JSON";
3
+ import ProviderLogo from "../ProviderLogo/ProviderLogo";
3
4
  import { AuditLogExportDestinationField } from "../AuditLog/Export/AuditLogExportDestinationCatalog";
4
5
  import BackupDestinationType from "./BackupDestinationType";
5
6
  export type BackupDestinationField = AuditLogExportDestinationField;
@@ -30,6 +31,7 @@ export interface BackupProviderDefinition {
30
31
  title: string;
31
32
  description: string;
32
33
  icon: IconProp;
34
+ logo?: ProviderLogo | undefined;
33
35
  docsPath: string;
34
36
  endpointPlaceholder?: string | undefined;
35
37
  endpointDescription?: string | undefined;
@@ -12,6 +12,7 @@ exports.readBackupConfigValue = readBackupConfigValue;
12
12
  exports.isBackupFieldShown = isBackupFieldShown;
13
13
  exports.inferS3RegionFromEndpoint = inferS3RegionFromEndpoint;
14
14
  const IconProp_1 = __importDefault(require("../Icon/IconProp"));
15
+ const ProviderLogo_1 = __importDefault(require("../ProviderLogo/ProviderLogo"));
15
16
  const AuditLogExportDestinationCatalog_1 = require("../AuditLog/Export/AuditLogExportDestinationCatalog");
16
17
  const BackupDestinationType_1 = __importDefault(require("./BackupDestinationType"));
17
18
  exports.BACKUP_DOCS_PATH = "/docs/installation/backups";
@@ -246,6 +247,7 @@ exports.BackupProviderCatalog = [
246
247
  title: "Amazon S3",
247
248
  description: "A bucket in your AWS account.",
248
249
  icon: IconProp_1.default.Archive,
250
+ logo: ProviderLogo_1.default.AmazonS3,
249
251
  docsPath: `${exports.BACKUP_DOCS_PATH}#amazon-s3`,
250
252
  },
251
253
  {
@@ -254,6 +256,7 @@ exports.BackupProviderCatalog = [
254
256
  title: "Cloudflare R2",
255
257
  description: "S3-compatible, with no fees for reading backups back.",
256
258
  icon: IconProp_1.default.Cloud,
259
+ logo: ProviderLogo_1.default.Cloudflare,
257
260
  docsPath: `${exports.BACKUP_DOCS_PATH}#cloudflare-r2`,
258
261
  endpointPlaceholder: "https://<account-id>.r2.cloudflarestorage.com",
259
262
  endpointDescription: "Your account's S3 API address, from R2 > the bucket > Settings.",
@@ -264,6 +267,7 @@ exports.BackupProviderCatalog = [
264
267
  title: "Backblaze B2",
265
268
  description: "Low-cost S3-compatible storage.",
266
269
  icon: IconProp_1.default.ServerStack,
270
+ logo: ProviderLogo_1.default.Backblaze,
267
271
  docsPath: `${exports.BACKUP_DOCS_PATH}#backblaze-b2`,
268
272
  endpointPlaceholder: "https://s3.us-west-004.backblazeb2.com",
269
273
  endpointDescription: "The bucket's S3 endpoint, shown on its Buckets page.",
@@ -274,6 +278,7 @@ exports.BackupProviderCatalog = [
274
278
  title: "Wasabi",
275
279
  description: "S3-compatible storage with no egress fees.",
276
280
  icon: IconProp_1.default.InboxStack,
281
+ logo: ProviderLogo_1.default.Wasabi,
277
282
  docsPath: `${exports.BACKUP_DOCS_PATH}#wasabi`,
278
283
  endpointPlaceholder: "https://s3.us-east-1.wasabisys.com",
279
284
  endpointDescription: "The service URL of the bucket's region.",
@@ -284,6 +289,7 @@ exports.BackupProviderCatalog = [
284
289
  title: "MinIO",
285
290
  description: "S3-compatible storage you run yourself.",
286
291
  icon: IconProp_1.default.Server,
292
+ logo: ProviderLogo_1.default.MinIO,
287
293
  docsPath: `${exports.BACKUP_DOCS_PATH}#minio`,
288
294
  endpointPlaceholder: "https://minio.example.com:9000",
289
295
  endpointDescription: "Your MinIO server's S3 API address. OneUptime and ClickHouse must both reach it.",
@@ -294,6 +300,7 @@ exports.BackupProviderCatalog = [
294
300
  title: "Google Cloud Storage",
295
301
  description: "A bucket in your Google Cloud project.",
296
302
  icon: IconProp_1.default.CloudArrowUp,
303
+ logo: ProviderLogo_1.default.GoogleCloudStorage,
297
304
  docsPath: `${exports.BACKUP_DOCS_PATH}#google-cloud-storage`,
298
305
  },
299
306
  {
@@ -302,6 +309,7 @@ exports.BackupProviderCatalog = [
302
309
  title: "Azure Blob Storage",
303
310
  description: "A container in your Azure storage account.",
304
311
  icon: IconProp_1.default.CloudArrowDown,
312
+ logo: ProviderLogo_1.default.AzureBlobStorage,
305
313
  docsPath: `${exports.BACKUP_DOCS_PATH}#azure-blob-storage`,
306
314
  },
307
315
  {
@@ -0,0 +1,25 @@
1
+ import { JSONObject } from "../JSON.mjs";
2
+ import { CustomChannelActionLinks, CustomChannelReference } from "../CustomNotificationChannel/CustomNotificationChannelPayload.mjs";
3
+ export declare const CALL_AND_SMS_GATEWAY_PAYLOAD_VERSION: number;
4
+ export declare const MAX_CALL_AND_SMS_GATEWAY_MESSAGE_LENGTH: number;
5
+ export declare enum CallAndSmsGatewayEvent {
6
+ Sms = "sms",
7
+ Call = "call",
8
+ Test = "test"
9
+ }
10
+ export interface CallAndSmsGatewayMessageInput {
11
+ event: CallAndSmsGatewayEvent.Sms | CallAndSmsGatewayEvent.Call;
12
+ id: string;
13
+ sentAt: Date;
14
+ to: string;
15
+ message: string;
16
+ isSensitive: boolean;
17
+ project?: CustomChannelReference | undefined;
18
+ actions?: CustomChannelActionLinks | undefined;
19
+ }
20
+ export interface CallAndSmsGatewayTestInput {
21
+ id: string;
22
+ sentAt: Date;
23
+ }
24
+ export declare const buildCallAndSmsGatewayMessagePayload: (input: CallAndSmsGatewayMessageInput) => JSONObject;
25
+ export declare const buildCallAndSmsGatewayTestPayload: (input: CallAndSmsGatewayTestInput) => JSONObject;
@@ -0,0 +1,25 @@
1
+ import { JSONObject } from "../JSON";
2
+ import { CustomChannelActionLinks, CustomChannelReference } from "../CustomNotificationChannel/CustomNotificationChannelPayload";
3
+ export declare const CALL_AND_SMS_GATEWAY_PAYLOAD_VERSION: number;
4
+ export declare const MAX_CALL_AND_SMS_GATEWAY_MESSAGE_LENGTH: number;
5
+ export declare enum CallAndSmsGatewayEvent {
6
+ Sms = "sms",
7
+ Call = "call",
8
+ Test = "test"
9
+ }
10
+ export interface CallAndSmsGatewayMessageInput {
11
+ event: CallAndSmsGatewayEvent.Sms | CallAndSmsGatewayEvent.Call;
12
+ id: string;
13
+ sentAt: Date;
14
+ to: string;
15
+ message: string;
16
+ isSensitive: boolean;
17
+ project?: CustomChannelReference | undefined;
18
+ actions?: CustomChannelActionLinks | undefined;
19
+ }
20
+ export interface CallAndSmsGatewayTestInput {
21
+ id: string;
22
+ sentAt: Date;
23
+ }
24
+ export declare const buildCallAndSmsGatewayMessagePayload: (input: CallAndSmsGatewayMessageInput) => JSONObject;
25
+ export declare const buildCallAndSmsGatewayTestPayload: (input: CallAndSmsGatewayTestInput) => JSONObject;
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildCallAndSmsGatewayTestPayload = exports.buildCallAndSmsGatewayMessagePayload = exports.CallAndSmsGatewayEvent = exports.MAX_CALL_AND_SMS_GATEWAY_MESSAGE_LENGTH = exports.CALL_AND_SMS_GATEWAY_PAYLOAD_VERSION = void 0;
4
+ const CustomNotificationChannelPayload_1 = require("../CustomNotificationChannel/CustomNotificationChannelPayload");
5
+ const MessageFit_1 = require("../../Utils/MessageFit");
6
+ /*
7
+ * WHAT AN SMS AND CALL GATEWAY RECEIVES.
8
+ *
9
+ * A server that sends its SMS and calls through its own gateway
10
+ * (CallAndSmsProvider.Gateway) posts each of them to the gateway's URL as
11
+ * one JSON request, signed with the gateway's secret and naming its event,
12
+ * in the same headers a custom channel's requests carry
13
+ * (X-OneUptime-Signature: sha256=<hex HMAC-SHA256 of the body>,
14
+ * X-OneUptime-Event: sms, call or test) - so one verifier serves both.
15
+ *
16
+ * A call is described, not scripted: what it says, and - when it pages
17
+ * somebody on call - the links that acknowledge, escalate or resolve what
18
+ * it is about, which the gateway can offer as key presses. Twilio's "press
19
+ * 1" is left out of what it says: it is Twilio's keypad, and the gateway
20
+ * has its own.
21
+ *
22
+ * The shape is a contract with services OneUptime does not own, so it carries
23
+ * a version, fields are only ever added to it, and the docs
24
+ * (self-hosted/sms-and-call-gateway) describe every one of them.
25
+ *
26
+ * Pure, with no Node or browser APIs.
27
+ */
28
+ exports.CALL_AND_SMS_GATEWAY_PAYLOAD_VERSION = 1;
29
+ /*
30
+ * The longest message a request carries, in characters. An SMS is held to
31
+ * what an SMS can be before it gets here (MAX_SMS_LENGTH); this bounds what
32
+ * a call says - a template can place a description of any length in it.
33
+ */
34
+ exports.MAX_CALL_AND_SMS_GATEWAY_MESSAGE_LENGTH = 16384;
35
+ var CallAndSmsGatewayEvent;
36
+ (function (CallAndSmsGatewayEvent) {
37
+ CallAndSmsGatewayEvent["Sms"] = "sms";
38
+ CallAndSmsGatewayEvent["Call"] = "call";
39
+ CallAndSmsGatewayEvent["Test"] = "test";
40
+ })(CallAndSmsGatewayEvent || (exports.CallAndSmsGatewayEvent = CallAndSmsGatewayEvent = {}));
41
+ const toActionsJson = (actions) => {
42
+ if (!actions) {
43
+ return null;
44
+ }
45
+ return {
46
+ [CustomNotificationChannelPayload_1.CustomChannelAction.Acknowledge]: actions[CustomNotificationChannelPayload_1.CustomChannelAction.Acknowledge],
47
+ [CustomNotificationChannelPayload_1.CustomChannelAction.Escalate]: actions[CustomNotificationChannelPayload_1.CustomChannelAction.Escalate],
48
+ [CustomNotificationChannelPayload_1.CustomChannelAction.Resolve]: actions[CustomNotificationChannelPayload_1.CustomChannelAction.Resolve],
49
+ };
50
+ };
51
+ // The body of a request that carries an SMS or a call.
52
+ const buildCallAndSmsGatewayMessagePayload = (input) => {
53
+ return {
54
+ version: exports.CALL_AND_SMS_GATEWAY_PAYLOAD_VERSION,
55
+ event: input.event,
56
+ id: input.id,
57
+ sentAt: input.sentAt.toISOString(),
58
+ to: input.to,
59
+ message: (0, MessageFit_1.fitTextToLength)(input.message || "", exports.MAX_CALL_AND_SMS_GATEWAY_MESSAGE_LENGTH, MessageFit_1.TRUNCATED_TEXT_NOTE_PLAIN),
60
+ isSensitive: input.isSensitive,
61
+ project: input.project
62
+ ? { id: input.project.id, name: input.project.name }
63
+ : null,
64
+ actions: toActionsJson(input.actions),
65
+ };
66
+ };
67
+ exports.buildCallAndSmsGatewayMessagePayload = buildCallAndSmsGatewayMessagePayload;
68
+ /*
69
+ * The body of Send test: the same shape, to nobody, so a gateway can be
70
+ * tried before a real SMS or call goes through it. It should answer 2xx
71
+ * and send nothing.
72
+ */
73
+ const buildCallAndSmsGatewayTestPayload = (input) => {
74
+ return {
75
+ version: exports.CALL_AND_SMS_GATEWAY_PAYLOAD_VERSION,
76
+ event: CallAndSmsGatewayEvent.Test,
77
+ id: input.id,
78
+ sentAt: input.sentAt.toISOString(),
79
+ to: null,
80
+ message: "This is a test of your SMS and call gateway from OneUptime. Answer 2xx and send nothing.",
81
+ isSensitive: false,
82
+ project: null,
83
+ actions: null,
84
+ };
85
+ };
86
+ exports.buildCallAndSmsGatewayTestPayload = buildCallAndSmsGatewayTestPayload;
@@ -0,0 +1,6 @@
1
+ import commonJsModule from "./CallAndSmsGatewayPayload.js";
2
+ export const CALL_AND_SMS_GATEWAY_PAYLOAD_VERSION = commonJsModule.CALL_AND_SMS_GATEWAY_PAYLOAD_VERSION;
3
+ export const CallAndSmsGatewayEvent = commonJsModule.CallAndSmsGatewayEvent;
4
+ export const MAX_CALL_AND_SMS_GATEWAY_MESSAGE_LENGTH = commonJsModule.MAX_CALL_AND_SMS_GATEWAY_MESSAGE_LENGTH;
5
+ export const buildCallAndSmsGatewayMessagePayload = commonJsModule.buildCallAndSmsGatewayMessagePayload;
6
+ export const buildCallAndSmsGatewayTestPayload = commonJsModule.buildCallAndSmsGatewayTestPayload;
@@ -0,0 +1,23 @@
1
+ export declare enum CallAndSmsProvider {
2
+ Twilio = "Twilio",
3
+ Gateway = "Gateway"
4
+ }
5
+ export declare const CALL_AND_SMS_PROVIDERS: ReadonlyArray<CallAndSmsProvider>;
6
+ export declare const DEFAULT_CALL_AND_SMS_PROVIDER: CallAndSmsProvider;
7
+ export declare const CALL_AND_SMS_PROVIDER_TITLE: string;
8
+ export declare const CALL_AND_SMS_GATEWAY_URL_TITLE: string;
9
+ export interface CallAndSmsGateway {
10
+ url: string;
11
+ secret: string;
12
+ }
13
+ export default class CallAndSmsProviders {
14
+ static isProvider(value: unknown): value is CallAndSmsProvider;
15
+ static getProvider(value: unknown): CallAndSmsProvider;
16
+ static isGateway(value: unknown): boolean;
17
+ static getProviderError(value: unknown): string | null;
18
+ static getGateway(config: {
19
+ callAndSmsProvider?: unknown;
20
+ callAndSmsGatewayUrl?: unknown;
21
+ callAndSmsGatewaySecret?: unknown;
22
+ }): CallAndSmsGateway | null;
23
+ }
@@ -0,0 +1,23 @@
1
+ export declare enum CallAndSmsProvider {
2
+ Twilio = "Twilio",
3
+ Gateway = "Gateway"
4
+ }
5
+ export declare const CALL_AND_SMS_PROVIDERS: ReadonlyArray<CallAndSmsProvider>;
6
+ export declare const DEFAULT_CALL_AND_SMS_PROVIDER: CallAndSmsProvider;
7
+ export declare const CALL_AND_SMS_PROVIDER_TITLE: string;
8
+ export declare const CALL_AND_SMS_GATEWAY_URL_TITLE: string;
9
+ export interface CallAndSmsGateway {
10
+ url: string;
11
+ secret: string;
12
+ }
13
+ export default class CallAndSmsProviders {
14
+ static isProvider(value: unknown): value is CallAndSmsProvider;
15
+ static getProvider(value: unknown): CallAndSmsProvider;
16
+ static isGateway(value: unknown): boolean;
17
+ static getProviderError(value: unknown): string | null;
18
+ static getGateway(config: {
19
+ callAndSmsProvider?: unknown;
20
+ callAndSmsGatewayUrl?: unknown;
21
+ callAndSmsGatewaySecret?: unknown;
22
+ }): CallAndSmsGateway | null;
23
+ }