qarpeo 0.1.8 → 0.1.9
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/dist/module.mjs +30 -14
- package/dist/runtime/app/components/QarpeoWelcome.vue +84 -0
- package/package.json +1 -1
- package/dist/dev/env.d.ts +0 -12
- package/dist/dev/wrangler.d.ts +0 -18
- package/dist/module.d.ts +0 -17
- package/dist/runtime/ai.d.ts +0 -25
- package/dist/runtime/analytics.d.ts +0 -24
- package/dist/runtime/app/composables/analytics.d.ts +0 -125
- package/dist/runtime/app/composables/api-tokens.d.ts +0 -49
- package/dist/runtime/app/composables/auth.d.ts +0 -58
- package/dist/runtime/app/composables/chat.d.ts +0 -69
- package/dist/runtime/app/composables/cms-preview.d.ts +0 -33
- package/dist/runtime/app/composables/cms.d.ts +0 -307
- package/dist/runtime/app/composables/docs-version.d.ts +0 -35
- package/dist/runtime/app/composables/impersonation.d.ts +0 -14
- package/dist/runtime/app/composables/notifications.d.ts +0 -35
- package/dist/runtime/app/composables/organization.d.ts +0 -127
- package/dist/runtime/app/composables/passkey.d.ts +0 -6
- package/dist/runtime/app/composables/passwordless.d.ts +0 -7
- package/dist/runtime/app/composables/payments.d.ts +0 -43
- package/dist/runtime/app/composables/realtime.d.ts +0 -96
- package/dist/runtime/app/composables/site.d.ts +0 -35
- package/dist/runtime/app/composables/storage.d.ts +0 -60
- package/dist/runtime/app/composables/tenant.d.ts +0 -82
- package/dist/runtime/app/composables/turnstile.d.ts +0 -3
- package/dist/runtime/app/composables/two-factor.d.ts +0 -12
- package/dist/runtime/app/middleware/auth.global.d.ts +0 -2
- package/dist/runtime/app/plugins/seo.d.ts +0 -2
- package/dist/runtime/app/plugins/shortcuts.client.d.ts +0 -6
- package/dist/runtime/auth.d.ts +0 -25
- package/dist/runtime/bindings.d.ts +0 -27
- package/dist/runtime/blob.d.ts +0 -26
- package/dist/runtime/bots.d.ts +0 -1
- package/dist/runtime/browser.d.ts +0 -21
- package/dist/runtime/cache.d.ts +0 -19
- package/dist/runtime/cms.d.ts +0 -2
- package/dist/runtime/db.d.ts +0 -21
- package/dist/runtime/drizzle.d.ts +0 -11
- package/dist/runtime/email.d.ts +0 -51
- package/dist/runtime/hyperdrive.d.ts +0 -21
- package/dist/runtime/index.d.ts +0 -22
- package/dist/runtime/kv.d.ts +0 -16
- package/dist/runtime/payments.d.ts +0 -2
- package/dist/runtime/queue.d.ts +0 -21
- package/dist/runtime/rag.d.ts +0 -1
- package/dist/runtime/ratelimit.d.ts +0 -21
- package/dist/runtime/realtime.d.ts +0 -6
- package/dist/runtime/server/db/cms-schema.d.ts +0 -651
- package/dist/runtime/server/durable-objects/agent.d.ts +0 -14
- package/dist/runtime/server/durable-objects/room.d.ts +0 -34
- package/dist/runtime/server/middleware/auth.d.ts +0 -2
- package/dist/runtime/server/middleware/devtools.d.ts +0 -2
- package/dist/runtime/server/middleware/ratelimit.d.ts +0 -2
- package/dist/runtime/server/middleware/tenancy.d.ts +0 -6
- package/dist/runtime/server/middleware/tracker.d.ts +0 -7
- package/dist/runtime/server/plugins/agents.d.ts +0 -7
- package/dist/runtime/server/plugins/cms.d.ts +0 -8
- package/dist/runtime/server/plugins/dev-logs.d.ts +0 -1
- package/dist/runtime/server/plugins/dev-proxy.d.ts +0 -3
- package/dist/runtime/server/plugins/env.d.ts +0 -6
- package/dist/runtime/server/plugins/queue.d.ts +0 -6
- package/dist/runtime/server/routes/__qarpeo/agents/chat.post.d.ts +0 -20
- package/dist/runtime/server/routes/__qarpeo/agents/clear.post.d.ts +0 -7
- package/dist/runtime/server/routes/__qarpeo/agents/create.post.d.ts +0 -17
- package/dist/runtime/server/routes/__qarpeo/agents/history.get.d.ts +0 -15
- package/dist/runtime/server/routes/__qarpeo/agents/list.get.d.ts +0 -5
- package/dist/runtime/server/routes/__qarpeo/analytics/events.get.d.ts +0 -64
- package/dist/runtime/server/routes/__qarpeo/analytics/summary.get.d.ts +0 -30
- package/dist/runtime/server/routes/__qarpeo/auth/revoke-session.post.d.ts +0 -6
- package/dist/runtime/server/routes/__qarpeo/auth/sessions.get.d.ts +0 -6
- package/dist/runtime/server/routes/__qarpeo/auth/users.get.d.ts +0 -7
- package/dist/runtime/server/routes/__qarpeo/blob/files.get.d.ts +0 -22
- package/dist/runtime/server/routes/__qarpeo/db/query.post.d.ts +0 -23
- package/dist/runtime/server/routes/__qarpeo/db/tables.get.d.ts +0 -31
- package/dist/runtime/server/routes/__qarpeo/kv/delete.post.d.ts +0 -11
- package/dist/runtime/server/routes/__qarpeo/kv/get.get.d.ts +0 -11
- package/dist/runtime/server/routes/__qarpeo/kv/keys.get.d.ts +0 -8
- package/dist/runtime/server/routes/__qarpeo/kv/set.post.d.ts +0 -14
- package/dist/runtime/server/routes/__qarpeo/logs.delete.d.ts +0 -5
- package/dist/runtime/server/routes/__qarpeo/logs.get.d.ts +0 -5
- package/dist/runtime/server/routes/__qarpeo/logs.post.d.ts +0 -6
- package/dist/runtime/server/routes/__qarpeo/mail/bounce.post.d.ts +0 -5
- package/dist/runtime/server/routes/__qarpeo/mail/clear.post.d.ts +0 -4
- package/dist/runtime/server/routes/__qarpeo/mail/inbox.get.d.ts +0 -5
- package/dist/runtime/server/routes/__qarpeo/mail/send-test.post.d.ts +0 -4
- package/dist/runtime/server/routes/__qarpeo/mail/track/click/[id].get.d.ts +0 -2
- package/dist/runtime/server/routes/__qarpeo/mail/track/open/[id].get.d.ts +0 -2
- package/dist/runtime/server/routes/__qarpeo/overview/health.get.d.ts +0 -8
- package/dist/runtime/server/routes/__qarpeo/overview.get.d.ts +0 -32
- package/dist/runtime/server/routes/__qarpeo/settings/reset-dev-data.post.d.ts +0 -11
- package/dist/runtime/server/routes/__qarpeo/settings.get.d.ts +0 -124
- package/dist/runtime/server/routes/__qarpeo/tenants/create.post.d.ts +0 -7
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-add.post.d.ts +0 -6
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-delete.post.d.ts +0 -7
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-verify.post.d.ts +0 -9
- package/dist/runtime/server/routes/__qarpeo/tenants/list.get.d.ts +0 -15
- package/dist/runtime/server/routes/agents/[agent]/chat.post.d.ts +0 -2
- package/dist/runtime/server/routes/agents/[agent]/clear.post.d.ts +0 -4
- package/dist/runtime/server/routes/agents/[agent]/history.get.d.ts +0 -4
- package/dist/runtime/server/routes/analytics/events.get.d.ts +0 -3
- package/dist/runtime/server/routes/analytics/pageviews.get.d.ts +0 -3
- package/dist/runtime/server/routes/analytics/summary.get.d.ts +0 -6
- package/dist/runtime/server/routes/atom.xml.get.d.ts +0 -2
- package/dist/runtime/server/routes/auth/2fa/disable.post.d.ts +0 -4
- package/dist/runtime/server/routes/auth/2fa/setup.post.d.ts +0 -6
- package/dist/runtime/server/routes/auth/2fa/verify.post.d.ts +0 -6
- package/dist/runtime/server/routes/auth/[provider]/callback.d.ts +0 -1
- package/dist/runtime/server/routes/auth/[provider].d.ts +0 -3
- package/dist/runtime/server/routes/auth/account.delete.d.ts +0 -5
- package/dist/runtime/server/routes/auth/impersonate/start.post.d.ts +0 -5
- package/dist/runtime/server/routes/auth/impersonate/stop.post.d.ts +0 -5
- package/dist/runtime/server/routes/auth/logout-all.post.d.ts +0 -4
- package/dist/runtime/server/routes/auth/logout-others.post.d.ts +0 -4
- package/dist/runtime/server/routes/auth/logout.post.d.ts +0 -4
- package/dist/runtime/server/routes/auth/magic-link/send.post.d.ts +0 -10
- package/dist/runtime/server/routes/auth/magic-link/verify.get.d.ts +0 -2
- package/dist/runtime/server/routes/auth/organization/create.post.d.ts +0 -5
- package/dist/runtime/server/routes/auth/organization/invite.post.d.ts +0 -9
- package/dist/runtime/server/routes/auth/organization/join.post.d.ts +0 -6
- package/dist/runtime/server/routes/auth/organization/list.get.d.ts +0 -5
- package/dist/runtime/server/routes/auth/organization/members/[id].delete.d.ts +0 -4
- package/dist/runtime/server/routes/auth/organization/members/index.get.d.ts +0 -6
- package/dist/runtime/server/routes/auth/organization/mfa.post.d.ts +0 -6
- package/dist/runtime/server/routes/auth/organization/sso/[id].delete.d.ts +0 -4
- package/dist/runtime/server/routes/auth/organization/sso/index.get.d.ts +0 -2
- package/dist/runtime/server/routes/auth/organization/sso/index.post.d.ts +0 -5
- package/dist/runtime/server/routes/auth/organization/switch.post.d.ts +0 -6
- package/dist/runtime/server/routes/auth/otp/send.post.d.ts +0 -10
- package/dist/runtime/server/routes/auth/otp/verify.post.d.ts +0 -6
- package/dist/runtime/server/routes/auth/sessions/[id].delete.d.ts +0 -5
- package/dist/runtime/server/routes/auth/sessions.get.d.ts +0 -2
- package/dist/runtime/server/routes/auth/sso/login.get.d.ts +0 -2
- package/dist/runtime/server/routes/auth/sso/oidc/callback.get.d.ts +0 -2
- package/dist/runtime/server/routes/auth/sso/saml/acs.post.d.ts +0 -2
- package/dist/runtime/server/routes/auth/tokens/[id].delete.d.ts +0 -4
- package/dist/runtime/server/routes/auth/tokens/create.post.d.ts +0 -9
- package/dist/runtime/server/routes/auth/tokens/index.get.d.ts +0 -9
- package/dist/runtime/server/routes/auth/turnstile/verify.post.d.ts +0 -2
- package/dist/runtime/server/routes/auth/user.get.d.ts +0 -2
- package/dist/runtime/server/routes/auth/webauthn/login/options.post.d.ts +0 -2
- package/dist/runtime/server/routes/auth/webauthn/login/verify.post.d.ts +0 -6
- package/dist/runtime/server/routes/auth/webauthn/register/options.post.d.ts +0 -2
- package/dist/runtime/server/routes/auth/webauthn/register/verify.post.d.ts +0 -5
- package/dist/runtime/server/routes/cms/[collection]/[id]/preview-token.post.d.ts +0 -8
- package/dist/runtime/server/routes/cms/[collection]/[id]/publish.post.d.ts +0 -6
- package/dist/runtime/server/routes/cms/[collection]/[id]/review.post.d.ts +0 -6
- package/dist/runtime/server/routes/cms/[collection]/[id].delete.d.ts +0 -4
- package/dist/runtime/server/routes/cms/[collection]/[id].put.d.ts +0 -4
- package/dist/runtime/server/routes/cms/[collection]/[slug].get.d.ts +0 -4
- package/dist/runtime/server/routes/cms/[collection]/atom.xml.get.d.ts +0 -2
- package/dist/runtime/server/routes/cms/[collection]/by-path.get.d.ts +0 -8
- package/dist/runtime/server/routes/cms/[collection]/feed.xml.get.d.ts +0 -2
- package/dist/runtime/server/routes/cms/[collection]/index.get.d.ts +0 -7
- package/dist/runtime/server/routes/cms/[collection]/index.post.d.ts +0 -4
- package/dist/runtime/server/routes/cms/[collection]/references.get.d.ts +0 -19
- package/dist/runtime/server/routes/cms/[collection]/surroundings.get.d.ts +0 -10
- package/dist/runtime/server/routes/cms/collections/[id].delete.d.ts +0 -4
- package/dist/runtime/server/routes/cms/collections/[id].put.d.ts +0 -4
- package/dist/runtime/server/routes/cms/collections/index.get.d.ts +0 -4
- package/dist/runtime/server/routes/cms/collections/index.post.d.ts +0 -4
- package/dist/runtime/server/routes/cms/components/index.get.d.ts +0 -17
- package/dist/runtime/server/routes/cms/deploy.post.d.ts +0 -4
- package/dist/runtime/server/routes/cms/export.post.d.ts +0 -10
- package/dist/runtime/server/routes/cms/navigation.get.d.ts +0 -8
- package/dist/runtime/server/routes/cms/preview/disable.get.d.ts +0 -9
- package/dist/runtime/server/routes/cms/preview/enable.get.d.ts +0 -14
- package/dist/runtime/server/routes/cms/publish-scheduled.post.d.ts +0 -11
- package/dist/runtime/server/routes/cms/search.get.d.ts +0 -13
- package/dist/runtime/server/routes/cms/sync.post.d.ts +0 -7
- package/dist/runtime/server/routes/cms/webhooks/[provider].post.d.ts +0 -150
- package/dist/runtime/server/routes/docs/search.get.d.ts +0 -15
- package/dist/runtime/server/routes/feed.xml.get.d.ts +0 -2
- package/dist/runtime/server/routes/mail/bounce.post.d.ts +0 -14
- package/dist/runtime/server/routes/mail/inbox/[id].get.d.ts +0 -2
- package/dist/runtime/server/routes/mail/inbox.get.d.ts +0 -4
- package/dist/runtime/server/routes/mail/suppressions/[email].delete.d.ts +0 -11
- package/dist/runtime/server/routes/mail/suppressions/index.get.d.ts +0 -12
- package/dist/runtime/server/routes/mail/suppressions/index.post.d.ts +0 -10
- package/dist/runtime/server/routes/mail/unsubscribe.d.ts +0 -13
- package/dist/runtime/server/routes/mail/webhooks.post.d.ts +0 -12
- package/dist/runtime/server/routes/notifications/[id]/read.post.d.ts +0 -4
- package/dist/runtime/server/routes/notifications/[id].delete.d.ts +0 -4
- package/dist/runtime/server/routes/notifications/[id].get.d.ts +0 -2
- package/dist/runtime/server/routes/notifications/index.get.d.ts +0 -6
- package/dist/runtime/server/routes/notifications/push/subscribe.post.d.ts +0 -4
- package/dist/runtime/server/routes/notifications/push/unsubscribe.post.d.ts +0 -4
- package/dist/runtime/server/routes/notifications/read-all.post.d.ts +0 -4
- package/dist/runtime/server/routes/payments/cancel.post.d.ts +0 -7
- package/dist/runtime/server/routes/payments/change-plan.post.d.ts +0 -7
- package/dist/runtime/server/routes/payments/checkout.post.d.ts +0 -9
- package/dist/runtime/server/routes/payments/pause.post.d.ts +0 -7
- package/dist/runtime/server/routes/payments/portal.post.d.ts +0 -5
- package/dist/runtime/server/routes/payments/subscription.get.d.ts +0 -6
- package/dist/runtime/server/routes/payments/usage.get.d.ts +0 -12
- package/dist/runtime/server/routes/payments/usage.post.d.ts +0 -6
- package/dist/runtime/server/routes/payments/webhook.post.d.ts +0 -14
- package/dist/runtime/server/routes/realtime/broadcast.post.d.ts +0 -4
- package/dist/runtime/server/routes/realtime/history.delete.d.ts +0 -13
- package/dist/runtime/server/routes/realtime/history.get.d.ts +0 -16
- package/dist/runtime/server/routes/realtime/presence.get.d.ts +0 -6
- package/dist/runtime/server/routes/realtime/state.get.d.ts +0 -5
- package/dist/runtime/server/routes/realtime/state.post.d.ts +0 -6
- package/dist/runtime/server/routes/realtime/ws.get.d.ts +0 -2
- package/dist/runtime/server/routes/robots.txt.get.d.ts +0 -2
- package/dist/runtime/server/routes/rss.xml.get.d.ts +0 -2
- package/dist/runtime/server/routes/sitemap.xml.get.d.ts +0 -2
- package/dist/runtime/server/routes/storage/file/[...key].delete.d.ts +0 -4
- package/dist/runtime/server/routes/storage/file/[...key].get.d.ts +0 -2
- package/dist/runtime/server/routes/storage/files.get.d.ts +0 -14
- package/dist/runtime/server/routes/storage/presigned.post.d.ts +0 -8
- package/dist/runtime/server/routes/storage/sign.post.d.ts +0 -6
- package/dist/runtime/server/routes/storage/upload.post.d.ts +0 -22
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/index.delete.d.ts +0 -8
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/verify.post.d.ts +0 -8
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.get.d.ts +0 -8
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.post.d.ts +0 -8
- package/dist/runtime/server/routes/tenants/current.get.d.ts +0 -8
- package/dist/runtime/server/tasks/cms/publish.d.ts +0 -4
- package/dist/runtime/server/utils/agent-store.d.ts +0 -24
- package/dist/runtime/server/utils/agents-registry-fallback.d.ts +0 -1
- package/dist/runtime/server/utils/ai.d.ts +0 -119
- package/dist/runtime/server/utils/analytics-query.d.ts +0 -109
- package/dist/runtime/server/utils/auth.d.ts +0 -60
- package/dist/runtime/server/utils/blob-store.d.ts +0 -13
- package/dist/runtime/server/utils/bots.d.ts +0 -21
- package/dist/runtime/server/utils/cache.d.ts +0 -33
- package/dist/runtime/server/utils/cms-events.d.ts +0 -17
- package/dist/runtime/server/utils/cms-filter.d.ts +0 -3
- package/dist/runtime/server/utils/cms.d.ts +0 -287
- package/dist/runtime/server/utils/config.d.ts +0 -27
- package/dist/runtime/server/utils/context.d.ts +0 -13
- package/dist/runtime/server/utils/crypto.d.ts +0 -16
- package/dist/runtime/server/utils/dev-logs.d.ts +0 -21
- package/dist/runtime/server/utils/dev-proxy.d.ts +0 -1
- package/dist/runtime/server/utils/domains.d.ts +0 -46
- package/dist/runtime/server/utils/drizzle.d.ts +0 -10
- package/dist/runtime/server/utils/email-templates.d.ts +0 -44
- package/dist/runtime/server/utils/feed.d.ts +0 -42
- package/dist/runtime/server/utils/impersonation.d.ts +0 -67
- package/dist/runtime/server/utils/jobs.d.ts +0 -70
- package/dist/runtime/server/utils/kv-store.d.ts +0 -9
- package/dist/runtime/server/utils/mail-suppression.d.ts +0 -62
- package/dist/runtime/server/utils/mail.d.ts +0 -90
- package/dist/runtime/server/utils/notifications.d.ts +0 -51
- package/dist/runtime/server/utils/organization.d.ts +0 -54
- package/dist/runtime/server/utils/passwordless.d.ts +0 -48
- package/dist/runtime/server/utils/payments.d.ts +0 -121
- package/dist/runtime/server/utils/queue-fallback.d.ts +0 -2
- package/dist/runtime/server/utils/queue.d.ts +0 -4
- package/dist/runtime/server/utils/rag.d.ts +0 -25
- package/dist/runtime/server/utils/ratelimit.d.ts +0 -45
- package/dist/runtime/server/utils/realtime.d.ts +0 -110
- package/dist/runtime/server/utils/schema-fallback.d.ts +0 -3
- package/dist/runtime/server/utils/session.d.ts +0 -72
- package/dist/runtime/server/utils/sso.d.ts +0 -49
- package/dist/runtime/server/utils/storage.d.ts +0 -111
- package/dist/runtime/server/utils/tenant.d.ts +0 -44
- package/dist/runtime/server/utils/totp.d.ts +0 -33
- package/dist/runtime/server/utils/tracker.d.ts +0 -72
- package/dist/runtime/server/utils/turnstile.d.ts +0 -17
- package/dist/runtime/server/utils/vapid.d.ts +0 -35
- package/dist/runtime/storage.d.ts +0 -1
- package/dist/runtime/types/ai.d.ts +0 -68
- package/dist/runtime/types/analytics.d.ts +0 -30
- package/dist/runtime/types/auth.d.ts +0 -153
- package/dist/runtime/types/browser.d.ts +0 -29
- package/dist/runtime/types/d1.d.ts +0 -44
- package/dist/runtime/types/drizzle.d.ts +0 -13
- package/dist/runtime/types/durable-object.d.ts +0 -51
- package/dist/runtime/types/email.d.ts +0 -66
- package/dist/runtime/types/hyperdrive.d.ts +0 -18
- package/dist/runtime/types/index.d.ts +0 -156
- package/dist/runtime/types/queue.d.ts +0 -67
- package/dist/runtime/types/r2.d.ts +0 -108
- package/dist/runtime/types/ratelimit.d.ts +0 -21
- package/dist/runtime/types/vectorize.d.ts +0 -74
- package/dist/runtime/vectorize.d.ts +0 -21
- package/dist/types.d.ts +0 -2752
- package/dist/utils/agents.d.ts +0 -8
- package/dist/utils/auth-schema.d.ts +0 -11
- package/dist/utils/bindings.d.ts +0 -16
- package/dist/utils/cms-scan.d.ts +0 -36
- package/dist/utils/cms-schema.d.ts +0 -1
- package/dist/utils/cms-sources.d.ts +0 -67
- package/dist/utils/drizzle.d.ts +0 -42
- package/dist/utils/jobs.d.ts +0 -8
- package/dist/utils/local-db.d.ts +0 -28
- package/dist/utils/notifications-schema.d.ts +0 -15
- package/dist/utils/payments-schema.d.ts +0 -11
- package/dist/utils/pkg.d.ts +0 -15
- package/dist/utils/queue.d.ts +0 -8
- package/dist/utils/tenants-schema.d.ts +0 -11
|
@@ -1,27 +0,0 @@
|
|
|
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;
|
|
@@ -1,13 +0,0 @@
|
|
|
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>;
|
|
@@ -1,16 +0,0 @@
|
|
|
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>;
|
|
@@ -1,21 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getOrInitDevProxy(): Promise<any>;
|
|
@@ -1,46 +0,0 @@
|
|
|
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
|
-
}>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as _schema from "#qarpeo/schema";
|
|
2
|
-
import type { CFEvent, QarpeoDrizzleDB, InferDrizzleRelations } from "../../index";
|
|
3
|
-
export type { QarpeoDrizzleDB, InferDrizzleRelations } from "../../index";
|
|
4
|
-
type SchemaRelations = InferDrizzleRelations<typeof _schema>;
|
|
5
|
-
/** Access a typed Drizzle ORM client connected to Cloudflare D1. */
|
|
6
|
-
export declare function useDrizzle(bindingName?: string, event?: CFEvent): QarpeoDrizzleDB<SchemaRelations>;
|
|
7
|
-
/** Auto-imported `db` client wrapping Cloudflare D1 with Drizzle ORM. */
|
|
8
|
-
export declare const db: QarpeoDrizzleDB<SchemaRelations>;
|
|
9
|
-
/** All exported tables, views, and relations from your schema (e.g. `server/db/schema.ts`). */
|
|
10
|
-
export declare const schema: typeof _schema;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { EmailTemplateHandler, EmailTemplateName, EmailTemplateResult, MailTemplateOptions } from "../../../types";
|
|
2
|
-
export type { EmailTemplateResult };
|
|
3
|
-
/**
|
|
4
|
-
* Register a typed custom email template.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* defineEmailTemplate("invoice-ready", (data: { invoiceId: string; amount: string }, branding) => ({
|
|
8
|
-
* subject: `Invoice #${data.invoiceId} is ready`,
|
|
9
|
-
* html: `<p>Your invoice for ${data.amount} is ready.</p>`,
|
|
10
|
-
* text: `Your invoice for ${data.amount} is ready.`,
|
|
11
|
-
* }))
|
|
12
|
-
*/
|
|
13
|
-
export declare function defineEmailTemplate<T = Record<string, any>>(name: string, handler: EmailTemplateHandler<T>): void;
|
|
14
|
-
/** Retrieve a registered custom email template by name. */
|
|
15
|
-
export declare function getEmailTemplate(name: string): EmailTemplateHandler | undefined;
|
|
16
|
-
/** Escapes user-supplied data before inserting into HTML email templates. */
|
|
17
|
-
export declare function escapeHtml(str: unknown): string;
|
|
18
|
-
/** Validates a URL to only allow http/https schemes (prevents javascript: XSS). */
|
|
19
|
-
export declare function sanitizeUrl(url: unknown): string;
|
|
20
|
-
/** Common HTML email layout wrapper with inline styles compatible with Gmail, Apple Mail, Outlook. */
|
|
21
|
-
export declare function renderEmailLayout(options: {
|
|
22
|
-
title: string;
|
|
23
|
-
content: string;
|
|
24
|
-
branding?: MailTemplateOptions;
|
|
25
|
-
}): string;
|
|
26
|
-
/** Renders a primary call-to-action button HTML. */
|
|
27
|
-
export declare function renderEmailButton(url: string, label: string, color?: string): string;
|
|
28
|
-
/**
|
|
29
|
-
* Lightweight, zero-dependency Markdown-to-Email renderer.
|
|
30
|
-
* Converts markdown into responsive, inline-styled HTML compatible with major email clients.
|
|
31
|
-
*/
|
|
32
|
-
export declare function renderMarkdownEmail(markdown: string, options?: {
|
|
33
|
-
title?: string;
|
|
34
|
-
branding?: MailTemplateOptions;
|
|
35
|
-
}): {
|
|
36
|
-
html: string;
|
|
37
|
-
text: string;
|
|
38
|
-
};
|
|
39
|
-
/** Pre-built and custom transactional templates library. */
|
|
40
|
-
export declare function renderEmailTemplate(templateName: EmailTemplateName, data?: Record<string, any>, branding?: MailTemplateOptions): Promise<{
|
|
41
|
-
html: string;
|
|
42
|
-
text: string;
|
|
43
|
-
subject?: string;
|
|
44
|
-
}>;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared utilities for RSS 2.0 and Atom 1.0 feed generation.
|
|
3
|
-
* Edge-native — no external packages, runs on Cloudflare Workers.
|
|
4
|
-
*/
|
|
5
|
-
export interface FeedEntry {
|
|
6
|
-
id: string;
|
|
7
|
-
title: string;
|
|
8
|
-
link: string;
|
|
9
|
-
description: string;
|
|
10
|
-
pubDate: string;
|
|
11
|
-
updated: string;
|
|
12
|
-
author?: string;
|
|
13
|
-
categories?: string[];
|
|
14
|
-
guid: string;
|
|
15
|
-
}
|
|
16
|
-
/** Escape XML special characters */
|
|
17
|
-
export declare function escapeXml(str: string): string;
|
|
18
|
-
/** Format a timestamp (ms or ISO string) as RFC 822 for RSS pubDate */
|
|
19
|
-
export declare function formatRFC822(ts: string | number | null | undefined): string;
|
|
20
|
-
/** Format a timestamp as ISO 8601 for Atom <updated> */
|
|
21
|
-
export declare function formatISO8601(ts: string | number | null | undefined): string;
|
|
22
|
-
/** Build RSS 2.0 XML string */
|
|
23
|
-
export declare function buildRSSXml(entries: FeedEntry[], channel: {
|
|
24
|
-
title: string;
|
|
25
|
-
link: string;
|
|
26
|
-
description: string;
|
|
27
|
-
ttl?: number;
|
|
28
|
-
imageUrl?: string;
|
|
29
|
-
language?: string;
|
|
30
|
-
}): string;
|
|
31
|
-
/** Build Atom 1.0 XML string */
|
|
32
|
-
export declare function buildAtomXml(entries: FeedEntry[], feed: {
|
|
33
|
-
title: string;
|
|
34
|
-
id: string;
|
|
35
|
-
link: string;
|
|
36
|
-
updated: string;
|
|
37
|
-
description?: string;
|
|
38
|
-
author?: string;
|
|
39
|
-
language?: string;
|
|
40
|
-
}): string;
|
|
41
|
-
/** Convert D1 row to FeedEntry */
|
|
42
|
-
export declare function rowToFeedEntry(row: any, baseUrl: string): FeedEntry;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import type { QarpeoUser } from "../../types/auth";
|
|
2
|
-
/**
|
|
3
|
-
* Admin impersonates a target user by stacking a "impersonator" context into the sealed session.
|
|
4
|
-
* The admin's original identity is preserved in `session.impersonator`.
|
|
5
|
-
*/
|
|
6
|
-
export declare function startImpersonation(event: any, targetUserId: string): Promise<{
|
|
7
|
-
success: boolean;
|
|
8
|
-
user: QarpeoUser;
|
|
9
|
-
}>;
|
|
10
|
-
/** Stops impersonation and restores the admin's original identity. */
|
|
11
|
-
export declare function stopImpersonation(event: any): Promise<{
|
|
12
|
-
success: boolean;
|
|
13
|
-
user: QarpeoUser;
|
|
14
|
-
}>;
|
|
15
|
-
/**
|
|
16
|
-
* Creates a new Personal Access Token (PAT) for the current user. Returns the raw token ONCE — only
|
|
17
|
-
* the SHA-256 hash is stored.
|
|
18
|
-
*/
|
|
19
|
-
export declare function createApiToken(event: any, input: {
|
|
20
|
-
name: string;
|
|
21
|
-
scopes?: string[];
|
|
22
|
-
expiresInDays?: number;
|
|
23
|
-
}): Promise<{
|
|
24
|
-
id: string;
|
|
25
|
-
token: string;
|
|
26
|
-
name: string;
|
|
27
|
-
scopes: string[];
|
|
28
|
-
expiresAt: number | null;
|
|
29
|
-
createdAt: number;
|
|
30
|
-
}>;
|
|
31
|
-
/** Lists all Personal Access Tokens for a user (no raw secrets returned). */
|
|
32
|
-
export declare function listApiTokens(event: any): Promise<Array<{
|
|
33
|
-
id: string;
|
|
34
|
-
name: string;
|
|
35
|
-
scopes: string[];
|
|
36
|
-
lastUsedAt: number | null;
|
|
37
|
-
expiresAt: number | null;
|
|
38
|
-
createdAt: number;
|
|
39
|
-
}>>;
|
|
40
|
-
/** Revokes a Personal Access Token by ID (must be owner or admin). */
|
|
41
|
-
export declare function revokeApiToken(event: any, tokenId: string): Promise<{
|
|
42
|
-
success: boolean;
|
|
43
|
-
}>;
|
|
44
|
-
/**
|
|
45
|
-
* Verifies a raw PAT token from `Authorization: Bearer qp_live_...` header. Returns the user and
|
|
46
|
-
* token metadata if valid; throws 401 if invalid/expired.
|
|
47
|
-
*/
|
|
48
|
-
export declare function verifyApiToken(event: any, rawToken: string): Promise<{
|
|
49
|
-
user: QarpeoUser;
|
|
50
|
-
tokenId: string;
|
|
51
|
-
scopes: string[];
|
|
52
|
-
userId: string;
|
|
53
|
-
}>;
|
|
54
|
-
/** Checks if a PAT token has a specific scope granted. */
|
|
55
|
-
export declare function hasApiTokenScope(scopes: string[], required: string): boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Middleware helper: requires a valid Bearer PAT from Authorization header. Throws 401 if
|
|
58
|
-
* no/invalid token. Returns the verified token context.
|
|
59
|
-
*/
|
|
60
|
-
export declare function requireApiToken(event: any, options?: {
|
|
61
|
-
scope?: string;
|
|
62
|
-
}): Promise<{
|
|
63
|
-
user: QarpeoUser;
|
|
64
|
-
tokenId: string;
|
|
65
|
-
scopes: string[];
|
|
66
|
-
userId: string;
|
|
67
|
-
}>;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type { CFEvent } from "../../types/index";
|
|
2
|
-
export interface JobContext {
|
|
3
|
-
/** Unique message/job ID */
|
|
4
|
-
id: string;
|
|
5
|
-
/** Timestamp when the job was dispatched */
|
|
6
|
-
timestamp: Date;
|
|
7
|
-
/** Delivery attempt count (starts at 1) */
|
|
8
|
-
attempts: number;
|
|
9
|
-
/** Name of the job being executed */
|
|
10
|
-
jobName: string;
|
|
11
|
-
/** Manually request a retry for this message */
|
|
12
|
-
retry: () => void;
|
|
13
|
-
/** Manually acknowledge this message */
|
|
14
|
-
ack: () => void;
|
|
15
|
-
}
|
|
16
|
-
export type JobHandler<T = any> = (data: T, context: JobContext) => Promise<void> | void;
|
|
17
|
-
export interface JobDefinitionOptions {
|
|
18
|
-
/**
|
|
19
|
-
* Cloudflare Queue binding name override.
|
|
20
|
-
*
|
|
21
|
-
* @default "QUEUE"
|
|
22
|
-
*/
|
|
23
|
-
binding?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Maximum retry attempts before discarding or dead-lettering.
|
|
26
|
-
*
|
|
27
|
-
* @default 3
|
|
28
|
-
*/
|
|
29
|
-
maxRetries?: number;
|
|
30
|
-
}
|
|
31
|
-
export interface JobDefinition<T = any> {
|
|
32
|
-
name: string;
|
|
33
|
-
handler: JobHandler<T>;
|
|
34
|
-
options?: JobDefinitionOptions;
|
|
35
|
-
}
|
|
36
|
-
export interface JobEnvelope<T = any> {
|
|
37
|
-
__jobName: string;
|
|
38
|
-
data: T;
|
|
39
|
-
id: string;
|
|
40
|
-
timestamp: number;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Define a typed background job handler.
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* // server/jobs/send-welcome-email.ts
|
|
47
|
-
* export default defineJob("send-welcome-email", async (data: { userId: string }, ctx) => {
|
|
48
|
-
* // Background work here...
|
|
49
|
-
* })
|
|
50
|
-
*/
|
|
51
|
-
export declare function defineJob<T = any>(nameOrHandler: string | JobHandler<T>, handlerOrOptions?: JobHandler<T> | JobDefinitionOptions, options?: JobDefinitionOptions): JobDefinition<T>;
|
|
52
|
-
/**
|
|
53
|
-
* Dispatch a background job for asynchronous processing on Cloudflare Queues.
|
|
54
|
-
*
|
|
55
|
-
* @example
|
|
56
|
-
* await dispatchJob("send-welcome-email", { userId: "user_123" })
|
|
57
|
-
*/
|
|
58
|
-
export declare function dispatchJob<T = any>(name: string, data: T, options?: {
|
|
59
|
-
binding?: string;
|
|
60
|
-
delaySeconds?: number;
|
|
61
|
-
event?: CFEvent;
|
|
62
|
-
}): Promise<void>;
|
|
63
|
-
/**
|
|
64
|
-
* Dispatches an incoming Cloudflare Queue batch to registered job handlers. Used internally by the
|
|
65
|
-
* Qarpeo queue consumer plugin.
|
|
66
|
-
*/
|
|
67
|
-
export declare function runJobsBatch(batch: any, jobModules: Record<string, any>, options?: {
|
|
68
|
-
customQueueHandler?: any;
|
|
69
|
-
maxRetries?: number;
|
|
70
|
-
}): Promise<void>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared in-memory KV store for local development and preview mode. Attached to globalThis to
|
|
3
|
-
* ensure cross-chunk persistence in Nitro/Vite.
|
|
4
|
-
*/
|
|
5
|
-
export interface DevMockKvEntry {
|
|
6
|
-
value: string;
|
|
7
|
-
expiration?: number;
|
|
8
|
-
}
|
|
9
|
-
export declare function getDevMockKvStore(): Map<string, DevMockKvEntry>;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { MailSuppressionReason, MailSuppressionRecord, MailSuppressionType, MailUnsubscribeOptions } from "../../../types";
|
|
2
|
-
export declare function ensureMailSuppressionsTable(db: any): Promise<void>;
|
|
3
|
-
/**
|
|
4
|
-
* Generates an HMAC-signed one-click unsubscribe token.
|
|
5
|
-
*/
|
|
6
|
-
export declare function generateUnsubscribeToken(email: string, secret?: string): Promise<string>;
|
|
7
|
-
/**
|
|
8
|
-
* Verifies an HMAC-signed unsubscribe token and extracts the email address.
|
|
9
|
-
*/
|
|
10
|
-
export declare function verifyUnsubscribeToken(token: string, secret?: string): Promise<string | null>;
|
|
11
|
-
/**
|
|
12
|
-
* Builds RFC 2369 and RFC 8058 compliant `List-Unsubscribe` headers.
|
|
13
|
-
*/
|
|
14
|
-
export declare function buildListUnsubscribeHeaders(options: {
|
|
15
|
-
to: string;
|
|
16
|
-
baseUrl: string;
|
|
17
|
-
config?: MailUnsubscribeOptions;
|
|
18
|
-
secret?: string;
|
|
19
|
-
}): Promise<Record<string, string>>;
|
|
20
|
-
/**
|
|
21
|
-
* Adds an email address to the suppression list.
|
|
22
|
-
*/
|
|
23
|
-
export declare function suppressEmail(event: any, options: {
|
|
24
|
-
email: string;
|
|
25
|
-
reason?: MailSuppressionReason;
|
|
26
|
-
type?: MailSuppressionType;
|
|
27
|
-
source?: string;
|
|
28
|
-
metadata?: Record<string, any>;
|
|
29
|
-
}): Promise<MailSuppressionRecord>;
|
|
30
|
-
/**
|
|
31
|
-
* Checks whether an email address is suppressed.
|
|
32
|
-
*/
|
|
33
|
-
export declare function isEmailSuppressed(event: any, email: string): Promise<{
|
|
34
|
-
suppressed: boolean;
|
|
35
|
-
reason?: MailSuppressionReason;
|
|
36
|
-
type?: MailSuppressionType;
|
|
37
|
-
record?: MailSuppressionRecord;
|
|
38
|
-
}>;
|
|
39
|
-
/**
|
|
40
|
-
* Removes an email address from the suppression list.
|
|
41
|
-
*/
|
|
42
|
-
export declare function unsuppressEmail(event: any, email: string): Promise<boolean>;
|
|
43
|
-
/**
|
|
44
|
-
* Lists suppressed emails with pagination and optional search filter.
|
|
45
|
-
*/
|
|
46
|
-
export declare function listSuppressedEmails(event: any, options?: {
|
|
47
|
-
limit?: number;
|
|
48
|
-
offset?: number;
|
|
49
|
-
search?: string;
|
|
50
|
-
type?: string;
|
|
51
|
-
reason?: string;
|
|
52
|
-
}): Promise<{
|
|
53
|
-
items: MailSuppressionRecord[];
|
|
54
|
-
total: number;
|
|
55
|
-
}>;
|
|
56
|
-
/**
|
|
57
|
-
* Tracks soft bounces and promotes to suppression if threshold is reached.
|
|
58
|
-
*/
|
|
59
|
-
export declare function recordSoftBounce(event: any, email: string, threshold?: number): Promise<{
|
|
60
|
-
suppressed: boolean;
|
|
61
|
-
count: number;
|
|
62
|
-
}>;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import type { MailResult, SendMailRequest } from "../../../types";
|
|
2
|
-
export interface DevEmailRecord {
|
|
3
|
-
id: string;
|
|
4
|
-
to: string | string[];
|
|
5
|
-
from: string;
|
|
6
|
-
subject: string;
|
|
7
|
-
html: string;
|
|
8
|
-
text: string;
|
|
9
|
-
timestamp: number;
|
|
10
|
-
headers?: Record<string, string>;
|
|
11
|
-
template?: string;
|
|
12
|
-
queued?: boolean;
|
|
13
|
-
opened?: boolean;
|
|
14
|
-
openedAt?: number;
|
|
15
|
-
openCount?: number;
|
|
16
|
-
clicks?: Array<{
|
|
17
|
-
url: string;
|
|
18
|
-
timestamp: number;
|
|
19
|
-
}>;
|
|
20
|
-
bounced?: boolean;
|
|
21
|
-
bounceReason?: string;
|
|
22
|
-
metadata?: Record<string, any>;
|
|
23
|
-
}
|
|
24
|
-
/** Access all intercepted emails in local development. */
|
|
25
|
-
export declare function getDevMailbox(): DevEmailRecord[];
|
|
26
|
-
/** Access a specific intercepted email by ID. */
|
|
27
|
-
export declare function getDevEmail(id: string): DevEmailRecord | undefined;
|
|
28
|
-
/** Clear the local development mailbox. */
|
|
29
|
-
export declare function clearDevMailbox(): void;
|
|
30
|
-
/** Record an open tracking event for a message. */
|
|
31
|
-
export declare function recordEmailOpen(id: string): boolean;
|
|
32
|
-
/** Record a link click tracking event for a message. */
|
|
33
|
-
export declare function recordEmailClick(id: string, url: string): boolean;
|
|
34
|
-
/** Record a bounce event for a message. */
|
|
35
|
-
export declare function recordEmailBounce(id: string, reason?: string): boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Injects open tracking pixel and click tracking redirect URLs into HTML email content.
|
|
38
|
-
*/
|
|
39
|
-
export declare function injectEmailTracking(html: string, options: {
|
|
40
|
-
messageId: string;
|
|
41
|
-
baseUrl: string;
|
|
42
|
-
opens?: boolean;
|
|
43
|
-
clicks?: boolean;
|
|
44
|
-
}): string;
|
|
45
|
-
/**
|
|
46
|
-
* Direct delivery executor using Cloudflare send_email binding or external providers.
|
|
47
|
-
* Used internally for immediate sends, waitUntil backgrounds, and queue consumer workers.
|
|
48
|
-
*/
|
|
49
|
-
export declare function deliverMailDirect(options: {
|
|
50
|
-
from: string;
|
|
51
|
-
to: string | string[];
|
|
52
|
-
subject: string;
|
|
53
|
-
html: string;
|
|
54
|
-
text: string;
|
|
55
|
-
replyTo?: string;
|
|
56
|
-
cc?: string | string[];
|
|
57
|
-
bcc?: string | string[];
|
|
58
|
-
headers?: Record<string, string>;
|
|
59
|
-
messageId: string;
|
|
60
|
-
provider: string;
|
|
61
|
-
apiKey?: string;
|
|
62
|
-
}, event?: any): Promise<string>;
|
|
63
|
-
/**
|
|
64
|
-
* High-level transactional mail sender with template rendering, markdown support,
|
|
65
|
-
* open/click tracking, queue-backed delivery, and dev mailbox capture.
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* // Markdown content:
|
|
69
|
-
* await sendMail({
|
|
70
|
-
* to: "user@example.com",
|
|
71
|
-
* subject: "Welcome to Acme",
|
|
72
|
-
* markdown: "# Welcome!\nWe are glad you joined us.\n\n[btn: Go to Dashboard](https://myapp.com)",
|
|
73
|
-
* })
|
|
74
|
-
*
|
|
75
|
-
* // Template:
|
|
76
|
-
* await sendMail({
|
|
77
|
-
* to: "user@example.com",
|
|
78
|
-
* template: "welcome",
|
|
79
|
-
* data: { name: "Alice", actionUrl: "https://myapp.com/dashboard" },
|
|
80
|
-
* })
|
|
81
|
-
*/
|
|
82
|
-
export declare function sendMail(request: SendMailRequest, event?: any): Promise<MailResult>;
|
|
83
|
-
/** Access the Qarpeo Transactional Mail client. */
|
|
84
|
-
export declare function useMail(event?: any): {
|
|
85
|
-
send: (request: SendMailRequest) => Promise<MailResult>;
|
|
86
|
-
getMailbox: typeof getDevMailbox;
|
|
87
|
-
getEmail: typeof getDevEmail;
|
|
88
|
-
clearMailbox: typeof clearDevMailbox;
|
|
89
|
-
};
|
|
90
|
-
export { suppressEmail, isEmailSuppressed, unsuppressEmail, listSuppressedEmails, recordSoftBounce, generateUnsubscribeToken, verifyUnsubscribeToken, buildListUnsubscribeHeaders, } from "./mail-suppression";
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import type { NotificationRecord, PushSubscriptionRecord, SendNotificationRequest } from "../../../types";
|
|
2
|
-
/**
|
|
3
|
-
* Send a notification via one or more channels (in-app, push, email).
|
|
4
|
-
* Persists to D1 for in-app channel.
|
|
5
|
-
*/
|
|
6
|
-
export declare function sendNotification(request: SendNotificationRequest, event?: any): Promise<void>;
|
|
7
|
-
/** Alias for sendNotification */
|
|
8
|
-
export declare const notify: typeof sendNotification;
|
|
9
|
-
export interface GetNotificationsOptions {
|
|
10
|
-
limit?: number;
|
|
11
|
-
offset?: number;
|
|
12
|
-
unreadOnly?: boolean;
|
|
13
|
-
tenantId?: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Get paginated notifications for a user from D1.
|
|
17
|
-
*/
|
|
18
|
-
export declare function getNotifications(userId: string, options?: GetNotificationsOptions, event?: any): Promise<{
|
|
19
|
-
notifications: NotificationRecord[];
|
|
20
|
-
total: number;
|
|
21
|
-
unread: number;
|
|
22
|
-
}>;
|
|
23
|
-
/**
|
|
24
|
-
* Mark a single notification as read.
|
|
25
|
-
*/
|
|
26
|
-
export declare function markNotificationRead(id: string, userId: string, event?: any): Promise<void>;
|
|
27
|
-
/**
|
|
28
|
-
* Mark all notifications as read for a user.
|
|
29
|
-
*/
|
|
30
|
-
export declare function markAllNotificationsRead(userId: string, event?: any): Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* Delete a notification.
|
|
33
|
-
*/
|
|
34
|
-
export declare function deleteNotification(id: string, userId: string, event?: any): Promise<void>;
|
|
35
|
-
/**
|
|
36
|
-
* Save a Web Push subscription for a user.
|
|
37
|
-
*/
|
|
38
|
-
export declare function savePushSubscription(userId: string, subscription: PushSubscriptionRecord, tenantId?: string, event?: any): Promise<void>;
|
|
39
|
-
/**
|
|
40
|
-
* Remove a Web Push subscription by endpoint.
|
|
41
|
-
*/
|
|
42
|
-
export declare function removePushSubscription(endpoint: string, event?: any): Promise<void>;
|
|
43
|
-
/**
|
|
44
|
-
* Send a Web Push notification to all subscriptions for a user.
|
|
45
|
-
*/
|
|
46
|
-
export declare function sendWebPush(userId: string, payload: {
|
|
47
|
-
title: string;
|
|
48
|
-
body?: string;
|
|
49
|
-
icon?: string;
|
|
50
|
-
data?: Record<string, any>;
|
|
51
|
-
}, event?: any): Promise<void>;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import type { QarpeoOrganization, QarpeoMember } from "../../types/auth";
|
|
2
|
-
export declare function slugify(text: string): string;
|
|
3
|
-
/** Creates a new organization with the current authenticated user as "owner". */
|
|
4
|
-
export declare function createOrganization(event: any, input: {
|
|
5
|
-
name: string;
|
|
6
|
-
slug?: string;
|
|
7
|
-
logoUrl?: string | null;
|
|
8
|
-
}): Promise<{
|
|
9
|
-
organization: QarpeoOrganization;
|
|
10
|
-
member: QarpeoMember;
|
|
11
|
-
}>;
|
|
12
|
-
/** Lists all organizations the authenticated user belongs to. */
|
|
13
|
-
export declare function listUserOrganizations(event: any, userId: string): Promise<Array<QarpeoOrganization & {
|
|
14
|
-
role: string;
|
|
15
|
-
memberId: string;
|
|
16
|
-
}>>;
|
|
17
|
-
/** Switches the active organization for the current user's session. */
|
|
18
|
-
export declare function switchActiveOrganization(event: any, organizationId: string): Promise<{
|
|
19
|
-
success: boolean;
|
|
20
|
-
organization: QarpeoOrganization;
|
|
21
|
-
role: string;
|
|
22
|
-
}>;
|
|
23
|
-
/** Invites a new member to an organization via email. */
|
|
24
|
-
export declare function inviteOrganizationMember(event: any, input: {
|
|
25
|
-
organizationId: string;
|
|
26
|
-
email: string;
|
|
27
|
-
role?: string;
|
|
28
|
-
}): Promise<{
|
|
29
|
-
invitationId: string;
|
|
30
|
-
token: string;
|
|
31
|
-
expiresAt: number;
|
|
32
|
-
inviteUrl: string;
|
|
33
|
-
sent: boolean;
|
|
34
|
-
error?: string;
|
|
35
|
-
}>;
|
|
36
|
-
/** Removes a member from an organization. */
|
|
37
|
-
export declare function removeOrganizationMember(event: any, input: {
|
|
38
|
-
organizationId: string;
|
|
39
|
-
memberId: string;
|
|
40
|
-
}): Promise<{
|
|
41
|
-
success: boolean;
|
|
42
|
-
}>;
|
|
43
|
-
/** Accepts an invitation token and adds user as a member. */
|
|
44
|
-
export declare function acceptOrganizationInvitation(event: any, token: string): Promise<{
|
|
45
|
-
success: boolean;
|
|
46
|
-
organizationId: string;
|
|
47
|
-
role: string;
|
|
48
|
-
}>;
|
|
49
|
-
/** Lists all members for a given organization (requires organization membership). */
|
|
50
|
-
export declare function listOrganizationMembers(event: any, organizationId: string): Promise<Array<QarpeoMember & {
|
|
51
|
-
email?: string;
|
|
52
|
-
name?: string;
|
|
53
|
-
avatarUrl?: string;
|
|
54
|
-
}>>;
|