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,11 @@
|
|
|
1
|
+
/** POST /_qarpeo/api/kv/delete Body: { key: string } Deletes a KV key. */
|
|
2
|
+
declare const _default: import("nuxt/server").EventHandler<Promise<{
|
|
3
|
+
ok: boolean;
|
|
4
|
+
key: any;
|
|
5
|
+
preview?: undefined;
|
|
6
|
+
} | {
|
|
7
|
+
ok: boolean;
|
|
8
|
+
key: any;
|
|
9
|
+
preview: boolean;
|
|
10
|
+
}>>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineEventHandler, readBody, createError } from "nuxt/server";
|
|
2
|
+
import { getKVBinding } from "../../../../kv.mjs";
|
|
3
|
+
import { getDevMockKvStore } from "../../../utils/kv-store.mjs";
|
|
4
|
+
export default defineEventHandler(async (event) => {
|
|
5
|
+
const body = await readBody(event);
|
|
6
|
+
const key = body?.key;
|
|
7
|
+
if (!key) throw createError({ statusCode: 400, message: "key is required" });
|
|
8
|
+
try {
|
|
9
|
+
const kv = getKVBinding("KV", event);
|
|
10
|
+
await kv.delete(key);
|
|
11
|
+
return { ok: true, key };
|
|
12
|
+
} catch (err) {
|
|
13
|
+
if (err?.statusCode) throw err;
|
|
14
|
+
const store = getDevMockKvStore();
|
|
15
|
+
store.delete(key);
|
|
16
|
+
return { ok: true, key, preview: true };
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** GET /_qarpeo/api/kv/get?key=<name> Returns a single KV value + metadata. */
|
|
2
|
+
declare const _default: import("nuxt/server").EventHandler<Promise<{
|
|
3
|
+
key: string;
|
|
4
|
+
value: any;
|
|
5
|
+
expiration?: undefined;
|
|
6
|
+
} | {
|
|
7
|
+
key: string;
|
|
8
|
+
value: string;
|
|
9
|
+
expiration: number | undefined;
|
|
10
|
+
}>>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineEventHandler, getQuery, createError } from "nuxt/server";
|
|
2
|
+
import { getKVBinding } from "../../../../kv.mjs";
|
|
3
|
+
import { getDevMockKvStore } from "../../../utils/kv-store.mjs";
|
|
4
|
+
export default defineEventHandler(async (event) => {
|
|
5
|
+
const query = getQuery(event);
|
|
6
|
+
const key = query.key ? String(query.key) : null;
|
|
7
|
+
if (!key) throw createError({ statusCode: 400, message: "key is required" });
|
|
8
|
+
try {
|
|
9
|
+
const kv = getKVBinding("KV", event);
|
|
10
|
+
const value = await kv.get(key, "text");
|
|
11
|
+
if (value === null) throw createError({ statusCode: 404, message: "Key not found" });
|
|
12
|
+
return { key, value };
|
|
13
|
+
} catch (err) {
|
|
14
|
+
if (err?.statusCode) throw err;
|
|
15
|
+
const store = getDevMockKvStore();
|
|
16
|
+
const entry = store.get(key);
|
|
17
|
+
if (!entry) throw createError({ statusCode: 404, message: "Key not found" });
|
|
18
|
+
return { key, value: entry.value, expiration: entry.expiration };
|
|
19
|
+
}
|
|
20
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineEventHandler, getQuery } from "nuxt/server";
|
|
2
|
+
import { getKVBinding } from "../../../../kv.mjs";
|
|
3
|
+
import { getDevMockKvStore } from "../../../utils/kv-store.mjs";
|
|
4
|
+
export default defineEventHandler(async (event) => {
|
|
5
|
+
const query = getQuery(event);
|
|
6
|
+
const prefix = query.prefix ? String(query.prefix) : void 0;
|
|
7
|
+
const limit = query.limit ? parseInt(String(query.limit), 10) : 50;
|
|
8
|
+
try {
|
|
9
|
+
const kv = getKVBinding("KV", event);
|
|
10
|
+
const listRes = await kv.list({ prefix, limit });
|
|
11
|
+
const keys = (listRes.keys || []).map((k) => ({
|
|
12
|
+
name: k.name,
|
|
13
|
+
expiration: k.expiration,
|
|
14
|
+
metadata: k.metadata
|
|
15
|
+
}));
|
|
16
|
+
return { keys };
|
|
17
|
+
} catch {
|
|
18
|
+
const store = getDevMockKvStore();
|
|
19
|
+
const filtered = [];
|
|
20
|
+
for (const [name, data] of store.entries()) {
|
|
21
|
+
if (!prefix || name.startsWith(prefix)) {
|
|
22
|
+
filtered.push({ name, expiration: data.expiration });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return { keys: filtered.slice(0, limit) };
|
|
26
|
+
}
|
|
27
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* POST /_qarpeo/api/kv/set Body: { key: string, value: string, ttl?: number } Creates or updates a
|
|
3
|
+
* KV entry.
|
|
4
|
+
*/
|
|
5
|
+
declare const _default: import("nuxt/server").EventHandler<Promise<{
|
|
6
|
+
ok: boolean;
|
|
7
|
+
key: any;
|
|
8
|
+
preview?: undefined;
|
|
9
|
+
} | {
|
|
10
|
+
ok: boolean;
|
|
11
|
+
key: any;
|
|
12
|
+
preview: boolean;
|
|
13
|
+
}>>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineEventHandler, readBody, createError } from "nuxt/server";
|
|
2
|
+
import { getKVBinding } from "../../../../kv.mjs";
|
|
3
|
+
import { getDevMockKvStore } from "../../../utils/kv-store.mjs";
|
|
4
|
+
export default defineEventHandler(async (event) => {
|
|
5
|
+
const body = await readBody(event);
|
|
6
|
+
const { key, value, ttl } = body || {};
|
|
7
|
+
if (!key) throw createError({ statusCode: 400, message: "key is required" });
|
|
8
|
+
if (value === void 0 || value === null)
|
|
9
|
+
throw createError({ statusCode: 400, message: "value is required" });
|
|
10
|
+
const strValue = typeof value === "string" ? value : JSON.stringify(value);
|
|
11
|
+
try {
|
|
12
|
+
const kv = getKVBinding("KV", event);
|
|
13
|
+
const options = {};
|
|
14
|
+
if (ttl && ttl > 0) options.expirationTtl = ttl;
|
|
15
|
+
await kv.put(key, strValue, options);
|
|
16
|
+
return { ok: true, key };
|
|
17
|
+
} catch (err) {
|
|
18
|
+
if (err?.statusCode) throw err;
|
|
19
|
+
const store = getDevMockKvStore();
|
|
20
|
+
const expiration = ttl && ttl > 0 ? Math.floor(Date.now() / 1e3) + Number(ttl) : void 0;
|
|
21
|
+
store.set(key, { value: strValue, expiration });
|
|
22
|
+
return { ok: true, key, preview: true };
|
|
23
|
+
}
|
|
24
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineEventHandler, getQuery } from "nuxt/server";
|
|
2
|
+
import { addDevLog, getDevLogs } from "../../utils/dev-logs.mjs";
|
|
3
|
+
let initialized = false;
|
|
4
|
+
function ensureSeeded() {
|
|
5
|
+
if (!initialized) {
|
|
6
|
+
initialized = true;
|
|
7
|
+
addDevLog({
|
|
8
|
+
level: "info",
|
|
9
|
+
source: "qarpeo:system",
|
|
10
|
+
message: "Qarpeo Edge Runtime initialized in development mode",
|
|
11
|
+
durationMs: 0.8,
|
|
12
|
+
status: 200
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export default defineEventHandler((event) => {
|
|
17
|
+
ensureSeeded();
|
|
18
|
+
const query = getQuery(event);
|
|
19
|
+
const level = query.level ? String(query.level) : void 0;
|
|
20
|
+
const search = query.search ? String(query.search) : void 0;
|
|
21
|
+
const source = query.source ? String(query.source) : void 0;
|
|
22
|
+
const logs = getDevLogs({ level, search, source, limit: 300 });
|
|
23
|
+
return {
|
|
24
|
+
logs: logs.slice().reverse()
|
|
25
|
+
};
|
|
26
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineEventHandler, readBody, createError } from "nuxt/server";
|
|
2
|
+
import { addDevLog } from "../../utils/dev-logs.mjs";
|
|
3
|
+
export default defineEventHandler(async (event) => {
|
|
4
|
+
const body = await readBody(event).catch(() => ({}));
|
|
5
|
+
if (!body || !body.message) {
|
|
6
|
+
throw createError({ statusCode: 400, message: "Missing log message" });
|
|
7
|
+
}
|
|
8
|
+
const entry = addDevLog({
|
|
9
|
+
level: body.level || "info",
|
|
10
|
+
source: body.source || "qarpeo:custom",
|
|
11
|
+
message: String(body.message),
|
|
12
|
+
durationMs: typeof body.durationMs === "number" ? body.durationMs : void 0,
|
|
13
|
+
status: typeof body.status === "number" ? body.status : void 0,
|
|
14
|
+
details: body.details
|
|
15
|
+
});
|
|
16
|
+
return { success: true, log: entry };
|
|
17
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineEventHandler, readBody } from "nuxt/server";
|
|
2
|
+
import { recordEmailBounce, recordSoftBounce, suppressEmail } from "../../../utils/mail.mjs";
|
|
3
|
+
export default defineEventHandler(async (event) => {
|
|
4
|
+
const body = await readBody(event).catch(() => ({})) || {};
|
|
5
|
+
const messageId = body.id || body.messageId || body.data?.email_id || body.MessageID || body.data?.message_id;
|
|
6
|
+
const rawType = (body.type || body.data?.type || body.RecordType || body.event || body.data?.bounce?.type || "").toLowerCase();
|
|
7
|
+
const reason = body.reason || body.type || body.data?.bounce?.type || body.Description || "Delivery failure (bounce)";
|
|
8
|
+
const recipient = body.to || body.recipient || body.data?.to || body.Email;
|
|
9
|
+
const isSoft = rawType.includes("transient") || rawType.includes("soft") || reason.toLowerCase().includes("transient") || reason.toLowerCase().includes("mailbox full");
|
|
10
|
+
if (messageId) {
|
|
11
|
+
recordEmailBounce(messageId, reason);
|
|
12
|
+
}
|
|
13
|
+
if (recipient && typeof recipient === "string" && recipient.includes("@")) {
|
|
14
|
+
if (isSoft) {
|
|
15
|
+
await recordSoftBounce(event, recipient);
|
|
16
|
+
} else {
|
|
17
|
+
await suppressEmail(event, {
|
|
18
|
+
email: recipient,
|
|
19
|
+
reason: "bounce",
|
|
20
|
+
type: "hard_bounce",
|
|
21
|
+
source: "webhook:internal_bounce",
|
|
22
|
+
metadata: { messageId, reason }
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const nitroApp = globalThis.useNitroApp?.();
|
|
27
|
+
if (nitroApp && typeof nitroApp.hooks?.callHook === "function") {
|
|
28
|
+
await nitroApp.hooks.callHook("qarpeo:mail:bounce", {
|
|
29
|
+
messageId,
|
|
30
|
+
recipient,
|
|
31
|
+
reason,
|
|
32
|
+
raw: body,
|
|
33
|
+
timestamp: Date.now()
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return { success: true, processed: true };
|
|
37
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineEventHandler } from "nuxt/server";
|
|
2
|
+
import { sendMail } from "../../../utils/mail.mjs";
|
|
3
|
+
export default defineEventHandler(async (event) => {
|
|
4
|
+
await sendMail(
|
|
5
|
+
{
|
|
6
|
+
to: "developer@example.com",
|
|
7
|
+
subject: "Welcome to Qarpeo Edge Platform",
|
|
8
|
+
template: "welcome",
|
|
9
|
+
data: {
|
|
10
|
+
name: "Developer",
|
|
11
|
+
actionUrl: "https://qarpeo.com"
|
|
12
|
+
},
|
|
13
|
+
html: `
|
|
14
|
+
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 24px;">
|
|
15
|
+
<h1 style="color: #0284c7; margin-bottom: 8px;">\u26A1 Welcome to Qarpeo!</h1>
|
|
16
|
+
<p style="color: #475569; font-size: 15px; line-height: 1.5;">This is a live transactional email captured by your local development mailbox.</p>
|
|
17
|
+
<div style="background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 16px; margin: 20px 0;">
|
|
18
|
+
<p style="margin: 0; font-size: 13px; color: #64748b;"><strong>Recipient:</strong> developer@example.com</p>
|
|
19
|
+
<p style="margin: 4px 0 0; font-size: 13px; color: #64748b;"><strong>Status:</strong> Captured locally in dev mode (Zero-Config Edge Mail)</p>
|
|
20
|
+
</div>
|
|
21
|
+
<p style="font-size: 13px; color: #94a3b8;">Happy building with Cloudflare Workers, Nuxt 4, and Qarpeo!</p>
|
|
22
|
+
</div>
|
|
23
|
+
`,
|
|
24
|
+
text: "Welcome to Qarpeo!\n\nThis is a live transactional email captured by your local development mailbox.\n\nRecipient: developer@example.com\nStatus: Captured locally (Zero-Config Edge Mail)"
|
|
25
|
+
},
|
|
26
|
+
event
|
|
27
|
+
);
|
|
28
|
+
return { success: true };
|
|
29
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineEventHandler, getQuery, getRouterParam, sendRedirect } from "nuxt/server";
|
|
2
|
+
import { recordEmailClick } from "../../../../../utils/mail.mjs";
|
|
3
|
+
import { sanitizeUrl } from "../../../../../utils/email-templates.mjs";
|
|
4
|
+
export default defineEventHandler(async (event) => {
|
|
5
|
+
const id = getRouterParam(event, "id");
|
|
6
|
+
const query = getQuery(event);
|
|
7
|
+
const targetUrl = sanitizeUrl(query.url);
|
|
8
|
+
if (id && targetUrl && targetUrl !== "#") {
|
|
9
|
+
recordEmailClick(id, targetUrl);
|
|
10
|
+
const ev = event;
|
|
11
|
+
const nitroApp = globalThis.useNitroApp?.();
|
|
12
|
+
if (nitroApp && typeof nitroApp.hooks?.callHook === "function") {
|
|
13
|
+
await nitroApp.hooks.callHook("qarpeo:mail:click", {
|
|
14
|
+
id,
|
|
15
|
+
url: targetUrl,
|
|
16
|
+
timestamp: Date.now(),
|
|
17
|
+
ip: ev.node?.req?.headers?.["cf-connecting-ip"] || ev.node?.req?.socket?.remoteAddress,
|
|
18
|
+
userAgent: ev.node?.req?.headers?.["user-agent"]
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return sendRedirect(event, targetUrl && targetUrl !== "#" ? targetUrl : "/", 302);
|
|
23
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineEventHandler, getRouterParam } from "nuxt/server";
|
|
2
|
+
import { recordEmailOpen } from "../../../../../utils/mail.mjs";
|
|
3
|
+
const TRANSPARENT_GIF_PIXEL = Buffer.from(
|
|
4
|
+
"R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
|
|
5
|
+
"base64"
|
|
6
|
+
);
|
|
7
|
+
export default defineEventHandler(async (event) => {
|
|
8
|
+
const id = getRouterParam(event, "id");
|
|
9
|
+
if (id) {
|
|
10
|
+
recordEmailOpen(id);
|
|
11
|
+
const ev = event;
|
|
12
|
+
const nitroApp = globalThis.useNitroApp?.();
|
|
13
|
+
if (nitroApp && typeof nitroApp.hooks?.callHook === "function") {
|
|
14
|
+
await nitroApp.hooks.callHook("qarpeo:mail:open", {
|
|
15
|
+
id,
|
|
16
|
+
timestamp: Date.now(),
|
|
17
|
+
ip: ev.node?.req?.headers?.["cf-connecting-ip"] || ev.node?.req?.socket?.remoteAddress,
|
|
18
|
+
userAgent: ev.node?.req?.headers?.["user-agent"]
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return new Response(TRANSPARENT_GIF_PIXEL, {
|
|
23
|
+
headers: {
|
|
24
|
+
"Content-Type": "image/gif",
|
|
25
|
+
"Content-Length": String(TRANSPARENT_GIF_PIXEL.length),
|
|
26
|
+
"Cache-Control": "no-store, no-cache, must-revalidate, proxy-revalidate",
|
|
27
|
+
"Pragma": "no-cache",
|
|
28
|
+
"Expires": "0"
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { defineEventHandler } from "nuxt/server";
|
|
2
|
+
import { getR2Binding } from "../../../../blob.mjs";
|
|
3
|
+
import { getD1Binding } from "../../../../db.mjs";
|
|
4
|
+
import { getKVBinding } from "../../../../kv.mjs";
|
|
5
|
+
export default defineEventHandler(async (event) => {
|
|
6
|
+
const results = {};
|
|
7
|
+
const t0 = performance.now();
|
|
8
|
+
try {
|
|
9
|
+
const d1 = getD1Binding("DB", event);
|
|
10
|
+
await d1.prepare("SELECT 1").run();
|
|
11
|
+
results.d1 = { ok: true, latencyMs: +(performance.now() - t0).toFixed(1) };
|
|
12
|
+
} catch (err) {
|
|
13
|
+
results.d1 = {
|
|
14
|
+
ok: false,
|
|
15
|
+
latencyMs: +(performance.now() - t0).toFixed(1),
|
|
16
|
+
error: err?.message || "D1 error"
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
const t1 = performance.now();
|
|
20
|
+
try {
|
|
21
|
+
const kv = getKVBinding("KV", event);
|
|
22
|
+
await kv.get("__qarpeo_health_check__");
|
|
23
|
+
results.kv = { ok: true, latencyMs: +(performance.now() - t1).toFixed(1) };
|
|
24
|
+
} catch (err) {
|
|
25
|
+
results.kv = {
|
|
26
|
+
ok: false,
|
|
27
|
+
latencyMs: +(performance.now() - t1).toFixed(1),
|
|
28
|
+
error: err?.message || "KV error"
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const t2 = performance.now();
|
|
32
|
+
try {
|
|
33
|
+
const rc = event.context?.nitro?.runtimeConfig ?? event.$config ?? {};
|
|
34
|
+
const bindingName = rc?.qarpeo?.blob?.binding || "BLOB";
|
|
35
|
+
const r2 = getR2Binding(bindingName, event);
|
|
36
|
+
await r2.list({ limit: 1 });
|
|
37
|
+
results.r2 = { ok: true, latencyMs: +(performance.now() - t2).toFixed(1) };
|
|
38
|
+
} catch (err) {
|
|
39
|
+
results.r2 = {
|
|
40
|
+
ok: false,
|
|
41
|
+
latencyMs: +(performance.now() - t2).toFixed(1),
|
|
42
|
+
error: err?.message || "R2 error"
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
return { health: results };
|
|
46
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GET /_qarpeo/api/overview Returns system overview, active Cloudflare primitives, and enabled
|
|
3
|
+
* Tier 2 solutions.
|
|
4
|
+
*/
|
|
5
|
+
declare const _default: import("nuxt/server").EventHandler<{
|
|
6
|
+
environment: string;
|
|
7
|
+
version: string;
|
|
8
|
+
engine: string;
|
|
9
|
+
modules: {
|
|
10
|
+
db: boolean;
|
|
11
|
+
kv: boolean;
|
|
12
|
+
blob: boolean;
|
|
13
|
+
cache: boolean;
|
|
14
|
+
auth: boolean;
|
|
15
|
+
cms: boolean;
|
|
16
|
+
payments: boolean;
|
|
17
|
+
jobs: boolean;
|
|
18
|
+
ratelimit: boolean;
|
|
19
|
+
agents: boolean;
|
|
20
|
+
mail: boolean;
|
|
21
|
+
analytics: boolean;
|
|
22
|
+
multitenant: boolean;
|
|
23
|
+
};
|
|
24
|
+
bindings: {
|
|
25
|
+
d1: any;
|
|
26
|
+
kv: any;
|
|
27
|
+
r2: any;
|
|
28
|
+
agents: any;
|
|
29
|
+
analytics: any;
|
|
30
|
+
};
|
|
31
|
+
}>;
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineEventHandler, useRuntimeConfig } from "nuxt/server";
|
|
2
|
+
export default defineEventHandler((event) => {
|
|
3
|
+
let rc = {};
|
|
4
|
+
try {
|
|
5
|
+
rc = useRuntimeConfig(event) || {};
|
|
6
|
+
} catch {
|
|
7
|
+
rc = event.context?.nitro?.runtimeConfig ?? event.$config ?? {};
|
|
8
|
+
}
|
|
9
|
+
const qarpeoConfig = rc?.qarpeo || {};
|
|
10
|
+
const isDev = process.env.NODE_ENV !== "production";
|
|
11
|
+
return {
|
|
12
|
+
environment: isDev ? "development" : "production",
|
|
13
|
+
version: "0.0.1",
|
|
14
|
+
engine: "Nuxt 5 + Cloudflare Edge",
|
|
15
|
+
modules: {
|
|
16
|
+
db: Boolean(qarpeoConfig.db?.enabled ?? true),
|
|
17
|
+
kv: Boolean(qarpeoConfig.kv?.enabled ?? true),
|
|
18
|
+
blob: Boolean(qarpeoConfig.blob?.enabled ?? true),
|
|
19
|
+
cache: Boolean(qarpeoConfig.cache?.enabled ?? true),
|
|
20
|
+
auth: Boolean(qarpeoConfig.auth?.enabled ?? false),
|
|
21
|
+
cms: Boolean(qarpeoConfig.cms?.enabled ?? false),
|
|
22
|
+
payments: Boolean(qarpeoConfig.payments?.enabled ?? false),
|
|
23
|
+
jobs: Boolean(qarpeoConfig.jobs?.enabled ?? false),
|
|
24
|
+
ratelimit: Boolean(qarpeoConfig.ratelimit?.enabled ?? false),
|
|
25
|
+
agents: Boolean(qarpeoConfig.agents?.enabled ?? false),
|
|
26
|
+
mail: Boolean(qarpeoConfig.mail?.enabled ?? false),
|
|
27
|
+
analytics: Boolean(qarpeoConfig.analytics?.enabled ?? false),
|
|
28
|
+
multitenant: Boolean(qarpeoConfig.multitenant?.enabled ?? false)
|
|
29
|
+
},
|
|
30
|
+
bindings: {
|
|
31
|
+
d1: qarpeoConfig.db?.binding || "DB",
|
|
32
|
+
kv: qarpeoConfig.kv?.binding || "KV",
|
|
33
|
+
r2: qarpeoConfig.blob?.binding || "BLOB",
|
|
34
|
+
agents: qarpeoConfig.agents?.binding || "QARPEO_AGENT_DO",
|
|
35
|
+
analytics: qarpeoConfig.analytics?.binding || "ANALYTICS"
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* POST /_qarpeo/api/settings/reset-dev-data Body: { target: 'all' | 'kv' | 'blob' } Resets
|
|
3
|
+
* in-memory dev sandbox data back to factory defaults.
|
|
4
|
+
*/
|
|
5
|
+
declare const _default: import("nuxt/server").EventHandler<Promise<{
|
|
6
|
+
ok: boolean;
|
|
7
|
+
resetKv: boolean;
|
|
8
|
+
resetBlob: boolean;
|
|
9
|
+
message: string;
|
|
10
|
+
}>>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { defineEventHandler, readBody } from "nuxt/server";
|
|
2
|
+
import { getDevMockBlobStore } from "../../../utils/blob-store.mjs";
|
|
3
|
+
import { getDevMockKvStore } from "../../../utils/kv-store.mjs";
|
|
4
|
+
export default defineEventHandler(async (event) => {
|
|
5
|
+
const body = await readBody(event) || {};
|
|
6
|
+
const target = body.target || "all";
|
|
7
|
+
let resetKv = false;
|
|
8
|
+
let resetBlob = false;
|
|
9
|
+
if (target === "all" || target === "kv") {
|
|
10
|
+
const kvStore = getDevMockKvStore();
|
|
11
|
+
kvStore.clear();
|
|
12
|
+
kvStore.set("session:sess_usr_9921", {
|
|
13
|
+
value: JSON.stringify({ userId: "usr_1", role: "admin" }),
|
|
14
|
+
expiration: Math.floor(Date.now() / 1e3) + 86400
|
|
15
|
+
});
|
|
16
|
+
kvStore.set("cache:swr:navigation", {
|
|
17
|
+
value: JSON.stringify({ items: ["/docs", "/blog", "/pricing"] }),
|
|
18
|
+
expiration: Math.floor(Date.now() / 1e3) + 3600
|
|
19
|
+
});
|
|
20
|
+
kvStore.set("ratelimit:ip:127.0.0.1", {
|
|
21
|
+
value: "14",
|
|
22
|
+
expiration: Math.floor(Date.now() / 1e3) + 42
|
|
23
|
+
});
|
|
24
|
+
kvStore.set("domain:acme.qarpeo.dev", {
|
|
25
|
+
value: "tenant_acme_corp",
|
|
26
|
+
expiration: Math.floor(Date.now() / 1e3) + 86400 * 7
|
|
27
|
+
});
|
|
28
|
+
kvStore.set("domain:portal.example.com", {
|
|
29
|
+
value: "tenant_acme_corp",
|
|
30
|
+
expiration: Math.floor(Date.now() / 1e3) + 86400 * 7
|
|
31
|
+
});
|
|
32
|
+
resetKv = true;
|
|
33
|
+
}
|
|
34
|
+
if (target === "all" || target === "blob") {
|
|
35
|
+
const blobStore = getDevMockBlobStore();
|
|
36
|
+
blobStore.clear();
|
|
37
|
+
blobStore.set("uploads/avatar-usr_1.png", {
|
|
38
|
+
key: "uploads/avatar-usr_1.png",
|
|
39
|
+
size: 48320,
|
|
40
|
+
contentType: "image/png",
|
|
41
|
+
uploaded: new Date(Date.now() - 864e5 * 2).toISOString(),
|
|
42
|
+
access: "public"
|
|
43
|
+
});
|
|
44
|
+
blobStore.set("uploads/hero-image.webp", {
|
|
45
|
+
key: "uploads/hero-image.webp",
|
|
46
|
+
size: 129840,
|
|
47
|
+
contentType: "image/webp",
|
|
48
|
+
uploaded: new Date(Date.now() - 864e5 * 5).toISOString(),
|
|
49
|
+
access: "public"
|
|
50
|
+
});
|
|
51
|
+
blobStore.set("documents/report-q3.pdf", {
|
|
52
|
+
key: "documents/report-q3.pdf",
|
|
53
|
+
size: 512e3,
|
|
54
|
+
contentType: "application/pdf",
|
|
55
|
+
uploaded: new Date(Date.now() - 864e5 * 10).toISOString(),
|
|
56
|
+
access: "public"
|
|
57
|
+
});
|
|
58
|
+
blobStore.set("exports/cms-backup-2026.json", {
|
|
59
|
+
key: "exports/cms-backup-2026.json",
|
|
60
|
+
size: 24576,
|
|
61
|
+
contentType: "application/json",
|
|
62
|
+
uploaded: new Date(Date.now() - 36e5).toISOString(),
|
|
63
|
+
data: new TextEncoder().encode(
|
|
64
|
+
JSON.stringify(
|
|
65
|
+
{
|
|
66
|
+
collections: ["posts", "authors"],
|
|
67
|
+
exportedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
68
|
+
stats: { totalArticles: 42, published: 38 }
|
|
69
|
+
},
|
|
70
|
+
null,
|
|
71
|
+
2
|
|
72
|
+
)
|
|
73
|
+
),
|
|
74
|
+
access: "public"
|
|
75
|
+
});
|
|
76
|
+
resetBlob = true;
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
ok: true,
|
|
80
|
+
resetKv,
|
|
81
|
+
resetBlob,
|
|
82
|
+
message: `Dev sandbox ${target} reset to initial state.`
|
|
83
|
+
};
|
|
84
|
+
});
|