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
@@ -104,12 +104,7 @@ function formatDate(ts?: number) {
104
104
  size="xs"
105
105
  @click="reloadNotifications"
106
106
  />
107
- <UButton
108
- label="+ Send Test"
109
- color="primary"
110
- size="xs"
111
- @click="showSendDialog = true"
112
- />
107
+ <UButton label="+ Send Test" color="primary" size="xs" @click="showSendDialog = true" />
113
108
  </div>
114
109
  </div>
115
110
 
@@ -5,9 +5,7 @@ export default defineNuxtPlugin(() => {
5
5
  const pwa = qarpeo.pwa || {};
6
6
  const site = qarpeo.site || {};
7
7
  if (pwa.enabled === false) return;
8
- const links = [
9
- { rel: "manifest", href: "/manifest.webmanifest" }
10
- ];
8
+ const links = [{ rel: "manifest", href: "/manifest.webmanifest" }];
11
9
  const appleTouchIcon = pwa.appleTouchIcon || pwa.icons?.find((i) => i.sizes.includes("180") || i.sizes.includes("192"))?.src || pwa.icons?.[0]?.src;
12
10
  if (appleTouchIcon) {
13
11
  links.push({ rel: "apple-touch-icon", href: appleTouchIcon });
@@ -0,0 +1,25 @@
1
+ import { Node } from "@tiptap/core";
2
+ import type { Editor } from "@tiptap/vue-3";
3
+ import type { Component } from "vue";
4
+ declare module "@tiptap/core" {
5
+ interface Commands<ReturnType> {
6
+ imageUpload: {
7
+ insertImageUpload: () => ReturnType;
8
+ };
9
+ }
10
+ }
11
+ export declare function createCMSImageUploadExtension(nodeComponent: Component): Node<any, any>;
12
+ export declare const cmsEditorHandlers: {
13
+ imageUpload: {
14
+ canExecute: (editor: Editor) => boolean;
15
+ execute: (editor: Editor) => import("@tiptap/core").ChainedCommands;
16
+ isActive: (editor: Editor) => boolean;
17
+ isDisabled: undefined;
18
+ };
19
+ table: {
20
+ canExecute: (editor: Editor) => any;
21
+ execute: (editor: Editor) => any;
22
+ isActive: (editor: Editor) => boolean;
23
+ isDisabled: undefined;
24
+ };
25
+ };
@@ -0,0 +1,43 @@
1
+ import { mergeAttributes, Node } from "@tiptap/core";
2
+ import { VueNodeViewRenderer } from "@tiptap/vue-3";
3
+ export function createCMSImageUploadExtension(nodeComponent) {
4
+ return Node.create({
5
+ name: "imageUpload",
6
+ group: "block",
7
+ atom: true,
8
+ draggable: true,
9
+ addAttributes() {
10
+ return {};
11
+ },
12
+ parseHTML() {
13
+ return [{ tag: 'div[data-type="image-upload"]' }];
14
+ },
15
+ renderHTML({ HTMLAttributes }) {
16
+ return ["div", mergeAttributes(HTMLAttributes, { "data-type": "image-upload" })];
17
+ },
18
+ addNodeView() {
19
+ return VueNodeViewRenderer(nodeComponent);
20
+ },
21
+ addCommands() {
22
+ return {
23
+ insertImageUpload: () => ({ commands }) => {
24
+ return commands.insertContent({ type: this.name });
25
+ }
26
+ };
27
+ }
28
+ });
29
+ }
30
+ export const cmsEditorHandlers = {
31
+ imageUpload: {
32
+ canExecute: (editor) => editor.can().insertContent({ type: "imageUpload" }),
33
+ execute: (editor) => editor.chain().focus().insertContent({ type: "imageUpload" }),
34
+ isActive: (editor) => editor.isActive("imageUpload"),
35
+ isDisabled: void 0
36
+ },
37
+ table: {
38
+ canExecute: (editor) => editor.can().insertTable({ rows: 3, cols: 3, withHeaderRow: true }),
39
+ execute: (editor) => editor.chain().focus().insertTable({ rows: 3, cols: 3, withHeaderRow: true }),
40
+ isActive: (editor) => editor.isActive("table"),
41
+ isDisabled: void 0
42
+ }
43
+ };
@@ -2,16 +2,16 @@
2
2
  * Standard auth user columns mixin for Tier 3 custom schema declarations.
3
3
  *
4
4
  * @example
5
- * ```ts
6
- * import { snakeCase, text } from "drizzle-orm/sqlite-core"
7
- * import { authUserFields } from "qarpeo/auth"
5
+ * ```ts
6
+ * import { snakeCase, text } from "drizzle-orm/sqlite-core"
7
+ * import { authUserFields } from "qarpeo/auth"
8
8
  *
9
- * export const users = snakeCase.table("users", {
10
- * ...authUserFields,
11
- * bio: text(),
12
- * customField: text(),
13
- * })
14
- * ```
9
+ * export const users = snakeCase.table("users", {
10
+ * ...authUserFields,
11
+ * bio: text(),
12
+ * customField: text(),
13
+ * })
14
+ * ```
15
15
  */
16
16
  export declare const authUserFields: {
17
17
  id: import("drizzle-orm").IsPrimaryKey<import("drizzle-orm/sqlite-core").SQLiteTextBuilder<[string, ...string[]]>>;
@@ -24,9 +24,7 @@ export declare function createBlob(bindingName?: string, event?: CFEvent): Qarpe
24
24
  export declare const handleBlob: (bindingName?: string, event?: CFEvent) => QarpeoBlob;
25
25
  /** Auto-imported `blob` instance for direct Cloudflare R2 Blob operations. */
26
26
  export declare const blob: QarpeoBlob;
27
- /**
28
- * Auto-imported `storage` instance — alias for `blob` providing Void Cloud (`void/storage`) parity.
29
- */
27
+ /** Auto-imported `storage` instance — alias for `blob` providing Void Cloud (`void/storage`) parity. */
30
28
  export declare const storage: QarpeoBlob;
31
29
  /** Alias for createBlob */
32
30
  export declare const createStorage: typeof createBlob;
@@ -37,7 +37,9 @@ function assertValidPathname(pathname) {
37
37
  }
38
38
  function parseDurationToSeconds(input) {
39
39
  const s = input.trim().toLowerCase();
40
- const match = s.match(/^(\d+(?:\.\d+)?)\s*(s|sec|second|seconds|m|min|minute|minutes|h|hr|hour|hours|d|day|days|w|week|weeks)?$/);
40
+ const match = s.match(
41
+ /^(\d+(?:\.\d+)?)\s*(s|sec|second|seconds|m|min|minute|minutes|h|hr|hour|hours|d|day|days|w|week|weeks)?$/
42
+ );
41
43
  if (!match) return parseInt(s, 10) || 900;
42
44
  const n = parseFloat(match[1]);
43
45
  const unit = match[2] || "s";
@@ -23,7 +23,8 @@ export declare function useEdgeCache(): EdgeCacheInterface | undefined;
23
23
  *
24
24
  * Purges cached responses from Cloudflare's Edge Cache (`caches.default`) for the given path(s).
25
25
  *
26
- * @param pathOrUrl Single path/URL or array of paths to revalidate (e.g. `/api/posts`, `https://example.com/blog`)
26
+ * @param pathOrUrl Single path/URL or array of paths to revalidate (e.g. `/api/posts`,
27
+ * `https://example.com/blog`)
27
28
  * @param event Optional event context for resolving host origin
28
29
  */
29
30
  export declare function revalidate(pathOrUrl: string | string[], event?: any): Promise<{
@@ -33,10 +34,11 @@ export declare function revalidate(pathOrUrl: string | string[], event?: any): P
33
34
  /** Alias for revalidate matching Next.js / Void Cloud semantics. */
34
35
  export declare const revalidatePath: typeof revalidate;
35
36
  /**
36
- * Sets one or more semantic cache tags on an outgoing response.
37
- * Cloudflare Edge Cache / CDN reads the `Cache-Tag` header for tag-based cache purging.
37
+ * Sets one or more semantic cache tags on an outgoing response. Cloudflare Edge Cache / CDN reads
38
+ * the `Cache-Tag` header for tag-based cache purging.
38
39
  *
39
- * @param eventOrResponse Nuxt/Nitro RequestEvent, standard Response object, or response headers container
40
+ * @param eventOrResponse Nuxt/Nitro RequestEvent, standard Response object, or response headers
41
+ * container
40
42
  * @param tags Single tag or array of tags (e.g. "products", ["blog", "post:123"])
41
43
  */
42
44
  export declare function setCacheTags(eventOrResponse: any, tags: string | string[]): void;
@@ -59,8 +61,8 @@ export interface RevalidateTagResult {
59
61
  /**
60
62
  * On-demand edge cache tag purging (Void Cloud & Next.js parity).
61
63
  *
62
- * Purges cached entries associated with the specified tag(s) across Cloudflare's Edge CDN
63
- * and internal edge storage.
64
+ * Purges cached entries associated with the specified tag(s) across Cloudflare's Edge CDN and
65
+ * internal edge storage.
64
66
  *
65
67
  * @param tagOrTags Single tag or array of tags to purge
66
68
  * @param options Optional credentials and configuration overrides
@@ -74,17 +74,14 @@ export async function revalidateTag(tagOrTags, options) {
74
74
  const apiToken = options?.apiToken || process.env.CLOUDFLARE_API_TOKEN || process.env.CF_API_TOKEN || process.env.CLOUDFLARE_TOKEN;
75
75
  if (zoneId && apiToken) {
76
76
  try {
77
- const res = await fetch(
78
- `https://api.cloudflare.com/client/v4/zones/${zoneId}/purge_cache`,
79
- {
80
- method: "POST",
81
- headers: {
82
- Authorization: `Bearer ${apiToken}`,
83
- "Content-Type": "application/json"
84
- },
85
- body: JSON.stringify({ tags })
86
- }
87
- );
77
+ const res = await fetch(`https://api.cloudflare.com/client/v4/zones/${zoneId}/purge_cache`, {
78
+ method: "POST",
79
+ headers: {
80
+ Authorization: `Bearer ${apiToken}`,
81
+ "Content-Type": "application/json"
82
+ },
83
+ body: JSON.stringify({ tags })
84
+ });
88
85
  const data = await res.json();
89
86
  if (data?.success) {
90
87
  return { success: true, tags, purged: true };
@@ -25,14 +25,15 @@ export declare const d1: QarpeoDB;
25
25
  * Automatically infers the database dialect from a connection URL string.
26
26
  *
27
27
  * Rules:
28
+ *
28
29
  * - `postgres://` or `postgresql://` -> `"postgres"`
29
30
  * - `mysql://` or `mysql2://` -> `"mysql"`
30
- * - otherwise (empty, sqlite://, file:) -> `"d1"` (Cloudflare D1 / SQLite default)
31
+ * - Otherwise (empty, sqlite://, file:) -> `"d1"` (Cloudflare D1 / SQLite default)
31
32
  */
32
33
  export declare function detectDatabaseDialect(url?: string): DatabaseDialect;
33
34
  /**
34
- * Returns active database connection info and inferred dialect based on DATABASE_URL,
35
- * named Hyperdrive binding, or Cloudflare environment variables.
35
+ * Returns active database connection info and inferred dialect based on DATABASE_URL, named
36
+ * Hyperdrive binding, or Cloudflare environment variables.
36
37
  *
37
38
  * @param bindingOrEvent Optional binding name / URL string, or CFEvent context
38
39
  * @param maybeEvent Optional event context when first parameter is a binding name
@@ -7,7 +7,8 @@ export type { QarpeoDrizzleDB, InferDrizzleRelations } from "./types/drizzle";
7
7
  * Automatically detects whether to use D1 or PostgreSQL based on DATABASE_URL or Hyperdrive.
8
8
  *
9
9
  * @param schema The database schema containing tables
10
- * @param bindingName Optional Cloudflare D1 / Hyperdrive binding name (defaults to 'DB' or 'HYPERDRIVE')
10
+ * @param bindingName Optional Cloudflare D1 / Hyperdrive binding name (defaults to 'DB' or
11
+ * 'HYPERDRIVE')
11
12
  * @param event Optional event context
12
13
  */
13
14
  export declare function createDrizzle<TSchema extends Record<string, unknown>>(schema: TSchema, bindingName?: string, event?: CFEvent): QarpeoDrizzleDB<InferDrizzleRelations<TSchema>>;
@@ -9,7 +9,7 @@ export function createDrizzle(schema, bindingName, event) {
9
9
  let postgresLib;
10
10
  let drizzlePostgres;
11
11
  try {
12
- const req = globalThis.require || (typeof globalThis.process !== "undefined" && typeof require !== "undefined" ? require : void 0);
12
+ const req = globalThis.require || (globalThis.process !== void 0 && typeof require !== "undefined" ? require : void 0);
13
13
  if (req) {
14
14
  const pgMod = req("postgres");
15
15
  postgresLib = pgMod?.default || pgMod;
@@ -56,7 +56,7 @@ Ensure your Hyperdrive binding exposes a connectionString (or set DATABASE_URL).
56
56
  let mysqlLib;
57
57
  let drizzleMysql;
58
58
  try {
59
- const req = globalThis.require || (typeof globalThis.process !== "undefined" && typeof require !== "undefined" ? require : void 0);
59
+ const req = globalThis.require || (globalThis.process !== void 0 && typeof require !== "undefined" ? require : void 0);
60
60
  if (req) {
61
61
  mysqlLib = req("mysql2/promise");
62
62
  drizzleMysql = req("drizzle-orm/mysql2").drizzle;
@@ -23,6 +23,7 @@ export declare const queue: QarpeoQueue<any>;
23
23
  * Dynamic proxy for accessing any named Cloudflare Queue (Void Cloud `void/queues` parity).
24
24
  *
25
25
  * Usage:
26
+ *
26
27
  * ```ts
27
28
  * await queues.emails.send({ to: "user@example.com", subject: "Welcome" })
28
29
  * await queues["order-notifications"].sendBatch([ ... ])
@@ -3,13 +3,10 @@ export type { D1ReplicaOptions } from "./types/d1";
3
3
  /**
4
4
  * Detects whether a SQL query modifies database state.
5
5
  *
6
- * Supports SQLite statements, Common Table Expressions (WITH), comments,
7
- * and PRAGMA directives.
6
+ * Supports SQLite statements, Common Table Expressions (WITH), comments, and PRAGMA directives.
8
7
  */
9
8
  export declare function isWriteQuery(sql: string): boolean;
10
- /**
11
- * Resolves the read replica binding or creates a D1 replication session.
12
- */
9
+ /** Resolves the read replica binding or creates a D1 replication session. */
13
10
  export declare function resolveD1ReplicaBinding(primaryD1: D1Database, bindingName?: string, options?: D1ReplicaOptions): {
14
11
  replicaD1: D1Database;
15
12
  session?: any;
@@ -17,11 +14,10 @@ export declare function resolveD1ReplicaBinding(primaryD1: D1Database, bindingNa
17
14
  /**
18
15
  * Creates a replica-routed `QarpeoDB` instance.
19
16
  *
20
- * Directs read queries (e.g. SELECT) to the nearest Cloudflare D1 read replica,
21
- * while transparently executing write queries (INSERT, UPDATE, DELETE, CREATE, etc.)
22
- * on the primary D1 database.
17
+ * Directs read queries (e.g. SELECT) to the nearest Cloudflare D1 read replica, while transparently
18
+ * executing write queries (INSERT, UPDATE, DELETE, CREATE, etc.) on the primary D1 database.
23
19
  *
24
- * If a read query on the replica encounters a failure, it automatically falls back
25
- * to the primary database to ensure high availability.
20
+ * If a read query on the replica encounters a failure, it automatically falls back to the primary
21
+ * database to ensure high availability.
26
22
  */
27
23
  export declare function createReplicaRoutedD1(primaryD1: D1Database, options?: D1ReplicaOptions, bindingName?: string): QarpeoDB;
@@ -138,7 +138,9 @@ export function createReplicaRoutedD1(primaryD1, options, bindingName) {
138
138
  return createStatementWrapper(query, values);
139
139
  },
140
140
  first(colName) {
141
- return executeQuery((stmt) => colName ? stmt.first(colName) : stmt.first());
141
+ return executeQuery(
142
+ (stmt) => colName ? stmt.first(colName) : stmt.first()
143
+ );
142
144
  },
143
145
  all() {
144
146
  return executeQuery((stmt) => stmt.all());
@@ -2,75 +2,59 @@
2
2
  * `qarpeo/schema/mysql` — MySQL Drizzle ORM helpers, column spreads, and ID generators.
3
3
  *
4
4
  * Re-exports everything from `"drizzle-orm/mysql-core"` and `"drizzle-orm"`, plus Qarpeo's
5
- * `msTable` alias (`mysqlTable`), primary key strategies (`msid`, `msuuid`, `msint`),
6
- * timestamps (`mstimestamps`, `msCreatedAt`, `msUpdatedAt`), soft delete (`mssoftdelete`),
7
- * multi-tenancy (`mstenantid`), and type helpers (`SelectFrom`, `InsertInto`).
5
+ * `msTable` alias (`mysqlTable`), primary key strategies (`msid`, `msuuid`, `msint`), timestamps
6
+ * (`mstimestamps`, `msCreatedAt`, `msUpdatedAt`), soft delete (`mssoftdelete`), multi-tenancy
7
+ * (`mstenantid`), and type helpers (`SelectFrom`, `InsertInto`).
8
8
  *
9
9
  * The `ms` prefix stands for **MySQL** throughout this module.
10
10
  *
11
11
  * @example
12
- * ```ts [db/ms-logs/schema/logs.ts]
13
- * import { msTable, msid, mstimestamps, varchar, text } from "qarpeo/schema/mysql"
12
+ * ```ts [db/ms-logs/schema/logs.ts]
13
+ * import { msTable, msid, mstimestamps, varchar, text } from "qarpeo/schema/mysql"
14
14
  *
15
- * export const logs = msTable("logs", {
15
+ * export const logs = msTable("logs", {
16
16
  * ...msid,
17
17
  * level: varchar({ length: 32 }).notNull(),
18
18
  * message: text().notNull(),
19
19
  * ...mstimestamps,
20
- * })
21
- * ```
20
+ * })
21
+ * ```
22
22
  */
23
23
  export * from "drizzle-orm/mysql-core";
24
24
  export * from "drizzle-orm";
25
25
  export type { SelectedFields, SelectedFieldsFlat, SelectedFieldsOrdered, TableConfig, } from "drizzle-orm/mysql-core";
26
26
  export * from "./schema-shared";
27
27
  export { mysqlTable as msTable } from "drizzle-orm/mysql-core";
28
- /**
29
- * **Recommended MySQL primary key** — VARCHAR(36) UUID v7, auto-generated at insert.
30
- */
28
+ /** **Recommended MySQL primary key** — VARCHAR(36) UUID v7, auto-generated at insert. */
31
29
  export declare const msid: {
32
30
  readonly id: import("drizzle-orm").HasRuntimeDefault<import("drizzle-orm").HasDefault<import("drizzle-orm").IsPrimaryKey<import("drizzle-orm/mysql-core").MySqlVarCharBuilder<[string, ...string[]]>>>>;
33
31
  };
34
- /**
35
- * MySQL UUID v4 primary key — VARCHAR(36), `crypto.randomUUID()`.
36
- */
32
+ /** MySQL UUID v4 primary key — VARCHAR(36), `crypto.randomUUID()`. */
37
33
  export declare const msuuid: {
38
34
  readonly id: import("drizzle-orm").HasRuntimeDefault<import("drizzle-orm").HasDefault<import("drizzle-orm").IsPrimaryKey<import("drizzle-orm/mysql-core").MySqlVarCharBuilder<[string, ...string[]]>>>>;
39
35
  };
40
- /**
41
- * MySQL auto-increment primary key (SERIAL / BIGINT UNSIGNED AUTO_INCREMENT).
42
- */
36
+ /** MySQL auto-increment primary key (SERIAL / BIGINT UNSIGNED AUTO_INCREMENT). */
43
37
  export declare const msint: {
44
38
  readonly id: import("drizzle-orm").IsPrimaryKey<import("drizzle-orm/mysql-core").MySqlSerialBuilder>;
45
39
  };
46
- /**
47
- * MySQL `createdAt` + `updatedAt` TIMESTAMP columns with automatic defaults.
48
- */
40
+ /** MySQL `createdAt` + `updatedAt` TIMESTAMP columns with automatic defaults. */
49
41
  export declare const mstimestamps: {
50
42
  readonly createdAt: import("drizzle-orm").HasRuntimeDefault<import("drizzle-orm").HasDefault<import("drizzle-orm").NotNull<import("drizzle-orm/mysql-core").MySqlTimestampBuilder>>>;
51
43
  readonly updatedAt: import("drizzle-orm").HasDefault<import("drizzle-orm").HasRuntimeDefault<import("drizzle-orm").HasDefault<import("drizzle-orm").NotNull<import("drizzle-orm/mysql-core").MySqlTimestampBuilder>>>>;
52
44
  };
53
- /**
54
- * Just `createdAt` for MySQL — set once at insert, never updated.
55
- */
45
+ /** Just `createdAt` for MySQL — set once at insert, never updated. */
56
46
  export declare const msCreatedAt: {
57
47
  readonly createdAt: import("drizzle-orm").HasRuntimeDefault<import("drizzle-orm").HasDefault<import("drizzle-orm").NotNull<import("drizzle-orm/mysql-core").MySqlTimestampBuilder>>>;
58
48
  };
59
- /**
60
- * Just `updatedAt` for MySQL — set at insert and refreshed on every update.
61
- */
49
+ /** Just `updatedAt` for MySQL — set at insert and refreshed on every update. */
62
50
  export declare const msUpdatedAt: {
63
51
  readonly updatedAt: import("drizzle-orm").HasDefault<import("drizzle-orm").HasRuntimeDefault<import("drizzle-orm").HasDefault<import("drizzle-orm").NotNull<import("drizzle-orm/mysql-core").MySqlTimestampBuilder>>>>;
64
52
  };
65
- /**
66
- * MySQL soft-delete column — `deletedAt` nullable TIMESTAMP.
67
- */
53
+ /** MySQL soft-delete column — `deletedAt` nullable TIMESTAMP. */
68
54
  export declare const mssoftdelete: {
69
55
  readonly deletedAt: import("drizzle-orm/mysql-core").MySqlTimestampBuilder;
70
56
  };
71
- /**
72
- * MySQL multi-tenant isolation column — `tenantId` nullable VARCHAR(36).
73
- */
57
+ /** MySQL multi-tenant isolation column — `tenantId` nullable VARCHAR(36). */
74
58
  export declare const mstenantid: {
75
59
  readonly tenantId: import("drizzle-orm/mysql-core").MySqlVarCharBuilder<[string, ...string[]]>;
76
60
  };
@@ -1,73 +1,57 @@
1
1
  /**
2
2
  * `qarpeo/schema/pg` — PostgreSQL Drizzle ORM helpers, column spreads, and ID generators.
3
3
  *
4
- * Re-exports everything from `"drizzle-orm/pg-core"` and `"drizzle-orm"`, plus Qarpeo's
5
- * primary key strategies (`pgid`, `pguuid`, `pgint`), timestamps (`pgtimestamps`, `pgCreatedAt`,
4
+ * Re-exports everything from `"drizzle-orm/pg-core"` and `"drizzle-orm"`, plus Qarpeo's primary key
5
+ * strategies (`pgid`, `pguuid`, `pgint`), timestamps (`pgtimestamps`, `pgCreatedAt`,
6
6
  * `pgUpdatedAt`), soft delete (`pgsoftdelete`), multi-tenancy (`pgtenantid`), and type helpers
7
7
  * (`SelectFrom`, `InsertInto`).
8
8
  *
9
9
  * @example
10
- * ```ts [db/pg-orders/schema/orders.ts]
11
- * import { pgTable, pgid, pgtimestamps, varchar, integer } from "qarpeo/schema/pg"
10
+ * ```ts [db/pg-orders/schema/orders.ts]
11
+ * import { pgTable, pgid, pgtimestamps, varchar, integer } from "qarpeo/schema/pg"
12
12
  *
13
- * export const orders = pgTable("orders", {
13
+ * export const orders = pgTable("orders", {
14
14
  * ...pgid,
15
15
  * status: varchar({ length: 32 }).notNull().default("pending"),
16
16
  * amount: integer().notNull(),
17
17
  * ...pgtimestamps,
18
- * })
19
- * ```
18
+ * })
19
+ * ```
20
20
  */
21
21
  export * from "drizzle-orm/pg-core";
22
22
  export * from "drizzle-orm";
23
23
  export type { SelectedFields, SelectedFieldsFlat, SelectedFieldsOrdered, TableConfig, } from "drizzle-orm/pg-core";
24
24
  export * from "./schema-shared";
25
- /**
26
- * PostgreSQL UUID v7 primary key — text column, auto-generated at insert.
27
- */
25
+ /** PostgreSQL UUID v7 primary key — text column, auto-generated at insert. */
28
26
  export declare const pgid: {
29
27
  readonly id: import("drizzle-orm/pg-core").SetHasRuntimeDefault<import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>>>;
30
28
  };
31
- /**
32
- * PostgreSQL native UUID v4 primary key — uses `uuid` column type with `defaultRandom()`.
33
- */
29
+ /** PostgreSQL native UUID v4 primary key — uses `uuid` column type with `defaultRandom()`. */
34
30
  export declare const pguuid: {
35
31
  readonly id: import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgUUIDBuilder>>;
36
32
  };
37
- /**
38
- * PostgreSQL serial (auto-increment) primary key.
39
- */
33
+ /** PostgreSQL serial (auto-increment) primary key. */
40
34
  export declare const pgint: {
41
35
  readonly id: import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgSerialBuilder>;
42
36
  };
43
- /**
44
- * PostgreSQL `createdAt` + `updatedAt` timestamp columns with timezone (`TIMESTAMPTZ`).
45
- */
37
+ /** PostgreSQL `createdAt` + `updatedAt` timestamp columns with timezone (`TIMESTAMPTZ`). */
46
38
  export declare const pgtimestamps: {
47
39
  readonly createdAt: import("drizzle-orm/pg-core").SetHasRuntimeDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTimestampBuilder>>;
48
40
  readonly updatedAt: import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetHasRuntimeDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTimestampBuilder>>>;
49
41
  };
50
- /**
51
- * Just `createdAt` for PostgreSQL — set once at insert, never updated.
52
- */
42
+ /** Just `createdAt` for PostgreSQL — set once at insert, never updated. */
53
43
  export declare const pgCreatedAt: {
54
44
  readonly createdAt: import("drizzle-orm/pg-core").SetHasRuntimeDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTimestampBuilder>>;
55
45
  };
56
- /**
57
- * Just `updatedAt` for PostgreSQL — set at insert and refreshed on every update.
58
- */
46
+ /** Just `updatedAt` for PostgreSQL — set at insert and refreshed on every update. */
59
47
  export declare const pgUpdatedAt: {
60
48
  readonly updatedAt: import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetHasRuntimeDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTimestampBuilder>>>;
61
49
  };
62
- /**
63
- * PostgreSQL soft-delete column — `deletedAt` nullable timestamptz.
64
- */
50
+ /** PostgreSQL soft-delete column — `deletedAt` nullable timestamptz. */
65
51
  export declare const pgsoftdelete: {
66
52
  readonly deletedAt: import("drizzle-orm/pg-core").PgTimestampBuilder;
67
53
  };
68
- /**
69
- * PostgreSQL multi-tenant isolation column — `tenantId` nullable text.
70
- */
54
+ /** PostgreSQL multi-tenant isolation column — `tenantId` nullable text. */
71
55
  export declare const pgtenantid: {
72
56
  readonly tenantId: import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>;
73
57
  };
@@ -1,19 +1,21 @@
1
1
  import type { InferInsertModel, InferSelectModel, Table } from "drizzle-orm";
2
2
  /**
3
- * Generates a **UUID v4** using the Web Crypto API (`crypto.randomUUID()`).
4
- * Fully random 128-bit identifier. Available natively in Cloudflare Workers, Node 19+, Deno, browsers.
3
+ * Generates a **UUID v4** using the Web Crypto API (`crypto.randomUUID()`). Fully random 128-bit
4
+ * identifier. Available natively in Cloudflare Workers, Node 19+, Deno, browsers.
5
5
  *
6
- * @example `"550e8400-e29b-41d4-a716-446655440000"`
6
+ * @example
7
+ * ;`"550e8400-e29b-41d4-a716-446655440000"`
7
8
  */
8
9
  export declare function generateUUID(): string;
9
10
  /**
10
11
  * Generates a **UUID v7** (RFC 9562) — a time-ordered, lexicographically sortable UUID.
11
12
  *
12
13
  * The first 48 bits encode the current Unix timestamp in milliseconds so records sort
13
- * chronologically by ID alone. Sub-millisecond generation uses a monotonic counter
14
- * per RFC 9562 §6.2 Method 1 to avoid same-millisecond collisions.
14
+ * chronologically by ID alone. Sub-millisecond generation uses a monotonic counter per RFC 9562
15
+ * §6.2 Method 1 to avoid same-millisecond collisions.
15
16
  *
16
17
  * **Why prefer UUID v7 over v4 for database primary keys:**
18
+ *
17
19
  * - New rows are always appended to the end of the B-tree index → no page splits → faster inserts
18
20
  * - `ORDER BY id` naturally returns records in insertion order → no extra `ORDER BY created_at`
19
21
  * - Works in distributed edge Workers without a central counter
@@ -25,12 +27,13 @@ export declare function generateUUID(): string;
25
27
  *
26
28
  * Zero external dependencies — uses only `Date.now()` and `crypto.getRandomValues()`.
27
29
  *
28
- * @example `"01936c0a-5e0c-7b3a-8f9d-2e1c4a6b8d0f"`
30
+ * @example
31
+ * ;`"01936c0a-5e0c-7b3a-8f9d-2e1c4a6b8d0f"`
29
32
  */
30
33
  export declare function generateUUIDv7(): string;
31
34
  /**
32
- * Default ID generator — produces a **UUID v7** (time-ordered).
33
- * Recommended for all new Qarpeo tables.
35
+ * Default ID generator — produces a **UUID v7** (time-ordered). Recommended for all new Qarpeo
36
+ * tables.
34
37
  *
35
38
  * Override with `generateUUID()` for UUID v4 or use `sqlint`/`pgint`/`msint` for auto-increment.
36
39
  */
@@ -39,19 +42,19 @@ export declare const generateId: typeof generateUUIDv7;
39
42
  * Infer the TypeScript type of a full row returned from a SELECT query.
40
43
  *
41
44
  * @example
42
- * ```ts
43
- * import { posts } from "./schema"
44
- * type Post = SelectFrom<typeof posts>
45
- * ```
45
+ * ```ts
46
+ * import { posts } from "./schema"
47
+ * type Post = SelectFrom<typeof posts>
48
+ * ```
46
49
  */
47
50
  export type SelectFrom<T extends Table> = InferSelectModel<T>;
48
51
  /**
49
- * Infer the TypeScript type of the data shape required for an INSERT.
50
- * Optional fields (those with `$defaultFn`) become optional in the type.
52
+ * Infer the TypeScript type of the data shape required for an INSERT. Optional fields (those with
53
+ * `$defaultFn`) become optional in the type.
51
54
  *
52
55
  * @example
53
- * ```ts
54
- * type NewPost = InsertInto<typeof posts>
55
- * ```
56
+ * ```ts
57
+ * type NewPost = InsertInto<typeof posts>
58
+ * ```
56
59
  */
57
60
  export type InsertInto<T extends Table> = InferInsertModel<T>;