nuxt-observe 0.0.2

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 (435) hide show
  1. package/README.md +92 -0
  2. package/dist/module.d.mts +7 -0
  3. package/dist/module.json +9 -0
  4. package/dist/module.mjs +393 -0
  5. package/dist/runtime/app/assets/css/main.css +1 -0
  6. package/dist/runtime/app/components/ObserveActivityFeed.d.vue.ts +13 -0
  7. package/dist/runtime/app/components/ObserveActivityFeed.vue +77 -0
  8. package/dist/runtime/app/components/ObserveActivityFeed.vue.d.ts +13 -0
  9. package/dist/runtime/app/components/ObserveActivityTable.d.vue.ts +30 -0
  10. package/dist/runtime/app/components/ObserveActivityTable.vue +187 -0
  11. package/dist/runtime/app/components/ObserveActivityTable.vue.d.ts +30 -0
  12. package/dist/runtime/app/components/ObserveCan.d.vue.ts +27 -0
  13. package/dist/runtime/app/components/ObserveCan.vue +16 -0
  14. package/dist/runtime/app/components/ObserveCan.vue.d.ts +27 -0
  15. package/dist/runtime/app/components/ObserveErrorsTable.d.vue.ts +19 -0
  16. package/dist/runtime/app/components/ObserveErrorsTable.vue +105 -0
  17. package/dist/runtime/app/components/ObserveErrorsTable.vue.d.ts +19 -0
  18. package/dist/runtime/app/components/ObserveHealthHero.d.vue.ts +16 -0
  19. package/dist/runtime/app/components/ObserveHealthHero.vue +114 -0
  20. package/dist/runtime/app/components/ObserveHealthHero.vue.d.ts +16 -0
  21. package/dist/runtime/app/components/ObserveJourneySearch.d.vue.ts +13 -0
  22. package/dist/runtime/app/components/ObserveJourneySearch.vue +55 -0
  23. package/dist/runtime/app/components/ObserveJourneySearch.vue.d.ts +13 -0
  24. package/dist/runtime/app/components/ObserveJourneyTimeline.d.vue.ts +14 -0
  25. package/dist/runtime/app/components/ObserveJourneyTimeline.vue +119 -0
  26. package/dist/runtime/app/components/ObserveJourneyTimeline.vue.d.ts +14 -0
  27. package/dist/runtime/app/components/ObserveLogDetail.d.vue.ts +12 -0
  28. package/dist/runtime/app/components/ObserveLogDetail.vue +187 -0
  29. package/dist/runtime/app/components/ObserveLogDetail.vue.d.ts +12 -0
  30. package/dist/runtime/app/components/ObserveLogLevelBadge.d.vue.ts +10 -0
  31. package/dist/runtime/app/components/ObserveLogLevelBadge.vue +29 -0
  32. package/dist/runtime/app/components/ObserveLogLevelBadge.vue.d.ts +10 -0
  33. package/dist/runtime/app/components/ObserveLogsFilterBar.d.vue.ts +20 -0
  34. package/dist/runtime/app/components/ObserveLogsFilterBar.vue +134 -0
  35. package/dist/runtime/app/components/ObserveLogsFilterBar.vue.d.ts +20 -0
  36. package/dist/runtime/app/components/ObserveLogsTable.d.vue.ts +20 -0
  37. package/dist/runtime/app/components/ObserveLogsTable.vue +92 -0
  38. package/dist/runtime/app/components/ObserveLogsTable.vue.d.ts +20 -0
  39. package/dist/runtime/app/components/ObservePeriodSelector.d.vue.ts +3 -0
  40. package/dist/runtime/app/components/ObservePeriodSelector.vue +22 -0
  41. package/dist/runtime/app/components/ObservePeriodSelector.vue.d.ts +3 -0
  42. package/dist/runtime/app/components/ObserveRegressionAlert.d.vue.ts +12 -0
  43. package/dist/runtime/app/components/ObserveRegressionAlert.vue +27 -0
  44. package/dist/runtime/app/components/ObserveRegressionAlert.vue.d.ts +12 -0
  45. package/dist/runtime/app/components/ObserveServiceSwitcher.d.vue.ts +3 -0
  46. package/dist/runtime/app/components/ObserveServiceSwitcher.vue +49 -0
  47. package/dist/runtime/app/components/ObserveServiceSwitcher.vue.d.ts +3 -0
  48. package/dist/runtime/app/components/ObserveServicesTable.d.vue.ts +15 -0
  49. package/dist/runtime/app/components/ObserveServicesTable.vue +109 -0
  50. package/dist/runtime/app/components/ObserveServicesTable.vue.d.ts +15 -0
  51. package/dist/runtime/app/components/ObserveStatCard.d.vue.ts +14 -0
  52. package/dist/runtime/app/components/ObserveStatCard.vue +34 -0
  53. package/dist/runtime/app/components/ObserveStatCard.vue.d.ts +14 -0
  54. package/dist/runtime/app/components/charts/ObserveErrorRateChart.client.d.vue.ts +15 -0
  55. package/dist/runtime/app/components/charts/ObserveErrorRateChart.client.vue +170 -0
  56. package/dist/runtime/app/components/charts/ObserveErrorRateChart.client.vue.d.ts +15 -0
  57. package/dist/runtime/app/components/charts/ObserveServiceBreakdownChart.client.d.vue.ts +17 -0
  58. package/dist/runtime/app/components/charts/ObserveServiceBreakdownChart.client.vue +208 -0
  59. package/dist/runtime/app/components/charts/ObserveServiceBreakdownChart.client.vue.d.ts +17 -0
  60. package/dist/runtime/app/components/charts/ObserveVersionAdoptionChart.client.d.vue.ts +14 -0
  61. package/dist/runtime/app/components/charts/ObserveVersionAdoptionChart.client.vue +208 -0
  62. package/dist/runtime/app/components/charts/ObserveVersionAdoptionChart.client.vue.d.ts +14 -0
  63. package/dist/runtime/app/components/charts/ObserveVersionCompareChart.client.d.vue.ts +14 -0
  64. package/dist/runtime/app/components/charts/ObserveVersionCompareChart.client.vue +190 -0
  65. package/dist/runtime/app/components/charts/ObserveVersionCompareChart.client.vue.d.ts +14 -0
  66. package/dist/runtime/app/components/charts/ObserveVolumeChart.client.d.vue.ts +16 -0
  67. package/dist/runtime/app/components/charts/ObserveVolumeChart.client.vue +199 -0
  68. package/dist/runtime/app/components/charts/ObserveVolumeChart.client.vue.d.ts +16 -0
  69. package/dist/runtime/app/components/charts/chart-core.d.ts +64 -0
  70. package/dist/runtime/app/components/charts/chart-core.js +136 -0
  71. package/dist/runtime/app/components/settings/ObserveApiKeyPanel.d.vue.ts +8 -0
  72. package/dist/runtime/app/components/settings/ObserveApiKeyPanel.vue +145 -0
  73. package/dist/runtime/app/components/settings/ObserveApiKeyPanel.vue.d.ts +8 -0
  74. package/dist/runtime/app/components/settings/ObserveApiKeyRevealModal.d.vue.ts +19 -0
  75. package/dist/runtime/app/components/settings/ObserveApiKeyRevealModal.vue +106 -0
  76. package/dist/runtime/app/components/settings/ObserveApiKeyRevealModal.vue.d.ts +19 -0
  77. package/dist/runtime/app/components/settings/ObserveAssignmentEditor.d.vue.ts +12 -0
  78. package/dist/runtime/app/components/settings/ObserveAssignmentEditor.vue +67 -0
  79. package/dist/runtime/app/components/settings/ObserveAssignmentEditor.vue.d.ts +12 -0
  80. package/dist/runtime/app/components/settings/ObserveGroupFormModal.d.vue.ts +18 -0
  81. package/dist/runtime/app/components/settings/ObserveGroupFormModal.vue +60 -0
  82. package/dist/runtime/app/components/settings/ObserveGroupFormModal.vue.d.ts +18 -0
  83. package/dist/runtime/app/components/settings/ObserveGroupMembershipEditor.d.vue.ts +20 -0
  84. package/dist/runtime/app/components/settings/ObserveGroupMembershipEditor.vue +21 -0
  85. package/dist/runtime/app/components/settings/ObserveGroupMembershipEditor.vue.d.ts +20 -0
  86. package/dist/runtime/app/components/settings/ObserveOriginAllowlistEditor.d.vue.ts +15 -0
  87. package/dist/runtime/app/components/settings/ObserveOriginAllowlistEditor.vue +63 -0
  88. package/dist/runtime/app/components/settings/ObserveOriginAllowlistEditor.vue.d.ts +15 -0
  89. package/dist/runtime/app/components/settings/ObserveServiceEditForm.d.vue.ts +38 -0
  90. package/dist/runtime/app/components/settings/ObserveServiceEditForm.vue +216 -0
  91. package/dist/runtime/app/components/settings/ObserveServiceEditForm.vue.d.ts +38 -0
  92. package/dist/runtime/app/components/settings/ObserveServiceFormModal.d.vue.ts +37 -0
  93. package/dist/runtime/app/components/settings/ObserveServiceFormModal.vue +192 -0
  94. package/dist/runtime/app/components/settings/ObserveServiceFormModal.vue.d.ts +37 -0
  95. package/dist/runtime/app/components/settings/ObserveServiceTypeBadge.d.vue.ts +11 -0
  96. package/dist/runtime/app/components/settings/ObserveServiceTypeBadge.vue +18 -0
  97. package/dist/runtime/app/components/settings/ObserveServiceTypeBadge.vue.d.ts +11 -0
  98. package/dist/runtime/app/components/settings/ObserveSettingsServicesTable.d.vue.ts +19 -0
  99. package/dist/runtime/app/components/settings/ObserveSettingsServicesTable.vue +132 -0
  100. package/dist/runtime/app/components/settings/ObserveSettingsServicesTable.vue.d.ts +19 -0
  101. package/dist/runtime/app/components/settings/ObserveUserFormModal.d.vue.ts +27 -0
  102. package/dist/runtime/app/components/settings/ObserveUserFormModal.vue +108 -0
  103. package/dist/runtime/app/components/settings/ObserveUserFormModal.vue.d.ts +27 -0
  104. package/dist/runtime/app/components/settings/ObserveVersionTrackingField.d.vue.ts +17 -0
  105. package/dist/runtime/app/components/settings/ObserveVersionTrackingField.vue +20 -0
  106. package/dist/runtime/app/components/settings/ObserveVersionTrackingField.vue.d.ts +17 -0
  107. package/dist/runtime/app/composables/useObserveAbility.d.ts +15 -0
  108. package/dist/runtime/app/composables/useObserveAbility.js +20 -0
  109. package/dist/runtime/app/composables/useObserveActivity.d.ts +22 -0
  110. package/dist/runtime/app/composables/useObserveActivity.js +44 -0
  111. package/dist/runtime/app/composables/useObserveApiKeys.d.ts +15 -0
  112. package/dist/runtime/app/composables/useObserveApiKeys.js +19 -0
  113. package/dist/runtime/app/composables/useObserveAssignments.d.ts +19 -0
  114. package/dist/runtime/app/composables/useObserveAssignments.js +16 -0
  115. package/dist/runtime/app/composables/useObserveErrors.d.ts +33 -0
  116. package/dist/runtime/app/composables/useObserveErrors.js +85 -0
  117. package/dist/runtime/app/composables/useObserveGroups.d.ts +27 -0
  118. package/dist/runtime/app/composables/useObserveGroups.js +33 -0
  119. package/dist/runtime/app/composables/useObserveJourney.d.ts +19 -0
  120. package/dist/runtime/app/composables/useObserveJourney.js +19 -0
  121. package/dist/runtime/app/composables/useObserveLogFacets.d.ts +11 -0
  122. package/dist/runtime/app/composables/useObserveLogFacets.js +21 -0
  123. package/dist/runtime/app/composables/useObserveLogs.d.ts +28 -0
  124. package/dist/runtime/app/composables/useObserveLogs.js +100 -0
  125. package/dist/runtime/app/composables/useObserveMigrations.d.ts +17 -0
  126. package/dist/runtime/app/composables/useObserveMigrations.js +49 -0
  127. package/dist/runtime/app/composables/useObserveOverview.d.ts +14 -0
  128. package/dist/runtime/app/composables/useObserveOverview.js +23 -0
  129. package/dist/runtime/app/composables/useObservePeriod.d.ts +11 -0
  130. package/dist/runtime/app/composables/useObservePeriod.js +18 -0
  131. package/dist/runtime/app/composables/useObserveRollout.d.ts +20 -0
  132. package/dist/runtime/app/composables/useObserveRollout.js +55 -0
  133. package/dist/runtime/app/composables/useObserveScope.d.ts +13 -0
  134. package/dist/runtime/app/composables/useObserveScope.js +17 -0
  135. package/dist/runtime/app/composables/useObserveServices.d.ts +26 -0
  136. package/dist/runtime/app/composables/useObserveServices.js +33 -0
  137. package/dist/runtime/app/composables/useObserveStats.d.ts +14 -0
  138. package/dist/runtime/app/composables/useObserveStats.js +23 -0
  139. package/dist/runtime/app/composables/useObserveUsers.d.ts +29 -0
  140. package/dist/runtime/app/composables/useObserveUsers.js +33 -0
  141. package/dist/runtime/app/layouts/observe.d.vue.ts +13 -0
  142. package/dist/runtime/app/layouts/observe.vue +138 -0
  143. package/dist/runtime/app/layouts/observe.vue.d.ts +13 -0
  144. package/dist/runtime/app/middleware/observe-auth.global.d.ts +9 -0
  145. package/dist/runtime/app/middleware/observe-auth.global.js +8 -0
  146. package/dist/runtime/app/pages/activity.d.vue.ts +3 -0
  147. package/dist/runtime/app/pages/activity.vue +54 -0
  148. package/dist/runtime/app/pages/activity.vue.d.ts +3 -0
  149. package/dist/runtime/app/pages/error-detail.d.vue.ts +3 -0
  150. package/dist/runtime/app/pages/error-detail.vue +190 -0
  151. package/dist/runtime/app/pages/error-detail.vue.d.ts +3 -0
  152. package/dist/runtime/app/pages/errors.d.vue.ts +3 -0
  153. package/dist/runtime/app/pages/errors.vue +47 -0
  154. package/dist/runtime/app/pages/errors.vue.d.ts +3 -0
  155. package/dist/runtime/app/pages/journey.d.vue.ts +3 -0
  156. package/dist/runtime/app/pages/journey.vue +96 -0
  157. package/dist/runtime/app/pages/journey.vue.d.ts +3 -0
  158. package/dist/runtime/app/pages/log-detail.d.vue.ts +3 -0
  159. package/dist/runtime/app/pages/log-detail.vue +35 -0
  160. package/dist/runtime/app/pages/log-detail.vue.d.ts +3 -0
  161. package/dist/runtime/app/pages/login.d.vue.ts +3 -0
  162. package/dist/runtime/app/pages/login.vue +69 -0
  163. package/dist/runtime/app/pages/login.vue.d.ts +3 -0
  164. package/dist/runtime/app/pages/logs.d.vue.ts +3 -0
  165. package/dist/runtime/app/pages/logs.vue +36 -0
  166. package/dist/runtime/app/pages/logs.vue.d.ts +3 -0
  167. package/dist/runtime/app/pages/metrics.d.vue.ts +3 -0
  168. package/dist/runtime/app/pages/metrics.vue +68 -0
  169. package/dist/runtime/app/pages/metrics.vue.d.ts +3 -0
  170. package/dist/runtime/app/pages/overview.d.vue.ts +3 -0
  171. package/dist/runtime/app/pages/overview.vue +65 -0
  172. package/dist/runtime/app/pages/overview.vue.d.ts +3 -0
  173. package/dist/runtime/app/pages/rollout.d.vue.ts +3 -0
  174. package/dist/runtime/app/pages/rollout.vue +188 -0
  175. package/dist/runtime/app/pages/rollout.vue.d.ts +3 -0
  176. package/dist/runtime/app/pages/settings/group-detail.d.vue.ts +3 -0
  177. package/dist/runtime/app/pages/settings/group-detail.vue +149 -0
  178. package/dist/runtime/app/pages/settings/group-detail.vue.d.ts +3 -0
  179. package/dist/runtime/app/pages/settings/groups.d.vue.ts +3 -0
  180. package/dist/runtime/app/pages/settings/groups.vue +107 -0
  181. package/dist/runtime/app/pages/settings/groups.vue.d.ts +3 -0
  182. package/dist/runtime/app/pages/settings/index.d.vue.ts +3 -0
  183. package/dist/runtime/app/pages/settings/index.vue +47 -0
  184. package/dist/runtime/app/pages/settings/index.vue.d.ts +3 -0
  185. package/dist/runtime/app/pages/settings/migrations.d.vue.ts +3 -0
  186. package/dist/runtime/app/pages/settings/migrations.vue +275 -0
  187. package/dist/runtime/app/pages/settings/migrations.vue.d.ts +3 -0
  188. package/dist/runtime/app/pages/settings/service-detail.d.vue.ts +3 -0
  189. package/dist/runtime/app/pages/settings/service-detail.vue +133 -0
  190. package/dist/runtime/app/pages/settings/service-detail.vue.d.ts +3 -0
  191. package/dist/runtime/app/pages/settings/services.d.vue.ts +3 -0
  192. package/dist/runtime/app/pages/settings/services.vue +66 -0
  193. package/dist/runtime/app/pages/settings/services.vue.d.ts +3 -0
  194. package/dist/runtime/app/pages/settings/users/[id].d.vue.ts +3 -0
  195. package/dist/runtime/app/pages/settings/users/[id].vue +243 -0
  196. package/dist/runtime/app/pages/settings/users/[id].vue.d.ts +3 -0
  197. package/dist/runtime/app/pages/settings/users/index.d.vue.ts +3 -0
  198. package/dist/runtime/app/pages/settings/users/index.vue +129 -0
  199. package/dist/runtime/app/pages/settings/users/index.vue.d.ts +3 -0
  200. package/dist/runtime/options.d.ts +1 -0
  201. package/dist/runtime/options.js +1 -0
  202. package/dist/runtime/server/api/observe/activity.get.d.ts +3 -0
  203. package/dist/runtime/server/api/observe/activity.get.js +30 -0
  204. package/dist/runtime/server/api/observe/auth/login.post.d.ts +4 -0
  205. package/dist/runtime/server/api/observe/auth/login.post.js +13 -0
  206. package/dist/runtime/server/api/observe/auth/logout.post.d.ts +4 -0
  207. package/dist/runtime/server/api/observe/auth/logout.post.js +6 -0
  208. package/dist/runtime/server/api/observe/auth/me.get.d.ts +2 -0
  209. package/dist/runtime/server/api/observe/auth/me.get.js +3 -0
  210. package/dist/runtime/server/api/observe/errors/[fingerprint].get.d.ts +3 -0
  211. package/dist/runtime/server/api/observe/errors/[fingerprint].get.js +56 -0
  212. package/dist/runtime/server/api/observe/errors/index.get.d.ts +3 -0
  213. package/dist/runtime/server/api/observe/errors/index.get.js +41 -0
  214. package/dist/runtime/server/api/observe/facets.get.d.ts +8 -0
  215. package/dist/runtime/server/api/observe/facets.get.js +12 -0
  216. package/dist/runtime/server/api/observe/groups/[id]/assignments.put.d.ts +3 -0
  217. package/dist/runtime/server/api/observe/groups/[id]/assignments.put.js +12 -0
  218. package/dist/runtime/server/api/observe/groups/[id]/services.put.d.ts +5 -0
  219. package/dist/runtime/server/api/observe/groups/[id]/services.put.js +13 -0
  220. package/dist/runtime/server/api/observe/groups/[id].delete.d.ts +5 -0
  221. package/dist/runtime/server/api/observe/groups/[id].delete.js +11 -0
  222. package/dist/runtime/server/api/observe/groups/[id].get.d.ts +6 -0
  223. package/dist/runtime/server/api/observe/groups/[id].get.js +14 -0
  224. package/dist/runtime/server/api/observe/groups/[id].patch.d.ts +3 -0
  225. package/dist/runtime/server/api/observe/groups/[id].patch.js +12 -0
  226. package/dist/runtime/server/api/observe/groups/index.get.d.ts +3 -0
  227. package/dist/runtime/server/api/observe/groups/index.get.js +7 -0
  228. package/dist/runtime/server/api/observe/groups/index.post.d.ts +3 -0
  229. package/dist/runtime/server/api/observe/groups/index.post.js +11 -0
  230. package/dist/runtime/server/api/observe/health.get.d.ts +6 -0
  231. package/dist/runtime/server/api/observe/health.get.js +10 -0
  232. package/dist/runtime/server/api/observe/ingest/frogger.d.ts +5 -0
  233. package/dist/runtime/server/api/observe/ingest/frogger.js +42 -0
  234. package/dist/runtime/server/api/observe/ingest.d.ts +5 -0
  235. package/dist/runtime/server/api/observe/ingest.js +38 -0
  236. package/dist/runtime/server/api/observe/journey.get.d.ts +9 -0
  237. package/dist/runtime/server/api/observe/journey.get.js +31 -0
  238. package/dist/runtime/server/api/observe/logs/[id].get.d.ts +3 -0
  239. package/dist/runtime/server/api/observe/logs/[id].get.js +19 -0
  240. package/dist/runtime/server/api/observe/logs.get.d.ts +3 -0
  241. package/dist/runtime/server/api/observe/logs.get.js +54 -0
  242. package/dist/runtime/server/api/observe/migrations/index.get.d.ts +9 -0
  243. package/dist/runtime/server/api/observe/migrations/index.get.js +14 -0
  244. package/dist/runtime/server/api/observe/migrations/run.post.d.ts +13 -0
  245. package/dist/runtime/server/api/observe/migrations/run.post.js +35 -0
  246. package/dist/runtime/server/api/observe/overview.get.d.ts +3 -0
  247. package/dist/runtime/server/api/observe/overview.get.js +19 -0
  248. package/dist/runtime/server/api/observe/rollout/compare.get.d.ts +3 -0
  249. package/dist/runtime/server/api/observe/rollout/compare.get.js +24 -0
  250. package/dist/runtime/server/api/observe/rollout/regressions.get.d.ts +3 -0
  251. package/dist/runtime/server/api/observe/rollout/regressions.get.js +31 -0
  252. package/dist/runtime/server/api/observe/rollout/versions.get.d.ts +3 -0
  253. package/dist/runtime/server/api/observe/rollout/versions.get.js +20 -0
  254. package/dist/runtime/server/api/observe/services/[id]/assignments.put.d.ts +7 -0
  255. package/dist/runtime/server/api/observe/services/[id]/assignments.put.js +12 -0
  256. package/dist/runtime/server/api/observe/services/[id]/keys/[keyId]/rotate.post.d.ts +4 -0
  257. package/dist/runtime/server/api/observe/services/[id]/keys/[keyId]/rotate.post.js +14 -0
  258. package/dist/runtime/server/api/observe/services/[id]/keys/[keyId].delete.d.ts +4 -0
  259. package/dist/runtime/server/api/observe/services/[id]/keys/[keyId].delete.js +14 -0
  260. package/dist/runtime/server/api/observe/services/[id]/keys/index.get.d.ts +3 -0
  261. package/dist/runtime/server/api/observe/services/[id]/keys/index.get.js +10 -0
  262. package/dist/runtime/server/api/observe/services/[id]/keys/index.post.d.ts +3 -0
  263. package/dist/runtime/server/api/observe/services/[id]/keys/index.post.js +11 -0
  264. package/dist/runtime/server/api/observe/services/[id]/restore.post.d.ts +4 -0
  265. package/dist/runtime/server/api/observe/services/[id]/restore.post.js +11 -0
  266. package/dist/runtime/server/api/observe/services/[id].delete.d.ts +11 -0
  267. package/dist/runtime/server/api/observe/services/[id].delete.js +11 -0
  268. package/dist/runtime/server/api/observe/services/[id].get.d.ts +3 -0
  269. package/dist/runtime/server/api/observe/services/[id].get.js +12 -0
  270. package/dist/runtime/server/api/observe/services/[id].patch.d.ts +3 -0
  271. package/dist/runtime/server/api/observe/services/[id].patch.js +13 -0
  272. package/dist/runtime/server/api/observe/services/index.get.d.ts +3 -0
  273. package/dist/runtime/server/api/observe/services/index.get.js +7 -0
  274. package/dist/runtime/server/api/observe/services/index.post.d.ts +3 -0
  275. package/dist/runtime/server/api/observe/services/index.post.js +16 -0
  276. package/dist/runtime/server/api/observe/stats.get.d.ts +3 -0
  277. package/dist/runtime/server/api/observe/stats.get.js +28 -0
  278. package/dist/runtime/server/api/observe/users/[id]/assignments.put.d.ts +3 -0
  279. package/dist/runtime/server/api/observe/users/[id]/assignments.put.js +14 -0
  280. package/dist/runtime/server/api/observe/users/[id].delete.d.ts +4 -0
  281. package/dist/runtime/server/api/observe/users/[id].delete.js +15 -0
  282. package/dist/runtime/server/api/observe/users/[id].get.d.ts +3 -0
  283. package/dist/runtime/server/api/observe/users/[id].get.js +11 -0
  284. package/dist/runtime/server/api/observe/users/[id].patch.d.ts +3 -0
  285. package/dist/runtime/server/api/observe/users/[id].patch.js +25 -0
  286. package/dist/runtime/server/api/observe/users/index.get.d.ts +8 -0
  287. package/dist/runtime/server/api/observe/users/index.get.js +7 -0
  288. package/dist/runtime/server/api/observe/users/index.post.d.ts +3 -0
  289. package/dist/runtime/server/api/observe/users/index.post.js +29 -0
  290. package/dist/runtime/server/auth/authorization.d.ts +7 -0
  291. package/dist/runtime/server/auth/authorization.js +5 -0
  292. package/dist/runtime/server/auth/provider.d.ts +17 -0
  293. package/dist/runtime/server/auth/provider.js +44 -0
  294. package/dist/runtime/server/auth/providers/config-provider.d.ts +18 -0
  295. package/dist/runtime/server/auth/providers/config-provider.js +54 -0
  296. package/dist/runtime/server/auth/providers/db-provider.d.ts +16 -0
  297. package/dist/runtime/server/auth/providers/db-provider.js +42 -0
  298. package/dist/runtime/server/auth/providers/jwt-provider.d.ts +24 -0
  299. package/dist/runtime/server/auth/providers/jwt-provider.js +72 -0
  300. package/dist/runtime/server/migrations/0001-services-kind.d.ts +8 -0
  301. package/dist/runtime/server/migrations/0001-services-kind.js +14 -0
  302. package/dist/runtime/server/migrations/0002-services-type.d.ts +7 -0
  303. package/dist/runtime/server/migrations/0002-services-type.js +14 -0
  304. package/dist/runtime/server/migrations/0003-services-deleted-at.d.ts +6 -0
  305. package/dist/runtime/server/migrations/0003-services-deleted-at.js +14 -0
  306. package/dist/runtime/server/migrations/0004-logs-error-fingerprint.d.ts +11 -0
  307. package/dist/runtime/server/migrations/0004-logs-error-fingerprint.js +15 -0
  308. package/dist/runtime/server/migrations/0005-users-columns.d.ts +9 -0
  309. package/dist/runtime/server/migrations/0005-users-columns.js +25 -0
  310. package/dist/runtime/server/migrations/index.d.ts +13 -0
  311. package/dist/runtime/server/migrations/index.js +13 -0
  312. package/dist/runtime/server/migrations/types.d.ts +15 -0
  313. package/dist/runtime/server/migrations/types.js +0 -0
  314. package/dist/runtime/server/plugins/observe-migrate.server.d.ts +2 -0
  315. package/dist/runtime/server/plugins/observe-migrate.server.js +18 -0
  316. package/dist/runtime/server/tasks/backfill-fingerprints.d.ts +11 -0
  317. package/dist/runtime/server/tasks/backfill-fingerprints.js +41 -0
  318. package/dist/runtime/server/tasks/purge.d.ts +5 -0
  319. package/dist/runtime/server/tasks/purge.js +12 -0
  320. package/dist/runtime/server/tsconfig.json +3 -0
  321. package/dist/runtime/server/utils/activity-query.d.ts +28 -0
  322. package/dist/runtime/server/utils/activity-query.js +70 -0
  323. package/dist/runtime/server/utils/api-keys.d.ts +48 -0
  324. package/dist/runtime/server/utils/api-keys.js +67 -0
  325. package/dist/runtime/server/utils/authz.d.ts +50 -0
  326. package/dist/runtime/server/utils/authz.js +60 -0
  327. package/dist/runtime/server/utils/db/users.d.ts +91 -0
  328. package/dist/runtime/server/utils/db/users.js +128 -0
  329. package/dist/runtime/server/utils/db.d.ts +10 -0
  330. package/dist/runtime/server/utils/db.js +5 -0
  331. package/dist/runtime/server/utils/frogger-adapter.d.ts +40 -0
  332. package/dist/runtime/server/utils/frogger-adapter.js +97 -0
  333. package/dist/runtime/server/utils/groups.d.ts +35 -0
  334. package/dist/runtime/server/utils/groups.js +59 -0
  335. package/dist/runtime/server/utils/ingest-cors.d.ts +23 -0
  336. package/dist/runtime/server/utils/ingest-cors.js +27 -0
  337. package/dist/runtime/server/utils/journey.d.ts +20 -0
  338. package/dist/runtime/server/utils/journey.js +44 -0
  339. package/dist/runtime/server/utils/logs.d.ts +50 -0
  340. package/dist/runtime/server/utils/logs.js +154 -0
  341. package/dist/runtime/server/utils/loop-guard.d.ts +11 -0
  342. package/dist/runtime/server/utils/loop-guard.js +11 -0
  343. package/dist/runtime/server/utils/migrate.d.ts +21 -0
  344. package/dist/runtime/server/utils/migrate.js +144 -0
  345. package/dist/runtime/server/utils/migration-runner.d.ts +42 -0
  346. package/dist/runtime/server/utils/migration-runner.js +129 -0
  347. package/dist/runtime/server/utils/observe-errors.d.ts +58 -0
  348. package/dist/runtime/server/utils/observe-errors.js +206 -0
  349. package/dist/runtime/server/utils/overview.d.ts +20 -0
  350. package/dist/runtime/server/utils/overview.js +119 -0
  351. package/dist/runtime/server/utils/provisioning.d.ts +62 -0
  352. package/dist/runtime/server/utils/provisioning.js +299 -0
  353. package/dist/runtime/server/utils/rate-limit.d.ts +11 -0
  354. package/dist/runtime/server/utils/rate-limit.js +22 -0
  355. package/dist/runtime/server/utils/require-observe-session.d.ts +15 -0
  356. package/dist/runtime/server/utils/require-observe-session.js +25 -0
  357. package/dist/runtime/server/utils/rollout.d.ts +19 -0
  358. package/dist/runtime/server/utils/rollout.js +56 -0
  359. package/dist/runtime/server/utils/scope.d.ts +14 -0
  360. package/dist/runtime/server/utils/scope.js +28 -0
  361. package/dist/runtime/server/utils/seed.d.ts +18 -0
  362. package/dist/runtime/server/utils/seed.js +70 -0
  363. package/dist/runtime/server/utils/services.d.ts +91 -0
  364. package/dist/runtime/server/utils/services.js +142 -0
  365. package/dist/runtime/server/utils/stats-query.d.ts +40 -0
  366. package/dist/runtime/server/utils/stats-query.js +104 -0
  367. package/dist/runtime/shared/auth/roles.d.ts +34 -0
  368. package/dist/runtime/shared/auth/roles.js +6 -0
  369. package/dist/runtime/shared/auth/schema.d.ts +85 -0
  370. package/dist/runtime/shared/auth/schema.js +41 -0
  371. package/dist/runtime/shared/auth/types.d.ts +68 -0
  372. package/dist/runtime/shared/auth/types.js +0 -0
  373. package/dist/runtime/shared/rbac/capabilities.d.ts +46 -0
  374. package/dist/runtime/shared/rbac/capabilities.js +48 -0
  375. package/dist/runtime/shared/schema/activity.d.ts +77 -0
  376. package/dist/runtime/shared/schema/activity.js +22 -0
  377. package/dist/runtime/shared/schema/adapters/frogger.d.ts +52 -0
  378. package/dist/runtime/shared/schema/adapters/frogger.js +17 -0
  379. package/dist/runtime/shared/schema/batch.d.ts +33 -0
  380. package/dist/runtime/shared/schema/batch.js +9 -0
  381. package/dist/runtime/shared/schema/error-fingerprint.d.ts +53 -0
  382. package/dist/runtime/shared/schema/error-fingerprint.js +47 -0
  383. package/dist/runtime/shared/schema/errors-query.d.ts +136 -0
  384. package/dist/runtime/shared/schema/errors-query.js +47 -0
  385. package/dist/runtime/shared/schema/event.d.ts +48 -0
  386. package/dist/runtime/shared/schema/event.js +41 -0
  387. package/dist/runtime/shared/schema/frogger-map.d.ts +62 -0
  388. package/dist/runtime/shared/schema/frogger-map.js +30 -0
  389. package/dist/runtime/shared/schema/index.d.ts +17 -0
  390. package/dist/runtime/shared/schema/index.js +17 -0
  391. package/dist/runtime/shared/schema/journey.d.ts +99 -0
  392. package/dist/runtime/shared/schema/journey.js +96 -0
  393. package/dist/runtime/shared/schema/levels.d.ts +37 -0
  394. package/dist/runtime/shared/schema/levels.js +72 -0
  395. package/dist/runtime/shared/schema/log-row.d.ts +31 -0
  396. package/dist/runtime/shared/schema/log-row.js +0 -0
  397. package/dist/runtime/shared/schema/logs-query.d.ts +91 -0
  398. package/dist/runtime/shared/schema/logs-query.js +72 -0
  399. package/dist/runtime/shared/schema/migrations.d.ts +34 -0
  400. package/dist/runtime/shared/schema/migrations.js +0 -0
  401. package/dist/runtime/shared/schema/overview.d.ts +78 -0
  402. package/dist/runtime/shared/schema/overview.js +9 -0
  403. package/dist/runtime/shared/schema/provisioning.d.ts +230 -0
  404. package/dist/runtime/shared/schema/provisioning.js +52 -0
  405. package/dist/runtime/shared/schema/registry.d.ts +115 -0
  406. package/dist/runtime/shared/schema/registry.js +27 -0
  407. package/dist/runtime/shared/schema/rollout.d.ts +103 -0
  408. package/dist/runtime/shared/schema/rollout.js +66 -0
  409. package/dist/runtime/shared/schema/stats.d.ts +64 -0
  410. package/dist/runtime/shared/schema/stats.js +15 -0
  411. package/dist/runtime/shared/schema/tiers.d.ts +5 -0
  412. package/dist/runtime/shared/schema/tiers.js +9 -0
  413. package/dist/runtime/shared/types/module-options.d.ts +119 -0
  414. package/dist/runtime/shared/types/module-options.js +13 -0
  415. package/dist/runtime/shared/types/storage.d.ts +31 -0
  416. package/dist/runtime/shared/types/storage.js +0 -0
  417. package/dist/runtime/shared/utils/format-relative.d.ts +7 -0
  418. package/dist/runtime/shared/utils/format-relative.js +11 -0
  419. package/dist/runtime/shared/utils/frogger-snippet.d.ts +19 -0
  420. package/dist/runtime/shared/utils/frogger-snippet.js +33 -0
  421. package/dist/runtime/shared/utils/observe-config.d.ts +9 -0
  422. package/dist/runtime/shared/utils/observe-config.js +17 -0
  423. package/dist/runtime/shared/utils/period.d.ts +13 -0
  424. package/dist/runtime/shared/utils/period.js +15 -0
  425. package/dist/runtime/shared/utils/slug.d.ts +1 -0
  426. package/dist/runtime/shared/utils/slug.js +5 -0
  427. package/dist/runtime/shared/utils/uuid.d.ts +187 -0
  428. package/dist/runtime/shared/utils/uuid.js +345 -0
  429. package/dist/runtime/types/nuxt-auth-utils-imports.d.ts +25 -0
  430. package/dist/runtime/types/observe-app-imports.d.ts +20 -0
  431. package/dist/runtime/types/session.d.ts +17 -0
  432. package/dist/schema.d.mts +1318 -0
  433. package/dist/schema.mjs +629 -0
  434. package/dist/types.d.mts +3 -0
  435. package/package.json +93 -0
@@ -0,0 +1,132 @@
1
+ <script setup>
2
+ import { ref, computed, onBeforeUnmount } from "vue";
3
+ import { useRuntimeConfig } from "#imports";
4
+ import { useObserveAbility } from "../../composables/useObserveAbility";
5
+ const props = defineProps({
6
+ services: { type: Array, required: true },
7
+ pending: { type: Boolean, required: false }
8
+ });
9
+ const emit = defineEmits(["delete", "restore"]);
10
+ const { can, canForService } = useObserveAbility();
11
+ const { prefix } = useRuntimeConfig().public.observe;
12
+ const now = ref(Date.now());
13
+ const timer = setInterval(() => now.value = Date.now(), 3e4);
14
+ onBeforeUnmount(() => clearInterval(timer));
15
+ function countdown(purgeAt) {
16
+ const ms = purgeAt - now.value;
17
+ if (ms <= 0) return "purging\u2026";
18
+ const mins = Math.ceil(ms / 6e4);
19
+ if (mins < 60) return `deletes in ${mins}m`;
20
+ const hrs = Math.floor(mins / 60);
21
+ return `deletes in ${hrs}h ${mins % 60}m`;
22
+ }
23
+ const columns = computed(() => [
24
+ { id: "name", accessorKey: "name", header: "Service" },
25
+ { id: "type", header: "Type" },
26
+ { id: "kind", header: "Kind" },
27
+ { id: "env", accessorKey: "env", header: "Env" },
28
+ { id: "keys", accessorKey: "keyCount", header: "Keys", meta: { class: { th: "text-right", td: "text-right tabular-nums" } } },
29
+ { id: "status", header: "Status" },
30
+ { id: "actions", header: "" }
31
+ ]);
32
+ </script>
33
+
34
+ <template>
35
+ <UCard :ui="{ body: 'p-0 sm:p-0' }">
36
+ <UTable
37
+ :data="props.services"
38
+ :columns="columns"
39
+ :loading="props.pending"
40
+ empty="No services yet."
41
+ >
42
+ <template #name-cell="{ row }">
43
+ <div class="flex items-center gap-2 min-w-0">
44
+ <NuxtLink
45
+ :to="`${prefix}/settings/services/${row.original.id}`"
46
+ class="font-medium truncate hover:underline"
47
+ :class="row.original.deletedAt ? 'text-muted line-through' : ''"
48
+ >
49
+ {{ row.original.name }}
50
+ </NuxtLink>
51
+ <UBadge
52
+ v-if="row.original.managedByConfig"
53
+ color="neutral"
54
+ variant="outline"
55
+ size="sm"
56
+ label="config"
57
+ title="Declared in observe.services; config-owned fields reconcile on reboot"
58
+ />
59
+ </div>
60
+ <div class="text-xs text-muted">
61
+ {{ row.original.slug }}
62
+ </div>
63
+ </template>
64
+
65
+ <template #type-cell="{ row }">
66
+ <ObserveServiceTypeBadge :type="row.original.type" />
67
+ </template>
68
+
69
+ <template #kind-cell="{ row }">
70
+ <UBadge
71
+ :color="row.original.kind === 'browser' ? 'info' : 'neutral'"
72
+ variant="subtle"
73
+ size="sm"
74
+ :label="row.original.kind"
75
+ />
76
+ </template>
77
+
78
+ <template #env-cell="{ row }">
79
+ <span class="text-muted">{{ row.original.env ?? "\u2014" }}</span>
80
+ </template>
81
+
82
+ <template #status-cell="{ row }">
83
+ <UBadge
84
+ v-if="row.original.deletedAt && row.original.purgeAt"
85
+ color="error"
86
+ variant="subtle"
87
+ size="sm"
88
+ icon="i-lucide-clock"
89
+ :label="countdown(row.original.purgeAt)"
90
+ />
91
+ <span
92
+ v-else
93
+ class="text-xs text-muted"
94
+ >active</span>
95
+ </template>
96
+
97
+ <template #actions-cell="{ row }">
98
+ <div class="flex justify-end gap-1">
99
+ <UButton
100
+ v-if="row.original.deletedAt && can('services.create')"
101
+ icon="i-lucide-undo-2"
102
+ color="primary"
103
+ variant="soft"
104
+ size="xs"
105
+ label="Restore"
106
+ @click="emit('restore', row.original)"
107
+ />
108
+ <template v-else-if="!row.original.deletedAt">
109
+ <UButton
110
+ v-if="canForService('services.manage', row.original.slug)"
111
+ :to="`${prefix}/settings/services/${row.original.id}`"
112
+ icon="i-lucide-pencil"
113
+ color="neutral"
114
+ variant="ghost"
115
+ size="xs"
116
+ label="Edit"
117
+ />
118
+ <UButton
119
+ v-if="can('services.create') && !row.original.managedByConfig"
120
+ icon="i-lucide-trash-2"
121
+ color="error"
122
+ variant="ghost"
123
+ size="xs"
124
+ label="Delete"
125
+ @click="emit('delete', row.original)"
126
+ />
127
+ </template>
128
+ </div>
129
+ </template>
130
+ </UTable>
131
+ </UCard>
132
+ </template>
@@ -0,0 +1,19 @@
1
+ import type { ServiceListItem } from '../../../shared/schema/provisioning.js';
2
+ /**
3
+ * The provisioning services table. Rows lead with a name link + type badge, carry a kind
4
+ * badge, and — for a soft-deleted service — a live countdown to permanent purge plus a
5
+ * restore control. Gating is presentational (useObserveAbility); the server enforces.
6
+ */
7
+ type __VLS_Props = {
8
+ services: ServiceListItem[];
9
+ pending?: boolean;
10
+ };
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ delete: (service: ServiceListItem) => any;
13
+ restore: (service: ServiceListItem) => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ onDelete?: ((service: ServiceListItem) => any) | undefined;
16
+ onRestore?: ((service: ServiceListItem) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,27 @@
1
+ type __VLS_Props = {
2
+ loading?: boolean;
3
+ };
4
+ type __VLS_ModelProps = {
5
+ /** Create a DB-backed dashboard user. Validation rides createUserSchema so the form and the POST route agree. */
6
+ 'open': boolean;
7
+ };
8
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ submit: (input: {
11
+ username: string;
12
+ role: "admin" | "manager" | "viewer";
13
+ displayName?: string | undefined;
14
+ password?: string | undefined;
15
+ }) => any;
16
+ "update:open": (value: boolean) => any;
17
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
18
+ onSubmit?: ((input: {
19
+ username: string;
20
+ role: "admin" | "manager" | "viewer";
21
+ displayName?: string | undefined;
22
+ password?: string | undefined;
23
+ }) => any) | undefined;
24
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
25
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
+ declare const _default: typeof __VLS_export;
27
+ export default _default;
@@ -0,0 +1,108 @@
1
+ <script setup>
2
+ import { reactive, computed, watch } from "vue";
3
+ import { createUserSchema } from "../../../shared/auth/schema";
4
+ import { ROLES } from "../../../shared/auth/roles";
5
+ const open = defineModel("open", { type: Boolean, ...{ required: true } });
6
+ const props = defineProps({
7
+ loading: { type: Boolean, required: false }
8
+ });
9
+ const emit = defineEmits(["submit"]);
10
+ function blank() {
11
+ return { username: "", displayName: "", role: "viewer", password: "" };
12
+ }
13
+ const state = reactive(blank());
14
+ watch(open, (v) => {
15
+ if (v) Object.assign(state, blank());
16
+ });
17
+ const roleItems = ROLES.map((r) => ({ value: r, label: r }));
18
+ const cleaned = computed(() => ({
19
+ username: state.username.trim(),
20
+ displayName: state.displayName.trim() || void 0,
21
+ role: state.role,
22
+ password: state.password || void 0
23
+ }));
24
+ function onSubmit(_e) {
25
+ emit("submit", cleaned.value);
26
+ }
27
+ </script>
28
+
29
+ <template>
30
+ <UModal
31
+ v-model:open="open"
32
+ title="New user"
33
+ description="Create a dashboard user. A password enables local login; omit it for JWT-only access."
34
+ >
35
+ <template #body>
36
+ <UForm
37
+ :schema="createUserSchema"
38
+ :state="cleaned"
39
+ class="space-y-4"
40
+ @submit="onSubmit"
41
+ >
42
+ <UFormField
43
+ label="Username"
44
+ name="username"
45
+ required
46
+ >
47
+ <UInput
48
+ v-model="state.username"
49
+ placeholder="jane"
50
+ autofocus
51
+ />
52
+ </UFormField>
53
+
54
+ <div class="grid grid-cols-2 gap-3">
55
+ <UFormField
56
+ label="Display name"
57
+ name="displayName"
58
+ >
59
+ <UInput
60
+ v-model="state.displayName"
61
+ placeholder="Jane Doe"
62
+ />
63
+ </UFormField>
64
+ <UFormField
65
+ label="Role"
66
+ name="role"
67
+ required
68
+ >
69
+ <USelectMenu
70
+ v-model="state.role"
71
+ :items="roleItems"
72
+ value-key="value"
73
+ :search-input="false"
74
+ />
75
+ </UFormField>
76
+ </div>
77
+
78
+ <UFormField
79
+ label="Password"
80
+ name="password"
81
+ hint="At least 8 characters. Leave blank for JWT-only users."
82
+ >
83
+ <UInput
84
+ v-model="state.password"
85
+ type="password"
86
+ placeholder="••••••••"
87
+ />
88
+ </UFormField>
89
+
90
+ <div class="flex justify-end gap-2 pt-2">
91
+ <UButton
92
+ color="neutral"
93
+ variant="ghost"
94
+ label="Cancel"
95
+ @click="() => {
96
+ open = false;
97
+ }"
98
+ />
99
+ <UButton
100
+ type="submit"
101
+ label="Create user"
102
+ :loading="props.loading"
103
+ />
104
+ </div>
105
+ </UForm>
106
+ </template>
107
+ </UModal>
108
+ </template>
@@ -0,0 +1,27 @@
1
+ type __VLS_Props = {
2
+ loading?: boolean;
3
+ };
4
+ type __VLS_ModelProps = {
5
+ /** Create a DB-backed dashboard user. Validation rides createUserSchema so the form and the POST route agree. */
6
+ 'open': boolean;
7
+ };
8
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ submit: (input: {
11
+ username: string;
12
+ role: "admin" | "manager" | "viewer";
13
+ displayName?: string | undefined;
14
+ password?: string | undefined;
15
+ }) => any;
16
+ "update:open": (value: boolean) => any;
17
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
18
+ onSubmit?: ((input: {
19
+ username: string;
20
+ role: "admin" | "manager" | "viewer";
21
+ displayName?: string | undefined;
22
+ password?: string | undefined;
23
+ }) => any) | undefined;
24
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
25
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
+ declare const _default: typeof __VLS_export;
27
+ export default _default;
@@ -0,0 +1,17 @@
1
+ type __VLS_ModelProps = {
2
+ /**
3
+ * Version-tracking toggle plus an optional current-version input revealed when on.
4
+ * Two-way bound so the form modal and the edit page share one control.
5
+ */
6
+ 'enabled': boolean;
7
+ 'currentVersion'?: string | null;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ "update:enabled": (value: boolean) => any;
11
+ "update:currentVersion": (value: string | null) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
13
+ "onUpdate:enabled"?: ((value: boolean) => any) | undefined;
14
+ "onUpdate:currentVersion"?: ((value: string | null) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,20 @@
1
+ <script setup>
2
+ const enabled = defineModel("enabled", { type: Boolean, ...{ required: true } });
3
+ const currentVersion = defineModel("currentVersion", { type: [String, null], ...{ default: null } });
4
+ </script>
5
+
6
+ <template>
7
+ <div class="space-y-2">
8
+ <div class="flex items-center gap-3">
9
+ <USwitch v-model="enabled" />
10
+ <span class="text-sm">Track versions</span>
11
+ </div>
12
+ <UInput
13
+ v-if="enabled"
14
+ :model-value="currentVersion ?? ''"
15
+ placeholder="Current version (e.g. 1.4.2)"
16
+ size="sm"
17
+ @update:model-value="currentVersion = String($event) || null"
18
+ />
19
+ </div>
20
+ </template>
@@ -0,0 +1,17 @@
1
+ type __VLS_ModelProps = {
2
+ /**
3
+ * Version-tracking toggle plus an optional current-version input revealed when on.
4
+ * Two-way bound so the form modal and the edit page share one control.
5
+ */
6
+ 'enabled': boolean;
7
+ 'currentVersion'?: string | null;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ "update:enabled": (value: boolean) => any;
11
+ "update:currentVersion": (value: string | null) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
13
+ "onUpdate:enabled"?: ((value: boolean) => any) | undefined;
14
+ "onUpdate:currentVersion"?: ((value: string | null) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import type { Capability } from '../../shared/rbac/capabilities.js';
2
+ /**
3
+ * Client mirror of the server authorization check. Reads the Principal already carried in
4
+ * the session cookie (useUserSession().user is typed Principal) and the SAME shared
5
+ * ROLE_CAPABILITIES the server enforces, so a hidden control can never disagree with the
6
+ * route behind it.
7
+ *
8
+ * PRESENTATIONAL ONLY. The server (requireCapability + serviceScopeFilter/assertServiceInScope)
9
+ * is the sole authority: a hand-crafted request still hits the choke point. Gate UI with this;
10
+ * never rely on it for security.
11
+ */
12
+ export declare function useObserveAbility(): {
13
+ can: (capability: Capability) => boolean;
14
+ canForService: (capability: Capability, serviceSlug: string) => boolean;
15
+ };
@@ -0,0 +1,20 @@
1
+ import { computed } from "vue";
2
+ import { useUserSession } from "#imports";
3
+ import { roleCan } from "../../shared/rbac/capabilities.js";
4
+ export function useObserveAbility() {
5
+ const { user } = useUserSession();
6
+ const role = computed(() => user.value?.role ?? null);
7
+ const can = (capability) => {
8
+ const r = role.value;
9
+ return r ? roleCan(r, capability) !== void 0 : false;
10
+ };
11
+ const canForService = (capability, serviceSlug) => {
12
+ const p = user.value;
13
+ if (!p) return false;
14
+ const scope = roleCan(p.role, capability);
15
+ if (!scope) return false;
16
+ if (scope === "all" || p.assignment.services.includes("*")) return true;
17
+ return p.assignment.services.includes(serviceSlug);
18
+ };
19
+ return { can, canForService };
20
+ }
@@ -0,0 +1,22 @@
1
+ import { type Ref } from 'vue';
2
+ import type { ActivityDimension, ActivityResponse, ActivitySort } from '../../shared/schema/activity.js';
3
+ export interface UseObserveActivityReturn {
4
+ data: Ref<ActivityResponse | null | undefined>;
5
+ pending: Ref<boolean>;
6
+ error: Ref<Error | null | undefined>;
7
+ refresh: () => Promise<void>;
8
+ dimension: Ref<ActivityDimension>;
9
+ sort: Ref<ActivitySort>;
10
+ q: Ref<string>;
11
+ }
12
+ /**
13
+ * The one fetch behind the ranked activity table. Period + scope compose from the shared
14
+ * shell state exactly as useObserveStats does; dimension/sort/q are page-local controls.
15
+ * The search input is debounced (300ms) so typing does not refetch per keystroke; the repo
16
+ * has no @vueuse dependency, so the timer is hand-rolled. `opts.key`/`opts.limit` let a
17
+ * future compact overview panel mount its own instance without colliding on the fetch cache.
18
+ */
19
+ export declare function useObserveActivity(opts?: {
20
+ limit?: number;
21
+ key?: string;
22
+ }): UseObserveActivityReturn;
@@ -0,0 +1,44 @@
1
+ import { computed, ref, watch, onBeforeUnmount } from "vue";
2
+ import { useFetch } from "#imports";
3
+ import { useObservePeriod } from "./useObservePeriod.js";
4
+ import { useObserveScope } from "./useObserveScope.js";
5
+ export function useObserveActivity(opts = {}) {
6
+ const { period } = useObservePeriod();
7
+ const { serviceSlug, groupSlug } = useObserveScope();
8
+ const dimension = ref("auto");
9
+ const sort = ref("count");
10
+ const q = ref("");
11
+ const debouncedQ = ref("");
12
+ let timer;
13
+ watch(q, (v) => {
14
+ if (timer) clearTimeout(timer);
15
+ timer = setTimeout(() => {
16
+ debouncedQ.value = v.trim();
17
+ }, 300);
18
+ });
19
+ onBeforeUnmount(() => {
20
+ if (timer) clearTimeout(timer);
21
+ });
22
+ const query = computed(() => ({
23
+ period: period.value,
24
+ ...serviceSlug.value ? { service: serviceSlug.value } : {},
25
+ ...groupSlug.value ? { group: groupSlug.value } : {},
26
+ dimension: dimension.value,
27
+ sort: sort.value,
28
+ ...debouncedQ.value ? { q: debouncedQ.value } : {},
29
+ ...opts.limit ? { limit: opts.limit } : {}
30
+ }));
31
+ const { data, pending, error, refresh } = useFetch(
32
+ "/api/observe/activity",
33
+ { key: opts.key ?? "observe:activity", query }
34
+ );
35
+ return {
36
+ data,
37
+ pending,
38
+ error,
39
+ refresh,
40
+ dimension,
41
+ sort,
42
+ q
43
+ };
44
+ }
@@ -0,0 +1,15 @@
1
+ import type { Ref } from 'vue';
2
+ import type { KeyMeta, MintedKey } from '../../shared/schema/provisioning.js';
3
+ export interface UseObserveApiKeysReturn {
4
+ data: Ref<KeyMeta[] | null | undefined>;
5
+ pending: Ref<boolean>;
6
+ error: Ref<Error | null | undefined>;
7
+ refresh: () => Promise<void>;
8
+ mint: (label: string) => Promise<MintedKey>;
9
+ rotate: (keyId: string, label: string) => Promise<MintedKey>;
10
+ revoke: (keyId: string) => Promise<{
11
+ ok: true;
12
+ }>;
13
+ }
14
+ /** Key metadata list + mint/rotate/revoke for one service. Plaintext is returned only once, by mint/rotate. */
15
+ export declare function useObserveApiKeys(serviceId: string): UseObserveApiKeysReturn;
@@ -0,0 +1,19 @@
1
+ import { useFetch } from "#imports";
2
+ export function useObserveApiKeys(serviceId) {
3
+ const { data, pending, error, refresh } = useFetch(
4
+ `/api/observe/services/${serviceId}/keys`,
5
+ { key: `observe:keys:${serviceId}` }
6
+ );
7
+ const mint = (label) => $fetch(`/api/observe/services/${serviceId}/keys`, { method: "POST", body: { label } });
8
+ const rotate = (keyId, label) => $fetch(`/api/observe/services/${serviceId}/keys/${keyId}/rotate`, { method: "POST", body: { label } });
9
+ const revoke = (keyId) => $fetch(`/api/observe/services/${serviceId}/keys/${keyId}`, { method: "DELETE" });
10
+ return {
11
+ data,
12
+ pending,
13
+ error,
14
+ refresh,
15
+ mint,
16
+ rotate,
17
+ revoke
18
+ };
19
+ }
@@ -0,0 +1,19 @@
1
+ import { type ComputedRef } from 'vue';
2
+ import type { UserPick } from '../../shared/schema/provisioning.js';
3
+ import { useObserveUsers } from './useObserveUsers.js';
4
+ export interface UseObserveAssignmentsReturn {
5
+ users: ReturnType<typeof useObserveUsers>['data'];
6
+ pending: ReturnType<typeof useObserveUsers>['pending'];
7
+ error: ReturnType<typeof useObserveUsers>['error'];
8
+ refresh: ReturnType<typeof useObserveUsers>['refresh'];
9
+ /** Phase 1: assignments are managed in observe.auth.users, so the UI is read-only. */
10
+ writable: ComputedRef<boolean>;
11
+ /** The users (managers/viewers) assigned to a given service slug, derived from config. */
12
+ assignedTo: (serviceSlug: string) => UserPick[];
13
+ }
14
+ /**
15
+ * Read-only view of who is assigned to what. Runtime assignment writes land in CP16 with
16
+ * the DB auth provider; until then the config (observe.auth.users) is the single source of
17
+ * truth and this composable never mutates it (CP11 §11 R1).
18
+ */
19
+ export declare function useObserveAssignments(): UseObserveAssignmentsReturn;
@@ -0,0 +1,16 @@
1
+ import { computed } from "vue";
2
+ import { useObserveUsers } from "./useObserveUsers.js";
3
+ export function useObserveAssignments() {
4
+ const { data, pending, error, refresh } = useObserveUsers();
5
+ const assignedTo = (serviceSlug) => (data.value ?? []).filter(
6
+ (u) => u.assignment.services.includes("*") || u.assignment.services.includes(serviceSlug)
7
+ );
8
+ return {
9
+ users: data,
10
+ pending,
11
+ error,
12
+ refresh,
13
+ writable: computed(() => false),
14
+ assignedTo
15
+ };
16
+ }
@@ -0,0 +1,33 @@
1
+ import { type Ref, type WritableComputedRef } from 'vue';
2
+ import type { ErrorGroupsResponse, ErrorGroupDetailResponse, ErrorSort } from '../../shared/schema/errors-query.js';
3
+ export interface UseObserveErrorsReturn {
4
+ data: Ref<ErrorGroupsResponse | null | undefined>;
5
+ pending: Ref<boolean>;
6
+ error: Ref<Error | null | undefined>;
7
+ refresh: () => Promise<void>;
8
+ q: Ref<string>;
9
+ sort: Ref<ErrorSort>;
10
+ page: WritableComputedRef<number>;
11
+ limit: number;
12
+ }
13
+ export interface UseObserveErrorGroupReturn {
14
+ data: Ref<ErrorGroupDetailResponse | null | undefined>;
15
+ pending: Ref<boolean>;
16
+ error: Ref<Error | null | undefined>;
17
+ refresh: () => Promise<void>;
18
+ page: WritableComputedRef<number>;
19
+ limit: number;
20
+ }
21
+ /**
22
+ * The grouped error-list fetch behind the errors page. Period + scope compose from the
23
+ * shared shell state exactly as useObserveStats does; q/sort/page are page-local controls.
24
+ * The search input is debounced (300ms) so typing does not refetch per keystroke (the repo
25
+ * has no @vueuse dependency, so the timer is hand-rolled), and any q/sort change resets to
26
+ * page 1 so an offset past the new total never renders empty.
27
+ */
28
+ export declare function useObserveErrors(): UseObserveErrorsReturn;
29
+ /**
30
+ * The single drill-down fetch behind the error detail page. Period + scope compose from
31
+ * the shell so a shared link restores the window; the occurrences pager is page-local.
32
+ */
33
+ export declare function useObserveErrorGroup(fingerprint: string): UseObserveErrorGroupReturn;