qarpeo 0.1.35 → 0.2.0

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 (363) hide show
  1. package/README.md +114 -26
  2. package/dist/apps/cms.d.ts +4 -0
  3. package/dist/apps/comments.d.ts +4 -0
  4. package/dist/apps/payments.d.ts +4 -0
  5. package/dist/apps/store.d.ts +4 -0
  6. package/dist/chunks/auth-schema.mjs +169 -30
  7. package/dist/chunks/tools.mjs +1680 -0
  8. package/dist/cli/index.mjs +1256 -221
  9. package/dist/core/aliases.d.ts +5 -0
  10. package/dist/core/context.d.ts +10 -0
  11. package/dist/core/cross-drive.d.ts +2 -0
  12. package/dist/core/d1-migrate.d.ts +4 -0
  13. package/dist/core/devtools.d.ts +4 -0
  14. package/dist/core/nitro.d.ts +4 -0
  15. package/dist/core/schema.d.ts +4 -0
  16. package/dist/core/server-utils.d.ts +4 -0
  17. package/dist/core/wrangler.d.ts +4 -0
  18. package/dist/dev/wrangler.d.ts +1 -0
  19. package/dist/fate/index.d.ts +8 -8
  20. package/dist/features/agents.d.ts +4 -0
  21. package/dist/features/auth.d.ts +4 -0
  22. package/dist/features/bots.d.ts +4 -0
  23. package/dist/features/fate.d.ts +4 -0
  24. package/dist/features/mail.d.ts +4 -0
  25. package/dist/features/mcp.d.ts +4 -0
  26. package/dist/features/multitenant.d.ts +4 -0
  27. package/dist/features/notifications.d.ts +4 -0
  28. package/dist/features/realtime.d.ts +4 -0
  29. package/dist/module.d.ts +10 -2
  30. package/dist/module.mjs +6313 -5118
  31. package/dist/primitives/ai.d.ts +4 -0
  32. package/dist/primitives/analytics.d.ts +4 -0
  33. package/dist/primitives/blob.d.ts +4 -0
  34. package/dist/primitives/browser.d.ts +4 -0
  35. package/dist/primitives/cache.d.ts +4 -0
  36. package/dist/primitives/d1.d.ts +4 -0
  37. package/dist/primitives/do.d.ts +4 -0
  38. package/dist/primitives/email.d.ts +4 -0
  39. package/dist/primitives/hyperdrive.d.ts +4 -0
  40. package/dist/primitives/kv.d.ts +4 -0
  41. package/dist/primitives/queue.d.ts +4 -0
  42. package/dist/primitives/ratelimit.d.ts +4 -0
  43. package/dist/primitives/vectorize.d.ts +4 -0
  44. package/dist/primitives/workflows.d.ts +4 -0
  45. package/dist/runtime/ai.d.ts +3 -3
  46. package/dist/runtime/ai.mjs +8 -1
  47. package/dist/runtime/app/components/RealtimeCursors.vue +2 -2
  48. package/dist/runtime/app/composables/ai.d.ts +56 -29
  49. package/dist/runtime/app/composables/analytics.d.ts +26 -106
  50. package/dist/runtime/app/composables/api-tokens.d.ts +31 -34
  51. package/dist/runtime/app/composables/auth.d.ts +147 -51
  52. package/dist/runtime/app/composables/auth.mjs +0 -7
  53. package/dist/runtime/app/composables/chat.d.ts +38 -35
  54. package/dist/runtime/app/composables/cms-preview.d.ts +30 -25
  55. package/dist/runtime/app/composables/cms.d.ts +57 -282
  56. package/dist/runtime/app/composables/cms.mjs +0 -35
  57. package/dist/runtime/app/composables/comments.d.ts +32 -5
  58. package/dist/runtime/app/composables/comments.mjs +29 -1
  59. package/dist/runtime/app/composables/docs-version.d.ts +25 -28
  60. package/dist/runtime/app/composables/impersonation.d.ts +22 -5
  61. package/dist/runtime/app/composables/organization.d.ts +38 -91
  62. package/dist/runtime/app/composables/passkey.d.ts +22 -6
  63. package/dist/runtime/app/composables/passwordless.d.ts +24 -7
  64. package/dist/runtime/app/composables/payments.d.ts +50 -34
  65. package/dist/runtime/app/composables/payments.mjs +1 -0
  66. package/dist/runtime/app/composables/sse.d.ts +76 -0
  67. package/dist/runtime/app/composables/sse.mjs +152 -0
  68. package/dist/runtime/app/composables/storage.d.ts +53 -65
  69. package/dist/runtime/app/composables/storage.mjs +17 -0
  70. package/dist/runtime/app/composables/store.d.ts +198 -0
  71. package/dist/runtime/app/composables/store.mjs +414 -0
  72. package/dist/runtime/app/composables/tenant.d.ts +31 -72
  73. package/dist/runtime/app/composables/turnstile.d.ts +16 -3
  74. package/dist/runtime/app/composables/two-factor.d.ts +23 -6
  75. package/dist/runtime/app/pages/devtools/notifications.vue +30 -27
  76. package/dist/runtime/app/pages/devtools/realtime.vue +19 -31
  77. package/dist/runtime/app/pages/devtools.vue +0 -7
  78. package/dist/runtime/auth.d.ts +9 -9
  79. package/dist/runtime/blob.d.ts +10 -1
  80. package/dist/runtime/blob.mjs +83 -0
  81. package/dist/runtime/cache.d.ts +48 -0
  82. package/dist/runtime/cache.mjs +92 -0
  83. package/dist/runtime/comments.d.ts +4 -0
  84. package/dist/runtime/comments.mjs +2 -0
  85. package/dist/runtime/db.d.ts +21 -1
  86. package/dist/runtime/db.mjs +54 -0
  87. package/dist/runtime/drizzle.d.ts +4 -2
  88. package/dist/runtime/drizzle.mjs +68 -1
  89. package/dist/runtime/durable-object.d.ts +2 -0
  90. package/dist/runtime/durable-object.mjs +2 -0
  91. package/dist/runtime/email.d.ts +1 -1
  92. package/dist/runtime/email.mjs +1 -1
  93. package/dist/runtime/kv.mjs +50 -1
  94. package/dist/runtime/mcp.d.ts +2 -0
  95. package/dist/runtime/mcp.mjs +2 -0
  96. package/dist/runtime/queue.d.ts +12 -2
  97. package/dist/runtime/queue.mjs +19 -1
  98. package/dist/runtime/ratelimit.d.ts +1 -0
  99. package/dist/runtime/ratelimit.mjs +7 -0
  100. package/dist/runtime/schema.d.ts +313 -0
  101. package/dist/runtime/schema.mjs +259 -0
  102. package/dist/runtime/server/db/cms-schema.d.ts +1225 -171
  103. package/dist/runtime/server/db/cms-schema.mjs +69 -70
  104. package/dist/runtime/server/db/store-schema.d.ts +4344 -0
  105. package/dist/runtime/server/db/store-schema.mjs +266 -0
  106. package/dist/runtime/server/durable-objects/agent.mjs +35 -0
  107. package/dist/runtime/server/durable-objects/room.mjs +0 -1
  108. package/dist/runtime/server/middleware/ratelimit.mjs +10 -8
  109. package/dist/runtime/server/plugins/comments.d.ts +7 -0
  110. package/dist/runtime/server/plugins/comments.mjs +7 -0
  111. package/dist/runtime/server/plugins/email-inbound.d.ts +5 -0
  112. package/dist/runtime/server/plugins/email-inbound.mjs +17 -0
  113. package/dist/runtime/server/plugins/store.d.ts +7 -0
  114. package/dist/runtime/server/plugins/store.mjs +7 -0
  115. package/dist/runtime/server/routes/__qarpeo/db/tables.get.mjs +2 -2
  116. package/dist/runtime/server/routes/atom.xml.get.mjs +3 -1
  117. package/dist/runtime/server/routes/auth/2fa/disable.post.mjs +13 -2
  118. package/dist/runtime/server/routes/auth/2fa/setup.post.mjs +9 -3
  119. package/dist/runtime/server/routes/auth/2fa/verify.post.mjs +11 -3
  120. package/dist/runtime/server/routes/auth/account.delete.mjs +2 -1
  121. package/dist/runtime/server/routes/auth/audit-logs.get.mjs +1 -1
  122. package/dist/runtime/server/routes/auth/magic-link/send.post.d.ts +1 -9
  123. package/dist/runtime/server/routes/auth/magic-link/send.post.mjs +8 -0
  124. package/dist/runtime/server/routes/auth/organization/sso/[id].delete.mjs +1 -1
  125. package/dist/runtime/server/routes/auth/organization/sso/index.get.mjs +1 -1
  126. package/dist/runtime/server/routes/auth/organization/sso/index.post.mjs +1 -1
  127. package/dist/runtime/server/routes/auth/otp/send.post.d.ts +1 -9
  128. package/dist/runtime/server/routes/auth/otp/send.post.mjs +8 -0
  129. package/dist/runtime/server/routes/auth/sso/login.get.mjs +3 -3
  130. package/dist/runtime/server/routes/auth/sso/oidc/callback.get.mjs +1 -1
  131. package/dist/runtime/server/routes/auth/sso/saml/acs.post.mjs +2 -2
  132. package/dist/runtime/server/routes/auth/webauthn/login/options.post.mjs +1 -1
  133. package/dist/runtime/server/routes/auth/webauthn/login/verify.post.mjs +1 -1
  134. package/dist/runtime/server/routes/auth/webauthn/register/options.post.mjs +2 -2
  135. package/dist/runtime/server/routes/auth/webauthn/register/verify.post.mjs +1 -1
  136. package/dist/runtime/server/routes/cms/[collection]/[id]/preview-token.post.mjs +1 -1
  137. package/dist/runtime/server/routes/cms/[collection]/atom.xml.get.mjs +3 -1
  138. package/dist/runtime/server/routes/cms/[collection]/feed.xml.get.mjs +3 -1
  139. package/dist/runtime/server/routes/cms/bookmarks/[id].delete.mjs +1 -1
  140. package/dist/runtime/server/routes/cms/bookmarks/check.post.mjs +1 -1
  141. package/dist/runtime/server/routes/cms/bookmarks/index.get.mjs +1 -1
  142. package/dist/runtime/server/routes/cms/bookmarks/index.post.mjs +1 -1
  143. package/dist/runtime/server/routes/cms/deploy.post.mjs +1 -1
  144. package/dist/runtime/server/routes/cms/export.post.mjs +4 -3
  145. package/dist/runtime/server/routes/cms/search.get.mjs +7 -5
  146. package/dist/runtime/server/routes/cms/sync.post.mjs +2 -1
  147. package/dist/runtime/server/routes/comments/[id]/react.post.mjs +1 -2
  148. package/dist/runtime/server/routes/comments/[id]/report.post.d.ts +1 -1
  149. package/dist/runtime/server/routes/comments/[id]/report.post.mjs +0 -2
  150. package/dist/runtime/server/routes/comments/[id].delete.mjs +8 -4
  151. package/dist/runtime/server/routes/comments/[id].get.d.ts +1 -1
  152. package/dist/runtime/server/routes/comments/[id].get.mjs +1 -2
  153. package/dist/runtime/server/routes/comments/[id].patch.d.ts +1 -1
  154. package/dist/runtime/server/routes/comments/[id].patch.mjs +6 -3
  155. package/dist/runtime/server/routes/comments/batch.post.d.ts +2 -0
  156. package/dist/runtime/server/routes/comments/batch.post.mjs +33 -0
  157. package/dist/runtime/server/routes/comments/index.get.d.ts +1 -1
  158. package/dist/runtime/server/routes/comments/index.get.mjs +6 -4
  159. package/dist/runtime/server/routes/comments/index.post.d.ts +1 -1
  160. package/dist/runtime/server/routes/comments/index.post.mjs +6 -2
  161. package/dist/runtime/server/routes/feed.xml.get.mjs +3 -1
  162. package/dist/runtime/server/routes/sitemap.xml.get.mjs +3 -1
  163. package/dist/runtime/server/routes/storage/presigned-r2.post.d.ts +17 -0
  164. package/dist/runtime/server/routes/storage/presigned-r2.post.mjs +29 -0
  165. package/dist/runtime/server/routes/store/cart/index.delete.d.ts +6 -0
  166. package/dist/runtime/server/routes/store/cart/index.delete.mjs +11 -0
  167. package/dist/runtime/server/routes/store/cart/index.get.d.ts +5 -0
  168. package/dist/runtime/server/routes/store/cart/index.get.mjs +14 -0
  169. package/dist/runtime/server/routes/store/cart/items/[id].delete.d.ts +6 -0
  170. package/dist/runtime/server/routes/store/cart/items/[id].delete.mjs +25 -0
  171. package/dist/runtime/server/routes/store/cart/items/[id].patch.d.ts +6 -0
  172. package/dist/runtime/server/routes/store/cart/items/[id].patch.mjs +29 -0
  173. package/dist/runtime/server/routes/store/cart/items.post.d.ts +6 -0
  174. package/dist/runtime/server/routes/store/cart/items.post.mjs +36 -0
  175. package/dist/runtime/server/routes/store/categories/index.get.d.ts +2 -0
  176. package/dist/runtime/server/routes/store/categories/index.get.mjs +8 -0
  177. package/dist/runtime/server/routes/store/checkout.post.d.ts +6 -0
  178. package/dist/runtime/server/routes/store/checkout.post.mjs +21 -0
  179. package/dist/runtime/server/routes/store/coupons/apply.post.d.ts +7 -0
  180. package/dist/runtime/server/routes/store/coupons/apply.post.mjs +18 -0
  181. package/dist/runtime/server/routes/store/currencies.get.d.ts +15 -0
  182. package/dist/runtime/server/routes/store/currencies.get.mjs +13 -0
  183. package/dist/runtime/server/routes/store/orders/[id].get.d.ts +2 -0
  184. package/dist/runtime/server/routes/store/orders/[id].get.mjs +26 -0
  185. package/dist/runtime/server/routes/store/orders/download/[token].get.d.ts +7 -0
  186. package/dist/runtime/server/routes/store/orders/download/[token].get.mjs +57 -0
  187. package/dist/runtime/server/routes/store/orders/index.get.d.ts +5 -0
  188. package/dist/runtime/server/routes/store/orders/index.get.mjs +30 -0
  189. package/dist/runtime/server/routes/store/products/[slug].get.d.ts +2 -0
  190. package/dist/runtime/server/routes/store/products/[slug].get.mjs +18 -0
  191. package/dist/runtime/server/routes/store/products/index.get.d.ts +5 -0
  192. package/dist/runtime/server/routes/store/products/index.get.mjs +33 -0
  193. package/dist/runtime/server/routes/store/tax/calculate.post.d.ts +9 -0
  194. package/dist/runtime/server/routes/store/tax/calculate.post.mjs +18 -0
  195. package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/index.delete.mjs +14 -1
  196. package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/verify.post.mjs +14 -1
  197. package/dist/runtime/server/routes/tenants/[tenant]/domains/index.get.mjs +24 -1
  198. package/dist/runtime/server/routes/tenants/[tenant]/domains/index.post.mjs +6 -0
  199. package/dist/runtime/server/utils/ai.d.ts +146 -21
  200. package/dist/runtime/server/utils/ai.mjs +406 -11
  201. package/dist/runtime/server/utils/analytics-query.d.ts +13 -58
  202. package/dist/runtime/server/utils/audit.d.ts +5 -4
  203. package/dist/runtime/server/utils/audit.mjs +25 -14
  204. package/dist/runtime/server/utils/auth.d.ts +29 -12
  205. package/dist/runtime/server/utils/auth.mjs +88 -70
  206. package/dist/runtime/server/utils/bots.d.ts +20 -4
  207. package/dist/runtime/server/utils/bots.mjs +7 -3
  208. package/dist/runtime/server/utils/browser-utils.d.ts +23 -23
  209. package/dist/runtime/server/utils/cache.d.ts +3 -3
  210. package/dist/runtime/server/utils/cms/collections.d.ts +23 -0
  211. package/dist/runtime/server/utils/cms/collections.mjs +143 -0
  212. package/dist/runtime/server/utils/cms/common.d.ts +9 -0
  213. package/dist/runtime/server/utils/cms/common.mjs +28 -0
  214. package/dist/runtime/server/utils/cms/git.mjs +2 -2
  215. package/dist/runtime/server/utils/cms/navigation.d.ts +46 -0
  216. package/dist/runtime/server/utils/cms/navigation.mjs +683 -0
  217. package/dist/runtime/server/utils/cms/preview.d.ts +11 -0
  218. package/dist/runtime/server/utils/cms/preview.mjs +50 -0
  219. package/dist/runtime/server/utils/cms/search.d.ts +1 -1
  220. package/dist/runtime/server/utils/cms/search.mjs +11 -7
  221. package/dist/runtime/server/utils/cms/sync.d.ts +34 -0
  222. package/dist/runtime/server/utils/cms/sync.mjs +1082 -0
  223. package/dist/runtime/server/utils/cms/taxonomy.d.ts +103 -0
  224. package/dist/runtime/server/utils/cms/taxonomy.mjs +348 -0
  225. package/dist/runtime/server/utils/cms.d.ts +13 -249
  226. package/dist/runtime/server/utils/cms.mjs +108 -2350
  227. package/dist/runtime/server/utils/comments-filter.d.ts +45 -0
  228. package/dist/runtime/server/utils/comments-filter.mjs +541 -0
  229. package/dist/runtime/server/utils/comments.d.ts +71 -0
  230. package/dist/runtime/server/utils/comments.mjs +137 -61
  231. package/dist/runtime/server/utils/config.d.ts +4 -3
  232. package/dist/runtime/server/utils/config.mjs +7 -6
  233. package/dist/runtime/server/utils/context.d.ts +14 -0
  234. package/dist/runtime/server/utils/context.mjs +2 -2
  235. package/dist/runtime/server/utils/crypto.d.ts +44 -5
  236. package/dist/runtime/server/utils/crypto.mjs +18 -0
  237. package/dist/runtime/server/utils/domains.mjs +9 -5
  238. package/dist/runtime/server/utils/drizzle.d.ts +35 -3
  239. package/dist/runtime/server/utils/drizzle.mjs +115 -6
  240. package/dist/runtime/server/utils/durable-object.d.ts +106 -0
  241. package/dist/runtime/server/utils/durable-object.mjs +628 -0
  242. package/dist/runtime/server/utils/email-inbound.d.ts +29 -0
  243. package/dist/runtime/server/utils/email-inbound.mjs +76 -0
  244. package/dist/runtime/server/utils/impersonation.d.ts +32 -2
  245. package/dist/runtime/server/utils/impersonation.mjs +16 -13
  246. package/dist/runtime/server/utils/lock.d.ts +71 -0
  247. package/dist/runtime/server/utils/lock.mjs +139 -0
  248. package/dist/runtime/server/utils/mail-suppression.mjs +7 -7
  249. package/dist/runtime/server/utils/mail.d.ts +30 -19
  250. package/dist/runtime/server/utils/mcp.d.ts +44 -0
  251. package/dist/runtime/server/utils/mcp.mjs +308 -0
  252. package/dist/runtime/server/utils/notifications.d.ts +72 -7
  253. package/dist/runtime/server/utils/notifications.mjs +67 -55
  254. package/dist/runtime/server/utils/oauth.d.ts +27 -4
  255. package/dist/runtime/server/utils/organization.d.ts +63 -7
  256. package/dist/runtime/server/utils/organization.mjs +26 -21
  257. package/dist/runtime/server/utils/passwordless.d.ts +62 -33
  258. package/dist/runtime/server/utils/payments.d.ts +51 -12
  259. package/dist/runtime/server/utils/payments.mjs +472 -282
  260. package/dist/runtime/server/utils/queue.d.ts +106 -13
  261. package/dist/runtime/server/utils/queue.mjs +313 -28
  262. package/dist/runtime/server/utils/rag.d.ts +42 -14
  263. package/dist/runtime/server/utils/rag.mjs +169 -4
  264. package/dist/runtime/server/utils/ratelimit.d.ts +34 -5
  265. package/dist/runtime/server/utils/ratelimit.mjs +95 -14
  266. package/dist/runtime/server/utils/realtime.d.ts +68 -52
  267. package/dist/runtime/server/utils/scheduled-task.d.ts +42 -1
  268. package/dist/runtime/server/utils/scheduled-task.mjs +29 -0
  269. package/dist/runtime/server/utils/schema-fallback.d.ts +1 -1
  270. package/dist/runtime/server/utils/schema-fallback.mjs +1 -1
  271. package/dist/runtime/server/utils/session.d.ts +84 -10
  272. package/dist/runtime/server/utils/session.mjs +12 -10
  273. package/dist/runtime/server/utils/sse.d.ts +75 -0
  274. package/dist/runtime/server/utils/sse.mjs +147 -0
  275. package/dist/runtime/server/utils/sso.d.ts +1 -1
  276. package/dist/runtime/server/utils/storage.d.ts +53 -4
  277. package/dist/runtime/server/utils/storage.mjs +15 -11
  278. package/dist/runtime/server/utils/store-localization.d.ts +51 -0
  279. package/dist/runtime/server/utils/store-localization.mjs +417 -0
  280. package/dist/runtime/server/utils/store.d.ts +207 -0
  281. package/dist/runtime/server/utils/store.mjs +2227 -0
  282. package/dist/runtime/server/utils/table-names.d.ts +51 -0
  283. package/dist/runtime/server/utils/table-names.mjs +69 -0
  284. package/dist/runtime/server/utils/tenant.d.ts +26 -2
  285. package/dist/runtime/server/utils/tenant.mjs +16 -12
  286. package/dist/runtime/server/utils/tools-registry-fallback.d.ts +1 -0
  287. package/dist/runtime/server/utils/tools-registry-fallback.mjs +1 -0
  288. package/dist/runtime/server/utils/totp.d.ts +45 -2
  289. package/dist/runtime/server/utils/tracker.d.ts +10 -11
  290. package/dist/runtime/server/utils/turnstile.d.ts +16 -1
  291. package/dist/runtime/server/utils/workflows.d.ts +92 -0
  292. package/dist/runtime/server/utils/workflows.mjs +299 -0
  293. package/dist/runtime/server.d.ts +8 -1
  294. package/dist/runtime/server.mjs +8 -5
  295. package/dist/runtime/service.d.ts +10 -10
  296. package/dist/runtime/storage.d.ts +1 -0
  297. package/dist/runtime/storage.mjs +1 -0
  298. package/dist/runtime/store.d.ts +4 -0
  299. package/dist/runtime/store.mjs +2 -0
  300. package/dist/runtime/test-utils.d.ts +11 -10
  301. package/dist/runtime/test-utils.mjs +64 -4
  302. package/dist/runtime/types/ai.d.ts +21 -2
  303. package/dist/runtime/types/d1.d.ts +17 -0
  304. package/dist/runtime/types/drizzle.d.ts +2 -2
  305. package/dist/runtime/types/durable-object.d.ts +62 -2
  306. package/dist/runtime/types/email.d.ts +46 -0
  307. package/dist/runtime/types/imports.d.ts +6 -1
  308. package/dist/runtime/types/index.d.ts +58 -0
  309. package/dist/runtime/types/index.mjs +3 -0
  310. package/dist/runtime/types/mcp.d.ts +83 -0
  311. package/dist/runtime/types/mcp.mjs +0 -0
  312. package/dist/runtime/types/queue.d.ts +36 -0
  313. package/dist/runtime/types/r2.d.ts +41 -0
  314. package/dist/runtime/types/store.d.ts +313 -0
  315. package/dist/runtime/types/store.mjs +0 -0
  316. package/dist/runtime/types/workflows.d.ts +98 -0
  317. package/dist/runtime/types/workflows.mjs +0 -0
  318. package/dist/runtime/workflows.d.ts +5 -0
  319. package/dist/runtime/workflows.mjs +2 -0
  320. package/dist/types/ai.d.ts +721 -0
  321. package/dist/types/cms.d.ts +710 -0
  322. package/dist/types.d.ts +406 -1288
  323. package/dist/utils/auth-schema.d.ts +3 -2
  324. package/dist/utils/bots.d.ts +20 -0
  325. package/dist/utils/comments-schema.d.ts +5 -4
  326. package/dist/utils/drizzle.d.ts +83 -3
  327. package/dist/utils/durable-objects.d.ts +10 -0
  328. package/dist/utils/email-inbound.d.ts +10 -0
  329. package/dist/utils/local-db.d.ts +1 -3
  330. package/dist/utils/mcp.d.ts +24 -0
  331. package/dist/utils/notifications-schema.d.ts +5 -4
  332. package/dist/utils/payments-schema.d.ts +4 -3
  333. package/dist/utils/store-schema.d.ts +14 -0
  334. package/dist/utils/table-names.d.ts +1 -0
  335. package/dist/utils/tenants-schema.d.ts +4 -3
  336. package/dist/utils/tools.d.ts +20 -0
  337. package/dist/utils/workflows.d.ts +8 -0
  338. package/package.json +34 -4
  339. package/dist/chunks/wrangler.mjs +0 -897
  340. package/dist/runtime/app/components/AuthRegister.vue +0 -306
  341. package/dist/runtime/app/components/AuthSessionsList.vue +0 -137
  342. package/dist/runtime/app/components/AuthSignIn.vue +0 -298
  343. package/dist/runtime/app/components/CMSBookmarkButton.vue +0 -59
  344. package/dist/runtime/app/components/CMSImage.vue +0 -47
  345. package/dist/runtime/app/components/CMSLocaleSwitcher.vue +0 -110
  346. package/dist/runtime/app/components/CMSNewsletter.vue +0 -81
  347. package/dist/runtime/app/components/CMSPreviewBanner.vue +0 -83
  348. package/dist/runtime/app/components/CMSTableOfContents.vue +0 -84
  349. package/dist/runtime/app/components/CMSVersionBanner.vue +0 -53
  350. package/dist/runtime/app/components/CMSVersionSwitcher.vue +0 -140
  351. package/dist/runtime/app/components/Comments.vue +0 -411
  352. package/dist/runtime/app/components/FileUpload.vue +0 -200
  353. package/dist/runtime/app/components/ImpersonationBanner.vue +0 -61
  354. package/dist/runtime/app/components/NotificationBell.vue +0 -263
  355. package/dist/runtime/app/components/NotificationList.vue +0 -205
  356. package/dist/runtime/app/components/NotificationPrompt.vue +0 -133
  357. package/dist/runtime/app/components/PricingGated.vue +0 -81
  358. package/dist/runtime/app/components/PricingTable.vue +0 -274
  359. package/dist/runtime/app/components/RealtimeChat.vue +0 -164
  360. package/dist/runtime/app/components/RealtimePresence.vue +0 -129
  361. package/dist/runtime/app/components/RealtimeStatus.vue +0 -79
  362. package/dist/runtime/app/components/SubscriptionCard.vue +0 -207
  363. package/dist/runtime/app/components/UserProfile.vue +0 -558
@@ -1,164 +0,0 @@
1
- <script lang="ts" setup>
2
- import { computed, nextTick, onMounted, ref, watch } from "vue"
3
-
4
- import { usePresence, useRealtime } from "../composables/realtime"
5
-
6
- interface Props {
7
- room?: string
8
- title?: string
9
- placeholder?: string
10
- }
11
-
12
- const props = withDefaults(defineProps<Props>(), {
13
- room: "general",
14
- title: "Live Chat",
15
- placeholder: "Say something...",
16
- })
17
-
18
- const { history, connected, send } = useRealtime(() => props.room)
19
- const { peers, updatePresence } = usePresence(props.room)
20
-
21
- const messageText = ref("")
22
- const messagesContainer = ref<HTMLElement | null>(null)
23
- let typingTimeout: any = null
24
-
25
- const chatMessages = computed(() => {
26
- return (history.value || []).filter((m) => m.type === "message" && m.event === "chat:message")
27
- })
28
-
29
- const typingPeers = computed(() => {
30
- return (peers.value || []).filter((p) => p.presence?.status === "typing" && p.name)
31
- })
32
-
33
- function scrollToBottom() {
34
- nextTick(() => {
35
- if (messagesContainer.value) {
36
- messagesContainer.value.scrollTop = messagesContainer.value.scrollHeight
37
- }
38
- })
39
- }
40
-
41
- watch(
42
- () => chatMessages.value.length,
43
- () => {
44
- scrollToBottom()
45
- },
46
- )
47
-
48
- onMounted(() => {
49
- scrollToBottom()
50
- })
51
-
52
- function handleInput() {
53
- updatePresence({ status: "typing" } as any)
54
- if (typingTimeout) clearTimeout(typingTimeout)
55
- typingTimeout = setTimeout(() => {
56
- updatePresence({ status: "online" } as any)
57
- typingTimeout = null
58
- }, 2000)
59
- }
60
-
61
- function handleSendMessage() {
62
- const text = messageText.value.trim()
63
- if (!text) return
64
-
65
- send("chat:message", {
66
- text,
67
- timestamp: Date.now(),
68
- })
69
-
70
- messageText.value = ""
71
- if (typingTimeout) {
72
- clearTimeout(typingTimeout)
73
- typingTimeout = null
74
- }
75
- updatePresence({ status: "online" } as any)
76
- scrollToBottom()
77
- }
78
-
79
- function formatTime(ts?: number) {
80
- if (!ts) return ""
81
- return new Date(ts).toLocaleTimeString([], {
82
- hour: "2-digit",
83
- minute: "2-digit",
84
- })
85
- }
86
- </script>
87
-
88
- <template>
89
- <div
90
- class="flex h-96 w-full max-w-md flex-col rounded-2xl border border-neutral-200 bg-white shadow-sm dark:border-neutral-800 dark:bg-neutral-900"
91
- >
92
- <!-- Header -->
93
- <div
94
- class="flex items-center justify-between border-b border-neutral-100 px-4 py-3 dark:border-neutral-800"
95
- >
96
- <div class="flex items-center gap-2">
97
- <h3 class="text-sm font-semibold text-neutral-900 dark:text-neutral-50">
98
- {{ title }}
99
- </h3>
100
- <span class="text-xs text-neutral-400">#{{ room }}</span>
101
- </div>
102
- <RealtimeStatus :room="room" size="sm" :show-latency="false" />
103
- </div>
104
-
105
- <!-- Messages Container -->
106
- <div ref="messagesContainer" class="flex-1 space-y-3 overflow-y-auto p-4 text-xs">
107
- <div
108
- v-if="chatMessages.length === 0"
109
- class="flex h-full items-center justify-center text-center text-neutral-400"
110
- >
111
- No messages yet. Send a message to get started!
112
- </div>
113
-
114
- <div v-for="msg in chatMessages" :key="msg.id || msg.timestamp" class="flex flex-col gap-1">
115
- <div class="flex items-baseline gap-2">
116
- <span class="font-semibold text-neutral-800 dark:text-neutral-200">
117
- {{ msg.user?.name || msg.sender || "Anonymous" }}
118
- </span>
119
- <span class="text-[10px] text-neutral-400">
120
- {{ formatTime(msg.timestamp) }}
121
- </span>
122
- </div>
123
- <div
124
- class="inline-block max-w-[85%] rounded-lg bg-neutral-100 px-3 py-2 text-neutral-800 dark:bg-neutral-800 dark:text-neutral-200"
125
- >
126
- {{ (msg.payload as any)?.text || msg.payload }}
127
- </div>
128
- </div>
129
- </div>
130
-
131
- <!-- Typing Indicator -->
132
- <div
133
- v-if="typingPeers.length > 0"
134
- class="border-t border-neutral-50 px-4 py-1 text-[11px] italic text-neutral-400 dark:border-neutral-850"
135
- >
136
- <span v-for="(p, i) in typingPeers" :key="p.id">
137
- {{ p.name }}<span v-if="i < typingPeers.length - 1">, </span>
138
- </span>
139
- {{ typingPeers.length === 1 ? "is typing..." : "are typing..." }}
140
- </div>
141
-
142
- <!-- Message Input Bar -->
143
- <form
144
- class="flex items-center gap-2 border-t border-neutral-100 p-3 dark:border-neutral-800"
145
- @submit.prevent="handleSendMessage"
146
- >
147
- <input
148
- v-model="messageText"
149
- type="text"
150
- :placeholder="placeholder"
151
- :disabled="!connected"
152
- class="flex-1 rounded-lg border border-neutral-200 bg-white px-3 py-2 text-xs text-neutral-900 placeholder:text-neutral-400 focus:border-neutral-900 focus:outline-none disabled:opacity-50 dark:border-neutral-700 dark:bg-neutral-800 dark:text-white dark:focus:border-neutral-400"
153
- @input="handleInput"
154
- />
155
- <button
156
- type="submit"
157
- :disabled="!connected || !messageText.trim()"
158
- class="rounded-lg bg-neutral-900 px-3 py-2 text-xs font-medium text-white transition hover:bg-neutral-800 disabled:opacity-50 dark:bg-neutral-100 dark:text-neutral-900 dark:hover:bg-white"
159
- >
160
- Send
161
- </button>
162
- </form>
163
- </div>
164
- </template>
@@ -1,129 +0,0 @@
1
- <script lang="ts" setup>
2
- import { computed } from "vue"
3
-
4
- import { usePresence } from "../composables/realtime"
5
-
6
- interface Props {
7
- room: string
8
- max?: number
9
- showCount?: boolean
10
- size?: "sm" | "md" | "lg"
11
- }
12
-
13
- const props = withDefaults(defineProps<Props>(), {
14
- max: 5,
15
- showCount: true,
16
- size: "md",
17
- })
18
-
19
- const { peers, onlineCount } = usePresence(props.room)
20
-
21
- const visiblePeers = computed(() => {
22
- return (peers.value || []).slice(0, props.max)
23
- })
24
-
25
- const overflowCount = computed(() => {
26
- const total = onlineCount.value || 0
27
- return Math.max(0, total - props.max)
28
- })
29
-
30
- const sizeClasses = computed(() => {
31
- switch (props.size) {
32
- case "sm":
33
- return "h-6 w-6 text-[10px]"
34
- case "lg":
35
- return "h-10 w-10 text-sm"
36
- case "md":
37
- default:
38
- return "h-8 w-8 text-xs"
39
- }
40
- })
41
-
42
- const bgColors = [
43
- "bg-blue-500",
44
- "bg-violet-500",
45
- "bg-pink-500",
46
- "bg-indigo-500",
47
- "bg-teal-500",
48
- "bg-emerald-500",
49
- "bg-amber-500",
50
- "bg-rose-500",
51
- ]
52
-
53
- function getAvatarColor(id: string) {
54
- let hash = 0
55
- for (let i = 0; i < id.length; i++) {
56
- hash = (hash << 5) - hash + id.charCodeAt(i)
57
- hash = Math.trunc(hash)
58
- }
59
- return bgColors[Math.abs(hash) % bgColors.length]
60
- }
61
-
62
- function getInitials(name?: string | null) {
63
- if (!name) return "?"
64
- return name
65
- .split(" ")
66
- .map((w) => w[0])
67
- .slice(0, 2)
68
- .join("")
69
- .toUpperCase()
70
- }
71
- </script>
72
-
73
- <template>
74
- <div class="inline-flex items-center">
75
- <div class="flex -space-x-2 overflow-hidden py-1">
76
- <div
77
- v-for="peer in visiblePeers"
78
- :key="peer.id"
79
- class="group relative inline-flex shrink-0 rounded-full border-2 border-white dark:border-neutral-900"
80
- :title="peer.name || 'Anonymous user'"
81
- >
82
- <img
83
- v-if="peer.avatar"
84
- :src="peer.avatar"
85
- :alt="peer.name || 'User'"
86
- class="rounded-full object-cover"
87
- :class="sizeClasses"
88
- />
89
- <div
90
- v-else
91
- class="flex items-center justify-center rounded-full font-bold text-white shadow-sm"
92
- :class="[sizeClasses, getAvatarColor(peer.id)]"
93
- >
94
- {{ getInitials(peer.name) }}
95
- </div>
96
-
97
- <!-- Online Pulse Dot -->
98
- <span
99
- class="absolute bottom-0 right-0 block h-2 w-2 rounded-full bg-emerald-500 ring-2 ring-white dark:ring-neutral-900"
100
- />
101
-
102
- <!-- Hover Tooltip -->
103
- <div
104
- class="pointer-events-none absolute bottom-full left-1/2 mb-2 hidden -translate-x-1/2 whitespace-nowrap rounded bg-neutral-900 px-2 py-1 text-[11px] font-medium text-white shadow-lg group-hover:block dark:bg-neutral-100 dark:text-neutral-900"
105
- >
106
- {{ peer.name || "Anonymous user" }}
107
- <span v-if="peer.presence?.status" class="text-neutral-400 dark:text-neutral-500">
108
- ({{ peer.presence.status }})
109
- </span>
110
- </div>
111
- </div>
112
-
113
- <!-- Overflow bubble (+N) -->
114
- <div
115
- v-if="overflowCount > 0"
116
- class="flex items-center justify-center rounded-full border-2 border-white bg-neutral-100 font-bold text-neutral-600 dark:border-neutral-900 dark:bg-neutral-800 dark:text-neutral-300"
117
- :class="sizeClasses"
118
- :title="`${overflowCount} more online`"
119
- >
120
- +{{ overflowCount }}
121
- </div>
122
- </div>
123
-
124
- <!-- Total count label -->
125
- <span v-if="showCount" class="ml-3 text-xs font-medium text-neutral-500 dark:text-neutral-400">
126
- {{ onlineCount }} {{ onlineCount === 1 ? "user" : "users" }} online
127
- </span>
128
- </div>
129
- </template>
@@ -1,79 +0,0 @@
1
- <script lang="ts" setup>
2
- import { computed } from "vue"
3
-
4
- import { useRealtime } from "../composables/realtime"
5
-
6
- interface Props {
7
- room?: string
8
- showLatency?: boolean
9
- showReconnect?: boolean
10
- size?: "sm" | "md"
11
- }
12
-
13
- const props = withDefaults(defineProps<Props>(), {
14
- room: "general",
15
- showLatency: true,
16
- showReconnect: true,
17
- size: "md",
18
- })
19
-
20
- const { connected, connecting, error, latency, connect } = useRealtime(() => props.room)
21
-
22
- const statusText = computed(() => {
23
- if (connected.value) return "Connected"
24
- if (connecting.value) return "Connecting..."
25
- if (error.value) return "Connection error"
26
- return "Disconnected"
27
- })
28
- </script>
29
-
30
- <template>
31
- <div
32
- class="inline-flex items-center gap-2 rounded-full border px-2.5 py-1 text-xs font-medium transition"
33
- :class="[
34
- connected
35
- ? 'border-emerald-200 bg-emerald-50/70 text-emerald-800 dark:border-emerald-900/60 dark:bg-emerald-950/40 dark:text-emerald-300'
36
- : connecting
37
- ? 'border-amber-200 bg-amber-50/70 text-amber-800 dark:border-amber-900/60 dark:bg-amber-950/40 dark:text-amber-300'
38
- : 'border-red-200 bg-red-50/70 text-red-800 dark:border-red-900/60 dark:bg-red-950/40 dark:text-red-300',
39
- size === 'sm' ? 'text-[11px] px-2 py-0.5' : 'text-xs px-2.5 py-1',
40
- ]"
41
- >
42
- <!-- Status Dot -->
43
- <span class="relative flex h-2 w-2">
44
- <span
45
- v-if="connected"
46
- class="absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-75"
47
- />
48
- <span
49
- v-else-if="connecting"
50
- class="absolute inline-flex h-full w-full animate-ping rounded-full bg-amber-400 opacity-75"
51
- />
52
- <span
53
- class="relative inline-flex h-2 w-2 rounded-full"
54
- :class="[connected ? 'bg-emerald-500' : connecting ? 'bg-amber-500' : 'bg-red-500']"
55
- />
56
- </span>
57
-
58
- <!-- Status Text -->
59
- <span>{{ statusText }}</span>
60
-
61
- <!-- Latency -->
62
- <span
63
- v-if="connected && showLatency && latency != null"
64
- class="text-[10px] text-neutral-400 dark:text-neutral-500"
65
- >
66
- {{ latency }}ms
67
- </span>
68
-
69
- <!-- Reconnect Button -->
70
- <button
71
- v-if="!connected && !connecting && showReconnect"
72
- type="button"
73
- class="ml-1 underline hover:text-neutral-900 dark:hover:text-white"
74
- @click="connect"
75
- >
76
- Retry
77
- </button>
78
- </div>
79
- </template>
@@ -1,207 +0,0 @@
1
- <script lang="ts" setup>
2
- import { computed, ref } from "vue"
3
-
4
- import { useSubscription } from "../composables/payments"
5
-
6
- interface Props {
7
- title?: string
8
- portalReturnUrl?: string
9
- pricingUrl?: string
10
- }
11
-
12
- const props = withDefaults(defineProps<Props>(), {
13
- title: "Subscription & Billing",
14
- portalReturnUrl: undefined,
15
- pricingUrl: "/pricing",
16
- })
17
-
18
- const { subscription, isSubscribed, status, plan, openPortal, cancel, refresh } = useSubscription()
19
-
20
- const portalLoading = ref(false)
21
- const cancelLoading = ref(false)
22
- const showCancelConfirm = ref(false)
23
- const cancelSuccess = ref(false)
24
- const errorMessage = ref("")
25
-
26
- const statusBadgeClass = computed(() => {
27
- switch (status.value) {
28
- case "active":
29
- return "bg-emerald-50 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-300"
30
- case "trialing":
31
- return "bg-blue-50 text-blue-700 dark:bg-blue-950 dark:text-blue-300"
32
- case "past_due":
33
- return "bg-amber-50 text-amber-700 dark:bg-amber-950 dark:text-amber-300"
34
- case "canceled":
35
- default:
36
- return "bg-neutral-100 text-neutral-600 dark:bg-neutral-800 dark:text-neutral-400"
37
- }
38
- })
39
-
40
- async function handleOpenPortal() {
41
- portalLoading.value = true
42
- errorMessage.value = ""
43
- try {
44
- await openPortal({ returnUrl: props.portalReturnUrl })
45
- } catch (err: any) {
46
- errorMessage.value = err?.data?.message || err?.message || "Failed to open billing portal"
47
- portalLoading.value = false
48
- }
49
- }
50
-
51
- async function handleCancelSubscription() {
52
- cancelLoading.value = true
53
- errorMessage.value = ""
54
- try {
55
- await cancel()
56
- cancelSuccess.value = true
57
- showCancelConfirm.value = false
58
- await refresh()
59
- } catch (err: any) {
60
- errorMessage.value = err?.data?.message || err?.message || "Failed to cancel subscription"
61
- } finally {
62
- cancelLoading.value = false
63
- }
64
- }
65
-
66
- function formatDate(ts?: number) {
67
- if (!ts) return "—"
68
- return new Date(ts).toLocaleDateString(undefined, {
69
- dateStyle: "medium",
70
- })
71
- }
72
- </script>
73
-
74
- <template>
75
- <div
76
- class="w-full rounded-2xl border border-neutral-200 bg-white p-6 shadow-sm dark:border-neutral-800 dark:bg-neutral-900"
77
- >
78
- <!-- Header -->
79
- <div
80
- class="flex items-center justify-between border-b border-neutral-100 pb-4 dark:border-neutral-800"
81
- >
82
- <div>
83
- <h3 class="text-base font-bold text-neutral-900 dark:text-neutral-50">
84
- {{ title }}
85
- </h3>
86
- <p class="text-xs text-neutral-500 dark:text-neutral-400">
87
- Manage your subscription plan, billing details, and download past invoices.
88
- </p>
89
- </div>
90
-
91
- <span
92
- v-if="status"
93
- class="rounded-full px-2.5 py-0.5 text-xs font-semibold capitalize"
94
- :class="statusBadgeClass"
95
- >
96
- {{ status.replace("_", " ") }}
97
- </span>
98
- </div>
99
-
100
- <!-- Error message -->
101
- <div
102
- v-if="errorMessage"
103
- class="mt-4 rounded-lg bg-red-50 p-3 text-xs text-red-700 dark:bg-red-950/50 dark:text-red-400"
104
- >
105
- {{ errorMessage }}
106
- </div>
107
-
108
- <!-- Cancel success -->
109
- <div
110
- v-if="cancelSuccess"
111
- class="mt-4 rounded-lg bg-emerald-50 p-3 text-xs text-emerald-700 dark:bg-emerald-950/50 dark:text-emerald-400"
112
- >
113
- Your subscription will be canceled at the end of the current billing period.
114
- </div>
115
-
116
- <!-- Plan info -->
117
- <div class="mt-4 space-y-4">
118
- <div
119
- v-if="isSubscribed && subscription"
120
- class="grid grid-cols-2 gap-4 text-xs sm:grid-cols-3"
121
- >
122
- <div>
123
- <p class="font-medium text-neutral-400">Current Plan</p>
124
- <p class="mt-0.5 text-sm font-bold text-neutral-900 dark:text-neutral-100 capitalize">
125
- {{ plan || "Pro Plan" }}
126
- </p>
127
- </div>
128
- <div>
129
- <p class="font-medium text-neutral-400">Renews On</p>
130
- <p class="mt-0.5 text-sm font-semibold text-neutral-800 dark:text-neutral-200">
131
- {{ formatDate(subscription.currentPeriodEnd) }}
132
- </p>
133
- </div>
134
- <div>
135
- <p class="font-medium text-neutral-400">Provider</p>
136
- <p class="mt-0.5 text-sm font-semibold text-neutral-800 dark:text-neutral-200 capitalize">
137
- {{ subscription.provider }}
138
- </p>
139
- </div>
140
- </div>
141
-
142
- <div v-else class="py-4 text-xs text-neutral-500">
143
- You are currently on the free tier. Upgrade to unlock all edge features.
144
- </div>
145
-
146
- <!-- Action Buttons -->
147
- <div class="flex flex-wrap items-center gap-3 pt-2">
148
- <button
149
- v-if="isSubscribed"
150
- type="button"
151
- :disabled="portalLoading"
152
- class="rounded-lg bg-neutral-900 px-4 py-2 text-xs font-medium text-white transition hover:bg-neutral-800 disabled:opacity-50 dark:bg-neutral-100 dark:text-neutral-900 dark:hover:bg-white"
153
- @click="handleOpenPortal"
154
- >
155
- {{ portalLoading ? "Opening..." : "Manage Billing & Invoices" }}
156
- </button>
157
-
158
- <a
159
- v-else
160
- :href="pricingUrl"
161
- class="inline-block rounded-lg bg-neutral-900 px-4 py-2 text-xs font-medium text-white transition hover:bg-neutral-800 dark:bg-neutral-100 dark:text-neutral-900 dark:hover:bg-white"
162
- >
163
- View Plans & Upgrade
164
- </a>
165
-
166
- <button
167
- v-if="isSubscribed && status === 'active' && !showCancelConfirm"
168
- type="button"
169
- class="rounded-lg border border-neutral-200 px-3 py-2 text-xs font-medium text-neutral-600 hover:bg-neutral-50 dark:border-neutral-700 dark:text-neutral-400 dark:hover:bg-neutral-800"
170
- @click="showCancelConfirm = true"
171
- >
172
- Cancel Subscription
173
- </button>
174
- </div>
175
-
176
- <!-- Cancel Confirmation -->
177
- <div
178
- v-if="showCancelConfirm"
179
- class="mt-3 rounded-xl border border-red-200 bg-red-50/50 p-4 text-xs dark:border-red-900/60 dark:bg-red-950/20"
180
- >
181
- <p class="font-semibold text-red-800 dark:text-red-300">
182
- Are you sure you want to cancel your subscription?
183
- </p>
184
- <p class="mt-1 text-red-600 dark:text-red-400">
185
- You will still have access to your plan until the end of the current billing cycle.
186
- </p>
187
- <div class="mt-3 flex gap-2">
188
- <button
189
- type="button"
190
- :disabled="cancelLoading"
191
- class="rounded-lg bg-red-600 px-3 py-1.5 font-medium text-white hover:bg-red-700 disabled:opacity-50"
192
- @click="handleCancelSubscription"
193
- >
194
- {{ cancelLoading ? "Canceling..." : "Confirm Cancellation" }}
195
- </button>
196
- <button
197
- type="button"
198
- class="rounded-lg border border-neutral-200 px-3 py-1.5 font-medium text-neutral-600 hover:bg-white dark:border-neutral-700 dark:text-neutral-300"
199
- @click="showCancelConfirm = false"
200
- >
201
- Keep Subscription
202
- </button>
203
- </div>
204
- </div>
205
- </div>
206
- </div>
207
- </template>