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,27 @@
|
|
|
1
|
+
import type { AuthOptions, BlobOptions, CMSOptions, PaymentsOptions, AppRateLimitOptions, RealtimeOptions, MailOptions, AnalyticsOptions, MultitenantOptions } from "../../../types";
|
|
2
|
+
export interface QarpeoRuntimeConfig {
|
|
3
|
+
auth: AuthOptions;
|
|
4
|
+
blob: BlobOptions;
|
|
5
|
+
storage: BlobOptions;
|
|
6
|
+
cms: CMSOptions;
|
|
7
|
+
payments: PaymentsOptions;
|
|
8
|
+
ratelimit: AppRateLimitOptions;
|
|
9
|
+
realtime: RealtimeOptions;
|
|
10
|
+
mail: MailOptions;
|
|
11
|
+
analytics: AnalyticsOptions;
|
|
12
|
+
multitenant: MultitenantOptions;
|
|
13
|
+
agents: Record<string, any>;
|
|
14
|
+
jobs: Record<string, any>;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Returns strongly-typed Qarpeo server runtime configuration without requiring manual `as any` casting.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getQarpeoConfig(event?: any): QarpeoRuntimeConfig;
|
|
21
|
+
/** Alias for getQarpeoConfig */
|
|
22
|
+
export declare const useQarpeoConfig: typeof getQarpeoConfig;
|
|
23
|
+
/**
|
|
24
|
+
* Returns the application secret (NUXT_APP_SECRET or legacy NUXT_SESSION_PASSWORD) from runtime config.
|
|
25
|
+
* Used for HMAC signing where we need a root secret key but not qarpeo-specific config.
|
|
26
|
+
*/
|
|
27
|
+
export declare function getSessionSecret(event?: any, fallback?: string): string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useRuntimeConfig } from "nuxt/server";
|
|
2
|
+
export function getQarpeoConfig(event) {
|
|
3
|
+
let rc;
|
|
4
|
+
try {
|
|
5
|
+
rc = useRuntimeConfig(event);
|
|
6
|
+
} catch {
|
|
7
|
+
rc = void 0;
|
|
8
|
+
}
|
|
9
|
+
if (!rc) {
|
|
10
|
+
rc = globalThis.__NUXT_RUNTIME_CONFIG__ || {};
|
|
11
|
+
}
|
|
12
|
+
const q = rc?.qarpeo || {};
|
|
13
|
+
return {
|
|
14
|
+
auth: q.auth || {},
|
|
15
|
+
blob: q.blob || q.storage || {},
|
|
16
|
+
storage: q.storage || q.blob || {},
|
|
17
|
+
cms: q.cms || {},
|
|
18
|
+
payments: q.payments || {},
|
|
19
|
+
ratelimit: q.ratelimit || {},
|
|
20
|
+
realtime: q.realtime || {},
|
|
21
|
+
mail: q.mail || {},
|
|
22
|
+
analytics: q.analytics || {},
|
|
23
|
+
multitenant: q.multitenant || {},
|
|
24
|
+
agents: q.agents || {},
|
|
25
|
+
jobs: q.jobs || {},
|
|
26
|
+
...q
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export const useQarpeoConfig = getQarpeoConfig;
|
|
30
|
+
export function getSessionSecret(event, fallback = "qarpeo-storage-secret-key-salt") {
|
|
31
|
+
let rc;
|
|
32
|
+
try {
|
|
33
|
+
rc = useRuntimeConfig(event);
|
|
34
|
+
} catch {
|
|
35
|
+
rc = void 0;
|
|
36
|
+
}
|
|
37
|
+
return rc?.appSecret || rc?.session?.password || globalThis.__NUXT_RUNTIME_CONFIG__?.appSecret || globalThis.__NUXT_RUNTIME_CONFIG__?.session?.password || globalThis.process?.env?.NUXT_APP_SECRET || globalThis.process?.env?.NUXT_SESSION_PASSWORD || fallback;
|
|
38
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { QarpeoSession, QarpeoAuthContext, RequireAuthOptions } from "../../types/auth";
|
|
2
|
+
/** Returns the typed QarpeoSession for the current request, or null if unauthenticated. */
|
|
3
|
+
export declare function getQarpeoSession(event: any): Promise<QarpeoSession | null>;
|
|
4
|
+
/**
|
|
5
|
+
* Resolves the unified authentication context for the current request. Unifies Bearer PAT tokens
|
|
6
|
+
* (qp_live_...) and cookie sessions. Returns null if unauthenticated (never throws).
|
|
7
|
+
*/
|
|
8
|
+
export declare function getAuthContext(event: any): Promise<QarpeoAuthContext | null>;
|
|
9
|
+
/**
|
|
10
|
+
* Enforces authentication on the current request. Supports cookie sessions, Bearer PAT tokens, role
|
|
11
|
+
* gates, and organization gates. Throws 401 or 403 on failure.
|
|
12
|
+
*/
|
|
13
|
+
export declare function requireAuth(event: any, options?: RequireAuthOptions): Promise<QarpeoAuthContext>;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { createError, getRequestHeader } from "nuxt/server";
|
|
2
|
+
import { verifyApiToken, hasApiTokenScope } from "./impersonation.mjs";
|
|
3
|
+
import { getAuthSession } from "./session.mjs";
|
|
4
|
+
export async function getQarpeoSession(event) {
|
|
5
|
+
const session = await getAuthSession(event);
|
|
6
|
+
if (!session?.user?.id) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
return session;
|
|
10
|
+
}
|
|
11
|
+
export async function getAuthContext(event) {
|
|
12
|
+
const authHeader = getRequestHeader(event, "authorization") || "";
|
|
13
|
+
const bearerMatch = authHeader.match(/^Bearer\s+(qp_live_[a-zA-Z0-9_-]+)$/);
|
|
14
|
+
if (bearerMatch && bearerMatch[1]) {
|
|
15
|
+
try {
|
|
16
|
+
const tokenResult = await verifyApiToken(event, bearerMatch[1]);
|
|
17
|
+
if (tokenResult?.user?.id) {
|
|
18
|
+
const isAdmin = tokenResult.user.role === "admin" || tokenResult.user.role === "super_admin";
|
|
19
|
+
return {
|
|
20
|
+
user: tokenResult.user,
|
|
21
|
+
session: null,
|
|
22
|
+
organization: null,
|
|
23
|
+
role: null,
|
|
24
|
+
isImpersonating: false,
|
|
25
|
+
impersonator: null,
|
|
26
|
+
token: {
|
|
27
|
+
id: tokenResult.tokenId,
|
|
28
|
+
scopes: tokenResult.scopes
|
|
29
|
+
},
|
|
30
|
+
isAdmin,
|
|
31
|
+
hasScope: (scope) => hasApiTokenScope(tokenResult.scopes, scope)
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
} catch {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
const session = await getQarpeoSession(event);
|
|
39
|
+
if (session?.user?.id) {
|
|
40
|
+
const isAdmin = session.user.role === "admin" || session.user.role === "super_admin";
|
|
41
|
+
return {
|
|
42
|
+
user: session.user,
|
|
43
|
+
session,
|
|
44
|
+
organization: session.currentOrganization || null,
|
|
45
|
+
role: session.currentRole || null,
|
|
46
|
+
isImpersonating: Boolean(session.impersonator),
|
|
47
|
+
impersonator: session.impersonator || null,
|
|
48
|
+
token: null,
|
|
49
|
+
isAdmin,
|
|
50
|
+
hasScope: () => true
|
|
51
|
+
// Browser/cookie user has full interactive scope
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
export async function requireAuth(event, options = {}) {
|
|
57
|
+
const context = await getAuthContext(event);
|
|
58
|
+
if (!context) {
|
|
59
|
+
throw createError({
|
|
60
|
+
statusCode: 401,
|
|
61
|
+
statusMessage: "Unauthorized",
|
|
62
|
+
message: "Authentication required"
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
if (options.role) {
|
|
66
|
+
const allowed = Array.isArray(options.role) ? options.role : [options.role];
|
|
67
|
+
const userRole = context.user.role || "user";
|
|
68
|
+
if (!allowed.includes(userRole)) {
|
|
69
|
+
throw createError({
|
|
70
|
+
statusCode: 403,
|
|
71
|
+
statusMessage: "Forbidden",
|
|
72
|
+
message: "Insufficient permissions"
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (options.organization) {
|
|
77
|
+
const hasOrg = Boolean(context.organization?.id || context.session?.currentOrganizationId);
|
|
78
|
+
if (!hasOrg) {
|
|
79
|
+
throw createError({
|
|
80
|
+
statusCode: 403,
|
|
81
|
+
statusMessage: "Forbidden",
|
|
82
|
+
message: "Active organization required"
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (options.scope && context.token) {
|
|
87
|
+
const requiredScopes = Array.isArray(options.scope) ? options.scope : [options.scope];
|
|
88
|
+
const missing = requiredScopes.some((s) => !context.hasScope(s));
|
|
89
|
+
if (missing) {
|
|
90
|
+
throw createError({
|
|
91
|
+
statusCode: 403,
|
|
92
|
+
statusMessage: "Forbidden",
|
|
93
|
+
message: `Token does not have required scope(s): ${requiredScopes.join(", ")}`
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return context;
|
|
98
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Constant-time string equality check using byte-level XOR comparison to prevent timing attacks. */
|
|
2
|
+
export declare function timingSafeEqualString(a: string, b: string): boolean;
|
|
3
|
+
/** Alias for timingSafeEqualString */
|
|
4
|
+
export declare const constantTimeEqual: typeof timingSafeEqualString;
|
|
5
|
+
/**
|
|
6
|
+
* Encrypts a sensitive string (e.g. an OAuth access/refresh token) with AES-256-GCM. The returned
|
|
7
|
+
* value is prefixed with `enc:` followed by the hex-encoded `iv ‖ ciphertext` so legacy plaintext
|
|
8
|
+
* values can be distinguished on read.
|
|
9
|
+
*/
|
|
10
|
+
export declare function encryptToken(plaintext: string, event?: any): Promise<string>;
|
|
11
|
+
/**
|
|
12
|
+
* Decrypts a value produced by {@link encryptToken}. Values that do not start with `enc:` are
|
|
13
|
+
* returned as-is — this preserves backward-compatibility with rows written as plaintext before
|
|
14
|
+
* token encryption was introduced. Decryption failures resolve to an empty string.
|
|
15
|
+
*/
|
|
16
|
+
export declare function decryptToken(ciphertext: string, event?: any): Promise<string>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export function timingSafeEqualString(a, b) {
|
|
2
|
+
if (typeof a !== "string" || typeof b !== "string") return false;
|
|
3
|
+
const encoder = new TextEncoder();
|
|
4
|
+
const bufA = encoder.encode(a);
|
|
5
|
+
const bufB = encoder.encode(b);
|
|
6
|
+
if (bufA.byteLength !== bufB.byteLength) return false;
|
|
7
|
+
let diff = 0;
|
|
8
|
+
for (let i = 0; i < bufA.byteLength; i++) {
|
|
9
|
+
diff |= bufA[i] ^ bufB[i];
|
|
10
|
+
}
|
|
11
|
+
return diff === 0;
|
|
12
|
+
}
|
|
13
|
+
export const constantTimeEqual = timingSafeEqualString;
|
|
14
|
+
const ENC_PREFIX = "enc:";
|
|
15
|
+
function resolveTokenSecret(event) {
|
|
16
|
+
return event?.context?.cloudflare?.env?.NUXT_APP_SECRET || globalThis.process?.env?.NUXT_APP_SECRET || event?.context?.cloudflare?.env?.NUXT_SESSION_PASSWORD || globalThis.process?.env?.NUXT_SESSION_PASSWORD || "qarpeo-auth-internal-salt-key-32b";
|
|
17
|
+
}
|
|
18
|
+
async function deriveAesGcmKey(password, usage) {
|
|
19
|
+
const encoder = new TextEncoder();
|
|
20
|
+
const keyMaterial = await crypto.subtle.digest("SHA-256", encoder.encode(password));
|
|
21
|
+
return crypto.subtle.importKey("raw", keyMaterial, { name: "AES-GCM" }, false, usage);
|
|
22
|
+
}
|
|
23
|
+
export async function encryptToken(plaintext, event) {
|
|
24
|
+
if (!plaintext) return "";
|
|
25
|
+
const password = resolveTokenSecret(event);
|
|
26
|
+
const encoder = new TextEncoder();
|
|
27
|
+
const key = await deriveAesGcmKey(password, ["encrypt"]);
|
|
28
|
+
const iv = crypto.getRandomValues(new Uint8Array(12));
|
|
29
|
+
const ciphertext = await crypto.subtle.encrypt(
|
|
30
|
+
{ name: "AES-GCM", iv },
|
|
31
|
+
key,
|
|
32
|
+
encoder.encode(plaintext)
|
|
33
|
+
);
|
|
34
|
+
const combined = new Uint8Array(iv.byteLength + ciphertext.byteLength);
|
|
35
|
+
combined.set(iv, 0);
|
|
36
|
+
combined.set(new Uint8Array(ciphertext), iv.byteLength);
|
|
37
|
+
const hex = Array.from(combined).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
38
|
+
return `${ENC_PREFIX}${hex}`;
|
|
39
|
+
}
|
|
40
|
+
export async function decryptToken(ciphertext, event) {
|
|
41
|
+
if (!ciphertext) return "";
|
|
42
|
+
if (!ciphertext.startsWith(ENC_PREFIX)) return ciphertext;
|
|
43
|
+
try {
|
|
44
|
+
const password = resolveTokenSecret(event);
|
|
45
|
+
const key = await deriveAesGcmKey(password, ["decrypt"]);
|
|
46
|
+
const hex = ciphertext.slice(ENC_PREFIX.length);
|
|
47
|
+
const bytes = new Uint8Array(hex.match(/.{1,2}/g)?.map((b) => parseInt(b, 16)) || []);
|
|
48
|
+
if (bytes.byteLength < 13) return "";
|
|
49
|
+
const iv = bytes.slice(0, 12);
|
|
50
|
+
const data = bytes.slice(12);
|
|
51
|
+
const decrypted = await crypto.subtle.decrypt({ name: "AES-GCM", iv }, key, data);
|
|
52
|
+
return new TextDecoder().decode(decrypted);
|
|
53
|
+
} catch {
|
|
54
|
+
return "";
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface DevLogEntry {
|
|
2
|
+
id: string;
|
|
3
|
+
timestamp: string;
|
|
4
|
+
level: "info" | "warn" | "error";
|
|
5
|
+
source: string;
|
|
6
|
+
message: string;
|
|
7
|
+
durationMs?: number;
|
|
8
|
+
status?: number;
|
|
9
|
+
details?: Record<string, any>;
|
|
10
|
+
}
|
|
11
|
+
export declare function addDevLog(entry: Omit<DevLogEntry, "id" | "timestamp"> & {
|
|
12
|
+
id?: string;
|
|
13
|
+
timestamp?: string;
|
|
14
|
+
}): DevLogEntry;
|
|
15
|
+
export declare function getDevLogs(filter?: {
|
|
16
|
+
level?: string;
|
|
17
|
+
search?: string;
|
|
18
|
+
source?: string;
|
|
19
|
+
limit?: number;
|
|
20
|
+
}): DevLogEntry[];
|
|
21
|
+
export declare function clearDevLogs(): void;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const MAX_DEV_LOGS = 500;
|
|
2
|
+
const devLogsRingBuffer = [];
|
|
3
|
+
export function addDevLog(entry) {
|
|
4
|
+
const fullEntry = {
|
|
5
|
+
id: entry.id || `log_${Date.now()}_${Math.random().toString(36).substring(2, 7)}`,
|
|
6
|
+
timestamp: entry.timestamp || (/* @__PURE__ */ new Date()).toISOString(),
|
|
7
|
+
level: entry.level || "info",
|
|
8
|
+
source: entry.source || "nitro",
|
|
9
|
+
message: entry.message,
|
|
10
|
+
durationMs: entry.durationMs,
|
|
11
|
+
status: entry.status,
|
|
12
|
+
details: entry.details
|
|
13
|
+
};
|
|
14
|
+
devLogsRingBuffer.push(fullEntry);
|
|
15
|
+
if (devLogsRingBuffer.length > MAX_DEV_LOGS) {
|
|
16
|
+
devLogsRingBuffer.shift();
|
|
17
|
+
}
|
|
18
|
+
return fullEntry;
|
|
19
|
+
}
|
|
20
|
+
export function getDevLogs(filter) {
|
|
21
|
+
let list = devLogsRingBuffer.slice();
|
|
22
|
+
if (filter?.level && filter.level !== "all") {
|
|
23
|
+
list = list.filter((l) => l.level === filter.level);
|
|
24
|
+
}
|
|
25
|
+
if (filter?.source && filter.source !== "all") {
|
|
26
|
+
list = list.filter((l) => l.source === filter.source);
|
|
27
|
+
}
|
|
28
|
+
if (filter?.search?.trim()) {
|
|
29
|
+
const q = filter.search.toLowerCase();
|
|
30
|
+
list = list.filter(
|
|
31
|
+
(l) => l.message.toLowerCase().includes(q) || l.source.toLowerCase().includes(q) || String(l.status || "").includes(q)
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
if (filter?.limit && filter.limit > 0) {
|
|
35
|
+
list = list.slice(-filter.limit);
|
|
36
|
+
}
|
|
37
|
+
return list;
|
|
38
|
+
}
|
|
39
|
+
export function clearDevLogs() {
|
|
40
|
+
devLogsRingBuffer.length = 0;
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getOrInitDevProxy(): Promise<any>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
let proxyPromise = null;
|
|
4
|
+
export async function getOrInitDevProxy() {
|
|
5
|
+
if (!proxyPromise) {
|
|
6
|
+
let configPath = process.env.QARPEO_WRANGLER_CONFIG;
|
|
7
|
+
if (!configPath || !existsSync(configPath)) {
|
|
8
|
+
const candidate = resolve(process.cwd(), ".nuxt/wrangler.json");
|
|
9
|
+
if (existsSync(candidate)) {
|
|
10
|
+
configPath = candidate;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
const isRemote = Boolean(process.env.QARPEO_CF_REMOTE);
|
|
14
|
+
const persistPath = process.env.QARPEO_PERSIST_PATH || resolve(process.cwd(), ".wrangler/state/v3");
|
|
15
|
+
if (!configPath || !existsSync(configPath)) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
try {
|
|
19
|
+
let wranglerUrl = process.env.QARPEO_WRANGLER_ENTRY;
|
|
20
|
+
if (!wranglerUrl) {
|
|
21
|
+
try {
|
|
22
|
+
wranglerUrl = import.meta.resolve("wrangler", import.meta.url);
|
|
23
|
+
} catch {
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const dynamicImport = new Function("specifier", "return import(specifier)");
|
|
27
|
+
const wrangler = await dynamicImport(wranglerUrl || "wrangler");
|
|
28
|
+
const getPlatformProxy = wrangler.getPlatformProxy || wrangler.default?.getPlatformProxy;
|
|
29
|
+
if (!getPlatformProxy) {
|
|
30
|
+
console.warn("[qarpeo] getPlatformProxy function not found in wrangler export");
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
const launch = (cfg) => getPlatformProxy({
|
|
34
|
+
configPath: cfg,
|
|
35
|
+
persist: isRemote ? false : persistPath ? { path: persistPath } : true,
|
|
36
|
+
remoteBindings: isRemote ? true : void 0
|
|
37
|
+
});
|
|
38
|
+
proxyPromise = launch(configPath).catch(async (err) => {
|
|
39
|
+
if (!isRemote) {
|
|
40
|
+
try {
|
|
41
|
+
const raw = JSON.parse(readFileSync(configPath, "utf-8"));
|
|
42
|
+
let modified = false;
|
|
43
|
+
if (raw.ai && !process.env.CLOUDFLARE_API_TOKEN) {
|
|
44
|
+
delete raw.ai;
|
|
45
|
+
modified = true;
|
|
46
|
+
}
|
|
47
|
+
if (raw.hyperdrive && !raw.hyperdrive[0]?.localConnectionString) {
|
|
48
|
+
delete raw.hyperdrive;
|
|
49
|
+
modified = true;
|
|
50
|
+
}
|
|
51
|
+
if (modified) {
|
|
52
|
+
const localCfgPath = resolve(configPath, "../wrangler.local.json");
|
|
53
|
+
writeFileSync(localCfgPath, JSON.stringify(raw, null, 2), "utf-8");
|
|
54
|
+
return await launch(localCfgPath);
|
|
55
|
+
}
|
|
56
|
+
} catch (retryErr) {
|
|
57
|
+
console.warn("[qarpeo] Fallback proxy launch failed:", retryErr);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
console.warn("[qarpeo] Failed to initialize platform proxy:", err);
|
|
61
|
+
return null;
|
|
62
|
+
});
|
|
63
|
+
} catch (err) {
|
|
64
|
+
console.warn("[qarpeo] Failed to import wrangler:", err);
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return proxyPromise;
|
|
69
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Domains.ts Tier 2 Multi-Tenancy & Custom Domains — Custom Hostname lifecycle and
|
|
3
|
+
* verification. Backed by Cloudflare for SaaS (Custom Hostnames API) with zero-config local dev
|
|
4
|
+
* mock. Provides:
|
|
5
|
+
*
|
|
6
|
+
* - registerCustomDomain(tenantId, domain, options?, event?)
|
|
7
|
+
* - verifyCustomDomain(domain, event?)
|
|
8
|
+
* - getCustomDomain(domain, event?)
|
|
9
|
+
* - listTenantDomains(tenantId, event?)
|
|
10
|
+
* - deleteCustomDomain(domain, event?)
|
|
11
|
+
* - getDomainCache(domain, event?) / setDomainCache(domain, tenantId, event?)
|
|
12
|
+
*/
|
|
13
|
+
import type { RequestEvent } from "nuxt/server";
|
|
14
|
+
import type { CustomDomainRecord } from "../../../types";
|
|
15
|
+
/** Normalizes a domain (lowercase, strip trailing dot, strip protocol/path). */
|
|
16
|
+
export declare function normalizeDomain(input: string): string;
|
|
17
|
+
/** Basic hostname validation (FQDN check). */
|
|
18
|
+
export declare function isValidDomain(domain: string): boolean;
|
|
19
|
+
/** Resolve multitenant runtime config. */
|
|
20
|
+
export declare function getMultitenantConfig(event?: RequestEvent): Record<string, any>;
|
|
21
|
+
/** High-speed domain-to-tenant lookup (memory fallback -> KV). */
|
|
22
|
+
export declare function getDomainCache(domain: string, event?: RequestEvent): Promise<string | null>;
|
|
23
|
+
/** Store domain-to-tenant mapping in KV and local cache. */
|
|
24
|
+
export declare function setDomainCache(domain: string, tenantId: string, event?: RequestEvent, ttlSeconds?: number): Promise<void>;
|
|
25
|
+
/** Remove domain-to-tenant mapping from KV and local cache. */
|
|
26
|
+
export declare function removeDomainCache(domain: string, event?: RequestEvent): Promise<void>;
|
|
27
|
+
export interface RegisterDomainOptions {
|
|
28
|
+
/** CNAME target override (e.g. "cname.qarpeo.com"). */
|
|
29
|
+
cnameTarget?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Register a new custom domain for a tenant. Calls Cloudflare for SaaS Custom Hostnames API to
|
|
33
|
+
* provision hostname & SSL certificate. Falls back to simulation in dev without Cloudflare
|
|
34
|
+
* credentials.
|
|
35
|
+
*/
|
|
36
|
+
export declare function registerCustomDomain(tenantId: string, rawDomain: string, options?: RegisterDomainOptions, event?: RequestEvent): Promise<CustomDomainRecord>;
|
|
37
|
+
/** Verify and refresh status of a custom domain with Cloudflare. */
|
|
38
|
+
export declare function verifyCustomDomain(rawDomain: string, event?: RequestEvent): Promise<CustomDomainRecord>;
|
|
39
|
+
/** Retrieve custom domain record by domain name. */
|
|
40
|
+
export declare function getCustomDomain(rawDomain: string, event?: RequestEvent): Promise<CustomDomainRecord | null>;
|
|
41
|
+
/** List all custom domains registered for a tenant. */
|
|
42
|
+
export declare function listTenantDomains(tenantId: string, event?: RequestEvent): Promise<CustomDomainRecord[]>;
|
|
43
|
+
/** Delete a custom domain from Cloudflare and edge cache. */
|
|
44
|
+
export declare function deleteCustomDomain(rawDomain: string, event?: RequestEvent): Promise<{
|
|
45
|
+
success: boolean;
|
|
46
|
+
}>;
|