qarpeo 0.0.0-alpha.10
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/LICENSE +21 -0
- package/README.md +102 -0
- package/dist/chunks/auth-schema.mjs +219 -0
- package/dist/chunks/wrangler.mjs +783 -0
- package/dist/cli/index.mjs +1085 -0
- package/dist/dev/env.d.ts +12 -0
- package/dist/dev/wrangler.d.ts +18 -0
- package/dist/module.d.ts +16 -0
- package/dist/module.mjs +4436 -0
- package/dist/runtime/ai.d.ts +25 -0
- package/dist/runtime/ai.mjs +106 -0
- package/dist/runtime/analytics.d.ts +24 -0
- package/dist/runtime/analytics.mjs +38 -0
- package/dist/runtime/app/components/BlobImage.vue +100 -0
- package/dist/runtime/app/components/CMSBlocks.vue +93 -0
- package/dist/runtime/app/components/CMSContent.vue +23 -0
- package/dist/runtime/app/components/CMSImage.vue +49 -0
- package/dist/runtime/app/components/CMSLocaleSwitcher.vue +110 -0
- package/dist/runtime/app/components/CMSPreviewBanner.vue +79 -0
- package/dist/runtime/app/components/CMSVersionBanner.vue +49 -0
- package/dist/runtime/app/components/CMSVersionSwitcher.vue +126 -0
- package/dist/runtime/app/components/ContentRenderer.vue +80 -0
- package/dist/runtime/app/components/FileUpload.vue +196 -0
- package/dist/runtime/app/components/ImpersonationBanner.vue +57 -0
- package/dist/runtime/app/components/SignedIn.vue +13 -0
- package/dist/runtime/app/components/SignedOut.vue +13 -0
- package/dist/runtime/app/components/shiki.css +34 -0
- package/dist/runtime/app/composables/analytics.d.ts +125 -0
- package/dist/runtime/app/composables/analytics.mjs +81 -0
- package/dist/runtime/app/composables/api-tokens.d.ts +49 -0
- package/dist/runtime/app/composables/api-tokens.mjs +61 -0
- package/dist/runtime/app/composables/auth.d.ts +50 -0
- package/dist/runtime/app/composables/auth.mjs +101 -0
- package/dist/runtime/app/composables/chat.d.ts +69 -0
- package/dist/runtime/app/composables/chat.mjs +159 -0
- package/dist/runtime/app/composables/cms-preview.d.ts +33 -0
- package/dist/runtime/app/composables/cms-preview.mjs +83 -0
- package/dist/runtime/app/composables/cms.d.ts +307 -0
- package/dist/runtime/app/composables/cms.mjs +355 -0
- package/dist/runtime/app/composables/docs-version.d.ts +35 -0
- package/dist/runtime/app/composables/docs-version.mjs +70 -0
- package/dist/runtime/app/composables/impersonation.d.ts +14 -0
- package/dist/runtime/app/composables/impersonation.mjs +44 -0
- package/dist/runtime/app/composables/notifications.d.ts +35 -0
- package/dist/runtime/app/composables/notifications.mjs +139 -0
- package/dist/runtime/app/composables/organization.d.ts +127 -0
- package/dist/runtime/app/composables/organization.mjs +138 -0
- package/dist/runtime/app/composables/passkey.d.ts +6 -0
- package/dist/runtime/app/composables/passkey.mjs +105 -0
- package/dist/runtime/app/composables/passwordless.d.ts +7 -0
- package/dist/runtime/app/composables/passwordless.mjs +67 -0
- package/dist/runtime/app/composables/payments.d.ts +43 -0
- package/dist/runtime/app/composables/payments.mjs +74 -0
- package/dist/runtime/app/composables/realtime.d.ts +96 -0
- package/dist/runtime/app/composables/realtime.mjs +432 -0
- package/dist/runtime/app/composables/site.d.ts +35 -0
- package/dist/runtime/app/composables/site.mjs +36 -0
- package/dist/runtime/app/composables/storage.d.ts +60 -0
- package/dist/runtime/app/composables/storage.mjs +294 -0
- package/dist/runtime/app/composables/tenant.d.ts +82 -0
- package/dist/runtime/app/composables/tenant.mjs +120 -0
- package/dist/runtime/app/composables/turnstile.d.ts +3 -0
- package/dist/runtime/app/composables/turnstile.mjs +10 -0
- package/dist/runtime/app/composables/two-factor.d.ts +12 -0
- package/dist/runtime/app/composables/two-factor.mjs +65 -0
- package/dist/runtime/app/middleware/auth.global.d.ts +2 -0
- package/dist/runtime/app/middleware/auth.global.mjs +44 -0
- package/dist/runtime/app/pages/cms.vue +2249 -0
- package/dist/runtime/app/pages/devtools/agents.vue +717 -0
- package/dist/runtime/app/pages/devtools/analytics.vue +618 -0
- package/dist/runtime/app/pages/devtools/auth.vue +351 -0
- package/dist/runtime/app/pages/devtools/blob.vue +745 -0
- package/dist/runtime/app/pages/devtools/db.vue +546 -0
- package/dist/runtime/app/pages/devtools/domains.vue +772 -0
- package/dist/runtime/app/pages/devtools/kv.vue +829 -0
- package/dist/runtime/app/pages/devtools/logs.vue +655 -0
- package/dist/runtime/app/pages/devtools/mail.vue +389 -0
- package/dist/runtime/app/pages/devtools/overview.vue +390 -0
- package/dist/runtime/app/pages/devtools/settings.vue +560 -0
- package/dist/runtime/app/pages/devtools.vue +165 -0
- package/dist/runtime/app/plugins/seo.d.ts +2 -0
- package/dist/runtime/app/plugins/seo.mjs +105 -0
- package/dist/runtime/app/plugins/shortcuts.client.d.ts +6 -0
- package/dist/runtime/app/plugins/shortcuts.client.mjs +19 -0
- package/dist/runtime/app/public/sw-notifications.mjs +52 -0
- package/dist/runtime/auth.d.ts +25 -0
- package/dist/runtime/auth.mjs +11 -0
- package/dist/runtime/bindings.d.ts +27 -0
- package/dist/runtime/bindings.mjs +38 -0
- package/dist/runtime/blob.d.ts +26 -0
- package/dist/runtime/blob.mjs +334 -0
- package/dist/runtime/bots.d.ts +1 -0
- package/dist/runtime/bots.mjs +1 -0
- package/dist/runtime/browser.d.ts +21 -0
- package/dist/runtime/browser.mjs +64 -0
- package/dist/runtime/cache.d.ts +19 -0
- package/dist/runtime/cache.mjs +12 -0
- package/dist/runtime/cms.d.ts +2 -0
- package/dist/runtime/cms.mjs +0 -0
- package/dist/runtime/db.d.ts +21 -0
- package/dist/runtime/db.mjs +36 -0
- package/dist/runtime/drizzle.d.ts +11 -0
- package/dist/runtime/drizzle.mjs +18 -0
- package/dist/runtime/email.d.ts +51 -0
- package/dist/runtime/email.mjs +245 -0
- package/dist/runtime/hyperdrive.d.ts +21 -0
- package/dist/runtime/hyperdrive.mjs +49 -0
- package/dist/runtime/index.d.ts +23 -0
- package/dist/runtime/index.mjs +23 -0
- package/dist/runtime/kv.d.ts +16 -0
- package/dist/runtime/kv.mjs +126 -0
- package/dist/runtime/payments.d.ts +2 -0
- package/dist/runtime/payments.mjs +0 -0
- package/dist/runtime/queue.d.ts +21 -0
- package/dist/runtime/queue.mjs +41 -0
- package/dist/runtime/rag.d.ts +1 -0
- package/dist/runtime/rag.mjs +1 -0
- package/dist/runtime/ratelimit.d.ts +21 -0
- package/dist/runtime/ratelimit.mjs +38 -0
- package/dist/runtime/realtime.d.ts +6 -0
- package/dist/runtime/realtime.mjs +13 -0
- package/dist/runtime/server/db/cms-schema.d.ts +651 -0
- package/dist/runtime/server/db/cms-schema.mjs +74 -0
- package/dist/runtime/server/durable-objects/agent.d.ts +14 -0
- package/dist/runtime/server/durable-objects/agent.mjs +571 -0
- package/dist/runtime/server/durable-objects/room.d.ts +34 -0
- package/dist/runtime/server/durable-objects/room.mjs +514 -0
- package/dist/runtime/server/middleware/auth.d.ts +2 -0
- package/dist/runtime/server/middleware/auth.mjs +108 -0
- package/dist/runtime/server/middleware/devtools.d.ts +2 -0
- package/dist/runtime/server/middleware/devtools.mjs +61 -0
- package/dist/runtime/server/middleware/ratelimit.d.ts +2 -0
- package/dist/runtime/server/middleware/ratelimit.mjs +49 -0
- package/dist/runtime/server/middleware/tenancy.d.ts +6 -0
- package/dist/runtime/server/middleware/tenancy.mjs +15 -0
- package/dist/runtime/server/middleware/tracker.d.ts +7 -0
- package/dist/runtime/server/middleware/tracker.mjs +9 -0
- package/dist/runtime/server/plugins/agents.d.ts +7 -0
- package/dist/runtime/server/plugins/agents.mjs +3 -0
- package/dist/runtime/server/plugins/cms.d.ts +7 -0
- package/dist/runtime/server/plugins/cms.mjs +16 -0
- package/dist/runtime/server/plugins/dev-logs.d.ts +1 -0
- package/dist/runtime/server/plugins/dev-logs.mjs +58 -0
- package/dist/runtime/server/plugins/dev-proxy.d.ts +3 -0
- package/dist/runtime/server/plugins/dev-proxy.mjs +21 -0
- package/dist/runtime/server/plugins/env.d.ts +6 -0
- package/dist/runtime/server/plugins/env.mjs +17 -0
- package/dist/runtime/server/plugins/queue.d.ts +6 -0
- package/dist/runtime/server/plugins/queue.mjs +8 -0
- package/dist/runtime/server/routes/__qarpeo/agents/chat.post.d.ts +20 -0
- package/dist/runtime/server/routes/__qarpeo/agents/chat.post.mjs +110 -0
- package/dist/runtime/server/routes/__qarpeo/agents/clear.post.d.ts +7 -0
- package/dist/runtime/server/routes/__qarpeo/agents/clear.post.mjs +15 -0
- package/dist/runtime/server/routes/__qarpeo/agents/create.post.d.ts +17 -0
- package/dist/runtime/server/routes/__qarpeo/agents/create.post.mjs +47 -0
- package/dist/runtime/server/routes/__qarpeo/agents/history.get.d.ts +15 -0
- package/dist/runtime/server/routes/__qarpeo/agents/history.get.mjs +24 -0
- package/dist/runtime/server/routes/__qarpeo/agents/list.get.d.ts +5 -0
- package/dist/runtime/server/routes/__qarpeo/agents/list.get.mjs +63 -0
- package/dist/runtime/server/routes/__qarpeo/analytics/events.get.d.ts +64 -0
- package/dist/runtime/server/routes/__qarpeo/analytics/events.get.mjs +55 -0
- package/dist/runtime/server/routes/__qarpeo/analytics/summary.get.d.ts +30 -0
- package/dist/runtime/server/routes/__qarpeo/analytics/summary.get.mjs +73 -0
- package/dist/runtime/server/routes/__qarpeo/auth/revoke-session.post.d.ts +6 -0
- package/dist/runtime/server/routes/__qarpeo/auth/revoke-session.post.mjs +26 -0
- package/dist/runtime/server/routes/__qarpeo/auth/sessions.get.d.ts +6 -0
- package/dist/runtime/server/routes/__qarpeo/auth/sessions.get.mjs +46 -0
- package/dist/runtime/server/routes/__qarpeo/auth/users.get.d.ts +7 -0
- package/dist/runtime/server/routes/__qarpeo/auth/users.get.mjs +65 -0
- package/dist/runtime/server/routes/__qarpeo/blob/files.get.d.ts +22 -0
- package/dist/runtime/server/routes/__qarpeo/blob/files.get.mjs +36 -0
- package/dist/runtime/server/routes/__qarpeo/db/query.post.d.ts +23 -0
- package/dist/runtime/server/routes/__qarpeo/db/query.post.mjs +34 -0
- package/dist/runtime/server/routes/__qarpeo/db/tables.get.d.ts +31 -0
- package/dist/runtime/server/routes/__qarpeo/db/tables.get.mjs +81 -0
- package/dist/runtime/server/routes/__qarpeo/kv/delete.post.d.ts +11 -0
- package/dist/runtime/server/routes/__qarpeo/kv/delete.post.mjs +18 -0
- package/dist/runtime/server/routes/__qarpeo/kv/get.get.d.ts +11 -0
- package/dist/runtime/server/routes/__qarpeo/kv/get.get.mjs +20 -0
- package/dist/runtime/server/routes/__qarpeo/kv/keys.get.d.ts +8 -0
- package/dist/runtime/server/routes/__qarpeo/kv/keys.get.mjs +27 -0
- package/dist/runtime/server/routes/__qarpeo/kv/set.post.d.ts +14 -0
- package/dist/runtime/server/routes/__qarpeo/kv/set.post.mjs +24 -0
- package/dist/runtime/server/routes/__qarpeo/logs.delete.d.ts +5 -0
- package/dist/runtime/server/routes/__qarpeo/logs.delete.mjs +6 -0
- package/dist/runtime/server/routes/__qarpeo/logs.get.d.ts +5 -0
- package/dist/runtime/server/routes/__qarpeo/logs.get.mjs +26 -0
- package/dist/runtime/server/routes/__qarpeo/logs.post.d.ts +6 -0
- package/dist/runtime/server/routes/__qarpeo/logs.post.mjs +17 -0
- package/dist/runtime/server/routes/__qarpeo/mail/bounce.post.d.ts +5 -0
- package/dist/runtime/server/routes/__qarpeo/mail/bounce.post.mjs +37 -0
- package/dist/runtime/server/routes/__qarpeo/mail/clear.post.d.ts +4 -0
- package/dist/runtime/server/routes/__qarpeo/mail/clear.post.mjs +6 -0
- package/dist/runtime/server/routes/__qarpeo/mail/inbox.get.d.ts +5 -0
- package/dist/runtime/server/routes/__qarpeo/mail/inbox.get.mjs +7 -0
- package/dist/runtime/server/routes/__qarpeo/mail/send-test.post.d.ts +4 -0
- package/dist/runtime/server/routes/__qarpeo/mail/send-test.post.mjs +29 -0
- package/dist/runtime/server/routes/__qarpeo/mail/track/click/[id].get.d.ts +2 -0
- package/dist/runtime/server/routes/__qarpeo/mail/track/click/[id].get.mjs +23 -0
- package/dist/runtime/server/routes/__qarpeo/mail/track/open/[id].get.d.ts +2 -0
- package/dist/runtime/server/routes/__qarpeo/mail/track/open/[id].get.mjs +31 -0
- package/dist/runtime/server/routes/__qarpeo/overview/health.get.d.ts +8 -0
- package/dist/runtime/server/routes/__qarpeo/overview/health.get.mjs +46 -0
- package/dist/runtime/server/routes/__qarpeo/overview.get.d.ts +32 -0
- package/dist/runtime/server/routes/__qarpeo/overview.get.mjs +38 -0
- package/dist/runtime/server/routes/__qarpeo/settings/reset-dev-data.post.d.ts +11 -0
- package/dist/runtime/server/routes/__qarpeo/settings/reset-dev-data.post.mjs +84 -0
- package/dist/runtime/server/routes/__qarpeo/settings.get.d.ts +124 -0
- package/dist/runtime/server/routes/__qarpeo/settings.get.mjs +145 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/create.post.d.ts +7 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/create.post.mjs +26 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-add.post.d.ts +6 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-add.post.mjs +29 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-delete.post.d.ts +7 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-delete.post.mjs +21 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-verify.post.d.ts +9 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-verify.post.mjs +21 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/list.get.d.ts +15 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/list.get.mjs +22 -0
- package/dist/runtime/server/routes/agents/[agent]/chat.post.d.ts +2 -0
- package/dist/runtime/server/routes/agents/[agent]/chat.post.mjs +35 -0
- package/dist/runtime/server/routes/agents/[agent]/clear.post.d.ts +4 -0
- package/dist/runtime/server/routes/agents/[agent]/clear.post.mjs +27 -0
- package/dist/runtime/server/routes/agents/[agent]/history.get.d.ts +4 -0
- package/dist/runtime/server/routes/agents/[agent]/history.get.mjs +27 -0
- package/dist/runtime/server/routes/analytics/events.get.d.ts +3 -0
- package/dist/runtime/server/routes/analytics/events.get.mjs +17 -0
- package/dist/runtime/server/routes/analytics/pageviews.get.d.ts +3 -0
- package/dist/runtime/server/routes/analytics/pageviews.get.mjs +15 -0
- package/dist/runtime/server/routes/analytics/summary.get.d.ts +6 -0
- package/dist/runtime/server/routes/analytics/summary.get.mjs +15 -0
- package/dist/runtime/server/routes/atom.xml.get.d.ts +2 -0
- package/dist/runtime/server/routes/atom.xml.get.mjs +76 -0
- package/dist/runtime/server/routes/auth/2fa/disable.post.d.ts +4 -0
- package/dist/runtime/server/routes/auth/2fa/disable.post.mjs +44 -0
- package/dist/runtime/server/routes/auth/2fa/setup.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/2fa/setup.post.mjs +32 -0
- package/dist/runtime/server/routes/auth/2fa/verify.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/2fa/verify.post.mjs +92 -0
- package/dist/runtime/server/routes/auth/[provider]/callback.d.ts +1 -0
- package/dist/runtime/server/routes/auth/[provider]/callback.mjs +1 -0
- package/dist/runtime/server/routes/auth/[provider].d.ts +3 -0
- package/dist/runtime/server/routes/auth/[provider].mjs +95 -0
- package/dist/runtime/server/routes/auth/account.delete.d.ts +5 -0
- package/dist/runtime/server/routes/auth/account.delete.mjs +52 -0
- package/dist/runtime/server/routes/auth/impersonate/start.post.d.ts +5 -0
- package/dist/runtime/server/routes/auth/impersonate/start.post.mjs +14 -0
- package/dist/runtime/server/routes/auth/impersonate/stop.post.d.ts +5 -0
- package/dist/runtime/server/routes/auth/impersonate/stop.post.mjs +5 -0
- package/dist/runtime/server/routes/auth/logout-all.post.d.ts +4 -0
- package/dist/runtime/server/routes/auth/logout-all.post.mjs +16 -0
- package/dist/runtime/server/routes/auth/logout-others.post.d.ts +4 -0
- package/dist/runtime/server/routes/auth/logout-others.post.mjs +11 -0
- package/dist/runtime/server/routes/auth/logout.post.d.ts +4 -0
- package/dist/runtime/server/routes/auth/logout.post.mjs +17 -0
- package/dist/runtime/server/routes/auth/magic-link/send.post.d.ts +10 -0
- package/dist/runtime/server/routes/auth/magic-link/send.post.mjs +29 -0
- package/dist/runtime/server/routes/auth/magic-link/verify.get.d.ts +2 -0
- package/dist/runtime/server/routes/auth/magic-link/verify.get.mjs +81 -0
- package/dist/runtime/server/routes/auth/organization/create.post.d.ts +5 -0
- package/dist/runtime/server/routes/auth/organization/create.post.mjs +10 -0
- package/dist/runtime/server/routes/auth/organization/invite.post.d.ts +9 -0
- package/dist/runtime/server/routes/auth/organization/invite.post.mjs +27 -0
- package/dist/runtime/server/routes/auth/organization/join.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/organization/join.post.mjs +15 -0
- package/dist/runtime/server/routes/auth/organization/list.get.d.ts +5 -0
- package/dist/runtime/server/routes/auth/organization/list.get.mjs +7 -0
- package/dist/runtime/server/routes/auth/organization/members/[id].delete.d.ts +4 -0
- package/dist/runtime/server/routes/auth/organization/members/[id].delete.mjs +33 -0
- package/dist/runtime/server/routes/auth/organization/members/index.get.d.ts +6 -0
- package/dist/runtime/server/routes/auth/organization/members/index.get.mjs +18 -0
- package/dist/runtime/server/routes/auth/organization/mfa.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/organization/mfa.post.mjs +33 -0
- package/dist/runtime/server/routes/auth/organization/sso/[id].delete.d.ts +4 -0
- package/dist/runtime/server/routes/auth/organization/sso/[id].delete.mjs +28 -0
- package/dist/runtime/server/routes/auth/organization/sso/index.get.d.ts +2 -0
- package/dist/runtime/server/routes/auth/organization/sso/index.get.mjs +23 -0
- package/dist/runtime/server/routes/auth/organization/sso/index.post.d.ts +5 -0
- package/dist/runtime/server/routes/auth/organization/sso/index.post.mjs +84 -0
- package/dist/runtime/server/routes/auth/organization/switch.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/organization/switch.post.mjs +14 -0
- package/dist/runtime/server/routes/auth/otp/send.post.d.ts +10 -0
- package/dist/runtime/server/routes/auth/otp/send.post.mjs +29 -0
- package/dist/runtime/server/routes/auth/otp/verify.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/otp/verify.post.mjs +95 -0
- package/dist/runtime/server/routes/auth/sessions/[id].delete.d.ts +5 -0
- package/dist/runtime/server/routes/auth/sessions/[id].delete.mjs +24 -0
- package/dist/runtime/server/routes/auth/sessions.get.d.ts +2 -0
- package/dist/runtime/server/routes/auth/sessions.get.mjs +11 -0
- package/dist/runtime/server/routes/auth/sso/login.get.d.ts +2 -0
- package/dist/runtime/server/routes/auth/sso/login.get.mjs +94 -0
- package/dist/runtime/server/routes/auth/sso/oidc/callback.get.d.ts +2 -0
- package/dist/runtime/server/routes/auth/sso/oidc/callback.get.mjs +113 -0
- package/dist/runtime/server/routes/auth/sso/saml/acs.post.d.ts +2 -0
- package/dist/runtime/server/routes/auth/sso/saml/acs.post.mjs +95 -0
- package/dist/runtime/server/routes/auth/tokens/[id].delete.d.ts +4 -0
- package/dist/runtime/server/routes/auth/tokens/[id].delete.mjs +13 -0
- package/dist/runtime/server/routes/auth/tokens/create.post.d.ts +9 -0
- package/dist/runtime/server/routes/auth/tokens/create.post.mjs +17 -0
- package/dist/runtime/server/routes/auth/tokens/index.get.d.ts +9 -0
- package/dist/runtime/server/routes/auth/tokens/index.get.mjs +5 -0
- package/dist/runtime/server/routes/auth/turnstile/verify.post.d.ts +2 -0
- package/dist/runtime/server/routes/auth/turnstile/verify.post.mjs +15 -0
- package/dist/runtime/server/routes/auth/user.get.d.ts +2 -0
- package/dist/runtime/server/routes/auth/user.get.mjs +6 -0
- package/dist/runtime/server/routes/auth/webauthn/login/options.post.d.ts +2 -0
- package/dist/runtime/server/routes/auth/webauthn/login/options.post.mjs +17 -0
- package/dist/runtime/server/routes/auth/webauthn/login/verify.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/webauthn/login/verify.post.mjs +127 -0
- package/dist/runtime/server/routes/auth/webauthn/register/options.post.d.ts +2 -0
- package/dist/runtime/server/routes/auth/webauthn/register/options.post.mjs +47 -0
- package/dist/runtime/server/routes/auth/webauthn/register/verify.post.d.ts +5 -0
- package/dist/runtime/server/routes/auth/webauthn/register/verify.post.mjs +88 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/preview-token.post.d.ts +8 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/preview-token.post.mjs +27 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/publish.post.d.ts +6 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/publish.post.mjs +19 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/review.post.d.ts +6 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/review.post.mjs +33 -0
- package/dist/runtime/server/routes/cms/[collection]/[id].delete.d.ts +4 -0
- package/dist/runtime/server/routes/cms/[collection]/[id].delete.mjs +17 -0
- package/dist/runtime/server/routes/cms/[collection]/[id].put.d.ts +4 -0
- package/dist/runtime/server/routes/cms/[collection]/[id].put.mjs +18 -0
- package/dist/runtime/server/routes/cms/[collection]/[slug].get.d.ts +4 -0
- package/dist/runtime/server/routes/cms/[collection]/[slug].get.mjs +19 -0
- package/dist/runtime/server/routes/cms/[collection]/atom.xml.get.d.ts +2 -0
- package/dist/runtime/server/routes/cms/[collection]/atom.xml.get.mjs +69 -0
- package/dist/runtime/server/routes/cms/[collection]/by-path.get.d.ts +8 -0
- package/dist/runtime/server/routes/cms/[collection]/by-path.get.mjs +23 -0
- package/dist/runtime/server/routes/cms/[collection]/feed.xml.get.d.ts +2 -0
- package/dist/runtime/server/routes/cms/[collection]/feed.xml.get.mjs +65 -0
- package/dist/runtime/server/routes/cms/[collection]/index.get.d.ts +7 -0
- package/dist/runtime/server/routes/cms/[collection]/index.get.mjs +15 -0
- package/dist/runtime/server/routes/cms/[collection]/index.post.d.ts +4 -0
- package/dist/runtime/server/routes/cms/[collection]/index.post.mjs +23 -0
- package/dist/runtime/server/routes/cms/[collection]/references.get.d.ts +19 -0
- package/dist/runtime/server/routes/cms/[collection]/references.get.mjs +47 -0
- package/dist/runtime/server/routes/cms/[collection]/surroundings.get.d.ts +10 -0
- package/dist/runtime/server/routes/cms/[collection]/surroundings.get.mjs +12 -0
- package/dist/runtime/server/routes/cms/collections/[id].delete.d.ts +4 -0
- package/dist/runtime/server/routes/cms/collections/[id].delete.mjs +10 -0
- package/dist/runtime/server/routes/cms/collections/[id].put.d.ts +4 -0
- package/dist/runtime/server/routes/cms/collections/[id].put.mjs +11 -0
- package/dist/runtime/server/routes/cms/collections/index.get.d.ts +4 -0
- package/dist/runtime/server/routes/cms/collections/index.get.mjs +6 -0
- package/dist/runtime/server/routes/cms/collections/index.post.d.ts +4 -0
- package/dist/runtime/server/routes/cms/collections/index.post.mjs +19 -0
- package/dist/runtime/server/routes/cms/components/index.get.d.ts +17 -0
- package/dist/runtime/server/routes/cms/components/index.get.mjs +16 -0
- package/dist/runtime/server/routes/cms/deploy.post.d.ts +4 -0
- package/dist/runtime/server/routes/cms/deploy.post.mjs +46 -0
- package/dist/runtime/server/routes/cms/export.post.d.ts +10 -0
- package/dist/runtime/server/routes/cms/export.post.mjs +55 -0
- package/dist/runtime/server/routes/cms/navigation.get.d.ts +8 -0
- package/dist/runtime/server/routes/cms/navigation.get.mjs +36 -0
- package/dist/runtime/server/routes/cms/preview/disable.get.d.ts +9 -0
- package/dist/runtime/server/routes/cms/preview/disable.get.mjs +9 -0
- package/dist/runtime/server/routes/cms/preview/enable.get.d.ts +14 -0
- package/dist/runtime/server/routes/cms/preview/enable.get.mjs +42 -0
- package/dist/runtime/server/routes/cms/publish-scheduled.post.d.ts +11 -0
- package/dist/runtime/server/routes/cms/publish-scheduled.post.mjs +35 -0
- package/dist/runtime/server/routes/cms/search.get.d.ts +13 -0
- package/dist/runtime/server/routes/cms/search.get.mjs +137 -0
- package/dist/runtime/server/routes/cms/sync.post.d.ts +7 -0
- package/dist/runtime/server/routes/cms/sync.post.mjs +18 -0
- package/dist/runtime/server/routes/cms/webhooks/[provider].post.d.ts +150 -0
- package/dist/runtime/server/routes/cms/webhooks/[provider].post.mjs +213 -0
- package/dist/runtime/server/routes/docs/search.get.d.ts +15 -0
- package/dist/runtime/server/routes/docs/search.get.mjs +20 -0
- package/dist/runtime/server/routes/feed.xml.get.d.ts +2 -0
- package/dist/runtime/server/routes/feed.xml.get.mjs +73 -0
- package/dist/runtime/server/routes/mail/bounce.post.d.ts +14 -0
- package/dist/runtime/server/routes/mail/bounce.post.mjs +56 -0
- package/dist/runtime/server/routes/mail/inbox/[id].get.d.ts +2 -0
- package/dist/runtime/server/routes/mail/inbox/[id].get.mjs +9 -0
- package/dist/runtime/server/routes/mail/inbox.get.d.ts +4 -0
- package/dist/runtime/server/routes/mail/inbox.get.mjs +7 -0
- package/dist/runtime/server/routes/mail/suppressions/[email].delete.d.ts +11 -0
- package/dist/runtime/server/routes/mail/suppressions/[email].delete.mjs +18 -0
- package/dist/runtime/server/routes/mail/suppressions/index.get.d.ts +12 -0
- package/dist/runtime/server/routes/mail/suppressions/index.get.mjs +23 -0
- package/dist/runtime/server/routes/mail/suppressions/index.post.d.ts +10 -0
- package/dist/runtime/server/routes/mail/suppressions/index.post.mjs +23 -0
- package/dist/runtime/server/routes/mail/unsubscribe.d.ts +13 -0
- package/dist/runtime/server/routes/mail/unsubscribe.mjs +91 -0
- package/dist/runtime/server/routes/mail/webhooks.post.d.ts +12 -0
- package/dist/runtime/server/routes/mail/webhooks.post.mjs +71 -0
- package/dist/runtime/server/routes/notifications/[id]/read.post.d.ts +4 -0
- package/dist/runtime/server/routes/notifications/[id]/read.post.mjs +13 -0
- package/dist/runtime/server/routes/notifications/[id].delete.d.ts +4 -0
- package/dist/runtime/server/routes/notifications/[id].delete.mjs +13 -0
- package/dist/runtime/server/routes/notifications/[id].get.d.ts +2 -0
- package/dist/runtime/server/routes/notifications/[id].get.mjs +15 -0
- package/dist/runtime/server/routes/notifications/index.get.d.ts +6 -0
- package/dist/runtime/server/routes/notifications/index.get.mjs +18 -0
- package/dist/runtime/server/routes/notifications/push/subscribe.post.d.ts +4 -0
- package/dist/runtime/server/routes/notifications/push/subscribe.post.mjs +20 -0
- package/dist/runtime/server/routes/notifications/push/unsubscribe.post.d.ts +4 -0
- package/dist/runtime/server/routes/notifications/push/unsubscribe.post.mjs +15 -0
- package/dist/runtime/server/routes/notifications/read-all.post.d.ts +4 -0
- package/dist/runtime/server/routes/notifications/read-all.post.mjs +11 -0
- package/dist/runtime/server/routes/payments/cancel.post.d.ts +7 -0
- package/dist/runtime/server/routes/payments/cancel.post.mjs +9 -0
- package/dist/runtime/server/routes/payments/change-plan.post.d.ts +7 -0
- package/dist/runtime/server/routes/payments/change-plan.post.mjs +12 -0
- package/dist/runtime/server/routes/payments/checkout.post.d.ts +9 -0
- package/dist/runtime/server/routes/payments/checkout.post.mjs +16 -0
- package/dist/runtime/server/routes/payments/pause.post.d.ts +7 -0
- package/dist/runtime/server/routes/payments/pause.post.mjs +9 -0
- package/dist/runtime/server/routes/payments/portal.post.d.ts +5 -0
- package/dist/runtime/server/routes/payments/portal.post.mjs +9 -0
- package/dist/runtime/server/routes/payments/subscription.get.d.ts +6 -0
- package/dist/runtime/server/routes/payments/subscription.get.mjs +9 -0
- package/dist/runtime/server/routes/payments/usage.get.d.ts +12 -0
- package/dist/runtime/server/routes/payments/usage.get.mjs +18 -0
- package/dist/runtime/server/routes/payments/usage.post.d.ts +6 -0
- package/dist/runtime/server/routes/payments/usage.post.mjs +24 -0
- package/dist/runtime/server/routes/payments/webhook.post.d.ts +14 -0
- package/dist/runtime/server/routes/payments/webhook.post.mjs +21 -0
- package/dist/runtime/server/routes/realtime/broadcast.post.d.ts +4 -0
- package/dist/runtime/server/routes/realtime/broadcast.post.mjs +26 -0
- package/dist/runtime/server/routes/realtime/history.delete.d.ts +13 -0
- package/dist/runtime/server/routes/realtime/history.delete.mjs +12 -0
- package/dist/runtime/server/routes/realtime/history.get.d.ts +16 -0
- package/dist/runtime/server/routes/realtime/history.get.mjs +15 -0
- package/dist/runtime/server/routes/realtime/presence.get.d.ts +6 -0
- package/dist/runtime/server/routes/realtime/presence.get.mjs +27 -0
- package/dist/runtime/server/routes/realtime/state.get.d.ts +5 -0
- package/dist/runtime/server/routes/realtime/state.get.mjs +26 -0
- package/dist/runtime/server/routes/realtime/state.post.d.ts +6 -0
- package/dist/runtime/server/routes/realtime/state.post.mjs +37 -0
- package/dist/runtime/server/routes/realtime/ws.get.d.ts +2 -0
- package/dist/runtime/server/routes/realtime/ws.get.mjs +73 -0
- package/dist/runtime/server/routes/robots.txt.get.d.ts +2 -0
- package/dist/runtime/server/routes/robots.txt.get.mjs +41 -0
- package/dist/runtime/server/routes/rss.xml.get.d.ts +2 -0
- package/dist/runtime/server/routes/rss.xml.get.mjs +2 -0
- package/dist/runtime/server/routes/sitemap.xml.get.d.ts +2 -0
- package/dist/runtime/server/routes/sitemap.xml.get.mjs +84 -0
- package/dist/runtime/server/routes/storage/file/[...key].delete.d.ts +4 -0
- package/dist/runtime/server/routes/storage/file/[...key].delete.mjs +23 -0
- package/dist/runtime/server/routes/storage/file/[...key].get.d.ts +2 -0
- package/dist/runtime/server/routes/storage/file/[...key].get.mjs +23 -0
- package/dist/runtime/server/routes/storage/files.get.d.ts +14 -0
- package/dist/runtime/server/routes/storage/files.get.mjs +11 -0
- package/dist/runtime/server/routes/storage/presigned.post.d.ts +8 -0
- package/dist/runtime/server/routes/storage/presigned.post.mjs +39 -0
- package/dist/runtime/server/routes/storage/sign.post.d.ts +6 -0
- package/dist/runtime/server/routes/storage/sign.post.mjs +24 -0
- package/dist/runtime/server/routes/storage/upload.post.d.ts +22 -0
- package/dist/runtime/server/routes/storage/upload.post.mjs +96 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/index.delete.d.ts +8 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/index.delete.mjs +39 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/verify.post.d.ts +8 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/verify.post.mjs +39 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.get.d.ts +8 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.get.mjs +20 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.post.d.ts +8 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.post.mjs +44 -0
- package/dist/runtime/server/routes/tenants/current.get.d.ts +8 -0
- package/dist/runtime/server/routes/tenants/current.get.mjs +6 -0
- package/dist/runtime/server/tasks/cms/publish.d.ts +4 -0
- package/dist/runtime/server/tasks/cms/publish.mjs +18 -0
- package/dist/runtime/server/utils/agent-store.d.ts +24 -0
- package/dist/runtime/server/utils/agent-store.mjs +53 -0
- package/dist/runtime/server/utils/agents-registry-fallback.d.ts +1 -0
- package/dist/runtime/server/utils/agents-registry-fallback.mjs +1 -0
- package/dist/runtime/server/utils/ai.d.ts +119 -0
- package/dist/runtime/server/utils/ai.mjs +607 -0
- package/dist/runtime/server/utils/analytics-query.d.ts +109 -0
- package/dist/runtime/server/utils/analytics-query.mjs +234 -0
- package/dist/runtime/server/utils/auth.d.ts +60 -0
- package/dist/runtime/server/utils/auth.mjs +361 -0
- package/dist/runtime/server/utils/blob-store.d.ts +13 -0
- package/dist/runtime/server/utils/blob-store.mjs +60 -0
- package/dist/runtime/server/utils/bots.d.ts +21 -0
- package/dist/runtime/server/utils/bots.mjs +491 -0
- package/dist/runtime/server/utils/cache.d.ts +33 -0
- package/dist/runtime/server/utils/cache.mjs +128 -0
- package/dist/runtime/server/utils/cms-events.d.ts +17 -0
- package/dist/runtime/server/utils/cms-events.mjs +80 -0
- package/dist/runtime/server/utils/cms-filter.d.ts +3 -0
- package/dist/runtime/server/utils/cms-filter.mjs +34 -0
- package/dist/runtime/server/utils/cms.d.ts +278 -0
- package/dist/runtime/server/utils/cms.mjs +3268 -0
- package/dist/runtime/server/utils/config.d.ts +27 -0
- package/dist/runtime/server/utils/config.mjs +38 -0
- package/dist/runtime/server/utils/context.d.ts +13 -0
- package/dist/runtime/server/utils/context.mjs +98 -0
- package/dist/runtime/server/utils/crypto.d.ts +16 -0
- package/dist/runtime/server/utils/crypto.mjs +56 -0
- package/dist/runtime/server/utils/dev-logs.d.ts +21 -0
- package/dist/runtime/server/utils/dev-logs.mjs +41 -0
- package/dist/runtime/server/utils/dev-proxy.d.ts +1 -0
- package/dist/runtime/server/utils/dev-proxy.mjs +69 -0
- package/dist/runtime/server/utils/domains.d.ts +46 -0
- package/dist/runtime/server/utils/domains.mjs +318 -0
- package/dist/runtime/server/utils/drizzle.d.ts +10 -0
- package/dist/runtime/server/utils/drizzle.mjs +36 -0
- package/dist/runtime/server/utils/email-templates.d.ts +44 -0
- package/dist/runtime/server/utils/email-templates.mjs +373 -0
- package/dist/runtime/server/utils/feed.d.ts +42 -0
- package/dist/runtime/server/utils/feed.mjs +161 -0
- package/dist/runtime/server/utils/impersonation.d.ts +67 -0
- package/dist/runtime/server/utils/impersonation.mjs +298 -0
- package/dist/runtime/server/utils/jobs.d.ts +70 -0
- package/dist/runtime/server/utils/jobs.mjs +125 -0
- package/dist/runtime/server/utils/kv-store.d.ts +9 -0
- package/dist/runtime/server/utils/kv-store.mjs +32 -0
- package/dist/runtime/server/utils/mail-suppression.d.ts +62 -0
- package/dist/runtime/server/utils/mail-suppression.mjs +328 -0
- package/dist/runtime/server/utils/mail.d.ts +90 -0
- package/dist/runtime/server/utils/mail.mjs +366 -0
- package/dist/runtime/server/utils/notifications.d.ts +51 -0
- package/dist/runtime/server/utils/notifications.mjs +215 -0
- package/dist/runtime/server/utils/organization.d.ts +54 -0
- package/dist/runtime/server/utils/organization.mjs +354 -0
- package/dist/runtime/server/utils/passwordless.d.ts +48 -0
- package/dist/runtime/server/utils/passwordless.mjs +179 -0
- package/dist/runtime/server/utils/payments.d.ts +121 -0
- package/dist/runtime/server/utils/payments.mjs +1067 -0
- package/dist/runtime/server/utils/queue-fallback.d.ts +2 -0
- package/dist/runtime/server/utils/queue-fallback.mjs +2 -0
- package/dist/runtime/server/utils/queue.d.ts +4 -0
- package/dist/runtime/server/utils/queue.mjs +3 -0
- package/dist/runtime/server/utils/rag.d.ts +25 -0
- package/dist/runtime/server/utils/rag.mjs +333 -0
- package/dist/runtime/server/utils/ratelimit.d.ts +45 -0
- package/dist/runtime/server/utils/ratelimit.mjs +182 -0
- package/dist/runtime/server/utils/realtime.d.ts +110 -0
- package/dist/runtime/server/utils/realtime.mjs +197 -0
- package/dist/runtime/server/utils/schema-fallback.d.ts +3 -0
- package/dist/runtime/server/utils/schema-fallback.mjs +2 -0
- package/dist/runtime/server/utils/session.d.ts +72 -0
- package/dist/runtime/server/utils/session.mjs +287 -0
- package/dist/runtime/server/utils/sso.d.ts +49 -0
- package/dist/runtime/server/utils/sso.mjs +131 -0
- package/dist/runtime/server/utils/storage.d.ts +111 -0
- package/dist/runtime/server/utils/storage.mjs +654 -0
- package/dist/runtime/server/utils/tenant.d.ts +44 -0
- package/dist/runtime/server/utils/tenant.mjs +285 -0
- package/dist/runtime/server/utils/totp.d.ts +33 -0
- package/dist/runtime/server/utils/totp.mjs +112 -0
- package/dist/runtime/server/utils/tracker.d.ts +72 -0
- package/dist/runtime/server/utils/tracker.mjs +139 -0
- package/dist/runtime/server/utils/turnstile.d.ts +17 -0
- package/dist/runtime/server/utils/turnstile.mjs +68 -0
- package/dist/runtime/server/utils/vapid.d.ts +35 -0
- package/dist/runtime/server/utils/vapid.mjs +211 -0
- package/dist/runtime/storage.d.ts +1 -0
- package/dist/runtime/storage.mjs +0 -0
- package/dist/runtime/types/ai.d.ts +68 -0
- package/dist/runtime/types/ai.mjs +0 -0
- package/dist/runtime/types/analytics.d.ts +30 -0
- package/dist/runtime/types/analytics.mjs +0 -0
- package/dist/runtime/types/auth-globals.d.ts +14 -0
- package/dist/runtime/types/auth.d.ts +153 -0
- package/dist/runtime/types/auth.mjs +0 -0
- package/dist/runtime/types/browser.d.ts +29 -0
- package/dist/runtime/types/browser.mjs +0 -0
- package/dist/runtime/types/d1.d.ts +44 -0
- package/dist/runtime/types/d1.mjs +0 -0
- package/dist/runtime/types/drizzle.d.ts +13 -0
- package/dist/runtime/types/drizzle.mjs +0 -0
- package/dist/runtime/types/durable-object.d.ts +51 -0
- package/dist/runtime/types/durable-object.mjs +0 -0
- package/dist/runtime/types/email.d.ts +66 -0
- package/dist/runtime/types/email.mjs +0 -0
- package/dist/runtime/types/hyperdrive.d.ts +18 -0
- package/dist/runtime/types/hyperdrive.mjs +0 -0
- package/dist/runtime/types/imports.d.ts +58 -0
- package/dist/runtime/types/index.d.ts +156 -0
- package/dist/runtime/types/index.mjs +13 -0
- package/dist/runtime/types/queue.d.ts +67 -0
- package/dist/runtime/types/queue.mjs +0 -0
- package/dist/runtime/types/r2.d.ts +108 -0
- package/dist/runtime/types/r2.mjs +0 -0
- package/dist/runtime/types/ratelimit.d.ts +21 -0
- package/dist/runtime/types/ratelimit.mjs +0 -0
- package/dist/runtime/types/vectorize.d.ts +74 -0
- package/dist/runtime/types/vectorize.mjs +0 -0
- package/dist/runtime/vectorize.d.ts +21 -0
- package/dist/runtime/vectorize.mjs +53 -0
- package/dist/types.d.ts +2750 -0
- package/dist/types.mjs +1 -0
- package/dist/utils/agents.d.ts +8 -0
- package/dist/utils/auth-schema.d.ts +11 -0
- package/dist/utils/bindings.d.ts +16 -0
- package/dist/utils/cms-schema.d.ts +1 -0
- package/dist/utils/cms-sources.d.ts +62 -0
- package/dist/utils/drizzle.d.ts +42 -0
- package/dist/utils/jobs.d.ts +8 -0
- package/dist/utils/local-db.d.ts +28 -0
- package/dist/utils/notifications-schema.d.ts +15 -0
- package/dist/utils/payments-schema.d.ts +11 -0
- package/dist/utils/pkg.d.ts +15 -0
- package/dist/utils/queue.d.ts +8 -0
- package/dist/utils/tenants-schema.d.ts +11 -0
- package/package.json +104 -0
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import type { CMSEntry, CMSQueryOptions, CMSNavigationOptions, CMSNavigationItem, DocsSearchSection, CMSLocaleConfig } from "../../../types";
|
|
2
|
+
export declare function useCMS(collectionId?: string): {
|
|
3
|
+
entries: import("vue").Ref<{
|
|
4
|
+
id: string;
|
|
5
|
+
collectionId: string;
|
|
6
|
+
slug: string;
|
|
7
|
+
path?: string | undefined;
|
|
8
|
+
title: string;
|
|
9
|
+
description?: string | null | undefined;
|
|
10
|
+
coverImage?: string | null | undefined;
|
|
11
|
+
tags?: string | null | undefined;
|
|
12
|
+
order: number;
|
|
13
|
+
contentMd: string;
|
|
14
|
+
contentHtml: string;
|
|
15
|
+
body?: {
|
|
16
|
+
[x: string]: any;
|
|
17
|
+
toc?: {
|
|
18
|
+
links: {
|
|
19
|
+
id: string;
|
|
20
|
+
text: string;
|
|
21
|
+
depth: number;
|
|
22
|
+
children?: /*elided*/ any[] | undefined;
|
|
23
|
+
}[];
|
|
24
|
+
} | undefined;
|
|
25
|
+
} | undefined;
|
|
26
|
+
toc?: {
|
|
27
|
+
links: {
|
|
28
|
+
id: string;
|
|
29
|
+
text: string;
|
|
30
|
+
depth: number;
|
|
31
|
+
children?: /*elided*/ any[] | undefined;
|
|
32
|
+
}[];
|
|
33
|
+
} | undefined;
|
|
34
|
+
navigation?: {
|
|
35
|
+
title?: string | undefined;
|
|
36
|
+
icon?: string | undefined;
|
|
37
|
+
} | undefined;
|
|
38
|
+
metadata?: Record<string, unknown> | undefined;
|
|
39
|
+
metadataJson?: string | undefined;
|
|
40
|
+
status: import("../../../types").CMSEntryStatus;
|
|
41
|
+
source: "file" | "db";
|
|
42
|
+
filePath?: string | null | undefined;
|
|
43
|
+
contentHash?: string | null | undefined;
|
|
44
|
+
authorId?: string | null | undefined;
|
|
45
|
+
publishedAt?: number | null | undefined;
|
|
46
|
+
tenantId?: string | null | undefined;
|
|
47
|
+
locale?: string | undefined;
|
|
48
|
+
version?: string | undefined;
|
|
49
|
+
createdAt: number;
|
|
50
|
+
updatedAt: number;
|
|
51
|
+
}[], CMSEntry[] | {
|
|
52
|
+
id: string;
|
|
53
|
+
collectionId: string;
|
|
54
|
+
slug: string;
|
|
55
|
+
path?: string | undefined;
|
|
56
|
+
title: string;
|
|
57
|
+
description?: string | null | undefined;
|
|
58
|
+
coverImage?: string | null | undefined;
|
|
59
|
+
tags?: string | null | undefined;
|
|
60
|
+
order: number;
|
|
61
|
+
contentMd: string;
|
|
62
|
+
contentHtml: string;
|
|
63
|
+
body?: {
|
|
64
|
+
[x: string]: any;
|
|
65
|
+
toc?: {
|
|
66
|
+
links: {
|
|
67
|
+
id: string;
|
|
68
|
+
text: string;
|
|
69
|
+
depth: number;
|
|
70
|
+
children?: /*elided*/ any[] | undefined;
|
|
71
|
+
}[];
|
|
72
|
+
} | undefined;
|
|
73
|
+
} | undefined;
|
|
74
|
+
toc?: {
|
|
75
|
+
links: {
|
|
76
|
+
id: string;
|
|
77
|
+
text: string;
|
|
78
|
+
depth: number;
|
|
79
|
+
children?: /*elided*/ any[] | undefined;
|
|
80
|
+
}[];
|
|
81
|
+
} | undefined;
|
|
82
|
+
navigation?: {
|
|
83
|
+
title?: string | undefined;
|
|
84
|
+
icon?: string | undefined;
|
|
85
|
+
} | undefined;
|
|
86
|
+
metadata?: Record<string, unknown> | undefined;
|
|
87
|
+
metadataJson?: string | undefined;
|
|
88
|
+
status: import("../../../types").CMSEntryStatus;
|
|
89
|
+
source: "file" | "db";
|
|
90
|
+
filePath?: string | null | undefined;
|
|
91
|
+
contentHash?: string | null | undefined;
|
|
92
|
+
authorId?: string | null | undefined;
|
|
93
|
+
publishedAt?: number | null | undefined;
|
|
94
|
+
tenantId?: string | null | undefined;
|
|
95
|
+
locale?: string | undefined;
|
|
96
|
+
version?: string | undefined;
|
|
97
|
+
createdAt: number;
|
|
98
|
+
updatedAt: number;
|
|
99
|
+
}[]>;
|
|
100
|
+
entry: import("vue").Ref<{
|
|
101
|
+
id: string;
|
|
102
|
+
collectionId: string;
|
|
103
|
+
slug: string;
|
|
104
|
+
path?: string | undefined;
|
|
105
|
+
title: string;
|
|
106
|
+
description?: string | null | undefined;
|
|
107
|
+
coverImage?: string | null | undefined;
|
|
108
|
+
tags?: string | null | undefined;
|
|
109
|
+
order: number;
|
|
110
|
+
contentMd: string;
|
|
111
|
+
contentHtml: string;
|
|
112
|
+
body?: {
|
|
113
|
+
[x: string]: any;
|
|
114
|
+
toc?: {
|
|
115
|
+
links: {
|
|
116
|
+
id: string;
|
|
117
|
+
text: string;
|
|
118
|
+
depth: number;
|
|
119
|
+
children?: /*elided*/ any[] | undefined;
|
|
120
|
+
}[];
|
|
121
|
+
} | undefined;
|
|
122
|
+
} | undefined;
|
|
123
|
+
toc?: {
|
|
124
|
+
links: {
|
|
125
|
+
id: string;
|
|
126
|
+
text: string;
|
|
127
|
+
depth: number;
|
|
128
|
+
children?: /*elided*/ any[] | undefined;
|
|
129
|
+
}[];
|
|
130
|
+
} | undefined;
|
|
131
|
+
navigation?: {
|
|
132
|
+
title?: string | undefined;
|
|
133
|
+
icon?: string | undefined;
|
|
134
|
+
} | undefined;
|
|
135
|
+
metadata?: Record<string, unknown> | undefined;
|
|
136
|
+
metadataJson?: string | undefined;
|
|
137
|
+
status: import("../../../types").CMSEntryStatus;
|
|
138
|
+
source: "file" | "db";
|
|
139
|
+
filePath?: string | null | undefined;
|
|
140
|
+
contentHash?: string | null | undefined;
|
|
141
|
+
authorId?: string | null | undefined;
|
|
142
|
+
publishedAt?: number | null | undefined;
|
|
143
|
+
tenantId?: string | null | undefined;
|
|
144
|
+
locale?: string | undefined;
|
|
145
|
+
version?: string | undefined;
|
|
146
|
+
createdAt: number;
|
|
147
|
+
updatedAt: number;
|
|
148
|
+
} | null, CMSEntry | {
|
|
149
|
+
id: string;
|
|
150
|
+
collectionId: string;
|
|
151
|
+
slug: string;
|
|
152
|
+
path?: string | undefined;
|
|
153
|
+
title: string;
|
|
154
|
+
description?: string | null | undefined;
|
|
155
|
+
coverImage?: string | null | undefined;
|
|
156
|
+
tags?: string | null | undefined;
|
|
157
|
+
order: number;
|
|
158
|
+
contentMd: string;
|
|
159
|
+
contentHtml: string;
|
|
160
|
+
body?: {
|
|
161
|
+
[x: string]: any;
|
|
162
|
+
toc?: {
|
|
163
|
+
links: {
|
|
164
|
+
id: string;
|
|
165
|
+
text: string;
|
|
166
|
+
depth: number;
|
|
167
|
+
children?: /*elided*/ any[] | undefined;
|
|
168
|
+
}[];
|
|
169
|
+
} | undefined;
|
|
170
|
+
} | undefined;
|
|
171
|
+
toc?: {
|
|
172
|
+
links: {
|
|
173
|
+
id: string;
|
|
174
|
+
text: string;
|
|
175
|
+
depth: number;
|
|
176
|
+
children?: /*elided*/ any[] | undefined;
|
|
177
|
+
}[];
|
|
178
|
+
} | undefined;
|
|
179
|
+
navigation?: {
|
|
180
|
+
title?: string | undefined;
|
|
181
|
+
icon?: string | undefined;
|
|
182
|
+
} | undefined;
|
|
183
|
+
metadata?: Record<string, unknown> | undefined;
|
|
184
|
+
metadataJson?: string | undefined;
|
|
185
|
+
status: import("../../../types").CMSEntryStatus;
|
|
186
|
+
source: "file" | "db";
|
|
187
|
+
filePath?: string | null | undefined;
|
|
188
|
+
contentHash?: string | null | undefined;
|
|
189
|
+
authorId?: string | null | undefined;
|
|
190
|
+
publishedAt?: number | null | undefined;
|
|
191
|
+
tenantId?: string | null | undefined;
|
|
192
|
+
locale?: string | undefined;
|
|
193
|
+
version?: string | undefined;
|
|
194
|
+
createdAt: number;
|
|
195
|
+
updatedAt: number;
|
|
196
|
+
} | null>;
|
|
197
|
+
total: import("vue").Ref<number, number>;
|
|
198
|
+
status: import("vue").Ref<"error" | "success" | "idle" | "loading", "error" | "success" | "idle" | "loading">;
|
|
199
|
+
error: import("vue").Ref<Error | null, Error | null>;
|
|
200
|
+
fetchEntries: (options?: CMSQueryOptions & {
|
|
201
|
+
collection?: string;
|
|
202
|
+
}) => Promise<{
|
|
203
|
+
entries: CMSEntry[];
|
|
204
|
+
total: number;
|
|
205
|
+
page: number;
|
|
206
|
+
limit: number;
|
|
207
|
+
}>;
|
|
208
|
+
fetchEntry: (slug: string, options?: {
|
|
209
|
+
collection?: string;
|
|
210
|
+
preview?: boolean;
|
|
211
|
+
previewToken?: string;
|
|
212
|
+
expires?: number | string;
|
|
213
|
+
}) => Promise<CMSEntry>;
|
|
214
|
+
search: (q: string, options?: {
|
|
215
|
+
collection?: string;
|
|
216
|
+
limit?: number;
|
|
217
|
+
offset?: number;
|
|
218
|
+
}) => Promise<{
|
|
219
|
+
results: CMSEntry[];
|
|
220
|
+
total: number;
|
|
221
|
+
}>;
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* Fetches the navigation tree for a "page" collection. Drop-in replacement for @nuxt/content's
|
|
225
|
+
* queryCollectionNavigation().
|
|
226
|
+
*
|
|
227
|
+
* Supports:
|
|
228
|
+
*
|
|
229
|
+
* - `levels`: Max tree depth (e.g. `levels: 1` for top-level navbar links)
|
|
230
|
+
* - `path`: Scope to a specific branch/subtree for lazy loading (e.g. `path: "/docs/cms"`)
|
|
231
|
+
* - `limit` / `skip`: Pagination for large navigation sets
|
|
232
|
+
*/
|
|
233
|
+
export declare function queryCollectionNavigation(collection: string, options?: CMSNavigationOptions): Promise<CMSNavigationItem[]>;
|
|
234
|
+
/**
|
|
235
|
+
* Returns a chainable query builder for a "page" collection. Drop-in replacement for
|
|
236
|
+
*
|
|
237
|
+
* @nuxt/content's queryCollection().
|
|
238
|
+
*
|
|
239
|
+
* Usage: const page = await queryCollection("docs").path("/docs/getting-started").first()
|
|
240
|
+
*/
|
|
241
|
+
export declare function queryCollection(collection: string): {
|
|
242
|
+
locale(loc: string): /*elided*/ any;
|
|
243
|
+
preview(enabled?: boolean, token?: string, expires?: string | number): /*elided*/ any;
|
|
244
|
+
path(p: string): /*elided*/ any;
|
|
245
|
+
where(field: string, opOrValue: any, value?: any): /*elided*/ any;
|
|
246
|
+
order(field: string, direction?: "ASC" | "DESC"): /*elided*/ any;
|
|
247
|
+
select(..._fields: string[]): /*elided*/ any;
|
|
248
|
+
limit(n: number): /*elided*/ any;
|
|
249
|
+
first(): Promise<CMSEntry | null>;
|
|
250
|
+
all(): Promise<CMSEntry[]>;
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* Returns [prev, next] navigation items surrounding the entry at `path`. Drop-in replacement for
|
|
254
|
+
*
|
|
255
|
+
* @nuxt/content's queryCollectionItemSurroundings().
|
|
256
|
+
*/
|
|
257
|
+
export declare function queryCollectionItemSurroundings(collection: string, path: string, options?: {
|
|
258
|
+
fields?: string[];
|
|
259
|
+
}): Promise<[CMSEntry | null, CMSEntry | null]>;
|
|
260
|
+
/**
|
|
261
|
+
* Reactive composable for managing multi-language CMS localization state.
|
|
262
|
+
* Allows reading active locale, switching locales, and persisting preferences across requests.
|
|
263
|
+
*/
|
|
264
|
+
export declare function useCMSLocale(): {
|
|
265
|
+
locale: import("vue").Ref<string, string>;
|
|
266
|
+
locales: import("vue").ComputedRef<string[]>;
|
|
267
|
+
defaultLocale: import("vue").ComputedRef<string>;
|
|
268
|
+
localeConfigs: import("vue").ComputedRef<CMSLocaleConfig[]>;
|
|
269
|
+
setLocale: (newLocale: string) => void;
|
|
270
|
+
};
|
|
271
|
+
/**
|
|
272
|
+
* Reactive client composable for searching documentation entries and heading sections.
|
|
273
|
+
*/
|
|
274
|
+
export declare function useDocsSearch(options?: {
|
|
275
|
+
collection?: string;
|
|
276
|
+
locale?: string;
|
|
277
|
+
}): {
|
|
278
|
+
query: import("vue").Ref<string, string>;
|
|
279
|
+
results: import("vue").Ref<{
|
|
280
|
+
id: string;
|
|
281
|
+
path: string;
|
|
282
|
+
title: string;
|
|
283
|
+
pageTitle: string;
|
|
284
|
+
titles: string[];
|
|
285
|
+
content: string;
|
|
286
|
+
section?: string | undefined;
|
|
287
|
+
locale?: string | undefined;
|
|
288
|
+
level?: number | undefined;
|
|
289
|
+
score: number;
|
|
290
|
+
}[], DocsSearchSection[] | {
|
|
291
|
+
id: string;
|
|
292
|
+
path: string;
|
|
293
|
+
title: string;
|
|
294
|
+
pageTitle: string;
|
|
295
|
+
titles: string[];
|
|
296
|
+
content: string;
|
|
297
|
+
section?: string | undefined;
|
|
298
|
+
locale?: string | undefined;
|
|
299
|
+
level?: number | undefined;
|
|
300
|
+
score: number;
|
|
301
|
+
}[]>;
|
|
302
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
303
|
+
total: import("vue").Ref<number, number>;
|
|
304
|
+
error: import("vue").Ref<Error | null, Error | null>;
|
|
305
|
+
search: (q: string) => Promise<void>;
|
|
306
|
+
searchDebounced: (q: string, delay?: number) => void;
|
|
307
|
+
};
|
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import { ref, computed } from "vue";
|
|
2
|
+
import { useCMSPreview } from "./cms-preview.mjs";
|
|
3
|
+
export function useCMS(collectionId) {
|
|
4
|
+
const runtimeConfig = useRuntimeConfig();
|
|
5
|
+
const publicCms = runtimeConfig.public?.qarpeo?.cms || {};
|
|
6
|
+
const apiPath = publicCms.apiPath || "/api/cms";
|
|
7
|
+
const entries = ref([]);
|
|
8
|
+
const entry = ref(null);
|
|
9
|
+
const total = ref(0);
|
|
10
|
+
const status = ref("idle");
|
|
11
|
+
const error = ref(null);
|
|
12
|
+
const fetchEntries = async (options = {}) => {
|
|
13
|
+
const targetCollection = options.collection || collectionId;
|
|
14
|
+
if (!targetCollection) {
|
|
15
|
+
throw new Error("Collection ID must be provided to useCMS or fetchEntries");
|
|
16
|
+
}
|
|
17
|
+
status.value = "loading";
|
|
18
|
+
error.value = null;
|
|
19
|
+
try {
|
|
20
|
+
const params = new URLSearchParams();
|
|
21
|
+
if (options.page) params.set("page", String(options.page));
|
|
22
|
+
if (options.limit) params.set("limit", String(options.limit));
|
|
23
|
+
if (options.sort) params.set("sort", options.sort);
|
|
24
|
+
if (options.status) params.set("status", options.status);
|
|
25
|
+
if (options.tag) params.set("tag", options.tag);
|
|
26
|
+
const qs = params.toString() ? `?${params.toString()}` : "";
|
|
27
|
+
const res = await $fetch(`${apiPath}/${targetCollection}${qs}`);
|
|
28
|
+
entries.value = res.entries || [];
|
|
29
|
+
total.value = res.total || 0;
|
|
30
|
+
status.value = "success";
|
|
31
|
+
return res;
|
|
32
|
+
} catch (err) {
|
|
33
|
+
status.value = "error";
|
|
34
|
+
error.value = err;
|
|
35
|
+
throw err;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const fetchEntry = async (slug, options = {}) => {
|
|
39
|
+
const targetCollection = options.collection || collectionId;
|
|
40
|
+
if (!targetCollection) {
|
|
41
|
+
throw new Error("Collection ID must be provided to useCMS or fetchEntry");
|
|
42
|
+
}
|
|
43
|
+
status.value = "loading";
|
|
44
|
+
error.value = null;
|
|
45
|
+
try {
|
|
46
|
+
const params = new URLSearchParams();
|
|
47
|
+
if (options.preview) params.set("preview", "true");
|
|
48
|
+
if (options.previewToken) params.set("preview_token", options.previewToken);
|
|
49
|
+
if (options.expires) params.set("expires", String(options.expires));
|
|
50
|
+
const qs = params.toString() ? `?${params.toString()}` : "";
|
|
51
|
+
const res = await $fetch(`${apiPath}/${targetCollection}/${slug}${qs}`);
|
|
52
|
+
entry.value = res.entry;
|
|
53
|
+
status.value = "success";
|
|
54
|
+
return res.entry;
|
|
55
|
+
} catch (err) {
|
|
56
|
+
status.value = "error";
|
|
57
|
+
error.value = err;
|
|
58
|
+
throw err;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const search = async (q, options = {}) => {
|
|
62
|
+
status.value = "loading";
|
|
63
|
+
error.value = null;
|
|
64
|
+
try {
|
|
65
|
+
const params = new URLSearchParams({ q });
|
|
66
|
+
const targetCollection = options.collection || collectionId;
|
|
67
|
+
if (targetCollection) params.set("collection", targetCollection);
|
|
68
|
+
if (options.limit) params.set("limit", String(options.limit));
|
|
69
|
+
if (options.offset) params.set("offset", String(options.offset));
|
|
70
|
+
const res = await $fetch(`${apiPath}/search?${params.toString()}`);
|
|
71
|
+
status.value = "success";
|
|
72
|
+
return res;
|
|
73
|
+
} catch (err) {
|
|
74
|
+
status.value = "error";
|
|
75
|
+
error.value = err;
|
|
76
|
+
throw err;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
return {
|
|
80
|
+
entries,
|
|
81
|
+
entry,
|
|
82
|
+
total,
|
|
83
|
+
status,
|
|
84
|
+
error,
|
|
85
|
+
fetchEntries,
|
|
86
|
+
fetchEntry,
|
|
87
|
+
search
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
export async function queryCollectionNavigation(collection, options) {
|
|
91
|
+
const runtimeConfig = useRuntimeConfig();
|
|
92
|
+
const publicCms = runtimeConfig.public?.qarpeo?.cms || {};
|
|
93
|
+
const apiPath = publicCms.apiPath || "/api/cms";
|
|
94
|
+
const params = new URLSearchParams({ collection });
|
|
95
|
+
if (options?.levels != null) params.set("levels", String(options.levels));
|
|
96
|
+
if (options?.path) params.set("path", options.path);
|
|
97
|
+
if (options?.limit != null) params.set("limit", String(options.limit));
|
|
98
|
+
if (options?.skip != null) params.set("skip", String(options.skip));
|
|
99
|
+
if (options?.status) params.set("status", options.status);
|
|
100
|
+
if (options?.locale) params.set("locale", options.locale);
|
|
101
|
+
if (options?.unwrap != null) params.set("unwrap", String(options.unwrap));
|
|
102
|
+
if (options?.where && Object.keys(options.where).length > 0) {
|
|
103
|
+
params.set("where", JSON.stringify(options.where));
|
|
104
|
+
}
|
|
105
|
+
const res = await $fetch(`${apiPath}/navigation?${params.toString()}`);
|
|
106
|
+
return res?.navigation || [];
|
|
107
|
+
}
|
|
108
|
+
export function queryCollection(collection) {
|
|
109
|
+
const runtimeConfig = useRuntimeConfig();
|
|
110
|
+
const publicCms = runtimeConfig.public?.qarpeo?.cms || {};
|
|
111
|
+
const apiPath = publicCms.apiPath || "/api/cms";
|
|
112
|
+
let _path = null;
|
|
113
|
+
let _targetCollection = collection;
|
|
114
|
+
const _wheres = [];
|
|
115
|
+
let _orderField = null;
|
|
116
|
+
let _orderDirection = "ASC";
|
|
117
|
+
let _limit = null;
|
|
118
|
+
let _locale = null;
|
|
119
|
+
let _preview = null;
|
|
120
|
+
let _previewToken = null;
|
|
121
|
+
let _previewExpires = null;
|
|
122
|
+
const builder = {
|
|
123
|
+
locale(loc) {
|
|
124
|
+
_locale = loc;
|
|
125
|
+
return builder;
|
|
126
|
+
},
|
|
127
|
+
preview(enabled = true, token, expires) {
|
|
128
|
+
_preview = enabled;
|
|
129
|
+
if (token) _previewToken = token;
|
|
130
|
+
if (expires) _previewExpires = String(expires);
|
|
131
|
+
return builder;
|
|
132
|
+
},
|
|
133
|
+
path(p) {
|
|
134
|
+
_path = p;
|
|
135
|
+
if (_targetCollection === "content") {
|
|
136
|
+
const parts = p.replace(/^\//, "").split("/");
|
|
137
|
+
if (parts.length > 1 && parts[0]) {
|
|
138
|
+
_targetCollection = parts[0];
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return builder;
|
|
142
|
+
},
|
|
143
|
+
where(field, opOrValue, value) {
|
|
144
|
+
if (value !== void 0) {
|
|
145
|
+
_wheres.push({ field, op: opOrValue, value });
|
|
146
|
+
} else {
|
|
147
|
+
_wheres.push({ field, op: "=", value: opOrValue });
|
|
148
|
+
}
|
|
149
|
+
if (_targetCollection === "content" && field === "path") {
|
|
150
|
+
const val = String(value !== void 0 ? value : opOrValue);
|
|
151
|
+
const seg = val.replace(/^\//, "").split(/[/_%]/)[0];
|
|
152
|
+
if (seg) _targetCollection = seg;
|
|
153
|
+
}
|
|
154
|
+
return builder;
|
|
155
|
+
},
|
|
156
|
+
order(field, direction = "ASC") {
|
|
157
|
+
_orderField = field;
|
|
158
|
+
_orderDirection = direction;
|
|
159
|
+
return builder;
|
|
160
|
+
},
|
|
161
|
+
select(..._fields) {
|
|
162
|
+
return builder;
|
|
163
|
+
},
|
|
164
|
+
limit(n) {
|
|
165
|
+
_limit = n;
|
|
166
|
+
return builder;
|
|
167
|
+
},
|
|
168
|
+
async first() {
|
|
169
|
+
let isPreviewActive = false;
|
|
170
|
+
let effectiveToken = null;
|
|
171
|
+
let effectiveExpires = null;
|
|
172
|
+
try {
|
|
173
|
+
const previewState = useCMSPreview();
|
|
174
|
+
isPreviewActive = _preview !== null ? _preview : previewState.isPreview.value;
|
|
175
|
+
effectiveToken = _previewToken || previewState.token.value;
|
|
176
|
+
effectiveExpires = _previewExpires || previewState.expires.value;
|
|
177
|
+
} catch {
|
|
178
|
+
}
|
|
179
|
+
if (_path) {
|
|
180
|
+
const params = new URLSearchParams({ path: _path });
|
|
181
|
+
if (_locale) params.set("locale", _locale);
|
|
182
|
+
if (isPreviewActive) params.set("preview", "true");
|
|
183
|
+
if (effectiveToken) params.set("preview_token", effectiveToken);
|
|
184
|
+
if (effectiveExpires) params.set("expires", String(effectiveExpires));
|
|
185
|
+
const res = await $fetch(
|
|
186
|
+
`${apiPath}/${_targetCollection}/by-path?${params.toString()}`
|
|
187
|
+
);
|
|
188
|
+
return res?.entry || null;
|
|
189
|
+
}
|
|
190
|
+
const items = await builder.all();
|
|
191
|
+
return items[0] || null;
|
|
192
|
+
},
|
|
193
|
+
async all() {
|
|
194
|
+
let isPreviewActive = false;
|
|
195
|
+
try {
|
|
196
|
+
const previewState = useCMSPreview();
|
|
197
|
+
isPreviewActive = _preview !== null ? _preview : previewState.isPreview.value;
|
|
198
|
+
} catch {
|
|
199
|
+
}
|
|
200
|
+
const params = new URLSearchParams();
|
|
201
|
+
if (isPreviewActive) params.set("preview", "true");
|
|
202
|
+
if (_limit) params.set("limit", String(_limit));
|
|
203
|
+
if (_orderField) params.set("sort", `${_orderField}:${_orderDirection.toLowerCase()}`);
|
|
204
|
+
if (_locale) params.set("locale", _locale);
|
|
205
|
+
const qs = params.toString() ? `?${params.toString()}` : "";
|
|
206
|
+
const res = await $fetch(`${apiPath}/${_targetCollection}${qs}`);
|
|
207
|
+
let list = res?.entries || [];
|
|
208
|
+
if (_wheres.length) {
|
|
209
|
+
for (const w of _wheres) {
|
|
210
|
+
if (w.op === "!=") {
|
|
211
|
+
list = list.filter((item) => item[w.field] !== w.value);
|
|
212
|
+
} else if (w.op === "=") {
|
|
213
|
+
list = list.filter((item) => item[w.field] === w.value);
|
|
214
|
+
} else if (w.op?.toUpperCase() === "LIKE") {
|
|
215
|
+
const pattern = String(w.value).replace(/%/g, ".*");
|
|
216
|
+
const reg = new RegExp(`^${pattern}$`);
|
|
217
|
+
list = list.filter((item) => reg.test(item[w.field] || ""));
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return list;
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
return builder;
|
|
225
|
+
}
|
|
226
|
+
export async function queryCollectionItemSurroundings(collection, path, options = {}) {
|
|
227
|
+
const runtimeConfig = useRuntimeConfig();
|
|
228
|
+
const publicCms = runtimeConfig.public?.qarpeo?.cms || {};
|
|
229
|
+
const apiPath = publicCms.apiPath || "/api/cms";
|
|
230
|
+
const params = new URLSearchParams({ path });
|
|
231
|
+
if (options.fields?.length) params.set("fields", options.fields.join(","));
|
|
232
|
+
const res = await $fetch(`${apiPath}/${collection}/surroundings?${params.toString()}`);
|
|
233
|
+
return [res?.prev || null, res?.next || null];
|
|
234
|
+
}
|
|
235
|
+
export function useCMSLocale() {
|
|
236
|
+
const runtimeConfig = useRuntimeConfig();
|
|
237
|
+
const publicCms = runtimeConfig.public?.qarpeo?.cms || {};
|
|
238
|
+
const locales = computed(() => publicCms.locales || ["en"]);
|
|
239
|
+
const defaultLocale = computed(() => publicCms.defaultLocale || "en");
|
|
240
|
+
const initialLocale = (() => {
|
|
241
|
+
if (typeof document !== "undefined") {
|
|
242
|
+
const match = document.cookie.match(/(?:^|;\s*)qarpeo_locale=([^;]+)/);
|
|
243
|
+
if (match && match[1]) {
|
|
244
|
+
return decodeURIComponent(match[1]);
|
|
245
|
+
}
|
|
246
|
+
try {
|
|
247
|
+
const stored = localStorage.getItem("qarpeo_locale");
|
|
248
|
+
if (stored) return stored;
|
|
249
|
+
} catch {
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
return defaultLocale.value;
|
|
253
|
+
})();
|
|
254
|
+
const locale = ref(initialLocale);
|
|
255
|
+
function setLocale(newLocale) {
|
|
256
|
+
locale.value = newLocale;
|
|
257
|
+
if (typeof document !== "undefined") {
|
|
258
|
+
document.cookie = `qarpeo_locale=${encodeURIComponent(newLocale)}; path=/; max-age=31536000; SameSite=Lax`;
|
|
259
|
+
try {
|
|
260
|
+
localStorage.setItem("qarpeo_locale", newLocale);
|
|
261
|
+
} catch {
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
const localeConfigs = computed(() => {
|
|
266
|
+
const list = [];
|
|
267
|
+
const names = {
|
|
268
|
+
en: "English",
|
|
269
|
+
es: "Espa\xC3\xB1ol",
|
|
270
|
+
fr: "Fran\xC3\xA7ais",
|
|
271
|
+
de: "Deutsch",
|
|
272
|
+
it: "Italiano",
|
|
273
|
+
pt: "Portugu\xC3\xAAs",
|
|
274
|
+
ja: "\xE6\u2014\xA5\xE6\u0153\xAC\xE8\xAA\u017E",
|
|
275
|
+
zh: "\xE4\xB8\xAD\xE6\u2013\u2021",
|
|
276
|
+
ru: "\xD0\xA0\xD1\u0192\xD1\x81\xD1\x81\xD0\xBA\xD0\xB8\xD0\xB9",
|
|
277
|
+
ar: "\xD8\xA7\xD9\u201E\xD8\xB9\xD8\xB1\xD8\xA8\xD9\u0160\xD8\xA9"
|
|
278
|
+
};
|
|
279
|
+
const flags = {
|
|
280
|
+
en: "\xF0\u0178\u2021\xAC\xF0\u0178\u2021\xA7",
|
|
281
|
+
es: "\xF0\u0178\u2021\xAA\xF0\u0178\u2021\xB8",
|
|
282
|
+
fr: "\xF0\u0178\u2021\xAB\xF0\u0178\u2021\xB7",
|
|
283
|
+
de: "\xF0\u0178\u2021\xA9\xF0\u0178\u2021\xAA",
|
|
284
|
+
it: "\xF0\u0178\u2021\xAE\xF0\u0178\u2021\xB9",
|
|
285
|
+
pt: "\xF0\u0178\u2021\xB5\xF0\u0178\u2021\xB9",
|
|
286
|
+
ja: "\xF0\u0178\u2021\xAF\xF0\u0178\u2021\xB5",
|
|
287
|
+
zh: "\xF0\u0178\u2021\xA8\xF0\u0178\u2021\xB3",
|
|
288
|
+
ru: "\xF0\u0178\u2021\xB7\xF0\u0178\u2021\xBA",
|
|
289
|
+
ar: "\xF0\u0178\u2021\xB8\xF0\u0178\u2021\xA6"
|
|
290
|
+
};
|
|
291
|
+
for (const code of locales.value) {
|
|
292
|
+
list.push({
|
|
293
|
+
code,
|
|
294
|
+
name: names[code] || code.toUpperCase(),
|
|
295
|
+
flag: flags[code] || "\xF0\u0178\u0152\x90",
|
|
296
|
+
dir: code === "ar" || code === "he" ? "rtl" : "ltr"
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
return list;
|
|
300
|
+
});
|
|
301
|
+
return {
|
|
302
|
+
locale,
|
|
303
|
+
locales,
|
|
304
|
+
defaultLocale,
|
|
305
|
+
localeConfigs,
|
|
306
|
+
setLocale
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
export function useDocsSearch(options) {
|
|
310
|
+
const query = ref("");
|
|
311
|
+
const results = ref([]);
|
|
312
|
+
const loading = ref(false);
|
|
313
|
+
const total = ref(0);
|
|
314
|
+
const error = ref(null);
|
|
315
|
+
let timer = null;
|
|
316
|
+
async function search(q) {
|
|
317
|
+
query.value = q;
|
|
318
|
+
if (!q || !q.trim()) {
|
|
319
|
+
results.value = [];
|
|
320
|
+
total.value = 0;
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
loading.value = true;
|
|
324
|
+
error.value = null;
|
|
325
|
+
try {
|
|
326
|
+
const params = new URLSearchParams({ q: q.trim() });
|
|
327
|
+
if (options?.collection) params.set("collection", options.collection);
|
|
328
|
+
if (options?.locale) params.set("locale", options.locale);
|
|
329
|
+
const res = await $fetch(`/api/docs/search?${params.toString()}`);
|
|
330
|
+
results.value = res?.results || [];
|
|
331
|
+
total.value = res?.total || 0;
|
|
332
|
+
} catch (err) {
|
|
333
|
+
error.value = err;
|
|
334
|
+
results.value = [];
|
|
335
|
+
total.value = 0;
|
|
336
|
+
} finally {
|
|
337
|
+
loading.value = false;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
function searchDebounced(q, delay = 150) {
|
|
341
|
+
clearTimeout(timer);
|
|
342
|
+
timer = setTimeout(() => {
|
|
343
|
+
search(q);
|
|
344
|
+
}, delay);
|
|
345
|
+
}
|
|
346
|
+
return {
|
|
347
|
+
query,
|
|
348
|
+
results,
|
|
349
|
+
loading,
|
|
350
|
+
total,
|
|
351
|
+
error,
|
|
352
|
+
search,
|
|
353
|
+
searchDebounced
|
|
354
|
+
};
|
|
355
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { DocsVersionItem } from "../../../types";
|
|
2
|
+
/**
|
|
3
|
+
* Reactive client composable for docs versioning.
|
|
4
|
+
* Automatically parses active version from router path (/docs/v1/... vs /docs/...),
|
|
5
|
+
* provides list of versions, and seamlessly switches versions while preserving subpaths.
|
|
6
|
+
*
|
|
7
|
+
* Version list resolution order:
|
|
8
|
+
* 1. Explicit `options.versions` passed to this composable
|
|
9
|
+
* 2. `runtimeConfig.public.qarpeo.docsVersions` (manual override in nuxt.config)
|
|
10
|
+
* 3. Auto-derived from `runtimeConfig.public.qarpeoVersion` (injected by the qarpeo
|
|
11
|
+
* module from its own package.json) — a single "latest" entry, no dropdown shown.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useDocsVersion(options?: {
|
|
14
|
+
versions?: DocsVersionItem[];
|
|
15
|
+
}): {
|
|
16
|
+
currentVersion: import("vue").ComputedRef<string>;
|
|
17
|
+
isLatest: import("vue").ComputedRef<boolean>;
|
|
18
|
+
isArchived: import("vue").ComputedRef<boolean>;
|
|
19
|
+
versions: import("vue").Ref<{
|
|
20
|
+
id: string;
|
|
21
|
+
label: string;
|
|
22
|
+
prefix: string;
|
|
23
|
+
isLatest?: boolean | undefined;
|
|
24
|
+
isArchived?: boolean | undefined;
|
|
25
|
+
}[], DocsVersionItem[] | {
|
|
26
|
+
id: string;
|
|
27
|
+
label: string;
|
|
28
|
+
prefix: string;
|
|
29
|
+
isLatest?: boolean | undefined;
|
|
30
|
+
isArchived?: boolean | undefined;
|
|
31
|
+
}[]>;
|
|
32
|
+
activeVersionItem: import("vue").ComputedRef<DocsVersionItem>;
|
|
33
|
+
getVersionPath: (targetVersionId: string) => string;
|
|
34
|
+
switchVersion: (targetVersionId: string) => Promise<void>;
|
|
35
|
+
};
|