nuxt-backend 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -6
- package/dist/capabilities/detect.js +16 -7
- package/dist/capabilities/gateway-route.js +24 -0
- package/dist/capabilities/registry.js +3 -2
- package/dist/capabilities/status.js +3 -1
- package/dist/chunks/catalog.mjs +1 -1
- package/dist/chunks/doctor.mjs +498 -67
- package/dist/chunks/email-previews.mjs +1 -1
- package/dist/chunks/health.mjs +2 -2
- package/dist/chunks/index.mjs +3 -3
- package/dist/chunks/install.mjs +4 -4
- package/dist/chunks/run.mjs +1 -1
- package/dist/chunks/server.mjs +8 -6
- package/dist/cli.mjs +394 -39
- package/dist/convex/access-tickets.d.ts +20 -1
- package/dist/convex/access-tickets.d.ts.map +1 -1
- package/dist/convex/access-tickets.js +28 -0
- package/dist/convex/access-tickets.js.map +1 -1
- package/dist/convex/account-data.d.ts +25 -3
- package/dist/convex/account-data.d.ts.map +1 -1
- package/dist/convex/account-data.js +26 -3
- package/dist/convex/account-data.js.map +1 -1
- package/dist/convex/app.d.ts +15 -2
- package/dist/convex/app.d.ts.map +1 -1
- package/dist/convex/app.js +16 -2
- package/dist/convex/app.js.map +1 -1
- package/dist/convex/billing-launch.d.ts +36 -0
- package/dist/convex/billing-launch.d.ts.map +1 -0
- package/dist/convex/billing-launch.js +18 -0
- package/dist/convex/billing-launch.js.map +1 -0
- package/dist/convex/catalog.d.ts +16 -2
- package/dist/convex/catalog.d.ts.map +1 -1
- package/dist/convex/catalog.js.map +1 -1
- package/dist/convex/client/code-binding.js +1 -1
- package/dist/convex/client/component.d.ts.map +1 -1
- package/dist/convex/client/guards.js +3 -3
- package/dist/convex/client/guards.js.map +1 -1
- package/dist/convex/client/index.d.ts +94 -40
- package/dist/convex/client/index.d.ts.map +1 -1
- package/dist/convex/client/index.js +4 -3
- package/dist/convex/client/index.js.map +1 -1
- package/dist/convex/client/plugins.d.ts +67 -30
- package/dist/convex/client/plugins.d.ts.map +1 -1
- package/dist/convex/client/plugins.js +43 -19
- package/dist/convex/client/plugins.js.map +1 -1
- package/dist/convex/components/backend/_generated/api.d.ts +2 -0
- package/dist/convex/components/backend/_generated/api.d.ts.map +1 -1
- package/dist/convex/components/backend/_generated/api.js.map +1 -1
- package/dist/convex/components/backend/_generated/component.d.ts +454 -4
- package/dist/convex/components/backend/_generated/component.d.ts.map +1 -1
- package/dist/convex/components/backend/access.d.ts +47 -6
- package/dist/convex/components/backend/access.d.ts.map +1 -1
- package/dist/convex/components/backend/access.js +108 -16
- package/dist/convex/components/backend/access.js.map +1 -1
- package/dist/convex/components/backend/account.d.ts +6 -0
- package/dist/convex/components/backend/account.d.ts.map +1 -1
- package/dist/convex/components/backend/account.js +49 -2
- package/dist/convex/components/backend/account.js.map +1 -1
- package/dist/convex/components/backend/adapter.d.ts +1 -1
- package/dist/convex/components/backend/adapter.d.ts.map +1 -1
- package/dist/convex/components/backend/adapter.js +1 -1
- package/dist/convex/components/backend/adapter.js.map +1 -1
- package/dist/convex/components/backend/billing.d.ts +22 -1
- package/dist/convex/components/backend/billing.d.ts.map +1 -1
- package/dist/convex/components/backend/billing.js +77 -12
- package/dist/convex/components/backend/billing.js.map +1 -1
- package/dist/convex/components/backend/costs.d.ts +1 -1
- package/dist/convex/components/backend/crons.d.ts.map +1 -1
- package/dist/convex/components/backend/crons.js +3 -0
- package/dist/convex/components/backend/crons.js.map +1 -1
- package/dist/convex/components/backend/funnel.d.ts +2 -2
- package/dist/convex/components/backend/gifts.d.ts +2 -2
- package/dist/convex/components/backend/gifts.js +2 -2
- package/dist/convex/components/backend/jobs.d.ts +53 -10
- package/dist/convex/components/backend/jobs.d.ts.map +1 -1
- package/dist/convex/components/backend/jobs.js +58 -13
- package/dist/convex/components/backend/jobs.js.map +1 -1
- package/dist/convex/components/backend/maintenance.d.ts +2 -2
- package/dist/convex/components/backend/maintenance.d.ts.map +1 -1
- package/dist/convex/components/backend/maintenance.js +11 -1
- package/dist/convex/components/backend/maintenance.js.map +1 -1
- package/dist/convex/components/backend/moderation.d.ts +94 -0
- package/dist/convex/components/backend/moderation.d.ts.map +1 -0
- package/dist/convex/components/backend/moderation.js +53 -0
- package/dist/convex/components/backend/moderation.js.map +1 -0
- package/dist/convex/components/backend/schema.d.ts +397 -24
- package/dist/convex/components/backend/schema.d.ts.map +1 -1
- package/dist/convex/components/backend/schema.js +108 -4
- package/dist/convex/components/backend/schema.js.map +1 -1
- package/dist/convex/components/backend/storage.d.ts +19 -0
- package/dist/convex/components/backend/storage.d.ts.map +1 -1
- package/dist/convex/components/backend/storage.js +57 -0
- package/dist/convex/components/backend/storage.js.map +1 -1
- package/dist/convex/components/backend/subscriptions.d.ts +1 -1
- package/dist/convex/components/backend/subscriptions.js +1 -1
- package/dist/convex/components/backend/subscriptions.js.map +1 -1
- package/dist/convex/constants.d.ts +19 -4
- package/dist/convex/constants.d.ts.map +1 -1
- package/dist/convex/constants.js +19 -4
- package/dist/convex/constants.js.map +1 -1
- package/dist/convex/email-templates.d.ts +56 -6
- package/dist/convex/email-templates.d.ts.map +1 -1
- package/dist/convex/email-templates.js +69 -14
- package/dist/convex/email-templates.js.map +1 -1
- package/dist/convex/emails/notification.d.ts +9 -0
- package/dist/convex/emails/notification.d.ts.map +1 -0
- package/dist/convex/emails/notification.js +21 -0
- package/dist/convex/emails/notification.js.map +1 -0
- package/dist/convex/errors.d.ts +8 -3
- package/dist/convex/errors.d.ts.map +1 -1
- package/dist/convex/errors.js +55 -7
- package/dist/convex/errors.js.map +1 -1
- package/dist/convex/events.d.ts +4 -4
- package/dist/convex/events.js +4 -4
- package/dist/convex/events.js.map +1 -1
- package/dist/convex/files.d.ts +30 -4
- package/dist/convex/files.d.ts.map +1 -1
- package/dist/convex/files.js +44 -6
- package/dist/convex/files.js.map +1 -1
- package/dist/convex/integrations/account.d.ts +7 -0
- package/dist/convex/integrations/account.d.ts.map +1 -1
- package/dist/convex/integrations/account.js +2 -0
- package/dist/convex/integrations/account.js.map +1 -1
- package/dist/convex/integrations/ai/chat.js +9 -9
- package/dist/convex/integrations/ai/chat.js.map +1 -1
- package/dist/convex/integrations/ai/config.d.ts +157 -37
- package/dist/convex/integrations/ai/config.d.ts.map +1 -1
- package/dist/convex/integrations/ai/context.d.ts +3 -0
- package/dist/convex/integrations/ai/context.d.ts.map +1 -1
- package/dist/convex/integrations/ai/context.js +4 -3
- package/dist/convex/integrations/ai/context.js.map +1 -1
- package/dist/convex/integrations/ai/costs.d.ts.map +1 -1
- package/dist/convex/integrations/ai/costs.js +49 -2
- package/dist/convex/integrations/ai/costs.js.map +1 -1
- package/dist/convex/integrations/ai/embeddings.d.ts +6 -6
- package/dist/convex/integrations/ai/embeddings.d.ts.map +1 -1
- package/dist/convex/integrations/ai/embeddings.js +17 -30
- package/dist/convex/integrations/ai/embeddings.js.map +1 -1
- package/dist/convex/integrations/ai/images.d.ts +25 -0
- package/dist/convex/integrations/ai/images.d.ts.map +1 -0
- package/dist/convex/integrations/ai/images.js +104 -0
- package/dist/convex/integrations/ai/images.js.map +1 -0
- package/dist/convex/integrations/ai/job-errors.d.ts +12 -0
- package/dist/convex/integrations/ai/job-errors.d.ts.map +1 -1
- package/dist/convex/integrations/ai/job-errors.js +18 -2
- package/dist/convex/integrations/ai/job-errors.js.map +1 -1
- package/dist/convex/integrations/ai/jobs.d.ts +176 -10
- package/dist/convex/integrations/ai/jobs.d.ts.map +1 -1
- package/dist/convex/integrations/ai/jobs.js +336 -70
- package/dist/convex/integrations/ai/jobs.js.map +1 -1
- package/dist/convex/integrations/ai/knowledge.d.ts.map +1 -1
- package/dist/convex/integrations/ai/knowledge.js +10 -11
- package/dist/convex/integrations/ai/knowledge.js.map +1 -1
- package/dist/convex/integrations/ai/metering.d.ts +15 -5
- package/dist/convex/integrations/ai/metering.d.ts.map +1 -1
- package/dist/convex/integrations/ai/metering.js +73 -26
- package/dist/convex/integrations/ai/metering.js.map +1 -1
- package/dist/convex/integrations/ai/model-id.d.ts +14 -1
- package/dist/convex/integrations/ai/model-id.d.ts.map +1 -1
- package/dist/convex/integrations/ai/model-id.js +24 -2
- package/dist/convex/integrations/ai/model-id.js.map +1 -1
- package/dist/convex/integrations/ai/models.d.ts +103 -20
- package/dist/convex/integrations/ai/models.d.ts.map +1 -1
- package/dist/convex/integrations/ai/models.js +220 -45
- package/dist/convex/integrations/ai/models.js.map +1 -1
- package/dist/convex/integrations/ai/moderation-providers.d.ts +136 -0
- package/dist/convex/integrations/ai/moderation-providers.d.ts.map +1 -0
- package/dist/convex/integrations/ai/moderation-providers.js +277 -0
- package/dist/convex/integrations/ai/moderation-providers.js.map +1 -0
- package/dist/convex/integrations/ai/moderation-taxonomy.d.ts +54 -0
- package/dist/convex/integrations/ai/moderation-taxonomy.d.ts.map +1 -0
- package/dist/convex/integrations/ai/moderation-taxonomy.js +141 -0
- package/dist/convex/integrations/ai/moderation-taxonomy.js.map +1 -0
- package/dist/convex/integrations/ai/moderation.d.ts +218 -19
- package/dist/convex/integrations/ai/moderation.d.ts.map +1 -1
- package/dist/convex/integrations/ai/moderation.js +359 -37
- package/dist/convex/integrations/ai/moderation.js.map +1 -1
- package/dist/convex/integrations/ai/provenance.d.ts +6 -0
- package/dist/convex/integrations/ai/provenance.d.ts.map +1 -1
- package/dist/convex/integrations/ai/provenance.js +4 -1
- package/dist/convex/integrations/ai/provenance.js.map +1 -1
- package/dist/convex/integrations/ai/setup.js +5 -5
- package/dist/convex/integrations/ai/setup.js.map +1 -1
- package/dist/convex/integrations/ai/stream.d.ts +1 -1
- package/dist/convex/integrations/ai/stream.d.ts.map +1 -1
- package/dist/convex/integrations/ai/stream.js +4 -2
- package/dist/convex/integrations/ai/stream.js.map +1 -1
- package/dist/convex/integrations/ai.d.ts +15 -8
- package/dist/convex/integrations/ai.d.ts.map +1 -1
- package/dist/convex/integrations/ai.js +4 -1
- package/dist/convex/integrations/ai.js.map +1 -1
- package/dist/convex/integrations/billing/checkout.d.ts +1 -1
- package/dist/convex/integrations/billing/checkout.d.ts.map +1 -1
- package/dist/convex/integrations/billing/checkout.js +4 -4
- package/dist/convex/integrations/billing/checkout.js.map +1 -1
- package/dist/convex/integrations/billing/context.d.ts +8 -0
- package/dist/convex/integrations/billing/context.d.ts.map +1 -1
- package/dist/convex/integrations/billing/context.js +20 -1
- package/dist/convex/integrations/billing/context.js.map +1 -1
- package/dist/convex/integrations/billing/credits.d.ts +6 -0
- package/dist/convex/integrations/billing/credits.d.ts.map +1 -1
- package/dist/convex/integrations/billing/credits.js +21 -6
- package/dist/convex/integrations/billing/credits.js.map +1 -1
- package/dist/convex/integrations/billing/features.d.ts.map +1 -1
- package/dist/convex/integrations/billing/free-plan.d.ts +41 -1
- package/dist/convex/integrations/billing/free-plan.d.ts.map +1 -1
- package/dist/convex/integrations/billing/free-plan.js +92 -29
- package/dist/convex/integrations/billing/free-plan.js.map +1 -1
- package/dist/convex/integrations/billing/functions.d.ts +7 -3
- package/dist/convex/integrations/billing/functions.d.ts.map +1 -1
- package/dist/convex/integrations/billing/functions.js +18 -8
- package/dist/convex/integrations/billing/functions.js.map +1 -1
- package/dist/convex/integrations/billing/gifts.d.ts +4 -0
- package/dist/convex/integrations/billing/gifts.d.ts.map +1 -1
- package/dist/convex/integrations/billing/gifts.js +37 -6
- package/dist/convex/integrations/billing/gifts.js.map +1 -1
- package/dist/convex/integrations/billing/history.d.ts.map +1 -1
- package/dist/convex/integrations/billing/lifecycle.d.ts +9 -3
- package/dist/convex/integrations/billing/lifecycle.d.ts.map +1 -1
- package/dist/convex/integrations/billing/lifecycle.js +15 -6
- package/dist/convex/integrations/billing/lifecycle.js.map +1 -1
- package/dist/convex/integrations/billing/passes.js +2 -2
- package/dist/convex/integrations/billing/pricing.d.ts +9 -2
- package/dist/convex/integrations/billing/pricing.d.ts.map +1 -1
- package/dist/convex/integrations/billing/pricing.js +38 -4
- package/dist/convex/integrations/billing/pricing.js.map +1 -1
- package/dist/convex/integrations/billing/quotas.d.ts.map +1 -1
- package/dist/convex/integrations/billing/rate-limit.d.ts +16 -0
- package/dist/convex/integrations/billing/rate-limit.d.ts.map +1 -0
- package/dist/convex/integrations/billing/rate-limit.js +45 -0
- package/dist/convex/integrations/billing/rate-limit.js.map +1 -0
- package/dist/convex/integrations/billing/referral-orders.d.ts +1 -1
- package/dist/convex/integrations/billing/referral-orders.js +1 -1
- package/dist/convex/integrations/billing/resync.d.ts +28 -0
- package/dist/convex/integrations/billing/resync.d.ts.map +1 -0
- package/dist/convex/integrations/billing/resync.js +139 -0
- package/dist/convex/integrations/billing/resync.js.map +1 -0
- package/dist/convex/integrations/billing/subscriptions.d.ts +1 -1
- package/dist/convex/integrations/billing/subscriptions.d.ts.map +1 -1
- package/dist/convex/integrations/billing/subscriptions.js +6 -2
- package/dist/convex/integrations/billing/subscriptions.js.map +1 -1
- package/dist/convex/integrations/billing/types/lifecycle.d.ts +1 -1
- package/dist/convex/integrations/billing/types/records.d.ts +68 -3
- package/dist/convex/integrations/billing/types/records.d.ts.map +1 -1
- package/dist/convex/integrations/billing/types/setup.d.ts +9 -4
- package/dist/convex/integrations/billing/types/setup.d.ts.map +1 -1
- package/dist/convex/integrations/billing/types/surface.d.ts +38 -5
- package/dist/convex/integrations/billing/types/surface.d.ts.map +1 -1
- package/dist/convex/integrations/billing/webhooks.js +2 -2
- package/dist/convex/integrations/billing/welcome.d.ts +16 -0
- package/dist/convex/integrations/billing/welcome.d.ts.map +1 -0
- package/dist/convex/integrations/billing/welcome.js +93 -0
- package/dist/convex/integrations/billing/welcome.js.map +1 -0
- package/dist/convex/integrations/billing.d.ts +3 -2
- package/dist/convex/integrations/billing.d.ts.map +1 -1
- package/dist/convex/integrations/billing.js +17 -5
- package/dist/convex/integrations/billing.js.map +1 -1
- package/dist/convex/integrations/email.d.ts +17 -3
- package/dist/convex/integrations/email.d.ts.map +1 -1
- package/dist/convex/integrations/email.js.map +1 -1
- package/dist/convex/integrations/functions.d.ts +2 -2
- package/dist/convex/integrations/functions.d.ts.map +1 -1
- package/dist/convex/integrations/functions.js +1 -1
- package/dist/convex/integrations/functions.js.map +1 -1
- package/dist/convex/integrations/launch.d.ts +108 -3
- package/dist/convex/integrations/launch.d.ts.map +1 -1
- package/dist/convex/integrations/launch.js +143 -22
- package/dist/convex/integrations/launch.js.map +1 -1
- package/dist/convex/integrations/notifications.d.ts +6 -2
- package/dist/convex/integrations/notifications.d.ts.map +1 -1
- package/dist/convex/integrations/notifications.js +13 -15
- package/dist/convex/integrations/notifications.js.map +1 -1
- package/dist/convex/integrations/rate-limit.d.ts +18 -0
- package/dist/convex/integrations/rate-limit.d.ts.map +1 -1
- package/dist/convex/integrations/rate-limit.js +18 -3
- package/dist/convex/integrations/rate-limit.js.map +1 -1
- package/dist/convex/integrations/reports.d.ts +4 -1
- package/dist/convex/integrations/reports.d.ts.map +1 -1
- package/dist/convex/integrations/reports.js +14 -3
- package/dist/convex/integrations/reports.js.map +1 -1
- package/dist/convex/integrations/retention.d.ts +42 -4
- package/dist/convex/integrations/retention.d.ts.map +1 -1
- package/dist/convex/integrations/retention.js +62 -4
- package/dist/convex/integrations/retention.js.map +1 -1
- package/dist/convex/integrations/storage.d.ts +71 -3
- package/dist/convex/integrations/storage.d.ts.map +1 -1
- package/dist/convex/integrations/storage.js +22 -4
- package/dist/convex/integrations/storage.js.map +1 -1
- package/dist/convex/label-format.d.ts +2 -2
- package/dist/convex/label-format.d.ts.map +1 -1
- package/dist/convex/label-format.js +2 -2
- package/dist/convex/label-format.js.map +1 -1
- package/dist/convex/label-groups/admin.d.ts +27 -0
- package/dist/convex/label-groups/admin.d.ts.map +1 -1
- package/dist/convex/label-groups/admin.js +28 -0
- package/dist/convex/label-groups/admin.js.map +1 -1
- package/dist/convex/label-groups/cancelFlow.d.ts +1 -1
- package/dist/convex/label-groups/cancelFlow.js +2 -2
- package/dist/convex/label-groups/cancelFlow.js.map +1 -1
- package/dist/convex/label-groups/email.d.ts.map +1 -1
- package/dist/convex/label-groups/email.js +2 -1
- package/dist/convex/label-groups/email.js.map +1 -1
- package/dist/convex/label-groups/errors.d.ts +4 -0
- package/dist/convex/label-groups/errors.d.ts.map +1 -1
- package/dist/convex/label-groups/errors.js +6 -1
- package/dist/convex/label-groups/errors.js.map +1 -1
- package/dist/convex/label-groups/gift.d.ts +2 -0
- package/dist/convex/label-groups/gift.d.ts.map +1 -1
- package/dist/convex/label-groups/gift.js +5 -2
- package/dist/convex/label-groups/gift.js.map +1 -1
- package/dist/convex/label-groups/legal.d.ts +27 -1
- package/dist/convex/label-groups/legal.d.ts.map +1 -1
- package/dist/convex/label-groups/legal.js +31 -0
- package/dist/convex/label-groups/legal.js.map +1 -1
- package/dist/convex/label-groups/notifications.d.ts +3 -1
- package/dist/convex/label-groups/notifications.d.ts.map +1 -1
- package/dist/convex/label-groups/notifications.js +5 -3
- package/dist/convex/label-groups/notifications.js.map +1 -1
- package/dist/convex/label-groups/pastDue.d.ts +1 -1
- package/dist/convex/label-groups/pastDue.d.ts.map +1 -1
- package/dist/convex/label-groups/pastDue.js +1 -1
- package/dist/convex/label-groups/pastDue.js.map +1 -1
- package/dist/convex/label-groups/pricing.d.ts +2 -0
- package/dist/convex/label-groups/pricing.d.ts.map +1 -1
- package/dist/convex/label-groups/pricing.js +4 -0
- package/dist/convex/label-groups/pricing.js.map +1 -1
- package/dist/convex/label-groups/referral.d.ts +2 -2
- package/dist/convex/label-groups/referral.js +2 -2
- package/dist/convex/label-groups/report.d.ts +8 -1
- package/dist/convex/label-groups/report.d.ts.map +1 -1
- package/dist/convex/label-groups/report.js +10 -1
- package/dist/convex/label-groups/report.js.map +1 -1
- package/dist/convex/label-groups/upload.d.ts +1 -0
- package/dist/convex/label-groups/upload.d.ts.map +1 -1
- package/dist/convex/label-groups/upload.js +2 -0
- package/dist/convex/label-groups/upload.js.map +1 -1
- package/dist/convex/label-groups/withdrawal.d.ts +1 -1
- package/dist/convex/label-groups/withdrawal.js +1 -1
- package/dist/convex/label-translations.d.ts.map +1 -1
- package/dist/convex/label-translations.js +94 -34
- package/dist/convex/label-translations.js.map +1 -1
- package/dist/convex/labels.d.ts +100 -1
- package/dist/convex/labels.d.ts.map +1 -1
- package/dist/convex/legal.d.ts +12 -2
- package/dist/convex/legal.d.ts.map +1 -1
- package/dist/convex/legal.js +2 -2
- package/dist/convex/legal.js.map +1 -1
- package/dist/convex/log.js +12 -1
- package/dist/convex/log.js.map +1 -1
- package/dist/convex/monitoring.d.ts +6 -4
- package/dist/convex/monitoring.d.ts.map +1 -1
- package/dist/convex/monitoring.js +6 -4
- package/dist/convex/monitoring.js.map +1 -1
- package/dist/convex/report-rules.d.ts +2 -0
- package/dist/convex/report-rules.d.ts.map +1 -1
- package/dist/convex/report-rules.js +2 -0
- package/dist/convex/report-rules.js.map +1 -1
- package/dist/convex/sensitive-actions.d.ts.map +1 -1
- package/dist/convex/sensitive-actions.js +1 -0
- package/dist/convex/sensitive-actions.js.map +1 -1
- package/dist/convex/test-models.d.ts +7 -0
- package/dist/convex/test-models.d.ts.map +1 -1
- package/dist/convex/test-models.js +25 -2
- package/dist/convex/test-models.js.map +1 -1
- package/dist/convex/test-moderation.d.ts +24 -0
- package/dist/convex/test-moderation.d.ts.map +1 -0
- package/dist/convex/test-moderation.js +114 -0
- package/dist/convex/test-moderation.js.map +1 -0
- package/dist/devtools-client/_nuxt/CiCAOwUc.js +5 -0
- package/dist/devtools-client/index.html +1 -1
- package/dist/env-registry.js +37 -5
- package/dist/module.d.ts +51 -1
- package/dist/module.js +2 -2
- package/dist/module.json +1 -1
- package/dist/runtime/config.d.ts +95 -14
- package/dist/runtime/config.js +13 -1
- package/dist/runtime/locales/de.json +95 -19
- package/dist/runtime/locales/en.json +93 -17
- package/dist/runtime/locales/es.json +93 -17
- package/dist/runtime/locales/fr.json +93 -17
- package/dist/runtime/locales/ru.json +93 -17
- package/dist/runtime/monitoring/sdk/sentry.client.config.js +2 -1
- package/dist/runtime/monitoring/sdk/sentry.server.config.js +6 -1
- package/dist/runtime/server/content-wasm.d.ts +13 -0
- package/dist/runtime/server/content-wasm.js +9 -0
- package/dist/runtime/server/csp.d.ts +17 -0
- package/dist/runtime/server/csp.js +18 -0
- package/dist/runtime/server/monitoring/csp.d.ts +12 -0
- package/dist/runtime/server/monitoring/csp.js +19 -0
- package/dist/runtime/server/protection/csp.d.ts +1 -7
- package/dist/runtime/server/protection/csp.js +4 -17
- package/dist/runtime/test-utils/aliases.d.ts +6 -4
- package/dist/runtime/test-utils/aliases.js +3 -9
- package/dist/runtime/test-utils/base-modules.d.ts +9 -13
- package/dist/runtime/test-utils/install.js +4 -2
- package/dist/runtime/vue/a11y.js +1 -1
- package/dist/runtime/vue/auth-client.d.ts +8 -5
- package/dist/runtime/vue/components/account/AccountData.vue +2 -0
- package/dist/runtime/vue/components/account/AccountDeletion.css +1 -1
- package/dist/runtime/vue/components/account/ActivationChecklist.css +1 -1
- package/dist/runtime/vue/components/account/ActivationChecklist.vue +1 -0
- package/dist/runtime/vue/components/account/ConsentPrompt.css +1 -1
- package/dist/runtime/vue/components/account/ConsentPromptDialog.vue +1 -0
- package/dist/runtime/vue/components/account/ConsentPromptStorage.vue +1 -0
- package/dist/runtime/vue/components/account/EmailUnsubscribe.css +1 -1
- package/dist/runtime/vue/components/account/EmailUnsubscribe.vue +2 -2
- package/dist/runtime/vue/components/account/HowDidYouHear.css +1 -1
- package/dist/runtime/vue/components/account/HowDidYouHear.vue +1 -0
- package/dist/runtime/vue/components/account/KeepAccount.css +1 -1
- package/dist/runtime/vue/components/account/OnboardingFlow.css +1 -1
- package/dist/runtime/vue/components/account/OnboardingFlow.vue +1 -0
- package/dist/runtime/vue/components/account/ProfileIdentity.css +1 -1
- package/dist/runtime/vue/components/account/ProfilePreferencesSection.css +1 -1
- package/dist/runtime/vue/components/account/ProfilePreferencesSection.vue +3 -1
- package/dist/runtime/vue/components/account/ProfileSettings.css +1 -1
- package/dist/runtime/vue/components/account/ProfileSettings.vue +1 -0
- package/dist/runtime/vue/components/account/SecurityAlerts.css +1 -1
- package/dist/runtime/vue/components/account/SecurityAlerts.vue +2 -1
- package/dist/runtime/vue/components/account/SecurityPasskeys.css +1 -1
- package/dist/runtime/vue/components/account/SecuritySettings.css +1 -1
- package/dist/runtime/vue/components/account/SecuritySettings.vue +1 -0
- package/dist/runtime/vue/components/account/security-alerts.d.ts +7 -0
- package/dist/runtime/vue/components/account/security-alerts.js +6 -2
- package/dist/runtime/vue/components/admin/AdminAccess.css +1 -1
- package/dist/runtime/vue/components/admin/AdminAccess.vue +2 -0
- package/dist/runtime/vue/components/admin/AdminAccessMemberTickets.d.vue.ts +7 -0
- package/dist/runtime/vue/components/admin/AdminAccessMemberTickets.vue +42 -0
- package/dist/runtime/vue/components/admin/AdminAccessMemberTickets.vue.d.ts +7 -0
- package/dist/runtime/vue/components/admin/AdminAnnouncements.css +1 -1
- package/dist/runtime/vue/components/admin/AdminBilling.css +1 -1
- package/dist/runtime/vue/components/admin/AdminChart.css +1 -1
- package/dist/runtime/vue/components/admin/AdminConsole.css +1 -1
- package/dist/runtime/vue/components/admin/AdminExperiments.css +1 -1
- package/dist/runtime/vue/components/admin/AdminFlags.css +1 -1
- package/dist/runtime/vue/components/admin/AdminModeration.d.vue.ts +3 -0
- package/dist/runtime/vue/components/admin/AdminModeration.vue +135 -0
- package/dist/runtime/vue/components/admin/AdminModeration.vue.d.ts +3 -0
- package/dist/runtime/vue/components/admin/AdminQueue.css +1 -1
- package/dist/runtime/vue/components/admin/AdminReferrals.css +1 -1
- package/dist/runtime/vue/components/admin/AdminReports.css +1 -1
- package/dist/runtime/vue/components/admin/AdminRevenue.css +1 -1
- package/dist/runtime/vue/components/admin/AdminUsers.d.vue.ts +27 -0
- package/dist/runtime/vue/components/admin/AdminUsers.vue +1 -0
- package/dist/runtime/vue/components/admin/AdminUsers.vue.d.ts +27 -0
- package/dist/runtime/vue/components/admin/AdminWorkspaces.d.vue.ts +27 -0
- package/dist/runtime/vue/components/admin/AdminWorkspaces.vue +1 -0
- package/dist/runtime/vue/components/admin/AdminWorkspaces.vue.d.ts +27 -0
- package/dist/runtime/vue/components/admin/admin-moderation-tab.d.ts +1 -0
- package/dist/runtime/vue/components/admin/admin-moderation-tab.js +34 -0
- package/dist/runtime/vue/components/admin/admin-tabs.js +2 -0
- package/dist/runtime/vue/components/admin/admin.css +1 -1
- package/dist/runtime/vue/components/auth/AuthForm.css +1 -1
- package/dist/runtime/vue/components/auth/AuthForm.vue +3 -2
- package/dist/runtime/vue/components/auth/AuthFormChoose.css +1 -1
- package/dist/runtime/vue/components/auth/AuthFormPasskeyOffer.css +1 -1
- package/dist/runtime/vue/components/auth/InviteRedeem.css +1 -1
- package/dist/runtime/vue/components/auth/ReauthenticateCode.css +1 -1
- package/dist/runtime/vue/components/auth/ReauthenticateDialog.css +1 -1
- package/dist/runtime/vue/components/auth/ReauthenticateDialog.vue +3 -2
- package/dist/runtime/vue/components/auth/WaitlistForm.css +1 -1
- package/dist/runtime/vue/components/auth/WaitlistForm.vue +1 -0
- package/dist/runtime/vue/components/auth/WaitlistPlace.css +1 -1
- package/dist/runtime/vue/components/auth/WaitlistShare.css +1 -1
- package/dist/runtime/vue/components/billing/BillingCheckoutLink.vue +2 -0
- package/dist/runtime/vue/components/billing/BillingHistory.css +1 -1
- package/dist/runtime/vue/components/billing/BillingHistory.vue +1 -0
- package/dist/runtime/vue/components/billing/BillingPortalLink.vue +1 -0
- package/dist/runtime/vue/components/billing/CancelFlow.css +1 -1
- package/dist/runtime/vue/components/billing/CancelFlow.vue +1 -0
- package/dist/runtime/vue/components/billing/CancelFlowEnd.vue +3 -1
- package/dist/runtime/vue/components/billing/GiftList.css +1 -1
- package/dist/runtime/vue/components/billing/PricingPackCard.css +1 -1
- package/dist/runtime/vue/components/billing/PricingPlanCard.css +1 -1
- package/dist/runtime/vue/components/billing/PricingPlanCard.vue +8 -1
- package/dist/runtime/vue/components/billing/PricingTable.css +1 -1
- package/dist/runtime/vue/components/billing/PricingTable.d.vue.ts +2 -0
- package/dist/runtime/vue/components/billing/PricingTable.vue +22 -3
- package/dist/runtime/vue/components/billing/PricingTable.vue.d.ts +2 -0
- package/dist/runtime/vue/components/billing/ReferralCard.css +1 -1
- package/dist/runtime/vue/components/billing/ReferralCard.vue +1 -0
- package/dist/runtime/vue/components/billing/ReferralLanding.css +1 -1
- package/dist/runtime/vue/components/billing/UpgradePrompt.css +1 -1
- package/dist/runtime/vue/components/billing/UpgradePrompt.vue +1 -0
- package/dist/runtime/vue/components/billing/UsageHistory.css +1 -1
- package/dist/runtime/vue/components/billing/UsageHistory.vue +1 -0
- package/dist/runtime/vue/components/billing/WithdrawalButton.css +1 -1
- package/dist/runtime/vue/components/billing/WithdrawalButton.vue +1 -0
- package/dist/runtime/vue/components/billing/pricing-table.d.ts +6 -0
- package/dist/runtime/vue/components/billing/withdrawal-button.d.ts +1 -1
- package/dist/runtime/vue/components/shared.css +1 -1
- package/dist/runtime/vue/components/shell/AccessDenied.css +1 -1
- package/dist/runtime/vue/components/shell/AccessDenied.vue +1 -0
- package/dist/runtime/vue/components/shell/AccountMenu.vue +1 -0
- package/dist/runtime/vue/components/shell/AiLabel.css +1 -1
- package/dist/runtime/vue/components/shell/AiLabel.vue +4 -1
- package/dist/runtime/vue/components/shell/AppShell.css +1 -1
- package/dist/runtime/vue/components/shell/AppShell.vue +3 -0
- package/dist/runtime/vue/components/shell/BackendNotices.vue +1 -0
- package/dist/runtime/vue/components/shell/ConfirmDialog.css +1 -1
- package/dist/runtime/vue/components/shell/ConnectionStatus.css +1 -1
- package/dist/runtime/vue/components/shell/ConnectionStatus.vue +1 -0
- package/dist/runtime/vue/components/shell/ContactForm.css +1 -1
- package/dist/runtime/vue/components/shell/ContactForm.vue +1 -0
- package/dist/runtime/vue/components/shell/FrameMain.vue +2 -0
- package/dist/runtime/vue/components/shell/Gate.css +1 -1
- package/dist/runtime/vue/components/shell/Gate.vue +2 -0
- package/dist/runtime/vue/components/shell/GateQuota.vue +1 -0
- package/dist/runtime/vue/components/shell/LegalCompany.d.vue.ts +3 -0
- package/dist/runtime/vue/components/shell/LegalCompany.vue +23 -0
- package/dist/runtime/vue/components/shell/LegalCompany.vue.d.ts +3 -0
- package/dist/runtime/vue/components/shell/LegalContactPoints.d.vue.ts +10 -0
- package/dist/runtime/vue/components/shell/LegalContactPoints.vue +51 -0
- package/dist/runtime/vue/components/shell/LegalContactPoints.vue.d.ts +10 -0
- package/dist/runtime/vue/components/shell/LegalDetail.d.vue.ts +11 -0
- package/dist/runtime/vue/components/shell/LegalDetail.vue +30 -0
- package/dist/runtime/vue/components/shell/LegalDetail.vue.d.ts +11 -0
- package/dist/runtime/vue/components/shell/LegalDocument.css +1 -1
- package/dist/runtime/vue/components/shell/LegalDocument.vue +49 -13
- package/dist/runtime/vue/components/shell/LegalModeration.d.vue.ts +8 -0
- package/dist/runtime/vue/components/shell/LegalModeration.vue +72 -0
- package/dist/runtime/vue/components/shell/LegalModeration.vue.d.ts +8 -0
- package/dist/runtime/vue/components/shell/LegalProcessors.d.vue.ts +3 -2
- package/dist/runtime/vue/components/shell/LegalProcessors.vue +46 -15
- package/dist/runtime/vue/components/shell/LegalProcessors.vue.d.ts +3 -2
- package/dist/runtime/vue/components/shell/LegalStorage.d.vue.ts +3 -2
- package/dist/runtime/vue/components/shell/LegalStorage.vue +49 -16
- package/dist/runtime/vue/components/shell/LegalStorage.vue.d.ts +3 -2
- package/dist/runtime/vue/components/shell/LegalVersion.d.vue.ts +10 -0
- package/dist/runtime/vue/components/shell/LegalVersion.vue +24 -0
- package/dist/runtime/vue/components/shell/LegalVersion.vue.d.ts +10 -0
- package/dist/runtime/vue/components/shell/NoticeAnnouncement.css +1 -1
- package/dist/runtime/vue/components/shell/NoticeDeletion.css +1 -1
- package/dist/runtime/vue/components/shell/NoticeGift.css +1 -1
- package/dist/runtime/vue/components/shell/NoticeGift.vue +7 -4
- package/dist/runtime/vue/components/shell/NoticeImpersonation.css +1 -1
- package/dist/runtime/vue/components/shell/NoticeLowCredits.css +1 -1
- package/dist/runtime/vue/components/shell/NoticeMaintenance.css +1 -1
- package/dist/runtime/vue/components/shell/NoticePastDue.css +1 -1
- package/dist/runtime/vue/components/shell/NotificationInbox.css +1 -1
- package/dist/runtime/vue/components/shell/NotificationInbox.vue +1 -0
- package/dist/runtime/vue/components/shell/ReportNotice.css +1 -1
- package/dist/runtime/vue/components/shell/UploadField.css +1 -1
- package/dist/runtime/vue/components/shell/UploadField.d.vue.ts +2 -0
- package/dist/runtime/vue/components/shell/UploadField.vue +16 -3
- package/dist/runtime/vue/components/shell/UploadField.vue.d.ts +2 -0
- package/dist/runtime/vue/components/shell/WorkspaceSwitcher.css +1 -1
- package/dist/runtime/vue/components/shell/WorkspaceSwitcher.vue +1 -0
- package/dist/runtime/vue/components/shell/legal.d.ts +35 -4
- package/dist/runtime/vue/components/shell/legal.js +126 -13
- package/dist/runtime/vue/components/shell/upload-field.d.ts +3 -1
- package/dist/runtime/vue/components/tokens.css +1 -1
- package/dist/runtime/vue/components/workspaces/AcceptInvitation.vue +1 -0
- package/dist/runtime/vue/components/workspaces/AuditLog.css +1 -1
- package/dist/runtime/vue/components/workspaces/AuditLog.vue +1 -0
- package/dist/runtime/vue/components/workspaces/WorkspaceBilling.css +1 -1
- package/dist/runtime/vue/components/workspaces/WorkspaceCredits.css +1 -1
- package/dist/runtime/vue/components/workspaces/WorkspaceList.css +1 -1
- package/dist/runtime/vue/components/workspaces/WorkspaceSettings.d.vue.ts +2 -2
- package/dist/runtime/vue/components/workspaces/WorkspaceSettings.vue +1 -0
- package/dist/runtime/vue/components/workspaces/WorkspaceSettings.vue.d.ts +2 -2
- package/dist/runtime/vue/composables/use-access.d.ts +51 -6
- package/dist/runtime/vue/composables/use-access.js +36 -0
- package/dist/runtime/vue/composables/use-billing.d.ts +6 -5
- package/dist/runtime/vue/composables/use-email-link.d.ts +55 -4
- package/dist/runtime/vue/composables/use-email-link.js +9 -9
- package/dist/runtime/vue/composables/use-gift-list.js +3 -1
- package/dist/runtime/vue/composables/use-labels.js +13 -8
- package/dist/runtime/vue/composables/use-login-flow.js +1 -1
- package/dist/runtime/vue/composables/use-notifications.js +3 -0
- package/dist/runtime/vue/composables/use-passkeys.js +2 -2
- package/dist/runtime/vue/composables/use-pricing.d.ts +15 -0
- package/dist/runtime/vue/composables/use-pricing.js +4 -0
- package/dist/runtime/vue/composables/use-referral-invite.d.ts +33 -4
- package/dist/runtime/vue/composables/use-referral-invite.js +20 -9
- package/dist/runtime/vue/composables/use-report-form.d.ts +178 -0
- package/dist/runtime/vue/composables/use-report-form.js +278 -0
- package/dist/runtime/vue/composables/use-sign-in-alerts.d.ts +85 -0
- package/dist/runtime/vue/composables/use-sign-in-alerts.js +70 -0
- package/dist/runtime/vue/composables/use-upload-field.d.ts +32 -6
- package/dist/runtime/vue/composables/use-upload-field.js +75 -36
- package/dist/runtime/vue/composables/use-waitlist.d.ts +8 -1
- package/dist/runtime/vue/composables/use-waitlist.js +14 -1
- package/dist/runtime/vue/pages/gifts.vue +9 -0
- package/dist/runtime/vue/passkey-ceremony.d.ts +42 -0
- package/dist/runtime/vue/passkey-ceremony.js +37 -0
- package/dist/runtime/vue/passkey-client.d.ts +11 -49
- package/dist/runtime/vue/passkey-client.js +2 -34
- package/dist/runtime/vue/plugins/checkout-return.d.ts +5 -4
- package/dist/runtime/vue/plugins/checkout-return.js +1 -1
- package/dist/runtime/vue/plugins/passkey-ceremony.d.ts +3 -1
- package/dist/runtime/vue/plugins/passkey-ceremony.js +1 -1
- package/dist/runtime/vue/protection/state.d.ts +6 -0
- package/dist/runtime/vue/utils/auth-session.js +1 -1
- package/dist/runtime/vue/utils/billing-access.d.ts +1 -1
- package/dist/runtime/vue/utils/checkout-return.d.ts +5 -4
- package/dist/runtime/vue/utils/checkout-return.js +3 -3
- package/dist/runtime/vue/utils/login-bindings.js +1 -1
- package/dist/runtime/vue/utils/page-guard.js +6 -5
- package/dist/runtime/vue/utils/passkey-prompt.d.ts +12 -0
- package/dist/runtime/vue/utils/passkey-prompt.js +8 -0
- package/dist/runtime/vue/utils/renamed-component.js +1 -1
- package/dist/shared/{nuxt-backend.KEzfHO2K.mjs → nuxt-backend.Bq_mhlky.mjs} +578 -60
- package/dist/shared/{nuxt-backend.DXEf0rrv.mjs → nuxt-backend.D9qXcOOI.mjs} +1 -1
- package/dist/shared/{nuxt-backend.ikObmtHs.mjs → nuxt-backend.DmZI-QSO.mjs} +2 -2
- package/dist/shared/{nuxt-backend.Dm1NkY7v.mjs → nuxt-backend.G4JryO1q.mjs} +144 -32
- package/dist/shared/{nuxt-backend.2m535CLS.mjs → nuxt-backend.Lk2MQI2u.mjs} +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +13 -13
- package/skills/nuxt-backend/SKILL.md +3 -3
- package/skills/nuxt-backend/references/api.md +95 -25
- package/skills/nuxt-backend/references/renames.json +114 -2054
- package/skills/nuxt-backend/references/surface.json +112 -3
- package/skills/nuxt-backend-ai/SKILL.md +13 -6
- package/skills/nuxt-backend-ai/references/api.md +21 -3
- package/skills/nuxt-backend-auth/references/api.md +20 -3
- package/skills/nuxt-backend-billing/references/api.md +20 -5
- package/skills/nuxt-backend-data/SKILL.md +3 -3
- package/skills/nuxt-backend-data/references/api.md +4 -3
- package/skills/nuxt-backend-email/references/api.md +2 -1
- package/skills/nuxt-backend-growth/references/api.md +1 -0
- package/skills/nuxt-backend-ship/SKILL.md +14 -22
- package/skills/nuxt-backend-ship/references/api.md +25 -2
- package/skills/nuxt-backend-ship/references/operate.md +28 -0
- package/skills/nuxt-backend-ui/SKILL.md +6 -2
- package/skills/nuxt-backend-upgrade/SKILL.md +16 -11
- package/skills/nuxt-backend-upgrade/references/api.md +2 -2
- package/skills/nuxt-backend-upgrade/references/upgrade.md +37 -438
- package/src/convex/access-tickets.ts +30 -1
- package/src/convex/account-data.ts +26 -3
- package/src/convex/app.ts +16 -2
- package/src/convex/billing-launch.ts +42 -0
- package/src/convex/catalog.ts +16 -2
- package/src/convex/client/code-binding.ts +1 -1
- package/src/convex/client/guards.ts +3 -3
- package/src/convex/client/index.ts +4 -3
- package/src/convex/client/plugins.ts +43 -19
- package/src/convex/components/backend/_generated/api.ts +2 -0
- package/src/convex/components/backend/_generated/component.ts +1255 -242
- package/src/convex/components/backend/access.ts +109 -16
- package/src/convex/components/backend/account.ts +48 -2
- package/src/convex/components/backend/adapter.ts +4 -0
- package/src/convex/components/backend/billing.ts +75 -12
- package/src/convex/components/backend/crons.ts +4 -0
- package/src/convex/components/backend/gifts.ts +2 -2
- package/src/convex/components/backend/jobs.ts +58 -13
- package/src/convex/components/backend/maintenance.ts +14 -1
- package/src/convex/components/backend/moderation.ts +57 -0
- package/src/convex/components/backend/schema.ts +110 -4
- package/src/convex/components/backend/storage.ts +56 -0
- package/src/convex/components/backend/subscriptions.ts +1 -1
- package/src/convex/constants.ts +20 -4
- package/src/convex/email-templates.ts +124 -21
- package/src/convex/emails/notification.ts +22 -0
- package/src/convex/errors.ts +64 -8
- package/src/convex/events.ts +4 -4
- package/src/convex/files.ts +48 -6
- package/src/convex/integrations/account.ts +4 -0
- package/src/convex/integrations/ai/chat.ts +9 -9
- package/src/convex/integrations/ai/config.ts +147 -37
- package/src/convex/integrations/ai/context.ts +7 -4
- package/src/convex/integrations/ai/costs.ts +45 -2
- package/src/convex/integrations/ai/embeddings.ts +24 -39
- package/src/convex/integrations/ai/images.ts +141 -0
- package/src/convex/integrations/ai/job-errors.ts +19 -2
- package/src/convex/integrations/ai/jobs.ts +466 -72
- package/src/convex/integrations/ai/knowledge.ts +9 -10
- package/src/convex/integrations/ai/metering.ts +83 -28
- package/src/convex/integrations/ai/model-id.ts +24 -2
- package/src/convex/integrations/ai/models.ts +273 -58
- package/src/convex/integrations/ai/moderation-providers.ts +373 -0
- package/src/convex/integrations/ai/moderation-taxonomy.ts +174 -0
- package/src/convex/integrations/ai/moderation.ts +530 -47
- package/src/convex/integrations/ai/provenance.ts +10 -1
- package/src/convex/integrations/ai/setup.ts +5 -5
- package/src/convex/integrations/ai/stream.ts +4 -3
- package/src/convex/integrations/ai.ts +19 -6
- package/src/convex/integrations/billing/checkout.ts +4 -4
- package/src/convex/integrations/billing/context.ts +34 -2
- package/src/convex/integrations/billing/credits.ts +23 -6
- package/src/convex/integrations/billing/free-plan.ts +120 -24
- package/src/convex/integrations/billing/functions.ts +20 -8
- package/src/convex/integrations/billing/gifts.ts +34 -6
- package/src/convex/integrations/billing/lifecycle.ts +14 -6
- package/src/convex/integrations/billing/passes.ts +2 -2
- package/src/convex/integrations/billing/pricing.ts +43 -5
- package/src/convex/integrations/billing/rate-limit.ts +46 -0
- package/src/convex/integrations/billing/referral-orders.ts +1 -1
- package/src/convex/integrations/billing/resync.ts +187 -0
- package/src/convex/integrations/billing/rewards.ts +1 -1
- package/src/convex/integrations/billing/subscriptions.ts +4 -2
- package/src/convex/integrations/billing/types/lifecycle.ts +1 -1
- package/src/convex/integrations/billing/types/records.ts +67 -3
- package/src/convex/integrations/billing/types/setup.ts +6 -5
- package/src/convex/integrations/billing/types/surface.ts +38 -5
- package/src/convex/integrations/billing/webhooks.ts +2 -2
- package/src/convex/integrations/billing/welcome.ts +103 -0
- package/src/convex/integrations/billing.ts +20 -5
- package/src/convex/integrations/email.ts +17 -2
- package/src/convex/integrations/functions.ts +2 -2
- package/src/convex/integrations/launch.ts +247 -28
- package/src/convex/integrations/notifications.ts +16 -17
- package/src/convex/integrations/rate-limit.ts +18 -3
- package/src/convex/integrations/reports.ts +18 -5
- package/src/convex/integrations/retention.ts +73 -5
- package/src/convex/integrations/storage.ts +91 -6
- package/src/convex/label-format.ts +2 -2
- package/src/convex/label-groups/admin.ts +28 -0
- package/src/convex/label-groups/cancelFlow.ts +2 -2
- package/src/convex/label-groups/email.ts +2 -1
- package/src/convex/label-groups/errors.ts +6 -1
- package/src/convex/label-groups/gift.ts +5 -2
- package/src/convex/label-groups/legal.ts +31 -0
- package/src/convex/label-groups/notifications.ts +5 -3
- package/src/convex/label-groups/pastDue.ts +1 -1
- package/src/convex/label-groups/pricing.ts +4 -0
- package/src/convex/label-groups/referral.ts +2 -2
- package/src/convex/label-groups/report.ts +10 -1
- package/src/convex/label-groups/upload.ts +2 -0
- package/src/convex/label-groups/withdrawal.ts +1 -1
- package/src/convex/label-translations.ts +94 -34
- package/src/convex/labels.ts +25 -0
- package/src/convex/legal.ts +12 -2
- package/src/convex/log.ts +12 -1
- package/src/convex/monitoring.ts +6 -4
- package/src/convex/report-rules.ts +3 -0
- package/src/convex/sensitive-actions.ts +1 -0
- package/src/convex/test-models.ts +26 -2
- package/src/convex/test-moderation.ts +122 -0
- package/src/convex/test.ts +405 -8
- package/src/runtime/vue/components/account/AccountData.vue +2 -0
- package/src/runtime/vue/components/account/AccountDeletion.css +2 -1
- package/src/runtime/vue/components/account/ActivationChecklist.css +5 -2
- package/src/runtime/vue/components/account/ActivationChecklist.vue +1 -0
- package/src/runtime/vue/components/account/ConsentPrompt.css +8 -5
- package/src/runtime/vue/components/account/ConsentPromptDialog.vue +1 -0
- package/src/runtime/vue/components/account/ConsentPromptStorage.vue +1 -0
- package/src/runtime/vue/components/account/EmailUnsubscribe.css +6 -2
- package/src/runtime/vue/components/account/EmailUnsubscribe.vue +2 -2
- package/src/runtime/vue/components/account/HowDidYouHear.css +8 -3
- package/src/runtime/vue/components/account/HowDidYouHear.vue +1 -0
- package/src/runtime/vue/components/account/KeepAccount.css +3 -1
- package/src/runtime/vue/components/account/OnboardingFlow.css +6 -3
- package/src/runtime/vue/components/account/OnboardingFlow.vue +1 -0
- package/src/runtime/vue/components/account/ProfileIdentity.css +1 -1
- package/src/runtime/vue/components/account/ProfilePreferencesSection.css +3 -1
- package/src/runtime/vue/components/account/ProfilePreferencesSection.vue +4 -2
- package/src/runtime/vue/components/account/ProfileSettings.css +3 -1
- package/src/runtime/vue/components/account/ProfileSettings.vue +1 -0
- package/src/runtime/vue/components/account/SecurityAlerts.css +2 -1
- package/src/runtime/vue/components/account/SecurityAlerts.vue +2 -2
- package/src/runtime/vue/components/account/SecurityPasskeys.css +5 -3
- package/src/runtime/vue/components/account/SecuritySettings.css +2 -1
- package/src/runtime/vue/components/account/SecuritySettings.vue +1 -0
- package/src/runtime/vue/components/admin/AdminAccess.css +1 -1
- package/src/runtime/vue/components/admin/AdminAccess.vue +3 -1
- package/src/runtime/vue/components/admin/AdminAccessMemberTickets.vue +51 -0
- package/src/runtime/vue/components/admin/AdminAnnouncements.css +4 -2
- package/src/runtime/vue/components/admin/AdminBilling.css +1 -1
- package/src/runtime/vue/components/admin/AdminChart.css +2 -1
- package/src/runtime/vue/components/admin/AdminConsole.css +1 -0
- package/src/runtime/vue/components/admin/AdminExperiments.css +2 -1
- package/src/runtime/vue/components/admin/AdminFlags.css +4 -2
- package/src/runtime/vue/components/admin/AdminModeration.vue +148 -0
- package/src/runtime/vue/components/admin/AdminQueue.css +4 -2
- package/src/runtime/vue/components/admin/AdminReferrals.css +3 -1
- package/src/runtime/vue/components/admin/AdminReports.css +2 -1
- package/src/runtime/vue/components/admin/AdminRevenue.css +2 -1
- package/src/runtime/vue/components/admin/AdminUsers.vue +1 -0
- package/src/runtime/vue/components/admin/AdminWorkspaces.vue +1 -0
- package/src/runtime/vue/components/admin/admin.css +2 -1
- package/src/runtime/vue/components/auth/AuthForm.css +6 -3
- package/src/runtime/vue/components/auth/AuthForm.vue +4 -3
- package/src/runtime/vue/components/auth/AuthFormChoose.css +1 -0
- package/src/runtime/vue/components/auth/AuthFormPasskeyOffer.css +2 -1
- package/src/runtime/vue/components/auth/InviteRedeem.css +2 -0
- package/src/runtime/vue/components/auth/ReauthenticateCode.css +1 -1
- package/src/runtime/vue/components/auth/ReauthenticateDialog.css +6 -2
- package/src/runtime/vue/components/auth/ReauthenticateDialog.vue +3 -2
- package/src/runtime/vue/components/auth/WaitlistForm.css +3 -1
- package/src/runtime/vue/components/auth/WaitlistForm.vue +1 -0
- package/src/runtime/vue/components/auth/WaitlistPlace.css +3 -1
- package/src/runtime/vue/components/auth/WaitlistShare.css +6 -3
- package/src/runtime/vue/components/billing/BillingCheckoutLink.vue +2 -0
- package/src/runtime/vue/components/billing/BillingHistory.css +2 -1
- package/src/runtime/vue/components/billing/BillingHistory.vue +1 -0
- package/src/runtime/vue/components/billing/BillingPortalLink.vue +1 -0
- package/src/runtime/vue/components/billing/CancelFlow.css +8 -4
- package/src/runtime/vue/components/billing/CancelFlow.vue +2 -1
- package/src/runtime/vue/components/billing/CancelFlowEnd.vue +3 -1
- package/src/runtime/vue/components/billing/GiftList.css +5 -2
- package/src/runtime/vue/components/billing/PricingPackCard.css +2 -1
- package/src/runtime/vue/components/billing/PricingPlanCard.css +5 -3
- package/src/runtime/vue/components/billing/PricingPlanCard.vue +8 -1
- package/src/runtime/vue/components/billing/PricingTable.css +1 -1
- package/src/runtime/vue/components/billing/PricingTable.vue +23 -3
- package/src/runtime/vue/components/billing/ReferralCard.css +6 -3
- package/src/runtime/vue/components/billing/ReferralCard.vue +1 -0
- package/src/runtime/vue/components/billing/ReferralLanding.css +5 -2
- package/src/runtime/vue/components/billing/UpgradePrompt.css +6 -3
- package/src/runtime/vue/components/billing/UpgradePrompt.vue +1 -0
- package/src/runtime/vue/components/billing/UsageHistory.css +2 -1
- package/src/runtime/vue/components/billing/UsageHistory.vue +1 -0
- package/src/runtime/vue/components/billing/WithdrawalButton.css +6 -2
- package/src/runtime/vue/components/billing/WithdrawalButton.vue +2 -1
- package/src/runtime/vue/components/shared.css +24 -3
- package/src/runtime/vue/components/shell/AccessDenied.css +4 -1
- package/src/runtime/vue/components/shell/AccessDenied.vue +1 -0
- package/src/runtime/vue/components/shell/AccountMenu.vue +1 -0
- package/src/runtime/vue/components/shell/AiLabel.css +3 -2
- package/src/runtime/vue/components/shell/AiLabel.vue +4 -1
- package/src/runtime/vue/components/shell/AppShell.css +5 -3
- package/src/runtime/vue/components/shell/AppShell.vue +3 -0
- package/src/runtime/vue/components/shell/BackendNotices.vue +3 -2
- package/src/runtime/vue/components/shell/ConfirmDialog.css +5 -2
- package/src/runtime/vue/components/shell/ConnectionStatus.css +1 -1
- package/src/runtime/vue/components/shell/ConnectionStatus.vue +1 -0
- package/src/runtime/vue/components/shell/ContactForm.css +8 -1
- package/src/runtime/vue/components/shell/ContactForm.vue +1 -0
- package/src/runtime/vue/components/shell/FrameMain.vue +2 -0
- package/src/runtime/vue/components/shell/Gate.css +5 -2
- package/src/runtime/vue/components/shell/Gate.vue +2 -0
- package/src/runtime/vue/components/shell/GateQuota.vue +1 -0
- package/src/runtime/vue/components/shell/LegalCompany.vue +38 -0
- package/src/runtime/vue/components/shell/LegalContactPoints.vue +74 -0
- package/src/runtime/vue/components/shell/LegalDetail.vue +54 -0
- package/src/runtime/vue/components/shell/LegalDocument.css +21 -4
- package/src/runtime/vue/components/shell/LegalDocument.vue +54 -15
- package/src/runtime/vue/components/shell/LegalModeration.vue +94 -0
- package/src/runtime/vue/components/shell/LegalProcessors.vue +64 -22
- package/src/runtime/vue/components/shell/LegalStorage.vue +64 -23
- package/src/runtime/vue/components/shell/LegalVersion.vue +44 -0
- package/src/runtime/vue/components/shell/NoticeAnnouncement.css +2 -1
- package/src/runtime/vue/components/shell/NoticeDeletion.css +5 -2
- package/src/runtime/vue/components/shell/NoticeGift.css +2 -1
- package/src/runtime/vue/components/shell/NoticeGift.vue +8 -5
- package/src/runtime/vue/components/shell/NoticeImpersonation.css +2 -1
- package/src/runtime/vue/components/shell/NoticeLowCredits.css +6 -2
- package/src/runtime/vue/components/shell/NoticeMaintenance.css +2 -1
- package/src/runtime/vue/components/shell/NoticePastDue.css +6 -2
- package/src/runtime/vue/components/shell/NoticePastDue.vue +1 -1
- package/src/runtime/vue/components/shell/NotificationInbox.css +6 -4
- package/src/runtime/vue/components/shell/NotificationInbox.vue +1 -0
- package/src/runtime/vue/components/shell/ReportNotice.css +2 -1
- package/src/runtime/vue/components/shell/UploadField.css +4 -2
- package/src/runtime/vue/components/shell/UploadField.vue +21 -5
- package/src/runtime/vue/components/shell/WorkspaceSwitcher.css +4 -1
- package/src/runtime/vue/components/shell/WorkspaceSwitcher.vue +1 -0
- package/src/runtime/vue/components/tokens.css +21 -1
- package/src/runtime/vue/components/workspaces/AcceptInvitation.vue +1 -0
- package/src/runtime/vue/components/workspaces/AuditLog.css +2 -1
- package/src/runtime/vue/components/workspaces/AuditLog.vue +1 -0
- package/src/runtime/vue/components/workspaces/WorkspaceBilling.css +2 -1
- package/src/runtime/vue/components/workspaces/WorkspaceCredits.css +1 -0
- package/src/runtime/vue/components/workspaces/WorkspaceList.css +2 -1
- package/src/runtime/vue/components/workspaces/WorkspaceSettings.vue +1 -0
- package/src/runtime/vue/pages/gifts.vue +13 -2
- package/src/runtime/vue/pages/referral.vue +1 -2
- package/dist/devtools-client/_nuxt/CfQg3BRt.js +0 -5
|
@@ -17,6 +17,7 @@ export const ACCESS_PHASES = ['early-access', 'invite-only', 'public'] as const
|
|
|
17
17
|
* ledger, the activity trail and `canSignIn` name it:
|
|
18
18
|
*
|
|
19
19
|
* - `invite-code` and `access-link`: an administrator's code or link.
|
|
20
|
+
* - `member-ticket`: a member's ticket, an access link a member shares (`access.memberTickets`).
|
|
20
21
|
* - `invitation`: an administrator invited the address (`access.admit`, the Access tab).
|
|
21
22
|
* - `waitlist`: an administrator admitted the address's waitlist entry.
|
|
22
23
|
* - `workspace-invitation`: a pending, unexpired invitation to a workspace.
|
|
@@ -24,7 +25,7 @@ export const ACCESS_PHASES = ['early-access', 'invite-only', 'public'] as const
|
|
|
24
25
|
* - `domain`: its domain is one of `setupAccess`'s `domains`.
|
|
25
26
|
* - `administrator`: an administrator created the account.
|
|
26
27
|
*/
|
|
27
|
-
export type AccessTicket = 'invite-code' | 'access-link' | 'invitation' | 'waitlist' | 'workspace-invitation' | 'gift' | 'domain' | 'administrator'
|
|
28
|
+
export type AccessTicket = 'invite-code' | 'access-link' | 'member-ticket' | 'invitation' | 'waitlist' | 'workspace-invitation' | 'gift' | 'domain' | 'administrator'
|
|
28
29
|
|
|
29
30
|
/** A context the gate reads in. */
|
|
30
31
|
type GateReadCtx = Pick<GenericActionCtx<GenericDataModel>, 'runQuery'>
|
|
@@ -118,6 +119,18 @@ export async function inviteHash(secret: string, input: string): Promise<string
|
|
|
118
119
|
return hex(await crypto.subtle.sign('HMAC', key, encoder.encode(`invite:${normalized}`)))
|
|
119
120
|
}
|
|
120
121
|
|
|
122
|
+
/**
|
|
123
|
+
* A member ticket's token, for the fragment of `/invite#<token>`: an access
|
|
124
|
+
* link token derived from the member and the ticket's expiry under the auth
|
|
125
|
+
* secret, so the member reads it back without the database keeping it.
|
|
126
|
+
*/
|
|
127
|
+
export async function memberTicketToken(secret: string, holder: string, expiresAt: number): Promise<string> {
|
|
128
|
+
const key = await crypto.subtle.importKey('raw', encoder.encode(secret), { name: 'HMAC', hash: 'SHA-256' }, false, ['sign'])
|
|
129
|
+
const bytes = new Uint8Array(await crypto.subtle.sign('HMAC', key, encoder.encode(`member-ticket:${holder}:${expiresAt}`)))
|
|
130
|
+
// 256 is a multiple of 32: each byte gives one character, all equally likely.
|
|
131
|
+
return Array.from(bytes.slice(0, LINK_LENGTH), byte => ALPHABET[byte % ALPHABET.length]).join('')
|
|
132
|
+
}
|
|
133
|
+
|
|
121
134
|
/** An address as admissions keep it: trimmed, lower-cased. */
|
|
122
135
|
export function admissionEmail(address: string): string {
|
|
123
136
|
return address.trim().toLowerCase()
|
|
@@ -135,6 +148,22 @@ export function admissionProblem(address: string): 'malformed' | 'reserved' | nu
|
|
|
135
148
|
return RESERVED_DOMAINS.test(address.slice(address.lastIndexOf('@') + 1)) ? 'reserved' : null
|
|
136
149
|
}
|
|
137
150
|
|
|
151
|
+
/**
|
|
152
|
+
* A pasted list as admissions take it: each address trimmed and
|
|
153
|
+
* lower-cased, the ones that take none set aside with why. The admin
|
|
154
|
+
* console's Access tab and `nuxt-backend access admit` both clean through it.
|
|
155
|
+
*/
|
|
156
|
+
export function cleanAddresses(emails: readonly string[]): { clean: string[], skipped: Array<{ email: string, reason: 'malformed' | 'reserved' }> } {
|
|
157
|
+
const clean: string[] = []
|
|
158
|
+
const skipped: Array<{ email: string, reason: 'malformed' | 'reserved' }> = []
|
|
159
|
+
for (const email of emails.map(admissionEmail).filter(Boolean)) {
|
|
160
|
+
const problem = admissionProblem(email)
|
|
161
|
+
if (problem) skipped.push({ email, reason: problem })
|
|
162
|
+
else clean.push(email)
|
|
163
|
+
}
|
|
164
|
+
return { clean, skipped }
|
|
165
|
+
}
|
|
166
|
+
|
|
138
167
|
/** Whether an address's domain is one of `domains`, exactly (no subdomains). */
|
|
139
168
|
export function inDomains(address: string, domains: readonly string[]): boolean {
|
|
140
169
|
const normalized = admissionEmail(address)
|
|
@@ -88,11 +88,11 @@ export const ACCOUNT_DATA_SOURCES = {
|
|
|
88
88
|
capability: 'auth',
|
|
89
89
|
where: 'component',
|
|
90
90
|
tables: ['accessAdmissions', 'accessRedemptions', 'accessInvites', 'waitlistEntries', 'waitlistJoins'],
|
|
91
|
-
holds: 'The invitations by address an administrator made for the address, which ticket admitted the account while the app was closed (the redemption ledger), the codes and links it made as an administrator, and its waitlist entry: the address, its answers, its place and the state of its launch-news contact (the launch-news consent itself is on the consent ledger).',
|
|
91
|
+
holds: 'The invitations by address an administrator made for the address, which ticket admitted the account while the app was closed (the redemption ledger, which names the member whose ticket admitted a friend), the codes and links it made as an administrator, its member tickets (a hash of each link, its uses and its end), and its waitlist entry: the address, its answers, its place, where it came from (the form, followed by the page address\'s utm_source and utm_campaign, which whoever made the link chose and may carry an identifier) and the state of its launch-news contact (the launch-news consent itself is on the consent ledger).',
|
|
92
92
|
keyedBy: ['account', 'email'],
|
|
93
93
|
erasure: 'deleted',
|
|
94
|
-
erasureNote: 'The invitations by address waiting for it, the record of the ticket that admitted the account, and its waitlist entry (with a join it began and what it gave a friend) are removed; a code or link it made as an administrator stays, without its maker. Its launch-news contact goes with the email part of the erasure.',
|
|
95
|
-
retention: 'An invitation by address until it is used or revoked; the ticket record as long as the account; a waitlist entry until the person leaves or is erased, and a join whose code never checked a day.',
|
|
94
|
+
erasureNote: 'The invitations by address waiting for it, the record of the ticket that admitted the account, its member tickets (a link it shared stops working) and its waitlist entry (with a join it began and what it gave a friend) are removed; the friends its member tickets admitted keep their ticket record, which names it no more; a code or link it made as an administrator stays, without its maker. Its launch-news contact goes with the email part of the erasure.',
|
|
95
|
+
retention: 'An invitation by address until it is used or revoked; the ticket record as long as the account; a member ticket until 30 days after it ended; a waitlist entry until the person leaves or is erased, and a join whose code never checked a day.',
|
|
96
96
|
exported: true,
|
|
97
97
|
},
|
|
98
98
|
consents: {
|
|
@@ -128,6 +128,17 @@ export const ACCOUNT_DATA_SOURCES = {
|
|
|
128
128
|
retention: 'As long as the entity; a deletion mark 30 days.',
|
|
129
129
|
exported: true,
|
|
130
130
|
},
|
|
131
|
+
welcomeCredits: {
|
|
132
|
+
capability: 'billing',
|
|
133
|
+
where: 'component',
|
|
134
|
+
tables: ['billingWelcomes'],
|
|
135
|
+
holds: 'A digest (SHA-256) of the address welcome credits went to, its local part without tags and dots, and the billing entity that got them: never the address.',
|
|
136
|
+
keyedBy: ['entity'],
|
|
137
|
+
erasure: 'pseudonymized',
|
|
138
|
+
erasureNote: 'The digest stays, without the entity: it keeps welcome credits to once per person, so signing up again does not get them twice (fraud prevention, the app\'s legitimate interest). It names no address, but anyone who knows an address can compute its digest, so it is still pseudonymous personal data.',
|
|
139
|
+
retention: 'No expiry: it stays through an erasure, and after the app stops granting welcome credits, so they stay once per person.',
|
|
140
|
+
exported: false,
|
|
141
|
+
},
|
|
131
142
|
billingProofs: {
|
|
132
143
|
capability: 'billing',
|
|
133
144
|
where: 'component',
|
|
@@ -238,6 +249,17 @@ export const ACCOUNT_DATA_SOURCES = {
|
|
|
238
249
|
retention: 'Until a member removes it, or its workspace goes.',
|
|
239
250
|
exported: true,
|
|
240
251
|
},
|
|
252
|
+
aiFlags: {
|
|
253
|
+
capability: 'ai',
|
|
254
|
+
where: 'component',
|
|
255
|
+
tables: ['aiFlags'],
|
|
256
|
+
holds: 'What the safety classifier flagged in content an account sent (`setupAi({ moderation })`): the categories, whether it was refused or escalated, the classifier and the policy, and the app\'s id and stage of what was checked, never the content.',
|
|
257
|
+
keyedBy: ['account', 'entity'],
|
|
258
|
+
erasure: 'deleted',
|
|
259
|
+
erasureNote: 'Every flag about the account, and every flag of a workspace deleted with it, is removed, but for those on legal hold (escalated, or child sexual exploitation refused): kept as evidence the app may be obliged to keep (GDPR Art. 17(3)(b) and (e)), under the pseudonym, until they expire.',
|
|
260
|
+
retention: 'The days the app keeps flags (`moderation.log.days`, 183 by default), or none with `log: false`.',
|
|
261
|
+
exported: false,
|
|
262
|
+
},
|
|
241
263
|
aiProvenance: {
|
|
242
264
|
capability: 'ai',
|
|
243
265
|
where: 'component',
|
|
@@ -490,6 +512,7 @@ export const NO_PERSONAL_DATA: Readonly<Record<string, string>> = {
|
|
|
490
512
|
referralSweep: 'The handle the referral sweep wakes the app by.',
|
|
491
513
|
billingLifecycleMarks: 'What the billing lifecycle did once and when, by subscription or checkout id: an annual reminder, an abandoned checkout\'s hand-off.',
|
|
492
514
|
quotaCounters: 'The quota keys storage counts files and bytes under, the same for every account.',
|
|
515
|
+
urlClock: 'When the signed URL clock last ticked: one time for the whole app.',
|
|
493
516
|
funnelValues: 'The values the growth funnel breaks its steps down by: campaign and answer names, invite labels, promotion keys and referral codes. A referral code points at its owner only while the referral program keeps it, which an erasure deletes there.',
|
|
494
517
|
experiments: 'Each experiment\'s variants, goal and guardrails as the code declared them, and when it started.',
|
|
495
518
|
experimentKinds: 'The event kinds each experiment counts.',
|
package/src/convex/app.ts
CHANGED
|
@@ -47,14 +47,23 @@ import { type BackendEnvironment, parseBackendEnvironment } from './environment.
|
|
|
47
47
|
* - `EMAIL_DEV_INBOX` — `1` publishes the dev inbox to pages
|
|
48
48
|
* (`getSandboxInbox`) on a deployment outside production; `nuxt-backend
|
|
49
49
|
* dev` sets it on dev deployments. Unset, the page reader answers nothing.
|
|
50
|
-
* - `BILLING_ACCESS_TOKEN` — billing
|
|
51
|
-
* billing
|
|
50
|
+
* - `BILLING_ACCESS_TOKEN` — billing reads answer empty; on production,
|
|
51
|
+
* billing is not launched (every sale is refused as `not_launched`),
|
|
52
|
+
* elsewhere checkout and the other billing actions are refused as
|
|
53
|
+
* `not_configured`.
|
|
52
54
|
* - `BILLING_WEBHOOK_SECRET` — billing events are rejected until set
|
|
53
55
|
* (`syncEntitlements` remains the on-demand fallback).
|
|
54
56
|
* - `AI_GATEWAY_API_KEY` — the Vercel AI Gateway's own name, read as it is:
|
|
55
57
|
* where a `provider/model` id goes when the Convex AI Gateway does not
|
|
56
58
|
* answer it (a free plan, a self-hosted deployment). Without either, the id
|
|
57
59
|
* is refused when called.
|
|
60
|
+
* - `CONTENT_SAFETY_ENDPOINT`, `CONTENT_SAFETY_KEY` — the Azure AI Content
|
|
61
|
+
* Safety resource `azureContentSafety()` checks images with.
|
|
62
|
+
* `SECOND_OPINION_KEY` — the OpenAI key `openaiModeration()` asks for a
|
|
63
|
+
* second opinion with. `KNOWN_ABUSE_KEY` — the credentials
|
|
64
|
+
* `arachnidShield()` matches known abuse material with. Unset, the
|
|
65
|
+
* provider that reads one refuses every check, and the content is refused
|
|
66
|
+
* as unchecked.
|
|
58
67
|
* - `PROVENANCE_PRIVATE_KEY`, `PROVENANCE_CERTIFICATE` — the key that signs
|
|
59
68
|
* the content credentials `ctx.storeImage` writes (`setupAi({ provenance })`)
|
|
60
69
|
* and its certificate chain. Unset, generated images carry the IPTC source
|
|
@@ -98,6 +107,11 @@ export const backendEnv = {
|
|
|
98
107
|
BILLING_WEBHOOK_SECRET: v.optional(v.string()),
|
|
99
108
|
// AI — optional; the gateway's own name, never renamed.
|
|
100
109
|
AI_GATEWAY_API_KEY: v.optional(v.string()),
|
|
110
|
+
// AI moderation providers — optional: the image checks, the second opinion and the known-abuse match.
|
|
111
|
+
CONTENT_SAFETY_ENDPOINT: v.optional(v.string()),
|
|
112
|
+
CONTENT_SAFETY_KEY: v.optional(v.string()),
|
|
113
|
+
SECOND_OPINION_KEY: v.optional(v.string()),
|
|
114
|
+
KNOWN_ABUSE_KEY: v.optional(v.string()),
|
|
101
115
|
// AI provenance — optional: the key content credentials are signed with, and its certificate chain.
|
|
102
116
|
PROVENANCE_PRIVATE_KEY: v.optional(v.string()),
|
|
103
117
|
PROVENANCE_CERTIFICATE: v.optional(v.string()),
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Whether billing sells on a deployment yet: the rule behind `billing.launch`,
|
|
2
|
+
// the pricing's `launched` and the refusal of every sale (`not_launched`).
|
|
3
|
+
// Pure: no Convex code, so a CLI check can import it as it is.
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Why billing sells nothing yet on a production deployment: no provider
|
|
7
|
+
* token (`no_access_token`), or a catalog `billing sync` has not pushed to
|
|
8
|
+
* the provider's production (`no_catalog`).
|
|
9
|
+
*/
|
|
10
|
+
export type BillingLaunchReason = 'no_access_token' | 'no_catalog'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Whether billing sells on a deployment. Billing is not launched while a
|
|
14
|
+
* production deployment has no provider token or no production catalog:
|
|
15
|
+
* the provider's account review can come after an app opens to its first
|
|
16
|
+
* people, and until then its pricing reads "Plans open soon" and every
|
|
17
|
+
* checkout is refused (`unavailable`, reason `not_launched`). On every
|
|
18
|
+
* other deployment billing runs on the provider's sandbox, and is launched.
|
|
19
|
+
*/
|
|
20
|
+
export type BillingLaunch = { launched: true } | { launched: false, reason: BillingLaunchReason }
|
|
21
|
+
|
|
22
|
+
/** What {@link billingLaunch} decides from: the billing environment, the token, and the catalog's product ids. */
|
|
23
|
+
export interface BillingLaunchInput {
|
|
24
|
+
/** The provider environment the deployment bills in (`BACKEND_ENVIRONMENT=production` bills in `production`). */
|
|
25
|
+
environment: 'sandbox' | 'production'
|
|
26
|
+
/** `BILLING_ACCESS_TOKEN`, or whether the deployment holds one. */
|
|
27
|
+
accessToken: string | boolean | undefined
|
|
28
|
+
/** The product ids in force for that environment: `billing.generated.ts`'s, or `setupBilling({ products })`. */
|
|
29
|
+
products: Readonly<Record<string, string>> | undefined
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Whether billing sells on a deployment ({@link BillingLaunch}): on the
|
|
34
|
+
* provider's production, once the deployment holds a token and the catalog
|
|
35
|
+
* has products there, checked in that order; on its sandbox, always.
|
|
36
|
+
*/
|
|
37
|
+
export function billingLaunch({ environment, accessToken, products }: BillingLaunchInput): BillingLaunch {
|
|
38
|
+
if (environment !== 'production') return { launched: true }
|
|
39
|
+
if (!accessToken) return { launched: false, reason: 'no_access_token' }
|
|
40
|
+
if (Object.keys(products ?? {}).length === 0) return { launched: false, reason: 'no_catalog' }
|
|
41
|
+
return { launched: true }
|
|
42
|
+
}
|
package/src/convex/catalog.ts
CHANGED
|
@@ -91,7 +91,7 @@ export type CatalogTrial
|
|
|
91
91
|
interval?: 'day' | 'week' | 'month'
|
|
92
92
|
/** Number of intervals. Defaults to 1, or 14 days when `interval` is left out. */
|
|
93
93
|
count?: number
|
|
94
|
-
/** A reverse trial on a plan pass, started for every new workspace
|
|
94
|
+
/** A reverse trial on a plan pass, started for every new workspace. */
|
|
95
95
|
pass: true
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -198,6 +198,20 @@ export type CatalogPackPrices = Record<string, number>
|
|
|
198
198
|
*/
|
|
199
199
|
export interface CatalogPlanCreditGrant extends Omit<CatalogCreditGrant, 'units'> {
|
|
200
200
|
units: number | Partial<Record<CatalogInterval, number>>
|
|
201
|
+
/**
|
|
202
|
+
* Grant the credits once, as welcome credits, instead of every cycle:
|
|
203
|
+
* the free plan's alone. Each person gets `units` (a whole number) once,
|
|
204
|
+
* when the first billing entity they own first starts on the free plan,
|
|
205
|
+
* as soon as the reverse trial begins if the catalog has one (not when it
|
|
206
|
+
* ends), and never again: not for
|
|
207
|
+
* a second workspace, an account made again with their address, a retry
|
|
208
|
+
* or a concurrent start. The person is the owner's address, tags and dots
|
|
209
|
+
* taken out, kept as a hash, as the reverse trial counts it (outside
|
|
210
|
+
* production, a `delivered+<label>@resend.dev` sandbox address whole). `billing sync` pushes no credit benefit for them: they land
|
|
211
|
+
* as a refund-shaped usage event on a sum meter (`meter` needs a
|
|
212
|
+
* `property`), keyed `welcome:<entityId>`.
|
|
213
|
+
*/
|
|
214
|
+
once?: boolean
|
|
201
215
|
}
|
|
202
216
|
|
|
203
217
|
/** The lengths, in months, a plan can be gifted for as a pass. */
|
|
@@ -233,7 +247,7 @@ export interface CatalogPlan {
|
|
|
233
247
|
/**
|
|
234
248
|
* Free trial before the first charge, on every interval. `billing sync`
|
|
235
249
|
* pushes a change to it. `{ pass: true }` makes it a reverse trial: a
|
|
236
|
-
* pass every new workspace starts on, with no card
|
|
250
|
+
* pass every new workspace starts on, with no card.
|
|
237
251
|
*/
|
|
238
252
|
trial?: CatalogTrial
|
|
239
253
|
/**
|
|
@@ -11,7 +11,7 @@ import { type AuthLibrarySecretConfig, contextSecrets, firstVerified } from '../
|
|
|
11
11
|
// keeps: Better Auth then writes the row anew, under a new id). Checking the code needs that cookie, so a code read over
|
|
12
12
|
// someone's shoulder or typed into a phishing page signs nobody in
|
|
13
13
|
// elsewhere. Better Auth's email OTP plugin has no binding of its own
|
|
14
|
-
// (checked 2026-
|
|
14
|
+
// (checked 2026-11-07, Better Auth 1.7).
|
|
15
15
|
|
|
16
16
|
/** The cookie's name, under Better Auth's prefix (`__Secure-better-auth.sign_in_code` over HTTPS). */
|
|
17
17
|
const CODE_COOKIE = 'sign_in_code'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BetterAuthPlugin } from 'better-auth'
|
|
2
|
-
import { APIError, createAuthMiddleware,
|
|
2
|
+
import { APIError, createAuthMiddleware, getIP } from 'better-auth/api'
|
|
3
3
|
import type { BetterAuthOptions } from 'better-auth/minimal'
|
|
4
4
|
import { captcha } from 'better-auth/plugins'
|
|
5
5
|
import type { GenericActionCtx, GenericDataModel, GenericMutationCtx } from 'convex/server'
|
|
@@ -449,7 +449,7 @@ const ROUTE_CHECKS: Readonly<Record<string, {
|
|
|
449
449
|
const { newEmail } = bodyOf(guarded.request)
|
|
450
450
|
const current = session.user.email.toLowerCase()
|
|
451
451
|
if (!isEmail(newEmail) || newEmail.toLowerCase() === current) return false
|
|
452
|
-
return codeWaiting(guarded.request, `change-email-otp-${
|
|
452
|
+
return codeWaiting(guarded.request, `change-email-otp-${session.user.id}:${newEmail.toLowerCase()}`)
|
|
453
453
|
},
|
|
454
454
|
then: async (guarded) => {
|
|
455
455
|
const { newEmail } = bodyOf(guarded.request) as { newEmail: string }
|
|
@@ -556,7 +556,7 @@ function keysOnCaller(row: SensitiveAction | undefined, path: string): boolean {
|
|
|
556
556
|
*/
|
|
557
557
|
function clientAddress(request: AuthHookCtx): string | null {
|
|
558
558
|
const headers = request.request?.headers ?? request.headers
|
|
559
|
-
return headers ?
|
|
559
|
+
return headers ? getIP(headers, request.context?.options ?? {}) : null
|
|
560
560
|
}
|
|
561
561
|
|
|
562
562
|
/**
|
|
@@ -29,10 +29,11 @@ export { APIError }
|
|
|
29
29
|
export type { BackendPaths } from '../paths.js'
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
32
|
+
* `storesLastSignInCookie`, the consent check an app's own
|
|
33
|
+
* `lastLoginMethod` passes as `beforeStoreCookie`, and the deprecated
|
|
34
|
+
* `resolveSignInMethod`, kept until a later minor release removes it.
|
|
35
35
|
*/
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated -- the deprecation cycle keeps the name exported
|
|
36
37
|
export { resolveSignInMethod, storesLastSignInCookie } from './plugins.js'
|
|
37
38
|
|
|
38
39
|
// `setupAuth` is the entry's one builder: every auth instance is built
|
|
@@ -2,6 +2,7 @@ import { passkey } from '@better-auth/passkey'
|
|
|
2
2
|
import type { BetterAuthOptions } from 'better-auth/minimal'
|
|
3
3
|
import { admin, lastLoginMethod } from 'better-auth/plugins'
|
|
4
4
|
import { storageAllows, storageFromCookieHeader } from '../consent-rules.js'
|
|
5
|
+
import { bannedSentence } from '../errors.js'
|
|
5
6
|
import { DEFAULT_ADMIN_ROLES, IMPERSONATION_SESSION_SECONDS, LAST_SIGN_IN_COOKIE, type SignInMethod } from '../constants.js'
|
|
6
7
|
import type { Administrators } from '../integrations/access.js'
|
|
7
8
|
import { LOCALE_SCHEMA } from '../locale.js'
|
|
@@ -108,6 +109,24 @@ export const PASSKEY_ONLY_PLUGIN = {
|
|
|
108
109
|
* plugin's default), so a passkey can only be added to an account whose email
|
|
109
110
|
* has already been proven via the OTP sign-in flow.
|
|
110
111
|
*
|
|
112
|
+
* Every passkey ceremony requires user verification: the device checks the
|
|
113
|
+
* person's fingerprint, face or PIN, not just that someone is holding it.
|
|
114
|
+
* The registration and sign-in options ask for it (`userVerification:
|
|
115
|
+
* 'required'`), and the server refuses a response whose authenticator did
|
|
116
|
+
* not verify the person (`requireUserVerification`), at registration and
|
|
117
|
+
* at every sign-in, `useReauthentication().withPasskey` included. A
|
|
118
|
+
* security key with no PIN set cannot be saved.
|
|
119
|
+
*
|
|
120
|
+
* A passkey saved under 0.2 (which asked for verification as `preferred`)
|
|
121
|
+
* by a security key with no PIN was stored without it, and is now refused.
|
|
122
|
+
* Chrome offers to set a PIN on such a key; a U2F-only key can never
|
|
123
|
+
* verify. The passkey row keeps no verification flag, so those accounts
|
|
124
|
+
* can't be found in advance: the refusal reads as `invalid_input` on
|
|
125
|
+
* `passkey`, whose label names the PIN, or as `passkey_cancelled` when the
|
|
126
|
+
* browser gives up on the key. The person signs in with an email
|
|
127
|
+
* code; a passkey-only account uses its recovery code, or an
|
|
128
|
+
* administrator's `allowSignInCodes`.
|
|
129
|
+
*
|
|
111
130
|
* This deliberately omits passkey-first (pre-auth) account creation: minting an
|
|
112
131
|
* account + session from a WebAuthn ceremony over an unverified, client-typed
|
|
113
132
|
* email lets an attacker squat on or pre-hijack a victim's email (they plant a
|
|
@@ -116,24 +135,22 @@ export const PASSKEY_ONLY_PLUGIN = {
|
|
|
116
135
|
* New users sign up with OTP, then add a passkey from their authenticated
|
|
117
136
|
* session (the `passkey-offer` step of `useLoginFlow`).
|
|
118
137
|
*
|
|
119
|
-
* Override by passing your own `passkey(...)` plugin in `authOptions.plugins
|
|
138
|
+
* Override by passing your own `passkey(...)` plugin in `authOptions.plugins`,
|
|
139
|
+
* and keep `authenticatorSelection: { userVerification: 'required' }` in it:
|
|
140
|
+
* without it, a passkey that never checked the person signs in.
|
|
120
141
|
*/
|
|
121
142
|
export function defaultPasskey() {
|
|
122
|
-
return passkey()
|
|
143
|
+
return passkey({ authenticatorSelection: { userVerification: 'required' } })
|
|
123
144
|
}
|
|
124
145
|
|
|
125
146
|
/**
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
* (`/sign-in/email-otp`, which also signs a new account up) is `email-otp`.
|
|
129
|
-
* Everything else is left to Better Auth's resolver, which names a passkey
|
|
130
|
-
* sign-in (`/passkey/verify-authentication`) `passkey` and returns nothing
|
|
131
|
-
* for the sessions no person signed in for (an impersonation, an email
|
|
132
|
-
* change). The package's own plugin uses it; pass it to one of your own:
|
|
147
|
+
* Names a code sign-in (`/sign-in/email-otp`, which also signs a new
|
|
148
|
+
* account up) `email-otp`, and nothing else.
|
|
133
149
|
*
|
|
134
|
-
*
|
|
135
|
-
* lastLoginMethod
|
|
136
|
-
*
|
|
150
|
+
* @deprecated Better Auth 1.7 names a code sign-in `email-otp` itself, so
|
|
151
|
+
* `lastLoginMethod` needs no `customResolveMethod` for it. Drop
|
|
152
|
+
* `customResolveMethod: resolveSignInMethod` from your own plugin. It keeps
|
|
153
|
+
* working until it is removed in a later minor release.
|
|
137
154
|
*/
|
|
138
155
|
export function resolveSignInMethod(ctx: { path?: string }): string | null {
|
|
139
156
|
return ctx.path === '/sign-in/email-otp' ? 'email-otp' : null
|
|
@@ -153,7 +170,8 @@ export function storesLastSignInCookie(ctx: { headers?: Headers | null, request?
|
|
|
153
170
|
}
|
|
154
171
|
|
|
155
172
|
/**
|
|
156
|
-
* Better Auth's `lastLoginMethod`: every sign-in records how it was made
|
|
173
|
+
* Better Auth's `lastLoginMethod`: every sign-in records how it was made
|
|
174
|
+
* (Better Auth names a code sign-in `email-otp` and a passkey's `passkey`), on
|
|
157
175
|
* the account (`user.lastLoginMethod`) and, once the browser allowed it
|
|
158
176
|
* (the consent manager's `preferences` purpose), in a cookie of this
|
|
159
177
|
* browser (`LAST_SIGN_IN_COOKIE`, 30 days, readable by the page). The
|
|
@@ -163,13 +181,12 @@ export function storesLastSignInCookie(ctx: { headers?: Headers | null, request?
|
|
|
163
181
|
*
|
|
164
182
|
* Override by passing your own `lastLoginMethod(...)` in
|
|
165
183
|
* `authOptions.plugins` — keep `storeInDatabase: true`, the default
|
|
166
|
-
* `cookieName
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
* keeps the cookie off and the record on.
|
|
184
|
+
* `cookieName` and `beforeStoreCookie: storesLastSignInCookie`, or the
|
|
185
|
+
* sign-in form finds no method to mark, or the cookie is set unasked.
|
|
186
|
+
* `beforeStoreCookie: () => false` keeps the cookie off and the record on.
|
|
170
187
|
*/
|
|
171
188
|
export function defaultLastLoginMethod() {
|
|
172
|
-
return lastLoginMethod({ storeInDatabase: true, cookieName: LAST_SIGN_IN_COOKIE,
|
|
189
|
+
return lastLoginMethod({ storeInDatabase: true, cookieName: LAST_SIGN_IN_COOKIE, beforeStoreCookie: ctx => storesLastSignInCookie(ctx as never) })
|
|
173
190
|
}
|
|
174
191
|
|
|
175
192
|
/**
|
|
@@ -191,13 +208,20 @@ export function impersonationSeconds(options: AdminPluginOptions | undefined): n
|
|
|
191
208
|
* visit of any of them, whoever asks and whatever the app's roles grant
|
|
192
209
|
* (`impersonate-admins`, `allowImpersonatingAdmins`).
|
|
193
210
|
*
|
|
211
|
+
* A banned account's sign-in is refused with a sentence naming when its
|
|
212
|
+
* ban ends ({@link bannedSentence}), which the reader turns into the
|
|
213
|
+
* `forbidden` refusal's `until`. The person reads the `errors` labels, never
|
|
214
|
+
* Better Auth's sentence: word the refusal by overriding
|
|
215
|
+
* `errors.forbidden_banned` and `errors.forbidden_banned_until`. An app's
|
|
216
|
+
* own `bannedUserMessage` only loses `until`.
|
|
217
|
+
*
|
|
194
218
|
* Override by passing your own `admin(...)` in `authOptions.plugins`: the
|
|
195
219
|
* hook still refuses an administrator's account (by your plugin's
|
|
196
220
|
* `adminRoles` and `adminUserIds`), and the duration is then yours to keep
|
|
197
221
|
* short.
|
|
198
222
|
*/
|
|
199
223
|
export function defaultAdmin(options: AdminPluginOptions | undefined) {
|
|
200
|
-
return admin({ ...options, impersonationSessionDuration: impersonationSeconds(options) })
|
|
224
|
+
return admin({ bannedUserMessage: bannedSentence, ...options, impersonationSessionDuration: impersonationSeconds(options) })
|
|
201
225
|
}
|
|
202
226
|
|
|
203
227
|
/** The administrators an app's admin options name: `adminRoles` (default `DEFAULT_ADMIN_ROLES`) and `adminUserIds`. */
|
|
@@ -32,6 +32,7 @@ import type * as lifecycle from "../lifecycle.js";
|
|
|
32
32
|
import type * as lifecycleActivity from "../lifecycleActivity.js";
|
|
33
33
|
import type * as maintenance from "../maintenance.js";
|
|
34
34
|
import type * as migrations from "../migrations.js";
|
|
35
|
+
import type * as moderation from "../moderation.js";
|
|
35
36
|
import type * as monitoring from "../monitoring.js";
|
|
36
37
|
import type * as notifications from "../notifications.js";
|
|
37
38
|
import type * as onboarding from "../onboarding.js";
|
|
@@ -80,6 +81,7 @@ const fullApi: ApiFromModules<{
|
|
|
80
81
|
lifecycleActivity: typeof lifecycleActivity;
|
|
81
82
|
maintenance: typeof maintenance;
|
|
82
83
|
migrations: typeof migrations;
|
|
84
|
+
moderation: typeof moderation;
|
|
83
85
|
monitoring: typeof monitoring;
|
|
84
86
|
notifications: typeof notifications;
|
|
85
87
|
onboarding: typeof onboarding;
|