qarpeo 0.1.34 → 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 -5114
- 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 +31 -10
- package/dist/runtime/server/utils/cache.mjs +130 -53
- 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 +430 -1292
- package/dist/utils/auth-schema.d.ts +3 -2
- package/dist/utils/bots.d.ts +20 -0
- package/dist/utils/comments-schema.d.ts +5 -4
- package/dist/utils/drizzle.d.ts +83 -3
- package/dist/utils/durable-objects.d.ts +10 -0
- package/dist/utils/email-inbound.d.ts +10 -0
- package/dist/utils/local-db.d.ts +1 -3
- package/dist/utils/mcp.d.ts +24 -0
- package/dist/utils/notifications-schema.d.ts +5 -4
- package/dist/utils/payments-schema.d.ts +4 -3
- package/dist/utils/store-schema.d.ts +14 -0
- package/dist/utils/table-names.d.ts +1 -0
- package/dist/utils/tenants-schema.d.ts +4 -3
- package/dist/utils/tools.d.ts +20 -0
- package/dist/utils/workflows.d.ts +8 -0
- package/package.json +34 -4
- package/dist/chunks/wrangler.mjs +0 -897
- package/dist/runtime/app/components/AuthRegister.vue +0 -306
- package/dist/runtime/app/components/AuthSessionsList.vue +0 -137
- package/dist/runtime/app/components/AuthSignIn.vue +0 -298
- package/dist/runtime/app/components/CMSBookmarkButton.vue +0 -59
- package/dist/runtime/app/components/CMSImage.vue +0 -47
- package/dist/runtime/app/components/CMSLocaleSwitcher.vue +0 -110
- package/dist/runtime/app/components/CMSNewsletter.vue +0 -81
- package/dist/runtime/app/components/CMSPreviewBanner.vue +0 -83
- package/dist/runtime/app/components/CMSTableOfContents.vue +0 -84
- package/dist/runtime/app/components/CMSVersionBanner.vue +0 -53
- package/dist/runtime/app/components/CMSVersionSwitcher.vue +0 -140
- package/dist/runtime/app/components/Comments.vue +0 -411
- package/dist/runtime/app/components/FileUpload.vue +0 -200
- package/dist/runtime/app/components/ImpersonationBanner.vue +0 -61
- package/dist/runtime/app/components/NotificationBell.vue +0 -263
- package/dist/runtime/app/components/NotificationList.vue +0 -205
- package/dist/runtime/app/components/NotificationPrompt.vue +0 -133
- package/dist/runtime/app/components/PricingGated.vue +0 -81
- package/dist/runtime/app/components/PricingTable.vue +0 -274
- package/dist/runtime/app/components/RealtimeChat.vue +0 -164
- package/dist/runtime/app/components/RealtimePresence.vue +0 -129
- package/dist/runtime/app/components/RealtimeStatus.vue +0 -79
- package/dist/runtime/app/components/SubscriptionCard.vue +0 -207
- package/dist/runtime/app/components/UserProfile.vue +0 -558
|
@@ -0,0 +1,710 @@
|
|
|
1
|
+
export type CMSFieldType = "string" | "text" | "number" | "boolean" | "image" | "date" | "tags" | "json" | "reference" | "blocks" | "component";
|
|
2
|
+
/**
|
|
3
|
+
* Options for a `reference` field, which links an entry to an entry in another collection (or the
|
|
4
|
+
* same collection). References are stored inside the entry's `metadata_json`.
|
|
5
|
+
*/
|
|
6
|
+
export interface CMSReferenceFieldOptions {
|
|
7
|
+
/** Target collection ID that this field references. */
|
|
8
|
+
to: string;
|
|
9
|
+
/** Allow multiple references. When `true` the value is stored as an array. */
|
|
10
|
+
multiple?: boolean;
|
|
11
|
+
/** Optional filter restricting which target entries may be referenced. */
|
|
12
|
+
filter?: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
/** Stored shape of a single reference value inside entry `metadata_json`. */
|
|
15
|
+
export interface CMSReferenceValue {
|
|
16
|
+
id: string;
|
|
17
|
+
collectionId: string;
|
|
18
|
+
slug: string;
|
|
19
|
+
title: string;
|
|
20
|
+
}
|
|
21
|
+
export interface CMSBlockDefinition {
|
|
22
|
+
label?: string;
|
|
23
|
+
icon?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
fields: Record<string, CMSFieldDefinition>;
|
|
26
|
+
}
|
|
27
|
+
export interface CMSBlockData {
|
|
28
|
+
_id?: string;
|
|
29
|
+
_type: string;
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}
|
|
32
|
+
export interface CMSComponentDefinition {
|
|
33
|
+
name?: string;
|
|
34
|
+
label?: string;
|
|
35
|
+
icon?: string;
|
|
36
|
+
description?: string;
|
|
37
|
+
fields: Record<string, CMSFieldDefinition>;
|
|
38
|
+
}
|
|
39
|
+
export interface CMSComponentFieldOptions {
|
|
40
|
+
/** Registered component name (from cms.components) or inline component definition */
|
|
41
|
+
name?: string;
|
|
42
|
+
/** Inline field definitions if not referencing a named component */
|
|
43
|
+
fields?: Record<string, CMSFieldDefinition>;
|
|
44
|
+
/** Whether this component field is a repeatable list (array of component objects) */
|
|
45
|
+
repeatable?: boolean;
|
|
46
|
+
/** Maximum items allowed if repeatable */
|
|
47
|
+
max?: number;
|
|
48
|
+
/** Minimum items required if repeatable */
|
|
49
|
+
min?: number;
|
|
50
|
+
}
|
|
51
|
+
export interface CMSFieldDefinition {
|
|
52
|
+
type: CMSFieldType;
|
|
53
|
+
label?: string;
|
|
54
|
+
description?: string;
|
|
55
|
+
required?: boolean;
|
|
56
|
+
default?: any;
|
|
57
|
+
options?: Array<{
|
|
58
|
+
label: string;
|
|
59
|
+
value: string;
|
|
60
|
+
}>;
|
|
61
|
+
/** Reference-specific options. Only used when `type` is `"reference"`. */
|
|
62
|
+
reference?: CMSReferenceFieldOptions;
|
|
63
|
+
/** Block schemas allowed in dynamic zones / page builders. Only used when `type` is `"blocks"`. */
|
|
64
|
+
blocks?: Record<string, CMSBlockDefinition>;
|
|
65
|
+
/** Reusable component options. Only used when `type` is `"component"`. */
|
|
66
|
+
component?: string | CMSComponentFieldOptions;
|
|
67
|
+
/** Shorthand to make a component field a repeatable list */
|
|
68
|
+
repeatable?: boolean;
|
|
69
|
+
}
|
|
70
|
+
export interface CMSCollectionConfig {
|
|
71
|
+
name?: string;
|
|
72
|
+
description?: string;
|
|
73
|
+
order?: number;
|
|
74
|
+
fields?: Record<string, CMSFieldDefinition>;
|
|
75
|
+
/**
|
|
76
|
+
* Directory inside project where markdown files live for this collection. Default:
|
|
77
|
+
* `content/<collection>`
|
|
78
|
+
*/
|
|
79
|
+
directory?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Path pattern(s) to automatically match files into this collection. Supports globs: e.g.
|
|
82
|
+
* `"/docs/**"` or `["/docs/**", "/guides/**"]`.
|
|
83
|
+
*/
|
|
84
|
+
path?: string | string[];
|
|
85
|
+
/**
|
|
86
|
+
* Collection type.
|
|
87
|
+
*
|
|
88
|
+
* - `"content"` (default) — flat key/value entries, slug-based lookup
|
|
89
|
+
* - `"page"` — hierarchical markdown pages with path-based routing, TOC, MDC directives, and
|
|
90
|
+
* navigation tree
|
|
91
|
+
*/
|
|
92
|
+
type?: "content" | "page";
|
|
93
|
+
/**
|
|
94
|
+
* Whether to include this collection in the navigation tree. Set `false` or `{ hidden: true }` to
|
|
95
|
+
* hide from navigation links.
|
|
96
|
+
*
|
|
97
|
+
* @default true
|
|
98
|
+
*/
|
|
99
|
+
navigation?: boolean | {
|
|
100
|
+
hidden?: boolean;
|
|
101
|
+
title?: string;
|
|
102
|
+
icon?: string;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Hide this collection from navigation links.
|
|
106
|
+
*
|
|
107
|
+
* @default false
|
|
108
|
+
*/
|
|
109
|
+
hidden?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Editorial workflow mode for this collection.
|
|
112
|
+
*
|
|
113
|
+
* - `'db'` (default) — Dashboard edits are authoritative. D1 owns the content after initial
|
|
114
|
+
* seeding.
|
|
115
|
+
* - `'file-lock'` — Read-only in CMS Admin. Content is managed via Git files/PRs only.
|
|
116
|
+
* - `'git-sync'` — Dashboard edits write back to Git (via disk in dev, GitHub API in production).
|
|
117
|
+
*/
|
|
118
|
+
mode?: "db" | "file" | "hybrid";
|
|
119
|
+
/** Git sync configuration for this collection when mode is 'git-sync'. */
|
|
120
|
+
github?: CMSGitHubConfig;
|
|
121
|
+
/** Outgoing webhooks triggered by changes in this collection. */
|
|
122
|
+
webhooks?: CMSWebhookConfig[];
|
|
123
|
+
/** Deploy trigger settings for this collection. */
|
|
124
|
+
deploy?: CMSDeployTriggerConfig;
|
|
125
|
+
/**
|
|
126
|
+
* Editorial approval workflow configuration. When enabled, content mutations require approval
|
|
127
|
+
* before being published.
|
|
128
|
+
*
|
|
129
|
+
* - `true`: Requires an admin or second editor to approve before publish.
|
|
130
|
+
* - `{ roles: [...], allowSelfApproval: false }`: Fine-grained approval policy.
|
|
131
|
+
*/
|
|
132
|
+
approval?: boolean | CMSApprovalConfig;
|
|
133
|
+
/**
|
|
134
|
+
* Supported locales for localized content (e.g. ["en", "es", "fr", "de"]).
|
|
135
|
+
*
|
|
136
|
+
* @default ["en"]
|
|
137
|
+
*/
|
|
138
|
+
locales?: string[];
|
|
139
|
+
/**
|
|
140
|
+
* Default fallback locale for content resolution.
|
|
141
|
+
*
|
|
142
|
+
* @default "en"
|
|
143
|
+
*/
|
|
144
|
+
defaultLocale?: string;
|
|
145
|
+
/**
|
|
146
|
+
* Enable scheduled publishing for this collection.
|
|
147
|
+
*
|
|
148
|
+
* @default false
|
|
149
|
+
*/
|
|
150
|
+
scheduledPublish?: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* Whether this collection is a singleton (max 1 entry, e.g. site settings).
|
|
153
|
+
*
|
|
154
|
+
* @default false
|
|
155
|
+
*/
|
|
156
|
+
singleton?: boolean;
|
|
157
|
+
}
|
|
158
|
+
export interface CMSApprovalConfig {
|
|
159
|
+
/**
|
|
160
|
+
* Roles authorized to approve and publish entries in this collection.
|
|
161
|
+
*
|
|
162
|
+
* @default ["admin"]
|
|
163
|
+
*/
|
|
164
|
+
roles?: string[];
|
|
165
|
+
/**
|
|
166
|
+
* Whether the author of an entry is permitted to approve their own entry. When `false`, a
|
|
167
|
+
* different team member with an approver role must approve it.
|
|
168
|
+
*
|
|
169
|
+
* @default false
|
|
170
|
+
*/
|
|
171
|
+
allowSelfApproval?: boolean;
|
|
172
|
+
}
|
|
173
|
+
export interface CMSGitHubConfig {
|
|
174
|
+
/**
|
|
175
|
+
* GitHub repository in "owner/repo" format. e.g. "qarpeo/qarpeo.com" Can also be inferred from
|
|
176
|
+
* process.env.GITHUB_REPOSITORY.
|
|
177
|
+
*/
|
|
178
|
+
repo?: string;
|
|
179
|
+
/**
|
|
180
|
+
* Target branch for direct commits.
|
|
181
|
+
*
|
|
182
|
+
* @default "main"
|
|
183
|
+
*/
|
|
184
|
+
branch?: string;
|
|
185
|
+
/**
|
|
186
|
+
* Whether to open a Pull Request instead of committing directly to the branch.
|
|
187
|
+
*
|
|
188
|
+
* @default false
|
|
189
|
+
*/
|
|
190
|
+
pr?: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* Base branch to open PR against if `pr: true`.
|
|
193
|
+
*
|
|
194
|
+
* @default "main"
|
|
195
|
+
*/
|
|
196
|
+
prBase?: string;
|
|
197
|
+
/**
|
|
198
|
+
* Branch prefix when creating a branch for PR.
|
|
199
|
+
*
|
|
200
|
+
* @default "content/"
|
|
201
|
+
*/
|
|
202
|
+
branchPrefix?: string;
|
|
203
|
+
/**
|
|
204
|
+
* Commit message template. Supports placeholders: `{collection}`, `{slug}`, `{action}` (create,
|
|
205
|
+
* update, delete)
|
|
206
|
+
*
|
|
207
|
+
* @default "content({collection}): {action} {slug}"
|
|
208
|
+
*/
|
|
209
|
+
commitMessage?: string;
|
|
210
|
+
/**
|
|
211
|
+
* GitHub personal access token with contents:write permission. Falls back to
|
|
212
|
+
* `process.env.GITHUB_TOKEN` or `GH_TOKEN`.
|
|
213
|
+
*/
|
|
214
|
+
token?: string;
|
|
215
|
+
/**
|
|
216
|
+
* Secret used to verify incoming GitHub webhook signatures (`X-Hub-Signature-256`). Falls back to
|
|
217
|
+
* `process.env.GITHUB_WEBHOOK_SECRET` or `cms.webhookSecret`.
|
|
218
|
+
*/
|
|
219
|
+
webhookSecret?: string;
|
|
220
|
+
}
|
|
221
|
+
export interface CMSWebhookConfig {
|
|
222
|
+
/** Target endpoint URL to send HTTP POST request */
|
|
223
|
+
url: string;
|
|
224
|
+
/**
|
|
225
|
+
* Action events that trigger this webhook.
|
|
226
|
+
*
|
|
227
|
+
* @default ["publish", "unpublish"]
|
|
228
|
+
*/
|
|
229
|
+
events?: Array<"create" | "update" | "delete" | "publish" | "unpublish">;
|
|
230
|
+
/** Optional secret for HMAC-SHA256 signature in `X-Qarpeo-Signature` header (`sha256=<hex>`). */
|
|
231
|
+
secret?: string;
|
|
232
|
+
/** Custom headers to include with the webhook POST request. */
|
|
233
|
+
headers?: Record<string, string>;
|
|
234
|
+
}
|
|
235
|
+
export interface CMSDeployTriggerConfig {
|
|
236
|
+
/**
|
|
237
|
+
* When to trigger a site redeployment.
|
|
238
|
+
*
|
|
239
|
+
* - `"on-publish"` (default) — Trigger whenever content is published or unpublished
|
|
240
|
+
* - `"manual"` — Only triggered when explicitly requested via CMS Admin or API
|
|
241
|
+
*/
|
|
242
|
+
trigger?: "on-publish" | "manual";
|
|
243
|
+
/**
|
|
244
|
+
* HTTP deploy hook URL (e.g. Cloudflare Pages deploy hook, Vercel deploy hook, Netlify build
|
|
245
|
+
* hook).
|
|
246
|
+
*/
|
|
247
|
+
hookUrl?: string;
|
|
248
|
+
/** Provider options (e.g. GitHub Actions workflow dispatch). */
|
|
249
|
+
github?: {
|
|
250
|
+
repo: string;
|
|
251
|
+
workflow: string;
|
|
252
|
+
ref?: string;
|
|
253
|
+
token?: string;
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
export interface CMSRevisionsConfig {
|
|
257
|
+
/**
|
|
258
|
+
* Maximum revisions to retain per entry before pruning.
|
|
259
|
+
*
|
|
260
|
+
* @default 10
|
|
261
|
+
*/
|
|
262
|
+
max?: number;
|
|
263
|
+
}
|
|
264
|
+
export interface CMSOptions {
|
|
265
|
+
/**
|
|
266
|
+
* Expose built-in REST API endpoints for the CMS at `apiPath` (e.g. `/api/cms/*`). When `false`
|
|
267
|
+
* (default), the CMS is purely headless and operated via server utilities.
|
|
268
|
+
*
|
|
269
|
+
* @default false
|
|
270
|
+
*/
|
|
271
|
+
api?: boolean;
|
|
272
|
+
/**
|
|
273
|
+
* Base route path for public CMS API endpoints.
|
|
274
|
+
*
|
|
275
|
+
* @default "/api/cms"
|
|
276
|
+
*/
|
|
277
|
+
apiPath?: string;
|
|
278
|
+
/**
|
|
279
|
+
* Root directory in project for file-based markdown/MDX content.
|
|
280
|
+
*
|
|
281
|
+
* @default "content"
|
|
282
|
+
*/
|
|
283
|
+
contentDir?: string;
|
|
284
|
+
/**
|
|
285
|
+
* Shiki syntax highlighting shortcut.
|
|
286
|
+
*
|
|
287
|
+
* @default true
|
|
288
|
+
*/
|
|
289
|
+
shiki?: boolean | CMSShikiPluginOptions;
|
|
290
|
+
/**
|
|
291
|
+
* Hybrid mode: automatically synchronize local content files into D1 on dev server start.
|
|
292
|
+
*
|
|
293
|
+
* @default true
|
|
294
|
+
*/
|
|
295
|
+
hybrid?: boolean;
|
|
296
|
+
/**
|
|
297
|
+
* Roles allowed to access the CMS admin and mutate entries.
|
|
298
|
+
*
|
|
299
|
+
* @default ["admin", "editor"]
|
|
300
|
+
*/
|
|
301
|
+
roles?: string[];
|
|
302
|
+
/**
|
|
303
|
+
* Revision history settings.
|
|
304
|
+
*
|
|
305
|
+
* @default { max: 10 }
|
|
306
|
+
*/
|
|
307
|
+
revisions?: boolean | CMSRevisionsConfig;
|
|
308
|
+
/**
|
|
309
|
+
* Cache queries at the edge in KV.
|
|
310
|
+
*
|
|
311
|
+
* @default true
|
|
312
|
+
*/
|
|
313
|
+
cache?: boolean;
|
|
314
|
+
/** Collections schema definitions. */
|
|
315
|
+
collections?: Record<string, CMSCollectionConfig>;
|
|
316
|
+
/**
|
|
317
|
+
* Globally registered reusable component definitions. Components can be referenced by name in
|
|
318
|
+
* collection fields using `type: \"component\"`\.
|
|
319
|
+
*/
|
|
320
|
+
components?: Record<string, CMSComponentDefinition>;
|
|
321
|
+
/** Multi-source content aggregation sources (can also be defined via content _sources.yml files). */
|
|
322
|
+
sources?: CMSSourceConfig[];
|
|
323
|
+
/**
|
|
324
|
+
* Glob pattern(s) to exclude files or folders from CMS synchronization. e.g. `["**\/hosting\/**",
|
|
325
|
+
* "**\/dashboard\/**"]`
|
|
326
|
+
*/
|
|
327
|
+
exclude?: string | string[];
|
|
328
|
+
/** Global GitHub repository configuration for CMS git-sync write-back. */
|
|
329
|
+
github?: CMSGitHubConfig;
|
|
330
|
+
/** Global deploy trigger configuration to rebuild static sites on content publish. */
|
|
331
|
+
deploy?: CMSDeployTriggerConfig;
|
|
332
|
+
/** Global outgoing webhook endpoints triggered on content mutations. */
|
|
333
|
+
webhooks?: CMSWebhookConfig[];
|
|
334
|
+
/**
|
|
335
|
+
* Secret used to authenticate incoming CMS webhooks (e.g. from GitHub, Cloudflare Queues, or
|
|
336
|
+
* CI/CD). Passed via `X-CMS-Secret`, `Authorization: Bearer <secret>`, or `X-Hub-Signature-256`.
|
|
337
|
+
*/
|
|
338
|
+
webhookSecret?: string;
|
|
339
|
+
/** Global approval workflow default for collections. */
|
|
340
|
+
approval?: boolean | CMSApprovalConfig;
|
|
341
|
+
/**
|
|
342
|
+
* Supported locales for localized content (e.g. ["en", "es", "fr", "de"]).
|
|
343
|
+
*
|
|
344
|
+
* @default ["en"]
|
|
345
|
+
*/
|
|
346
|
+
locales?: string[];
|
|
347
|
+
/**
|
|
348
|
+
* Default fallback locale for content resolution.
|
|
349
|
+
*
|
|
350
|
+
* @default "en"
|
|
351
|
+
*/
|
|
352
|
+
defaultLocale?: string;
|
|
353
|
+
/**
|
|
354
|
+
* Global default for scheduled publishing.
|
|
355
|
+
*
|
|
356
|
+
* @default false
|
|
357
|
+
*/
|
|
358
|
+
scheduledPublish?: boolean;
|
|
359
|
+
/**
|
|
360
|
+
* Markdown rendering plugins to enable.
|
|
361
|
+
*
|
|
362
|
+
* Each key enables (or configures) an optional comark plugin:
|
|
363
|
+
*
|
|
364
|
+
* - `shiki` — Syntax highlighting via Shiki. Enabled by default when the `cms` option is active.
|
|
365
|
+
* - `math` — KaTeX equation rendering (future).
|
|
366
|
+
* - `mermaid` — Mermaid diagram rendering (future).
|
|
367
|
+
*
|
|
368
|
+
* Pass `true`/`false` to enable/disable, or an options object to configure.
|
|
369
|
+
*
|
|
370
|
+
* @example
|
|
371
|
+
* ;```ts
|
|
372
|
+
* cms: {
|
|
373
|
+
* plugins: {
|
|
374
|
+
* shiki: { theme: 'github-dark' },
|
|
375
|
+
* math: true,
|
|
376
|
+
* }
|
|
377
|
+
* }
|
|
378
|
+
* ```
|
|
379
|
+
*/
|
|
380
|
+
/**
|
|
381
|
+
* Comments moderation and behavior configuration.
|
|
382
|
+
*
|
|
383
|
+
* @default { autoApprove: false }
|
|
384
|
+
*/
|
|
385
|
+
comments?: CMSCommentsConfig;
|
|
386
|
+
plugins?: CMSPluginOptions;
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Comments configuration options for CMS entries.
|
|
390
|
+
*/
|
|
391
|
+
export interface CMSCommentsConfig {
|
|
392
|
+
/**
|
|
393
|
+
* Whether anonymous comments are automatically approved without moderation.
|
|
394
|
+
* When `false` (default), comments start in `pending` status.
|
|
395
|
+
*
|
|
396
|
+
* @default false
|
|
397
|
+
*/
|
|
398
|
+
autoApprove?: boolean;
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Config-driven plugin options for the CMS markdown renderer. Plugins are applied both server-side
|
|
402
|
+
* (pre-render to HTML) and client-side (live render via ContentRenderer).
|
|
403
|
+
*/
|
|
404
|
+
export interface CMSPluginOptions {
|
|
405
|
+
/**
|
|
406
|
+
* Shiki syntax highlighting. Pass `true` to enable with defaults, or an options object to
|
|
407
|
+
* customise.
|
|
408
|
+
*
|
|
409
|
+
* @default true (when cms is enabled)
|
|
410
|
+
*/
|
|
411
|
+
shiki?: boolean | CMSShikiPluginOptions;
|
|
412
|
+
/**
|
|
413
|
+
* KaTeX math equation rendering.
|
|
414
|
+
*
|
|
415
|
+
* @default false
|
|
416
|
+
*/
|
|
417
|
+
math?: boolean;
|
|
418
|
+
/**
|
|
419
|
+
* Mermaid diagram rendering.
|
|
420
|
+
*
|
|
421
|
+
* @default false
|
|
422
|
+
*/
|
|
423
|
+
mermaid?: boolean;
|
|
424
|
+
}
|
|
425
|
+
/** Options for the Shiki syntax highlighting plugin. */
|
|
426
|
+
export interface CMSShikiPluginOptions {
|
|
427
|
+
/**
|
|
428
|
+
* Light mode theme.
|
|
429
|
+
*
|
|
430
|
+
* @default "material-theme-lighter"
|
|
431
|
+
*/
|
|
432
|
+
lightTheme?: string;
|
|
433
|
+
/**
|
|
434
|
+
* Dark mode theme.
|
|
435
|
+
*
|
|
436
|
+
* @default "material-theme-palenight"
|
|
437
|
+
*/
|
|
438
|
+
darkTheme?: string;
|
|
439
|
+
/**
|
|
440
|
+
* Extra languages to support beyond the built-in defaults. Built-in defaults: vue, tsx, svelte,
|
|
441
|
+
* typescript, javascript, bash, json, yaml, astro.
|
|
442
|
+
*/
|
|
443
|
+
langs?: string[];
|
|
444
|
+
}
|
|
445
|
+
export interface CMSSourceConfig {
|
|
446
|
+
/**
|
|
447
|
+
* Source location:
|
|
448
|
+
*
|
|
449
|
+
* - Local directory relative to the _sources.yml file: e.g. `../qarpeo/docs`
|
|
450
|
+
* - Remote GitHub repo: e.g. `github:qarpeo/qarpeo-blog/posts#main`
|
|
451
|
+
* - Remote tarball URL
|
|
452
|
+
*/
|
|
453
|
+
from: string;
|
|
454
|
+
/**
|
|
455
|
+
* Content URL prefix.
|
|
456
|
+
*
|
|
457
|
+
* - Omitted / './' : relative to the directory containing this _sources.yml
|
|
458
|
+
* - '../sub' : relative, up one level
|
|
459
|
+
* - '/docs' : absolute from content root
|
|
460
|
+
*/
|
|
461
|
+
prefix?: string;
|
|
462
|
+
/** Priority (higher wins). Default: 0. Local content/ files have implicit priority 10. */
|
|
463
|
+
priority?: number;
|
|
464
|
+
/** Order position in navigation relative to other sources (e.g. 1, 2, 3). */
|
|
465
|
+
order?: number;
|
|
466
|
+
/** Glob include pattern (default: all markdown files) */
|
|
467
|
+
include?: string;
|
|
468
|
+
/** Glob exclude pattern (e.g. "_drafts/*") */
|
|
469
|
+
exclude?: string;
|
|
470
|
+
/** GitHub / Git provider auth token for private repositories */
|
|
471
|
+
token?: string;
|
|
472
|
+
/** Human-readable label for debugging / devtools display */
|
|
473
|
+
label?: string;
|
|
474
|
+
}
|
|
475
|
+
export interface CMSResolvedSource extends CMSSourceConfig {
|
|
476
|
+
/** Absolute resolved path on local disk (either resolved sibling or downloaded giget cache dir) */
|
|
477
|
+
resolvedDir: string;
|
|
478
|
+
/** Normalized absolute content route prefix (e.g. "/docs", "/templates") */
|
|
479
|
+
normalizedPrefix: string;
|
|
480
|
+
/** Source config file location where this was defined */
|
|
481
|
+
sourceConfigFile?: string;
|
|
482
|
+
}
|
|
483
|
+
export interface CMSHeadingLink {
|
|
484
|
+
id: string;
|
|
485
|
+
text: string;
|
|
486
|
+
depth: number;
|
|
487
|
+
children?: CMSHeadingLink[];
|
|
488
|
+
}
|
|
489
|
+
export interface CMSNavigationItem {
|
|
490
|
+
title: string;
|
|
491
|
+
path?: string;
|
|
492
|
+
to?: string;
|
|
493
|
+
icon?: string;
|
|
494
|
+
description?: string;
|
|
495
|
+
type?: string;
|
|
496
|
+
children?: CMSNavigationItem[];
|
|
497
|
+
locale?: string;
|
|
498
|
+
[key: string]: any;
|
|
499
|
+
}
|
|
500
|
+
export interface CMSNavigationOptions {
|
|
501
|
+
/**
|
|
502
|
+
* Maximum nesting depth to return. `1` = root level only (e.g. top-level sections for header
|
|
503
|
+
* menus).
|
|
504
|
+
*/
|
|
505
|
+
levels?: number;
|
|
506
|
+
/**
|
|
507
|
+
* Scope navigation tree to a specific path prefix (e.g. `"/docs/cms"`). Useful for lazy-loading
|
|
508
|
+
* subtrees on demand.
|
|
509
|
+
*/
|
|
510
|
+
path?: string;
|
|
511
|
+
/** Maximum number of items to return (at root or top-level list). */
|
|
512
|
+
limit?: number;
|
|
513
|
+
/** Number of items to skip (offset) for pagination. */
|
|
514
|
+
skip?: number;
|
|
515
|
+
/**
|
|
516
|
+
* Filter navigation items by editorial status.
|
|
517
|
+
*
|
|
518
|
+
* - `"published"` (default) — only published items
|
|
519
|
+
* - `"draft"` — only draft items
|
|
520
|
+
* - `"all"` — all items including drafts
|
|
521
|
+
*
|
|
522
|
+
* @default "published"
|
|
523
|
+
*/
|
|
524
|
+
status?: "published" | "draft" | "all";
|
|
525
|
+
/**
|
|
526
|
+
* Filter navigation items by any frontmatter field value. First-class columns (`title`,
|
|
527
|
+
* `description`, `tags`, `path`, `slug`) are matched directly; all other fields are matched
|
|
528
|
+
* against the `metadata_json` blob stored alongside each entry.
|
|
529
|
+
*
|
|
530
|
+
* Values are compared with strict equality (`===`). `null` matches entries where the field is
|
|
531
|
+
* absent or explicitly `null`.
|
|
532
|
+
*
|
|
533
|
+
* @example
|
|
534
|
+
* // Only show items tagged as tutorials in the "guides" category
|
|
535
|
+
* queryCollectionNavigation("docs", { where: { category: "guides", featured: true } })
|
|
536
|
+
*/
|
|
537
|
+
where?: Record<string, string | number | boolean | null>;
|
|
538
|
+
/** Optional locale filter (e.g. "en", "es") */
|
|
539
|
+
locale?: string;
|
|
540
|
+
/** When true, unwraps a single root collection node (e.g. /docs) */
|
|
541
|
+
unwrap?: boolean;
|
|
542
|
+
}
|
|
543
|
+
export interface CMSEntry {
|
|
544
|
+
id: string;
|
|
545
|
+
collectionId: string;
|
|
546
|
+
slug: string;
|
|
547
|
+
path?: string;
|
|
548
|
+
title: string;
|
|
549
|
+
description?: string | null;
|
|
550
|
+
coverImage?: string | null;
|
|
551
|
+
tags?: string | null;
|
|
552
|
+
order: number;
|
|
553
|
+
contentMd: string;
|
|
554
|
+
contentHtml: string;
|
|
555
|
+
body?: {
|
|
556
|
+
toc?: {
|
|
557
|
+
links: CMSHeadingLink[];
|
|
558
|
+
};
|
|
559
|
+
[key: string]: any;
|
|
560
|
+
};
|
|
561
|
+
toc?: {
|
|
562
|
+
links: CMSHeadingLink[];
|
|
563
|
+
};
|
|
564
|
+
navigation?: {
|
|
565
|
+
title?: string;
|
|
566
|
+
icon?: string;
|
|
567
|
+
};
|
|
568
|
+
readingTime?: number;
|
|
569
|
+
categoryId?: string | null;
|
|
570
|
+
subCategoryId?: string | null;
|
|
571
|
+
featured?: boolean;
|
|
572
|
+
viewCount?: number;
|
|
573
|
+
author?: any;
|
|
574
|
+
metadata?: Record<string, unknown>;
|
|
575
|
+
metadataJson?: string;
|
|
576
|
+
status: CMSEntryStatus;
|
|
577
|
+
source: "file" | "db";
|
|
578
|
+
filePath?: string | null;
|
|
579
|
+
contentHash?: string | null;
|
|
580
|
+
authorId?: string | null;
|
|
581
|
+
publishedAt?: number | null;
|
|
582
|
+
tenantId?: string | null;
|
|
583
|
+
locale?: string;
|
|
584
|
+
version?: string;
|
|
585
|
+
createdAt: number;
|
|
586
|
+
updatedAt: number;
|
|
587
|
+
}
|
|
588
|
+
export type CMSEntryStatus = "draft" | "pending_review" | "scheduled" | "published" | "archived";
|
|
589
|
+
/** A CMS collection record as stored in D1 (`cms_collection`). */
|
|
590
|
+
export interface CMSCollection {
|
|
591
|
+
id: string;
|
|
592
|
+
name: string;
|
|
593
|
+
description?: string | null;
|
|
594
|
+
schemaJson: string;
|
|
595
|
+
tenantId?: string | null;
|
|
596
|
+
/** Parsed field definitions (derived from schemaJson at runtime). */
|
|
597
|
+
fields?: Record<string, CMSFieldDefinition>;
|
|
598
|
+
/** 'config' = seeded from nuxt.config.ts; 'db' = created from CMS Admin. */
|
|
599
|
+
source: "config" | "db";
|
|
600
|
+
/** Order position in collection list / navigation tree. */
|
|
601
|
+
order?: number;
|
|
602
|
+
/** Whether this collection is a singleton (max 1 entry). */
|
|
603
|
+
singleton?: boolean;
|
|
604
|
+
createdAt: number;
|
|
605
|
+
updatedAt: number;
|
|
606
|
+
}
|
|
607
|
+
export interface CMSPreviewTokenResult {
|
|
608
|
+
token: string;
|
|
609
|
+
expires: number;
|
|
610
|
+
/** Direct URL to preview the page with query parameters */
|
|
611
|
+
previewUrl: string;
|
|
612
|
+
/** One-click share URL that activates the preview cookie and redirects to the page */
|
|
613
|
+
shareUrl: string;
|
|
614
|
+
}
|
|
615
|
+
export interface CMSPreviewState {
|
|
616
|
+
isPreview: boolean;
|
|
617
|
+
token: string | null;
|
|
618
|
+
expires: string | null;
|
|
619
|
+
collection: string | null;
|
|
620
|
+
slug: string | null;
|
|
621
|
+
}
|
|
622
|
+
export interface CMSQueryOptions {
|
|
623
|
+
page?: number;
|
|
624
|
+
limit?: number;
|
|
625
|
+
sort?: string;
|
|
626
|
+
status?: CMSEntryStatus | "all";
|
|
627
|
+
tag?: string;
|
|
628
|
+
category?: string;
|
|
629
|
+
categoryId?: string;
|
|
630
|
+
authorId?: string;
|
|
631
|
+
search?: string;
|
|
632
|
+
/** Filter entries by locale (e.g. 'en', 'es') */
|
|
633
|
+
locale?: string;
|
|
634
|
+
/** Filter entries by version (e.g. 'latest', 'v1') */
|
|
635
|
+
version?: string;
|
|
636
|
+
fields?: string | string[];
|
|
637
|
+
/** Whether to allow fetching draft entries when preview mode or token is active */
|
|
638
|
+
preview?: boolean;
|
|
639
|
+
/** HMAC preview token for draft access */
|
|
640
|
+
previewToken?: string;
|
|
641
|
+
/** Preview token expiration timestamp */
|
|
642
|
+
previewExpires?: string | number;
|
|
643
|
+
/**
|
|
644
|
+
* Filter entries by custom metadata fields. Key-value pairs matching JSON properties in
|
|
645
|
+
* `metadataJson`.
|
|
646
|
+
*/
|
|
647
|
+
where?: Record<string, unknown>;
|
|
648
|
+
/**
|
|
649
|
+
* Resolve reference fields into the full referenced entry. `true` populates every reference
|
|
650
|
+
* field; an array of field names populates only the listed fields. When omitted, reference fields
|
|
651
|
+
* are returned as lightweight `{ id, collectionId, slug, title }` objects.
|
|
652
|
+
*/
|
|
653
|
+
populate?: boolean | string[];
|
|
654
|
+
}
|
|
655
|
+
export interface CMSCreateInput {
|
|
656
|
+
id?: string;
|
|
657
|
+
slug: string;
|
|
658
|
+
title: string;
|
|
659
|
+
description?: string;
|
|
660
|
+
coverImage?: string;
|
|
661
|
+
tags?: string;
|
|
662
|
+
order?: number;
|
|
663
|
+
contentMd?: string;
|
|
664
|
+
content?: string;
|
|
665
|
+
categoryId?: string | null;
|
|
666
|
+
subCategoryId?: string | null;
|
|
667
|
+
featured?: boolean;
|
|
668
|
+
viewCount?: number;
|
|
669
|
+
readingTime?: number;
|
|
670
|
+
metadata?: Record<string, unknown>;
|
|
671
|
+
status?: CMSEntryStatus;
|
|
672
|
+
source?: "file" | "db";
|
|
673
|
+
authorId?: string;
|
|
674
|
+
publishedAt?: number | null;
|
|
675
|
+
}
|
|
676
|
+
export interface CMSUpdateInput {
|
|
677
|
+
slug?: string;
|
|
678
|
+
title?: string;
|
|
679
|
+
description?: string;
|
|
680
|
+
coverImage?: string;
|
|
681
|
+
tags?: string;
|
|
682
|
+
order?: number;
|
|
683
|
+
contentMd?: string;
|
|
684
|
+
content?: string;
|
|
685
|
+
categoryId?: string | null;
|
|
686
|
+
subCategoryId?: string | null;
|
|
687
|
+
featured?: boolean;
|
|
688
|
+
viewCount?: number;
|
|
689
|
+
readingTime?: number;
|
|
690
|
+
metadata?: Record<string, unknown>;
|
|
691
|
+
status?: CMSEntryStatus;
|
|
692
|
+
source?: "file" | "db";
|
|
693
|
+
authorId?: string;
|
|
694
|
+
publishedAt?: number | null;
|
|
695
|
+
}
|
|
696
|
+
export interface CMSCategory {
|
|
697
|
+
id: string;
|
|
698
|
+
tenantId?: string | null;
|
|
699
|
+
name: string;
|
|
700
|
+
slug: string;
|
|
701
|
+
description?: string | null;
|
|
702
|
+
icon?: string | null;
|
|
703
|
+
parentId?: string | null;
|
|
704
|
+
order: number;
|
|
705
|
+
metadataJson?: string;
|
|
706
|
+
metadata?: Record<string, unknown>;
|
|
707
|
+
createdAt: number;
|
|
708
|
+
updatedAt: number;
|
|
709
|
+
[key: string]: any;
|
|
710
|
+
}
|