@oneuptime/common 7.0.3840 → 7.0.3864

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 (1120) hide show
  1. package/Models/DatabaseModels/Index.ts +3 -0
  2. package/Models/DatabaseModels/Monitor.ts +20 -0
  3. package/Models/DatabaseModels/MonitorFeed.ts +520 -0
  4. package/Server/API/BaseAPI.ts +8 -0
  5. package/Server/API/BaseAnalyticsAPI.ts +9 -0
  6. package/Server/API/CommonAPI.ts +2 -0
  7. package/Server/API/SlackAPI.ts +14 -0
  8. package/Server/API/StatusAPI.ts +172 -127
  9. package/Server/API/StatusPageAPI.ts +7 -0
  10. package/Server/DatabaseConfig.ts +8 -0
  11. package/Server/Infrastructure/ClickhouseDatabase.ts +4 -0
  12. package/Server/Infrastructure/GlobalCache.ts +8 -0
  13. package/Server/Infrastructure/LocalCache.ts +11 -0
  14. package/Server/Infrastructure/Postgres/SchemaMigrations/1717605043663-InitialMigration.ts +3 -0
  15. package/Server/Infrastructure/Postgres/SchemaMigrations/1717678334852-MigrationName.ts +3 -0
  16. package/Server/Infrastructure/Postgres/SchemaMigrations/1717839110671-MigrationName.ts +3 -0
  17. package/Server/Infrastructure/Postgres/SchemaMigrations/1717849921874-MigrationName.ts +3 -0
  18. package/Server/Infrastructure/Postgres/SchemaMigrations/1717955235341-MigrationName.ts +3 -0
  19. package/Server/Infrastructure/Postgres/SchemaMigrations/1718037833516-MigrationName.ts +3 -0
  20. package/Server/Infrastructure/Postgres/SchemaMigrations/1718100824584-MigrationName.ts +3 -0
  21. package/Server/Infrastructure/Postgres/SchemaMigrations/1718101665865-MigrationName.ts +3 -0
  22. package/Server/Infrastructure/Postgres/SchemaMigrations/1718119926223-MigrationName.ts +3 -0
  23. package/Server/Infrastructure/Postgres/SchemaMigrations/1718124277321-MigrationName.ts +3 -0
  24. package/Server/Infrastructure/Postgres/SchemaMigrations/1718126316684-MigrationName.ts +3 -0
  25. package/Server/Infrastructure/Postgres/SchemaMigrations/1718188920011-MigrationName.ts +3 -0
  26. package/Server/Infrastructure/Postgres/SchemaMigrations/1718203144945-MigrationName.ts +3 -0
  27. package/Server/Infrastructure/Postgres/SchemaMigrations/1718285877004-MigrationName.ts +3 -0
  28. package/Server/Infrastructure/Postgres/SchemaMigrations/1718618155447-MigrationName.ts +3 -0
  29. package/Server/Infrastructure/Postgres/SchemaMigrations/1718711669847-MigrationName.ts +3 -0
  30. package/Server/Infrastructure/Postgres/SchemaMigrations/1718879960254-MigrationName.ts +3 -0
  31. package/Server/Infrastructure/Postgres/SchemaMigrations/1719227548476-MigrationName.ts +3 -0
  32. package/Server/Infrastructure/Postgres/SchemaMigrations/1719228104620-MigrationName.ts +3 -0
  33. package/Server/Infrastructure/Postgres/SchemaMigrations/1719247426296-MigrationName.ts +3 -0
  34. package/Server/Infrastructure/Postgres/SchemaMigrations/1719348009053-MigrationName.ts +3 -0
  35. package/Server/Infrastructure/Postgres/SchemaMigrations/1719827175832-MigrationName.ts +3 -0
  36. package/Server/Infrastructure/Postgres/SchemaMigrations/1719831213463-MigrationName.ts +3 -0
  37. package/Server/Infrastructure/Postgres/SchemaMigrations/1719838746775-MigrationName.ts +3 -0
  38. package/Server/Infrastructure/Postgres/SchemaMigrations/1719915433542-MigrationName.ts +3 -0
  39. package/Server/Infrastructure/Postgres/SchemaMigrations/1720024126646-MigrationName.ts +3 -0
  40. package/Server/Infrastructure/Postgres/SchemaMigrations/1720532068612-MigrationName.ts +3 -0
  41. package/Server/Infrastructure/Postgres/SchemaMigrations/1720538999941-MigrationName.ts +3 -0
  42. package/Server/Infrastructure/Postgres/SchemaMigrations/1720785305192-MigrationName.ts +3 -0
  43. package/Server/Infrastructure/Postgres/SchemaMigrations/1720805596648-MigrationName.ts +3 -0
  44. package/Server/Infrastructure/Postgres/SchemaMigrations/1720806196274-MigrationName.ts +3 -0
  45. package/Server/Infrastructure/Postgres/SchemaMigrations/1720812937067-MigrationName.ts +3 -0
  46. package/Server/Infrastructure/Postgres/SchemaMigrations/1721075917289-MigrationName.ts +3 -0
  47. package/Server/Infrastructure/Postgres/SchemaMigrations/1721152139648-MigrationName.ts +3 -0
  48. package/Server/Infrastructure/Postgres/SchemaMigrations/1721159743714-MigrationName.ts +3 -0
  49. package/Server/Infrastructure/Postgres/SchemaMigrations/1721754545771-MigrationName.ts +3 -0
  50. package/Server/Infrastructure/Postgres/SchemaMigrations/1721779190475-MigrationName.ts +3 -0
  51. package/Server/Infrastructure/Postgres/SchemaMigrations/1722031205897-MigrationName.ts +3 -0
  52. package/Server/Infrastructure/Postgres/SchemaMigrations/1722543640526-MigrationName.ts +3 -0
  53. package/Server/Infrastructure/Postgres/SchemaMigrations/1722892318363-MigrationName.ts +3 -0
  54. package/Server/Infrastructure/Postgres/SchemaMigrations/1723825511054-MigrationName.ts +3 -0
  55. package/Server/Infrastructure/Postgres/SchemaMigrations/1723828588502-MigrationName.ts +3 -0
  56. package/Server/Infrastructure/Postgres/SchemaMigrations/1724078044172-MigrationName.ts +3 -0
  57. package/Server/Infrastructure/Postgres/SchemaMigrations/1724610006927-MigrationName.ts +3 -0
  58. package/Server/Infrastructure/Postgres/SchemaMigrations/1724613666632-MigrationName.ts +3 -0
  59. package/Server/Infrastructure/Postgres/SchemaMigrations/1724659071843-MigrationName.ts +3 -0
  60. package/Server/Infrastructure/Postgres/SchemaMigrations/1725291476867-MigrationName.ts +3 -0
  61. package/Server/Infrastructure/Postgres/SchemaMigrations/1725357719072-MigrationName.ts +3 -0
  62. package/Server/Infrastructure/Postgres/SchemaMigrations/1725360199561-MigrationName.ts +3 -0
  63. package/Server/Infrastructure/Postgres/SchemaMigrations/1725379949648-MigrationName.ts +3 -0
  64. package/Server/Infrastructure/Postgres/SchemaMigrations/1725551629492-MigrationName.ts +3 -0
  65. package/Server/Infrastructure/Postgres/SchemaMigrations/1725556630384-MigrationName.ts +3 -0
  66. package/Server/Infrastructure/Postgres/SchemaMigrations/1725618842598-MigrationName.ts +3 -0
  67. package/Server/Infrastructure/Postgres/SchemaMigrations/1725880508430-MigrationName.ts +3 -0
  68. package/Server/Infrastructure/Postgres/SchemaMigrations/1725881099935-MigrationName.ts +3 -0
  69. package/Server/Infrastructure/Postgres/SchemaMigrations/1725881475134-MigrationName.ts +3 -0
  70. package/Server/Infrastructure/Postgres/SchemaMigrations/1725884177663-MigrationName.ts +3 -0
  71. package/Server/Infrastructure/Postgres/SchemaMigrations/1725898621366-MigrationName.ts +3 -0
  72. package/Server/Infrastructure/Postgres/SchemaMigrations/1725900315712-MigrationName.ts +3 -0
  73. package/Server/Infrastructure/Postgres/SchemaMigrations/1725901024444-MigrationName.ts +3 -0
  74. package/Server/Infrastructure/Postgres/SchemaMigrations/1725975175669-MigrationName.ts +3 -0
  75. package/Server/Infrastructure/Postgres/SchemaMigrations/1725976810107-MigrationName.ts +3 -0
  76. package/Server/Infrastructure/Postgres/SchemaMigrations/1726831037585-MigrationName.ts +3 -0
  77. package/Server/Infrastructure/Postgres/SchemaMigrations/1727101782315-MigrationName.ts +3 -0
  78. package/Server/Infrastructure/Postgres/SchemaMigrations/1727102156072-MigrationName.ts +3 -0
  79. package/Server/Infrastructure/Postgres/SchemaMigrations/1727102331367-MigrationName.ts +3 -0
  80. package/Server/Infrastructure/Postgres/SchemaMigrations/1727103023745-MigrationName.ts +3 -0
  81. package/Server/Infrastructure/Postgres/SchemaMigrations/1727104469670-MigrationName.ts +3 -0
  82. package/Server/Infrastructure/Postgres/SchemaMigrations/1727192530019-MigrationName.ts +3 -0
  83. package/Server/Infrastructure/Postgres/SchemaMigrations/1727193130193-MigrationName.ts +3 -0
  84. package/Server/Infrastructure/Postgres/SchemaMigrations/1727193702212-MigrationName.ts +3 -0
  85. package/Server/Infrastructure/Postgres/SchemaMigrations/1727194211048-MigrationName.ts +3 -0
  86. package/Server/Infrastructure/Postgres/SchemaMigrations/1727194579925-MigrationName.ts +3 -0
  87. package/Server/Infrastructure/Postgres/SchemaMigrations/1727894983857-MigrationName.ts +3 -0
  88. package/Server/Infrastructure/Postgres/SchemaMigrations/1727906598804-MigrationName.ts +3 -0
  89. package/Server/Infrastructure/Postgres/SchemaMigrations/1728472625805-MigrationName.ts +3 -0
  90. package/Server/Infrastructure/Postgres/SchemaMigrations/1729682875503-MigrationName.ts +3 -0
  91. package/Server/Infrastructure/Postgres/SchemaMigrations/1730117995642-MigrationName.ts +3 -0
  92. package/Server/Infrastructure/Postgres/SchemaMigrations/1730209089495-MigrationName.ts +3 -0
  93. package/Server/Infrastructure/Postgres/SchemaMigrations/1730223198692-MigrationName.ts +3 -0
  94. package/Server/Infrastructure/Postgres/SchemaMigrations/1731433043136-MigrationName.ts +3 -0
  95. package/Server/Infrastructure/Postgres/SchemaMigrations/1731433309124-MigrationName.ts +3 -0
  96. package/Server/Infrastructure/Postgres/SchemaMigrations/1731435267537-MigrationName.ts +3 -0
  97. package/Server/Infrastructure/Postgres/SchemaMigrations/1731435514287-MigrationName.ts +3 -0
  98. package/Server/Infrastructure/Postgres/SchemaMigrations/1732553444010-MigrationName.ts +3 -0
  99. package/Server/Infrastructure/Postgres/SchemaMigrations/1734435866602-MigrationName.ts +3 -0
  100. package/Server/Infrastructure/Postgres/SchemaMigrations/1736364478985-MigrationName.ts +3 -0
  101. package/Server/Infrastructure/Postgres/SchemaMigrations/1736364957990-MigrationName.ts +3 -0
  102. package/Server/Infrastructure/Postgres/SchemaMigrations/1736365532085-MigrationName.ts +3 -0
  103. package/Server/Infrastructure/Postgres/SchemaMigrations/1736675947746-MigrationName.ts +3 -0
  104. package/Server/Infrastructure/Postgres/SchemaMigrations/1736703138918-MigrationName.ts +3 -0
  105. package/Server/Infrastructure/Postgres/SchemaMigrations/1736780194077-MigrationName.ts +3 -0
  106. package/Server/Infrastructure/Postgres/SchemaMigrations/1736780194078-MigrationName.ts +3 -0
  107. package/Server/Infrastructure/Postgres/SchemaMigrations/1736787495707-MigrationName.ts +3 -0
  108. package/Server/Infrastructure/Postgres/SchemaMigrations/1736787985322-MigrationName.ts +3 -0
  109. package/Server/Infrastructure/Postgres/SchemaMigrations/1736788706141-MigrationName.ts +3 -0
  110. package/Server/Infrastructure/Postgres/SchemaMigrations/1736856662868-MigrationName.ts +3 -0
  111. package/Server/Infrastructure/Postgres/SchemaMigrations/1737141420441-MigrationName.ts +3 -0
  112. package/Server/Infrastructure/Postgres/SchemaMigrations/1737713529424-MigrationName.ts +3 -0
  113. package/Server/Infrastructure/Postgres/SchemaMigrations/1737715240684-MigrationName.ts +3 -0
  114. package/Server/Infrastructure/Postgres/SchemaMigrations/1737997557974-MigrationName.ts +3 -0
  115. package/Server/Infrastructure/Postgres/SchemaMigrations/1739209832500-MigrationName.ts +3 -0
  116. package/Server/Infrastructure/Postgres/SchemaMigrations/1739210586538-MigrationName.ts +3 -0
  117. package/Server/Infrastructure/Postgres/SchemaMigrations/1739217257089-MigrationName.ts +3 -0
  118. package/Server/Infrastructure/Postgres/SchemaMigrations/1739282331053-MigrationName.ts +3 -0
  119. package/Server/Infrastructure/Postgres/SchemaMigrations/1739374537088-MigrationName.ts +3 -0
  120. package/Server/Infrastructure/Postgres/SchemaMigrations/1739569321582-MigrationName.ts +3 -0
  121. package/Server/Infrastructure/Postgres/SchemaMigrations/1740164199817-MigrationName.ts +3 -0
  122. package/Server/Infrastructure/Postgres/SchemaMigrations/1740419151825-MigrationName.ts +3 -0
  123. package/Server/Infrastructure/Postgres/SchemaMigrations/1740430229844-MigrationName.ts +3 -0
  124. package/Server/Infrastructure/Postgres/SchemaMigrations/1740597525803-MigrationName.ts +3 -0
  125. package/Server/Infrastructure/Postgres/SchemaMigrations/1740598793630-MigrationName.ts +3 -0
  126. package/Server/Infrastructure/Postgres/SchemaMigrations/1741031019972-MigrationName.ts +3 -0
  127. package/Server/Infrastructure/Postgres/SchemaMigrations/1741209339971-MigrationName.ts +3 -0
  128. package/Server/Infrastructure/Postgres/SchemaMigrations/1741904597606-MigrationName.ts +3 -0
  129. package/Server/Infrastructure/Postgres/SchemaMigrations/1741908200702-MigrationName.ts +3 -0
  130. package/Server/Infrastructure/Postgres/SchemaMigrations/1741955609393-MigrationName.ts +3 -0
  131. package/Server/Infrastructure/Postgres/SchemaMigrations/1741955752685-MigrationName.ts +3 -0
  132. package/Server/Infrastructure/Postgres/SchemaMigrations/1741957080431-MigrationName.ts +3 -0
  133. package/Server/Infrastructure/Postgres/SchemaMigrations/1741959216297-MigrationName.ts +3 -0
  134. package/Server/Infrastructure/Postgres/SchemaMigrations/1742302093234-MigrationName.ts +60 -0
  135. package/Server/Infrastructure/Postgres/SchemaMigrations/1742305668133-MigrationName.ts +17 -0
  136. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +4 -0
  137. package/Server/Infrastructure/PostgresDatabase.ts +11 -0
  138. package/Server/Infrastructure/Queue.ts +6 -0
  139. package/Server/Infrastructure/QueueWorker.ts +3 -0
  140. package/Server/Infrastructure/Redis.ts +7 -0
  141. package/Server/Infrastructure/Semaphore.ts +3 -0
  142. package/Server/Infrastructure/SocketIO.ts +3 -0
  143. package/Server/Infrastructure/Status.ts +3 -0
  144. package/Server/Middleware/BearerTokenAuthorization.ts +2 -0
  145. package/Server/Middleware/ClusterKeyAuthorization.ts +4 -0
  146. package/Server/Middleware/CodeRepositoryAuthorization.ts +2 -0
  147. package/Server/Middleware/NotificationMiddleware.ts +3 -0
  148. package/Server/Middleware/ProjectAuthorization.ts +6 -0
  149. package/Server/Middleware/SlackAuthorization.ts +2 -0
  150. package/Server/Middleware/TelemetryIngest.ts +2 -0
  151. package/Server/Middleware/UserAuthorization.ts +8 -0
  152. package/Server/Services/AccessTokenService.ts +7 -0
  153. package/Server/Services/AlertFeedService.ts +29 -75
  154. package/Server/Services/AlertInternalNoteService.ts +4 -0
  155. package/Server/Services/AlertOwnerTeamService.ts +4 -0
  156. package/Server/Services/AlertOwnerUserService.ts +4 -0
  157. package/Server/Services/AlertService.ts +24 -2
  158. package/Server/Services/AlertSeverityService.ts +5 -1
  159. package/Server/Services/AlertStateService.ts +9 -0
  160. package/Server/Services/AlertStateTimelineService.ts +6 -0
  161. package/Server/Services/AnalyticsDatabaseService.ts +17 -0
  162. package/Server/Services/ApiKeyPermissionService.ts +3 -1
  163. package/Server/Services/ApiKeyService.ts +2 -1
  164. package/Server/Services/BillingInvoiceService.ts +3 -0
  165. package/Server/Services/BillingPaymentMethodService.ts +3 -0
  166. package/Server/Services/BillingService.ts +25 -0
  167. package/Server/Services/CallService.ts +2 -0
  168. package/Server/Services/CopilotActionTypePriorityService.ts +2 -1
  169. package/Server/Services/CopilotCodeRepositoryService.ts +3 -1
  170. package/Server/Services/DashboardService.ts +2 -1
  171. package/Server/Services/DatabaseService.ts +17 -0
  172. package/Server/Services/DomainService.ts +3 -1
  173. package/Server/Services/FileService.ts +4 -1
  174. package/Server/Services/IncidentFeedService.ts +33 -76
  175. package/Server/Services/IncidentInternalNoteService.ts +4 -0
  176. package/Server/Services/IncidentOwnerTeamService.ts +4 -0
  177. package/Server/Services/IncidentOwnerUserService.ts +4 -0
  178. package/Server/Services/IncidentPublicNoteService.ts +5 -0
  179. package/Server/Services/IncidentService.ts +25 -1
  180. package/Server/Services/IncidentSeverityService.ts +5 -1
  181. package/Server/Services/IncidentStateService.ts +9 -0
  182. package/Server/Services/IncidentStateTimelineService.ts +6 -0
  183. package/Server/Services/IncidentTemplateService.ts +3 -0
  184. package/Server/Services/Index.ts +3 -0
  185. package/Server/Services/LabelService.ts +2 -1
  186. package/Server/Services/MailService.ts +2 -0
  187. package/Server/Services/MonitorFeedService.ts +150 -0
  188. package/Server/Services/MonitorGroupService.ts +4 -0
  189. package/Server/Services/MonitorOwnerTeamService.ts +165 -0
  190. package/Server/Services/MonitorOwnerUserService.ts +158 -0
  191. package/Server/Services/MonitorService.ts +247 -0
  192. package/Server/Services/MonitorStatusService.ts +5 -0
  193. package/Server/Services/MonitorStatusTimelineService.ts +66 -0
  194. package/Server/Services/NotificationService.ts +3 -0
  195. package/Server/Services/OnCallDutyPolicyEscalationRuleService.ts +12 -0
  196. package/Server/Services/OnCallDutyPolicyExecutionLogService.ts +4 -0
  197. package/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.ts +4 -0
  198. package/Server/Services/OnCallDutyPolicyScheduleLayerService.ts +3 -0
  199. package/Server/Services/OnCallDutyPolicyScheduleLayerUserService.ts +5 -0
  200. package/Server/Services/OnCallDutyPolicyScheduleService.ts +2 -0
  201. package/Server/Services/OnCallDutyPolicyService.ts +3 -0
  202. package/Server/Services/OnCallDutyPolicyUserOverrideService.ts +3 -0
  203. package/Server/Services/OpenTelemetryIngestService.ts +4 -0
  204. package/Server/Services/ProbeService.ts +7 -0
  205. package/Server/Services/ProjectService.ts +15 -0
  206. package/Server/Services/ProjectUserService.ts +2 -0
  207. package/Server/Services/ScheduledMaintenanceFeedService.ts +29 -80
  208. package/Server/Services/ScheduledMaintenanceInternalNoteService.ts +4 -0
  209. package/Server/Services/ScheduledMaintenanceOwnerTeamService.ts +4 -0
  210. package/Server/Services/ScheduledMaintenanceOwnerUserService.ts +4 -0
  211. package/Server/Services/ScheduledMaintenancePublicNoteService.ts +5 -0
  212. package/Server/Services/ScheduledMaintenanceService.ts +29 -2
  213. package/Server/Services/ScheduledMaintenanceStateService.ts +8 -0
  214. package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +7 -0
  215. package/Server/Services/ScheduledMaintenanceTemplateService.ts +5 -0
  216. package/Server/Services/ServiceCatalogDependencyService.ts +2 -0
  217. package/Server/Services/ServiceCatalogMonitorService.ts +2 -0
  218. package/Server/Services/ServiceCatalogService.ts +2 -0
  219. package/Server/Services/ServiceCatalogTelemetryServiceService.ts +2 -0
  220. package/Server/Services/ShortLinkService.ts +5 -0
  221. package/Server/Services/SmsService.ts +2 -0
  222. package/Server/Services/StatusPageCertificateService.ts +4 -0
  223. package/Server/Services/StatusPageDomainService.ts +14 -0
  224. package/Server/Services/StatusPageFooterLinkService.ts +5 -0
  225. package/Server/Services/StatusPageGroupService.ts +5 -0
  226. package/Server/Services/StatusPageHeaderLinkService.ts +5 -0
  227. package/Server/Services/StatusPageHistoryChartBarColorRuleService.ts +5 -0
  228. package/Server/Services/StatusPagePrivateUserService.ts +3 -0
  229. package/Server/Services/StatusPageResourceService.ts +5 -0
  230. package/Server/Services/StatusPageService.ts +17 -0
  231. package/Server/Services/StatusPageSubscriberService.ts +7 -0
  232. package/Server/Services/TeamMemberService.ts +11 -0
  233. package/Server/Services/TeamPermissionService.ts +7 -0
  234. package/Server/Services/TeamService.ts +3 -0
  235. package/Server/Services/TelemetryAttributeService.ts +3 -0
  236. package/Server/Services/TelemetryIngestionKeyService.ts +2 -0
  237. package/Server/Services/TelemetryServiceService.ts +3 -0
  238. package/Server/Services/TelemetryUsageBillingService.ts +3 -0
  239. package/Server/Services/UserCallService.ts +5 -0
  240. package/Server/Services/UserEmailService.ts +5 -0
  241. package/Server/Services/UserNotificationRuleService.ts +14 -0
  242. package/Server/Services/UserNotificationSettingService.ts +5 -0
  243. package/Server/Services/UserOnCallLogService.ts +4 -0
  244. package/Server/Services/UserOnCallLogTimelineService.ts +2 -0
  245. package/Server/Services/UserService.ts +8 -0
  246. package/Server/Services/UserSmsService.ts +5 -0
  247. package/Server/Services/UserTwoFactorAuthService.ts +3 -0
  248. package/Server/Services/WorkflowService.ts +2 -0
  249. package/Server/Services/WorkspaceNotificationRuleService.ts +146 -32
  250. package/Server/Services/WorkspaceProjectAuthTokenService.ts +5 -0
  251. package/Server/Services/WorkspaceSettingService.ts +3 -0
  252. package/Server/Services/WorkspaceUserAuthTokenService.ts +4 -0
  253. package/Server/Types/AnalyticsDatabase/AggregateBy.ts +2 -0
  254. package/Server/Types/AnalyticsDatabase/ModelPermission.ts +6 -0
  255. package/Server/Types/AnalyticsDatabase/QueryHelper.ts +5 -0
  256. package/Server/Types/Billing/MeteredPlan/ActiveMonitoringMeteredPlan.ts +3 -0
  257. package/Server/Types/Billing/MeteredPlan/AllMeteredPlans.ts +2 -0
  258. package/Server/Types/Billing/MeteredPlan/ServerMeteredPlan.ts +2 -0
  259. package/Server/Types/Billing/MeteredPlan/TelemetryMeteredPlan.ts +3 -0
  260. package/Server/Types/Database/Permissions/AccessControlPermission.ts +6 -0
  261. package/Server/Types/Database/Permissions/BasePermission.ts +2 -0
  262. package/Server/Types/Database/Permissions/BillingPermission.ts +2 -0
  263. package/Server/Types/Database/Permissions/ColumnPermission.ts +6 -0
  264. package/Server/Types/Database/Permissions/CreatePermission.ts +3 -0
  265. package/Server/Types/Database/Permissions/DeletePermission.ts +3 -0
  266. package/Server/Types/Database/Permissions/Index.ts +7 -0
  267. package/Server/Types/Database/Permissions/PermissionsUtil.ts +2 -0
  268. package/Server/Types/Database/Permissions/PublicPermission.ts +3 -0
  269. package/Server/Types/Database/Permissions/QueryPermission.ts +3 -0
  270. package/Server/Types/Database/Permissions/ReadPermission.ts +3 -0
  271. package/Server/Types/Database/Permissions/SelectPermission.ts +2 -0
  272. package/Server/Types/Database/Permissions/TablePermission.ts +4 -0
  273. package/Server/Types/Database/Permissions/TenantPermission.ts +2 -0
  274. package/Server/Types/Database/Permissions/UpdatePermission.ts +3 -0
  275. package/Server/Types/Database/Permissions/UserPermission.ts +2 -0
  276. package/Server/Types/Database/QueryHelper.ts +25 -0
  277. package/Server/Types/Database/QueryUtil.ts +2 -0
  278. package/Server/Types/Database/SelectUtil.ts +2 -0
  279. package/Server/Types/Domain.ts +2 -0
  280. package/Server/Types/Markdown.ts +2 -0
  281. package/Server/Types/Workflow/ComponentCode.ts +2 -0
  282. package/Server/Types/Workflow/Components/API/Delete.ts +2 -0
  283. package/Server/Types/Workflow/Components/API/Get.ts +2 -0
  284. package/Server/Types/Workflow/Components/API/Patch.ts +2 -0
  285. package/Server/Types/Workflow/Components/API/Post.ts +2 -0
  286. package/Server/Types/Workflow/Components/API/Put.ts +2 -0
  287. package/Server/Types/Workflow/Components/API/Utils.ts +3 -0
  288. package/Server/Types/Workflow/Components/BaseModel/CreateManyBaseModel.ts +2 -0
  289. package/Server/Types/Workflow/Components/BaseModel/CreateOneBaseModel.ts +2 -0
  290. package/Server/Types/Workflow/Components/BaseModel/DeleteOneBaseModel.ts +2 -0
  291. package/Server/Types/Workflow/Components/BaseModel/FindManyBaseModel.ts +2 -0
  292. package/Server/Types/Workflow/Components/BaseModel/FindOneBaseModel.ts +2 -0
  293. package/Server/Types/Workflow/Components/BaseModel/OnTriggerBaseModel.ts +4 -0
  294. package/Server/Types/Workflow/Components/BaseModel/UpdateManyBaseModel.ts +2 -0
  295. package/Server/Types/Workflow/Components/BaseModel/UpdateOneBaseModel.ts +2 -0
  296. package/Server/Types/Workflow/Components/Conditions/IfElse.ts +2 -0
  297. package/Server/Types/Workflow/Components/Email.ts +2 -0
  298. package/Server/Types/Workflow/Components/JSON/JsonToText.ts +2 -0
  299. package/Server/Types/Workflow/Components/JSON/MergeJson.ts +2 -0
  300. package/Server/Types/Workflow/Components/JSON/TextToJson.ts +2 -0
  301. package/Server/Types/Workflow/Components/JavaScript.ts +2 -0
  302. package/Server/Types/Workflow/Components/Log.ts +2 -0
  303. package/Server/Types/Workflow/Components/MicrosoftTeams/SendMessageToChannel.ts +2 -0
  304. package/Server/Types/Workflow/Components/Schedule.ts +4 -0
  305. package/Server/Types/Workflow/Components/Slack/SendMessageToChannel.ts +2 -0
  306. package/Server/Types/Workflow/Components/Webhook.ts +4 -0
  307. package/Server/Types/Workflow/TriggerCode.ts +5 -0
  308. package/Server/Utils/APIKey/AccessPermission.ts +5 -0
  309. package/Server/Utils/Airtable.ts +5 -0
  310. package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +2 -0
  311. package/Server/Utils/Browser.ts +6 -0
  312. package/Server/Utils/CodeRepository/CodeRepository.ts +23 -0
  313. package/Server/Utils/CodeRepository/GitHub/GitHub.ts +6 -0
  314. package/Server/Utils/CodeRepository/HostedCodeRepository/HostedCodeRepository.ts +5 -0
  315. package/Server/Utils/Cookie.ts +12 -0
  316. package/Server/Utils/CronTab.ts +2 -0
  317. package/Server/Utils/Encryption.ts +3 -0
  318. package/Server/Utils/Execute.ts +2 -0
  319. package/Server/Utils/Express.ts +6 -0
  320. package/Server/Utils/Greenlock/Greenlock.ts +251 -303
  321. package/Server/Utils/JsonWebToken.ts +6 -0
  322. package/Server/Utils/LocalFile.ts +13 -0
  323. package/Server/Utils/Monitor/Criteria/APIRequestCriteria.ts +2 -0
  324. package/Server/Utils/Monitor/Criteria/CompareCriteria.ts +16 -0
  325. package/Server/Utils/Monitor/Criteria/CustomCodeMonitorCriteria.ts +2 -0
  326. package/Server/Utils/Monitor/Criteria/EvaluateOverTime.ts +2 -0
  327. package/Server/Utils/Monitor/Criteria/IncomingRequestCriteria.ts +2 -0
  328. package/Server/Utils/Monitor/Criteria/LogMonitorCriteria.ts +2 -0
  329. package/Server/Utils/Monitor/Criteria/MetricMonitorCriteria.ts +2 -0
  330. package/Server/Utils/Monitor/Criteria/SSLMonitorCriteria.ts +2 -0
  331. package/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.ts +2 -0
  332. package/Server/Utils/Monitor/Criteria/SyntheticMonitor.ts +2 -0
  333. package/Server/Utils/Monitor/Criteria/TraceMonitorCriteria.ts +2 -0
  334. package/Server/Utils/Monitor/MonitorAlert.ts +3 -0
  335. package/Server/Utils/Monitor/MonitorIncident.ts +3 -0
  336. package/Server/Utils/Monitor/MonitorResource.ts +3 -0
  337. package/Server/Utils/Monitor/MonitorStatusTimeline.ts +2 -0
  338. package/Server/Utils/Realtime.ts +8 -0
  339. package/Server/Utils/Response.ts +17 -0
  340. package/Server/Utils/Stream.ts +3 -0
  341. package/Server/Utils/Telemetry/CaptureSpan.ts +116 -0
  342. package/Server/Utils/Telemetry/Telemetry.ts +3 -0
  343. package/Server/Utils/Telemetry.ts +6 -0
  344. package/Server/Utils/TwoFactorAuth.ts +6 -0
  345. package/Server/Utils/UserPermission/UserPermission.ts +4 -0
  346. package/Server/Utils/VM/VMAPI.ts +5 -0
  347. package/Server/Utils/VM/VMRunner.ts +2 -0
  348. package/Server/Utils/Workspace/MicrosoftTeams/Messages/Alert.ts +2 -0
  349. package/Server/Utils/Workspace/MicrosoftTeams/Messages/Incident.ts +2 -0
  350. package/Server/Utils/Workspace/MicrosoftTeams/Messages/ScheduledMaintenance.ts +2 -0
  351. package/Server/Utils/Workspace/Slack/Actions/ActionTypes.ts +3 -0
  352. package/Server/Utils/Workspace/Slack/Actions/Alert.ts +11 -0
  353. package/Server/Utils/Workspace/Slack/Actions/Auth.ts +2 -0
  354. package/Server/Utils/Workspace/Slack/Actions/Incident.ts +13 -0
  355. package/Server/Utils/Workspace/Slack/Actions/Monitor.ts +48 -0
  356. package/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.ts +11 -0
  357. package/Server/Utils/Workspace/Slack/Messages/Alert.ts +2 -0
  358. package/Server/Utils/Workspace/Slack/Messages/Incident.ts +2 -0
  359. package/Server/Utils/Workspace/Slack/Messages/Monitor.ts +60 -0
  360. package/Server/Utils/Workspace/Slack/Messages/ScheduledMaintenance.ts +2 -0
  361. package/Server/Utils/Workspace/Slack/Slack.ts +33 -3
  362. package/Server/Utils/Workspace/Workspace.ts +20 -3
  363. package/Server/Utils/Workspace/WorkspaceBase.ts +33 -1
  364. package/Server/Utils/Workspace/WorkspaceMessages/Alert.ts +3 -0
  365. package/Server/Utils/Workspace/WorkspaceMessages/Incident.ts +3 -0
  366. package/Server/Utils/Workspace/WorkspaceMessages/Monitor.ts +71 -0
  367. package/Server/Utils/Workspace/WorkspaceMessages/ScheduledMaintenance.ts +3 -0
  368. package/Types/Permission.ts +38 -0
  369. package/Types/Workspace/NotificationRules/EventType.ts +1 -1
  370. package/Types/Workspace/NotificationRules/NotificationRuleCondition.ts +8 -1
  371. package/Types/Workspace/NotificationRules/NotificationRuleTypes/MonitorNotificationRule.ts +6 -0
  372. package/UI/Utils/{Telemetry.ts → Telemetry/Telemetry.ts} +1 -1
  373. package/build/dist/Models/DatabaseModels/Index.js +2 -0
  374. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  375. package/build/dist/Models/DatabaseModels/Monitor.js +20 -0
  376. package/build/dist/Models/DatabaseModels/Monitor.js.map +1 -1
  377. package/build/dist/Models/DatabaseModels/MonitorFeed.js +544 -0
  378. package/build/dist/Models/DatabaseModels/MonitorFeed.js.map +1 -0
  379. package/build/dist/Server/API/BaseAPI.js +52 -0
  380. package/build/dist/Server/API/BaseAPI.js.map +1 -1
  381. package/build/dist/Server/API/BaseAnalyticsAPI.js +58 -0
  382. package/build/dist/Server/API/BaseAnalyticsAPI.js.map +1 -1
  383. package/build/dist/Server/API/CommonAPI.js +16 -0
  384. package/build/dist/Server/API/CommonAPI.js.map +1 -1
  385. package/build/dist/Server/API/SlackAPI.js +11 -0
  386. package/build/dist/Server/API/SlackAPI.js.map +1 -1
  387. package/build/dist/Server/API/StatusAPI.js +146 -97
  388. package/build/dist/Server/API/StatusAPI.js.map +1 -1
  389. package/build/dist/Server/API/StatusPageAPI.js +46 -0
  390. package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
  391. package/build/dist/Server/DatabaseConfig.js +52 -0
  392. package/build/dist/Server/DatabaseConfig.js.map +1 -1
  393. package/build/dist/Server/Infrastructure/ClickhouseDatabase.js +28 -0
  394. package/build/dist/Server/Infrastructure/ClickhouseDatabase.js.map +1 -1
  395. package/build/dist/Server/Infrastructure/GlobalCache.js +52 -0
  396. package/build/dist/Server/Infrastructure/GlobalCache.js.map +1 -1
  397. package/build/dist/Server/Infrastructure/LocalCache.js +72 -0
  398. package/build/dist/Server/Infrastructure/LocalCache.js.map +1 -1
  399. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1717605043663-InitialMigration.js +22 -0
  400. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1717605043663-InitialMigration.js.map +1 -1
  401. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1717678334852-MigrationName.js +22 -0
  402. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1717678334852-MigrationName.js.map +1 -1
  403. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1717839110671-MigrationName.js +22 -0
  404. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1717839110671-MigrationName.js.map +1 -1
  405. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1717849921874-MigrationName.js +22 -0
  406. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1717849921874-MigrationName.js.map +1 -1
  407. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1717955235341-MigrationName.js +22 -0
  408. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1717955235341-MigrationName.js.map +1 -1
  409. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718037833516-MigrationName.js +22 -0
  410. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718037833516-MigrationName.js.map +1 -1
  411. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718100824584-MigrationName.js +22 -0
  412. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718100824584-MigrationName.js.map +1 -1
  413. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718101665865-MigrationName.js +22 -0
  414. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718101665865-MigrationName.js.map +1 -1
  415. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718119926223-MigrationName.js +22 -0
  416. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718119926223-MigrationName.js.map +1 -1
  417. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718124277321-MigrationName.js +22 -0
  418. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718124277321-MigrationName.js.map +1 -1
  419. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718126316684-MigrationName.js +22 -0
  420. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718126316684-MigrationName.js.map +1 -1
  421. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718188920011-MigrationName.js +22 -0
  422. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718188920011-MigrationName.js.map +1 -1
  423. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718203144945-MigrationName.js +22 -0
  424. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718203144945-MigrationName.js.map +1 -1
  425. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718285877004-MigrationName.js +22 -0
  426. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718285877004-MigrationName.js.map +1 -1
  427. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718618155447-MigrationName.js +22 -0
  428. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718618155447-MigrationName.js.map +1 -1
  429. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718711669847-MigrationName.js +22 -0
  430. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718711669847-MigrationName.js.map +1 -1
  431. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718879960254-MigrationName.js +22 -0
  432. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1718879960254-MigrationName.js.map +1 -1
  433. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1719227548476-MigrationName.js +22 -0
  434. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1719227548476-MigrationName.js.map +1 -1
  435. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1719228104620-MigrationName.js +22 -0
  436. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1719228104620-MigrationName.js.map +1 -1
  437. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1719247426296-MigrationName.js +22 -0
  438. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1719247426296-MigrationName.js.map +1 -1
  439. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1719348009053-MigrationName.js +22 -0
  440. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1719348009053-MigrationName.js.map +1 -1
  441. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1719827175832-MigrationName.js +22 -0
  442. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1719827175832-MigrationName.js.map +1 -1
  443. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1719831213463-MigrationName.js +22 -0
  444. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1719831213463-MigrationName.js.map +1 -1
  445. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1719838746775-MigrationName.js +22 -0
  446. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1719838746775-MigrationName.js.map +1 -1
  447. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1719915433542-MigrationName.js +22 -0
  448. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1719915433542-MigrationName.js.map +1 -1
  449. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1720024126646-MigrationName.js +22 -0
  450. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1720024126646-MigrationName.js.map +1 -1
  451. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1720532068612-MigrationName.js +22 -0
  452. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1720532068612-MigrationName.js.map +1 -1
  453. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1720538999941-MigrationName.js +22 -0
  454. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1720538999941-MigrationName.js.map +1 -1
  455. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1720785305192-MigrationName.js +22 -0
  456. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1720785305192-MigrationName.js.map +1 -1
  457. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1720805596648-MigrationName.js +22 -0
  458. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1720805596648-MigrationName.js.map +1 -1
  459. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1720806196274-MigrationName.js +22 -0
  460. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1720806196274-MigrationName.js.map +1 -1
  461. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1720812937067-MigrationName.js +22 -0
  462. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1720812937067-MigrationName.js.map +1 -1
  463. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1721075917289-MigrationName.js +22 -0
  464. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1721075917289-MigrationName.js.map +1 -1
  465. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1721152139648-MigrationName.js +22 -0
  466. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1721152139648-MigrationName.js.map +1 -1
  467. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1721159743714-MigrationName.js +22 -0
  468. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1721159743714-MigrationName.js.map +1 -1
  469. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1721754545771-MigrationName.js +22 -0
  470. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1721754545771-MigrationName.js.map +1 -1
  471. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1721779190475-MigrationName.js +22 -0
  472. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1721779190475-MigrationName.js.map +1 -1
  473. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1722031205897-MigrationName.js +22 -0
  474. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1722031205897-MigrationName.js.map +1 -1
  475. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1722543640526-MigrationName.js +22 -0
  476. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1722543640526-MigrationName.js.map +1 -1
  477. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1722892318363-MigrationName.js +22 -0
  478. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1722892318363-MigrationName.js.map +1 -1
  479. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1723825511054-MigrationName.js +22 -0
  480. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1723825511054-MigrationName.js.map +1 -1
  481. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1723828588502-MigrationName.js +22 -0
  482. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1723828588502-MigrationName.js.map +1 -1
  483. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1724078044172-MigrationName.js +22 -0
  484. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1724078044172-MigrationName.js.map +1 -1
  485. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1724610006927-MigrationName.js +22 -0
  486. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1724610006927-MigrationName.js.map +1 -1
  487. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1724613666632-MigrationName.js +22 -0
  488. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1724613666632-MigrationName.js.map +1 -1
  489. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1724659071843-MigrationName.js +22 -0
  490. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1724659071843-MigrationName.js.map +1 -1
  491. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725291476867-MigrationName.js +22 -0
  492. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725291476867-MigrationName.js.map +1 -1
  493. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725357719072-MigrationName.js +22 -0
  494. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725357719072-MigrationName.js.map +1 -1
  495. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725360199561-MigrationName.js +22 -0
  496. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725360199561-MigrationName.js.map +1 -1
  497. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725379949648-MigrationName.js +22 -0
  498. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725379949648-MigrationName.js.map +1 -1
  499. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725551629492-MigrationName.js +22 -0
  500. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725551629492-MigrationName.js.map +1 -1
  501. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725556630384-MigrationName.js +22 -0
  502. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725556630384-MigrationName.js.map +1 -1
  503. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725618842598-MigrationName.js +22 -0
  504. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725618842598-MigrationName.js.map +1 -1
  505. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725880508430-MigrationName.js +22 -0
  506. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725880508430-MigrationName.js.map +1 -1
  507. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725881099935-MigrationName.js +22 -0
  508. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725881099935-MigrationName.js.map +1 -1
  509. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725881475134-MigrationName.js +22 -0
  510. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725881475134-MigrationName.js.map +1 -1
  511. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725884177663-MigrationName.js +22 -0
  512. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725884177663-MigrationName.js.map +1 -1
  513. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725898621366-MigrationName.js +22 -0
  514. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725898621366-MigrationName.js.map +1 -1
  515. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725900315712-MigrationName.js +22 -0
  516. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725900315712-MigrationName.js.map +1 -1
  517. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725901024444-MigrationName.js +22 -0
  518. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725901024444-MigrationName.js.map +1 -1
  519. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725975175669-MigrationName.js +22 -0
  520. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725975175669-MigrationName.js.map +1 -1
  521. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725976810107-MigrationName.js +22 -0
  522. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1725976810107-MigrationName.js.map +1 -1
  523. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1726831037585-MigrationName.js +22 -0
  524. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1726831037585-MigrationName.js.map +1 -1
  525. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727101782315-MigrationName.js +22 -0
  526. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727101782315-MigrationName.js.map +1 -1
  527. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727102156072-MigrationName.js +22 -0
  528. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727102156072-MigrationName.js.map +1 -1
  529. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727102331367-MigrationName.js +22 -0
  530. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727102331367-MigrationName.js.map +1 -1
  531. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727103023745-MigrationName.js +22 -0
  532. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727103023745-MigrationName.js.map +1 -1
  533. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727104469670-MigrationName.js +22 -0
  534. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727104469670-MigrationName.js.map +1 -1
  535. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727192530019-MigrationName.js +22 -0
  536. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727192530019-MigrationName.js.map +1 -1
  537. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727193130193-MigrationName.js +22 -0
  538. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727193130193-MigrationName.js.map +1 -1
  539. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727193702212-MigrationName.js +22 -0
  540. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727193702212-MigrationName.js.map +1 -1
  541. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727194211048-MigrationName.js +22 -0
  542. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727194211048-MigrationName.js.map +1 -1
  543. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727194579925-MigrationName.js +22 -0
  544. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727194579925-MigrationName.js.map +1 -1
  545. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727894983857-MigrationName.js +22 -0
  546. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727894983857-MigrationName.js.map +1 -1
  547. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727906598804-MigrationName.js +22 -0
  548. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1727906598804-MigrationName.js.map +1 -1
  549. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1728472625805-MigrationName.js +22 -0
  550. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1728472625805-MigrationName.js.map +1 -1
  551. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1729682875503-MigrationName.js +22 -0
  552. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1729682875503-MigrationName.js.map +1 -1
  553. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1730117995642-MigrationName.js +22 -0
  554. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1730117995642-MigrationName.js.map +1 -1
  555. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1730209089495-MigrationName.js +22 -0
  556. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1730209089495-MigrationName.js.map +1 -1
  557. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1730223198692-MigrationName.js +22 -0
  558. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1730223198692-MigrationName.js.map +1 -1
  559. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1731433043136-MigrationName.js +22 -0
  560. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1731433043136-MigrationName.js.map +1 -1
  561. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1731433309124-MigrationName.js +22 -0
  562. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1731433309124-MigrationName.js.map +1 -1
  563. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1731435267537-MigrationName.js +22 -0
  564. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1731435267537-MigrationName.js.map +1 -1
  565. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1731435514287-MigrationName.js +22 -0
  566. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1731435514287-MigrationName.js.map +1 -1
  567. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1732553444010-MigrationName.js +22 -0
  568. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1732553444010-MigrationName.js.map +1 -1
  569. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1734435866602-MigrationName.js +22 -0
  570. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1734435866602-MigrationName.js.map +1 -1
  571. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736364478985-MigrationName.js +22 -0
  572. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736364478985-MigrationName.js.map +1 -1
  573. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736364957990-MigrationName.js +22 -0
  574. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736364957990-MigrationName.js.map +1 -1
  575. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736365532085-MigrationName.js +22 -0
  576. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736365532085-MigrationName.js.map +1 -1
  577. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736675947746-MigrationName.js +22 -0
  578. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736675947746-MigrationName.js.map +1 -1
  579. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736703138918-MigrationName.js +22 -0
  580. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736703138918-MigrationName.js.map +1 -1
  581. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736780194077-MigrationName.js +22 -0
  582. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736780194077-MigrationName.js.map +1 -1
  583. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736780194078-MigrationName.js +22 -0
  584. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736780194078-MigrationName.js.map +1 -1
  585. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736787495707-MigrationName.js +22 -0
  586. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736787495707-MigrationName.js.map +1 -1
  587. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736787985322-MigrationName.js +22 -0
  588. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736787985322-MigrationName.js.map +1 -1
  589. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736788706141-MigrationName.js +22 -0
  590. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736788706141-MigrationName.js.map +1 -1
  591. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736856662868-MigrationName.js +22 -0
  592. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736856662868-MigrationName.js.map +1 -1
  593. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1737141420441-MigrationName.js +22 -0
  594. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1737141420441-MigrationName.js.map +1 -1
  595. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1737713529424-MigrationName.js +22 -0
  596. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1737713529424-MigrationName.js.map +1 -1
  597. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1737715240684-MigrationName.js +22 -0
  598. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1737715240684-MigrationName.js.map +1 -1
  599. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1737997557974-MigrationName.js +22 -0
  600. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1737997557974-MigrationName.js.map +1 -1
  601. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1739209832500-MigrationName.js +22 -0
  602. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1739209832500-MigrationName.js.map +1 -1
  603. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1739210586538-MigrationName.js +22 -0
  604. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1739210586538-MigrationName.js.map +1 -1
  605. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1739217257089-MigrationName.js +22 -0
  606. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1739217257089-MigrationName.js.map +1 -1
  607. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1739282331053-MigrationName.js +22 -0
  608. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1739282331053-MigrationName.js.map +1 -1
  609. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1739374537088-MigrationName.js +22 -0
  610. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1739374537088-MigrationName.js.map +1 -1
  611. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1739569321582-MigrationName.js +22 -0
  612. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1739569321582-MigrationName.js.map +1 -1
  613. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1740164199817-MigrationName.js +22 -0
  614. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1740164199817-MigrationName.js.map +1 -1
  615. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1740419151825-MigrationName.js +22 -0
  616. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1740419151825-MigrationName.js.map +1 -1
  617. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1740430229844-MigrationName.js +22 -0
  618. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1740430229844-MigrationName.js.map +1 -1
  619. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1740597525803-MigrationName.js +22 -0
  620. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1740597525803-MigrationName.js.map +1 -1
  621. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1740598793630-MigrationName.js +22 -0
  622. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1740598793630-MigrationName.js.map +1 -1
  623. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1741031019972-MigrationName.js +22 -0
  624. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1741031019972-MigrationName.js.map +1 -1
  625. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1741209339971-MigrationName.js +22 -0
  626. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1741209339971-MigrationName.js.map +1 -1
  627. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1741904597606-MigrationName.js +22 -0
  628. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1741904597606-MigrationName.js.map +1 -1
  629. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1741908200702-MigrationName.js +22 -0
  630. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1741908200702-MigrationName.js.map +1 -1
  631. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1741955609393-MigrationName.js +22 -0
  632. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1741955609393-MigrationName.js.map +1 -1
  633. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1741955752685-MigrationName.js +22 -0
  634. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1741955752685-MigrationName.js.map +1 -1
  635. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1741957080431-MigrationName.js +22 -0
  636. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1741957080431-MigrationName.js.map +1 -1
  637. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1741959216297-MigrationName.js +22 -0
  638. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1741959216297-MigrationName.js.map +1 -1
  639. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1742302093234-MigrationName.js +48 -0
  640. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1742302093234-MigrationName.js.map +1 -0
  641. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1742305668133-MigrationName.js +12 -0
  642. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1742305668133-MigrationName.js.map +1 -0
  643. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +4 -0
  644. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  645. package/build/dist/Server/Infrastructure/PostgresDatabase.js +70 -0
  646. package/build/dist/Server/Infrastructure/PostgresDatabase.js.map +1 -1
  647. package/build/dist/Server/Infrastructure/Queue.js +40 -0
  648. package/build/dist/Server/Infrastructure/Queue.js.map +1 -1
  649. package/build/dist/Server/Infrastructure/QueueWorker.js +23 -0
  650. package/build/dist/Server/Infrastructure/QueueWorker.js.map +1 -1
  651. package/build/dist/Server/Infrastructure/Redis.js +46 -0
  652. package/build/dist/Server/Infrastructure/Redis.js.map +1 -1
  653. package/build/dist/Server/Infrastructure/Semaphore.js +22 -0
  654. package/build/dist/Server/Infrastructure/Semaphore.js.map +1 -1
  655. package/build/dist/Server/Infrastructure/SocketIO.js +22 -0
  656. package/build/dist/Server/Infrastructure/SocketIO.js.map +1 -1
  657. package/build/dist/Server/Infrastructure/Status.js +22 -0
  658. package/build/dist/Server/Infrastructure/Status.js.map +1 -1
  659. package/build/dist/Server/Middleware/BearerTokenAuthorization.js +16 -0
  660. package/build/dist/Server/Middleware/BearerTokenAuthorization.js.map +1 -1
  661. package/build/dist/Server/Middleware/ClusterKeyAuthorization.js +28 -0
  662. package/build/dist/Server/Middleware/ClusterKeyAuthorization.js.map +1 -1
  663. package/build/dist/Server/Middleware/CodeRepositoryAuthorization.js +16 -0
  664. package/build/dist/Server/Middleware/CodeRepositoryAuthorization.js.map +1 -1
  665. package/build/dist/Server/Middleware/NotificationMiddleware.js +22 -0
  666. package/build/dist/Server/Middleware/NotificationMiddleware.js.map +1 -1
  667. package/build/dist/Server/Middleware/ProjectAuthorization.js +40 -0
  668. package/build/dist/Server/Middleware/ProjectAuthorization.js.map +1 -1
  669. package/build/dist/Server/Middleware/SlackAuthorization.js +16 -0
  670. package/build/dist/Server/Middleware/SlackAuthorization.js.map +1 -1
  671. package/build/dist/Server/Middleware/TelemetryIngest.js +16 -0
  672. package/build/dist/Server/Middleware/TelemetryIngest.js.map +1 -1
  673. package/build/dist/Server/Middleware/UserAuthorization.js +53 -0
  674. package/build/dist/Server/Middleware/UserAuthorization.js.map +1 -1
  675. package/build/dist/Server/Services/AccessTokenService.js +49 -0
  676. package/build/dist/Server/Services/AccessTokenService.js.map +1 -1
  677. package/build/dist/Server/Services/AlertFeedService.js +37 -47
  678. package/build/dist/Server/Services/AlertFeedService.js.map +1 -1
  679. package/build/dist/Server/Services/AlertInternalNoteService.js +28 -0
  680. package/build/dist/Server/Services/AlertInternalNoteService.js.map +1 -1
  681. package/build/dist/Server/Services/AlertOwnerTeamService.js +28 -0
  682. package/build/dist/Server/Services/AlertOwnerTeamService.js.map +1 -1
  683. package/build/dist/Server/Services/AlertOwnerUserService.js +28 -0
  684. package/build/dist/Server/Services/AlertOwnerUserService.js.map +1 -1
  685. package/build/dist/Server/Services/AlertService.js +130 -2
  686. package/build/dist/Server/Services/AlertService.js.map +1 -1
  687. package/build/dist/Server/Services/AlertSeverityService.js +34 -0
  688. package/build/dist/Server/Services/AlertSeverityService.js.map +1 -1
  689. package/build/dist/Server/Services/AlertStateService.js +59 -0
  690. package/build/dist/Server/Services/AlertStateService.js.map +1 -1
  691. package/build/dist/Server/Services/AlertStateTimelineService.js +40 -0
  692. package/build/dist/Server/Services/AlertStateTimelineService.js.map +1 -1
  693. package/build/dist/Server/Services/AnalyticsDatabaseService.js +108 -0
  694. package/build/dist/Server/Services/AnalyticsDatabaseService.js.map +1 -1
  695. package/build/dist/Server/Services/ApiKeyPermissionService.js +22 -0
  696. package/build/dist/Server/Services/ApiKeyPermissionService.js.map +1 -1
  697. package/build/dist/Server/Services/ApiKeyService.js +16 -0
  698. package/build/dist/Server/Services/ApiKeyService.js.map +1 -1
  699. package/build/dist/Server/Services/BillingInvoiceService.js +22 -0
  700. package/build/dist/Server/Services/BillingInvoiceService.js.map +1 -1
  701. package/build/dist/Server/Services/BillingPaymentMethodService.js +22 -0
  702. package/build/dist/Server/Services/BillingPaymentMethodService.js.map +1 -1
  703. package/build/dist/Server/Services/BillingService.js +155 -0
  704. package/build/dist/Server/Services/BillingService.js.map +1 -1
  705. package/build/dist/Server/Services/CallService.js +16 -0
  706. package/build/dist/Server/Services/CallService.js.map +1 -1
  707. package/build/dist/Server/Services/CopilotActionTypePriorityService.js +16 -0
  708. package/build/dist/Server/Services/CopilotActionTypePriorityService.js.map +1 -1
  709. package/build/dist/Server/Services/CopilotCodeRepositoryService.js +22 -0
  710. package/build/dist/Server/Services/CopilotCodeRepositoryService.js.map +1 -1
  711. package/build/dist/Server/Services/DashboardService.js +16 -0
  712. package/build/dist/Server/Services/DashboardService.js.map +1 -1
  713. package/build/dist/Server/Services/DatabaseService.js +108 -0
  714. package/build/dist/Server/Services/DatabaseService.js.map +1 -1
  715. package/build/dist/Server/Services/DomainService.js +22 -0
  716. package/build/dist/Server/Services/DomainService.js.map +1 -1
  717. package/build/dist/Server/Services/FileService.js +28 -0
  718. package/build/dist/Server/Services/FileService.js.map +1 -1
  719. package/build/dist/Server/Services/IncidentFeedService.js +39 -48
  720. package/build/dist/Server/Services/IncidentFeedService.js.map +1 -1
  721. package/build/dist/Server/Services/IncidentInternalNoteService.js +28 -0
  722. package/build/dist/Server/Services/IncidentInternalNoteService.js.map +1 -1
  723. package/build/dist/Server/Services/IncidentOwnerTeamService.js +28 -0
  724. package/build/dist/Server/Services/IncidentOwnerTeamService.js.map +1 -1
  725. package/build/dist/Server/Services/IncidentOwnerUserService.js +28 -0
  726. package/build/dist/Server/Services/IncidentOwnerUserService.js.map +1 -1
  727. package/build/dist/Server/Services/IncidentPublicNoteService.js +34 -0
  728. package/build/dist/Server/Services/IncidentPublicNoteService.js.map +1 -1
  729. package/build/dist/Server/Services/IncidentService.js +142 -1
  730. package/build/dist/Server/Services/IncidentService.js.map +1 -1
  731. package/build/dist/Server/Services/IncidentSeverityService.js +34 -0
  732. package/build/dist/Server/Services/IncidentSeverityService.js.map +1 -1
  733. package/build/dist/Server/Services/IncidentStateService.js +59 -0
  734. package/build/dist/Server/Services/IncidentStateService.js.map +1 -1
  735. package/build/dist/Server/Services/IncidentStateTimelineService.js +40 -0
  736. package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
  737. package/build/dist/Server/Services/IncidentTemplateService.js +25 -0
  738. package/build/dist/Server/Services/IncidentTemplateService.js.map +1 -1
  739. package/build/dist/Server/Services/Index.js +2 -0
  740. package/build/dist/Server/Services/Index.js.map +1 -1
  741. package/build/dist/Server/Services/LabelService.js +16 -0
  742. package/build/dist/Server/Services/LabelService.js.map +1 -1
  743. package/build/dist/Server/Services/MailService.js +16 -0
  744. package/build/dist/Server/Services/MailService.js.map +1 -1
  745. package/build/dist/Server/Services/MonitorFeedService.js +117 -0
  746. package/build/dist/Server/Services/MonitorFeedService.js.map +1 -0
  747. package/build/dist/Server/Services/MonitorGroupService.js +30 -0
  748. package/build/dist/Server/Services/MonitorGroupService.js.map +1 -1
  749. package/build/dist/Server/Services/MonitorOwnerTeamService.js +152 -0
  750. package/build/dist/Server/Services/MonitorOwnerTeamService.js.map +1 -1
  751. package/build/dist/Server/Services/MonitorOwnerUserService.js +145 -0
  752. package/build/dist/Server/Services/MonitorOwnerUserService.js.map +1 -1
  753. package/build/dist/Server/Services/MonitorService.js +308 -0
  754. package/build/dist/Server/Services/MonitorService.js.map +1 -1
  755. package/build/dist/Server/Services/MonitorStatusService.js +34 -0
  756. package/build/dist/Server/Services/MonitorStatusService.js.map +1 -1
  757. package/build/dist/Server/Services/MonitorStatusTimelineService.js +85 -0
  758. package/build/dist/Server/Services/MonitorStatusTimelineService.js.map +1 -1
  759. package/build/dist/Server/Services/NotificationService.js +23 -0
  760. package/build/dist/Server/Services/NotificationService.js.map +1 -1
  761. package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleService.js +91 -0
  762. package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleService.js.map +1 -1
  763. package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogService.js +28 -0
  764. package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogService.js.map +1 -1
  765. package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.js +28 -0
  766. package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.js.map +1 -1
  767. package/build/dist/Server/Services/OnCallDutyPolicyScheduleLayerService.js +22 -0
  768. package/build/dist/Server/Services/OnCallDutyPolicyScheduleLayerService.js.map +1 -1
  769. package/build/dist/Server/Services/OnCallDutyPolicyScheduleLayerUserService.js +34 -0
  770. package/build/dist/Server/Services/OnCallDutyPolicyScheduleLayerUserService.js.map +1 -1
  771. package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js +16 -0
  772. package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js.map +1 -1
  773. package/build/dist/Server/Services/OnCallDutyPolicyService.js +24 -0
  774. package/build/dist/Server/Services/OnCallDutyPolicyService.js.map +1 -1
  775. package/build/dist/Server/Services/OnCallDutyPolicyUserOverrideService.js +22 -0
  776. package/build/dist/Server/Services/OnCallDutyPolicyUserOverrideService.js.map +1 -1
  777. package/build/dist/Server/Services/OpenTelemetryIngestService.js +28 -0
  778. package/build/dist/Server/Services/OpenTelemetryIngestService.js.map +1 -1
  779. package/build/dist/Server/Services/ProbeService.js +47 -0
  780. package/build/dist/Server/Services/ProbeService.js.map +1 -1
  781. package/build/dist/Server/Services/ProjectService.js +94 -0
  782. package/build/dist/Server/Services/ProjectService.js.map +1 -1
  783. package/build/dist/Server/Services/ProjectUserService.js +16 -0
  784. package/build/dist/Server/Services/ProjectUserService.js.map +1 -1
  785. package/build/dist/Server/Services/ScheduledMaintenanceFeedService.js +37 -47
  786. package/build/dist/Server/Services/ScheduledMaintenanceFeedService.js.map +1 -1
  787. package/build/dist/Server/Services/ScheduledMaintenanceInternalNoteService.js +28 -0
  788. package/build/dist/Server/Services/ScheduledMaintenanceInternalNoteService.js.map +1 -1
  789. package/build/dist/Server/Services/ScheduledMaintenanceOwnerTeamService.js +28 -0
  790. package/build/dist/Server/Services/ScheduledMaintenanceOwnerTeamService.js.map +1 -1
  791. package/build/dist/Server/Services/ScheduledMaintenanceOwnerUserService.js +28 -0
  792. package/build/dist/Server/Services/ScheduledMaintenanceOwnerUserService.js.map +1 -1
  793. package/build/dist/Server/Services/ScheduledMaintenancePublicNoteService.js +34 -0
  794. package/build/dist/Server/Services/ScheduledMaintenancePublicNoteService.js.map +1 -1
  795. package/build/dist/Server/Services/ScheduledMaintenanceService.js +139 -2
  796. package/build/dist/Server/Services/ScheduledMaintenanceService.js.map +1 -1
  797. package/build/dist/Server/Services/ScheduledMaintenanceStateService.js +52 -0
  798. package/build/dist/Server/Services/ScheduledMaintenanceStateService.js.map +1 -1
  799. package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js +47 -0
  800. package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js.map +1 -1
  801. package/build/dist/Server/Services/ScheduledMaintenanceTemplateService.js +37 -0
  802. package/build/dist/Server/Services/ScheduledMaintenanceTemplateService.js.map +1 -1
  803. package/build/dist/Server/Services/ServiceCatalogDependencyService.js +16 -0
  804. package/build/dist/Server/Services/ServiceCatalogDependencyService.js.map +1 -1
  805. package/build/dist/Server/Services/ServiceCatalogMonitorService.js +16 -0
  806. package/build/dist/Server/Services/ServiceCatalogMonitorService.js.map +1 -1
  807. package/build/dist/Server/Services/ServiceCatalogService.js +16 -0
  808. package/build/dist/Server/Services/ServiceCatalogService.js.map +1 -1
  809. package/build/dist/Server/Services/ServiceCatalogTelemetryServiceService.js +16 -0
  810. package/build/dist/Server/Services/ServiceCatalogTelemetryServiceService.js.map +1 -1
  811. package/build/dist/Server/Services/ShortLinkService.js +34 -0
  812. package/build/dist/Server/Services/ShortLinkService.js.map +1 -1
  813. package/build/dist/Server/Services/SmsService.js +16 -0
  814. package/build/dist/Server/Services/SmsService.js.map +1 -1
  815. package/build/dist/Server/Services/StatusPageCertificateService.js +28 -0
  816. package/build/dist/Server/Services/StatusPageCertificateService.js.map +1 -1
  817. package/build/dist/Server/Services/StatusPageDomainService.js +88 -0
  818. package/build/dist/Server/Services/StatusPageDomainService.js.map +1 -1
  819. package/build/dist/Server/Services/StatusPageFooterLinkService.js +34 -0
  820. package/build/dist/Server/Services/StatusPageFooterLinkService.js.map +1 -1
  821. package/build/dist/Server/Services/StatusPageGroupService.js +34 -0
  822. package/build/dist/Server/Services/StatusPageGroupService.js.map +1 -1
  823. package/build/dist/Server/Services/StatusPageHeaderLinkService.js +34 -0
  824. package/build/dist/Server/Services/StatusPageHeaderLinkService.js.map +1 -1
  825. package/build/dist/Server/Services/StatusPageHistoryChartBarColorRuleService.js +34 -0
  826. package/build/dist/Server/Services/StatusPageHistoryChartBarColorRuleService.js.map +1 -1
  827. package/build/dist/Server/Services/StatusPagePrivateUserService.js +22 -0
  828. package/build/dist/Server/Services/StatusPagePrivateUserService.js.map +1 -1
  829. package/build/dist/Server/Services/StatusPageResourceService.js +34 -0
  830. package/build/dist/Server/Services/StatusPageResourceService.js.map +1 -1
  831. package/build/dist/Server/Services/StatusPageService.js +110 -0
  832. package/build/dist/Server/Services/StatusPageService.js.map +1 -1
  833. package/build/dist/Server/Services/StatusPageSubscriberService.js +47 -0
  834. package/build/dist/Server/Services/StatusPageSubscriberService.js.map +1 -1
  835. package/build/dist/Server/Services/TeamMemberService.js +71 -0
  836. package/build/dist/Server/Services/TeamMemberService.js.map +1 -1
  837. package/build/dist/Server/Services/TeamPermissionService.js +46 -0
  838. package/build/dist/Server/Services/TeamPermissionService.js.map +1 -1
  839. package/build/dist/Server/Services/TeamService.js +22 -0
  840. package/build/dist/Server/Services/TeamService.js.map +1 -1
  841. package/build/dist/Server/Services/TelemetryAttributeService.js +22 -0
  842. package/build/dist/Server/Services/TelemetryAttributeService.js.map +1 -1
  843. package/build/dist/Server/Services/TelemetryIngestionKeyService.js +16 -0
  844. package/build/dist/Server/Services/TelemetryIngestionKeyService.js.map +1 -1
  845. package/build/dist/Server/Services/TelemetryServiceService.js +22 -0
  846. package/build/dist/Server/Services/TelemetryServiceService.js.map +1 -1
  847. package/build/dist/Server/Services/TelemetryUsageBillingService.js +22 -0
  848. package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
  849. package/build/dist/Server/Services/UserCallService.js +35 -0
  850. package/build/dist/Server/Services/UserCallService.js.map +1 -1
  851. package/build/dist/Server/Services/UserEmailService.js +35 -0
  852. package/build/dist/Server/Services/UserEmailService.js.map +1 -1
  853. package/build/dist/Server/Services/UserNotificationRuleService.js +107 -0
  854. package/build/dist/Server/Services/UserNotificationRuleService.js.map +1 -1
  855. package/build/dist/Server/Services/UserNotificationSettingService.js +37 -0
  856. package/build/dist/Server/Services/UserNotificationSettingService.js.map +1 -1
  857. package/build/dist/Server/Services/UserOnCallLogService.js +28 -0
  858. package/build/dist/Server/Services/UserOnCallLogService.js.map +1 -1
  859. package/build/dist/Server/Services/UserOnCallLogTimelineService.js +16 -0
  860. package/build/dist/Server/Services/UserOnCallLogTimelineService.js.map +1 -1
  861. package/build/dist/Server/Services/UserService.js +54 -0
  862. package/build/dist/Server/Services/UserService.js.map +1 -1
  863. package/build/dist/Server/Services/UserSmsService.js +35 -0
  864. package/build/dist/Server/Services/UserSmsService.js.map +1 -1
  865. package/build/dist/Server/Services/UserTwoFactorAuthService.js +22 -0
  866. package/build/dist/Server/Services/UserTwoFactorAuthService.js.map +1 -1
  867. package/build/dist/Server/Services/WorkflowService.js +16 -0
  868. package/build/dist/Server/Services/WorkflowService.js.map +1 -1
  869. package/build/dist/Server/Services/WorkspaceNotificationRuleService.js +179 -21
  870. package/build/dist/Server/Services/WorkspaceNotificationRuleService.js.map +1 -1
  871. package/build/dist/Server/Services/WorkspaceProjectAuthTokenService.js +34 -0
  872. package/build/dist/Server/Services/WorkspaceProjectAuthTokenService.js.map +1 -1
  873. package/build/dist/Server/Services/WorkspaceSettingService.js +22 -0
  874. package/build/dist/Server/Services/WorkspaceSettingService.js.map +1 -1
  875. package/build/dist/Server/Services/WorkspaceUserAuthTokenService.js +28 -0
  876. package/build/dist/Server/Services/WorkspaceUserAuthTokenService.js.map +1 -1
  877. package/build/dist/Server/Types/AnalyticsDatabase/AggregateBy.js +16 -0
  878. package/build/dist/Server/Types/AnalyticsDatabase/AggregateBy.js.map +1 -1
  879. package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js +41 -0
  880. package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js.map +1 -1
  881. package/build/dist/Server/Types/AnalyticsDatabase/QueryHelper.js +35 -0
  882. package/build/dist/Server/Types/AnalyticsDatabase/QueryHelper.js.map +1 -1
  883. package/build/dist/Server/Types/Billing/MeteredPlan/ActiveMonitoringMeteredPlan.js +23 -0
  884. package/build/dist/Server/Types/Billing/MeteredPlan/ActiveMonitoringMeteredPlan.js.map +1 -1
  885. package/build/dist/Server/Types/Billing/MeteredPlan/AllMeteredPlans.js +17 -0
  886. package/build/dist/Server/Types/Billing/MeteredPlan/AllMeteredPlans.js.map +1 -1
  887. package/build/dist/Server/Types/Billing/MeteredPlan/ServerMeteredPlan.js +17 -0
  888. package/build/dist/Server/Types/Billing/MeteredPlan/ServerMeteredPlan.js.map +1 -1
  889. package/build/dist/Server/Types/Billing/MeteredPlan/TelemetryMeteredPlan.js +24 -0
  890. package/build/dist/Server/Types/Billing/MeteredPlan/TelemetryMeteredPlan.js.map +1 -1
  891. package/build/dist/Server/Types/Database/Permissions/AccessControlPermission.js +40 -0
  892. package/build/dist/Server/Types/Database/Permissions/AccessControlPermission.js.map +1 -1
  893. package/build/dist/Server/Types/Database/Permissions/BasePermission.js +17 -0
  894. package/build/dist/Server/Types/Database/Permissions/BasePermission.js.map +1 -1
  895. package/build/dist/Server/Types/Database/Permissions/BillingPermission.js +16 -0
  896. package/build/dist/Server/Types/Database/Permissions/BillingPermission.js.map +1 -1
  897. package/build/dist/Server/Types/Database/Permissions/ColumnPermission.js +29 -0
  898. package/build/dist/Server/Types/Database/Permissions/ColumnPermission.js.map +1 -1
  899. package/build/dist/Server/Types/Database/Permissions/CreatePermission.js +23 -0
  900. package/build/dist/Server/Types/Database/Permissions/CreatePermission.js.map +1 -1
  901. package/build/dist/Server/Types/Database/Permissions/DeletePermission.js +22 -0
  902. package/build/dist/Server/Types/Database/Permissions/DeletePermission.js.map +1 -1
  903. package/build/dist/Server/Types/Database/Permissions/Index.js +47 -0
  904. package/build/dist/Server/Types/Database/Permissions/Index.js.map +1 -1
  905. package/build/dist/Server/Types/Database/Permissions/PermissionsUtil.js +16 -0
  906. package/build/dist/Server/Types/Database/Permissions/PermissionsUtil.js.map +1 -1
  907. package/build/dist/Server/Types/Database/Permissions/PublicPermission.js +23 -0
  908. package/build/dist/Server/Types/Database/Permissions/PublicPermission.js.map +1 -1
  909. package/build/dist/Server/Types/Database/Permissions/QueryPermission.js +22 -0
  910. package/build/dist/Server/Types/Database/Permissions/QueryPermission.js.map +1 -1
  911. package/build/dist/Server/Types/Database/Permissions/ReadPermission.js +22 -0
  912. package/build/dist/Server/Types/Database/Permissions/ReadPermission.js.map +1 -1
  913. package/build/dist/Server/Types/Database/Permissions/SelectPermission.js +16 -0
  914. package/build/dist/Server/Types/Database/Permissions/SelectPermission.js.map +1 -1
  915. package/build/dist/Server/Types/Database/Permissions/TablePermission.js +28 -0
  916. package/build/dist/Server/Types/Database/Permissions/TablePermission.js.map +1 -1
  917. package/build/dist/Server/Types/Database/Permissions/TenantPermission.js +17 -0
  918. package/build/dist/Server/Types/Database/Permissions/TenantPermission.js.map +1 -1
  919. package/build/dist/Server/Types/Database/Permissions/UpdatePermission.js +22 -0
  920. package/build/dist/Server/Types/Database/Permissions/UpdatePermission.js.map +1 -1
  921. package/build/dist/Server/Types/Database/Permissions/UserPermission.js +16 -0
  922. package/build/dist/Server/Types/Database/Permissions/UserPermission.js.map +1 -1
  923. package/build/dist/Server/Types/Database/QueryHelper.js +155 -0
  924. package/build/dist/Server/Types/Database/QueryHelper.js.map +1 -1
  925. package/build/dist/Server/Types/Database/QueryUtil.js +16 -0
  926. package/build/dist/Server/Types/Database/QueryUtil.js.map +1 -1
  927. package/build/dist/Server/Types/Database/SelectUtil.js +16 -0
  928. package/build/dist/Server/Types/Database/SelectUtil.js.map +1 -1
  929. package/build/dist/Server/Types/Domain.js +16 -0
  930. package/build/dist/Server/Types/Domain.js.map +1 -1
  931. package/build/dist/Server/Types/Markdown.js +16 -0
  932. package/build/dist/Server/Types/Markdown.js.map +1 -1
  933. package/build/dist/Server/Types/Workflow/ComponentCode.js +16 -0
  934. package/build/dist/Server/Types/Workflow/ComponentCode.js.map +1 -1
  935. package/build/dist/Server/Types/Workflow/Components/API/Delete.js +16 -0
  936. package/build/dist/Server/Types/Workflow/Components/API/Delete.js.map +1 -1
  937. package/build/dist/Server/Types/Workflow/Components/API/Get.js +16 -0
  938. package/build/dist/Server/Types/Workflow/Components/API/Get.js.map +1 -1
  939. package/build/dist/Server/Types/Workflow/Components/API/Patch.js +16 -0
  940. package/build/dist/Server/Types/Workflow/Components/API/Patch.js.map +1 -1
  941. package/build/dist/Server/Types/Workflow/Components/API/Post.js +16 -0
  942. package/build/dist/Server/Types/Workflow/Components/API/Post.js.map +1 -1
  943. package/build/dist/Server/Types/Workflow/Components/API/Put.js +16 -0
  944. package/build/dist/Server/Types/Workflow/Components/API/Put.js.map +1 -1
  945. package/build/dist/Server/Types/Workflow/Components/API/Utils.js +22 -0
  946. package/build/dist/Server/Types/Workflow/Components/API/Utils.js.map +1 -1
  947. package/build/dist/Server/Types/Workflow/Components/BaseModel/CreateManyBaseModel.js +16 -0
  948. package/build/dist/Server/Types/Workflow/Components/BaseModel/CreateManyBaseModel.js.map +1 -1
  949. package/build/dist/Server/Types/Workflow/Components/BaseModel/CreateOneBaseModel.js +16 -0
  950. package/build/dist/Server/Types/Workflow/Components/BaseModel/CreateOneBaseModel.js.map +1 -1
  951. package/build/dist/Server/Types/Workflow/Components/BaseModel/DeleteOneBaseModel.js +16 -0
  952. package/build/dist/Server/Types/Workflow/Components/BaseModel/DeleteOneBaseModel.js.map +1 -1
  953. package/build/dist/Server/Types/Workflow/Components/BaseModel/FindManyBaseModel.js +16 -0
  954. package/build/dist/Server/Types/Workflow/Components/BaseModel/FindManyBaseModel.js.map +1 -1
  955. package/build/dist/Server/Types/Workflow/Components/BaseModel/FindOneBaseModel.js +16 -0
  956. package/build/dist/Server/Types/Workflow/Components/BaseModel/FindOneBaseModel.js.map +1 -1
  957. package/build/dist/Server/Types/Workflow/Components/BaseModel/OnTriggerBaseModel.js +28 -0
  958. package/build/dist/Server/Types/Workflow/Components/BaseModel/OnTriggerBaseModel.js.map +1 -1
  959. package/build/dist/Server/Types/Workflow/Components/BaseModel/UpdateManyBaseModel.js +16 -0
  960. package/build/dist/Server/Types/Workflow/Components/BaseModel/UpdateManyBaseModel.js.map +1 -1
  961. package/build/dist/Server/Types/Workflow/Components/BaseModel/UpdateOneBaseModel.js +16 -0
  962. package/build/dist/Server/Types/Workflow/Components/BaseModel/UpdateOneBaseModel.js.map +1 -1
  963. package/build/dist/Server/Types/Workflow/Components/Conditions/IfElse.js +16 -0
  964. package/build/dist/Server/Types/Workflow/Components/Conditions/IfElse.js.map +1 -1
  965. package/build/dist/Server/Types/Workflow/Components/Email.js +16 -0
  966. package/build/dist/Server/Types/Workflow/Components/Email.js.map +1 -1
  967. package/build/dist/Server/Types/Workflow/Components/JSON/JsonToText.js +16 -0
  968. package/build/dist/Server/Types/Workflow/Components/JSON/JsonToText.js.map +1 -1
  969. package/build/dist/Server/Types/Workflow/Components/JSON/MergeJson.js +16 -0
  970. package/build/dist/Server/Types/Workflow/Components/JSON/MergeJson.js.map +1 -1
  971. package/build/dist/Server/Types/Workflow/Components/JSON/TextToJson.js +16 -0
  972. package/build/dist/Server/Types/Workflow/Components/JSON/TextToJson.js.map +1 -1
  973. package/build/dist/Server/Types/Workflow/Components/JavaScript.js +16 -0
  974. package/build/dist/Server/Types/Workflow/Components/JavaScript.js.map +1 -1
  975. package/build/dist/Server/Types/Workflow/Components/Log.js +16 -0
  976. package/build/dist/Server/Types/Workflow/Components/Log.js.map +1 -1
  977. package/build/dist/Server/Types/Workflow/Components/MicrosoftTeams/SendMessageToChannel.js +16 -0
  978. package/build/dist/Server/Types/Workflow/Components/MicrosoftTeams/SendMessageToChannel.js.map +1 -1
  979. package/build/dist/Server/Types/Workflow/Components/Schedule.js +28 -0
  980. package/build/dist/Server/Types/Workflow/Components/Schedule.js.map +1 -1
  981. package/build/dist/Server/Types/Workflow/Components/Slack/SendMessageToChannel.js +16 -0
  982. package/build/dist/Server/Types/Workflow/Components/Slack/SendMessageToChannel.js.map +1 -1
  983. package/build/dist/Server/Types/Workflow/Components/Webhook.js +28 -0
  984. package/build/dist/Server/Types/Workflow/Components/Webhook.js.map +1 -1
  985. package/build/dist/Server/Types/Workflow/TriggerCode.js +34 -0
  986. package/build/dist/Server/Types/Workflow/TriggerCode.js.map +1 -1
  987. package/build/dist/Server/Utils/APIKey/AccessPermission.js +36 -0
  988. package/build/dist/Server/Utils/APIKey/AccessPermission.js.map +1 -1
  989. package/build/dist/Server/Utils/Airtable.js +35 -0
  990. package/build/dist/Server/Utils/Airtable.js.map +1 -1
  991. package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +16 -0
  992. package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
  993. package/build/dist/Server/Utils/Browser.js +40 -0
  994. package/build/dist/Server/Utils/Browser.js.map +1 -1
  995. package/build/dist/Server/Utils/CodeRepository/CodeRepository.js +142 -0
  996. package/build/dist/Server/Utils/CodeRepository/CodeRepository.js.map +1 -1
  997. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHub.js +40 -0
  998. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHub.js.map +1 -1
  999. package/build/dist/Server/Utils/CodeRepository/HostedCodeRepository/HostedCodeRepository.js +34 -0
  1000. package/build/dist/Server/Utils/CodeRepository/HostedCodeRepository/HostedCodeRepository.js.map +1 -1
  1001. package/build/dist/Server/Utils/Cookie.js +77 -0
  1002. package/build/dist/Server/Utils/Cookie.js.map +1 -1
  1003. package/build/dist/Server/Utils/CronTab.js +16 -0
  1004. package/build/dist/Server/Utils/CronTab.js.map +1 -1
  1005. package/build/dist/Server/Utils/Encryption.js +22 -0
  1006. package/build/dist/Server/Utils/Encryption.js.map +1 -1
  1007. package/build/dist/Server/Utils/Execute.js +16 -0
  1008. package/build/dist/Server/Utils/Execute.js.map +1 -1
  1009. package/build/dist/Server/Utils/Express.js +42 -1
  1010. package/build/dist/Server/Utils/Express.js.map +1 -1
  1011. package/build/dist/Server/Utils/Greenlock/Greenlock.js +218 -232
  1012. package/build/dist/Server/Utils/Greenlock/Greenlock.js.map +1 -1
  1013. package/build/dist/Server/Utils/JsonWebToken.js +40 -0
  1014. package/build/dist/Server/Utils/JsonWebToken.js.map +1 -1
  1015. package/build/dist/Server/Utils/LocalFile.js +82 -0
  1016. package/build/dist/Server/Utils/LocalFile.js.map +1 -1
  1017. package/build/dist/Server/Utils/Monitor/Criteria/APIRequestCriteria.js +16 -0
  1018. package/build/dist/Server/Utils/Monitor/Criteria/APIRequestCriteria.js.map +1 -1
  1019. package/build/dist/Server/Utils/Monitor/Criteria/CompareCriteria.js +100 -0
  1020. package/build/dist/Server/Utils/Monitor/Criteria/CompareCriteria.js.map +1 -1
  1021. package/build/dist/Server/Utils/Monitor/Criteria/CustomCodeMonitorCriteria.js +16 -0
  1022. package/build/dist/Server/Utils/Monitor/Criteria/CustomCodeMonitorCriteria.js.map +1 -1
  1023. package/build/dist/Server/Utils/Monitor/Criteria/EvaluateOverTime.js +16 -0
  1024. package/build/dist/Server/Utils/Monitor/Criteria/EvaluateOverTime.js.map +1 -1
  1025. package/build/dist/Server/Utils/Monitor/Criteria/IncomingRequestCriteria.js +16 -0
  1026. package/build/dist/Server/Utils/Monitor/Criteria/IncomingRequestCriteria.js.map +1 -1
  1027. package/build/dist/Server/Utils/Monitor/Criteria/LogMonitorCriteria.js +16 -0
  1028. package/build/dist/Server/Utils/Monitor/Criteria/LogMonitorCriteria.js.map +1 -1
  1029. package/build/dist/Server/Utils/Monitor/Criteria/MetricMonitorCriteria.js +16 -0
  1030. package/build/dist/Server/Utils/Monitor/Criteria/MetricMonitorCriteria.js.map +1 -1
  1031. package/build/dist/Server/Utils/Monitor/Criteria/SSLMonitorCriteria.js +16 -0
  1032. package/build/dist/Server/Utils/Monitor/Criteria/SSLMonitorCriteria.js.map +1 -1
  1033. package/build/dist/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.js +16 -0
  1034. package/build/dist/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.js.map +1 -1
  1035. package/build/dist/Server/Utils/Monitor/Criteria/SyntheticMonitor.js +16 -0
  1036. package/build/dist/Server/Utils/Monitor/Criteria/SyntheticMonitor.js.map +1 -1
  1037. package/build/dist/Server/Utils/Monitor/Criteria/TraceMonitorCriteria.js +16 -0
  1038. package/build/dist/Server/Utils/Monitor/Criteria/TraceMonitorCriteria.js.map +1 -1
  1039. package/build/dist/Server/Utils/Monitor/MonitorAlert.js +22 -0
  1040. package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
  1041. package/build/dist/Server/Utils/Monitor/MonitorIncident.js +22 -0
  1042. package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
  1043. package/build/dist/Server/Utils/Monitor/MonitorResource.js +22 -0
  1044. package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
  1045. package/build/dist/Server/Utils/Monitor/MonitorStatusTimeline.js +16 -0
  1046. package/build/dist/Server/Utils/Monitor/MonitorStatusTimeline.js.map +1 -1
  1047. package/build/dist/Server/Utils/Realtime.js +52 -0
  1048. package/build/dist/Server/Utils/Realtime.js.map +1 -1
  1049. package/build/dist/Server/Utils/Response.js +109 -0
  1050. package/build/dist/Server/Utils/Response.js.map +1 -1
  1051. package/build/dist/Server/Utils/Stream.js +23 -0
  1052. package/build/dist/Server/Utils/Stream.js.map +1 -1
  1053. package/build/dist/Server/Utils/Telemetry/CaptureSpan.js +84 -0
  1054. package/build/dist/Server/Utils/Telemetry/CaptureSpan.js.map +1 -0
  1055. package/build/dist/Server/Utils/Telemetry/Telemetry.js +22 -0
  1056. package/build/dist/Server/Utils/Telemetry/Telemetry.js.map +1 -1
  1057. package/build/dist/Server/Utils/Telemetry.js.map +1 -1
  1058. package/build/dist/Server/Utils/TwoFactorAuth.js +40 -0
  1059. package/build/dist/Server/Utils/TwoFactorAuth.js.map +1 -1
  1060. package/build/dist/Server/Utils/UserPermission/UserPermission.js +30 -0
  1061. package/build/dist/Server/Utils/UserPermission/UserPermission.js.map +1 -1
  1062. package/build/dist/Server/Utils/VM/VMAPI.js +34 -0
  1063. package/build/dist/Server/Utils/VM/VMAPI.js.map +1 -1
  1064. package/build/dist/Server/Utils/VM/VMRunner.js +16 -0
  1065. package/build/dist/Server/Utils/VM/VMRunner.js.map +1 -1
  1066. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/Alert.js +16 -0
  1067. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/Alert.js.map +1 -1
  1068. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/Incident.js +16 -0
  1069. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/Incident.js.map +1 -1
  1070. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/ScheduledMaintenance.js +16 -0
  1071. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/ScheduledMaintenance.js.map +1 -1
  1072. package/build/dist/Server/Utils/Workspace/Slack/Actions/ActionTypes.js +2 -0
  1073. package/build/dist/Server/Utils/Workspace/Slack/Actions/ActionTypes.js.map +1 -1
  1074. package/build/dist/Server/Utils/Workspace/Slack/Actions/Alert.js +70 -0
  1075. package/build/dist/Server/Utils/Workspace/Slack/Actions/Alert.js.map +1 -1
  1076. package/build/dist/Server/Utils/Workspace/Slack/Actions/Auth.js +16 -0
  1077. package/build/dist/Server/Utils/Workspace/Slack/Actions/Auth.js.map +1 -1
  1078. package/build/dist/Server/Utils/Workspace/Slack/Actions/Incident.js +82 -0
  1079. package/build/dist/Server/Utils/Workspace/Slack/Actions/Incident.js.map +1 -1
  1080. package/build/dist/Server/Utils/Workspace/Slack/Actions/Monitor.js +50 -0
  1081. package/build/dist/Server/Utils/Workspace/Slack/Actions/Monitor.js.map +1 -0
  1082. package/build/dist/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.js +70 -0
  1083. package/build/dist/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.js.map +1 -1
  1084. package/build/dist/Server/Utils/Workspace/Slack/Messages/Alert.js +16 -0
  1085. package/build/dist/Server/Utils/Workspace/Slack/Messages/Alert.js.map +1 -1
  1086. package/build/dist/Server/Utils/Workspace/Slack/Messages/Incident.js +16 -0
  1087. package/build/dist/Server/Utils/Workspace/Slack/Messages/Incident.js.map +1 -1
  1088. package/build/dist/Server/Utils/Workspace/Slack/Messages/Monitor.js +53 -0
  1089. package/build/dist/Server/Utils/Workspace/Slack/Messages/Monitor.js.map +1 -0
  1090. package/build/dist/Server/Utils/Workspace/Slack/Messages/ScheduledMaintenance.js +16 -0
  1091. package/build/dist/Server/Utils/Workspace/Slack/Messages/ScheduledMaintenance.js.map +1 -1
  1092. package/build/dist/Server/Utils/Workspace/Slack/Slack.js +186 -2
  1093. package/build/dist/Server/Utils/Workspace/Slack/Slack.js.map +1 -1
  1094. package/build/dist/Server/Utils/Workspace/Workspace.js +53 -0
  1095. package/build/dist/Server/Utils/Workspace/Workspace.js.map +1 -1
  1096. package/build/dist/Server/Utils/Workspace/WorkspaceBase.js +196 -0
  1097. package/build/dist/Server/Utils/Workspace/WorkspaceBase.js.map +1 -1
  1098. package/build/dist/Server/Utils/Workspace/WorkspaceMessages/Alert.js +22 -0
  1099. package/build/dist/Server/Utils/Workspace/WorkspaceMessages/Alert.js.map +1 -1
  1100. package/build/dist/Server/Utils/Workspace/WorkspaceMessages/Incident.js +22 -0
  1101. package/build/dist/Server/Utils/Workspace/WorkspaceMessages/Incident.js.map +1 -1
  1102. package/build/dist/Server/Utils/Workspace/WorkspaceMessages/Monitor.js +69 -0
  1103. package/build/dist/Server/Utils/Workspace/WorkspaceMessages/Monitor.js.map +1 -0
  1104. package/build/dist/Server/Utils/Workspace/WorkspaceMessages/ScheduledMaintenance.js +22 -0
  1105. package/build/dist/Server/Utils/Workspace/WorkspaceMessages/ScheduledMaintenance.js.map +1 -1
  1106. package/build/dist/Types/Permission.js +32 -0
  1107. package/build/dist/Types/Permission.js.map +1 -1
  1108. package/build/dist/Types/Workspace/NotificationRules/EventType.js +1 -1
  1109. package/build/dist/Types/Workspace/NotificationRules/EventType.js.map +1 -1
  1110. package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js +7 -1
  1111. package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js.map +1 -1
  1112. package/build/dist/Types/Workspace/NotificationRules/NotificationRuleTypes/MonitorNotificationRule.js +2 -0
  1113. package/build/dist/Types/Workspace/NotificationRules/NotificationRuleTypes/MonitorNotificationRule.js.map +1 -0
  1114. package/build/dist/UI/Utils/{Telemetry.js → Telemetry/Telemetry.js} +1 -1
  1115. package/build/dist/UI/Utils/Telemetry/Telemetry.js.map +1 -0
  1116. package/package.json +2 -2
  1117. package/Types/Workspace/NotificationRules/NotificationRuleTypes/MonitorStatusNotificationRule.ts +0 -7
  1118. package/build/dist/Types/Workspace/NotificationRules/NotificationRuleTypes/MonitorStatusNotificationRule.js +0 -2
  1119. package/build/dist/Types/Workspace/NotificationRules/NotificationRuleTypes/MonitorStatusNotificationRule.js.map +0 -1
  1120. package/build/dist/UI/Utils/Telemetry.js.map +0 -1
@@ -1,3 +1,12 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
1
10
  import { AppApiHostname } from "../EnvironmentConfig";
2
11
  import ClusterKeyAuthorization from "../Middleware/ClusterKeyAuthorization";
3
12
  import BaseService from "./BaseService";
@@ -5,6 +14,7 @@ import Protocol from "../../Types/API/Protocol";
5
14
  import Route from "../../Types/API/Route";
6
15
  import URL from "../../Types/API/URL";
7
16
  import API from "Common/Utils/API";
17
+ import CaptureSpan from "../Utils/Telemetry/CaptureSpan";
8
18
  export class MailService extends BaseService {
9
19
  async sendMail(mail, options) {
10
20
  var _a;
@@ -29,5 +39,11 @@ export class MailService extends BaseService {
29
39
  return await API.post(new URL(Protocol.HTTP, AppApiHostname, new Route("/api/notification/email/send")), body, Object.assign({}, ClusterKeyAuthorization.getClusterKeyHeaders()));
30
40
  }
31
41
  }
42
+ __decorate([
43
+ CaptureSpan(),
44
+ __metadata("design:type", Function),
45
+ __metadata("design:paramtypes", [Object, Object]),
46
+ __metadata("design:returntype", Promise)
47
+ ], MailService.prototype, "sendMail", null);
32
48
  export default new MailService();
33
49
  //# sourceMappingURL=MailService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MailService.js","sourceRoot":"","sources":["../../../../Server/Services/MailService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,uBAAuB,MAAM,uCAAuC,CAAC;AAC5E,OAAO,WAAW,MAAM,eAAe,CAAC;AAGxC,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,GAAG,MAAM,qBAAqB,CAAC;AAKtC,OAAO,GAAG,MAAM,kBAAkB,CAAC;AAEnC,MAAM,OAAO,WAAY,SAAQ,WAAW;IACnC,KAAK,CAAC,QAAQ,CACnB,IAAW,EACX,OAIC;;QAED,MAAM,IAAI,mCACL,IAAI,KACP,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,GACjC,CAAC;QAEF,IAAI,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;YAClC,IAAI,CAAC,SAAS,CAAC,GAAG,MAAA,OAAO,CAAC,UAAU,CAAC,EAAE,0CAAE,QAAQ,EAAE,CAAC;YACpD,IAAI,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,I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ACnE,CAAC;QAED,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,uBAAuB,EAAE,CAAC;YACrC,IAAI,CAAC,yBAAyB,CAAC;gBAC7B,OAAO,CAAC,uBAAuB,CAAC,QAAQ,EAAE,CAAC;QAC/C,CAAC;QAED,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,EAAE,CAAC;YACvB,IAAI,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;QACnD,CAAC;QAED,OAAO,MAAM,GAAG,CAAC,IAAI,CACnB,IAAI,GAAG,CACL,QAAQ,CAAC,IAAI,EACb,cAAc,EACd,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAC1C,EACD,IAAI,oBAEC,uBAAuB,CAAC,oBAAoB,EAAE,EAEpD,CAAC;IACJ,CAAC;CACF;AA7Cc;IADZ,WAAW,EAAE;;;;2CA6Cb;AAGH,eAAe,IAAI,WAAW,EAAE,CAAC"}
@@ -0,0 +1,117 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { Blue500 } from "../../Types/BrandColors";
11
+ import OneUptimeDate from "../../Types/Date";
12
+ import BadDataException from "../../Types/Exception/BadDataException";
13
+ import { IsBillingEnabled } from "../EnvironmentConfig";
14
+ import logger from "../Utils/Logger";
15
+ import DatabaseService from "./DatabaseService";
16
+ import MonitorFeed from "Common/Models/DatabaseModels/MonitorFeed";
17
+ import WorkspaceNotificationRuleService from "./WorkspaceNotificationRuleService";
18
+ import CaptureSpan from "../Utils/Telemetry/CaptureSpan";
19
+ export class Service extends DatabaseService {
20
+ constructor() {
21
+ super(MonitorFeed);
22
+ if (IsBillingEnabled) {
23
+ this.hardDeleteItemsOlderThanInDays("createdAt", 120);
24
+ }
25
+ }
26
+ async createMonitorFeedItem(data) {
27
+ var _a;
28
+ try {
29
+ logger.debug("MonitorFeedService.createMonitorFeedItem");
30
+ logger.debug(data);
31
+ const monitorFeed = new MonitorFeed();
32
+ if (!data.monitorId) {
33
+ throw new BadDataException("Monitor ID is required");
34
+ }
35
+ if (!data.feedInfoInMarkdown) {
36
+ throw new BadDataException("Log in markdown is required");
37
+ }
38
+ if (!data.monitorFeedEventType) {
39
+ throw new BadDataException("Monitor log event is required");
40
+ }
41
+ if (!data.projectId) {
42
+ throw new BadDataException("Project ID is required");
43
+ }
44
+ if (!data.displayColor) {
45
+ data.displayColor = Blue500;
46
+ }
47
+ monitorFeed.displayColor = data.displayColor;
48
+ monitorFeed.monitorId = data.monitorId;
49
+ monitorFeed.feedInfoInMarkdown = data.feedInfoInMarkdown;
50
+ monitorFeed.monitorFeedEventType = data.monitorFeedEventType;
51
+ monitorFeed.projectId = data.projectId;
52
+ if (!data.postedAt) {
53
+ monitorFeed.postedAt = OneUptimeDate.getCurrentDate();
54
+ }
55
+ if (data.userId) {
56
+ monitorFeed.userId = data.userId;
57
+ }
58
+ if (data.moreInformationInMarkdown) {
59
+ monitorFeed.moreInformationInMarkdown = data.moreInformationInMarkdown;
60
+ }
61
+ const createdMonitorFeed = await this.create({
62
+ data: monitorFeed,
63
+ props: {
64
+ isRoot: true,
65
+ },
66
+ });
67
+ logger.debug("Monitor Feed created");
68
+ logger.debug(createdMonitorFeed);
69
+ try {
70
+ // send notification to slack and teams
71
+ if (data.workspaceNotification &&
72
+ ((_a = data.workspaceNotification) === null || _a === void 0 ? void 0 : _a.sendWorkspaceNotification)) {
73
+ await this.sendWorkspaceNotification({
74
+ projectId: data.projectId,
75
+ monitorId: data.monitorId,
76
+ feedInfoInMarkdown: data.feedInfoInMarkdown,
77
+ workspaceNotification: data.workspaceNotification,
78
+ });
79
+ }
80
+ }
81
+ catch (e) {
82
+ logger.error("Error in sending notification to slack and teams");
83
+ logger.error(e);
84
+ // we dont throw this error as it is not a critical error
85
+ }
86
+ }
87
+ catch (e) {
88
+ logger.error("Error in creating monitor feed");
89
+ logger.error(e);
90
+ // we dont throw this error as it is not a critical error
91
+ }
92
+ }
93
+ async sendWorkspaceNotification(data) {
94
+ return await WorkspaceNotificationRuleService.sendWorkspaceMarkdownNotification({
95
+ projectId: data.projectId,
96
+ notificationFor: {
97
+ monitorId: data.monitorId,
98
+ },
99
+ feedInfoInMarkdown: data.feedInfoInMarkdown,
100
+ workspaceNotification: data.workspaceNotification,
101
+ });
102
+ }
103
+ }
104
+ __decorate([
105
+ CaptureSpan(),
106
+ __metadata("design:type", Function),
107
+ __metadata("design:paramtypes", [Object]),
108
+ __metadata("design:returntype", Promise)
109
+ ], Service.prototype, "createMonitorFeedItem", null);
110
+ __decorate([
111
+ CaptureSpan(),
112
+ __metadata("design:type", Function),
113
+ __metadata("design:paramtypes", [Object]),
114
+ __metadata("design:returntype", Promise)
115
+ ], Service.prototype, "sendWorkspaceNotification", null);
116
+ export default new Service();
117
+ //# sourceMappingURL=MonitorFeedService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MonitorFeedService.js","sourceRoot":"","sources":["../../../../Server/Services/MonitorFeedService.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,gBAAgB,MAAM,wCAAwC,CAAC;AAEtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO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AAC,KAAK,CAAC,kDAAkD,CAAC,CAAC;gBACjE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBAEhB,yDAAyD;YAC3D,CAAC;QACH,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;YAC/C,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAEhB,yDAAyD;QAC3D,CAAC;IACH,CAAC;IAGY,AAAN,KAAK,CAAC,yBAAyB,CAAC,IAStC;QACC,OAAO,MAAM,gCAAgC,CAAC,iCAAiC,CAC7E;YACE,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,eAAe,EAAE;gBACf,SAAS,EAAE,IAAI,CAAC,SAAS;aAC1B;YACD,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;YAC3C,qBAAqB,EAAE,IAAI,CAAC,qBAAqB;SAClD,CACF,CAAC;IACJ,CAAC;CACF;AAzHc;IADZ,WAAW,EAAE;;;;oDAkGb;AAGY;IADZ,WAAW,EAAE;;;;wDAqBb;AAGH,eAAe,IAAI,OAAO,EAAE,CAAC"}
@@ -1,3 +1,12 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
1
10
  import QueryHelper from "../Types/Database/QueryHelper";
2
11
  import DatabaseService from "./DatabaseService";
3
12
  import MonitorGroupResourceService from "./MonitorGroupResourceService";
@@ -9,6 +18,7 @@ import BadDataException from "../../Types/Exception/BadDataException";
9
18
  import ObjectID from "../../Types/ObjectID";
10
19
  import MonitorGroup from "Common/Models/DatabaseModels/MonitorGroup";
11
20
  import StatusPageResourceService from "./StatusPageResourceService";
21
+ import CaptureSpan from "../Utils/Telemetry/CaptureSpan";
12
22
  export class Service extends DatabaseService {
13
23
  constructor() {
14
24
  super(MonitorGroup);
@@ -154,5 +164,25 @@ export class Service extends DatabaseService {
154
164
  return currentStatus;
155
165
  }
156
166
  }
167
+ __decorate([
168
+ CaptureSpan(),
169
+ __metadata("design:type", Function),
170
+ __metadata("design:paramtypes", [Object]),
171
+ __metadata("design:returntype", Promise)
172
+ ], Service.prototype, "onBeforeDelete", null);
173
+ __decorate([
174
+ CaptureSpan(),
175
+ __metadata("design:type", Function),
176
+ __metadata("design:paramtypes", [ObjectID,
177
+ Date,
178
+ Date, Object]),
179
+ __metadata("design:returntype", Promise)
180
+ ], Service.prototype, "getStatusTimeline", null);
181
+ __decorate([
182
+ CaptureSpan(),
183
+ __metadata("design:type", Function),
184
+ __metadata("design:paramtypes", [ObjectID, Object]),
185
+ __metadata("design:returntype", Promise)
186
+ ], Service.prototype, "getCurrentStatus", null);
157
187
  export default new Service();
158
188
  //# sourceMappingURL=MonitorGroupService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MonitorGroupService.js","sourceRoot":"","sources":["../../../../Server/Services/MonitorGroupService.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,+BAA+B,CAAC;AACxD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,2BAA2B,MAAM,+BAA+B,CAAC;AACxE,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,4BAA4B,MAAM,gCAAgC,CAAC;AAE1E,OAAO,SAAS,MAAM,oCAAoC,CAAC;AAC3D,OAAO,SAAS,EAAE,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,C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,WAAW,EAAE;;;;6CAoBb;AAGY;IADZ,WAAW,EAAE;;qCAEI,QAAQ;QACb,IAAI;QACN,IAAI;;gDAsEd;AAGY;IADZ,WAAW,EAAE;;qCAEI,QAAQ;;+CAqFzB;AAEH,eAAe,IAAI,OAAO,EAAE,CAAC"}
@@ -1,9 +1,161 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
1
10
  import DatabaseService from "./DatabaseService";
2
11
  import Model from "Common/Models/DatabaseModels/MonitorOwnerTeam";
12
+ import MonitorFeedService from "./MonitorFeedService";
13
+ import { MonitorFeedEventType } from "../../Models/DatabaseModels/MonitorFeed";
14
+ import { Gray500, Red500 } from "../../Types/BrandColors";
15
+ import TeamService from "./TeamService";
16
+ import MonitorService from "./MonitorService";
17
+ import WorkspaceNotificationRuleService from "./WorkspaceNotificationRuleService";
18
+ import NotificationRuleEventType from "../../Types/Workspace/NotificationRules/EventType";
19
+ import logger from "../Utils/Logger";
20
+ import CaptureSpan from "../Utils/Telemetry/CaptureSpan";
3
21
  export class Service extends DatabaseService {
4
22
  constructor() {
5
23
  super(Model);
6
24
  }
25
+ async onBeforeDelete(deleteBy) {
26
+ const itemsToDelete = await this.findBy({
27
+ query: deleteBy.query,
28
+ limit: deleteBy.limit,
29
+ skip: deleteBy.skip,
30
+ props: {
31
+ isRoot: true,
32
+ },
33
+ select: {
34
+ monitorId: true,
35
+ projectId: true,
36
+ teamId: true,
37
+ },
38
+ });
39
+ return {
40
+ carryForward: {
41
+ itemsToDelete: itemsToDelete,
42
+ },
43
+ deleteBy: deleteBy,
44
+ };
45
+ }
46
+ async onDeleteSuccess(onDelete, _itemIdsBeforeDelete) {
47
+ var _a;
48
+ const deleteByUserId = ((_a = onDelete.deleteBy.deletedByUser) === null || _a === void 0 ? void 0 : _a.id) || onDelete.deleteBy.props.userId;
49
+ const itemsToDelete = onDelete.carryForward.itemsToDelete;
50
+ for (const item of itemsToDelete) {
51
+ const monitorId = item.monitorId;
52
+ const projectId = item.projectId;
53
+ const teamId = item.teamId;
54
+ if (monitorId && teamId && projectId) {
55
+ const team = await TeamService.findOneById({
56
+ id: teamId,
57
+ select: {
58
+ name: true,
59
+ },
60
+ props: {
61
+ isRoot: true,
62
+ },
63
+ });
64
+ const monitorName = await MonitorService.getMonitorName({
65
+ monitorId: monitorId,
66
+ });
67
+ if (team && team.name) {
68
+ await MonitorFeedService.createMonitorFeedItem({
69
+ monitorId: monitorId,
70
+ projectId: projectId,
71
+ monitorFeedEventType: MonitorFeedEventType.OwnerTeamRemoved,
72
+ displayColor: Red500,
73
+ feedInfoInMarkdown: `👨🏻‍👩🏻‍👦🏻 Removed team **${team.name}** from the [Monitor ${monitorName}](${(await MonitorService.getMonitorLinkInDashboard(projectId, monitorId)).toString()}) as the owner.`,
74
+ userId: deleteByUserId || undefined,
75
+ workspaceNotification: {
76
+ sendWorkspaceNotification: true,
77
+ notifyUserId: deleteByUserId || undefined,
78
+ },
79
+ });
80
+ }
81
+ }
82
+ }
83
+ return onDelete;
84
+ }
85
+ async onCreateSuccess(onCreate, createdItem) {
86
+ // add monitor feed.
87
+ const monitorId = createdItem.monitorId;
88
+ const projectId = createdItem.projectId;
89
+ const teamId = createdItem.teamId;
90
+ const createdByUserId = createdItem.createdByUserId || onCreate.createBy.props.userId;
91
+ if (monitorId && teamId && projectId) {
92
+ const team = await TeamService.findOneById({
93
+ id: teamId,
94
+ select: {
95
+ name: true,
96
+ },
97
+ props: {
98
+ isRoot: true,
99
+ },
100
+ });
101
+ if (team && team.name) {
102
+ const monitorName = await MonitorService.getMonitorName({
103
+ monitorId: monitorId,
104
+ });
105
+ await MonitorFeedService.createMonitorFeedItem({
106
+ monitorId: monitorId,
107
+ projectId: projectId,
108
+ monitorFeedEventType: MonitorFeedEventType.OwnerTeamAdded,
109
+ displayColor: Gray500,
110
+ feedInfoInMarkdown: `👨🏻‍👩🏻‍👦🏻 Added team **${team.name}** to the [Monitor ${monitorName}](${(await MonitorService.getMonitorLinkInDashboard(projectId, monitorId)).toString()}) as the owner.`,
111
+ userId: createdByUserId || undefined,
112
+ workspaceNotification: {
113
+ sendWorkspaceNotification: true,
114
+ notifyUserId: createdByUserId || undefined,
115
+ },
116
+ });
117
+ }
118
+ }
119
+ // get notification rule where inviteOwners is true.
120
+ const notificationRules = await WorkspaceNotificationRuleService.getNotificationRulesWhereInviteOwnersIsTrue({
121
+ projectId: projectId,
122
+ notificationFor: {
123
+ monitorId: monitorId,
124
+ },
125
+ notificationRuleEventType: NotificationRuleEventType.Monitor,
126
+ });
127
+ logger.debug(`Notification Rules for Monitor Owner Teams`);
128
+ logger.debug(notificationRules);
129
+ WorkspaceNotificationRuleService.inviteTeamsBasedOnRulesAndWorkspaceChannels({
130
+ notificationRules: notificationRules,
131
+ projectId: projectId,
132
+ workspaceChannels: await MonitorService.getWorkspaceChannelForMonitor({
133
+ monitorId: monitorId,
134
+ }),
135
+ teamIds: [teamId],
136
+ }).catch((error) => {
137
+ logger.error(error);
138
+ });
139
+ return createdItem;
140
+ }
7
141
  }
142
+ __decorate([
143
+ CaptureSpan(),
144
+ __metadata("design:type", Function),
145
+ __metadata("design:paramtypes", [Object]),
146
+ __metadata("design:returntype", Promise)
147
+ ], Service.prototype, "onBeforeDelete", null);
148
+ __decorate([
149
+ CaptureSpan(),
150
+ __metadata("design:type", Function),
151
+ __metadata("design:paramtypes", [Object, Array]),
152
+ __metadata("design:returntype", Promise)
153
+ ], Service.prototype, "onDeleteSuccess", null);
154
+ __decorate([
155
+ CaptureSpan(),
156
+ __metadata("design:type", Function),
157
+ __metadata("design:paramtypes", [Object, Model]),
158
+ __metadata("design:returntype", Promise)
159
+ ], Service.prototype, "onCreateSuccess", null);
8
160
  export default new Service();
9
161
  //# sourceMappingURL=MonitorOwnerTeamService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MonitorOwnerTeamService.js","sourceRoot":"","sources":["../../../../Server/Services/MonitorOwnerTeamService.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,MAAM,+CAA+C,CAAC;AAElE,MAAM,OAAO,OAAQ,SAAQ,eAAsB;IACjD;QACE,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;CACF;AAED,eAAe,IAAI,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"MonitorOwnerTeamService.js","sourceRoot":"","sources":["../../../../Server/Services/MonitorOwnerTeamService.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,MAAM,+CAA+C,CAAC;AAClE,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,WAAW,MAAM,eAAe,CAAC;AAGxC,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,gCAAgC,MAAM,oCAAoC,CAAC;AAClF,OAAO,yBAAyB,MAAM,mDAAmD,CAAC;AAE1F,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,WAAW,MAAM,gCAAgC,CAAC;AAEzD,MAAM,OAAO,OAAQ,SAAQ,eAAsB;IACjD;QACE,KAAK,CAAC,KAAK,CAAC,CAAC;IACf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AE,EAAE;YACvB,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;QAEH,OAAO,WAAW,CAAC;IACrB,CAAC;CACF;AArJ0B;IADxB,WAAW,EAAE;;;;6CAwBb;AAGwB;IADxB,WAAW,EAAE;;6CAGU,KAAK;;8CA6C5B;AAGqB;IADrB,WAAW,EAAE;;6CAGC,KAAK;;8CAsEnB;AAGH,eAAe,IAAI,OAAO,EAAE,CAAC"}
@@ -1,9 +1,154 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
1
10
  import DatabaseService from "./DatabaseService";
2
11
  import Model from "Common/Models/DatabaseModels/MonitorOwnerUser";
12
+ import MonitorFeedService from "./MonitorFeedService";
13
+ import { MonitorFeedEventType } from "../../Models/DatabaseModels/MonitorFeed";
14
+ import { Gray500, Red500 } from "../../Types/BrandColors";
15
+ import UserService from "./UserService";
16
+ import MonitorService from "./MonitorService";
17
+ import WorkspaceNotificationRuleService from "./WorkspaceNotificationRuleService";
18
+ import NotificationRuleEventType from "../../Types/Workspace/NotificationRules/EventType";
19
+ import logger from "../Utils/Logger";
20
+ import CaptureSpan from "../Utils/Telemetry/CaptureSpan";
3
21
  export class Service extends DatabaseService {
4
22
  constructor() {
5
23
  super(Model);
6
24
  }
25
+ async onBeforeDelete(deleteBy) {
26
+ const itemsToDelete = await this.findBy({
27
+ query: deleteBy.query,
28
+ limit: deleteBy.limit,
29
+ skip: deleteBy.skip,
30
+ props: {
31
+ isRoot: true,
32
+ },
33
+ select: {
34
+ monitorId: true,
35
+ projectId: true,
36
+ userId: true,
37
+ },
38
+ });
39
+ return {
40
+ carryForward: {
41
+ itemsToDelete: itemsToDelete,
42
+ },
43
+ deleteBy: deleteBy,
44
+ };
45
+ }
46
+ async onDeleteSuccess(onDelete, _itemIdsBeforeDelete) {
47
+ var _a, _b;
48
+ const deleteByUserId = ((_a = onDelete.deleteBy.deletedByUser) === null || _a === void 0 ? void 0 : _a.id) || onDelete.deleteBy.props.userId;
49
+ const itemsToDelete = onDelete.carryForward.itemsToDelete;
50
+ for (const item of itemsToDelete) {
51
+ const monitorId = item.monitorId;
52
+ const projectId = item.projectId;
53
+ const userId = item.userId;
54
+ if (monitorId && userId && projectId) {
55
+ const user = await UserService.findOneById({
56
+ id: userId,
57
+ select: {
58
+ name: true,
59
+ email: true,
60
+ },
61
+ props: {
62
+ isRoot: true,
63
+ },
64
+ });
65
+ const monitorName = await MonitorService.getMonitorName({
66
+ monitorId: monitorId,
67
+ });
68
+ if (user && user.name) {
69
+ await MonitorFeedService.createMonitorFeedItem({
70
+ monitorId: monitorId,
71
+ projectId: projectId,
72
+ monitorFeedEventType: MonitorFeedEventType.OwnerUserRemoved,
73
+ displayColor: Red500,
74
+ feedInfoInMarkdown: `👨🏻‍💻 Removed **${user.name.toString()}** (${(_b = user.email) === null || _b === void 0 ? void 0 : _b.toString()}) from the [Monitor ${monitorName}](${(await MonitorService.getMonitorLinkInDashboard(projectId, monitorId)).toString()}) as the owner.`,
75
+ userId: deleteByUserId || undefined,
76
+ workspaceNotification: {
77
+ sendWorkspaceNotification: true,
78
+ notifyUserId: userId || undefined,
79
+ },
80
+ });
81
+ }
82
+ }
83
+ }
84
+ return onDelete;
85
+ }
86
+ async onCreateSuccess(onCreate, createdItem) {
87
+ // add monitor feed.
88
+ const monitorId = createdItem.monitorId;
89
+ const projectId = createdItem.projectId;
90
+ const userId = createdItem.userId;
91
+ const createdByUserId = createdItem.createdByUserId || onCreate.createBy.props.userId;
92
+ if (monitorId && userId && projectId) {
93
+ const monitorName = await MonitorService.getMonitorName({
94
+ monitorId: monitorId,
95
+ });
96
+ if (userId) {
97
+ await MonitorFeedService.createMonitorFeedItem({
98
+ monitorId: monitorId,
99
+ projectId: projectId,
100
+ monitorFeedEventType: MonitorFeedEventType.OwnerUserAdded,
101
+ displayColor: Gray500,
102
+ feedInfoInMarkdown: `👨🏻‍💻 Added **${await UserService.getUserMarkdownString({
103
+ userId: userId,
104
+ projectId: projectId,
105
+ })}** to the [Monitor ${monitorName}](${(await MonitorService.getMonitorLinkInDashboard(projectId, monitorId)).toString()}) as the owner.`,
106
+ userId: createdByUserId || undefined,
107
+ workspaceNotification: {
108
+ sendWorkspaceNotification: true,
109
+ notifyUserId: userId || undefined,
110
+ },
111
+ });
112
+ }
113
+ }
114
+ // get notification rule where inviteOwners is true.
115
+ const notificationRules = await WorkspaceNotificationRuleService.getNotificationRulesWhereInviteOwnersIsTrue({
116
+ projectId: projectId,
117
+ notificationFor: {
118
+ monitorId: monitorId,
119
+ },
120
+ notificationRuleEventType: NotificationRuleEventType.Monitor,
121
+ });
122
+ WorkspaceNotificationRuleService.inviteUsersBasedOnRulesAndWorkspaceChannels({
123
+ notificationRules: notificationRules,
124
+ projectId: projectId,
125
+ workspaceChannels: await MonitorService.getWorkspaceChannelForMonitor({
126
+ monitorId: monitorId,
127
+ }),
128
+ userIds: [userId],
129
+ }).catch((error) => {
130
+ logger.error(error);
131
+ });
132
+ return createdItem;
133
+ }
7
134
  }
135
+ __decorate([
136
+ CaptureSpan(),
137
+ __metadata("design:type", Function),
138
+ __metadata("design:paramtypes", [Object]),
139
+ __metadata("design:returntype", Promise)
140
+ ], Service.prototype, "onBeforeDelete", null);
141
+ __decorate([
142
+ CaptureSpan(),
143
+ __metadata("design:type", Function),
144
+ __metadata("design:paramtypes", [Object, Array]),
145
+ __metadata("design:returntype", Promise)
146
+ ], Service.prototype, "onDeleteSuccess", null);
147
+ __decorate([
148
+ CaptureSpan(),
149
+ __metadata("design:type", Function),
150
+ __metadata("design:paramtypes", [Object, Model]),
151
+ __metadata("design:returntype", Promise)
152
+ ], Service.prototype, "onCreateSuccess", null);
8
153
  export default new Service();
9
154
  //# sourceMappingURL=MonitorOwnerUserService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MonitorOwnerUserService.js","sourceRoot":"","sources":["../../../../Server/Services/MonitorOwnerUserService.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,MAAM,+CAA+C,CAAC;AAElE,MAAM,OAAO,OAAQ,SAAQ,eAAsB;IACjD;QACE,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;CACF;AAED,eAAe,IAAI,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"MonitorOwnerUserService.js","sourceRoot":"","sources":["../../../../Server/Services/MonitorOwnerUserService.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,MAAM,+CAA+C,CAAC;AAClE,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,WAAW,MAAM,eAAe,CAAC;AAGxC,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,gCAAgC,MAAM,oCAAoC,CAAC;AAClF,OAAO,yBAAyB,MAAM,mDAAmD,CAAC;AAE1F,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,WAAW,MAAM,gCAAgC,CAAC;AAEzD,MAAM,OAAO,OAAQ,SAAQ,eAAsB;IACjD;QACE,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,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