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.
- package/README.md +114 -26
- package/dist/apps/cms.d.ts +4 -0
- package/dist/apps/comments.d.ts +4 -0
- package/dist/apps/payments.d.ts +4 -0
- package/dist/apps/store.d.ts +4 -0
- package/dist/chunks/auth-schema.mjs +169 -30
- package/dist/chunks/tools.mjs +1680 -0
- package/dist/cli/index.mjs +1256 -221
- package/dist/core/aliases.d.ts +5 -0
- package/dist/core/context.d.ts +10 -0
- package/dist/core/cross-drive.d.ts +2 -0
- package/dist/core/d1-migrate.d.ts +4 -0
- package/dist/core/devtools.d.ts +4 -0
- package/dist/core/nitro.d.ts +4 -0
- package/dist/core/schema.d.ts +4 -0
- package/dist/core/server-utils.d.ts +4 -0
- package/dist/core/wrangler.d.ts +4 -0
- package/dist/dev/wrangler.d.ts +1 -0
- package/dist/fate/index.d.ts +8 -8
- package/dist/features/agents.d.ts +4 -0
- package/dist/features/auth.d.ts +4 -0
- package/dist/features/bots.d.ts +4 -0
- package/dist/features/fate.d.ts +4 -0
- package/dist/features/mail.d.ts +4 -0
- package/dist/features/mcp.d.ts +4 -0
- package/dist/features/multitenant.d.ts +4 -0
- package/dist/features/notifications.d.ts +4 -0
- package/dist/features/realtime.d.ts +4 -0
- package/dist/module.d.ts +10 -2
- package/dist/module.mjs +6313 -5118
- package/dist/primitives/ai.d.ts +4 -0
- package/dist/primitives/analytics.d.ts +4 -0
- package/dist/primitives/blob.d.ts +4 -0
- package/dist/primitives/browser.d.ts +4 -0
- package/dist/primitives/cache.d.ts +4 -0
- package/dist/primitives/d1.d.ts +4 -0
- package/dist/primitives/do.d.ts +4 -0
- package/dist/primitives/email.d.ts +4 -0
- package/dist/primitives/hyperdrive.d.ts +4 -0
- package/dist/primitives/kv.d.ts +4 -0
- package/dist/primitives/queue.d.ts +4 -0
- package/dist/primitives/ratelimit.d.ts +4 -0
- package/dist/primitives/vectorize.d.ts +4 -0
- package/dist/primitives/workflows.d.ts +4 -0
- package/dist/runtime/ai.d.ts +3 -3
- package/dist/runtime/ai.mjs +8 -1
- package/dist/runtime/app/components/RealtimeCursors.vue +2 -2
- package/dist/runtime/app/composables/ai.d.ts +56 -29
- package/dist/runtime/app/composables/analytics.d.ts +26 -106
- package/dist/runtime/app/composables/api-tokens.d.ts +31 -34
- package/dist/runtime/app/composables/auth.d.ts +147 -51
- package/dist/runtime/app/composables/auth.mjs +0 -7
- package/dist/runtime/app/composables/chat.d.ts +38 -35
- package/dist/runtime/app/composables/cms-preview.d.ts +30 -25
- package/dist/runtime/app/composables/cms.d.ts +57 -282
- package/dist/runtime/app/composables/cms.mjs +0 -35
- package/dist/runtime/app/composables/comments.d.ts +32 -5
- package/dist/runtime/app/composables/comments.mjs +29 -1
- package/dist/runtime/app/composables/docs-version.d.ts +25 -28
- package/dist/runtime/app/composables/impersonation.d.ts +22 -5
- package/dist/runtime/app/composables/organization.d.ts +38 -91
- package/dist/runtime/app/composables/passkey.d.ts +22 -6
- package/dist/runtime/app/composables/passwordless.d.ts +24 -7
- package/dist/runtime/app/composables/payments.d.ts +50 -34
- package/dist/runtime/app/composables/payments.mjs +1 -0
- package/dist/runtime/app/composables/sse.d.ts +76 -0
- package/dist/runtime/app/composables/sse.mjs +152 -0
- package/dist/runtime/app/composables/storage.d.ts +53 -65
- package/dist/runtime/app/composables/storage.mjs +17 -0
- package/dist/runtime/app/composables/store.d.ts +198 -0
- package/dist/runtime/app/composables/store.mjs +414 -0
- package/dist/runtime/app/composables/tenant.d.ts +31 -72
- package/dist/runtime/app/composables/turnstile.d.ts +16 -3
- package/dist/runtime/app/composables/two-factor.d.ts +23 -6
- package/dist/runtime/app/pages/devtools/notifications.vue +30 -27
- package/dist/runtime/app/pages/devtools/realtime.vue +19 -31
- package/dist/runtime/app/pages/devtools.vue +0 -7
- package/dist/runtime/auth.d.ts +9 -9
- package/dist/runtime/blob.d.ts +10 -1
- package/dist/runtime/blob.mjs +83 -0
- package/dist/runtime/cache.d.ts +48 -0
- package/dist/runtime/cache.mjs +92 -0
- package/dist/runtime/comments.d.ts +4 -0
- package/dist/runtime/comments.mjs +2 -0
- package/dist/runtime/db.d.ts +21 -1
- package/dist/runtime/db.mjs +54 -0
- package/dist/runtime/drizzle.d.ts +4 -2
- package/dist/runtime/drizzle.mjs +68 -1
- package/dist/runtime/durable-object.d.ts +2 -0
- package/dist/runtime/durable-object.mjs +2 -0
- package/dist/runtime/email.d.ts +1 -1
- package/dist/runtime/email.mjs +1 -1
- package/dist/runtime/kv.mjs +50 -1
- package/dist/runtime/mcp.d.ts +2 -0
- package/dist/runtime/mcp.mjs +2 -0
- package/dist/runtime/queue.d.ts +12 -2
- package/dist/runtime/queue.mjs +19 -1
- package/dist/runtime/ratelimit.d.ts +1 -0
- package/dist/runtime/ratelimit.mjs +7 -0
- package/dist/runtime/schema.d.ts +313 -0
- package/dist/runtime/schema.mjs +259 -0
- package/dist/runtime/server/db/cms-schema.d.ts +1225 -171
- package/dist/runtime/server/db/cms-schema.mjs +69 -70
- package/dist/runtime/server/db/store-schema.d.ts +4344 -0
- package/dist/runtime/server/db/store-schema.mjs +266 -0
- package/dist/runtime/server/durable-objects/agent.mjs +35 -0
- package/dist/runtime/server/durable-objects/room.mjs +0 -1
- package/dist/runtime/server/middleware/ratelimit.mjs +10 -8
- package/dist/runtime/server/plugins/comments.d.ts +7 -0
- package/dist/runtime/server/plugins/comments.mjs +7 -0
- package/dist/runtime/server/plugins/email-inbound.d.ts +5 -0
- package/dist/runtime/server/plugins/email-inbound.mjs +17 -0
- package/dist/runtime/server/plugins/store.d.ts +7 -0
- package/dist/runtime/server/plugins/store.mjs +7 -0
- package/dist/runtime/server/routes/__qarpeo/db/tables.get.mjs +2 -2
- package/dist/runtime/server/routes/atom.xml.get.mjs +3 -1
- package/dist/runtime/server/routes/auth/2fa/disable.post.mjs +13 -2
- package/dist/runtime/server/routes/auth/2fa/setup.post.mjs +9 -3
- package/dist/runtime/server/routes/auth/2fa/verify.post.mjs +11 -3
- package/dist/runtime/server/routes/auth/account.delete.mjs +2 -1
- package/dist/runtime/server/routes/auth/audit-logs.get.mjs +1 -1
- package/dist/runtime/server/routes/auth/magic-link/send.post.d.ts +1 -9
- package/dist/runtime/server/routes/auth/magic-link/send.post.mjs +8 -0
- package/dist/runtime/server/routes/auth/organization/sso/[id].delete.mjs +1 -1
- package/dist/runtime/server/routes/auth/organization/sso/index.get.mjs +1 -1
- package/dist/runtime/server/routes/auth/organization/sso/index.post.mjs +1 -1
- package/dist/runtime/server/routes/auth/otp/send.post.d.ts +1 -9
- package/dist/runtime/server/routes/auth/otp/send.post.mjs +8 -0
- package/dist/runtime/server/routes/auth/sso/login.get.mjs +3 -3
- package/dist/runtime/server/routes/auth/sso/oidc/callback.get.mjs +1 -1
- package/dist/runtime/server/routes/auth/sso/saml/acs.post.mjs +2 -2
- package/dist/runtime/server/routes/auth/webauthn/login/options.post.mjs +1 -1
- package/dist/runtime/server/routes/auth/webauthn/login/verify.post.mjs +1 -1
- package/dist/runtime/server/routes/auth/webauthn/register/options.post.mjs +2 -2
- package/dist/runtime/server/routes/auth/webauthn/register/verify.post.mjs +1 -1
- package/dist/runtime/server/routes/cms/[collection]/[id]/preview-token.post.mjs +1 -1
- package/dist/runtime/server/routes/cms/[collection]/atom.xml.get.mjs +3 -1
- package/dist/runtime/server/routes/cms/[collection]/feed.xml.get.mjs +3 -1
- package/dist/runtime/server/routes/cms/bookmarks/[id].delete.mjs +1 -1
- package/dist/runtime/server/routes/cms/bookmarks/check.post.mjs +1 -1
- package/dist/runtime/server/routes/cms/bookmarks/index.get.mjs +1 -1
- package/dist/runtime/server/routes/cms/bookmarks/index.post.mjs +1 -1
- package/dist/runtime/server/routes/cms/deploy.post.mjs +1 -1
- package/dist/runtime/server/routes/cms/export.post.mjs +4 -3
- package/dist/runtime/server/routes/cms/search.get.mjs +7 -5
- package/dist/runtime/server/routes/cms/sync.post.mjs +2 -1
- package/dist/runtime/server/routes/comments/[id]/react.post.mjs +1 -2
- package/dist/runtime/server/routes/comments/[id]/report.post.d.ts +1 -1
- package/dist/runtime/server/routes/comments/[id]/report.post.mjs +0 -2
- package/dist/runtime/server/routes/comments/[id].delete.mjs +8 -4
- package/dist/runtime/server/routes/comments/[id].get.d.ts +1 -1
- package/dist/runtime/server/routes/comments/[id].get.mjs +1 -2
- package/dist/runtime/server/routes/comments/[id].patch.d.ts +1 -1
- package/dist/runtime/server/routes/comments/[id].patch.mjs +6 -3
- package/dist/runtime/server/routes/comments/batch.post.d.ts +2 -0
- package/dist/runtime/server/routes/comments/batch.post.mjs +33 -0
- package/dist/runtime/server/routes/comments/index.get.d.ts +1 -1
- package/dist/runtime/server/routes/comments/index.get.mjs +6 -4
- package/dist/runtime/server/routes/comments/index.post.d.ts +1 -1
- package/dist/runtime/server/routes/comments/index.post.mjs +6 -2
- package/dist/runtime/server/routes/feed.xml.get.mjs +3 -1
- package/dist/runtime/server/routes/sitemap.xml.get.mjs +3 -1
- package/dist/runtime/server/routes/storage/presigned-r2.post.d.ts +17 -0
- package/dist/runtime/server/routes/storage/presigned-r2.post.mjs +29 -0
- package/dist/runtime/server/routes/store/cart/index.delete.d.ts +6 -0
- package/dist/runtime/server/routes/store/cart/index.delete.mjs +11 -0
- package/dist/runtime/server/routes/store/cart/index.get.d.ts +5 -0
- package/dist/runtime/server/routes/store/cart/index.get.mjs +14 -0
- package/dist/runtime/server/routes/store/cart/items/[id].delete.d.ts +6 -0
- package/dist/runtime/server/routes/store/cart/items/[id].delete.mjs +25 -0
- package/dist/runtime/server/routes/store/cart/items/[id].patch.d.ts +6 -0
- package/dist/runtime/server/routes/store/cart/items/[id].patch.mjs +29 -0
- package/dist/runtime/server/routes/store/cart/items.post.d.ts +6 -0
- package/dist/runtime/server/routes/store/cart/items.post.mjs +36 -0
- package/dist/runtime/server/routes/store/categories/index.get.d.ts +2 -0
- package/dist/runtime/server/routes/store/categories/index.get.mjs +8 -0
- package/dist/runtime/server/routes/store/checkout.post.d.ts +6 -0
- package/dist/runtime/server/routes/store/checkout.post.mjs +21 -0
- package/dist/runtime/server/routes/store/coupons/apply.post.d.ts +7 -0
- package/dist/runtime/server/routes/store/coupons/apply.post.mjs +18 -0
- package/dist/runtime/server/routes/store/currencies.get.d.ts +15 -0
- package/dist/runtime/server/routes/store/currencies.get.mjs +13 -0
- package/dist/runtime/server/routes/store/orders/[id].get.d.ts +2 -0
- package/dist/runtime/server/routes/store/orders/[id].get.mjs +26 -0
- package/dist/runtime/server/routes/store/orders/download/[token].get.d.ts +7 -0
- package/dist/runtime/server/routes/store/orders/download/[token].get.mjs +57 -0
- package/dist/runtime/server/routes/store/orders/index.get.d.ts +5 -0
- package/dist/runtime/server/routes/store/orders/index.get.mjs +30 -0
- package/dist/runtime/server/routes/store/products/[slug].get.d.ts +2 -0
- package/dist/runtime/server/routes/store/products/[slug].get.mjs +18 -0
- package/dist/runtime/server/routes/store/products/index.get.d.ts +5 -0
- package/dist/runtime/server/routes/store/products/index.get.mjs +33 -0
- package/dist/runtime/server/routes/store/tax/calculate.post.d.ts +9 -0
- package/dist/runtime/server/routes/store/tax/calculate.post.mjs +18 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/index.delete.mjs +14 -1
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/verify.post.mjs +14 -1
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.get.mjs +24 -1
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.post.mjs +6 -0
- package/dist/runtime/server/utils/ai.d.ts +146 -21
- package/dist/runtime/server/utils/ai.mjs +406 -11
- package/dist/runtime/server/utils/analytics-query.d.ts +13 -58
- package/dist/runtime/server/utils/audit.d.ts +5 -4
- package/dist/runtime/server/utils/audit.mjs +25 -14
- package/dist/runtime/server/utils/auth.d.ts +29 -12
- package/dist/runtime/server/utils/auth.mjs +88 -70
- package/dist/runtime/server/utils/bots.d.ts +20 -4
- package/dist/runtime/server/utils/bots.mjs +7 -3
- package/dist/runtime/server/utils/browser-utils.d.ts +23 -23
- package/dist/runtime/server/utils/cache.d.ts +3 -3
- package/dist/runtime/server/utils/cms/collections.d.ts +23 -0
- package/dist/runtime/server/utils/cms/collections.mjs +143 -0
- package/dist/runtime/server/utils/cms/common.d.ts +9 -0
- package/dist/runtime/server/utils/cms/common.mjs +28 -0
- package/dist/runtime/server/utils/cms/git.mjs +2 -2
- package/dist/runtime/server/utils/cms/navigation.d.ts +46 -0
- package/dist/runtime/server/utils/cms/navigation.mjs +683 -0
- package/dist/runtime/server/utils/cms/preview.d.ts +11 -0
- package/dist/runtime/server/utils/cms/preview.mjs +50 -0
- package/dist/runtime/server/utils/cms/search.d.ts +1 -1
- package/dist/runtime/server/utils/cms/search.mjs +11 -7
- package/dist/runtime/server/utils/cms/sync.d.ts +34 -0
- package/dist/runtime/server/utils/cms/sync.mjs +1082 -0
- package/dist/runtime/server/utils/cms/taxonomy.d.ts +103 -0
- package/dist/runtime/server/utils/cms/taxonomy.mjs +348 -0
- package/dist/runtime/server/utils/cms.d.ts +13 -249
- package/dist/runtime/server/utils/cms.mjs +108 -2350
- package/dist/runtime/server/utils/comments-filter.d.ts +45 -0
- package/dist/runtime/server/utils/comments-filter.mjs +541 -0
- package/dist/runtime/server/utils/comments.d.ts +71 -0
- package/dist/runtime/server/utils/comments.mjs +137 -61
- package/dist/runtime/server/utils/config.d.ts +4 -3
- package/dist/runtime/server/utils/config.mjs +7 -6
- package/dist/runtime/server/utils/context.d.ts +14 -0
- package/dist/runtime/server/utils/context.mjs +2 -2
- package/dist/runtime/server/utils/crypto.d.ts +44 -5
- package/dist/runtime/server/utils/crypto.mjs +18 -0
- package/dist/runtime/server/utils/domains.mjs +9 -5
- package/dist/runtime/server/utils/drizzle.d.ts +35 -3
- package/dist/runtime/server/utils/drizzle.mjs +115 -6
- package/dist/runtime/server/utils/durable-object.d.ts +106 -0
- package/dist/runtime/server/utils/durable-object.mjs +628 -0
- package/dist/runtime/server/utils/email-inbound.d.ts +29 -0
- package/dist/runtime/server/utils/email-inbound.mjs +76 -0
- package/dist/runtime/server/utils/impersonation.d.ts +32 -2
- package/dist/runtime/server/utils/impersonation.mjs +16 -13
- package/dist/runtime/server/utils/lock.d.ts +71 -0
- package/dist/runtime/server/utils/lock.mjs +139 -0
- package/dist/runtime/server/utils/mail-suppression.mjs +7 -7
- package/dist/runtime/server/utils/mail.d.ts +30 -19
- package/dist/runtime/server/utils/mcp.d.ts +44 -0
- package/dist/runtime/server/utils/mcp.mjs +308 -0
- package/dist/runtime/server/utils/notifications.d.ts +72 -7
- package/dist/runtime/server/utils/notifications.mjs +67 -55
- package/dist/runtime/server/utils/oauth.d.ts +27 -4
- package/dist/runtime/server/utils/organization.d.ts +63 -7
- package/dist/runtime/server/utils/organization.mjs +26 -21
- package/dist/runtime/server/utils/passwordless.d.ts +62 -33
- package/dist/runtime/server/utils/payments.d.ts +51 -12
- package/dist/runtime/server/utils/payments.mjs +472 -282
- package/dist/runtime/server/utils/queue.d.ts +106 -13
- package/dist/runtime/server/utils/queue.mjs +313 -28
- package/dist/runtime/server/utils/rag.d.ts +42 -14
- package/dist/runtime/server/utils/rag.mjs +169 -4
- package/dist/runtime/server/utils/ratelimit.d.ts +34 -5
- package/dist/runtime/server/utils/ratelimit.mjs +95 -14
- package/dist/runtime/server/utils/realtime.d.ts +68 -52
- package/dist/runtime/server/utils/scheduled-task.d.ts +42 -1
- package/dist/runtime/server/utils/scheduled-task.mjs +29 -0
- package/dist/runtime/server/utils/schema-fallback.d.ts +1 -1
- package/dist/runtime/server/utils/schema-fallback.mjs +1 -1
- package/dist/runtime/server/utils/session.d.ts +84 -10
- package/dist/runtime/server/utils/session.mjs +12 -10
- package/dist/runtime/server/utils/sse.d.ts +75 -0
- package/dist/runtime/server/utils/sse.mjs +147 -0
- package/dist/runtime/server/utils/sso.d.ts +1 -1
- package/dist/runtime/server/utils/storage.d.ts +53 -4
- package/dist/runtime/server/utils/storage.mjs +15 -11
- package/dist/runtime/server/utils/store-localization.d.ts +51 -0
- package/dist/runtime/server/utils/store-localization.mjs +417 -0
- package/dist/runtime/server/utils/store.d.ts +207 -0
- package/dist/runtime/server/utils/store.mjs +2227 -0
- package/dist/runtime/server/utils/table-names.d.ts +51 -0
- package/dist/runtime/server/utils/table-names.mjs +69 -0
- package/dist/runtime/server/utils/tenant.d.ts +26 -2
- package/dist/runtime/server/utils/tenant.mjs +16 -12
- package/dist/runtime/server/utils/tools-registry-fallback.d.ts +1 -0
- package/dist/runtime/server/utils/tools-registry-fallback.mjs +1 -0
- package/dist/runtime/server/utils/totp.d.ts +45 -2
- package/dist/runtime/server/utils/tracker.d.ts +10 -11
- package/dist/runtime/server/utils/turnstile.d.ts +16 -1
- package/dist/runtime/server/utils/workflows.d.ts +92 -0
- package/dist/runtime/server/utils/workflows.mjs +299 -0
- package/dist/runtime/server.d.ts +8 -1
- package/dist/runtime/server.mjs +8 -5
- package/dist/runtime/service.d.ts +10 -10
- package/dist/runtime/storage.d.ts +1 -0
- package/dist/runtime/storage.mjs +1 -0
- package/dist/runtime/store.d.ts +4 -0
- package/dist/runtime/store.mjs +2 -0
- package/dist/runtime/test-utils.d.ts +11 -10
- package/dist/runtime/test-utils.mjs +64 -4
- package/dist/runtime/types/ai.d.ts +21 -2
- package/dist/runtime/types/d1.d.ts +17 -0
- package/dist/runtime/types/drizzle.d.ts +2 -2
- package/dist/runtime/types/durable-object.d.ts +62 -2
- package/dist/runtime/types/email.d.ts +46 -0
- package/dist/runtime/types/imports.d.ts +6 -1
- package/dist/runtime/types/index.d.ts +58 -0
- package/dist/runtime/types/index.mjs +3 -0
- package/dist/runtime/types/mcp.d.ts +83 -0
- package/dist/runtime/types/mcp.mjs +0 -0
- package/dist/runtime/types/queue.d.ts +36 -0
- package/dist/runtime/types/r2.d.ts +41 -0
- package/dist/runtime/types/store.d.ts +313 -0
- package/dist/runtime/types/store.mjs +0 -0
- package/dist/runtime/types/workflows.d.ts +98 -0
- package/dist/runtime/types/workflows.mjs +0 -0
- package/dist/runtime/workflows.d.ts +5 -0
- package/dist/runtime/workflows.mjs +2 -0
- package/dist/types/ai.d.ts +721 -0
- package/dist/types/cms.d.ts +710 -0
- package/dist/types.d.ts +406 -1288
- package/dist/utils/auth-schema.d.ts +3 -2
- package/dist/utils/bots.d.ts +20 -0
- package/dist/utils/comments-schema.d.ts +5 -4
- package/dist/utils/drizzle.d.ts +83 -3
- package/dist/utils/durable-objects.d.ts +10 -0
- package/dist/utils/email-inbound.d.ts +10 -0
- package/dist/utils/local-db.d.ts +1 -3
- package/dist/utils/mcp.d.ts +24 -0
- package/dist/utils/notifications-schema.d.ts +5 -4
- package/dist/utils/payments-schema.d.ts +4 -3
- package/dist/utils/store-schema.d.ts +14 -0
- package/dist/utils/table-names.d.ts +1 -0
- package/dist/utils/tenants-schema.d.ts +4 -3
- package/dist/utils/tools.d.ts +20 -0
- package/dist/utils/workflows.d.ts +8 -0
- package/package.json +34 -4
- package/dist/chunks/wrangler.mjs +0 -897
- package/dist/runtime/app/components/AuthRegister.vue +0 -306
- package/dist/runtime/app/components/AuthSessionsList.vue +0 -137
- package/dist/runtime/app/components/AuthSignIn.vue +0 -298
- package/dist/runtime/app/components/CMSBookmarkButton.vue +0 -59
- package/dist/runtime/app/components/CMSImage.vue +0 -47
- package/dist/runtime/app/components/CMSLocaleSwitcher.vue +0 -110
- package/dist/runtime/app/components/CMSNewsletter.vue +0 -81
- package/dist/runtime/app/components/CMSPreviewBanner.vue +0 -83
- package/dist/runtime/app/components/CMSTableOfContents.vue +0 -84
- package/dist/runtime/app/components/CMSVersionBanner.vue +0 -53
- package/dist/runtime/app/components/CMSVersionSwitcher.vue +0 -140
- package/dist/runtime/app/components/Comments.vue +0 -411
- package/dist/runtime/app/components/FileUpload.vue +0 -200
- package/dist/runtime/app/components/ImpersonationBanner.vue +0 -61
- package/dist/runtime/app/components/NotificationBell.vue +0 -263
- package/dist/runtime/app/components/NotificationList.vue +0 -205
- package/dist/runtime/app/components/NotificationPrompt.vue +0 -133
- package/dist/runtime/app/components/PricingGated.vue +0 -81
- package/dist/runtime/app/components/PricingTable.vue +0 -274
- package/dist/runtime/app/components/RealtimeChat.vue +0 -164
- package/dist/runtime/app/components/RealtimePresence.vue +0 -129
- package/dist/runtime/app/components/RealtimeStatus.vue +0 -79
- package/dist/runtime/app/components/SubscriptionCard.vue +0 -207
- package/dist/runtime/app/components/UserProfile.vue +0 -558
|
@@ -67,87 +67,75 @@ export interface UploadFileOptions {
|
|
|
67
67
|
/** Extra body fields */
|
|
68
68
|
body?: Record<string, any>;
|
|
69
69
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
* // Using a custom API route
|
|
79
|
-
* const { upload, uploadMultiple, isUploading, progress, error, abort, reset } =
|
|
80
|
-
* useUpload("/api/avatars")
|
|
81
|
-
* ```
|
|
82
|
-
*/
|
|
83
|
-
export declare function useBlob(endpointOrOptions?: string | Ref<string> | (() => string) | UseUploadOptions, initialOptions?: UseUploadOptions): {
|
|
84
|
-
file: Ref<{
|
|
85
|
-
readonly lastModified: number;
|
|
86
|
-
readonly name: string;
|
|
87
|
-
readonly webkitRelativePath: string;
|
|
88
|
-
readonly size: number;
|
|
89
|
-
readonly type: string;
|
|
90
|
-
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
91
|
-
bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
92
|
-
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
93
|
-
stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
94
|
-
text: () => Promise<string>;
|
|
95
|
-
} | null, File | {
|
|
96
|
-
readonly lastModified: number;
|
|
97
|
-
readonly name: string;
|
|
98
|
-
readonly webkitRelativePath: string;
|
|
99
|
-
readonly size: number;
|
|
100
|
-
readonly type: string;
|
|
101
|
-
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
102
|
-
bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
103
|
-
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
104
|
-
stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
105
|
-
text: () => Promise<string>;
|
|
106
|
-
} | null>;
|
|
107
|
-
files: Ref<{
|
|
108
|
-
readonly lastModified: number;
|
|
109
|
-
readonly name: string;
|
|
110
|
-
readonly webkitRelativePath: string;
|
|
111
|
-
readonly size: number;
|
|
112
|
-
readonly type: string;
|
|
113
|
-
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
114
|
-
bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
115
|
-
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
116
|
-
stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
117
|
-
text: () => Promise<string>;
|
|
118
|
-
}[], File[] | {
|
|
119
|
-
readonly lastModified: number;
|
|
120
|
-
readonly name: string;
|
|
121
|
-
readonly webkitRelativePath: string;
|
|
122
|
-
readonly size: number;
|
|
123
|
-
readonly type: string;
|
|
124
|
-
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
125
|
-
bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
126
|
-
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
127
|
-
stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
128
|
-
text: () => Promise<string>;
|
|
129
|
-
}[]>;
|
|
130
|
-
preview: Ref<string | null, string | null>;
|
|
70
|
+
export interface UseBlobReturn {
|
|
71
|
+
/** Selected single file or null. */
|
|
72
|
+
file: Ref<File | null>;
|
|
73
|
+
/** Selected multiple files array. */
|
|
74
|
+
files: Ref<File[]>;
|
|
75
|
+
/** Local object URL preview for selected image. */
|
|
76
|
+
preview: Ref<string | null>;
|
|
77
|
+
/** Opens browser native file picker dialog. */
|
|
131
78
|
open: <T extends OpenFileDialogOptions>(opts?: T) => Promise<T extends {
|
|
132
79
|
upload: true;
|
|
133
80
|
} ? UploadedFile | UploadedFile[] | null : T extends {
|
|
134
81
|
multiple: true;
|
|
135
82
|
} ? File[] | null : File | null>;
|
|
83
|
+
/** Uploads the selected file or specified file override. */
|
|
136
84
|
upload: (fileOrOpts?: File | Blob | UploadFileOptions, maybeOpts?: UploadFileOptions) => Promise<UploadedFile>;
|
|
85
|
+
/** Uploads multiple files simultaneously. */
|
|
137
86
|
uploadMultiple: (filesOrOpts?: FileList | File[] | UploadFileOptions, maybeOpts?: UploadFileOptions) => Promise<UploadedFile[]>;
|
|
87
|
+
/** Deletes a file by its storage key. */
|
|
138
88
|
delete: (key: string) => Promise<{
|
|
139
89
|
success: boolean;
|
|
140
90
|
}>;
|
|
91
|
+
/** Alias for delete. */
|
|
141
92
|
deleteFile: (key: string) => Promise<{
|
|
142
93
|
success: boolean;
|
|
143
94
|
}>;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
95
|
+
/** Generates a direct R2 presigned upload URL from the server endpoint. */
|
|
96
|
+
createUploadUrl: (pathname: string, options?: {
|
|
97
|
+
contentType?: string;
|
|
98
|
+
expiresIn?: number | string;
|
|
99
|
+
}) => Promise<{
|
|
100
|
+
url: string;
|
|
101
|
+
key: string;
|
|
102
|
+
expiresAt: number;
|
|
103
|
+
}>;
|
|
104
|
+
/** Whether an upload is in progress. */
|
|
105
|
+
isUploading: Ref<boolean>;
|
|
106
|
+
/** Upload percentage progress (0 - 100). */
|
|
107
|
+
progress: Ref<number>;
|
|
108
|
+
/** Error encountered during file upload. */
|
|
109
|
+
error: Ref<Error | null>;
|
|
110
|
+
/** Aborts ongoing upload request. */
|
|
147
111
|
abort: () => void;
|
|
112
|
+
/** Resets file selection, preview, and progress state. */
|
|
148
113
|
reset: () => void;
|
|
149
|
-
}
|
|
114
|
+
}
|
|
115
|
+
export type UseUploadReturn = UseBlobReturn;
|
|
116
|
+
/**
|
|
117
|
+
* Headless file upload and R2 blob management composable.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```vue
|
|
121
|
+
* <script setup lang="ts">
|
|
122
|
+
* const { open, upload, isUploading, progress, preview } = useBlob('/api/upload')
|
|
123
|
+
* </script>
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
export declare function useBlob(endpointOrOptions?: string | Ref<string> | (() => string) | UseUploadOptions, initialOptions?: UseUploadOptions): UseBlobReturn;
|
|
150
127
|
export declare const useUpload: typeof useBlob;
|
|
128
|
+
/**
|
|
129
|
+
* Request a direct R2 presigned upload URL from the server endpoint.
|
|
130
|
+
*/
|
|
131
|
+
export declare function createUploadUrl(pathname: string, options?: {
|
|
132
|
+
contentType?: string;
|
|
133
|
+
expiresIn?: number | string;
|
|
134
|
+
}): Promise<{
|
|
135
|
+
url: string;
|
|
136
|
+
key: string;
|
|
137
|
+
expiresAt: number;
|
|
138
|
+
}>;
|
|
151
139
|
/**
|
|
152
140
|
* Composable to resolve an R2 blob URL with optional image transforms or presets. Accepts string,
|
|
153
141
|
* ref, or getter for full Vue reactivity.
|
|
@@ -406,6 +406,7 @@ export function useBlob(endpointOrOptions, initialOptions = {}) {
|
|
|
406
406
|
uploadMultiple,
|
|
407
407
|
delete: deleteFile,
|
|
408
408
|
deleteFile,
|
|
409
|
+
createUploadUrl,
|
|
409
410
|
isUploading,
|
|
410
411
|
progress,
|
|
411
412
|
error,
|
|
@@ -414,6 +415,22 @@ export function useBlob(endpointOrOptions, initialOptions = {}) {
|
|
|
414
415
|
};
|
|
415
416
|
}
|
|
416
417
|
export const useUpload = useBlob;
|
|
418
|
+
export async function createUploadUrl(pathname, options) {
|
|
419
|
+
let storageConfig = {};
|
|
420
|
+
try {
|
|
421
|
+
const runtimeConfig = useRuntimeConfig();
|
|
422
|
+
storageConfig = runtimeConfig.public?.qarpeo?.storage || runtimeConfig.public?.qarpeo?.blob || {};
|
|
423
|
+
} catch {
|
|
424
|
+
}
|
|
425
|
+
const prefix = storageConfig.prefix || "/api/storage";
|
|
426
|
+
return await $fetch(`${prefix}/presigned-r2`, {
|
|
427
|
+
method: "POST",
|
|
428
|
+
body: {
|
|
429
|
+
pathname,
|
|
430
|
+
...options
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
}
|
|
417
434
|
export function useBlobUrl(key, transform) {
|
|
418
435
|
return computed(() => {
|
|
419
436
|
const rawKey = toValue(key);
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { type ComputedRef, type MaybeRefOrGetter, type Ref } from "vue";
|
|
2
|
+
import type { StoreProduct, StoreProductVariant, StoreCart, StoreCartItem, StoreCartTotals, StoreCustomerAddress, StoreOrder, StoreQueryProductsOptions } from "../../types/store";
|
|
3
|
+
export interface UseCartReturn {
|
|
4
|
+
/** Reactive reference to the current shopping cart or null if empty. */
|
|
5
|
+
cart: Ref<StoreCart | null>;
|
|
6
|
+
/** Computed / reactive financial totals (subtotal, taxes, shipping, discounts, grand total). */
|
|
7
|
+
totals: Ref<StoreCartTotals>;
|
|
8
|
+
/** Total item count across all line items in the cart. */
|
|
9
|
+
itemCount: Ref<number>;
|
|
10
|
+
/** Whether a cart mutation or network fetch is in flight. */
|
|
11
|
+
loading: Ref<boolean>;
|
|
12
|
+
/** Most recent error encountered during a cart operation. */
|
|
13
|
+
error: Ref<Error | null>;
|
|
14
|
+
/** Refreshes the cart state from the edge store API. */
|
|
15
|
+
fetchCart: () => Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Adds an item variant to the cart with optional quantity and custom attributes.
|
|
18
|
+
*
|
|
19
|
+
* @param productId - Target product ID
|
|
20
|
+
* @param variantId - Selected variant ID
|
|
21
|
+
* @param quantity - Quantity to add (default: 1)
|
|
22
|
+
* @param customAttributes - Optional custom attributes for the line item
|
|
23
|
+
*/
|
|
24
|
+
addToCart: (productId: string, variantId: string, quantity?: number, customAttributes?: Record<string, unknown>) => Promise<StoreCartItem | null>;
|
|
25
|
+
/**
|
|
26
|
+
* Updates the quantity of a specific cart line item.
|
|
27
|
+
*
|
|
28
|
+
* @param itemId - Line item ID in the cart
|
|
29
|
+
* @param quantity - New quantity (0 will remove the item)
|
|
30
|
+
*/
|
|
31
|
+
updateQuantity: (itemId: string, quantity: number) => Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Removes a line item from the cart.
|
|
34
|
+
*
|
|
35
|
+
* @param itemId - Line item ID to remove
|
|
36
|
+
*/
|
|
37
|
+
removeItem: (itemId: string) => Promise<void>;
|
|
38
|
+
/** Clears all items and coupon codes from the current cart. */
|
|
39
|
+
clearCart: () => Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Validates and applies a coupon code to the current cart.
|
|
42
|
+
*
|
|
43
|
+
* @param code - Coupon code string
|
|
44
|
+
*/
|
|
45
|
+
applyCoupon: (code: string) => Promise<{
|
|
46
|
+
success: boolean;
|
|
47
|
+
message?: string;
|
|
48
|
+
}>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Headless e-commerce shopping cart composable with persistent session state.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```vue
|
|
55
|
+
* <script setup lang="ts">
|
|
56
|
+
* const { cart, totals, itemCount, loading, addToCart, removeItem } = useCart()
|
|
57
|
+
* </script>
|
|
58
|
+
*
|
|
59
|
+
* <template>
|
|
60
|
+
* <div>Items in cart: {{ itemCount }} — Total: ${{ totals.total }}</div>
|
|
61
|
+
* </template>
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export declare function useCart(): UseCartReturn;
|
|
65
|
+
export interface UseProductsOptions {
|
|
66
|
+
category?: MaybeRefOrGetter<string | undefined>;
|
|
67
|
+
search?: MaybeRefOrGetter<string | undefined>;
|
|
68
|
+
sortBy?: MaybeRefOrGetter<StoreQueryProductsOptions["sortBy"] | undefined>;
|
|
69
|
+
limit?: MaybeRefOrGetter<number | undefined>;
|
|
70
|
+
minPrice?: MaybeRefOrGetter<number | undefined>;
|
|
71
|
+
maxPrice?: MaybeRefOrGetter<number | undefined>;
|
|
72
|
+
inStockOnly?: MaybeRefOrGetter<boolean | undefined>;
|
|
73
|
+
}
|
|
74
|
+
export interface UseProductsReturn {
|
|
75
|
+
/** Reactive list of products matching the active filters. */
|
|
76
|
+
products: Ref<StoreProduct[]>;
|
|
77
|
+
/** Total number of products in database matching current query filters. */
|
|
78
|
+
total: Ref<number>;
|
|
79
|
+
/** Whether a product query request is in progress. */
|
|
80
|
+
loading: Ref<boolean>;
|
|
81
|
+
/** Most recent error encountered while fetching products. */
|
|
82
|
+
error: Ref<Error | null>;
|
|
83
|
+
/** Whether additional paginated results remain to be loaded. */
|
|
84
|
+
hasMore: Ref<boolean>;
|
|
85
|
+
/** Resets pagination offset and reloads products from page 1. */
|
|
86
|
+
refresh: () => Promise<void>;
|
|
87
|
+
/** Fetches and appends the next page of products. */
|
|
88
|
+
loadMore: () => Promise<void>;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Headless reactive product catalog composable with automated filter watching,
|
|
92
|
+
* debounced query parameters, and infinite pagination support.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```vue
|
|
96
|
+
* <script setup lang="ts">
|
|
97
|
+
* const search = ref('')
|
|
98
|
+
* const { products, total, loading, loadMore, hasMore } = useProducts({ search })
|
|
99
|
+
* </script>
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
export declare function useProducts(options?: UseProductsOptions): UseProductsReturn;
|
|
103
|
+
export interface UseProductReturn {
|
|
104
|
+
/** Active product record or null if not loaded / not found. */
|
|
105
|
+
product: Ref<StoreProduct | null>;
|
|
106
|
+
/** Currently selected product variant. */
|
|
107
|
+
selectedVariant: Ref<StoreProductVariant | null>;
|
|
108
|
+
/** Current effective price accounting for variant price overrides. */
|
|
109
|
+
currentPrice: Ref<number>;
|
|
110
|
+
/** Whether the selected variant is in stock or allows backorder. */
|
|
111
|
+
inStock: Ref<boolean>;
|
|
112
|
+
/** Whether the product data is actively being fetched. */
|
|
113
|
+
loading: Ref<boolean>;
|
|
114
|
+
/** Most recent error encountered during product retrieval. */
|
|
115
|
+
error: Ref<Error | null>;
|
|
116
|
+
/** Switches the actively selected variant by ID. */
|
|
117
|
+
selectVariant: (variantId: string) => void;
|
|
118
|
+
/** Refetches the product data from the server. */
|
|
119
|
+
refresh: () => Promise<void>;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Headless single product details composable with variant selection and real-time inventory checks.
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```vue
|
|
126
|
+
* <script setup lang="ts">
|
|
127
|
+
* const route = useRoute()
|
|
128
|
+
* const { product, selectedVariant, currentPrice, inStock, selectVariant } = useProduct(() => route.params.slug as string)
|
|
129
|
+
* </script>
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
export declare function useProduct(slugOrId: MaybeRefOrGetter<string>): UseProductReturn;
|
|
133
|
+
export interface CheckoutInput {
|
|
134
|
+
customerEmail: string;
|
|
135
|
+
customerName?: string;
|
|
136
|
+
shippingAddress?: StoreCustomerAddress;
|
|
137
|
+
billingAddress?: StoreCustomerAddress;
|
|
138
|
+
successUrl?: string;
|
|
139
|
+
cancelUrl?: string;
|
|
140
|
+
}
|
|
141
|
+
export interface UseCheckoutReturn {
|
|
142
|
+
/** Whether checkout submission is in flight. */
|
|
143
|
+
loading: Ref<boolean>;
|
|
144
|
+
/** Error encountered during checkout creation. */
|
|
145
|
+
error: Ref<Error | null>;
|
|
146
|
+
/**
|
|
147
|
+
* Submits the current active cart to the checkout endpoint and redirects if a checkout URL is returned.
|
|
148
|
+
*/
|
|
149
|
+
submitCheckout: (input: CheckoutInput) => Promise<{
|
|
150
|
+
sessionId: string;
|
|
151
|
+
checkoutUrl?: string;
|
|
152
|
+
order: StoreOrder;
|
|
153
|
+
}>;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Headless e-commerce checkout composable for processing active shopping carts.
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```vue
|
|
160
|
+
* <script setup lang="ts">
|
|
161
|
+
* const { submitCheckout, loading, error } = useCheckout()
|
|
162
|
+
* async function onPay() {
|
|
163
|
+
* await submitCheckout({ customerEmail: 'buyer@example.com' })
|
|
164
|
+
* }
|
|
165
|
+
* </script>
|
|
166
|
+
* ```
|
|
167
|
+
*/
|
|
168
|
+
export declare function useCheckout(): UseCheckoutReturn;
|
|
169
|
+
/** Alias for useCheckout */
|
|
170
|
+
export declare const useStoreCheckout: () => UseCheckoutReturn;
|
|
171
|
+
/**
|
|
172
|
+
* Client-side currency composable for multi-currency display and conversion.
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```vue
|
|
176
|
+
* <script setup>
|
|
177
|
+
* const { currency, setCurrency, format, convert } = useCurrency()
|
|
178
|
+
* </script>
|
|
179
|
+
* <template>
|
|
180
|
+
* <span>{{ format(product.basePrice) }}</span>
|
|
181
|
+
* </template>
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
184
|
+
export interface UseCurrencyReturn {
|
|
185
|
+
/** Currently active currency code (e.g. "USD", "EUR") */
|
|
186
|
+
currency: Ref<string>;
|
|
187
|
+
/** All supported currency codes from localization config */
|
|
188
|
+
currencies: ComputedRef<string[]>;
|
|
189
|
+
/** Update the active currency and persist to cookie */
|
|
190
|
+
setCurrency: (code: string) => void;
|
|
191
|
+
/** Convert an amount in cents from one currency to another using stored rates */
|
|
192
|
+
convert: (amountInCents: number, fromCurrency?: string) => number;
|
|
193
|
+
/** Format an amount in cents as a localized price string */
|
|
194
|
+
format: (amountInCents: number, overrideCurrency?: string) => string;
|
|
195
|
+
/** FX rate of active currency relative to USD */
|
|
196
|
+
rate: ComputedRef<number>;
|
|
197
|
+
}
|
|
198
|
+
export declare function useCurrency(): UseCurrencyReturn;
|