@oneuptime/common 9.2.27 → 9.3.1

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 (263) hide show
  1. package/Models/DatabaseModels/AIAgent.ts +589 -0
  2. package/Models/DatabaseModels/AIAgentOwnerTeam.ts +434 -0
  3. package/Models/DatabaseModels/AIAgentOwnerUser.ts +433 -0
  4. package/Models/DatabaseModels/AIAgentTask.ts +549 -0
  5. package/Models/DatabaseModels/AIAgentTaskLog.ts +417 -0
  6. package/Models/DatabaseModels/AIAgentTaskPullRequest.ts +731 -0
  7. package/Models/DatabaseModels/AIAgentTaskTelemetryException.ts +388 -0
  8. package/Models/DatabaseModels/Index.ts +15 -0
  9. package/Models/DatabaseModels/Monitor.ts +33 -0
  10. package/Models/DatabaseModels/Project.ts +25 -0
  11. package/Models/DatabaseModels/TelemetryException.ts +1 -1
  12. package/Server/API/AIAgentAPI.ts +200 -0
  13. package/Server/API/AIAgentDataAPI.ts +692 -0
  14. package/Server/API/AIAgentTaskAPI.ts +286 -0
  15. package/Server/API/AIAgentTaskLogAPI.ts +165 -0
  16. package/Server/API/AIAgentTaskPullRequestAPI.ts +14 -0
  17. package/Server/API/GitHubAPI.ts +25 -7
  18. package/Server/API/TelemetryExceptionAPI.ts +169 -0
  19. package/Server/EnvironmentConfig.ts +3 -0
  20. package/Server/Infrastructure/Postgres/SchemaMigrations/1766590916627-MigrationName.ts +195 -0
  21. package/Server/Infrastructure/Postgres/SchemaMigrations/1766600860972-MigrationName.ts +31 -0
  22. package/Server/Infrastructure/Postgres/SchemaMigrations/1766606720183-MigrationName.ts +17 -0
  23. package/Server/Infrastructure/Postgres/SchemaMigrations/1766688107858-MigrationName.ts +63 -0
  24. package/Server/Infrastructure/Postgres/SchemaMigrations/1766754182870-MigrationName.ts +75 -0
  25. package/Server/Infrastructure/Postgres/SchemaMigrations/1766774689743-MigrationName.ts +157 -0
  26. package/Server/Infrastructure/Postgres/SchemaMigrations/1766777986427-MigrationName.ts +33 -0
  27. package/Server/Infrastructure/Postgres/SchemaMigrations/1766918848434-AddAIAgentIsDefault.ts +27 -0
  28. package/Server/Infrastructure/Postgres/SchemaMigrations/1766923324521-MigrationName.ts +37 -0
  29. package/Server/Infrastructure/Postgres/SchemaMigrations/1766958924188-AddGitHubAppInstallationIdToProject.ts +31 -0
  30. package/Server/Infrastructure/Postgres/SchemaMigrations/1767009661768-MigrationName.ts +35 -0
  31. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +22 -0
  32. package/Server/Services/AIAgentOwnerTeamService.ts +10 -0
  33. package/Server/Services/AIAgentOwnerUserService.ts +10 -0
  34. package/Server/Services/AIAgentService.ts +564 -0
  35. package/Server/Services/AIAgentTaskLogService.ts +10 -0
  36. package/Server/Services/AIAgentTaskPullRequestService.ts +10 -0
  37. package/Server/Services/AIAgentTaskService.ts +178 -0
  38. package/Server/Services/AIAgentTaskTelemetryExceptionService.ts +39 -0
  39. package/Server/Services/Index.ts +10 -0
  40. package/Server/Services/TelemetryExceptionService.ts +162 -0
  41. package/Server/Utils/Monitor/MonitorResource.ts +228 -0
  42. package/Server/Utils/PushNotificationUtil.ts +29 -0
  43. package/Server/Utils/WhatsAppTemplateUtil.ts +6 -0
  44. package/Tests/UI/Components/Badge.test.tsx +5 -5
  45. package/Tests/UI/Components/Card.test.tsx +4 -8
  46. package/Tests/UI/Components/HiddenText.test.tsx +2 -5
  47. package/Tests/UI/Components/SideMenuItem.test.tsx +4 -2
  48. package/Types/AI/AIAgentTaskMetadata.ts +25 -0
  49. package/Types/AI/AIAgentTaskStatus.ts +65 -0
  50. package/Types/AI/AIAgentTaskType.ts +40 -0
  51. package/Types/Email/EmailTemplateType.ts +2 -0
  52. package/Types/Monitor/MonitorEvaluationSummary.ts +2 -1
  53. package/Types/NotificationSetting/NotificationSettingEventType.ts +4 -0
  54. package/Types/Permission.ts +176 -0
  55. package/Types/WhatsApp/WhatsAppTemplates.ts +9 -0
  56. package/UI/Components/AIAgent/AIAgent.tsx +69 -0
  57. package/UI/Components/Badge/Badge.tsx +9 -5
  58. package/UI/Components/Banner/Banner.tsx +1 -1
  59. package/UI/Components/Card/Card.tsx +14 -12
  60. package/UI/Components/CodeBlock/CodeBlock.tsx +47 -4
  61. package/UI/Components/Detail/Detail.tsx +239 -49
  62. package/UI/Components/Detail/FieldLabel.tsx +35 -11
  63. package/UI/Components/Detail/PlaceholderText.tsx +18 -1
  64. package/UI/Components/Footer/Footer.tsx +9 -7
  65. package/UI/Components/Header/Header.tsx +4 -3
  66. package/UI/Components/Header/HeaderIconDropdownButton.tsx +13 -11
  67. package/UI/Components/Header/IconDropdown/IconDropdownItem.tsx +3 -3
  68. package/UI/Components/Header/IconDropdown/IconDropdownMenu.tsx +1 -1
  69. package/UI/Components/Header/ProjectPicker/CreateNewProjectButton.tsx +4 -4
  70. package/UI/Components/Header/ProjectPicker/ProjectPicker.tsx +6 -6
  71. package/UI/Components/Header/ProjectPicker/ProjectPickerFilterBox.tsx +3 -3
  72. package/UI/Components/Header/ProjectPicker/ProjectPickerMenu.tsx +1 -1
  73. package/UI/Components/Header/ProjectPicker/ProjectPickerMenuItem.tsx +4 -4
  74. package/UI/Components/HeaderAlert/HeaderAlert.tsx +32 -32
  75. package/UI/Components/HeaderAlert/HeaderAlertGroup.tsx +1 -7
  76. package/UI/Components/HiddenText/HiddenText.tsx +98 -27
  77. package/UI/Components/Icon/Icon.tsx +12 -9
  78. package/UI/Components/InfoCard/InfoCard.tsx +7 -3
  79. package/UI/Components/ModelTable/BaseModelTable.tsx +1 -1
  80. package/UI/Components/ObjectID/ObjectIDView.tsx +73 -0
  81. package/UI/Components/Page/Page.tsx +3 -5
  82. package/UI/Components/SideMenu/SideMenu.tsx +175 -40
  83. package/UI/Components/SideMenu/SideMenuDivider.tsx +17 -0
  84. package/UI/Components/SideMenu/SideMenuItem.tsx +111 -158
  85. package/UI/Components/SideMenu/SideMenuSection.tsx +53 -3
  86. package/UI/Components/Table/Table.tsx +1 -1
  87. package/UI/Components/Types/FieldType.ts +2 -0
  88. package/UI/Config.ts +5 -0
  89. package/build/dist/Models/DatabaseModels/AIAgent.js +614 -0
  90. package/build/dist/Models/DatabaseModels/AIAgent.js.map +1 -0
  91. package/build/dist/Models/DatabaseModels/AIAgentOwnerTeam.js +452 -0
  92. package/build/dist/Models/DatabaseModels/AIAgentOwnerTeam.js.map +1 -0
  93. package/build/dist/Models/DatabaseModels/AIAgentOwnerUser.js +451 -0
  94. package/build/dist/Models/DatabaseModels/AIAgentOwnerUser.js.map +1 -0
  95. package/build/dist/Models/DatabaseModels/AIAgentTask.js +580 -0
  96. package/build/dist/Models/DatabaseModels/AIAgentTask.js.map +1 -0
  97. package/build/dist/Models/DatabaseModels/AIAgentTaskLog.js +438 -0
  98. package/build/dist/Models/DatabaseModels/AIAgentTaskLog.js.map +1 -0
  99. package/build/dist/Models/DatabaseModels/AIAgentTaskPullRequest.js +771 -0
  100. package/build/dist/Models/DatabaseModels/AIAgentTaskPullRequest.js.map +1 -0
  101. package/build/dist/Models/DatabaseModels/AIAgentTaskTelemetryException.js +404 -0
  102. package/build/dist/Models/DatabaseModels/AIAgentTaskTelemetryException.js.map +1 -0
  103. package/build/dist/Models/DatabaseModels/Index.js +14 -0
  104. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  105. package/build/dist/Models/DatabaseModels/Monitor.js +34 -0
  106. package/build/dist/Models/DatabaseModels/Monitor.js.map +1 -1
  107. package/build/dist/Models/DatabaseModels/Project.js +26 -0
  108. package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
  109. package/build/dist/Models/DatabaseModels/TelemetryException.js +1 -1
  110. package/build/dist/Models/DatabaseModels/TelemetryException.js.map +1 -1
  111. package/build/dist/Server/API/AIAgentAPI.js +141 -0
  112. package/build/dist/Server/API/AIAgentAPI.js.map +1 -0
  113. package/build/dist/Server/API/AIAgentDataAPI.js +415 -0
  114. package/build/dist/Server/API/AIAgentDataAPI.js.map +1 -0
  115. package/build/dist/Server/API/AIAgentTaskAPI.js +199 -0
  116. package/build/dist/Server/API/AIAgentTaskAPI.js.map +1 -0
  117. package/build/dist/Server/API/AIAgentTaskLogAPI.js +106 -0
  118. package/build/dist/Server/API/AIAgentTaskLogAPI.js.map +1 -0
  119. package/build/dist/Server/API/AIAgentTaskPullRequestAPI.js +9 -0
  120. package/build/dist/Server/API/AIAgentTaskPullRequestAPI.js.map +1 -0
  121. package/build/dist/Server/API/GitHubAPI.js +23 -8
  122. package/build/dist/Server/API/GitHubAPI.js.map +1 -1
  123. package/build/dist/Server/API/TelemetryExceptionAPI.js +120 -0
  124. package/build/dist/Server/API/TelemetryExceptionAPI.js.map +1 -0
  125. package/build/dist/Server/EnvironmentConfig.js +2 -0
  126. package/build/dist/Server/EnvironmentConfig.js.map +1 -1
  127. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1766590916627-MigrationName.js +74 -0
  128. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1766590916627-MigrationName.js.map +1 -0
  129. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1766600860972-MigrationName.js +18 -0
  130. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1766600860972-MigrationName.js.map +1 -0
  131. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1766606720183-MigrationName.js +12 -0
  132. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1766606720183-MigrationName.js.map +1 -0
  133. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1766688107858-MigrationName.js +28 -0
  134. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1766688107858-MigrationName.js.map +1 -0
  135. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1766754182870-MigrationName.js +32 -0
  136. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1766754182870-MigrationName.js.map +1 -0
  137. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1766774689743-MigrationName.js +60 -0
  138. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1766774689743-MigrationName.js.map +1 -0
  139. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1766777986427-MigrationName.js +18 -0
  140. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1766777986427-MigrationName.js.map +1 -0
  141. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1766918848434-AddAIAgentIsDefault.js +16 -0
  142. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1766918848434-AddAIAgentIsDefault.js.map +1 -0
  143. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1766923324521-MigrationName.js +20 -0
  144. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1766923324521-MigrationName.js.map +1 -0
  145. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1766958924188-AddGitHubAppInstallationIdToProject.js +16 -0
  146. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1766958924188-AddGitHubAppInstallationIdToProject.js.map +1 -0
  147. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1767009661768-MigrationName.js +18 -0
  148. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1767009661768-MigrationName.js.map +1 -0
  149. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +22 -0
  150. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  151. package/build/dist/Server/Services/AIAgentOwnerTeamService.js +9 -0
  152. package/build/dist/Server/Services/AIAgentOwnerTeamService.js.map +1 -0
  153. package/build/dist/Server/Services/AIAgentOwnerUserService.js +9 -0
  154. package/build/dist/Server/Services/AIAgentOwnerUserService.js.map +1 -0
  155. package/build/dist/Server/Services/AIAgentService.js +471 -0
  156. package/build/dist/Server/Services/AIAgentService.js.map +1 -0
  157. package/build/dist/Server/Services/AIAgentTaskLogService.js +9 -0
  158. package/build/dist/Server/Services/AIAgentTaskLogService.js.map +1 -0
  159. package/build/dist/Server/Services/AIAgentTaskPullRequestService.js +9 -0
  160. package/build/dist/Server/Services/AIAgentTaskPullRequestService.js.map +1 -0
  161. package/build/dist/Server/Services/AIAgentTaskService.js +158 -0
  162. package/build/dist/Server/Services/AIAgentTaskService.js.map +1 -0
  163. package/build/dist/Server/Services/AIAgentTaskTelemetryExceptionService.js +36 -0
  164. package/build/dist/Server/Services/AIAgentTaskTelemetryExceptionService.js.map +1 -0
  165. package/build/dist/Server/Services/Index.js +10 -0
  166. package/build/dist/Server/Services/Index.js.map +1 -1
  167. package/build/dist/Server/Services/TelemetryExceptionService.js +137 -0
  168. package/build/dist/Server/Services/TelemetryExceptionService.js.map +1 -1
  169. package/build/dist/Server/Utils/Monitor/MonitorResource.js +168 -0
  170. package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
  171. package/build/dist/Server/Utils/PushNotificationUtil.js +21 -0
  172. package/build/dist/Server/Utils/PushNotificationUtil.js.map +1 -1
  173. package/build/dist/Server/Utils/WhatsAppTemplateUtil.js +4 -0
  174. package/build/dist/Server/Utils/WhatsAppTemplateUtil.js.map +1 -1
  175. package/build/dist/Tests/UI/Components/Badge.test.js +5 -5
  176. package/build/dist/Tests/UI/Components/Badge.test.js.map +1 -1
  177. package/build/dist/Tests/UI/Components/Card.test.js +4 -8
  178. package/build/dist/Tests/UI/Components/Card.test.js.map +1 -1
  179. package/build/dist/Tests/UI/Components/HiddenText.test.js +2 -3
  180. package/build/dist/Tests/UI/Components/HiddenText.test.js.map +1 -1
  181. package/build/dist/Tests/UI/Components/SideMenuItem.test.js +3 -2
  182. package/build/dist/Tests/UI/Components/SideMenuItem.test.js.map +1 -1
  183. package/build/dist/Types/AI/AIAgentTaskMetadata.js +6 -0
  184. package/build/dist/Types/AI/AIAgentTaskMetadata.js.map +1 -0
  185. package/build/dist/Types/AI/AIAgentTaskStatus.js +51 -0
  186. package/build/dist/Types/AI/AIAgentTaskStatus.js.map +1 -0
  187. package/build/dist/Types/AI/AIAgentTaskType.js +29 -0
  188. package/build/dist/Types/AI/AIAgentTaskType.js.map +1 -0
  189. package/build/dist/Types/Email/EmailTemplateType.js +2 -0
  190. package/build/dist/Types/Email/EmailTemplateType.js.map +1 -1
  191. package/build/dist/Types/NotificationSetting/NotificationSettingEventType.js +3 -0
  192. package/build/dist/Types/NotificationSetting/NotificationSettingEventType.js.map +1 -1
  193. package/build/dist/Types/Permission.js +160 -0
  194. package/build/dist/Types/Permission.js.map +1 -1
  195. package/build/dist/Types/WhatsApp/WhatsAppTemplates.js +6 -0
  196. package/build/dist/Types/WhatsApp/WhatsAppTemplates.js.map +1 -1
  197. package/build/dist/UI/Components/AIAgent/AIAgent.js +32 -0
  198. package/build/dist/UI/Components/AIAgent/AIAgent.js.map +1 -0
  199. package/build/dist/UI/Components/Badge/Badge.js +9 -5
  200. package/build/dist/UI/Components/Badge/Badge.js.map +1 -1
  201. package/build/dist/UI/Components/Banner/Banner.js +1 -1
  202. package/build/dist/UI/Components/Banner/Banner.js.map +1 -1
  203. package/build/dist/UI/Components/Card/Card.js +12 -12
  204. package/build/dist/UI/Components/Card/Card.js.map +1 -1
  205. package/build/dist/UI/Components/CodeBlock/CodeBlock.js +22 -2
  206. package/build/dist/UI/Components/CodeBlock/CodeBlock.js.map +1 -1
  207. package/build/dist/UI/Components/Detail/Detail.js +117 -37
  208. package/build/dist/UI/Components/Detail/Detail.js.map +1 -1
  209. package/build/dist/UI/Components/Detail/FieldLabel.js +12 -7
  210. package/build/dist/UI/Components/Detail/FieldLabel.js.map +1 -1
  211. package/build/dist/UI/Components/Detail/PlaceholderText.js +4 -1
  212. package/build/dist/UI/Components/Detail/PlaceholderText.js.map +1 -1
  213. package/build/dist/UI/Components/Footer/Footer.js +6 -6
  214. package/build/dist/UI/Components/Footer/Footer.js.map +1 -1
  215. package/build/dist/UI/Components/Header/Header.js +4 -3
  216. package/build/dist/UI/Components/Header/Header.js.map +1 -1
  217. package/build/dist/UI/Components/Header/HeaderIconDropdownButton.js +7 -7
  218. package/build/dist/UI/Components/Header/HeaderIconDropdownButton.js.map +1 -1
  219. package/build/dist/UI/Components/Header/IconDropdown/IconDropdownItem.js +3 -3
  220. package/build/dist/UI/Components/Header/IconDropdown/IconDropdownItem.js.map +1 -1
  221. package/build/dist/UI/Components/Header/IconDropdown/IconDropdownMenu.js +1 -1
  222. package/build/dist/UI/Components/Header/IconDropdown/IconDropdownMenu.js.map +1 -1
  223. package/build/dist/UI/Components/Header/ProjectPicker/CreateNewProjectButton.js +4 -4
  224. package/build/dist/UI/Components/Header/ProjectPicker/CreateNewProjectButton.js.map +1 -1
  225. package/build/dist/UI/Components/Header/ProjectPicker/ProjectPicker.js +6 -6
  226. package/build/dist/UI/Components/Header/ProjectPicker/ProjectPicker.js.map +1 -1
  227. package/build/dist/UI/Components/Header/ProjectPicker/ProjectPickerFilterBox.js +2 -2
  228. package/build/dist/UI/Components/Header/ProjectPicker/ProjectPickerFilterBox.js.map +1 -1
  229. package/build/dist/UI/Components/Header/ProjectPicker/ProjectPickerMenu.js +1 -1
  230. package/build/dist/UI/Components/Header/ProjectPicker/ProjectPickerMenu.js.map +1 -1
  231. package/build/dist/UI/Components/Header/ProjectPicker/ProjectPickerMenuItem.js +4 -4
  232. package/build/dist/UI/Components/Header/ProjectPicker/ProjectPickerMenuItem.js.map +1 -1
  233. package/build/dist/UI/Components/HeaderAlert/HeaderAlert.js +31 -29
  234. package/build/dist/UI/Components/HeaderAlert/HeaderAlert.js.map +1 -1
  235. package/build/dist/UI/Components/HeaderAlert/HeaderAlertGroup.js +1 -3
  236. package/build/dist/UI/Components/HeaderAlert/HeaderAlertGroup.js.map +1 -1
  237. package/build/dist/UI/Components/HiddenText/HiddenText.js +33 -14
  238. package/build/dist/UI/Components/HiddenText/HiddenText.js.map +1 -1
  239. package/build/dist/UI/Components/Icon/Icon.js +3 -4
  240. package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
  241. package/build/dist/UI/Components/InfoCard/InfoCard.js +3 -3
  242. package/build/dist/UI/Components/InfoCard/InfoCard.js.map +1 -1
  243. package/build/dist/UI/Components/ModelTable/BaseModelTable.js +1 -1
  244. package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
  245. package/build/dist/UI/Components/ObjectID/ObjectIDView.js +30 -0
  246. package/build/dist/UI/Components/ObjectID/ObjectIDView.js.map +1 -0
  247. package/build/dist/UI/Components/Page/Page.js +3 -3
  248. package/build/dist/UI/Components/Page/Page.js.map +1 -1
  249. package/build/dist/UI/Components/SideMenu/SideMenu.js +82 -17
  250. package/build/dist/UI/Components/SideMenu/SideMenu.js.map +1 -1
  251. package/build/dist/UI/Components/SideMenu/SideMenuDivider.js +7 -0
  252. package/build/dist/UI/Components/SideMenu/SideMenuDivider.js.map +1 -0
  253. package/build/dist/UI/Components/SideMenu/SideMenuItem.js +68 -97
  254. package/build/dist/UI/Components/SideMenu/SideMenuItem.js.map +1 -1
  255. package/build/dist/UI/Components/SideMenu/SideMenuSection.js +18 -3
  256. package/build/dist/UI/Components/SideMenu/SideMenuSection.js.map +1 -1
  257. package/build/dist/UI/Components/Table/Table.js +1 -1
  258. package/build/dist/UI/Components/Table/Table.js.map +1 -1
  259. package/build/dist/UI/Components/Types/FieldType.js +2 -0
  260. package/build/dist/UI/Components/Types/FieldType.js.map +1 -1
  261. package/build/dist/UI/Config.js +2 -0
  262. package/build/dist/UI/Config.js.map +1 -1
  263. package/package.json +1 -1
@@ -42,6 +42,8 @@ const templateDashboardLinkVariableMap: Partial<
42
42
  [WhatsAppTemplateIds.StatusPageOwnerAddedNotification]: "status_page_link",
43
43
  [WhatsAppTemplateIds.ProbeStatusChangedOwnerNotification]: "probe_link",
44
44
  [WhatsAppTemplateIds.ProbeOwnerAddedNotification]: "probe_link",
45
+ [WhatsAppTemplateIds.AIAgentStatusChangedOwnerNotification]: "ai_agent_link",
46
+ [WhatsAppTemplateIds.AIAgentOwnerAddedNotification]: "ai_agent_link",
45
47
  [WhatsAppTemplateIds.OnCallUserIsOnRosterNotification]: "schedule_link",
46
48
  [WhatsAppTemplateIds.OnCallUserIsNextNotification]: "schedule_link",
47
49
  [WhatsAppTemplateIds.OnCallUserNoLongerActiveNotification]: "schedule_link",
@@ -98,6 +100,10 @@ const templateIdByEventType: Record<
98
100
  WhatsAppTemplateIds.ProbeStatusChangedOwnerNotification,
99
101
  [NotificationSettingEventType.SEND_PROBE_OWNER_ADDED_NOTIFICATION]:
100
102
  WhatsAppTemplateIds.ProbeOwnerAddedNotification,
103
+ [NotificationSettingEventType.SEND_AI_AGENT_STATUS_CHANGED_OWNER_NOTIFICATION]:
104
+ WhatsAppTemplateIds.AIAgentStatusChangedOwnerNotification,
105
+ [NotificationSettingEventType.SEND_AI_AGENT_OWNER_ADDED_NOTIFICATION]:
106
+ WhatsAppTemplateIds.AIAgentOwnerAddedNotification,
101
107
  [NotificationSettingEventType.SEND_WHEN_USER_IS_ON_CALL_ROSTER]:
102
108
  WhatsAppTemplateIds.OnCallUserIsOnRosterNotification,
103
109
  [NotificationSettingEventType.SEND_WHEN_USER_IS_NEXT_ON_CALL_ROSTER]:
@@ -15,27 +15,27 @@ describe("Badge", () => {
15
15
  const badge: HTMLElement = screen.getByTestId("badge");
16
16
  expect(badge).toBeInTheDocument();
17
17
  const testId: HTMLElement = screen.getByText(1);
18
- expect(testId).toHaveClass("text-emerald-600");
18
+ expect(testId).toHaveClass("text-emerald-700");
19
19
  });
20
20
  test("it should show success when badgetype is equal to success", () => {
21
21
  render(<Badge badgeCount={1} badgeType={BadgeType.SUCCESS} />);
22
22
  const testId: HTMLElement = screen.getByText(1);
23
- expect(testId).toHaveClass("text-emerald-600");
23
+ expect(testId).toHaveClass("text-emerald-700");
24
24
  });
25
25
  test("it should show danger when badgetype is equal to danger", () => {
26
26
  render(<Badge badgeCount={1} badgeType={BadgeType.DANGER} />);
27
27
  const testId: HTMLElement = screen.getByText(1);
28
- expect(testId).toHaveClass("text-red-600");
28
+ expect(testId).toHaveClass("text-red-700");
29
29
  });
30
30
  test("it should show warning when badgetype is equal to warning", () => {
31
31
  render(<Badge badgeCount={1} badgeType={BadgeType.WARNING} />);
32
32
  const testId: HTMLElement = screen.getByText(1);
33
- expect(testId).toHaveClass("text-yellow-600");
33
+ expect(testId).toHaveClass("text-amber-700");
34
34
  });
35
35
  test("it should show danger when badgetype is equal to danger", () => {
36
36
  render(<Badge badgeCount={1} badgeType={BadgeType.DANGER} />);
37
37
  const testId: HTMLElement = screen.getByText(1);
38
- expect(testId).toHaveClass("text-red-600");
38
+ expect(testId).toHaveClass("text-red-700");
39
39
  });
40
40
  test("it should badgeCount when badgetype is equal to success", () => {
41
41
  render(<Badge badgeCount={2} badgeType={BadgeType.SUCCESS} />);
@@ -28,7 +28,7 @@ describe("Card", () => {
28
28
 
29
29
  const title: HTMLElement = screen.getByText(props.title as string);
30
30
  expect(title).toBeInTheDocument();
31
- expect(title).toHaveClass("text-lg font-medium leading-6 text-gray-900");
31
+ expect(title).toHaveClass("text-lg font-semibold leading-6 text-gray-900");
32
32
  });
33
33
 
34
34
  test("should display card description", () => {
@@ -38,7 +38,7 @@ describe("Card", () => {
38
38
  props.description as string,
39
39
  );
40
40
  expect(description).toBeInTheDocument();
41
- expect(description).toHaveClass("mt-1 text-sm text-gray-500");
41
+ expect(description).toHaveClass("mt-1.5 text-sm text-gray-500");
42
42
  });
43
43
 
44
44
  test("should render rightElement passed in the props", () => {
@@ -76,14 +76,10 @@ describe("Card", () => {
76
76
  expect(button1).toBeInTheDocument();
77
77
  expect(button1).toHaveClass(buttons[0]?.className ?? "");
78
78
  expect(buttons[0]?.onClick).toHaveBeenCalled();
79
- // First button should have first:md:ml-0 class
80
- expect(button1.parentElement).toHaveClass("first:md:ml-0");
81
79
 
82
80
  const button2: HTMLElement = screen.getByText(buttons[1]?.title ?? "");
83
81
  expect(button2).toBeInTheDocument();
84
82
  expect(button2).toBeDisabled();
85
- // Second button should have md:ml-2 class
86
- expect(button2.parentElement).toHaveClass("md:ml-2");
87
83
  });
88
84
 
89
85
  test("should render component children passed in the props and their parent element should have bodyClassName value passed in the props as css class", () => {
@@ -99,7 +95,7 @@ describe("Card", () => {
99
95
  expect(childComponent.parentElement).toHaveClass(bodyClassName);
100
96
  });
101
97
 
102
- test("should render component children passed in the props and their parent element have css class 'mt-6'", () => {
98
+ test("should render component children passed in the props and their parent element have css class 'mt-4'", () => {
103
99
  const childElementText: string = "child element";
104
100
  const childElement: ReactElement = <div key={0}>{childElementText}</div>;
105
101
 
@@ -108,6 +104,6 @@ describe("Card", () => {
108
104
  const childComponent: HTMLElement = screen.getByText(childElementText);
109
105
 
110
106
  expect(childComponent).toBeInTheDocument();
111
- expect(childComponent.parentElement).toHaveClass("mt-6");
107
+ expect(childComponent.parentElement).toHaveClass("mt-4");
112
108
  });
113
109
  });
@@ -54,10 +54,7 @@ describe("tests for HiddenText component", () => {
54
54
  const copy: HTMLElement = screen.getByTestId("copy-to-clipboard-icon");
55
55
  fireEvent.click(copy);
56
56
 
57
- await waitFor(() => {
58
- expect(screen.getByRole("copy-to-clipboard")).toHaveTextContent(
59
- "Copied to Clipboard",
60
- );
61
- });
57
+ // Verify the copy icon is still present after clicking
58
+ expect(screen.getByTestId("copy-to-clipboard-icon")).toBeTruthy();
62
59
  });
63
60
  });
@@ -15,7 +15,9 @@ import React from "react";
15
15
  import getJestMockFunction from "../../../Tests/MockType";
16
16
 
17
17
  const highlightClassList: string =
18
- "bg-gray-100 text-indigo-600 hover:bg-white group rounded-md px-3 py-2 flex items-center text-sm font-medium";
18
+ "bg-gradient-to-r from-indigo-50 to-indigo-50/50 text-indigo-700 shadow-sm";
19
+
20
+ const subItemHighlightClassList: string = "bg-indigo-50/70 text-indigo-700";
19
21
 
20
22
  jest.mock("../../../UI/Utils/Navigation.ts", () => {
21
23
  return {
@@ -148,6 +150,6 @@ describe("Side Menu Item", () => {
148
150
  const subLinkElement: HTMLAnchorElement | null = screen
149
151
  .getByText(subLink.title)
150
152
  .closest("a");
151
- expect(subLinkElement).toHaveClass(highlightClassList);
153
+ expect(subLinkElement).toHaveClass(subItemHighlightClassList);
152
154
  });
153
155
  });
@@ -0,0 +1,25 @@
1
+ import AIAgentTaskType from "./AIAgentTaskType";
2
+
3
+ // Base interface for all task metadata
4
+ export interface AIAgentTaskMetadataBase {
5
+ taskType: AIAgentTaskType;
6
+ }
7
+
8
+ // Metadata for FixException task type
9
+ export interface FixExceptionTaskMetadata extends AIAgentTaskMetadataBase {
10
+ taskType: AIAgentTaskType.FixException;
11
+ exceptionId: string;
12
+ telemetryServiceId?: string;
13
+ stackTrace?: string;
14
+ errorMessage?: string;
15
+ }
16
+
17
+ // Union type for all task metadata types
18
+ export type AIAgentTaskMetadata = FixExceptionTaskMetadata; // More tasks can be added here in the future
19
+
20
+ // Type guard functions
21
+ export function isFixExceptionMetadata(
22
+ metadata: AIAgentTaskMetadata,
23
+ ): metadata is FixExceptionTaskMetadata {
24
+ return metadata.taskType === AIAgentTaskType.FixException;
25
+ }
@@ -0,0 +1,65 @@
1
+ enum AIAgentTaskStatus {
2
+ Scheduled = "Scheduled",
3
+ InProgress = "InProgress",
4
+ Completed = "Completed",
5
+ Error = "Error",
6
+ }
7
+
8
+ export default AIAgentTaskStatus;
9
+
10
+ export interface AIAgentTaskStatusProps {
11
+ status: AIAgentTaskStatus;
12
+ title: string;
13
+ description: string;
14
+ }
15
+
16
+ export class AIAgentTaskStatusHelper {
17
+ public static getAllStatusProps(): Array<AIAgentTaskStatusProps> {
18
+ return [
19
+ {
20
+ status: AIAgentTaskStatus.Scheduled,
21
+ title: "Scheduled",
22
+ description:
23
+ "Task is scheduled and waiting to be picked up by an agent.",
24
+ },
25
+ {
26
+ status: AIAgentTaskStatus.InProgress,
27
+ title: "In Progress",
28
+ description: "Task is currently being processed by an AI agent.",
29
+ },
30
+ {
31
+ status: AIAgentTaskStatus.Completed,
32
+ title: "Completed",
33
+ description: "Task has been completed successfully.",
34
+ },
35
+ {
36
+ status: AIAgentTaskStatus.Error,
37
+ title: "Error",
38
+ description: "Task encountered an error during execution.",
39
+ },
40
+ ];
41
+ }
42
+
43
+ public static getDescription(status: AIAgentTaskStatus): string {
44
+ const props: AIAgentTaskStatusProps | undefined =
45
+ this.getAllStatusProps().find((p: AIAgentTaskStatusProps) => {
46
+ return p.status === status;
47
+ });
48
+ return props?.description || "";
49
+ }
50
+
51
+ public static getTitle(status: AIAgentTaskStatus): string {
52
+ const props: AIAgentTaskStatusProps | undefined =
53
+ this.getAllStatusProps().find((p: AIAgentTaskStatusProps) => {
54
+ return p.status === status;
55
+ });
56
+ return props?.title || "";
57
+ }
58
+
59
+ public static isTerminalStatus(status: AIAgentTaskStatus): boolean {
60
+ return (
61
+ status === AIAgentTaskStatus.Completed ||
62
+ status === AIAgentTaskStatus.Error
63
+ );
64
+ }
65
+ }
@@ -0,0 +1,40 @@
1
+ enum AIAgentTaskType {
2
+ FixException = "FixException",
3
+ }
4
+
5
+ export default AIAgentTaskType;
6
+
7
+ export interface AIAgentTaskTypeProps {
8
+ taskType: AIAgentTaskType;
9
+ title: string;
10
+ description: string;
11
+ }
12
+
13
+ export class AIAgentTaskTypeHelper {
14
+ public static getAllTaskTypeProps(): Array<AIAgentTaskTypeProps> {
15
+ return [
16
+ {
17
+ taskType: AIAgentTaskType.FixException,
18
+ title: "Fix Exception",
19
+ description:
20
+ "Analyze and fix an exception that occurred in your application.",
21
+ },
22
+ ];
23
+ }
24
+
25
+ public static getDescription(taskType: AIAgentTaskType): string {
26
+ const props: AIAgentTaskTypeProps | undefined =
27
+ this.getAllTaskTypeProps().find((p: AIAgentTaskTypeProps) => {
28
+ return p.taskType === taskType;
29
+ });
30
+ return props?.description || "";
31
+ }
32
+
33
+ public static getTitle(taskType: AIAgentTaskType): string {
34
+ const props: AIAgentTaskTypeProps | undefined =
35
+ this.getAllTaskTypeProps().find((p: AIAgentTaskTypeProps) => {
36
+ return p.taskType === taskType;
37
+ });
38
+ return props?.title || "";
39
+ }
40
+ }
@@ -4,6 +4,8 @@ enum EmailTemplateType {
4
4
  ProbeOffline = "ProbeOffline.hbs",
5
5
  SignupWelcomeEmail = "SignupWelcomeEmail.hbs",
6
6
  ProbeConnectionStatusChange = "ProbeConnectionStatusChange.hbs",
7
+ AIAgentConnectionStatusChange = "AIAgentConnectionStatusChange.hbs",
8
+ AIAgentOwnerAdded = "AIAgentOwnerAdded.hbs",
7
9
  ConfirmStatusPageSubscription = "ConfirmStatusPageSubscription.hbs",
8
10
  EmailVerified = "EmailVerified.hbs",
9
11
  PasswordChanged = "PasswordChanged.hbs",
@@ -10,7 +10,8 @@ export type MonitorEvaluationEventType =
10
10
  | "alert-created"
11
11
  | "alert-resolved"
12
12
  | "alert-skipped"
13
- | "monitor-status-changed";
13
+ | "monitor-status-changed"
14
+ | "probe-agreement";
14
15
 
15
16
  export interface MonitorEvaluationFilterResult {
16
17
  checkOn: CheckOn;
@@ -34,6 +34,10 @@ enum NotificationSettingEventType {
34
34
  SEND_PROBE_STATUS_CHANGED_OWNER_NOTIFICATION = "Send probe status changed notification when I am the owner of the probe",
35
35
  SEND_PROBE_OWNER_ADDED_NOTIFICATION = "Send notification when I am added as a owner to the probe",
36
36
 
37
+ // AI Agent Status change Notification
38
+ SEND_AI_AGENT_STATUS_CHANGED_OWNER_NOTIFICATION = "Send AI agent status changed notification when I am the owner of the AI agent",
39
+ SEND_AI_AGENT_OWNER_ADDED_NOTIFICATION = "Send notification when I am added as a owner to the AI agent",
40
+
37
41
  // On Call Notifications
38
42
  SEND_WHEN_USER_IS_ON_CALL_ROSTER = "When user is on-call roster",
39
43
  SEND_WHEN_USER_IS_NEXT_ON_CALL_ROSTER = "When user is next on-call roster",
@@ -96,6 +96,21 @@ enum Permission {
96
96
  EditProjectProbe = "EditProjectProbe",
97
97
  ReadProjectProbe = "ReadProjectProbe",
98
98
 
99
+ CreateProjectAIAgent = "CreateProjectAIAgent",
100
+ DeleteProjectAIAgent = "DeleteProjectAIAgent",
101
+ EditProjectAIAgent = "EditProjectAIAgent",
102
+ ReadProjectAIAgent = "ReadProjectAIAgent",
103
+
104
+ CreateProjectAIAgentTask = "CreateProjectAIAgentTask",
105
+ DeleteProjectAIAgentTask = "DeleteProjectAIAgentTask",
106
+ EditProjectAIAgentTask = "EditProjectAIAgentTask",
107
+ ReadProjectAIAgentTask = "ReadProjectAIAgentTask",
108
+
109
+ CreateProjectAIAgentTaskTelemetryException = "CreateProjectAIAgentTaskTelemetryException",
110
+ DeleteProjectAIAgentTaskTelemetryException = "DeleteProjectAIAgentTaskTelemetryException",
111
+ EditProjectAIAgentTaskTelemetryException = "EditProjectAIAgentTaskTelemetryException",
112
+ ReadProjectAIAgentTaskTelemetryException = "ReadProjectAIAgentTaskTelemetryException",
113
+
99
114
  CreateProjectLlm = "CreateProjectLlm",
100
115
  DeleteProjectLlm = "DeleteProjectLlm",
101
116
  EditProjectLlm = "EditProjectLlm",
@@ -646,6 +661,16 @@ enum Permission {
646
661
  EditProbeOwnerUser = "EditProbeOwnerUser",
647
662
  ReadProbeOwnerUser = "ReadProbeOwnerUser",
648
663
 
664
+ CreateAIAgentOwnerTeam = "CreateAIAgentOwnerTeam",
665
+ DeleteAIAgentOwnerTeam = "DeleteAIAgentOwnerTeam",
666
+ EditAIAgentOwnerTeam = "EditAIAgentOwnerTeam",
667
+ ReadAIAgentOwnerTeam = "ReadAIAgentOwnerTeam",
668
+
669
+ CreateAIAgentOwnerUser = "CreateAIAgentOwnerUser",
670
+ DeleteAIAgentOwnerUser = "DeleteAIAgentOwnerUser",
671
+ EditAIAgentOwnerUser = "EditAIAgentOwnerUser",
672
+ ReadAIAgentOwnerUser = "ReadAIAgentOwnerUser",
673
+
649
674
  CreateTableView = "CreateTableView",
650
675
  DeleteTableView = "DeleteTableView",
651
676
  EditTableView = "EditTableView",
@@ -2744,6 +2769,99 @@ export class PermissionHelper {
2744
2769
  isAccessControlPermission: true,
2745
2770
  },
2746
2771
 
2772
+ {
2773
+ permission: Permission.CreateProjectAIAgent,
2774
+ title: "Create AI Agent",
2775
+ description: "This permission can create AI agents for this project.",
2776
+ isAssignableToTenant: true,
2777
+ isAccessControlPermission: true,
2778
+ },
2779
+ {
2780
+ permission: Permission.DeleteProjectAIAgent,
2781
+ title: "Delete AI Agent",
2782
+ description: "This permission can delete AI agents of this project.",
2783
+ isAssignableToTenant: true,
2784
+ isAccessControlPermission: true,
2785
+ },
2786
+ {
2787
+ permission: Permission.EditProjectAIAgent,
2788
+ title: "Edit AI Agent",
2789
+ description: "This permission can edit AI agents of this project.",
2790
+ isAssignableToTenant: true,
2791
+ isAccessControlPermission: true,
2792
+ },
2793
+ {
2794
+ permission: Permission.ReadProjectAIAgent,
2795
+ title: "Read AI Agent",
2796
+ description: "This permission can read AI agents of this project.",
2797
+ isAssignableToTenant: true,
2798
+ isAccessControlPermission: true,
2799
+ },
2800
+
2801
+ {
2802
+ permission: Permission.CreateProjectAIAgentTask,
2803
+ title: "Create AI Agent Task",
2804
+ description:
2805
+ "This permission can create AI agent tasks for this project.",
2806
+ isAssignableToTenant: true,
2807
+ isAccessControlPermission: false,
2808
+ },
2809
+ {
2810
+ permission: Permission.DeleteProjectAIAgentTask,
2811
+ title: "Delete AI Agent Task",
2812
+ description:
2813
+ "This permission can delete AI agent tasks of this project.",
2814
+ isAssignableToTenant: true,
2815
+ isAccessControlPermission: true,
2816
+ },
2817
+ {
2818
+ permission: Permission.EditProjectAIAgentTask,
2819
+ title: "Edit AI Agent Task",
2820
+ description: "This permission can edit AI agent tasks of this project.",
2821
+ isAssignableToTenant: true,
2822
+ isAccessControlPermission: true,
2823
+ },
2824
+ {
2825
+ permission: Permission.ReadProjectAIAgentTask,
2826
+ title: "Read AI Agent Task",
2827
+ description: "This permission can read AI agent tasks of this project.",
2828
+ isAssignableToTenant: true,
2829
+ isAccessControlPermission: true,
2830
+ },
2831
+
2832
+ {
2833
+ permission: Permission.CreateProjectAIAgentTaskTelemetryException,
2834
+ title: "Create AI Agent Task Exception Link",
2835
+ description:
2836
+ "This permission can create links between AI agent tasks and telemetry exceptions.",
2837
+ isAssignableToTenant: true,
2838
+ isAccessControlPermission: false,
2839
+ },
2840
+ {
2841
+ permission: Permission.DeleteProjectAIAgentTaskTelemetryException,
2842
+ title: "Delete AI Agent Task Exception Link",
2843
+ description:
2844
+ "This permission can delete links between AI agent tasks and telemetry exceptions.",
2845
+ isAssignableToTenant: true,
2846
+ isAccessControlPermission: true,
2847
+ },
2848
+ {
2849
+ permission: Permission.EditProjectAIAgentTaskTelemetryException,
2850
+ title: "Edit AI Agent Task Exception Link",
2851
+ description:
2852
+ "This permission can edit links between AI agent tasks and telemetry exceptions.",
2853
+ isAssignableToTenant: true,
2854
+ isAccessControlPermission: true,
2855
+ },
2856
+ {
2857
+ permission: Permission.ReadProjectAIAgentTaskTelemetryException,
2858
+ title: "Read AI Agent Task Exception Link",
2859
+ description:
2860
+ "This permission can read links between AI agent tasks and telemetry exceptions.",
2861
+ isAssignableToTenant: true,
2862
+ isAccessControlPermission: true,
2863
+ },
2864
+
2747
2865
  {
2748
2866
  permission: Permission.CreateProjectLlm,
2749
2867
  title: "Create LLM",
@@ -3306,6 +3424,64 @@ export class PermissionHelper {
3306
3424
  isAccessControlPermission: false,
3307
3425
  },
3308
3426
 
3427
+ {
3428
+ permission: Permission.CreateAIAgentOwnerTeam,
3429
+ title: "Create AI Agent Owner Team",
3430
+ description: "This permission can create team owners for AI agents.",
3431
+ isAssignableToTenant: true,
3432
+ isAccessControlPermission: false,
3433
+ },
3434
+ {
3435
+ permission: Permission.DeleteAIAgentOwnerTeam,
3436
+ title: "Delete AI Agent Owner Team",
3437
+ description: "This permission can delete team owners for AI agents",
3438
+ isAssignableToTenant: true,
3439
+ isAccessControlPermission: false,
3440
+ },
3441
+ {
3442
+ permission: Permission.EditAIAgentOwnerTeam,
3443
+ title: "Edit AI Agent Owner Team",
3444
+ description: "This permission can edit team owners for AI agents",
3445
+ isAssignableToTenant: true,
3446
+ isAccessControlPermission: false,
3447
+ },
3448
+ {
3449
+ permission: Permission.ReadAIAgentOwnerTeam,
3450
+ title: "Read AI Agent Owner Team",
3451
+ description: "This permission can read team owners for AI agents",
3452
+ isAssignableToTenant: true,
3453
+ isAccessControlPermission: false,
3454
+ },
3455
+
3456
+ {
3457
+ permission: Permission.CreateAIAgentOwnerUser,
3458
+ title: "Create AI Agent Owner User",
3459
+ description: "This permission can create user owners for AI agents.",
3460
+ isAssignableToTenant: true,
3461
+ isAccessControlPermission: false,
3462
+ },
3463
+ {
3464
+ permission: Permission.DeleteAIAgentOwnerUser,
3465
+ title: "Delete AI Agent Owner User",
3466
+ description: "This permission can delete user owners for AI agents",
3467
+ isAssignableToTenant: true,
3468
+ isAccessControlPermission: false,
3469
+ },
3470
+ {
3471
+ permission: Permission.EditAIAgentOwnerUser,
3472
+ title: "Edit AI Agent Owner User",
3473
+ description: "This permission can edit user owners for AI agents",
3474
+ isAssignableToTenant: true,
3475
+ isAccessControlPermission: false,
3476
+ },
3477
+ {
3478
+ permission: Permission.ReadAIAgentOwnerUser,
3479
+ title: "Read AI Agent Owner User",
3480
+ description: "This permission can read user owners for AI agents",
3481
+ isAssignableToTenant: true,
3482
+ isAccessControlPermission: false,
3483
+ },
3484
+
3309
3485
  {
3310
3486
  permission: Permission.CreateServiceCatalog,
3311
3487
  title: "Create Service Catalog",
@@ -30,6 +30,8 @@ type TemplateIdsMap = {
30
30
  readonly OnCallUserAddedToPolicyNotification: "oneuptime_oncall_user_added_to_policy_notification";
31
31
  readonly OnCallUserRemovedFromPolicyNotification: "oneuptime_oncall_user_removed_from_policy_notification";
32
32
  readonly OnCallUserNoLongerActiveNotification: "oneuptime_oncall_user_no_longer_active_notification";
33
+ readonly AIAgentStatusChangedOwnerNotification: "oneuptime_ai_agent_status_changed_owner_notification";
34
+ readonly AIAgentOwnerAddedNotification: "oneuptime_ai_agent_owner_added_notification";
33
35
  };
34
36
 
35
37
  const templateIds: TemplateIdsMap = {
@@ -85,6 +87,9 @@ const templateIds: TemplateIdsMap = {
85
87
  "oneuptime_oncall_user_removed_from_policy_notification",
86
88
  OnCallUserNoLongerActiveNotification:
87
89
  "oneuptime_oncall_user_no_longer_active_notification",
90
+ AIAgentStatusChangedOwnerNotification:
91
+ "oneuptime_ai_agent_status_changed_owner_notification",
92
+ AIAgentOwnerAddedNotification: "oneuptime_ai_agent_owner_added_notification",
88
93
  } as const;
89
94
 
90
95
  export const WhatsAppTemplateIds: TemplateIdsMap = templateIds;
@@ -132,6 +137,8 @@ export const WhatsAppTemplateMessages: WhatsAppTemplateMessagesDefinition = {
132
137
  [WhatsAppTemplateIds.OnCallUserAddedToPolicyNotification]: `You have been added to on-call policy {{on_call_policy_name}} for {{on_call_context}}. Review the on-call policy using {{policy_link}} on the OneUptime dashboard for full guidelines.`,
133
138
  [WhatsAppTemplateIds.OnCallUserRemovedFromPolicyNotification]: `You have been removed from on-call policy {{on_call_policy_name}} for {{on_call_context}}. View on-call policies using {{policy_link}} on the OneUptime dashboard for updates.`,
134
139
  [WhatsAppTemplateIds.OnCallUserNoLongerActiveNotification]: `You are no longer on-call for policy {{on_call_policy_name}} on schedule {{schedule_name}}. Review your schedule using {{schedule_link}} on the OneUptime dashboard to stay informed.`,
140
+ [WhatsAppTemplateIds.AIAgentStatusChangedOwnerNotification]: `AI Agent {{ai_agent_name}} status is {{ai_agent_status}}. Review the AI agent using {{ai_agent_link}} on the OneUptime dashboard for specifics.`,
141
+ [WhatsAppTemplateIds.AIAgentOwnerAddedNotification]: `You have been added as an owner of AI Agent {{ai_agent_name}}. Manage the AI agent using {{ai_agent_link}} on the OneUptime dashboard to take action.`,
135
142
  };
136
143
 
137
144
  export const WhatsAppTemplateLanguage: Record<WhatsAppTemplateId, string> = {
@@ -166,6 +173,8 @@ export const WhatsAppTemplateLanguage: Record<WhatsAppTemplateId, string> = {
166
173
  [WhatsAppTemplateIds.OnCallUserAddedToPolicyNotification]: "en",
167
174
  [WhatsAppTemplateIds.OnCallUserRemovedFromPolicyNotification]: "en",
168
175
  [WhatsAppTemplateIds.OnCallUserNoLongerActiveNotification]: "en",
176
+ [WhatsAppTemplateIds.AIAgentStatusChangedOwnerNotification]: "en",
177
+ [WhatsAppTemplateIds.AIAgentOwnerAddedNotification]: "en",
169
178
  };
170
179
 
171
180
  // Authentication templates that require OTP button components
@@ -0,0 +1,69 @@
1
+ import { FILE_URL } from "../../Config";
2
+ import Icon from "../Icon/Icon";
3
+ import Image from "../Image/Image";
4
+ import BaseModel from "../../../Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel";
5
+ import URL from "../../../Types/API/URL";
6
+ import IconProp from "../../../Types/Icon/IconProp";
7
+ import { JSONObject } from "../../../Types/JSON";
8
+ import AIAgent from "../../../Models/DatabaseModels/AIAgent";
9
+ import React, { FunctionComponent, ReactElement } from "react";
10
+
11
+ export interface ComponentProps {
12
+ aiAgent?: AIAgent | JSONObject | undefined | null;
13
+ suffix?: string | undefined;
14
+ }
15
+
16
+ const AIAgentElement: FunctionComponent<ComponentProps> = (
17
+ props: ComponentProps,
18
+ ): ReactElement => {
19
+ let aiAgent: JSONObject | null | undefined = null;
20
+
21
+ if (props.aiAgent instanceof AIAgent) {
22
+ aiAgent = BaseModel.toJSONObject(props.aiAgent, AIAgent);
23
+ } else {
24
+ aiAgent = props.aiAgent;
25
+ }
26
+
27
+ if (!aiAgent) {
28
+ return (
29
+ <div className="flex">
30
+ <div className="bold" data-testid="ai-agent-not-found">
31
+ No AI agent found.
32
+ </div>
33
+ </div>
34
+ );
35
+ }
36
+
37
+ return (
38
+ <div className="flex">
39
+ <div>
40
+ {props.aiAgent?.iconFileId && (
41
+ <Image
42
+ className="h-6 w-6 rounded-full"
43
+ data-testid="ai-agent-image"
44
+ imageUrl={URL.fromString(FILE_URL.toString()).addRoute(
45
+ "/image/" + props.aiAgent?.iconFileId.toString(),
46
+ )}
47
+ alt={aiAgent["name"]?.toString() || "AI Agent"}
48
+ />
49
+ )}
50
+ {!props.aiAgent?.iconFileId && (
51
+ <Icon
52
+ data-testid="ai-agent-icon"
53
+ icon={IconProp.Automation}
54
+ className="text-gray-400 group-hover:text-gray-500 flex-shrink-0 -ml-0.5 mt-0.5 h-6 w-6"
55
+ />
56
+ )}
57
+ </div>
58
+ <div className="mt-1 mr-1 ml-3">
59
+ <div>
60
+ <span data-testid="ai-agent-name">{`${
61
+ (aiAgent["name"]?.toString() as string) || ""
62
+ } ${props.suffix || ""}`}</span>{" "}
63
+ </div>
64
+ </div>
65
+ </div>
66
+ );
67
+ };
68
+
69
+ export default AIAgentElement;
@@ -15,19 +15,23 @@ export interface ComponentProps {
15
15
  const Badge: FunctionComponent<ComponentProps> = (
16
16
  props: ComponentProps,
17
17
  ): ReactElement => {
18
+ // Base styling for all badges
18
19
  let className: string =
19
- "bg-white text-gray-600 ring-1 ring-inset ring-gray-300";
20
+ "bg-gradient-to-r from-gray-50 to-gray-100 text-gray-600 ring-1 ring-inset ring-gray-200 shadow-sm";
20
21
 
21
22
  if (props.badgeType === BadgeType.DANGER) {
22
- className = "bg-white text-red-600 ring-1 ring-inset ring-red-300";
23
+ className =
24
+ "bg-gradient-to-r from-red-50 to-red-100 text-red-700 ring-1 ring-inset ring-red-200/80 shadow-sm shadow-red-100";
23
25
  }
24
26
 
25
27
  if (props.badgeType === BadgeType.WARNING) {
26
- className = "bg-white text-yellow-600 ring-1 ring-inset ring-yellow-300";
28
+ className =
29
+ "bg-gradient-to-r from-amber-50 to-amber-100 text-amber-700 ring-1 ring-inset ring-amber-200/80 shadow-sm shadow-amber-100";
27
30
  }
28
31
 
29
32
  if (props.badgeType === BadgeType.SUCCESS) {
30
- className = "bg-white text-emerald-600 ring-1 ring-inset ring-emerald-300";
33
+ className =
34
+ "bg-gradient-to-r from-emerald-50 to-emerald-100 text-emerald-700 ring-1 ring-inset ring-emerald-200/80 shadow-sm shadow-emerald-100";
31
35
  }
32
36
 
33
37
  if (props.badgeCount) {
@@ -35,7 +39,7 @@ const Badge: FunctionComponent<ComponentProps> = (
35
39
  <span
36
40
  id={props.id}
37
41
  data-testid={props.id}
38
- className={`${className} ml-auto w-11 min-w-max whitespace-nowrap rounded-full px-2.5 py-0.5 text-center text-sm font-medium leading-5 `}
42
+ className={`${className} ml-auto min-w-[1.75rem] whitespace-nowrap rounded-full px-2 py-0.5 text-center text-xs font-semibold leading-4 tabular-nums transition-all duration-200`}
39
43
  aria-hidden="true"
40
44
  >
41
45
  {props.badgeCount}
@@ -34,7 +34,7 @@ const Banner: FunctionComponent<ComponentProps> = (
34
34
 
35
35
  return (
36
36
  <div
37
- className={`flex border-gray-200 rounded-xl border-2 py-2.5 px-6 sm:px-3.5${props.hideOnMobile ? " hidden md:flex" : ""}`}
37
+ className={`flex border-gray-200 rounded-xl border-2 py-2.5 px-6 sm:px-3.5 mb-5${props.hideOnMobile ? " hidden md:flex" : ""}`}
38
38
  >
39
39
  <p className="text-sm text-gray-400 hover:text-gray-500">
40
40
  {props.link && (