qarpeo 0.1.8 → 0.1.9

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 (293) hide show
  1. package/dist/module.mjs +30 -14
  2. package/dist/runtime/app/components/QarpeoWelcome.vue +84 -0
  3. package/package.json +1 -1
  4. package/dist/dev/env.d.ts +0 -12
  5. package/dist/dev/wrangler.d.ts +0 -18
  6. package/dist/module.d.ts +0 -17
  7. package/dist/runtime/ai.d.ts +0 -25
  8. package/dist/runtime/analytics.d.ts +0 -24
  9. package/dist/runtime/app/composables/analytics.d.ts +0 -125
  10. package/dist/runtime/app/composables/api-tokens.d.ts +0 -49
  11. package/dist/runtime/app/composables/auth.d.ts +0 -58
  12. package/dist/runtime/app/composables/chat.d.ts +0 -69
  13. package/dist/runtime/app/composables/cms-preview.d.ts +0 -33
  14. package/dist/runtime/app/composables/cms.d.ts +0 -307
  15. package/dist/runtime/app/composables/docs-version.d.ts +0 -35
  16. package/dist/runtime/app/composables/impersonation.d.ts +0 -14
  17. package/dist/runtime/app/composables/notifications.d.ts +0 -35
  18. package/dist/runtime/app/composables/organization.d.ts +0 -127
  19. package/dist/runtime/app/composables/passkey.d.ts +0 -6
  20. package/dist/runtime/app/composables/passwordless.d.ts +0 -7
  21. package/dist/runtime/app/composables/payments.d.ts +0 -43
  22. package/dist/runtime/app/composables/realtime.d.ts +0 -96
  23. package/dist/runtime/app/composables/site.d.ts +0 -35
  24. package/dist/runtime/app/composables/storage.d.ts +0 -60
  25. package/dist/runtime/app/composables/tenant.d.ts +0 -82
  26. package/dist/runtime/app/composables/turnstile.d.ts +0 -3
  27. package/dist/runtime/app/composables/two-factor.d.ts +0 -12
  28. package/dist/runtime/app/middleware/auth.global.d.ts +0 -2
  29. package/dist/runtime/app/plugins/seo.d.ts +0 -2
  30. package/dist/runtime/app/plugins/shortcuts.client.d.ts +0 -6
  31. package/dist/runtime/auth.d.ts +0 -25
  32. package/dist/runtime/bindings.d.ts +0 -27
  33. package/dist/runtime/blob.d.ts +0 -26
  34. package/dist/runtime/bots.d.ts +0 -1
  35. package/dist/runtime/browser.d.ts +0 -21
  36. package/dist/runtime/cache.d.ts +0 -19
  37. package/dist/runtime/cms.d.ts +0 -2
  38. package/dist/runtime/db.d.ts +0 -21
  39. package/dist/runtime/drizzle.d.ts +0 -11
  40. package/dist/runtime/email.d.ts +0 -51
  41. package/dist/runtime/hyperdrive.d.ts +0 -21
  42. package/dist/runtime/index.d.ts +0 -22
  43. package/dist/runtime/kv.d.ts +0 -16
  44. package/dist/runtime/payments.d.ts +0 -2
  45. package/dist/runtime/queue.d.ts +0 -21
  46. package/dist/runtime/rag.d.ts +0 -1
  47. package/dist/runtime/ratelimit.d.ts +0 -21
  48. package/dist/runtime/realtime.d.ts +0 -6
  49. package/dist/runtime/server/db/cms-schema.d.ts +0 -651
  50. package/dist/runtime/server/durable-objects/agent.d.ts +0 -14
  51. package/dist/runtime/server/durable-objects/room.d.ts +0 -34
  52. package/dist/runtime/server/middleware/auth.d.ts +0 -2
  53. package/dist/runtime/server/middleware/devtools.d.ts +0 -2
  54. package/dist/runtime/server/middleware/ratelimit.d.ts +0 -2
  55. package/dist/runtime/server/middleware/tenancy.d.ts +0 -6
  56. package/dist/runtime/server/middleware/tracker.d.ts +0 -7
  57. package/dist/runtime/server/plugins/agents.d.ts +0 -7
  58. package/dist/runtime/server/plugins/cms.d.ts +0 -8
  59. package/dist/runtime/server/plugins/dev-logs.d.ts +0 -1
  60. package/dist/runtime/server/plugins/dev-proxy.d.ts +0 -3
  61. package/dist/runtime/server/plugins/env.d.ts +0 -6
  62. package/dist/runtime/server/plugins/queue.d.ts +0 -6
  63. package/dist/runtime/server/routes/__qarpeo/agents/chat.post.d.ts +0 -20
  64. package/dist/runtime/server/routes/__qarpeo/agents/clear.post.d.ts +0 -7
  65. package/dist/runtime/server/routes/__qarpeo/agents/create.post.d.ts +0 -17
  66. package/dist/runtime/server/routes/__qarpeo/agents/history.get.d.ts +0 -15
  67. package/dist/runtime/server/routes/__qarpeo/agents/list.get.d.ts +0 -5
  68. package/dist/runtime/server/routes/__qarpeo/analytics/events.get.d.ts +0 -64
  69. package/dist/runtime/server/routes/__qarpeo/analytics/summary.get.d.ts +0 -30
  70. package/dist/runtime/server/routes/__qarpeo/auth/revoke-session.post.d.ts +0 -6
  71. package/dist/runtime/server/routes/__qarpeo/auth/sessions.get.d.ts +0 -6
  72. package/dist/runtime/server/routes/__qarpeo/auth/users.get.d.ts +0 -7
  73. package/dist/runtime/server/routes/__qarpeo/blob/files.get.d.ts +0 -22
  74. package/dist/runtime/server/routes/__qarpeo/db/query.post.d.ts +0 -23
  75. package/dist/runtime/server/routes/__qarpeo/db/tables.get.d.ts +0 -31
  76. package/dist/runtime/server/routes/__qarpeo/kv/delete.post.d.ts +0 -11
  77. package/dist/runtime/server/routes/__qarpeo/kv/get.get.d.ts +0 -11
  78. package/dist/runtime/server/routes/__qarpeo/kv/keys.get.d.ts +0 -8
  79. package/dist/runtime/server/routes/__qarpeo/kv/set.post.d.ts +0 -14
  80. package/dist/runtime/server/routes/__qarpeo/logs.delete.d.ts +0 -5
  81. package/dist/runtime/server/routes/__qarpeo/logs.get.d.ts +0 -5
  82. package/dist/runtime/server/routes/__qarpeo/logs.post.d.ts +0 -6
  83. package/dist/runtime/server/routes/__qarpeo/mail/bounce.post.d.ts +0 -5
  84. package/dist/runtime/server/routes/__qarpeo/mail/clear.post.d.ts +0 -4
  85. package/dist/runtime/server/routes/__qarpeo/mail/inbox.get.d.ts +0 -5
  86. package/dist/runtime/server/routes/__qarpeo/mail/send-test.post.d.ts +0 -4
  87. package/dist/runtime/server/routes/__qarpeo/mail/track/click/[id].get.d.ts +0 -2
  88. package/dist/runtime/server/routes/__qarpeo/mail/track/open/[id].get.d.ts +0 -2
  89. package/dist/runtime/server/routes/__qarpeo/overview/health.get.d.ts +0 -8
  90. package/dist/runtime/server/routes/__qarpeo/overview.get.d.ts +0 -32
  91. package/dist/runtime/server/routes/__qarpeo/settings/reset-dev-data.post.d.ts +0 -11
  92. package/dist/runtime/server/routes/__qarpeo/settings.get.d.ts +0 -124
  93. package/dist/runtime/server/routes/__qarpeo/tenants/create.post.d.ts +0 -7
  94. package/dist/runtime/server/routes/__qarpeo/tenants/domain-add.post.d.ts +0 -6
  95. package/dist/runtime/server/routes/__qarpeo/tenants/domain-delete.post.d.ts +0 -7
  96. package/dist/runtime/server/routes/__qarpeo/tenants/domain-verify.post.d.ts +0 -9
  97. package/dist/runtime/server/routes/__qarpeo/tenants/list.get.d.ts +0 -15
  98. package/dist/runtime/server/routes/agents/[agent]/chat.post.d.ts +0 -2
  99. package/dist/runtime/server/routes/agents/[agent]/clear.post.d.ts +0 -4
  100. package/dist/runtime/server/routes/agents/[agent]/history.get.d.ts +0 -4
  101. package/dist/runtime/server/routes/analytics/events.get.d.ts +0 -3
  102. package/dist/runtime/server/routes/analytics/pageviews.get.d.ts +0 -3
  103. package/dist/runtime/server/routes/analytics/summary.get.d.ts +0 -6
  104. package/dist/runtime/server/routes/atom.xml.get.d.ts +0 -2
  105. package/dist/runtime/server/routes/auth/2fa/disable.post.d.ts +0 -4
  106. package/dist/runtime/server/routes/auth/2fa/setup.post.d.ts +0 -6
  107. package/dist/runtime/server/routes/auth/2fa/verify.post.d.ts +0 -6
  108. package/dist/runtime/server/routes/auth/[provider]/callback.d.ts +0 -1
  109. package/dist/runtime/server/routes/auth/[provider].d.ts +0 -3
  110. package/dist/runtime/server/routes/auth/account.delete.d.ts +0 -5
  111. package/dist/runtime/server/routes/auth/impersonate/start.post.d.ts +0 -5
  112. package/dist/runtime/server/routes/auth/impersonate/stop.post.d.ts +0 -5
  113. package/dist/runtime/server/routes/auth/logout-all.post.d.ts +0 -4
  114. package/dist/runtime/server/routes/auth/logout-others.post.d.ts +0 -4
  115. package/dist/runtime/server/routes/auth/logout.post.d.ts +0 -4
  116. package/dist/runtime/server/routes/auth/magic-link/send.post.d.ts +0 -10
  117. package/dist/runtime/server/routes/auth/magic-link/verify.get.d.ts +0 -2
  118. package/dist/runtime/server/routes/auth/organization/create.post.d.ts +0 -5
  119. package/dist/runtime/server/routes/auth/organization/invite.post.d.ts +0 -9
  120. package/dist/runtime/server/routes/auth/organization/join.post.d.ts +0 -6
  121. package/dist/runtime/server/routes/auth/organization/list.get.d.ts +0 -5
  122. package/dist/runtime/server/routes/auth/organization/members/[id].delete.d.ts +0 -4
  123. package/dist/runtime/server/routes/auth/organization/members/index.get.d.ts +0 -6
  124. package/dist/runtime/server/routes/auth/organization/mfa.post.d.ts +0 -6
  125. package/dist/runtime/server/routes/auth/organization/sso/[id].delete.d.ts +0 -4
  126. package/dist/runtime/server/routes/auth/organization/sso/index.get.d.ts +0 -2
  127. package/dist/runtime/server/routes/auth/organization/sso/index.post.d.ts +0 -5
  128. package/dist/runtime/server/routes/auth/organization/switch.post.d.ts +0 -6
  129. package/dist/runtime/server/routes/auth/otp/send.post.d.ts +0 -10
  130. package/dist/runtime/server/routes/auth/otp/verify.post.d.ts +0 -6
  131. package/dist/runtime/server/routes/auth/sessions/[id].delete.d.ts +0 -5
  132. package/dist/runtime/server/routes/auth/sessions.get.d.ts +0 -2
  133. package/dist/runtime/server/routes/auth/sso/login.get.d.ts +0 -2
  134. package/dist/runtime/server/routes/auth/sso/oidc/callback.get.d.ts +0 -2
  135. package/dist/runtime/server/routes/auth/sso/saml/acs.post.d.ts +0 -2
  136. package/dist/runtime/server/routes/auth/tokens/[id].delete.d.ts +0 -4
  137. package/dist/runtime/server/routes/auth/tokens/create.post.d.ts +0 -9
  138. package/dist/runtime/server/routes/auth/tokens/index.get.d.ts +0 -9
  139. package/dist/runtime/server/routes/auth/turnstile/verify.post.d.ts +0 -2
  140. package/dist/runtime/server/routes/auth/user.get.d.ts +0 -2
  141. package/dist/runtime/server/routes/auth/webauthn/login/options.post.d.ts +0 -2
  142. package/dist/runtime/server/routes/auth/webauthn/login/verify.post.d.ts +0 -6
  143. package/dist/runtime/server/routes/auth/webauthn/register/options.post.d.ts +0 -2
  144. package/dist/runtime/server/routes/auth/webauthn/register/verify.post.d.ts +0 -5
  145. package/dist/runtime/server/routes/cms/[collection]/[id]/preview-token.post.d.ts +0 -8
  146. package/dist/runtime/server/routes/cms/[collection]/[id]/publish.post.d.ts +0 -6
  147. package/dist/runtime/server/routes/cms/[collection]/[id]/review.post.d.ts +0 -6
  148. package/dist/runtime/server/routes/cms/[collection]/[id].delete.d.ts +0 -4
  149. package/dist/runtime/server/routes/cms/[collection]/[id].put.d.ts +0 -4
  150. package/dist/runtime/server/routes/cms/[collection]/[slug].get.d.ts +0 -4
  151. package/dist/runtime/server/routes/cms/[collection]/atom.xml.get.d.ts +0 -2
  152. package/dist/runtime/server/routes/cms/[collection]/by-path.get.d.ts +0 -8
  153. package/dist/runtime/server/routes/cms/[collection]/feed.xml.get.d.ts +0 -2
  154. package/dist/runtime/server/routes/cms/[collection]/index.get.d.ts +0 -7
  155. package/dist/runtime/server/routes/cms/[collection]/index.post.d.ts +0 -4
  156. package/dist/runtime/server/routes/cms/[collection]/references.get.d.ts +0 -19
  157. package/dist/runtime/server/routes/cms/[collection]/surroundings.get.d.ts +0 -10
  158. package/dist/runtime/server/routes/cms/collections/[id].delete.d.ts +0 -4
  159. package/dist/runtime/server/routes/cms/collections/[id].put.d.ts +0 -4
  160. package/dist/runtime/server/routes/cms/collections/index.get.d.ts +0 -4
  161. package/dist/runtime/server/routes/cms/collections/index.post.d.ts +0 -4
  162. package/dist/runtime/server/routes/cms/components/index.get.d.ts +0 -17
  163. package/dist/runtime/server/routes/cms/deploy.post.d.ts +0 -4
  164. package/dist/runtime/server/routes/cms/export.post.d.ts +0 -10
  165. package/dist/runtime/server/routes/cms/navigation.get.d.ts +0 -8
  166. package/dist/runtime/server/routes/cms/preview/disable.get.d.ts +0 -9
  167. package/dist/runtime/server/routes/cms/preview/enable.get.d.ts +0 -14
  168. package/dist/runtime/server/routes/cms/publish-scheduled.post.d.ts +0 -11
  169. package/dist/runtime/server/routes/cms/search.get.d.ts +0 -13
  170. package/dist/runtime/server/routes/cms/sync.post.d.ts +0 -7
  171. package/dist/runtime/server/routes/cms/webhooks/[provider].post.d.ts +0 -150
  172. package/dist/runtime/server/routes/docs/search.get.d.ts +0 -15
  173. package/dist/runtime/server/routes/feed.xml.get.d.ts +0 -2
  174. package/dist/runtime/server/routes/mail/bounce.post.d.ts +0 -14
  175. package/dist/runtime/server/routes/mail/inbox/[id].get.d.ts +0 -2
  176. package/dist/runtime/server/routes/mail/inbox.get.d.ts +0 -4
  177. package/dist/runtime/server/routes/mail/suppressions/[email].delete.d.ts +0 -11
  178. package/dist/runtime/server/routes/mail/suppressions/index.get.d.ts +0 -12
  179. package/dist/runtime/server/routes/mail/suppressions/index.post.d.ts +0 -10
  180. package/dist/runtime/server/routes/mail/unsubscribe.d.ts +0 -13
  181. package/dist/runtime/server/routes/mail/webhooks.post.d.ts +0 -12
  182. package/dist/runtime/server/routes/notifications/[id]/read.post.d.ts +0 -4
  183. package/dist/runtime/server/routes/notifications/[id].delete.d.ts +0 -4
  184. package/dist/runtime/server/routes/notifications/[id].get.d.ts +0 -2
  185. package/dist/runtime/server/routes/notifications/index.get.d.ts +0 -6
  186. package/dist/runtime/server/routes/notifications/push/subscribe.post.d.ts +0 -4
  187. package/dist/runtime/server/routes/notifications/push/unsubscribe.post.d.ts +0 -4
  188. package/dist/runtime/server/routes/notifications/read-all.post.d.ts +0 -4
  189. package/dist/runtime/server/routes/payments/cancel.post.d.ts +0 -7
  190. package/dist/runtime/server/routes/payments/change-plan.post.d.ts +0 -7
  191. package/dist/runtime/server/routes/payments/checkout.post.d.ts +0 -9
  192. package/dist/runtime/server/routes/payments/pause.post.d.ts +0 -7
  193. package/dist/runtime/server/routes/payments/portal.post.d.ts +0 -5
  194. package/dist/runtime/server/routes/payments/subscription.get.d.ts +0 -6
  195. package/dist/runtime/server/routes/payments/usage.get.d.ts +0 -12
  196. package/dist/runtime/server/routes/payments/usage.post.d.ts +0 -6
  197. package/dist/runtime/server/routes/payments/webhook.post.d.ts +0 -14
  198. package/dist/runtime/server/routes/realtime/broadcast.post.d.ts +0 -4
  199. package/dist/runtime/server/routes/realtime/history.delete.d.ts +0 -13
  200. package/dist/runtime/server/routes/realtime/history.get.d.ts +0 -16
  201. package/dist/runtime/server/routes/realtime/presence.get.d.ts +0 -6
  202. package/dist/runtime/server/routes/realtime/state.get.d.ts +0 -5
  203. package/dist/runtime/server/routes/realtime/state.post.d.ts +0 -6
  204. package/dist/runtime/server/routes/realtime/ws.get.d.ts +0 -2
  205. package/dist/runtime/server/routes/robots.txt.get.d.ts +0 -2
  206. package/dist/runtime/server/routes/rss.xml.get.d.ts +0 -2
  207. package/dist/runtime/server/routes/sitemap.xml.get.d.ts +0 -2
  208. package/dist/runtime/server/routes/storage/file/[...key].delete.d.ts +0 -4
  209. package/dist/runtime/server/routes/storage/file/[...key].get.d.ts +0 -2
  210. package/dist/runtime/server/routes/storage/files.get.d.ts +0 -14
  211. package/dist/runtime/server/routes/storage/presigned.post.d.ts +0 -8
  212. package/dist/runtime/server/routes/storage/sign.post.d.ts +0 -6
  213. package/dist/runtime/server/routes/storage/upload.post.d.ts +0 -22
  214. package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/index.delete.d.ts +0 -8
  215. package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/verify.post.d.ts +0 -8
  216. package/dist/runtime/server/routes/tenants/[tenant]/domains/index.get.d.ts +0 -8
  217. package/dist/runtime/server/routes/tenants/[tenant]/domains/index.post.d.ts +0 -8
  218. package/dist/runtime/server/routes/tenants/current.get.d.ts +0 -8
  219. package/dist/runtime/server/tasks/cms/publish.d.ts +0 -4
  220. package/dist/runtime/server/utils/agent-store.d.ts +0 -24
  221. package/dist/runtime/server/utils/agents-registry-fallback.d.ts +0 -1
  222. package/dist/runtime/server/utils/ai.d.ts +0 -119
  223. package/dist/runtime/server/utils/analytics-query.d.ts +0 -109
  224. package/dist/runtime/server/utils/auth.d.ts +0 -60
  225. package/dist/runtime/server/utils/blob-store.d.ts +0 -13
  226. package/dist/runtime/server/utils/bots.d.ts +0 -21
  227. package/dist/runtime/server/utils/cache.d.ts +0 -33
  228. package/dist/runtime/server/utils/cms-events.d.ts +0 -17
  229. package/dist/runtime/server/utils/cms-filter.d.ts +0 -3
  230. package/dist/runtime/server/utils/cms.d.ts +0 -287
  231. package/dist/runtime/server/utils/config.d.ts +0 -27
  232. package/dist/runtime/server/utils/context.d.ts +0 -13
  233. package/dist/runtime/server/utils/crypto.d.ts +0 -16
  234. package/dist/runtime/server/utils/dev-logs.d.ts +0 -21
  235. package/dist/runtime/server/utils/dev-proxy.d.ts +0 -1
  236. package/dist/runtime/server/utils/domains.d.ts +0 -46
  237. package/dist/runtime/server/utils/drizzle.d.ts +0 -10
  238. package/dist/runtime/server/utils/email-templates.d.ts +0 -44
  239. package/dist/runtime/server/utils/feed.d.ts +0 -42
  240. package/dist/runtime/server/utils/impersonation.d.ts +0 -67
  241. package/dist/runtime/server/utils/jobs.d.ts +0 -70
  242. package/dist/runtime/server/utils/kv-store.d.ts +0 -9
  243. package/dist/runtime/server/utils/mail-suppression.d.ts +0 -62
  244. package/dist/runtime/server/utils/mail.d.ts +0 -90
  245. package/dist/runtime/server/utils/notifications.d.ts +0 -51
  246. package/dist/runtime/server/utils/organization.d.ts +0 -54
  247. package/dist/runtime/server/utils/passwordless.d.ts +0 -48
  248. package/dist/runtime/server/utils/payments.d.ts +0 -121
  249. package/dist/runtime/server/utils/queue-fallback.d.ts +0 -2
  250. package/dist/runtime/server/utils/queue.d.ts +0 -4
  251. package/dist/runtime/server/utils/rag.d.ts +0 -25
  252. package/dist/runtime/server/utils/ratelimit.d.ts +0 -45
  253. package/dist/runtime/server/utils/realtime.d.ts +0 -110
  254. package/dist/runtime/server/utils/schema-fallback.d.ts +0 -3
  255. package/dist/runtime/server/utils/session.d.ts +0 -72
  256. package/dist/runtime/server/utils/sso.d.ts +0 -49
  257. package/dist/runtime/server/utils/storage.d.ts +0 -111
  258. package/dist/runtime/server/utils/tenant.d.ts +0 -44
  259. package/dist/runtime/server/utils/totp.d.ts +0 -33
  260. package/dist/runtime/server/utils/tracker.d.ts +0 -72
  261. package/dist/runtime/server/utils/turnstile.d.ts +0 -17
  262. package/dist/runtime/server/utils/vapid.d.ts +0 -35
  263. package/dist/runtime/storage.d.ts +0 -1
  264. package/dist/runtime/types/ai.d.ts +0 -68
  265. package/dist/runtime/types/analytics.d.ts +0 -30
  266. package/dist/runtime/types/auth.d.ts +0 -153
  267. package/dist/runtime/types/browser.d.ts +0 -29
  268. package/dist/runtime/types/d1.d.ts +0 -44
  269. package/dist/runtime/types/drizzle.d.ts +0 -13
  270. package/dist/runtime/types/durable-object.d.ts +0 -51
  271. package/dist/runtime/types/email.d.ts +0 -66
  272. package/dist/runtime/types/hyperdrive.d.ts +0 -18
  273. package/dist/runtime/types/index.d.ts +0 -156
  274. package/dist/runtime/types/queue.d.ts +0 -67
  275. package/dist/runtime/types/r2.d.ts +0 -108
  276. package/dist/runtime/types/ratelimit.d.ts +0 -21
  277. package/dist/runtime/types/vectorize.d.ts +0 -74
  278. package/dist/runtime/vectorize.d.ts +0 -21
  279. package/dist/types.d.ts +0 -2752
  280. package/dist/utils/agents.d.ts +0 -8
  281. package/dist/utils/auth-schema.d.ts +0 -11
  282. package/dist/utils/bindings.d.ts +0 -16
  283. package/dist/utils/cms-scan.d.ts +0 -36
  284. package/dist/utils/cms-schema.d.ts +0 -1
  285. package/dist/utils/cms-sources.d.ts +0 -67
  286. package/dist/utils/drizzle.d.ts +0 -42
  287. package/dist/utils/jobs.d.ts +0 -8
  288. package/dist/utils/local-db.d.ts +0 -28
  289. package/dist/utils/notifications-schema.d.ts +0 -15
  290. package/dist/utils/payments-schema.d.ts +0 -11
  291. package/dist/utils/pkg.d.ts +0 -15
  292. package/dist/utils/queue.d.ts +0 -8
  293. package/dist/utils/tenants-schema.d.ts +0 -11
@@ -1,119 +0,0 @@
1
- import "#qarpeo/agents-registry";
2
- import type { AgentDefinition, AgentMessage, AgentTool, StreamTextOptions, DurableObjectStub, GenerateImageOptions, GenerateImageResult, GenerateSpeechOptions, GenerateSpeechResult, TranscribeAudioInput, TranscribeAudioOptions, TranscribeAudioResult } from "../../../types";
3
- /** Registers an agent definition in the shared server runtime registry. */
4
- export declare function registerAgentDefinition(definition: AgentDefinition): void;
5
- /** Retrieves a registered agent definition by its unique name. */
6
- export declare function getAgentDefinition(name: string): AgentDefinition | undefined;
7
- /** Retrieves all currently registered agent definitions. */
8
- export declare function getAllAgentDefinitions(): AgentDefinition[];
9
- /**
10
- * Define a typed tool for an edge agent or LLM function call.
11
- *
12
- * @example
13
- * export const searchDocs = defineTool({
14
- * description: "Search documentation articles",
15
- * parameters: {
16
- * type: "object",
17
- * properties: { query: { type: "string" } },
18
- * required: ["query"],
19
- * },
20
- * async execute({ query }) {
21
- * return await performSearch(query)
22
- * },
23
- * })
24
- */
25
- export declare function defineTool<TParams = any, TResult = any>(tool: AgentTool<TParams, TResult>): AgentTool<TParams, TResult>;
26
- /**
27
- * Define a stateful edge agent and register it in the runtime registry.
28
- *
29
- * @example
30
- * // server/agents/support.ts
31
- * export default defineAgent({
32
- * name: "support",
33
- * model: "@cf/meta/llama-3.3-70b-instruct",
34
- * system: "You are a customer support agent.",
35
- * tools: { searchDocs },
36
- * })
37
- */
38
- export declare function defineAgent(definition: AgentDefinition): AgentDefinition;
39
- /** Retrieves the Durable Object stub for a specific agent instance. */
40
- export declare function getAgentDurableObject(agentName: string, id?: string, bindingName?: string, event?: any): DurableObjectStub;
41
- export declare function useAgent(agentName: string, id?: string, event?: any): {
42
- chat(message: string, options?: {
43
- stream?: boolean;
44
- model?: string;
45
- system?: string;
46
- maxSteps?: number;
47
- maxTokens?: number;
48
- temperature?: number;
49
- }): Promise<Response>;
50
- history(): Promise<AgentMessage[]>;
51
- clear(): Promise<void>;
52
- getState(): Promise<Record<string, any>>;
53
- setState(state: Record<string, any>): Promise<void>;
54
- };
55
- /**
56
- * Generate vector embeddings for text using Cloudflare Workers AI.
57
- *
58
- * @default model: "@cf/baai/bge-base-en-v1.5"
59
- */
60
- export declare function embedText(text: string | string[], options?: {
61
- model?: string;
62
- binding?: string;
63
- event?: any;
64
- }): Promise<number[][]>;
65
- export interface SimilaritySearchOptions {
66
- topK?: number;
67
- binding?: string;
68
- namespace?: string;
69
- filter?: Record<string, any>;
70
- returnValues?: boolean;
71
- returnMetadata?: boolean | "all" | "indexed";
72
- model?: string;
73
- event?: any;
74
- }
75
- /** Performs vector similarity search using Cloudflare Vectorize. */
76
- export declare function similaritySearch(indexName: string, query: string, options?: SimilaritySearchOptions): Promise<any[]>;
77
- /** Generate a complete text response using Cloudflare Workers AI. */
78
- export declare function generateText(options: StreamTextOptions): Promise<string>;
79
- /** Stream text directly via Server-Sent Events using Cloudflare Workers AI. */
80
- export declare function streamText(options: StreamTextOptions): Promise<Response>;
81
- /**
82
- * Generate an image using Cloudflare Workers AI.
83
- *
84
- * @param options Text prompt string or configuration options
85
- * @default model "@cf/black-forest-labs/flux-1-schnell"
86
- *
87
- * @example
88
- * const img = await generateImage("A futuristic city at sunset, synthwave style")
89
- * return img.toResponse()
90
- */
91
- export declare function generateImage(options: string | GenerateImageOptions): Promise<GenerateImageResult>;
92
- /** Alias for `generateImage`. */
93
- export declare const textToImage: typeof generateImage;
94
- /**
95
- * Generate spoken audio from text using Cloudflare Workers AI Text-to-Speech (TTS).
96
- *
97
- * @param options Text script or configuration options
98
- * @default model "@cf/meta/mms-tts-eng"
99
- *
100
- * @example
101
- * const audio = await generateSpeech("Welcome to our platform!")
102
- * return audio.toResponse()
103
- */
104
- export declare function generateSpeech(options: string | GenerateSpeechOptions): Promise<GenerateSpeechResult>;
105
- /** Alias for `generateSpeech`. */
106
- export declare const textToSpeech: typeof generateSpeech;
107
- /**
108
- * Transcribe spoken audio to text using Cloudflare Workers AI Whisper (STT).
109
- *
110
- * @param options Audio data (Uint8Array, ArrayBuffer, Blob, number array) or configuration options
111
- * @default model "@cf/openai/whisper"
112
- *
113
- * @example
114
- * const result = await transcribeAudio(audioBytes)
115
- * console.log(result.text)
116
- */
117
- export declare function transcribeAudio(options: TranscribeAudioInput | TranscribeAudioOptions): Promise<TranscribeAudioResult>;
118
- /** Alias for `transcribeAudio`. */
119
- export declare const speechToText: typeof transcribeAudio;
@@ -1,109 +0,0 @@
1
- /**
2
- * @file Analytics-query.ts Tier 2 Analytics — Cloudflare Analytics Engine SQL API query wrapper.
3
- * Provides pre-built dashboard metric helpers backed by the CF AE HTTP SQL API. CF AE SQL API
4
- * endpoint: GET https://api.cloudflare.com/client/v4/accounts/{account_id}/analytics_engine/sql
5
- * ?query=SELECT ... Data point schema used by tracker.ts: blob1 = event type ("pageview" | custom
6
- * name) blob2 = path blob3 = referrer blob4 = country blob5 = device type blob6 = user agent
7
- * blob7 = session fingerprint blob8 = user ID blob9 = metadata JSON (events only) double1 =
8
- * response time ms double2 = HTTP status code index1 = site ID
9
- */
10
- import type { AnalyticsRange, AnalyticsSummary, PageviewSummary, AnalyticsEventRecord } from "../../../types";
11
- export interface QueryAnalyticsOptions {
12
- /** Cloudflare Account ID. Falls back to env `CLOUDFLARE_ACCOUNT_ID`. */
13
- accountId?: string;
14
- /** Cloudflare API token with AE read. Falls back to env `CLOUDFLARE_API_TOKEN`. */
15
- apiToken?: string;
16
- /** Dataset / table name to query (the wrangler dataset name). */
17
- dataset?: string;
18
- }
19
- export interface DashboardOptions extends QueryAnalyticsOptions {
20
- /** Site ID filter (index1). If omitted, queries across all sites in the dataset. */
21
- siteId?: string;
22
- }
23
- /**
24
- * Execute a raw SQL query against the Cloudflare Analytics Engine SQL API.
25
- *
26
- * @param sql SQL string (supports AE SQL dialect)
27
- * @param options Account credentials and dataset name
28
- * @returns Parsed rows as plain objects
29
- */
30
- export declare function queryAnalytics<T = Record<string, unknown>>(sql: string, options?: QueryAnalyticsOptions): Promise<T[]>;
31
- /**
32
- * Creates a set of pre-built analytics dashboard metric helpers. All queries target the fixed
33
- * schema written by `trackPageview()` / `trackEvent()`.
34
- *
35
- * @example
36
- * ;```ts
37
- * const dash = useAnalyticsDashboard({ accountId, apiToken, dataset: "analytics-prod" })
38
- * const { total, series } = await dash.pageviews("7d")
39
- * ```
40
- */
41
- export declare function useAnalyticsDashboard(options?: DashboardOptions): {
42
- /**
43
- * Total pageviews and time-series breakdown.
44
- *
45
- * @param range Time range (default: '7d')
46
- */
47
- pageviews(range?: AnalyticsRange): Promise<PageviewSummary>;
48
- /**
49
- * Unique visitor count (unique session fingerprints).
50
- *
51
- * @param range Time range (default: '7d')
52
- */
53
- visitors(range?: AnalyticsRange): Promise<number>;
54
- /**
55
- * Top pages by pageview count.
56
- *
57
- * @param limit Max results (default: 10)
58
- * @param range Time range (default: '7d')
59
- */
60
- topPages(limit?: number, range?: AnalyticsRange): Promise<Array<{
61
- path: string;
62
- views: number;
63
- }>>;
64
- /**
65
- * Top referrers by visit count.
66
- *
67
- * @param limit Max results (default: 10)
68
- * @param range Time range (default: '7d')
69
- */
70
- topReferrers(limit?: number, range?: AnalyticsRange): Promise<Array<{
71
- referrer: string;
72
- count: number;
73
- }>>;
74
- /**
75
- * Pageview breakdown by country.
76
- *
77
- * @param limit Max results (default: 10)
78
- * @param range Time range (default: '7d')
79
- */
80
- countries(limit?: number, range?: AnalyticsRange): Promise<Array<{
81
- country: string;
82
- count: number;
83
- }>>;
84
- /**
85
- * Device type breakdown.
86
- *
87
- * @param range Time range (default: '7d')
88
- */
89
- devices(range?: AnalyticsRange): Promise<{
90
- mobile: number;
91
- desktop: number;
92
- bot: number;
93
- }>;
94
- /**
95
- * Custom event breakdown.
96
- *
97
- * @param name Filter to a specific event name. If omitted, returns all events.
98
- * @param limit Max results (default: 20)
99
- * @param range Time range (default: '7d')
100
- */
101
- events(name?: string, limit?: number, range?: AnalyticsRange): Promise<AnalyticsEventRecord[]>;
102
- /**
103
- * Returns a full KPI summary object — useful for the dashboard overview card. Runs multiple
104
- * queries in parallel.
105
- *
106
- * @param range Time range (default: '7d')
107
- */
108
- summary(range?: AnalyticsRange): Promise<AnalyticsSummary>;
109
- };
@@ -1,60 +0,0 @@
1
- import type { RequestEvent } from "nuxt/server";
2
- import type { QarpeoSession } from "../../types/auth";
3
- /** Ensures core auth tables (_qarpeo_users, _qarpeo_accounts, _qarpeo_sessions) exist in D1. */
4
- export declare function ensureAuthTables(d1: any): Promise<void>;
5
- export interface NormalizeOAuthProfileOptions {
6
- provider: string;
7
- rawUser: any;
8
- tokens: any;
9
- }
10
- export declare function normalizeOAuthProfile({ provider, rawUser, tokens }: NormalizeOAuthProfileOptions): {
11
- provider: string;
12
- providerAccountId: string;
13
- email: any;
14
- emailVerified: boolean;
15
- name: any;
16
- avatarUrl: any;
17
- tokens: any;
18
- };
19
- export interface HandleOAuthSuccessOptions {
20
- event: RequestEvent;
21
- provider: string;
22
- user: any;
23
- tokens: any;
24
- }
25
- /**
26
- * Handles OAuth callback success:
27
- *
28
- * 1. Upserts user in D1 database
29
- * 2. Manages account linking according to security rules
30
- * 3. Triggers `qarpeo:auth:oauth:success` Nitro hook
31
- * 4. Triggers `qarpeo:auth:session:create` Nitro hook
32
- * 5. Issues secured session cookie
33
- */
34
- export declare function handleOAuthSuccess({ event, provider, user: rawUser, tokens, }: HandleOAuthSuccessOptions): Promise<QarpeoSession>;
35
- export interface DeleteAccountOptions {
36
- confirm?: boolean;
37
- phrase?: string;
38
- turnstileToken?: string;
39
- cascadeOrg?: boolean;
40
- }
41
- /**
42
- * Permanently deletes a user account and purges all related sessions, OAuth accounts,
43
- * 2FA credentials, WebAuthn authenticators, API tokens, and notification records.
44
- * Throws 400 if user is sole owner of an organization and cascadeOrg is not specified.
45
- */
46
- export declare function deleteUserAccount(event: any, userId: string, options?: DeleteAccountOptions): Promise<{
47
- success: boolean;
48
- userId: string;
49
- }>;
50
- /**
51
- * Evaluates whether Multi-Factor Authentication is required for a user
52
- * based on user 2FA enrollment and global/organization MFA policies.
53
- */
54
- export declare function resolveMfaStatus(d1: any, user: {
55
- id: string;
56
- role?: string;
57
- }, authConfig?: any): Promise<{
58
- mfaRequired: boolean;
59
- mfaVerified: boolean;
60
- }>;
@@ -1,13 +0,0 @@
1
- /**
2
- * Shared in-memory Blob/R2 store for local development and preview mode. Attached to globalThis to
3
- * ensure cross-chunk persistence in Nitro/Vite.
4
- */
5
- export interface DevMockBlobItem {
6
- key: string;
7
- size: number;
8
- contentType: string;
9
- uploaded: string;
10
- data?: Uint8Array;
11
- access?: string;
12
- }
13
- export declare function getDevMockBlobStore(): Map<string, DevMockBlobItem>;
@@ -1,21 +0,0 @@
1
- import type { BotProvider, BotHandlerConfig, BotReplyOptions } from "../../../types";
2
- /** Verifies a Slack signature (v0=...) against the signing secret with timestamp replay protection. */
3
- export declare function verifySlackSignature(signingSecret: string, timestamp: string | number, body: string, signature: string): Promise<boolean>;
4
- /** Verifies a GitHub webhook signature (sha256=...). */
5
- export declare function verifyGitHubSignature(secret: string, body: string, signatureHeader: string): Promise<boolean>;
6
- /** Verifies a Discord Ed25519 signature using native Web Crypto. */
7
- export declare function verifyDiscordSignature(publicKeyHex: string, timestamp: string, body: string, signatureHex: string): Promise<boolean>;
8
- /** Verifies a Telegram secret token against the x-telegram-bot-api-secret-token header. */
9
- export declare function verifyTelegramSecret(secretToken: string, headerToken: string): boolean;
10
- /** Verifies a WhatsApp Cloud API webhook signature (sha256=...). */
11
- export declare function verifyWhatsAppSignature(appSecret: string, body: string, signatureHeader: string): Promise<boolean>;
12
- /** Verifies incoming webhook signature according to provider rules. */
13
- export declare function verifyWebhookSignature(provider: BotProvider, event: any, rawBody: string, secret?: string): Promise<boolean>;
14
- /** Dispatches a message to Telegram using Bot API */
15
- export declare function sendTelegramMessage(botToken: string, chatId: string | number, text: string, options?: BotReplyOptions): Promise<any>;
16
- /** Dispatches a message to Slack via chat.postMessage or response_url */
17
- export declare function sendSlackMessage(target: string, // botToken or response_url
18
- channelOrPayload: string | Record<string, any>, text?: string, options?: BotReplyOptions): Promise<any>;
19
- /** Dispatches a message to WhatsApp via Cloud API */
20
- export declare function sendWhatsAppMessage(accessToken: string, phoneNumberId: string, to: string, text: string): Promise<any>;
21
- export declare function defineBotHandler<TPayload = any>(config: BotHandlerConfig<TPayload>): import("nuxt/server").EventHandler<Promise<any>>;
@@ -1,33 +0,0 @@
1
- /**
2
- * Access Nitro's persistent Edge Cache storage. Connected to Cloudflare KV in production and local
3
- * filesystem (.data/cache) in dev.
4
- */
5
- export declare function useCacheStorage(): any;
6
- /** Parses duration strings like '15m', '1h', '7d' or raw seconds into integer seconds. */
7
- export declare function parseDurationSeconds(duration: string | number): number;
8
- /**
9
- * Invalidate or purge a specific key, prefix, wildcard pattern, or all entries from the edge cache.
10
- *
11
- * @param pattern Optional cache key, route path, or wildcard (e.g. '/api/products/**',
12
- * 'dashboard:*'). If omitted, clears the entire edge cache.
13
- * @returns Array of keys that were purged from storage.
14
- */
15
- export declare function purgeCache(pattern?: string): Promise<string[]>;
16
- /**
17
- * Remember and cache the result of an async computation or database query. If cached and not
18
- * expired, returns the cached value. Otherwise, executes the fetcher, saves to edge cache with TTL,
19
- * and returns the result.
20
- *
21
- * @param key Unique cache key (e.g. 'dashboard:stats')
22
- * @param ttl Time-to-live (e.g. '5m', '1h', or seconds)
23
- * @param fetcher Async function producing the data
24
- */
25
- export declare function rememberCache<T>(key: string, ttl: number | string, fetcher: () => Promise<T>): Promise<T>;
26
- /** Retrieves a typed value from the edge cache if not expired. */
27
- export declare function getCacheItem<T = unknown>(key: string): Promise<T | null>;
28
- /** Stores a typed value in the edge cache with an expiration TTL. */
29
- export declare function setCacheItem<T = unknown>(key: string, value: T, ttl?: number | string): Promise<void>;
30
- /** Removes an item from the edge cache by key. */
31
- export declare function removeCacheItem(key: string): Promise<void>;
32
- /** Checks whether an unexpired key exists in the edge cache. */
33
- export declare function hasCacheItem(key: string): Promise<boolean>;
@@ -1,17 +0,0 @@
1
- import type { CMSEntry } from "../../../types";
2
- import type { getCMSConfig } from "./cms";
3
- type CMSConfig = ReturnType<typeof getCMSConfig>;
4
- type CMSWebhookEvent = "create" | "update" | "delete" | "publish" | "unpublish";
5
- /**
6
- * Fires all configured webhooks for a CMS event (non-blocking). Merges global webhooks with
7
- * per-collection webhooks. Each webhook filtered by its `events` list (default: ["publish",
8
- * "unpublish"]). Signs payload with HMAC-SHA256 if `secret` is configured.
9
- */
10
- export declare function fireCMSWebhooks(config: CMSConfig, collectionId: string, event: CMSWebhookEvent, entry: CMSEntry | Record<string, any>): Promise<void>;
11
- /**
12
- * Fires a deploy hook or GitHub Actions workflow dispatch (non-blocking). Only fires when trigger
13
- * === "on-publish" (default) and event is "publish" or "unpublish". Merges global deploy config
14
- * with per-collection deploy config (collection config wins).
15
- */
16
- export declare function fireCMSDeployTrigger(config: CMSConfig, collectionId: string, event: "publish" | "unpublish"): Promise<void>;
17
- export {};
@@ -1,3 +0,0 @@
1
- /** Checks if a relative file path matches the include / exclude glob filters. */
2
- export declare function matchesSourceFilters(relPath: string, include?: string | string[], exclude?: string | string[]): boolean;
3
- export declare const matchesGlobFilter: typeof matchesSourceFilters;
@@ -1,287 +0,0 @@
1
- import type { CMSComponentDefinition, CMSOptions, CMSEntry, CMSEntryStatus, CMSCollection, CMSCollectionConfig, CMSGitHubConfig, CMSDeployTriggerConfig, CMSApprovalConfig, CMSCreateInput, CMSUpdateInput, CMSQueryOptions, CMSFieldDefinition, CMSHeadingLink, CMSNavigationItem, CMSNavigationOptions, DocsSearchOptions, DocsSearchResponse } from "../../../types";
2
- /** Converts a heading text to a URL-safe slug ID. e.g. "Getting Started" → "getting-started" */
3
- export declare function slugifyHeading(text: string): string;
4
- /**
5
- * Strips number-sort prefixes from path segments used for ordering. e.g. "1.docs" → "docs",
6
- * "01.index" → "index", "2.getting-started" → "getting-started"
7
- */
8
- export declare function stripOrderPrefix(segment: string): string;
9
- /**
10
- * Checks whether a path segment is a route group enclosed in parentheses. e.g. "(overview)" → true,
11
- * "1.(overview)" → true, "01.(setup)" → true, "guide" → false
12
- */
13
- export declare function isGroupSegment(segment: string): boolean;
14
- /**
15
- * Extracts a clean human-readable title from a group segment. e.g. "(overview)" → "Overview",
16
- * "1.(quick-start)" → "Quick Start", "02.(faq)" → "FAQ"
17
- */
18
- export declare function extractGroupTitle(segment: string): string;
19
- /**
20
- * Extracts the numeric order prefix from a directory/file name. e.g. "1.docs" → 1,
21
- * "01.getting-started" → 1, "docs" → undefined
22
- */
23
- export declare function extractOrderPrefix(segment: string): number | undefined;
24
- /**
25
- * Computes a clean URL path from a file path relative to contentDir. Strips numeric order prefixes
26
- * and route groups like `(overview)`. e.g. "1.docs/1.getting-started/(overview)/01.index.md" →
27
- * "/docs/getting-started" "1.docs/1.getting-started/(overview)/02.intro.md" →
28
- * "/docs/getting-started/intro" "1.docs/2.installation.md" → "/docs/installation"
29
- * "blog/hello-world.md" → "/blog/hello-world"
30
- */
31
- export declare function computeEntryPath(filePathRelative: string, collectionId?: string): string;
32
- /**
33
- * Tests whether an entry path matches one or more glob patterns. Supports:
34
- *
35
- * - Glob paths: `"/docs/**"`, `"/blog/*"`
36
- * - Arrays: `["/docs/**", "/guides/**"]`
37
- * - Negative excludes: `"!/docs/internal/**"`
38
- */
39
- export declare function matchPathPatterns(entryPath: string, patterns?: string | string[]): boolean;
40
- /**
41
- * Resolves which collection an entryPath belongs to, checking configured collections' `path`
42
- * patterns first, then falling back to fallbackId.
43
- */
44
- export declare function resolveCollectionForPath(entryPath: string, collectionsConfig?: Record<string, any>, fallbackId?: string): string;
45
- /**
46
- * Extracts a table-of-contents array from raw markdown. Only processes ATX headings (## Foo, ###
47
- * Bar — not h1).
48
- */
49
- export declare function extractTOC(md: string): CMSHeadingLink[];
50
- /** Pre-processes MDC (Markdown Components) syntax to HTML before passing to micromark. */
51
- export declare function preprocessMDC(md: string): string;
52
- export declare function getCMSConfig(event?: any): Omit<Required<CMSOptions>, "github" | "deploy" | "approval" | "exclude" | "webhookSecret"> & {
53
- collections: Record<string, CMSCollectionConfig>;
54
- github?: CMSGitHubConfig;
55
- deploy?: CMSDeployTriggerConfig;
56
- approval?: boolean | CMSApprovalConfig;
57
- exclude?: string | string[];
58
- webhookSecret?: string;
59
- };
60
- /**
61
- * Resolves the effective approval workflow configuration for a collection. Returns null if approval
62
- * is disabled for the collection.
63
- */
64
- export declare function resolveCollectionApproval(collectionConfig?: CMSCollectionConfig, globalApproval?: boolean | CMSApprovalConfig): CMSApprovalConfig | null;
65
- /** Parses markdown to Comark AST document ({ nodes, frontmatter, meta }). */
66
- export declare function parseMarkdownAST(md: string, event?: any): Promise<any>;
67
- /** Parses markdown and renders to both AST and HTML in a single pass. */
68
- export declare function processMarkdown(md: string, event?: any): Promise<{
69
- ast: any;
70
- html: string;
71
- }>;
72
- /** Renders markdown with Comark to HTML string. */
73
- export declare function renderMarkdown(md: string, event?: any): Promise<string>;
74
- /** Renders page markdown with Comark to HTML string. */
75
- export declare function renderPageMarkdown(md: string): Promise<string>;
76
- /**
77
- * Parses a raw markdown file string with YAML frontmatter. Returns `{ data, content }` where `data`
78
- * is the frontmatter key-value map and `content` is the body markdown text.
79
- */
80
- export declare function parseFrontmatter(raw: string): {
81
- data: Record<string, unknown>;
82
- content: string;
83
- };
84
- /** Serialises entry data back to a markdown file with YAML frontmatter. */
85
- export declare function formatFrontmatter(data: Record<string, unknown>, body: string): string;
86
- /**
87
- * Formats a CMSEntry into standard markdown with YAML frontmatter. Omits internal system fields
88
- * starting with `_`.
89
- */
90
- export declare function formatEntryAsMarkdown(entry: CMSEntry | Record<string, any>): string;
91
- export interface GitSyncResult {
92
- filePath?: string;
93
- contentHash?: string;
94
- localFs?: boolean;
95
- github?: {
96
- ok: boolean;
97
- commitSha?: string;
98
- prUrl?: string;
99
- error?: string;
100
- };
101
- }
102
- /**
103
- * Synchronizes a CMS entry modification back to Git / filesystem when mode is 'git-sync'.
104
- *
105
- * - In local dev (Node.js): Writes or deletes the markdown file on local disk and updates D1
106
- * content_hash.
107
- * - In production (or when GitHub repo is configured): Commits directly or opens a PR via GitHub API.
108
- */
109
- export declare function syncEntryToGit(event: any, collectionId: string, entry: CMSEntry | Record<string, any>, action: "create" | "update" | "delete" | "publish"): Promise<GitSyncResult | null>;
110
- /**
111
- * Computes a hex SHA-256 digest of the given text using Web Crypto. Used for deterministic change
112
- * detection in the hybrid sync engine.
113
- */
114
- export declare function computeContentHash(text: string): Promise<string>;
115
- /** Resolves the active tenant ID for CMS scoping from the current event context. */
116
- export declare function getCMSTenantId(event: any): string | null;
117
- /** Returns the tenant key prefix (e.g. 'tenant_123:') for namespacing KV caches. */
118
- export declare function getCMSTenantPrefix(event: any): string;
119
- /** Returns a single collection by ID. Reads from KV (TTL 5 min) with D1 fallback. */
120
- export declare function getCMSCollection(event: any, collectionId: string): Promise<CMSCollection | null>;
121
- /** Lists all collections from D1. */
122
- export declare function listCMSCollections(event: any): Promise<CMSCollection[]>;
123
- /** Creates a new collection in D1 (from CMS Admin, source: 'db'). */
124
- export declare function createCMSCollection(event: any, data: {
125
- id: string;
126
- name: string;
127
- description?: string;
128
- fields?: Record<string, CMSFieldDefinition>;
129
- }): Promise<CMSCollection>;
130
- /** Updates a collection schema in D1. Invalidates KV cache. */
131
- export declare function updateCMSCollection(event: any, id: string, data: {
132
- name?: string;
133
- description?: string;
134
- fields?: Record<string, CMSFieldDefinition>;
135
- }): Promise<void>;
136
- /** Deletes a collection from D1. Only source: 'db' collections can be deleted. Invalidates KV cache. */
137
- export declare function deleteCMSCollection(event: any, id: string): Promise<void>;
138
- /**
139
- * Resolves the effective field definitions for a collection, merging config-seeded fields with any
140
- * schema stored in D1 (DB-created collections take precedence for overlapping keys).
141
- */
142
- export declare function getCollectionFields(event: any, collectionId: string): Promise<Record<string, CMSFieldDefinition>>;
143
- /**
144
- * Returns a typed component definition from the CMS config by name, or null if not found.
145
- * @public
146
- */
147
- export declare function defineCMSComponent(def: CMSComponentDefinition): CMSComponentDefinition;
148
- /**
149
- * Resolves a stored reference object into the full referenced {@link CMSEntry}. Used to populate
150
- * references on read.
151
- */
152
- export declare function resolveReference(event: any, ref: {
153
- id?: string;
154
- collectionId?: string;
155
- slug?: string;
156
- }): Promise<CMSEntry | null>;
157
- export declare function invalidateCMSEntryCache(event: any, collectionId: string, slug?: string): Promise<void>;
158
- /**
159
- * Verifies an incoming GitHub webhook HMAC-SHA256 signature (`X-Hub-Signature-256`)
160
- * using Web Crypto subtle API in constant time.
161
- */
162
- export declare function verifyGitHubSignature(rawBody: string, signatureHeader: string | null | undefined, secret: string): Promise<boolean>;
163
- /** Queries entries for a collection with filtering, pagination, and sorting. */
164
- export declare function queryCMSEntries(event: any, collectionId: string, opts?: CMSQueryOptions): Promise<{
165
- entries: CMSEntry[];
166
- total: number;
167
- page: number;
168
- limit: number;
169
- }>;
170
- /**
171
- * Fetches a single entry by slug or ID. Supports draft preview via authenticated session or HMAC
172
- * preview token.
173
- */
174
- export declare function getCMSEntry(event: any, collectionId: string, slugOrId: string, opts?: {
175
- preview?: boolean;
176
- previewToken?: string;
177
- previewExpires?: string;
178
- populate?: boolean | string[];
179
- }): Promise<CMSEntry | null>;
180
- /** Creates a new entry in D1. Renders contentHtml from contentMd on write. */
181
- export declare function createCMSEntry(event: any, collectionId: string, data: CMSCreateInput): Promise<CMSEntry>;
182
- /**
183
- * Updates an existing entry. Re-renders contentHtml if contentMd changed. Saves a revision and
184
- * prunes beyond max.
185
- */
186
- export declare function updateCMSEntry(event: any, entryId: string, data: CMSUpdateInput): Promise<CMSEntry>;
187
- /** Deletes an entry and all its revisions. */
188
- export declare function deleteCMSEntry(event: any, entryId: string): Promise<void>;
189
- /**
190
- * Toggles entry status between `draft`, `pending_review`, `scheduled`, `published`, or `archived`.
191
- * Validates approval policies if approval workflow is enabled for the collection.
192
- */
193
- export declare function publishCMSEntry(event: any, entryId: string, targetStatus: CMSEntryStatus, targetPublishedAt?: number | null): Promise<void>;
194
- /**
195
- * Scans for entries with status = 'scheduled' and published_at <= Date.now(). Transitions them to
196
- * 'published' and triggers git-sync, webhooks, and deploy hooks. Returns the list of entries
197
- * published.
198
- */
199
- export declare function publishDueScheduledEntries(event?: any): Promise<CMSEntry[]>;
200
- /** Submits an entry for editorial review (transitions status from draft to pending_review). */
201
- export declare function submitCMSEntryForReview(event: any, entryId: string, note?: string): Promise<CMSEntry>;
202
- /** Rejects a pending review entry and reverts its status back to draft with reviewer feedback. */
203
- export declare function rejectCMSEntryReview(event: any, entryId: string, reason?: string): Promise<CMSEntry>;
204
- export declare function pruneRevisions(event: any, entryId: string, max: number): Promise<void>;
205
- /** Generates a 24-hour (or custom TTL) HMAC-SHA256 preview token for a draft entry. */
206
- export declare function generatePreviewToken(event: any, collection: string, slugOrId: string, ttlMs?: number): Promise<{
207
- token: string;
208
- expires: number;
209
- }>;
210
- /**
211
- * Verifies an HMAC-SHA256 preview token.
212
- * Tests against both `slugOrId` and alternate identifier (id vs slug) if available in D1.
213
- */
214
- export declare function verifyPreviewToken(event: any, collection: string, slugOrId: string, token: string, expiresStr: string | number): Promise<boolean>;
215
- export declare function ensureCMSTables(event?: any): Promise<void>;
216
- export declare function ensureCMSSynced(event?: any): Promise<void>;
217
- /**
218
- * Seeds config-defined collections into _qarpeo_cms_collections.
219
- *
220
- * - Source: 'config' rows are upserted when the config schema changes.
221
- * - Source: 'db' rows (created from CMS Admin) are never touched.
222
- */
223
- export declare function seedCollectionsFromConfig(event: any, collectionsConfig: Record<string, CMSCollectionConfig>): Promise<void>;
224
- /**
225
- * Seeds or updates pre-scanned content entries into D1 database.
226
- * Used by both build-time manifest auto-restore and dev-mode local file sync.
227
- */
228
- export declare function seedEntriesIntoDb(event: any, entries: any[], collectionsConfig?: Record<string, CMSCollectionConfig>): Promise<{
229
- synced: number;
230
- skipped: number;
231
- inserted: number;
232
- }>;
233
- /**
234
- * Scans local markdown files in contentDir and seeds them into D1. Auto-discovers collection
235
- * folders (e.g. content/posts/ -> 'posts' collection). For "page" type collections, recursively
236
- * scans nested directories, reads .navigation.yml files for nav metadata, computes URL paths, and
237
- * extracts TOC from headings. Uses SHA-256 content hashing to detect real changes (immune to
238
- * timestamp drift). source: 'db' entries created by editors are never overwritten.
239
- */
240
- import { matchesSourceFilters, matchesGlobFilter } from "./cms-filter";
241
- export { matchesSourceFilters, matchesGlobFilter };
242
- export declare function syncLocalContentFiles(event: any, contentDir: string, collectionsConfig?: Record<string, CMSCollectionConfig>, sources?: any[]): Promise<{
243
- synced: number;
244
- skipped: number;
245
- inserted: number;
246
- }>;
247
- /**
248
- * Fetches a single "page" collection entry by its computed URL path. e.g. path =
249
- * "/docs/getting-started". Supports draft preview via editor session, HMAC preview token,
250
- * or preview cookie.
251
- */
252
- export declare function getCMSEntryByPath(event: any, collectionId: string, path: string, locale?: string, options?: {
253
- preview?: boolean;
254
- previewToken?: string;
255
- previewExpires?: string | number;
256
- }): Promise<CMSEntry | null>;
257
- /**
258
- * Returns [prev, next] entries surrounding the given path, sorted by `order` ASC. Fields can be
259
- * restricted to a subset (e.g. ["description"]).
260
- */
261
- export declare function getCMSEntrySurroundings(event: any, collectionId: string, path: string, fields?: string[]): Promise<[CMSEntry | null, CMSEntry | null]>;
262
- /**
263
- * Builds a recursive navigation tree for a "page" collection from D1 entries. Uses the `path`,
264
- * `order`, `navigation` metadata stored at sync time. Returns an array compatible with @nuxt/ui's
265
- * <UContentNavigation>.
266
- */
267
- export declare function getCMSNavigationTree(event: any, collectionId: string, options?: CMSNavigationOptions): Promise<CMSNavigationItem[]>;
268
- /**
269
- * Sanitizes and formats an input search query for SQLite FTS5 MATCH expressions.
270
- * Strips special operator characters that would otherwise trigger FTS5 syntax errors,
271
- * cleans whitespace, and formats tokens with prefix matching ("token"*).
272
- */
273
- export declare function buildFtsQuery(query: string, operator?: "AND" | "OR"): string;
274
- /**
275
- * Rebuilds the FTS5 virtual table from current `_qarpeo_cms_entries` records.
276
- * Can be used after schema migrations or to re-index all content.
277
- */
278
- export declare function rebuildCMSFTS(event?: any): Promise<{
279
- total: number;
280
- }>;
281
- /**
282
- * High-performance edge search engine for documentation content.
283
- * Queries the SQLite FTS5 full-text index with automatic fallback to LIKE search,
284
- * splits markdown documents into heading-anchored sections, scores matches,
285
- * and extracts highlighted context excerpts.
286
- */
287
- export declare function searchDocs(event: any, options?: DocsSearchOptions): Promise<DocsSearchResponse>;