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
|
@@ -1,227 +1,17 @@
|
|
|
1
1
|
import { type Ref, type ComputedRef } from "vue";
|
|
2
2
|
import type { CMSEntry, CMSQueryOptions, CMSNavigationOptions, CMSNavigationItem, DocsSearchSection, CMSLocaleConfig } from "../../../types";
|
|
3
|
-
export
|
|
4
|
-
entries
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
contentHtml: string;
|
|
16
|
-
body?: {
|
|
17
|
-
[x: string]: any;
|
|
18
|
-
toc?: {
|
|
19
|
-
links: {
|
|
20
|
-
id: string;
|
|
21
|
-
text: string;
|
|
22
|
-
depth: number;
|
|
23
|
-
children?: /*elided*/ any[] | undefined;
|
|
24
|
-
}[];
|
|
25
|
-
} | undefined;
|
|
26
|
-
} | undefined;
|
|
27
|
-
toc?: {
|
|
28
|
-
links: {
|
|
29
|
-
id: string;
|
|
30
|
-
text: string;
|
|
31
|
-
depth: number;
|
|
32
|
-
children?: /*elided*/ any[] | undefined;
|
|
33
|
-
}[];
|
|
34
|
-
} | undefined;
|
|
35
|
-
navigation?: {
|
|
36
|
-
title?: string | undefined;
|
|
37
|
-
icon?: string | undefined;
|
|
38
|
-
} | undefined;
|
|
39
|
-
readingTime?: number | undefined;
|
|
40
|
-
categoryId?: string | null | undefined;
|
|
41
|
-
subCategoryId?: string | null | undefined;
|
|
42
|
-
featured?: boolean | undefined;
|
|
43
|
-
viewCount?: number | undefined;
|
|
44
|
-
author?: any;
|
|
45
|
-
metadata?: Record<string, unknown> | undefined;
|
|
46
|
-
metadataJson?: string | undefined;
|
|
47
|
-
status: import("../../../types").CMSEntryStatus;
|
|
48
|
-
source: "file" | "db";
|
|
49
|
-
filePath?: string | null | undefined;
|
|
50
|
-
contentHash?: string | null | undefined;
|
|
51
|
-
authorId?: string | null | undefined;
|
|
52
|
-
publishedAt?: number | null | undefined;
|
|
53
|
-
tenantId?: string | null | undefined;
|
|
54
|
-
locale?: string | undefined;
|
|
55
|
-
version?: string | undefined;
|
|
56
|
-
createdAt: number;
|
|
57
|
-
updatedAt: number;
|
|
58
|
-
}[], CMSEntry[] | {
|
|
59
|
-
id: string;
|
|
60
|
-
collectionId: string;
|
|
61
|
-
slug: string;
|
|
62
|
-
path?: string | undefined;
|
|
63
|
-
title: string;
|
|
64
|
-
description?: string | null | undefined;
|
|
65
|
-
coverImage?: string | null | undefined;
|
|
66
|
-
tags?: string | null | undefined;
|
|
67
|
-
order: number;
|
|
68
|
-
contentMd: string;
|
|
69
|
-
contentHtml: string;
|
|
70
|
-
body?: {
|
|
71
|
-
[x: string]: any;
|
|
72
|
-
toc?: {
|
|
73
|
-
links: {
|
|
74
|
-
id: string;
|
|
75
|
-
text: string;
|
|
76
|
-
depth: number;
|
|
77
|
-
children?: /*elided*/ any[] | undefined;
|
|
78
|
-
}[];
|
|
79
|
-
} | undefined;
|
|
80
|
-
} | undefined;
|
|
81
|
-
toc?: {
|
|
82
|
-
links: {
|
|
83
|
-
id: string;
|
|
84
|
-
text: string;
|
|
85
|
-
depth: number;
|
|
86
|
-
children?: /*elided*/ any[] | undefined;
|
|
87
|
-
}[];
|
|
88
|
-
} | undefined;
|
|
89
|
-
navigation?: {
|
|
90
|
-
title?: string | undefined;
|
|
91
|
-
icon?: string | undefined;
|
|
92
|
-
} | undefined;
|
|
93
|
-
readingTime?: number | undefined;
|
|
94
|
-
categoryId?: string | null | undefined;
|
|
95
|
-
subCategoryId?: string | null | undefined;
|
|
96
|
-
featured?: boolean | undefined;
|
|
97
|
-
viewCount?: number | undefined;
|
|
98
|
-
author?: any;
|
|
99
|
-
metadata?: Record<string, unknown> | undefined;
|
|
100
|
-
metadataJson?: string | undefined;
|
|
101
|
-
status: import("../../../types").CMSEntryStatus;
|
|
102
|
-
source: "file" | "db";
|
|
103
|
-
filePath?: string | null | undefined;
|
|
104
|
-
contentHash?: string | null | undefined;
|
|
105
|
-
authorId?: string | null | undefined;
|
|
106
|
-
publishedAt?: number | null | undefined;
|
|
107
|
-
tenantId?: string | null | undefined;
|
|
108
|
-
locale?: string | undefined;
|
|
109
|
-
version?: string | undefined;
|
|
110
|
-
createdAt: number;
|
|
111
|
-
updatedAt: number;
|
|
112
|
-
}[]>;
|
|
113
|
-
entry: Ref<{
|
|
114
|
-
id: string;
|
|
115
|
-
collectionId: string;
|
|
116
|
-
slug: string;
|
|
117
|
-
path?: string | undefined;
|
|
118
|
-
title: string;
|
|
119
|
-
description?: string | null | undefined;
|
|
120
|
-
coverImage?: string | null | undefined;
|
|
121
|
-
tags?: string | null | undefined;
|
|
122
|
-
order: number;
|
|
123
|
-
contentMd: string;
|
|
124
|
-
contentHtml: string;
|
|
125
|
-
body?: {
|
|
126
|
-
[x: string]: any;
|
|
127
|
-
toc?: {
|
|
128
|
-
links: {
|
|
129
|
-
id: string;
|
|
130
|
-
text: string;
|
|
131
|
-
depth: number;
|
|
132
|
-
children?: /*elided*/ any[] | undefined;
|
|
133
|
-
}[];
|
|
134
|
-
} | undefined;
|
|
135
|
-
} | undefined;
|
|
136
|
-
toc?: {
|
|
137
|
-
links: {
|
|
138
|
-
id: string;
|
|
139
|
-
text: string;
|
|
140
|
-
depth: number;
|
|
141
|
-
children?: /*elided*/ any[] | undefined;
|
|
142
|
-
}[];
|
|
143
|
-
} | undefined;
|
|
144
|
-
navigation?: {
|
|
145
|
-
title?: string | undefined;
|
|
146
|
-
icon?: string | undefined;
|
|
147
|
-
} | undefined;
|
|
148
|
-
readingTime?: number | undefined;
|
|
149
|
-
categoryId?: string | null | undefined;
|
|
150
|
-
subCategoryId?: string | null | undefined;
|
|
151
|
-
featured?: boolean | undefined;
|
|
152
|
-
viewCount?: number | undefined;
|
|
153
|
-
author?: any;
|
|
154
|
-
metadata?: Record<string, unknown> | undefined;
|
|
155
|
-
metadataJson?: string | undefined;
|
|
156
|
-
status: import("../../../types").CMSEntryStatus;
|
|
157
|
-
source: "file" | "db";
|
|
158
|
-
filePath?: string | null | undefined;
|
|
159
|
-
contentHash?: string | null | undefined;
|
|
160
|
-
authorId?: string | null | undefined;
|
|
161
|
-
publishedAt?: number | null | undefined;
|
|
162
|
-
tenantId?: string | null | undefined;
|
|
163
|
-
locale?: string | undefined;
|
|
164
|
-
version?: string | undefined;
|
|
165
|
-
createdAt: number;
|
|
166
|
-
updatedAt: number;
|
|
167
|
-
} | null, CMSEntry | {
|
|
168
|
-
id: string;
|
|
169
|
-
collectionId: string;
|
|
170
|
-
slug: string;
|
|
171
|
-
path?: string | undefined;
|
|
172
|
-
title: string;
|
|
173
|
-
description?: string | null | undefined;
|
|
174
|
-
coverImage?: string | null | undefined;
|
|
175
|
-
tags?: string | null | undefined;
|
|
176
|
-
order: number;
|
|
177
|
-
contentMd: string;
|
|
178
|
-
contentHtml: string;
|
|
179
|
-
body?: {
|
|
180
|
-
[x: string]: any;
|
|
181
|
-
toc?: {
|
|
182
|
-
links: {
|
|
183
|
-
id: string;
|
|
184
|
-
text: string;
|
|
185
|
-
depth: number;
|
|
186
|
-
children?: /*elided*/ any[] | undefined;
|
|
187
|
-
}[];
|
|
188
|
-
} | undefined;
|
|
189
|
-
} | undefined;
|
|
190
|
-
toc?: {
|
|
191
|
-
links: {
|
|
192
|
-
id: string;
|
|
193
|
-
text: string;
|
|
194
|
-
depth: number;
|
|
195
|
-
children?: /*elided*/ any[] | undefined;
|
|
196
|
-
}[];
|
|
197
|
-
} | undefined;
|
|
198
|
-
navigation?: {
|
|
199
|
-
title?: string | undefined;
|
|
200
|
-
icon?: string | undefined;
|
|
201
|
-
} | undefined;
|
|
202
|
-
readingTime?: number | undefined;
|
|
203
|
-
categoryId?: string | null | undefined;
|
|
204
|
-
subCategoryId?: string | null | undefined;
|
|
205
|
-
featured?: boolean | undefined;
|
|
206
|
-
viewCount?: number | undefined;
|
|
207
|
-
author?: any;
|
|
208
|
-
metadata?: Record<string, unknown> | undefined;
|
|
209
|
-
metadataJson?: string | undefined;
|
|
210
|
-
status: import("../../../types").CMSEntryStatus;
|
|
211
|
-
source: "file" | "db";
|
|
212
|
-
filePath?: string | null | undefined;
|
|
213
|
-
contentHash?: string | null | undefined;
|
|
214
|
-
authorId?: string | null | undefined;
|
|
215
|
-
publishedAt?: number | null | undefined;
|
|
216
|
-
tenantId?: string | null | undefined;
|
|
217
|
-
locale?: string | undefined;
|
|
218
|
-
version?: string | undefined;
|
|
219
|
-
createdAt: number;
|
|
220
|
-
updatedAt: number;
|
|
221
|
-
} | null>;
|
|
222
|
-
total: Ref<number, number>;
|
|
223
|
-
status: Ref<"error" | "success" | "idle" | "loading", "error" | "success" | "idle" | "loading">;
|
|
224
|
-
error: Ref<Error | null, Error | null>;
|
|
3
|
+
export interface UseCMSReturn {
|
|
4
|
+
/** Reactive list of fetched CMS entries. */
|
|
5
|
+
entries: Ref<CMSEntry[]>;
|
|
6
|
+
/** Active single CMS entry or null. */
|
|
7
|
+
entry: Ref<CMSEntry | null>;
|
|
8
|
+
/** Total matching entries count for pagination. */
|
|
9
|
+
total: Ref<number>;
|
|
10
|
+
/** Current network status. */
|
|
11
|
+
status: Ref<"idle" | "loading" | "success" | "error">;
|
|
12
|
+
/** Last error encountered during CMS queries. */
|
|
13
|
+
error: Ref<Error | null>;
|
|
14
|
+
/** Fetches published entries for the specified collection with pagination & filtering. */
|
|
225
15
|
fetchEntries: (options?: CMSQueryOptions & {
|
|
226
16
|
collection?: string;
|
|
227
17
|
}) => Promise<{
|
|
@@ -230,6 +20,7 @@ export declare function useCMS(collectionId?: string): {
|
|
|
230
20
|
page: number;
|
|
231
21
|
limit: number;
|
|
232
22
|
}>;
|
|
23
|
+
/** Fetches a single entry by its slug. Supports draft preview. */
|
|
233
24
|
fetchEntry: (slug: string, options?: {
|
|
234
25
|
collection?: string;
|
|
235
26
|
preview?: boolean;
|
|
@@ -238,6 +29,7 @@ export declare function useCMS(collectionId?: string): {
|
|
|
238
29
|
populate?: boolean | string[];
|
|
239
30
|
fields?: string[] | string;
|
|
240
31
|
}) => Promise<CMSEntry>;
|
|
32
|
+
/** Performs full-text search across CMS entries. */
|
|
241
33
|
search: (q: string, options?: {
|
|
242
34
|
collection?: string;
|
|
243
35
|
limit?: number;
|
|
@@ -246,7 +38,19 @@ export declare function useCMS(collectionId?: string): {
|
|
|
246
38
|
results: CMSEntry[];
|
|
247
39
|
total: number;
|
|
248
40
|
}>;
|
|
249
|
-
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Headless content management composable for querying collections, articles, and pages.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```vue
|
|
47
|
+
* <script setup lang="ts">
|
|
48
|
+
* const { entries, total, fetchEntries, status } = useCMS('blog')
|
|
49
|
+
* await fetchEntries({ limit: 10 })
|
|
50
|
+
* </script>
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export declare function useCMS(collectionId?: string): UseCMSReturn;
|
|
250
54
|
/**
|
|
251
55
|
* Fetches the navigation tree for a "page" collection. Drop-in replacement for @nuxt/content's
|
|
252
56
|
* queryCollectionNavigation().
|
|
@@ -284,73 +88,44 @@ export declare function queryCollection(collection: string): {
|
|
|
284
88
|
export declare function queryCollectionItemSurroundings(collection: string, path: string, options?: {
|
|
285
89
|
fields?: string[];
|
|
286
90
|
}): Promise<[CMSEntry | null, CMSEntry | null]>;
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
*/
|
|
291
|
-
export declare function useCMSLocale(): {
|
|
292
|
-
locale: Ref<string, string>;
|
|
91
|
+
export interface UseCMSLocaleReturn {
|
|
92
|
+
/** Currently active language / locale code (e.g. 'en', 'es'). */
|
|
93
|
+
locale: Ref<string>;
|
|
94
|
+
/** All configured enabled locales. */
|
|
293
95
|
locales: ComputedRef<string[]>;
|
|
96
|
+
/** Fallback default locale. */
|
|
294
97
|
defaultLocale: ComputedRef<string>;
|
|
98
|
+
/** Rich locale metadata items (name, flag, text direction). */
|
|
295
99
|
localeConfigs: ComputedRef<CMSLocaleConfig[]>;
|
|
100
|
+
/** Changes the active locale and persists to cookie/storage. */
|
|
296
101
|
setLocale: (newLocale: string) => void;
|
|
297
|
-
}
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Reactive composable for managing multi-language CMS localization state. Allows reading active
|
|
105
|
+
* locale, switching locales, and persisting preferences across requests.
|
|
106
|
+
*/
|
|
107
|
+
export declare function useCMSLocale(): UseCMSLocaleReturn;
|
|
108
|
+
export interface UseDocsSearchReturn {
|
|
109
|
+
/** Bound search query string. */
|
|
110
|
+
query: Ref<string>;
|
|
111
|
+
/** Matched documentation sections. */
|
|
112
|
+
results: Ref<DocsSearchSection[]>;
|
|
113
|
+
/** Whether search request is in progress. */
|
|
114
|
+
loading: Ref<boolean>;
|
|
115
|
+
/** Total matched sections count. */
|
|
116
|
+
total: Ref<number>;
|
|
117
|
+
/** Last search error. */
|
|
118
|
+
error: Ref<Error | null>;
|
|
119
|
+
/** Executes search query immediately. */
|
|
120
|
+
search: (q: string) => Promise<void>;
|
|
121
|
+
/** Debounced search helper. */
|
|
122
|
+
searchDebounced: (q: string, delay?: number) => void;
|
|
123
|
+
}
|
|
298
124
|
/** Reactive client composable for searching documentation entries and heading sections. */
|
|
299
125
|
export declare function useDocsSearch(options?: {
|
|
300
126
|
collection?: string;
|
|
301
127
|
locale?: string;
|
|
302
|
-
}):
|
|
303
|
-
query: Ref<string, string>;
|
|
304
|
-
results: Ref<{
|
|
305
|
-
id: string;
|
|
306
|
-
path: string;
|
|
307
|
-
title: string;
|
|
308
|
-
pageTitle: string;
|
|
309
|
-
titles: string[];
|
|
310
|
-
content: string;
|
|
311
|
-
section?: string | undefined;
|
|
312
|
-
locale?: string | undefined;
|
|
313
|
-
level?: number | undefined;
|
|
314
|
-
score: number;
|
|
315
|
-
}[], DocsSearchSection[] | {
|
|
316
|
-
id: string;
|
|
317
|
-
path: string;
|
|
318
|
-
title: string;
|
|
319
|
-
pageTitle: string;
|
|
320
|
-
titles: string[];
|
|
321
|
-
content: string;
|
|
322
|
-
section?: string | undefined;
|
|
323
|
-
locale?: string | undefined;
|
|
324
|
-
level?: number | undefined;
|
|
325
|
-
score: number;
|
|
326
|
-
}[]>;
|
|
327
|
-
loading: Ref<boolean, boolean>;
|
|
328
|
-
total: Ref<number, number>;
|
|
329
|
-
error: Ref<Error | null, Error | null>;
|
|
330
|
-
search: (q: string) => Promise<void>;
|
|
331
|
-
searchDebounced: (q: string, delay?: number) => void;
|
|
332
|
-
};
|
|
333
|
-
/**
|
|
334
|
-
* @deprecated Use `useComments("urn:cms:entry:" + entryId)` instead.
|
|
335
|
-
* Preserved for backwards compatibility with legacy CMS templates.
|
|
336
|
-
*/
|
|
337
|
-
export declare function useCMSComments(entryId: string | (() => string) | any): {
|
|
338
|
-
comments: Ref<import("./comments").CommentItem[], import("./comments").CommentItem[]>;
|
|
339
|
-
loading: Ref<boolean, boolean>;
|
|
340
|
-
error: Ref<Error | null, Error | null>;
|
|
341
|
-
total: Ref<number, number>;
|
|
342
|
-
fetchComments: () => Promise<void>;
|
|
343
|
-
postComment: (data: {
|
|
344
|
-
authorName: string;
|
|
345
|
-
content: string;
|
|
346
|
-
authorEmail?: string;
|
|
347
|
-
authorAvatar?: string;
|
|
348
|
-
parentId?: string;
|
|
349
|
-
}) => Promise<import("./comments").CommentItem | null>;
|
|
350
|
-
deleteComment: (id: string) => Promise<boolean>;
|
|
351
|
-
reportComment: (id: string, reason: string, note?: string) => Promise<boolean>;
|
|
352
|
-
react: (id: string, reaction: string) => Promise<boolean>;
|
|
353
|
-
};
|
|
128
|
+
}): UseDocsSearchReturn;
|
|
354
129
|
export interface UseCMSCategoriesReturn {
|
|
355
130
|
categories: ComputedRef<any[]>;
|
|
356
131
|
tree: ComputedRef<any[]>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useRuntimeConfig, useFetch } from "nuxt/app";
|
|
2
2
|
import { ref, computed } from "vue";
|
|
3
|
-
import { useComments } from "./comments.mjs";
|
|
4
3
|
import { useCMSPreview } from "./cms-preview.mjs";
|
|
5
4
|
export function useCMS(collectionId) {
|
|
6
5
|
const runtimeConfig = useRuntimeConfig();
|
|
@@ -412,40 +411,6 @@ export function useDocsSearch(options) {
|
|
|
412
411
|
searchDebounced
|
|
413
412
|
};
|
|
414
413
|
}
|
|
415
|
-
export function useCMSComments(entryId) {
|
|
416
|
-
const targetId = computed(() => {
|
|
417
|
-
if (typeof entryId === "function") return entryId();
|
|
418
|
-
if (entryId && typeof entryId === "object" && "value" in entryId) return entryId.value;
|
|
419
|
-
return String(entryId || "");
|
|
420
|
-
});
|
|
421
|
-
const urn = computed(() => {
|
|
422
|
-
const id = targetId.value;
|
|
423
|
-
if (!id) return "";
|
|
424
|
-
return id.startsWith("urn:") ? id : `urn:cms:entry:${id}`;
|
|
425
|
-
});
|
|
426
|
-
const {
|
|
427
|
-
comments,
|
|
428
|
-
loading,
|
|
429
|
-
error,
|
|
430
|
-
total,
|
|
431
|
-
fetchComments,
|
|
432
|
-
postComment,
|
|
433
|
-
deleteComment,
|
|
434
|
-
reportComment,
|
|
435
|
-
react
|
|
436
|
-
} = useComments(urn);
|
|
437
|
-
return {
|
|
438
|
-
comments,
|
|
439
|
-
loading,
|
|
440
|
-
error,
|
|
441
|
-
total,
|
|
442
|
-
fetchComments,
|
|
443
|
-
postComment: (data) => postComment(data),
|
|
444
|
-
deleteComment,
|
|
445
|
-
reportComment,
|
|
446
|
-
react
|
|
447
|
-
};
|
|
448
|
-
}
|
|
449
414
|
export function useCMSCategories() {
|
|
450
415
|
const runtimeConfig = useRuntimeConfig();
|
|
451
416
|
const publicCms = runtimeConfig.public?.qarpeo?.cms || {};
|
|
@@ -27,19 +27,46 @@ export interface PostCommentOptions {
|
|
|
27
27
|
turnstileToken?: string;
|
|
28
28
|
metadata?: Record<string, unknown>;
|
|
29
29
|
}
|
|
30
|
+
export interface UseCommentsOptions {
|
|
31
|
+
/** Group comments in hierarchical parent-child thread trees. @default true */
|
|
32
|
+
threaded?: boolean;
|
|
33
|
+
/** Automatically fetch comments when mounted or when targetUrn changes. @default true */
|
|
34
|
+
autoFetch?: boolean;
|
|
35
|
+
/** Filter comments by status (e.g. 'approved'). */
|
|
36
|
+
status?: string;
|
|
37
|
+
}
|
|
30
38
|
export interface UseCommentsReturn {
|
|
39
|
+
/** Reactive list of comments (flat or nested threads). */
|
|
31
40
|
comments: Ref<CommentItem[]>;
|
|
41
|
+
/** Whether comments are currently being loaded. */
|
|
32
42
|
loading: Ref<boolean>;
|
|
43
|
+
/** Most recent error encountered during comment operations. */
|
|
33
44
|
error: Ref<Error | null>;
|
|
45
|
+
/** Total count of comments for the target URN. */
|
|
34
46
|
total: Ref<number>;
|
|
47
|
+
/** Refetches comments from the API. */
|
|
35
48
|
fetchComments: () => Promise<void>;
|
|
49
|
+
/** Posts a new comment or reply. */
|
|
36
50
|
postComment: (input: PostCommentOptions) => Promise<CommentItem | null>;
|
|
51
|
+
/** Deletes a comment by ID (soft or hard depending on author/admin). */
|
|
37
52
|
deleteComment: (id: string) => Promise<boolean>;
|
|
53
|
+
/** Reports a comment for moderation review. */
|
|
38
54
|
reportComment: (id: string, reason: string, note?: string) => Promise<boolean>;
|
|
55
|
+
/** Adds or toggles an emoji reaction on a comment. */
|
|
39
56
|
react: (id: string, reaction: string) => Promise<boolean>;
|
|
57
|
+
/** Updates the moderation status of a comment. */
|
|
58
|
+
updateStatus: (id: string, newStatus: "pending" | "approved" | "spam" | "deleted") => Promise<boolean>;
|
|
59
|
+
/** Batch moderates multiple comments. */
|
|
60
|
+
batchModerate: (ids: string[], action: "approve" | "spam" | "delete") => Promise<number>;
|
|
40
61
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Headless nested comments and moderation composable for blogs, docs, and community discussions.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```vue
|
|
67
|
+
* <script setup lang="ts">
|
|
68
|
+
* const { comments, postComment, loading } = useComments("post:123")
|
|
69
|
+
* </script>
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export declare function useComments(targetUrn: MaybeRefOrGetter<string>, options?: UseCommentsOptions): UseCommentsReturn;
|
|
@@ -122,6 +122,32 @@ export function useComments(targetUrn, options = {}) {
|
|
|
122
122
|
return false;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
+
async function updateStatus(id, newStatus) {
|
|
126
|
+
try {
|
|
127
|
+
await $fetch(`${getCommentsPrefix()}/${encodeURIComponent(id)}`, {
|
|
128
|
+
method: "PATCH",
|
|
129
|
+
body: { status: newStatus }
|
|
130
|
+
});
|
|
131
|
+
await fetchComments();
|
|
132
|
+
return true;
|
|
133
|
+
} catch (err) {
|
|
134
|
+
error.value = err;
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
async function batchModerate(ids, action) {
|
|
139
|
+
try {
|
|
140
|
+
const res = await $fetch(`${getCommentsPrefix()}/batch`, {
|
|
141
|
+
method: "POST",
|
|
142
|
+
body: { ids, action }
|
|
143
|
+
});
|
|
144
|
+
await fetchComments();
|
|
145
|
+
return res.count || 0;
|
|
146
|
+
} catch (err) {
|
|
147
|
+
error.value = err;
|
|
148
|
+
return 0;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
125
151
|
if (autoFetch) {
|
|
126
152
|
watch(
|
|
127
153
|
urn,
|
|
@@ -145,6 +171,8 @@ export function useComments(targetUrn, options = {}) {
|
|
|
145
171
|
postComment,
|
|
146
172
|
deleteComment,
|
|
147
173
|
reportComment,
|
|
148
|
-
react
|
|
174
|
+
react,
|
|
175
|
+
updateStatus,
|
|
176
|
+
batchModerate
|
|
149
177
|
};
|
|
150
178
|
}
|
|
@@ -1,36 +1,33 @@
|
|
|
1
|
+
import { type Ref, type ComputedRef } from "vue";
|
|
1
2
|
import type { DocsVersionItem } from "../../../types";
|
|
3
|
+
export interface UseDocsVersionReturn {
|
|
4
|
+
/** Active documentation version key (e.g. 'latest', 'v1', 'v2'). */
|
|
5
|
+
currentVersion: ComputedRef<string>;
|
|
6
|
+
/** Whether the user is viewing the latest documentation version. */
|
|
7
|
+
isLatest: ComputedRef<boolean>;
|
|
8
|
+
/** Whether the user is viewing an older/archived version. */
|
|
9
|
+
isArchived: ComputedRef<boolean>;
|
|
10
|
+
/** List of all configured documentation versions. */
|
|
11
|
+
versions: Ref<DocsVersionItem[]>;
|
|
12
|
+
/** Active documentation version metadata item. */
|
|
13
|
+
activeVersionItem: ComputedRef<DocsVersionItem>;
|
|
14
|
+
/** Returns the equivalent URL path in the target version. */
|
|
15
|
+
getVersionPath: (targetVersionId: string) => string;
|
|
16
|
+
/** Switches documentation version and navigates to the equivalent subpath. */
|
|
17
|
+
switchVersion: (targetVersionId: string) => Promise<void>;
|
|
18
|
+
}
|
|
2
19
|
/**
|
|
3
|
-
*
|
|
20
|
+
* Headless documentation multi-versioning composable. Automatically parses active version from router
|
|
4
21
|
* path (/docs/v1/... vs /docs/...), provides list of versions, and seamlessly switches versions
|
|
5
22
|
* while preserving subpaths.
|
|
6
23
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```vue
|
|
26
|
+
* <script setup lang="ts">
|
|
27
|
+
* const { currentVersion, versions, switchVersion, isLatest } = useDocsVersion()
|
|
28
|
+
* </script>
|
|
29
|
+
* ```
|
|
13
30
|
*/
|
|
14
31
|
export declare function useDocsVersion(options?: {
|
|
15
32
|
versions?: DocsVersionItem[];
|
|
16
|
-
}):
|
|
17
|
-
currentVersion: import("vue").ComputedRef<string>;
|
|
18
|
-
isLatest: import("vue").ComputedRef<boolean>;
|
|
19
|
-
isArchived: import("vue").ComputedRef<boolean>;
|
|
20
|
-
versions: import("vue").Ref<{
|
|
21
|
-
id: string;
|
|
22
|
-
label: string;
|
|
23
|
-
prefix: string;
|
|
24
|
-
isLatest?: boolean | undefined;
|
|
25
|
-
isArchived?: boolean | undefined;
|
|
26
|
-
}[], DocsVersionItem[] | {
|
|
27
|
-
id: string;
|
|
28
|
-
label: string;
|
|
29
|
-
prefix: string;
|
|
30
|
-
isLatest?: boolean | undefined;
|
|
31
|
-
isArchived?: boolean | undefined;
|
|
32
|
-
}[]>;
|
|
33
|
-
activeVersionItem: import("vue").ComputedRef<DocsVersionItem>;
|
|
34
|
-
getVersionPath: (targetVersionId: string) => string;
|
|
35
|
-
switchVersion: (targetVersionId: string) => Promise<void>;
|
|
36
|
-
};
|
|
33
|
+
}): UseDocsVersionReturn;
|
|
@@ -1,14 +1,31 @@
|
|
|
1
|
+
import { type ComputedRef } from "vue";
|
|
1
2
|
import type { QarpeoUser } from "../../types/auth";
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export interface UseImpersonationReturn {
|
|
4
|
+
/** Whether the current session is an active impersonation session. */
|
|
5
|
+
isImpersonating: ComputedRef<boolean>;
|
|
6
|
+
/** The administrator who initiated the impersonation. */
|
|
7
|
+
impersonator: ComputedRef<QarpeoUser | null>;
|
|
8
|
+
/** The target user currently being impersonated. */
|
|
9
|
+
impersonatedUser: ComputedRef<QarpeoUser | null>;
|
|
10
|
+
/** Initiates impersonation of a target user by ID (requires admin privileges). */
|
|
6
11
|
impersonateUser: (userId: string) => Promise<{
|
|
7
12
|
success: boolean;
|
|
8
13
|
user: QarpeoUser;
|
|
9
14
|
}>;
|
|
15
|
+
/** Ends the active impersonation session and restores the admin's original identity. */
|
|
10
16
|
stopImpersonating: () => Promise<{
|
|
11
17
|
success: boolean;
|
|
12
18
|
user: QarpeoUser;
|
|
13
19
|
}>;
|
|
14
|
-
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Headless admin impersonation composable for testing and user support.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```vue
|
|
26
|
+
* <script setup lang="ts">
|
|
27
|
+
* const { isImpersonating, impersonatedUser, stopImpersonating } = useImpersonation()
|
|
28
|
+
* </script>
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function useImpersonation(): UseImpersonationReturn;
|