qarpeo 0.4.13 → 0.4.15

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 (304) hide show
  1. package/README.md +197 -191
  2. package/dist/apps/cms.d.ts +1 -1
  3. package/dist/apps/comments.d.ts +1 -1
  4. package/dist/apps/payments.d.ts +1 -1
  5. package/dist/apps/store.d.ts +1 -1
  6. package/dist/chunks/{manifest.get.mjs → tools.mjs} +445 -430
  7. package/dist/cli/index.mjs +756 -746
  8. package/dist/core/aliases.d.ts +1 -1
  9. package/dist/core/context.d.ts +1 -1
  10. package/dist/core/d1-migrate.d.ts +1 -1
  11. package/dist/core/devtools.d.ts +1 -1
  12. package/dist/core/nitro.d.ts +1 -1
  13. package/dist/core/schema.d.ts +1 -1
  14. package/dist/core/server-utils.d.ts +1 -1
  15. package/dist/core/wrangler.d.ts +1 -1
  16. package/dist/fate/index.d.ts +8 -8
  17. package/dist/fate/index.mjs +3 -1
  18. package/dist/features/agents.d.ts +1 -1
  19. package/dist/features/auth.d.ts +1 -1
  20. package/dist/features/bots.d.ts +1 -1
  21. package/dist/features/console.d.ts +1 -1
  22. package/dist/features/fate.d.ts +1 -1
  23. package/dist/features/mail.d.ts +1 -1
  24. package/dist/features/mcp.d.ts +1 -1
  25. package/dist/features/multitenant.d.ts +1 -1
  26. package/dist/features/notifications.d.ts +1 -1
  27. package/dist/features/realtime.d.ts +1 -1
  28. package/dist/features/studio.d.ts +4 -0
  29. package/dist/module.d.ts +1 -1
  30. package/dist/module.mjs +5451 -5249
  31. package/dist/primitives/ai.d.ts +1 -1
  32. package/dist/primitives/analytics.d.ts +1 -1
  33. package/dist/primitives/blob.d.ts +1 -1
  34. package/dist/primitives/browser.d.ts +1 -1
  35. package/dist/primitives/cache.d.ts +1 -1
  36. package/dist/primitives/d1.d.ts +1 -1
  37. package/dist/primitives/do.d.ts +1 -1
  38. package/dist/primitives/email.d.ts +1 -1
  39. package/dist/primitives/hyperdrive.d.ts +1 -1
  40. package/dist/primitives/kv.d.ts +1 -1
  41. package/dist/primitives/queue.d.ts +1 -1
  42. package/dist/primitives/ratelimit.d.ts +1 -1
  43. package/dist/primitives/vectorize.d.ts +1 -1
  44. package/dist/primitives/workflows.d.ts +1 -1
  45. package/dist/runtime/ai.mjs +4 -1
  46. package/dist/runtime/app/components/CMSEditor.vue +439 -0
  47. package/dist/runtime/app/components/CMSEditorImageNode.vue +90 -0
  48. package/dist/runtime/app/components/CMSEditorLinkPopover.vue +120 -0
  49. package/dist/runtime/app/components/QDropZone.vue +327 -0
  50. package/dist/runtime/app/components/QImageCropper.vue +658 -0
  51. package/dist/runtime/app/components/QImageStudio.vue +300 -0
  52. package/dist/runtime/app/components/QImg.vue +7 -4
  53. package/dist/runtime/app/composables/analytics.d.ts +8 -8
  54. package/dist/runtime/app/composables/api-tokens.d.ts +5 -5
  55. package/dist/runtime/app/composables/auth.d.ts +23 -19
  56. package/dist/runtime/app/composables/chat.d.ts +7 -6
  57. package/dist/runtime/app/composables/cms-preview.d.ts +7 -8
  58. package/dist/runtime/app/composables/cms.d.ts +6 -6
  59. package/dist/runtime/app/composables/comments.d.ts +5 -5
  60. package/dist/runtime/app/composables/comments.mjs +7 -4
  61. package/dist/runtime/app/composables/console.d.ts +6 -14
  62. package/dist/runtime/app/composables/docs-version.d.ts +8 -8
  63. package/dist/runtime/app/composables/impersonation.d.ts +5 -5
  64. package/dist/runtime/app/composables/organization.d.ts +5 -5
  65. package/dist/runtime/app/composables/passkey.d.ts +5 -5
  66. package/dist/runtime/app/composables/passwordless.d.ts +5 -5
  67. package/dist/runtime/app/composables/payments.d.ts +5 -5
  68. package/dist/runtime/app/composables/rbac.d.ts +5 -5
  69. package/dist/runtime/app/composables/site.d.ts +2 -2
  70. package/dist/runtime/app/composables/sse.d.ts +20 -33
  71. package/dist/runtime/app/composables/sse.mjs +6 -3
  72. package/dist/runtime/app/composables/storage.d.ts +6 -8
  73. package/dist/runtime/app/composables/store.d.ts +52 -36
  74. package/dist/runtime/app/composables/store.mjs +70 -11
  75. package/dist/runtime/app/composables/studio.d.ts +59 -0
  76. package/dist/runtime/app/composables/studio.mjs +129 -0
  77. package/dist/runtime/app/composables/tenant.d.ts +7 -7
  78. package/dist/runtime/app/composables/turnstile.d.ts +5 -5
  79. package/dist/runtime/app/composables/two-factor.d.ts +5 -5
  80. package/dist/runtime/app/pages/devtools/notifications.vue +1 -6
  81. package/dist/runtime/app/plugins/pwa.mjs +1 -3
  82. package/dist/runtime/app/utils/cms-editor.d.ts +25 -0
  83. package/dist/runtime/app/utils/cms-editor.mjs +43 -0
  84. package/dist/runtime/auth.d.ts +9 -9
  85. package/dist/runtime/blob.d.ts +1 -3
  86. package/dist/runtime/blob.mjs +3 -1
  87. package/dist/runtime/cache.d.ts +8 -6
  88. package/dist/runtime/cache.mjs +8 -11
  89. package/dist/runtime/db.d.ts +4 -3
  90. package/dist/runtime/drizzle.d.ts +2 -1
  91. package/dist/runtime/drizzle.mjs +2 -2
  92. package/dist/runtime/queue.d.ts +1 -0
  93. package/dist/runtime/replica.d.ts +6 -10
  94. package/dist/runtime/replica.mjs +3 -1
  95. package/dist/runtime/schema-mysql.d.ts +16 -32
  96. package/dist/runtime/schema-pg.d.ts +15 -31
  97. package/dist/runtime/schema-shared.d.ts +20 -17
  98. package/dist/runtime/schema.d.ts +21 -33
  99. package/dist/runtime/server/durable-objects/agent.mjs +4 -1
  100. package/dist/runtime/server/durable-objects/room.d.ts +4 -6
  101. package/dist/runtime/server/durable-objects/room.mjs +18 -8
  102. package/dist/runtime/server/plugins/comments.d.ts +2 -3
  103. package/dist/runtime/server/plugins/email-inbound.d.ts +1 -3
  104. package/dist/runtime/server/plugins/store.d.ts +2 -3
  105. package/dist/runtime/server/routes/__qarpeo/cloud/agents/run.post.d.ts +2 -2
  106. package/dist/runtime/server/routes/__qarpeo/cloud/cms/entry.get.mjs +10 -2
  107. package/dist/runtime/server/routes/__qarpeo/cloud/cms/entry.post.d.ts +2 -2
  108. package/dist/runtime/server/routes/__qarpeo/cloud/cms/entry.post.mjs +10 -2
  109. package/dist/runtime/server/routes/__qarpeo/cloud/cms.get.d.ts +2 -2
  110. package/dist/runtime/server/routes/__qarpeo/cloud/cms.get.mjs +7 -1
  111. package/dist/runtime/server/routes/__qarpeo/cloud/comments/moderate.post.d.ts +2 -2
  112. package/dist/runtime/server/routes/__qarpeo/cloud/comments/moderate.post.mjs +5 -1
  113. package/dist/runtime/server/routes/__qarpeo/cloud/comments.get.d.ts +1 -3
  114. package/dist/runtime/server/routes/__qarpeo/cloud/extras.get.d.ts +2 -2
  115. package/dist/runtime/server/routes/__qarpeo/cloud/extras.get.mjs +15 -4
  116. package/dist/runtime/server/routes/__qarpeo/cloud/mail/unsuppress.post.d.ts +2 -2
  117. package/dist/runtime/server/routes/__qarpeo/cloud/migrate/cms.post.mjs +13 -4
  118. package/dist/runtime/server/routes/__qarpeo/cloud/migrate/products.post.mjs +1 -1
  119. package/dist/runtime/server/routes/__qarpeo/cloud/migrate.post.d.ts +3 -3
  120. package/dist/runtime/server/routes/__qarpeo/cloud/migrate.post.mjs +22 -6
  121. package/dist/runtime/server/routes/__qarpeo/cloud/notifications/test.post.d.ts +2 -2
  122. package/dist/runtime/server/routes/__qarpeo/cloud/operations.get.d.ts +6 -5
  123. package/dist/runtime/server/routes/__qarpeo/cloud/store/order-status.post.d.ts +1 -3
  124. package/dist/runtime/server/routes/__qarpeo/cloud/store/order-status.post.mjs +14 -2
  125. package/dist/runtime/server/routes/__qarpeo/cloud/store/orders.get.d.ts +1 -3
  126. package/dist/runtime/server/routes/__qarpeo/cloud/store/orders.get.mjs +7 -1
  127. package/dist/runtime/server/routes/__qarpeo/cloud/store/products.get.d.ts +1 -3
  128. package/dist/runtime/server/routes/__qarpeo/cloud/tasks/run.post.d.ts +2 -2
  129. package/dist/runtime/server/routes/__qarpeo/cloud/users/action.post.d.ts +2 -2
  130. package/dist/runtime/server/routes/__qarpeo/cloud/users/action.post.mjs +5 -1
  131. package/dist/runtime/server/routes/__qarpeo/cloud/users.get.d.ts +6 -5
  132. package/dist/runtime/server/routes/__qarpeo/cloud/users.get.mjs +1 -3
  133. package/dist/runtime/server/routes/__qarpeo/mail/track/click/[id].get.mjs +2 -2
  134. package/dist/runtime/server/routes/__qarpeo/manifest.get.d.ts +2 -2
  135. package/dist/runtime/server/routes/__qarpeo/og.get.d.ts +2 -2
  136. package/dist/runtime/server/routes/__qarpeo/rbac/me.get.d.ts +2 -2
  137. package/dist/runtime/server/routes/__qarpeo/rbac/roles.delete.d.ts +2 -2
  138. package/dist/runtime/server/routes/__qarpeo/rbac/roles.delete.mjs +5 -1
  139. package/dist/runtime/server/routes/__qarpeo/rbac/roles.get.d.ts +2 -2
  140. package/dist/runtime/server/routes/__qarpeo/rbac/roles.get.mjs +1 -5
  141. package/dist/runtime/server/routes/__qarpeo/rbac/roles.post.d.ts +2 -2
  142. package/dist/runtime/server/routes/__qarpeo/rbac/roles.post.mjs +5 -1
  143. package/dist/runtime/server/routes/__qarpeo/rbac/users.post.d.ts +2 -2
  144. package/dist/runtime/server/routes/agents/[agent]/chat.post.mjs +1 -6
  145. package/dist/runtime/server/routes/agents/[agent]/clear.post.mjs +1 -6
  146. package/dist/runtime/server/routes/agents/[agent]/history.get.mjs +1 -6
  147. package/dist/runtime/server/routes/auth/2fa/disable.post.mjs +5 -1
  148. package/dist/runtime/server/routes/auth/2fa/verify.post.mjs +7 -1
  149. package/dist/runtime/server/routes/auth/magic-link/send.post.mjs +1 -1
  150. package/dist/runtime/server/routes/auth/otp/send.post.mjs +1 -1
  151. package/dist/runtime/server/routes/cms/search.get.mjs +2 -6
  152. package/dist/runtime/server/routes/comments/[id]/report.post.mjs +1 -4
  153. package/dist/runtime/server/routes/comments/[id].patch.mjs +1 -4
  154. package/dist/runtime/server/routes/comments/batch.post.mjs +1 -3
  155. package/dist/runtime/server/routes/comments/index.post.mjs +1 -5
  156. package/dist/runtime/server/routes/fate.mjs +1 -1
  157. package/dist/runtime/server/routes/mail/webhooks.post.mjs +1 -1
  158. package/dist/runtime/server/routes/sitemap.xml.get.mjs +2 -1
  159. package/dist/runtime/server/routes/storage/presigned-r2.post.d.ts +5 -6
  160. package/dist/runtime/server/routes/storage/presigned-r2.post.mjs +1 -1
  161. package/dist/runtime/server/routes/store/cart/items/[id].delete.mjs +1 -1
  162. package/dist/runtime/server/routes/store/cart/items/[id].patch.mjs +1 -1
  163. package/dist/runtime/server/routes/store/currencies.get.mjs +1 -4
  164. package/dist/runtime/server/routes/store/orders/[id].get.mjs +1 -1
  165. package/dist/runtime/server/routes/store/orders/download/[token].get.mjs +13 -4
  166. package/dist/runtime/server/routes/store/orders/index.get.mjs +1 -1
  167. package/dist/runtime/server/routes/store/products/index.get.mjs +2 -0
  168. package/dist/runtime/server/routes/store/tax/calculate.post.d.ts +2 -1
  169. package/dist/runtime/server/routes/store/tax/calculate.post.mjs +12 -3
  170. package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/index.delete.mjs +4 -1
  171. package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/verify.post.mjs +4 -1
  172. package/dist/runtime/server/utils/ai.d.ts +38 -35
  173. package/dist/runtime/server/utils/ai.mjs +7 -11
  174. package/dist/runtime/server/utils/analytics-query.d.ts +4 -4
  175. package/dist/runtime/server/utils/auth.d.ts +25 -25
  176. package/dist/runtime/server/utils/auth.mjs +22 -8
  177. package/dist/runtime/server/utils/bots.d.ts +7 -7
  178. package/dist/runtime/server/utils/browser-utils.d.ts +26 -27
  179. package/dist/runtime/server/utils/cache.d.ts +20 -20
  180. package/dist/runtime/server/utils/cms/collections.mjs +1 -6
  181. package/dist/runtime/server/utils/cms/common.mjs +1 -0
  182. package/dist/runtime/server/utils/cms/markdown.d.ts +2 -2
  183. package/dist/runtime/server/utils/cms/markdown.mjs +5 -5
  184. package/dist/runtime/server/utils/cms/mutations.mjs +8 -23
  185. package/dist/runtime/server/utils/cms/navigation.mjs +4 -4
  186. package/dist/runtime/server/utils/cms/path.d.ts +1 -0
  187. package/dist/runtime/server/utils/cms/path.mjs +8 -2
  188. package/dist/runtime/server/utils/cms/references.mjs +1 -7
  189. package/dist/runtime/server/utils/cms/search.d.ts +2 -2
  190. package/dist/runtime/server/utils/cms/sync.mjs +4 -2
  191. package/dist/runtime/server/utils/cms/taxonomy.d.ts +2 -2
  192. package/dist/runtime/server/utils/cms.d.ts +1 -1
  193. package/dist/runtime/server/utils/cms.mjs +1 -5
  194. package/dist/runtime/server/utils/comments-filter.d.ts +9 -7
  195. package/dist/runtime/server/utils/comments.d.ts +68 -55
  196. package/dist/runtime/server/utils/comments.mjs +21 -9
  197. package/dist/runtime/server/utils/config.d.ts +2 -2
  198. package/dist/runtime/server/utils/console.d.ts +3 -5
  199. package/dist/runtime/server/utils/context.d.ts +10 -10
  200. package/dist/runtime/server/utils/crypto.d.ts +20 -20
  201. package/dist/runtime/server/utils/domains.mjs +3 -1
  202. package/dist/runtime/server/utils/drizzle.d.ts +24 -25
  203. package/dist/runtime/server/utils/drizzle.mjs +17 -17
  204. package/dist/runtime/server/utils/durable-object.d.ts +27 -25
  205. package/dist/runtime/server/utils/durable-object.mjs +3 -10
  206. package/dist/runtime/server/utils/email-inbound.d.ts +10 -10
  207. package/dist/runtime/server/utils/impersonation.d.ts +18 -18
  208. package/dist/runtime/server/utils/legacy-hash.d.ts +23 -27
  209. package/dist/runtime/server/utils/lock.d.ts +20 -23
  210. package/dist/runtime/server/utils/mail.d.ts +19 -19
  211. package/dist/runtime/server/utils/mail.mjs +4 -2
  212. package/dist/runtime/server/utils/mcp.d.ts +20 -20
  213. package/dist/runtime/server/utils/mcp.mjs +22 -38
  214. package/dist/runtime/server/utils/notifications.d.ts +49 -38
  215. package/dist/runtime/server/utils/oauth.d.ts +3 -9
  216. package/dist/runtime/server/utils/organization.d.ts +28 -28
  217. package/dist/runtime/server/utils/organization.mjs +15 -5
  218. package/dist/runtime/server/utils/passwordless.d.ts +24 -24
  219. package/dist/runtime/server/utils/payments/checkout.d.ts +12 -12
  220. package/dist/runtime/server/utils/payments/checkout.mjs +1 -3
  221. package/dist/runtime/server/utils/payments/common.d.ts +3 -3
  222. package/dist/runtime/server/utils/payments/paddle.d.ts +4 -1
  223. package/dist/runtime/server/utils/payments/polar.d.ts +4 -1
  224. package/dist/runtime/server/utils/payments/stripe.mjs +5 -7
  225. package/dist/runtime/server/utils/payments/subscriptions.d.ts +14 -14
  226. package/dist/runtime/server/utils/payments/subscriptions.mjs +2 -6
  227. package/dist/runtime/server/utils/payments/usage.mjs +1 -3
  228. package/dist/runtime/server/utils/payments/webhooks.mjs +2 -2
  229. package/dist/runtime/server/utils/queue.d.ts +54 -58
  230. package/dist/runtime/server/utils/queue.mjs +2 -6
  231. package/dist/runtime/server/utils/rag.d.ts +23 -23
  232. package/dist/runtime/server/utils/rag.mjs +10 -5
  233. package/dist/runtime/server/utils/ratelimit.d.ts +21 -18
  234. package/dist/runtime/server/utils/rbac.d.ts +13 -15
  235. package/dist/runtime/server/utils/rbac.mjs +44 -10
  236. package/dist/runtime/server/utils/realtime.d.ts +53 -52
  237. package/dist/runtime/server/utils/role-env.d.ts +5 -4
  238. package/dist/runtime/server/utils/scheduled-task.d.ts +14 -15
  239. package/dist/runtime/server/utils/session.d.ts +40 -40
  240. package/dist/runtime/server/utils/sse.d.ts +23 -33
  241. package/dist/runtime/server/utils/sse.mjs +5 -14
  242. package/dist/runtime/server/utils/sso.mjs +3 -1
  243. package/dist/runtime/server/utils/storage.d.ts +20 -22
  244. package/dist/runtime/server/utils/storage.mjs +2 -2
  245. package/dist/runtime/server/utils/store/cart.d.ts +5 -3
  246. package/dist/runtime/server/utils/store/cart.mjs +14 -10
  247. package/dist/runtime/server/utils/store/checkout.mjs +4 -1
  248. package/dist/runtime/server/utils/store/common.d.ts +1 -1
  249. package/dist/runtime/server/utils/store/common.mjs +36 -12
  250. package/dist/runtime/server/utils/store/inventory.mjs +3 -1
  251. package/dist/runtime/server/utils/store/orders.mjs +32 -24
  252. package/dist/runtime/server/utils/store/vendor.d.ts +11 -1
  253. package/dist/runtime/server/utils/store/vendor.mjs +47 -0
  254. package/dist/runtime/server/utils/store-localization.d.ts +9 -27
  255. package/dist/runtime/server/utils/store-localization.mjs +3 -3
  256. package/dist/runtime/server/utils/table-names.d.ts +15 -15
  257. package/dist/runtime/server/utils/table-names.mjs +1 -1
  258. package/dist/runtime/server/utils/tenant.d.ts +12 -12
  259. package/dist/runtime/server/utils/tenant.mjs +7 -4
  260. package/dist/runtime/server/utils/totp.d.ts +18 -18
  261. package/dist/runtime/server/utils/tracker.d.ts +5 -5
  262. package/dist/runtime/server/utils/turnstile.d.ts +9 -9
  263. package/dist/runtime/server/utils/urn.d.ts +5 -8
  264. package/dist/runtime/server/utils/workflows.d.ts +30 -31
  265. package/dist/runtime/server/utils/workflows.mjs +2 -4
  266. package/dist/runtime/server.d.ts +2 -2
  267. package/dist/runtime/service.d.ts +10 -10
  268. package/dist/runtime/test-utils.d.ts +10 -10
  269. package/dist/runtime/test-utils.mjs +9 -2
  270. package/dist/runtime/types/ai.d.ts +14 -14
  271. package/dist/runtime/types/d1.d.ts +6 -11
  272. package/dist/runtime/types/durable-object.d.ts +4 -8
  273. package/dist/runtime/types/email.d.ts +3 -9
  274. package/dist/runtime/types/index.d.ts +15 -21
  275. package/dist/runtime/types/r2.d.ts +5 -5
  276. package/dist/runtime/types/store.d.ts +7 -0
  277. package/dist/runtime/types/workflows.d.ts +5 -6
  278. package/dist/runtime/workflows.d.ts +1 -3
  279. package/dist/types/ai.d.ts +10 -17
  280. package/dist/types/auth.d.ts +5 -3
  281. package/dist/types/cache.d.ts +7 -7
  282. package/dist/types/cms.d.ts +30 -5
  283. package/dist/types/comments.d.ts +23 -21
  284. package/dist/types/console.d.ts +1 -3
  285. package/dist/types/db.d.ts +7 -7
  286. package/dist/types/index.d.ts +1 -0
  287. package/dist/types/options.d.ts +36 -24
  288. package/dist/types/site.d.ts +8 -2
  289. package/dist/types/storage.d.ts +2 -1
  290. package/dist/types/store-options.d.ts +31 -26
  291. package/dist/types/studio.d.ts +79 -0
  292. package/dist/utils/bots.d.ts +7 -3
  293. package/dist/utils/cms-table-names.d.ts +1 -1
  294. package/dist/utils/drizzle.d.ts +13 -14
  295. package/dist/utils/email-inbound.d.ts +4 -4
  296. package/dist/utils/features.d.ts +19 -5
  297. package/dist/utils/mcp.d.ts +1 -0
  298. package/dist/utils/migration-lock.d.ts +15 -29
  299. package/dist/utils/overridable-routes.d.ts +12 -0
  300. package/dist/utils/pkg.d.ts +6 -7
  301. package/dist/utils/schema-diff.d.ts +7 -11
  302. package/dist/utils/store-schema.d.ts +4 -6
  303. package/dist/utils/tools.d.ts +3 -3
  304. package/package.json +55 -5
@@ -7,80 +7,68 @@
7
7
  * multi-tenancy (`sqltenantid`), and type helpers (`SelectFrom`, `InsertInto`).
8
8
  *
9
9
  * @example
10
- * ```ts [db/d1/schema/posts.ts]
11
- * import { sqlTable, sqlid, sqltimestamps, text, int } from "qarpeo/schema"
10
+ * ```ts [db/d1/schema/posts.ts]
11
+ * import { sqlTable, sqlid, sqltimestamps, text, int } from "qarpeo/schema"
12
12
  *
13
- * export const posts = sqlTable("posts", {
13
+ * export const posts = sqlTable("posts", {
14
14
  * ...sqlid,
15
15
  * title: text().notNull(),
16
16
  * views: int().notNull().default(0),
17
17
  * ...sqltimestamps,
18
- * })
19
- * ```
18
+ * })
19
+ * ```
20
20
  */
21
21
  export * from "drizzle-orm/sqlite-core";
22
22
  export * from "drizzle-orm";
23
23
  export type { SelectedFields, SelectedFieldsFlat, SelectedFieldsOrdered, TableConfig, } from "drizzle-orm/sqlite-core";
24
24
  export * from "./schema-shared";
25
25
  /**
26
- * Drizzle table factory with automatic `camelCase` → `snake_case` column name mapping.
27
- * Equivalent to `sqliteTable` but all JS column keys are automatically stored with underscore names.
26
+ * Drizzle table factory with automatic `camelCase` → `snake_case` column name mapping. Equivalent
27
+ * to `sqliteTable` but all JS column keys are automatically stored with underscore names.
28
28
  *
29
29
  * @example
30
- * ```ts
31
- * // createdAt → created_at in SQL
32
- * export const posts = sqlTable("posts", { ...sqlid, createdAt: integer().notNull() })
33
- * ```
30
+ * ```ts
31
+ * // createdAt → created_at in SQL
32
+ * export const posts = sqlTable("posts", { ...sqlid, createdAt: integer().notNull() })
33
+ * ```
34
34
  */
35
35
  export declare const sqlTable: import("drizzle-orm/sqlite-core").SQLiteTableFn<undefined>;
36
36
  /**
37
- * **Recommended primary key** — UUID v7 text column, auto-generated at insert time.
38
- * Time-ordered so rows always sort chronologically by id.
37
+ * **Recommended primary key** — UUID v7 text column, auto-generated at insert time. Time-ordered so
38
+ * rows always sort chronologically by id.
39
39
  */
40
40
  export declare const sqlid: {
41
41
  readonly id: import("drizzle-orm").HasRuntimeDefault<import("drizzle-orm").HasDefault<import("drizzle-orm").IsPrimaryKey<import("drizzle-orm/sqlite-core").SQLiteTextBuilder<[string, ...string[]]>>>>;
42
42
  };
43
43
  /**
44
- * UUID v4 primary key — `crypto.randomUUID()`, fully random.
45
- * For new tables, prefer `sqlid` (UUID v7).
44
+ * UUID v4 primary key — `crypto.randomUUID()`, fully random. For new tables, prefer `sqlid` (UUID
45
+ * v7).
46
46
  */
47
47
  export declare const sqluuid: {
48
48
  readonly id: import("drizzle-orm").HasRuntimeDefault<import("drizzle-orm").HasDefault<import("drizzle-orm").IsPrimaryKey<import("drizzle-orm/sqlite-core").SQLiteTextBuilder<[string, ...string[]]>>>>;
49
49
  };
50
- /**
51
- * Auto-increment integer primary key.
52
- */
50
+ /** Auto-increment integer primary key. */
53
51
  export declare const sqlint: {
54
52
  readonly id: import("drizzle-orm").IsPrimaryKey<import("drizzle-orm").HasDefault<import("drizzle-orm").NotNull<import("drizzle-orm/sqlite-core").SQLiteIntegerBuilder>>>;
55
53
  };
56
- /**
57
- * `createdAt` + `updatedAt` timestamp columns with automatic defaults (Unix epoch ms).
58
- */
54
+ /** `createdAt` + `updatedAt` timestamp columns with automatic defaults (Unix epoch ms). */
59
55
  export declare const sqltimestamps: {
60
56
  readonly createdAt: import("drizzle-orm").HasRuntimeDefault<import("drizzle-orm").HasDefault<import("drizzle-orm").NotNull<import("drizzle-orm/sqlite-core").SQLiteTimestampBuilder>>>;
61
57
  readonly updatedAt: import("drizzle-orm").HasDefault<import("drizzle-orm").HasRuntimeDefault<import("drizzle-orm").HasDefault<import("drizzle-orm").NotNull<import("drizzle-orm/sqlite-core").SQLiteTimestampBuilder>>>>;
62
58
  };
63
- /**
64
- * Just `createdAt` — set once at insert, never updated.
65
- */
59
+ /** Just `createdAt` — set once at insert, never updated. */
66
60
  export declare const sqlCreatedAt: {
67
61
  readonly createdAt: import("drizzle-orm").HasRuntimeDefault<import("drizzle-orm").HasDefault<import("drizzle-orm").NotNull<import("drizzle-orm/sqlite-core").SQLiteTimestampBuilder>>>;
68
62
  };
69
- /**
70
- * Just `updatedAt` — set at insert and refreshed on every update.
71
- */
63
+ /** Just `updatedAt` — set at insert and refreshed on every update. */
72
64
  export declare const sqlUpdatedAt: {
73
65
  readonly updatedAt: import("drizzle-orm").HasDefault<import("drizzle-orm").HasRuntimeDefault<import("drizzle-orm").HasDefault<import("drizzle-orm").NotNull<import("drizzle-orm/sqlite-core").SQLiteTimestampBuilder>>>>;
74
66
  };
75
- /**
76
- * Soft-delete column — `deletedAt` nullable timestamp.
77
- */
67
+ /** Soft-delete column — `deletedAt` nullable timestamp. */
78
68
  export declare const sqlsoftdelete: {
79
69
  readonly deletedAt: import("drizzle-orm/sqlite-core").SQLiteTimestampBuilder;
80
70
  };
81
- /**
82
- * Multi-tenant isolation column — `tenantId` nullable text.
83
- */
71
+ /** Multi-tenant isolation column — `tenantId` nullable text. */
84
72
  export declare const sqltenantid: {
85
73
  readonly tenantId: import("drizzle-orm/sqlite-core").SQLiteTextBuilder<[string, ...string[]]>;
86
74
  };
@@ -216,7 +216,10 @@ export class QarpeoAgentDO {
216
216
  const stream = body.stream !== false;
217
217
  const systemPrompt = body.system || this.agentDefinition?.system || "You are a helpful assistant.";
218
218
  const model = body.model || this.agentDefinition?.model || "@cf/meta/llama-3.3-70b-instruct";
219
- const maxSteps = Math.min(Math.max(1, body.maxSteps ?? this.agentDefinition?.maxSteps ?? 5), 20);
219
+ const maxSteps = Math.min(
220
+ Math.max(1, body.maxSteps ?? this.agentDefinition?.maxSteps ?? 5),
221
+ 20
222
+ );
220
223
  const maxContextMessages = Math.min(
221
224
  Math.max(1, body.maxContextMessages ?? this.agentDefinition?.maxContextMessages ?? 30),
222
225
  100
@@ -33,14 +33,12 @@ export declare class QarpeoRoomDO {
33
33
  private broadcast;
34
34
  /** Returns current active users list in the room. */
35
35
  private getPresenceList;
36
- /**
37
- * Validates internal server control requests against REALTIME_ROOM_SECRET (if configured).
38
- */
36
+ /** Validates internal server control requests against REALTIME_ROOM_SECRET (if configured). */
39
37
  private isAuthorizedServerRequest;
40
38
  /**
41
- * Authorizes client state mutation (state:patch / state:set).
42
- * Restricts anonymous users by default unless REALTIME_ALLOW_ANONYMOUS_STATE_WRITE is enabled,
43
- * or matches against configured REALTIME_STATE_WRITE_ROLES.
39
+ * Authorizes client state mutation (state:patch / state:set). Restricts anonymous users by
40
+ * default unless REALTIME_ALLOW_ANONYMOUS_STATE_WRITE is enabled, or matches against configured
41
+ * REALTIME_STATE_WRITE_ROLES.
44
42
  */
45
43
  private isStateWriteAuthorized;
46
44
  }
@@ -456,7 +456,13 @@ export class QarpeoRoomDO {
456
456
  const att2 = getAttachment(ws);
457
457
  if (!this.isStateWriteAuthorized(att2?.user)) {
458
458
  try {
459
- ws.send(JSON.stringify({ type: "error", code: "unauthorized", message: "Not authorized to mutate room state" }));
459
+ ws.send(
460
+ JSON.stringify({
461
+ type: "error",
462
+ code: "unauthorized",
463
+ message: "Not authorized to mutate room state"
464
+ })
465
+ );
460
466
  } catch {
461
467
  }
462
468
  return;
@@ -480,7 +486,13 @@ export class QarpeoRoomDO {
480
486
  const att2 = getAttachment(ws);
481
487
  if (!this.isStateWriteAuthorized(att2?.user)) {
482
488
  try {
483
- ws.send(JSON.stringify({ type: "error", code: "unauthorized", message: "Not authorized to mutate room state" }));
489
+ ws.send(
490
+ JSON.stringify({
491
+ type: "error",
492
+ code: "unauthorized",
493
+ message: "Not authorized to mutate room state"
494
+ })
495
+ );
484
496
  } catch {
485
497
  }
486
498
  return;
@@ -590,9 +602,7 @@ export class QarpeoRoomDO {
590
602
  }
591
603
  return users;
592
604
  }
593
- /**
594
- * Validates internal server control requests against REALTIME_ROOM_SECRET (if configured).
595
- */
605
+ /** Validates internal server control requests against REALTIME_ROOM_SECRET (if configured). */
596
606
  isAuthorizedServerRequest(request) {
597
607
  const roomSecret = this.env?.REALTIME_ROOM_SECRET || this.env?.roomSecret;
598
608
  if (!roomSecret) return true;
@@ -600,9 +610,9 @@ export class QarpeoRoomDO {
600
610
  return timingSafeEqual(provided, String(roomSecret));
601
611
  }
602
612
  /**
603
- * Authorizes client state mutation (state:patch / state:set).
604
- * Restricts anonymous users by default unless REALTIME_ALLOW_ANONYMOUS_STATE_WRITE is enabled,
605
- * or matches against configured REALTIME_STATE_WRITE_ROLES.
613
+ * Authorizes client state mutation (state:patch / state:set). Restricts anonymous users by
614
+ * default unless REALTIME_ALLOW_ANONYMOUS_STATE_WRITE is enabled, or matches against configured
615
+ * REALTIME_STATE_WRITE_ROLES.
606
616
  */
607
617
  isStateWriteAuthorized(user) {
608
618
  if (!user) return false;
@@ -1,7 +1,6 @@
1
1
  import type { NitroApp } from "nitro/types";
2
2
  /**
3
- * Nitro server plugin for Qarpeo Comments.
4
- * Pre-warms database tables on request lifecycle so individual route handlers
5
- * do not need to repeat DDL checks.
3
+ * Nitro server plugin for Qarpeo Comments. Pre-warms database tables on request lifecycle so
4
+ * individual route handlers do not need to repeat DDL checks.
6
5
  */
7
6
  export default function (nitroApp: NitroApp): void;
@@ -1,5 +1,3 @@
1
1
  import type { NitroApp } from "nitro/types";
2
- /**
3
- * Nitro server plugin that dispatches incoming Cloudflare emails to the user's email handler.
4
- */
2
+ /** Nitro server plugin that dispatches incoming Cloudflare emails to the user's email handler. */
5
3
  export default function (nitroApp: NitroApp): void;
@@ -1,7 +1,6 @@
1
1
  import type { NitroApp } from "nitro/types";
2
2
  /**
3
- * Nitro server plugin for Qarpeo Store App.
4
- * Pre-warms database tables on request lifecycle with module-level promise caching
5
- * so individual route handlers do not need to repeat DDL checks.
3
+ * Nitro server plugin for Qarpeo Store App. Pre-warms database tables on request lifecycle with
4
+ * module-level promise caching so individual route handlers do not need to repeat DDL checks.
6
5
  */
7
6
  export default function (nitroApp: NitroApp): void;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * POST /__qarpeo/cloud/agents/run
3
3
  *
4
- * Invokes a registered AI agent with a test prompt from Qarpeo Cloud.
5
- * Requires `Authorization: Bearer <QARPEO_CLOUD_SECRET>`.
4
+ * Invokes a registered AI agent with a test prompt from Qarpeo Cloud. Requires `Authorization:
5
+ * Bearer <QARPEO_CLOUD_SECRET>`.
6
6
  */
7
7
  declare const _default: import("nuxt/server").EventHandler<Promise<{
8
8
  ok: boolean;
@@ -11,7 +11,11 @@ export default defineEventHandler(async (event) => {
11
11
  }
12
12
  const d1 = getD1Binding(event);
13
13
  if (!d1) {
14
- throw createError({ statusCode: 500, statusMessage: "Internal Server Error", message: "D1 unavailable" });
14
+ throw createError({
15
+ statusCode: 500,
16
+ statusMessage: "Internal Server Error",
17
+ message: "D1 unavailable"
18
+ });
15
19
  }
16
20
  const entryTable = resolveTableName("cms_entry").replace(/"/g, "");
17
21
  const row = await d1.prepare(
@@ -19,7 +23,11 @@ export default defineEventHandler(async (event) => {
19
23
  FROM "${entryTable}" WHERE id = ?1 LIMIT 1`
20
24
  ).bind(id).first();
21
25
  if (!row) {
22
- throw createError({ statusCode: 404, statusMessage: "Not Found", message: "CMS entry not found" });
26
+ throw createError({
27
+ statusCode: 404,
28
+ statusMessage: "Not Found",
29
+ message: "CMS entry not found"
30
+ });
23
31
  }
24
32
  return {
25
33
  ok: true,
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * POST /__qarpeo/cloud/cms/entry
3
3
  *
4
- * Create, update, or delete a CMS entry directly from Qarpeo Cloud.
5
- * Body: `{ action?: "save" | "delete", id?, collection, title, slug?, description?, body?, status? }`
4
+ * Create, update, or delete a CMS entry directly from Qarpeo Cloud. Body: `{ action?: "save" |
5
+ * "delete", id?, collection, title, slug?, description?, body?, status? }`
6
6
  */
7
7
  declare const _default: import("nuxt/server").EventHandler<Promise<{
8
8
  ok: boolean;
@@ -8,12 +8,20 @@ export default defineEventHandler(async (event) => {
8
8
  const body = await readBody(event);
9
9
  const d1 = getD1Binding(event);
10
10
  if (!d1) {
11
- throw createError({ statusCode: 500, statusMessage: "Internal Server Error", message: "D1 unavailable" });
11
+ throw createError({
12
+ statusCode: 500,
13
+ statusMessage: "Internal Server Error",
14
+ message: "D1 unavailable"
15
+ });
12
16
  }
13
17
  const entryTable = resolveTableName("cms_entry").replace(/"/g, "");
14
18
  if (body?.action === "delete") {
15
19
  if (!body.id) {
16
- throw createError({ statusCode: 400, statusMessage: "Bad Request", message: "id is required for delete" });
20
+ throw createError({
21
+ statusCode: 400,
22
+ statusMessage: "Bad Request",
23
+ message: "id is required for delete"
24
+ });
17
25
  }
18
26
  await d1.prepare(`DELETE FROM "${entryTable}" WHERE id = ?1`).bind(body.id).run();
19
27
  return { ok: true, deleted: body.id };
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * GET /__qarpeo/cloud/cms
3
3
  *
4
- * Returns a paginated list of CMS entries for the Qarpeo Cloud CMS Dashboard.
5
- * Requires `Authorization: Bearer <QARPEO_CLOUD_SECRET>`.
4
+ * Returns a paginated list of CMS entries for the Qarpeo Cloud CMS Dashboard. Requires
5
+ * `Authorization: Bearer <QARPEO_CLOUD_SECRET>`.
6
6
  */
7
7
  declare const _default: import("nuxt/server").EventHandler<Promise<{
8
8
  ok: boolean;
@@ -75,6 +75,12 @@ export default defineEventHandler(async (event) => {
75
75
  pages: Math.ceil(total / limit)
76
76
  };
77
77
  } catch (err) {
78
- return { ok: false, error: err?.message || "Query failed", entries: [], collections: [], total: 0 };
78
+ return {
79
+ ok: false,
80
+ error: err?.message || "Query failed",
81
+ entries: [],
82
+ collections: [],
83
+ total: 0
84
+ };
79
85
  }
80
86
  });
@@ -1,6 +1,6 @@
1
1
  /**
2
- * POST /__qarpeo/cloud/comments/moderate
3
- * Body: `{ commentId: string, action: "approve" | "spam" | "reject" | "delete" }`
2
+ * POST /__qarpeo/cloud/comments/moderate Body: `{ commentId: string, action: "approve" | "spam" |
3
+ * "reject" | "delete" }`
4
4
  */
5
5
  declare const _default: import("nuxt/server").EventHandler<Promise<{
6
6
  ok: boolean;
@@ -16,7 +16,11 @@ export default defineEventHandler(async (event) => {
16
16
  }
17
17
  const d1 = getD1Binding(event);
18
18
  if (!d1) {
19
- throw createError({ statusCode: 500, statusMessage: "Internal Server Error", message: "D1 unavailable" });
19
+ throw createError({
20
+ statusCode: 500,
21
+ statusMessage: "Internal Server Error",
22
+ message: "D1 unavailable"
23
+ });
20
24
  }
21
25
  const commentTable = resolveTableName("comment").replace(/"/g, "");
22
26
  const now = Math.floor(Date.now() / 1e3);
@@ -1,6 +1,4 @@
1
- /**
2
- * GET /__qarpeo/cloud/comments
3
- */
1
+ /** GET /__qarpeo/cloud/comments */
4
2
  declare const _default: import("nuxt/server").EventHandler<Promise<{
5
3
  ok: boolean;
6
4
  comments: any;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * GET /__qarpeo/cloud/extras
3
3
  *
4
- * Returns D1 schema health (missing expected tables per enabled feature),
5
- * active tenants (if multitenant), and mail/push stats.
4
+ * Returns D1 schema health (missing expected tables per enabled feature), active tenants (if
5
+ * multitenant), and mail/push stats.
6
6
  */
7
7
  declare const _default: import("nuxt/server").EventHandler<Promise<{
8
8
  ok: boolean;
@@ -31,10 +31,16 @@ export default defineEventHandler(async (event) => {
31
31
  );
32
32
  }
33
33
  if (features.cms) {
34
- expectedByFeature.push({ feature: "cms", table: resolveTableName("cms_entry").replace(/"/g, "") });
34
+ expectedByFeature.push({
35
+ feature: "cms",
36
+ table: resolveTableName("cms_entry").replace(/"/g, "")
37
+ });
35
38
  }
36
39
  if (features.comments) {
37
- expectedByFeature.push({ feature: "comments", table: resolveTableName("comment").replace(/"/g, "") });
40
+ expectedByFeature.push({
41
+ feature: "comments",
42
+ table: resolveTableName("comment").replace(/"/g, "")
43
+ });
38
44
  }
39
45
  if (features.store) {
40
46
  expectedByFeature.push(
@@ -43,14 +49,19 @@ export default defineEventHandler(async (event) => {
43
49
  );
44
50
  }
45
51
  if (features.multitenant) {
46
- expectedByFeature.push({ feature: "multitenant", table: resolveTableName("tenant").replace(/"/g, "") });
52
+ expectedByFeature.push({
53
+ feature: "multitenant",
54
+ table: resolveTableName("tenant").replace(/"/g, "")
55
+ });
47
56
  }
48
57
  const missingTables = d1 ? expectedByFeature.filter((item) => !existingTables.has(item.table)) : [];
49
58
  let tenants = [];
50
59
  if (features.multitenant && d1 && existingTables.has(resolveTableName("tenant").replace(/"/g, ""))) {
51
60
  try {
52
61
  const tenantTbl = resolveTableName("tenant").replace(/"/g, "");
53
- tenants = await d1.prepare(`SELECT id, slug, name, plan FROM "${tenantTbl}" ORDER BY created_at DESC LIMIT 25`).all().then((r) => r.results ?? []);
62
+ tenants = await d1.prepare(
63
+ `SELECT id, slug, name, plan FROM "${tenantTbl}" ORDER BY created_at DESC LIMIT 25`
64
+ ).all().then((r) => r.results ?? []);
54
65
  } catch {
55
66
  tenants = [];
56
67
  }
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * POST /__qarpeo/cloud/mail/unsuppress
3
3
  *
4
- * Removes an email address from the D1 `mail_suppression` table.
5
- * Requires `Authorization: Bearer <QARPEO_CLOUD_SECRET>`.
4
+ * Removes an email address from the D1 `mail_suppression` table. Requires `Authorization: Bearer
5
+ * <QARPEO_CLOUD_SECRET>`.
6
6
  */
7
7
  declare const _default: import("nuxt/server").EventHandler<Promise<{
8
8
  ok: boolean;
@@ -43,9 +43,7 @@ export default defineEventHandler(async (event) => {
43
43
  }
44
44
  const slug = typeof item.slug === "string" && item.slug.trim() ? item.slug.trim() : title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").slice(0, 120);
45
45
  try {
46
- const existing = await d1.prepare(
47
- `SELECT id FROM "${entryTable}" WHERE collection_id = ?1 AND slug = ?2 LIMIT 1`
48
- ).bind(collection, slug).first();
46
+ const existing = await d1.prepare(`SELECT id FROM "${entryTable}" WHERE collection_id = ?1 AND slug = ?2 LIMIT 1`).bind(collection, slug).first();
49
47
  const now = Math.floor(Date.now() / 1e3);
50
48
  const createdAt = item.createdAt || now;
51
49
  const publishedAt = item.publishedAt || (item.status === "published" ? createdAt : null);
@@ -71,7 +69,18 @@ export default defineEventHandler(async (event) => {
71
69
  `INSERT INTO "${entryTable}"
72
70
  (id, collection_id, slug, title, description, content_md, content_html, metadata_json, status, source, created_at, updated_at, published_at)
73
71
  VALUES (?1, ?2, ?3, ?4, ?5, ?6, '', ?7, ?8, 'db', ?9, ?9, ?10)`
74
- ).bind(id, collection, slug, title, description, contentMd, metaStr, status, createdAt, publishedAt).run();
72
+ ).bind(
73
+ id,
74
+ collection,
75
+ slug,
76
+ title,
77
+ description,
78
+ contentMd,
79
+ metaStr,
80
+ status,
81
+ createdAt,
82
+ publishedAt
83
+ ).run();
75
84
  imported++;
76
85
  } catch (err) {
77
86
  errors.push({ slug, reason: err?.message || "Insert failed" });
@@ -57,7 +57,7 @@ export default defineEventHandler(async (event) => {
57
57
  const description = item.description || "";
58
58
  const imagesJson = item.image ? JSON.stringify([item.image]) : "[]";
59
59
  const metadataObj = {
60
- ...item.meta || {},
60
+ ...item.meta,
61
61
  ...item.externalId ? { externalId: item.externalId } : {}
62
62
  };
63
63
  const metadataJson = JSON.stringify(metadataObj);
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * POST /__qarpeo/cloud/migrate
3
3
  *
4
- * Runs idempotent `CREATE TABLE IF NOT EXISTS` migrations for enabled Qarpeo
5
- * features (or an explicit `features` list) against the bound D1 database.
6
- * Requires `Authorization: Bearer <QARPEO_CLOUD_SECRET>`.
4
+ * Runs idempotent `CREATE TABLE IF NOT EXISTS` migrations for enabled Qarpeo features (or an
5
+ * explicit `features` list) against the bound D1 database. Requires `Authorization: Bearer
6
+ * <QARPEO_CLOUD_SECRET>`.
7
7
  */
8
8
  declare const _default: import("nuxt/server").EventHandler<Promise<{
9
9
  ok: boolean;
@@ -1,7 +1,6 @@
1
1
  import { createError, defineEventHandler, readBody, useRuntimeConfig } from "nuxt/server";
2
2
  import { getD1Binding } from "../../../../index.mjs";
3
3
  import { ensureAuditTables } from "../../../utils/audit.mjs";
4
- import { ensureAuthTables } from "../../../utils/auth.mjs";
5
4
  import { verifyCloudSecret } from "../../../utils/cloud-auth.mjs";
6
5
  import { ensureCMSTables } from "../../../utils/cms/sync.mjs";
7
6
  import { ensureCommentsTables } from "../../../utils/comments.mjs";
@@ -24,7 +23,9 @@ export default defineEventHandler(async (event) => {
24
23
  message: "D1 database binding is not available on this Worker."
25
24
  });
26
25
  }
27
- const body = await readBody(event).catch(() => ({}));
26
+ const body = await readBody(event).catch(
27
+ () => ({})
28
+ );
28
29
  const config = useRuntimeConfig();
29
30
  const manifestFeatures = config.qarpeo?.manifest?.features || {};
30
31
  const targetFeatures = new Set(
@@ -33,7 +34,13 @@ export default defineEventHandler(async (event) => {
33
34
  const applied = [];
34
35
  const errors = [];
35
36
  const runners = [
36
- ["auth", () => ensureAuthTables(d1, event)],
37
+ [
38
+ "auth",
39
+ async () => {
40
+ const { ensureAuthTables } = await import("../../../utils/auth.mjs");
41
+ return ensureAuthTables(d1, event);
42
+ }
43
+ ],
37
44
  ["cms", () => ensureCMSTables(event)],
38
45
  ["comments", () => ensureCommentsTables(event)],
39
46
  ["store", () => ensureStoreTables(event)],
@@ -66,10 +73,16 @@ export default defineEventHandler(async (event) => {
66
73
  );
67
74
  }
68
75
  if (manifestFeatures.cms) {
69
- expectedByFeature.push({ feature: "cms", table: resolveTableName("cms_entry").replace(/"/g, "") });
76
+ expectedByFeature.push({
77
+ feature: "cms",
78
+ table: resolveTableName("cms_entry").replace(/"/g, "")
79
+ });
70
80
  }
71
81
  if (manifestFeatures.comments) {
72
- expectedByFeature.push({ feature: "comments", table: resolveTableName("comment").replace(/"/g, "") });
82
+ expectedByFeature.push({
83
+ feature: "comments",
84
+ table: resolveTableName("comment").replace(/"/g, "")
85
+ });
73
86
  }
74
87
  if (manifestFeatures.store) {
75
88
  expectedByFeature.push(
@@ -78,7 +91,10 @@ export default defineEventHandler(async (event) => {
78
91
  );
79
92
  }
80
93
  if (manifestFeatures.multitenant) {
81
- expectedByFeature.push({ feature: "multitenant", table: resolveTableName("tenant").replace(/"/g, "") });
94
+ expectedByFeature.push({
95
+ feature: "multitenant",
96
+ table: resolveTableName("tenant").replace(/"/g, "")
97
+ });
82
98
  }
83
99
  const missingTables = expectedByFeature.filter((item) => !existingTables.has(item.table));
84
100
  return {
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * POST /__qarpeo/cloud/notifications/test
3
3
  *
4
- * Sends a test in-app and/or Web Push notification from Qarpeo Cloud.
5
- * Requires `Authorization: Bearer <QARPEO_CLOUD_SECRET>`.
4
+ * Sends a test in-app and/or Web Push notification from Qarpeo Cloud. Requires `Authorization:
5
+ * Bearer <QARPEO_CLOUD_SECRET>`.
6
6
  */
7
7
  declare const _default: import("nuxt/server").EventHandler<Promise<{
8
8
  ok: boolean;
@@ -2,11 +2,12 @@
2
2
  * GET /__qarpeo/cloud/operations
3
3
  *
4
4
  * Returns runtime operational state for Qarpeo Cloud:
5
- * - Discovered & active AI Agents + Tools
6
- * - Discovered MCP Servers
7
- * - Nitro Scheduled Tasks & Cron schedules
8
- * - Mail suppression stats + recent suppressed addresses
9
- * - Web Push subscriptions & Notifications stats
5
+ *
6
+ * - Discovered & active AI Agents + Tools
7
+ * - Discovered MCP Servers
8
+ * - Nitro Scheduled Tasks & Cron schedules
9
+ * - Mail suppression stats + recent suppressed addresses
10
+ * - Web Push subscriptions & Notifications stats
10
11
  */
11
12
  declare const _default: import("nuxt/server").EventHandler<Promise<{
12
13
  ok: boolean;
@@ -1,6 +1,4 @@
1
- /**
2
- * POST /__qarpeo/cloud/store/order-status
3
- */
1
+ /** POST /__qarpeo/cloud/store/order-status */
4
2
  declare const _default: import("nuxt/server").EventHandler<Promise<{
5
3
  ok: boolean;
6
4
  orderId: string;
@@ -2,7 +2,15 @@ import { createError, defineEventHandler, readBody } from "nuxt/server";
2
2
  import { getD1Binding } from "../../../../../index.mjs";
3
3
  import { verifyCloudSecret } from "../../../../utils/cloud-auth.mjs";
4
4
  import { resolveTableName } from "../../../../utils/table-names.mjs";
5
- const ALLOWED_STATUSES = ["pending", "paid", "processing", "shipped", "delivered", "cancelled", "refunded"];
5
+ const ALLOWED_STATUSES = [
6
+ "pending",
7
+ "paid",
8
+ "processing",
9
+ "shipped",
10
+ "delivered",
11
+ "cancelled",
12
+ "refunded"
13
+ ];
6
14
  export default defineEventHandler(async (event) => {
7
15
  verifyCloudSecret(event);
8
16
  const body = await readBody(event);
@@ -17,7 +25,11 @@ export default defineEventHandler(async (event) => {
17
25
  }
18
26
  const d1 = getD1Binding(event);
19
27
  if (!d1) {
20
- throw createError({ statusCode: 500, statusMessage: "Internal Server Error", message: "D1 unavailable" });
28
+ throw createError({
29
+ statusCode: 500,
30
+ statusMessage: "Internal Server Error",
31
+ message: "D1 unavailable"
32
+ });
21
33
  }
22
34
  const orderTable = resolveTableName("store_order").replace(/"/g, "");
23
35
  const now = Math.floor(Date.now() / 1e3);
@@ -1,6 +1,4 @@
1
- /**
2
- * GET /__qarpeo/cloud/store/orders
3
- */
1
+ /** GET /__qarpeo/cloud/store/orders */
4
2
  declare const _default: import("nuxt/server").EventHandler<Promise<{
5
3
  ok: boolean;
6
4
  orders: any;
@@ -51,6 +51,12 @@ export default defineEventHandler(async (event) => {
51
51
  pages: Math.ceil(total / limit)
52
52
  };
53
53
  } catch (err) {
54
- return { ok: false, error: err?.message || "Query failed", orders: [], total: 0, totalRevenue: 0 };
54
+ return {
55
+ ok: false,
56
+ error: err?.message || "Query failed",
57
+ orders: [],
58
+ total: 0,
59
+ totalRevenue: 0
60
+ };
55
61
  }
56
62
  });
@@ -1,6 +1,4 @@
1
- /**
2
- * GET /__qarpeo/cloud/store/products
3
- */
1
+ /** GET /__qarpeo/cloud/store/products */
4
2
  declare const _default: import("nuxt/server").EventHandler<Promise<{
5
3
  ok: boolean;
6
4
  products: any;