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
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Nuxt } from "@nuxt/schema";
|
|
2
|
+
import type { createResolver, useLogger } from "@nuxt/kit";
|
|
3
|
+
import type { QarpeoOptions } from "../types";
|
|
4
|
+
export declare function setupAI(options: QarpeoOptions, nuxt: Nuxt, resolver: ReturnType<typeof createResolver>, logger: ReturnType<typeof useLogger>): Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Nuxt } from "@nuxt/schema";
|
|
2
|
+
import type { createResolver, useLogger } from "@nuxt/kit";
|
|
3
|
+
import type { QarpeoOptions } from "../types";
|
|
4
|
+
export declare function setupAnalytics(options: QarpeoOptions, nuxt: Nuxt, resolver: ReturnType<typeof createResolver>, logger: ReturnType<typeof useLogger>): Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Nuxt } from "@nuxt/schema";
|
|
2
|
+
import type { createResolver, useLogger } from "@nuxt/kit";
|
|
3
|
+
import type { QarpeoOptions } from "../types";
|
|
4
|
+
export declare function setupBlob(options: QarpeoOptions, nuxt: Nuxt, resolver: ReturnType<typeof createResolver>, logger: ReturnType<typeof useLogger>): Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Nuxt } from "@nuxt/schema";
|
|
2
|
+
import type { createResolver, useLogger } from "@nuxt/kit";
|
|
3
|
+
import type { QarpeoOptions } from "../types";
|
|
4
|
+
export declare function setupBrowser(options: QarpeoOptions, nuxt: Nuxt, resolver: ReturnType<typeof createResolver>, logger: ReturnType<typeof useLogger>): Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Nuxt } from "@nuxt/schema";
|
|
2
|
+
import type { createResolver, useLogger } from "@nuxt/kit";
|
|
3
|
+
import type { QarpeoOptions } from "../types";
|
|
4
|
+
export declare function setupCache(options: QarpeoOptions, nuxt: Nuxt, resolver: ReturnType<typeof createResolver>, logger: ReturnType<typeof useLogger>): Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Nuxt } from "@nuxt/schema";
|
|
2
|
+
import type { createResolver, useLogger } from "@nuxt/kit";
|
|
3
|
+
import type { QarpeoOptions } from "../types";
|
|
4
|
+
export declare function setupD1(options: QarpeoOptions, nuxt: Nuxt, resolver: ReturnType<typeof createResolver>, logger: ReturnType<typeof useLogger>): Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Nuxt } from "@nuxt/schema";
|
|
2
|
+
import type { createResolver, useLogger } from "@nuxt/kit";
|
|
3
|
+
import type { QarpeoOptions } from "../types";
|
|
4
|
+
export declare function setupDO(options: QarpeoOptions, nuxt: Nuxt, resolver: ReturnType<typeof createResolver>, logger: ReturnType<typeof useLogger>): Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Nuxt } from "@nuxt/schema";
|
|
2
|
+
import type { createResolver, useLogger } from "@nuxt/kit";
|
|
3
|
+
import type { QarpeoOptions } from "../types";
|
|
4
|
+
export declare function setupEmail(options: QarpeoOptions, nuxt: Nuxt, resolver: ReturnType<typeof createResolver>, logger: ReturnType<typeof useLogger>): Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Nuxt } from "@nuxt/schema";
|
|
2
|
+
import type { createResolver, useLogger } from "@nuxt/kit";
|
|
3
|
+
import type { QarpeoOptions } from "../types";
|
|
4
|
+
export declare function setupHyperdrive(options: QarpeoOptions, nuxt: Nuxt, resolver: ReturnType<typeof createResolver>, logger: ReturnType<typeof useLogger>): Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Nuxt } from "@nuxt/schema";
|
|
2
|
+
import type { createResolver, useLogger } from "@nuxt/kit";
|
|
3
|
+
import type { QarpeoOptions } from "../types";
|
|
4
|
+
export declare function setupKV(options: QarpeoOptions, nuxt: Nuxt, resolver: ReturnType<typeof createResolver>, logger: ReturnType<typeof useLogger>): Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Nuxt } from "@nuxt/schema";
|
|
2
|
+
import type { createResolver, useLogger } from "@nuxt/kit";
|
|
3
|
+
import type { QarpeoOptions } from "../types";
|
|
4
|
+
export declare function setupQueue(options: QarpeoOptions, nuxt: Nuxt, resolver: ReturnType<typeof createResolver>, logger: ReturnType<typeof useLogger>): Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Nuxt } from "@nuxt/schema";
|
|
2
|
+
import type { createResolver, useLogger } from "@nuxt/kit";
|
|
3
|
+
import type { QarpeoOptions } from "../types";
|
|
4
|
+
export declare function setupRateLimit(options: QarpeoOptions, nuxt: Nuxt, resolver: ReturnType<typeof createResolver>, logger: ReturnType<typeof useLogger>): Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Nuxt } from "@nuxt/schema";
|
|
2
|
+
import type { createResolver, useLogger } from "@nuxt/kit";
|
|
3
|
+
import type { QarpeoOptions } from "../types";
|
|
4
|
+
export declare function setupVectorize(options: QarpeoOptions, nuxt: Nuxt, resolver: ReturnType<typeof createResolver>, logger: ReturnType<typeof useLogger>): Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Nuxt } from "@nuxt/schema";
|
|
2
|
+
import type { createResolver, useLogger } from "@nuxt/kit";
|
|
3
|
+
import type { QarpeoOptions } from "../types";
|
|
4
|
+
export declare function setupWorkflows(options: QarpeoOptions, nuxt: Nuxt, resolver: ReturnType<typeof createResolver>, logger: ReturnType<typeof useLogger>): Promise<void>;
|
package/dist/runtime/ai.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { generateImage, textToImage, generateSpeech, textToSpeech, transcribeAudio, speechToText, generateText, streamText, embedText, similaritySearch } from "./server/utils/ai";
|
|
1
|
+
import { generateImage, textToImage, generateSpeech, textToSpeech, transcribeAudio, speechToText, generateText, generateObject, streamText, embedText, similaritySearch } from "./server/utils/ai";
|
|
2
2
|
import type { AiBinding, QarpeoAI } from "./types/ai";
|
|
3
3
|
import type { CFEvent } from "./types/index";
|
|
4
|
-
export type { AiBinding, AiOptions, QarpeoAI, GenerateImageOptions, GenerateImageResult, GenerateSpeechOptions, GenerateSpeechResult, TranscribeAudioInput, TranscribeAudioOptions, TranscribeAudioResult, StreamTextOptions, } from "./types/ai";
|
|
5
|
-
export { generateImage, textToImage, generateSpeech, textToSpeech, transcribeAudio, speechToText, generateText, streamText, embedText, similaritySearch, };
|
|
4
|
+
export type { AiBinding, AiOptions, QarpeoAI, GenerateImageOptions, GenerateImageResult, GenerateSpeechOptions, GenerateSpeechResult, TranscribeAudioInput, TranscribeAudioOptions, TranscribeAudioResult, StreamTextOptions, GenerateObjectOptions, GenerateObjectResult, } from "./types/ai";
|
|
5
|
+
export { generateImage, textToImage, generateSpeech, textToSpeech, transcribeAudio, speechToText, generateText, generateObject, streamText, embedText, similaritySearch, };
|
|
6
6
|
/**
|
|
7
7
|
* Returns the raw Cloudflare Workers AI binding from the active environment.
|
|
8
8
|
*
|
package/dist/runtime/ai.mjs
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
transcribeAudio,
|
|
8
8
|
speechToText,
|
|
9
9
|
generateText,
|
|
10
|
+
generateObject,
|
|
10
11
|
streamText,
|
|
11
12
|
embedText,
|
|
12
13
|
similaritySearch
|
|
@@ -19,6 +20,7 @@ export {
|
|
|
19
20
|
transcribeAudio,
|
|
20
21
|
speechToText,
|
|
21
22
|
generateText,
|
|
23
|
+
generateObject,
|
|
22
24
|
streamText,
|
|
23
25
|
embedText,
|
|
24
26
|
similaritySearch
|
|
@@ -39,7 +41,9 @@ export function createAI(bindingName, event) {
|
|
|
39
41
|
const getAI = () => getAIBinding(resolvedBinding, event);
|
|
40
42
|
return {
|
|
41
43
|
run: (model, inputs, options) => {
|
|
42
|
-
|
|
44
|
+
const gateway = globalThis.process?.env?.CLOUDFLARE_AI_GATEWAY || globalThis.process?.env?.AI_GATEWAY;
|
|
45
|
+
const finalOptions = gateway && !options?.gateway?.id ? { ...options, gateway: { id: gateway, skipCache: options?.gateway?.skipCache ?? false } } : options;
|
|
46
|
+
return getAI().run(model, inputs, finalOptions);
|
|
43
47
|
},
|
|
44
48
|
raw: (bName) => {
|
|
45
49
|
return getAIBinding(bName || resolvedBinding, event);
|
|
@@ -83,6 +87,9 @@ export function createAI(bindingName, event) {
|
|
|
83
87
|
generateText: (options) => {
|
|
84
88
|
return generateText({ binding: resolvedBinding, event, ...options });
|
|
85
89
|
},
|
|
90
|
+
generateObject: (options) => {
|
|
91
|
+
return generateObject({ binding: resolvedBinding, event, ...options });
|
|
92
|
+
},
|
|
86
93
|
streamText: (options) => {
|
|
87
94
|
return streamText({ binding: resolvedBinding, event, ...options });
|
|
88
95
|
},
|
|
@@ -37,12 +37,12 @@ function getCursorColor(id: string) {
|
|
|
37
37
|
const activeCursors = computed(() => {
|
|
38
38
|
return (peers.value || [])
|
|
39
39
|
.filter(
|
|
40
|
-
(p) =>
|
|
40
|
+
(p: any) =>
|
|
41
41
|
p.presence?.cursor &&
|
|
42
42
|
typeof p.presence.cursor.x === "number" &&
|
|
43
43
|
typeof p.presence.cursor.y === "number",
|
|
44
44
|
)
|
|
45
|
-
.map((p) => ({
|
|
45
|
+
.map((p: any) => ({
|
|
46
46
|
id: p.id,
|
|
47
47
|
name: p.name || "Anonymous",
|
|
48
48
|
x: p.presence.cursor.x,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Ref, type ComputedRef } from "vue";
|
|
1
2
|
import { useChat, useAgentChat, type UseChatOptions, type UseAgentChatOptions } from "./chat";
|
|
2
3
|
export interface UseAIStreamOptions {
|
|
3
4
|
/** Target API endpoint. Defaults to "/api/ai/stream" */
|
|
@@ -15,6 +16,20 @@ export interface UseAIStreamOptions {
|
|
|
15
16
|
/** Callback fired on error */
|
|
16
17
|
onError?: (err: Error) => void;
|
|
17
18
|
}
|
|
19
|
+
export interface UseAIStreamReturn {
|
|
20
|
+
/** Actively accumulated streaming completion text. */
|
|
21
|
+
text: Ref<string>;
|
|
22
|
+
/** Whether the stream is actively receiving chunk deltas. */
|
|
23
|
+
isStreaming: Ref<boolean>;
|
|
24
|
+
/** Last error produced by the stream. */
|
|
25
|
+
error: Ref<Error | null>;
|
|
26
|
+
/** Sends a prompt to the AI completion endpoint and streams back the result. */
|
|
27
|
+
send: (prompt: string, overrideOptions?: Partial<UseAIStreamOptions>) => Promise<string>;
|
|
28
|
+
/** Aborts the active streaming generation. */
|
|
29
|
+
abort: () => void;
|
|
30
|
+
/** Resets text and error state. */
|
|
31
|
+
reset: () => void;
|
|
32
|
+
}
|
|
18
33
|
/**
|
|
19
34
|
* Reactive composable for streaming text completions from Cloudflare Workers AI via SSE.
|
|
20
35
|
*
|
|
@@ -30,14 +45,7 @@ export interface UseAIStreamOptions {
|
|
|
30
45
|
* </template>
|
|
31
46
|
* ```
|
|
32
47
|
*/
|
|
33
|
-
export declare function useAIStream(options?: UseAIStreamOptions):
|
|
34
|
-
text: import("vue").Ref<string, string>;
|
|
35
|
-
isStreaming: import("vue").Ref<boolean, boolean>;
|
|
36
|
-
error: import("vue").Ref<Error | null, Error | null>;
|
|
37
|
-
send: (prompt: string, overrideOptions?: Partial<UseAIStreamOptions>) => Promise<string>;
|
|
38
|
-
abort: () => void;
|
|
39
|
-
reset: () => void;
|
|
40
|
-
};
|
|
48
|
+
export declare function useAIStream(options?: UseAIStreamOptions): UseAIStreamReturn;
|
|
41
49
|
export interface UseVectorSearchOptions {
|
|
42
50
|
/** Target API endpoint. Defaults to "/api/ai/search" */
|
|
43
51
|
api?: string;
|
|
@@ -70,6 +78,30 @@ export interface UseVectorSearchOptions {
|
|
|
70
78
|
/** Callback on error */
|
|
71
79
|
onError?: (err: Error) => void;
|
|
72
80
|
}
|
|
81
|
+
export interface UseVectorSearchReturn<T = any> {
|
|
82
|
+
/** Bound search query string. */
|
|
83
|
+
query: Ref<string>;
|
|
84
|
+
/** Similarity search result records. */
|
|
85
|
+
results: Ref<T[]>;
|
|
86
|
+
/** Whether a vector search query is in flight. */
|
|
87
|
+
isSearching: Ref<boolean>;
|
|
88
|
+
/** Search operation status. */
|
|
89
|
+
status: Ref<"idle" | "searching" | "success" | "error">;
|
|
90
|
+
/** Last search error. */
|
|
91
|
+
error: Ref<Error | null>;
|
|
92
|
+
/** Result count. */
|
|
93
|
+
count: ComputedRef<number>;
|
|
94
|
+
/** Executes search with debounce if configured. */
|
|
95
|
+
search: (queryText?: string, overrideOptions?: Partial<UseVectorSearchOptions>) => Promise<T[]>;
|
|
96
|
+
/** Executes search immediately bypassing debounce. */
|
|
97
|
+
searchImmediate: (queryText?: string, overrideOptions?: Partial<UseVectorSearchOptions>) => Promise<T[]>;
|
|
98
|
+
/** Aborts active search. */
|
|
99
|
+
abort: () => void;
|
|
100
|
+
/** Clears search query and results. */
|
|
101
|
+
clear: () => void;
|
|
102
|
+
/** Re-executes search with the current query. */
|
|
103
|
+
refresh: () => Promise<T[]>;
|
|
104
|
+
}
|
|
73
105
|
/**
|
|
74
106
|
* Reactive composable for vector similarity search via Cloudflare Vectorize.
|
|
75
107
|
*
|
|
@@ -87,19 +119,7 @@ export interface UseVectorSearchOptions {
|
|
|
87
119
|
* </template>
|
|
88
120
|
* ```
|
|
89
121
|
*/
|
|
90
|
-
export declare function useVectorSearch<T = any>(options?: UseVectorSearchOptions):
|
|
91
|
-
query: import("vue").Ref<string, string>;
|
|
92
|
-
results: import("vue").Ref<import("@vue/reactivity").UnwrapRefSimple<T>[], T[] | import("@vue/reactivity").UnwrapRefSimple<T>[]>;
|
|
93
|
-
isSearching: import("vue").Ref<boolean, boolean>;
|
|
94
|
-
status: import("vue").Ref<"error" | "success" | "idle" | "searching", "error" | "success" | "idle" | "searching">;
|
|
95
|
-
error: import("vue").Ref<Error | null, Error | null>;
|
|
96
|
-
count: import("vue").ComputedRef<number>;
|
|
97
|
-
search: (queryText?: string, overrideOptions?: Partial<UseVectorSearchOptions>) => Promise<T[]>;
|
|
98
|
-
searchImmediate: (queryText?: string, overrideOptions?: Partial<UseVectorSearchOptions>) => Promise<T[]>;
|
|
99
|
-
abort: () => void;
|
|
100
|
-
clear: () => void;
|
|
101
|
-
refresh: () => Promise<T[]>;
|
|
102
|
-
};
|
|
122
|
+
export declare function useVectorSearch<T = any>(options?: UseVectorSearchOptions): UseVectorSearchReturn<T>;
|
|
103
123
|
export interface UseEmbeddingsOptions {
|
|
104
124
|
/** Target API endpoint. Defaults to "/api/ai/embed" */
|
|
105
125
|
api?: string;
|
|
@@ -112,6 +132,20 @@ export interface UseEmbeddingsOptions {
|
|
|
112
132
|
/** Callback on error */
|
|
113
133
|
onError?: (err: Error) => void;
|
|
114
134
|
}
|
|
135
|
+
export interface UseEmbeddingsReturn {
|
|
136
|
+
/** Generated vector embeddings. */
|
|
137
|
+
embeddings: Ref<number[][]>;
|
|
138
|
+
/** Whether an embedding request is in flight. */
|
|
139
|
+
isEmbedding: Ref<boolean>;
|
|
140
|
+
/** Request status. */
|
|
141
|
+
status: Ref<"idle" | "loading" | "success" | "error">;
|
|
142
|
+
/** Last embedding error. */
|
|
143
|
+
error: Ref<Error | null>;
|
|
144
|
+
/** Generates embeddings for input string or array of strings. */
|
|
145
|
+
embed: (text: string | string[], overrideOptions?: Partial<UseEmbeddingsOptions>) => Promise<number[][]>;
|
|
146
|
+
/** Clears stored embeddings. */
|
|
147
|
+
clear: () => void;
|
|
148
|
+
}
|
|
115
149
|
/**
|
|
116
150
|
* Reactive composable for generating text vector embeddings via Cloudflare Workers AI.
|
|
117
151
|
*
|
|
@@ -125,13 +159,6 @@ export interface UseEmbeddingsOptions {
|
|
|
125
159
|
* </script>
|
|
126
160
|
* ```
|
|
127
161
|
*/
|
|
128
|
-
export declare function useEmbeddings(options?: UseEmbeddingsOptions):
|
|
129
|
-
embeddings: import("vue").Ref<number[][], number[][]>;
|
|
130
|
-
isEmbedding: import("vue").Ref<boolean, boolean>;
|
|
131
|
-
status: import("vue").Ref<"error" | "success" | "idle" | "loading", "error" | "success" | "idle" | "loading">;
|
|
132
|
-
error: import("vue").Ref<Error | null, Error | null>;
|
|
133
|
-
embed: (text: string | string[], overrideOptions?: Partial<UseEmbeddingsOptions>) => Promise<number[][]>;
|
|
134
|
-
clear: () => void;
|
|
135
|
-
};
|
|
162
|
+
export declare function useEmbeddings(options?: UseEmbeddingsOptions): UseEmbeddingsReturn;
|
|
136
163
|
export { useChat, useAgentChat };
|
|
137
164
|
export type { UseChatOptions, UseAgentChatOptions };
|
|
@@ -9,117 +9,37 @@
|
|
|
9
9
|
* </script>
|
|
10
10
|
* ```
|
|
11
11
|
*/
|
|
12
|
-
import type
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*
|
|
16
|
-
* @param basePath API prefix (default: '/api/analytics')
|
|
17
|
-
*/
|
|
18
|
-
export declare function useAnalyticsDashboard(basePath?: string): {
|
|
12
|
+
import { type Ref } from "vue";
|
|
13
|
+
import type { AnalyticsRange, AnalyticsSummary, PageviewSummary, AnalyticsEventRecord } from "../../../types";
|
|
14
|
+
export interface UseAnalyticsDashboardReturn {
|
|
19
15
|
/** Whether a fetch is in flight. */
|
|
20
|
-
loading: Readonly<
|
|
16
|
+
loading: Readonly<Ref<boolean>>;
|
|
21
17
|
/** Last error, if any. */
|
|
22
|
-
error: Readonly<
|
|
18
|
+
error: Readonly<Ref<Error | null>>;
|
|
23
19
|
/** KPI summary data. */
|
|
24
|
-
summary: Readonly<
|
|
25
|
-
readonly pageviews: number;
|
|
26
|
-
readonly visitors: number;
|
|
27
|
-
readonly topPages: readonly {
|
|
28
|
-
readonly path: string;
|
|
29
|
-
readonly views: number;
|
|
30
|
-
}[];
|
|
31
|
-
readonly topReferrers: readonly {
|
|
32
|
-
readonly referrer: string;
|
|
33
|
-
readonly count: number;
|
|
34
|
-
}[];
|
|
35
|
-
readonly countries: readonly {
|
|
36
|
-
readonly country: string;
|
|
37
|
-
readonly count: number;
|
|
38
|
-
}[];
|
|
39
|
-
readonly devices: {
|
|
40
|
-
readonly mobile: number;
|
|
41
|
-
readonly desktop: number;
|
|
42
|
-
readonly bot: number;
|
|
43
|
-
};
|
|
44
|
-
} | null, {
|
|
45
|
-
readonly pageviews: number;
|
|
46
|
-
readonly visitors: number;
|
|
47
|
-
readonly topPages: readonly {
|
|
48
|
-
readonly path: string;
|
|
49
|
-
readonly views: number;
|
|
50
|
-
}[];
|
|
51
|
-
readonly topReferrers: readonly {
|
|
52
|
-
readonly referrer: string;
|
|
53
|
-
readonly count: number;
|
|
54
|
-
}[];
|
|
55
|
-
readonly countries: readonly {
|
|
56
|
-
readonly country: string;
|
|
57
|
-
readonly count: number;
|
|
58
|
-
}[];
|
|
59
|
-
readonly devices: {
|
|
60
|
-
readonly mobile: number;
|
|
61
|
-
readonly desktop: number;
|
|
62
|
-
readonly bot: number;
|
|
63
|
-
};
|
|
64
|
-
} | null>>;
|
|
20
|
+
summary: Readonly<Ref<AnalyticsSummary | null>>;
|
|
65
21
|
/** Pageview time-series data. */
|
|
66
|
-
pageviews: Readonly<
|
|
67
|
-
readonly total: number;
|
|
68
|
-
readonly series: readonly {
|
|
69
|
-
readonly date: string;
|
|
70
|
-
readonly count: number;
|
|
71
|
-
}[];
|
|
72
|
-
} | null, {
|
|
73
|
-
readonly total: number;
|
|
74
|
-
readonly series: readonly {
|
|
75
|
-
readonly date: string;
|
|
76
|
-
readonly count: number;
|
|
77
|
-
}[];
|
|
78
|
-
} | null>>;
|
|
22
|
+
pageviews: Readonly<Ref<PageviewSummary | null>>;
|
|
79
23
|
/** Custom event records. */
|
|
80
|
-
events: Readonly<
|
|
81
|
-
readonly name: string;
|
|
82
|
-
readonly count: number;
|
|
83
|
-
readonly lastSeen: string;
|
|
84
|
-
}[], readonly {
|
|
85
|
-
readonly name: string;
|
|
86
|
-
readonly count: number;
|
|
87
|
-
readonly lastSeen: string;
|
|
88
|
-
}[]>>;
|
|
24
|
+
events: Readonly<Ref<AnalyticsEventRecord[]>>;
|
|
89
25
|
/** Fetch the KPI summary. */
|
|
90
|
-
fetchSummary: (range?: AnalyticsRange) => Promise<
|
|
91
|
-
pageviews: number;
|
|
92
|
-
visitors: number;
|
|
93
|
-
topPages: {
|
|
94
|
-
path: string;
|
|
95
|
-
views: number;
|
|
96
|
-
}[];
|
|
97
|
-
topReferrers: {
|
|
98
|
-
referrer: string;
|
|
99
|
-
count: number;
|
|
100
|
-
}[];
|
|
101
|
-
countries: {
|
|
102
|
-
country: string;
|
|
103
|
-
count: number;
|
|
104
|
-
}[];
|
|
105
|
-
devices: {
|
|
106
|
-
mobile: number;
|
|
107
|
-
desktop: number;
|
|
108
|
-
bot: number;
|
|
109
|
-
};
|
|
110
|
-
} | null>;
|
|
26
|
+
fetchSummary: (range?: AnalyticsRange) => Promise<AnalyticsSummary | null>;
|
|
111
27
|
/** Fetch pageview time-series. */
|
|
112
|
-
fetchPageviews: (range?: AnalyticsRange) => Promise<
|
|
113
|
-
total: number;
|
|
114
|
-
series: {
|
|
115
|
-
date: string;
|
|
116
|
-
count: number;
|
|
117
|
-
}[];
|
|
118
|
-
} | null>;
|
|
28
|
+
fetchPageviews: (range?: AnalyticsRange) => Promise<PageviewSummary | null>;
|
|
119
29
|
/** Fetch custom events. */
|
|
120
|
-
fetchEvents: (range?: AnalyticsRange, name?: string, limit?: number) => Promise<
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
30
|
+
fetchEvents: (range?: AnalyticsRange, name?: string, limit?: number) => Promise<AnalyticsEventRecord[]>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Headless analytics dashboard composable. Uses the built-in Qarpeo analytics API routes.
|
|
34
|
+
*
|
|
35
|
+
* @param basePath - API prefix (default: '/api/analytics')
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```vue
|
|
39
|
+
* <script setup lang="ts">
|
|
40
|
+
* const { summary, pageviews, loading, fetchSummary } = useAnalyticsDashboard()
|
|
41
|
+
* await fetchSummary('7d')
|
|
42
|
+
* </script>
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare function useAnalyticsDashboard(basePath?: string): UseAnalyticsDashboardReturn;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
1
2
|
export interface ApiToken {
|
|
2
3
|
id: string;
|
|
3
4
|
name: string;
|
|
@@ -6,44 +7,40 @@ export interface ApiToken {
|
|
|
6
7
|
expiresAt: number | null;
|
|
7
8
|
createdAt: number;
|
|
8
9
|
}
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
loading: import("vue").Ref<boolean, boolean>;
|
|
26
|
-
fetchTokens: () => Promise<{
|
|
27
|
-
id: string;
|
|
28
|
-
name: string;
|
|
29
|
-
scopes: string[];
|
|
30
|
-
lastUsedAt: number | null;
|
|
31
|
-
expiresAt: number | null;
|
|
32
|
-
createdAt: number;
|
|
33
|
-
}[]>;
|
|
10
|
+
export interface CreatedApiToken {
|
|
11
|
+
id: string;
|
|
12
|
+
token: string;
|
|
13
|
+
name: string;
|
|
14
|
+
scopes: string[];
|
|
15
|
+
expiresAt: number | null;
|
|
16
|
+
createdAt: number;
|
|
17
|
+
}
|
|
18
|
+
export interface UseApiTokensReturn {
|
|
19
|
+
/** Reactive list of developer API tokens. */
|
|
20
|
+
tokens: Ref<ApiToken[]>;
|
|
21
|
+
/** Whether a token operation is in progress. */
|
|
22
|
+
loading: Ref<boolean>;
|
|
23
|
+
/** Fetches all API tokens belonging to the current user or organization. */
|
|
24
|
+
fetchTokens: () => Promise<ApiToken[]>;
|
|
25
|
+
/** Creates a new API token with specified name and permission scopes. */
|
|
34
26
|
createToken: (input: {
|
|
35
27
|
name: string;
|
|
36
28
|
scopes?: string[];
|
|
37
29
|
expiresInDays?: number;
|
|
38
|
-
}) => Promise<
|
|
39
|
-
|
|
40
|
-
token: string;
|
|
41
|
-
name: string;
|
|
42
|
-
scopes: string[];
|
|
43
|
-
expiresAt: number | null;
|
|
44
|
-
createdAt: number;
|
|
45
|
-
}>;
|
|
30
|
+
}) => Promise<CreatedApiToken>;
|
|
31
|
+
/** Revokes an active API token by ID. */
|
|
46
32
|
revokeToken: (tokenId: string) => Promise<{
|
|
47
33
|
success: boolean;
|
|
48
34
|
}>;
|
|
49
|
-
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Headless API token management composable for developer settings and programmatic API access.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```vue
|
|
41
|
+
* <script setup lang="ts">
|
|
42
|
+
* const { tokens, loading, fetchTokens, createToken, revokeToken } = useApiTokens()
|
|
43
|
+
* </script>
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare function useApiTokens(): UseApiTokensReturn;
|