nuxt-backend 0.2.0 → 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 +565 -75
- 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 +10 -6
- package/dist/cli.mjs +509 -55
- 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 -5
- package/dist/convex/account-data.d.ts.map +1 -1
- package/dist/convex/account-data.js +26 -7
- 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 +38 -2
- package/dist/convex/catalog.d.ts.map +1 -1
- package/dist/convex/catalog.js.map +1 -1
- package/dist/convex/client/better-auth-options.d.ts.map +1 -1
- package/dist/convex/client/better-auth-options.js +11 -1
- package/dist/convex/client/better-auth-options.js.map +1 -1
- package/dist/convex/client/client-address.d.ts +21 -0
- package/dist/convex/client/client-address.d.ts.map +1 -0
- package/dist/convex/client/client-address.js +37 -0
- package/dist/convex/client/client-address.js.map +1 -0
- 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 +128 -42
- 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 +460 -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 +12 -6
- package/dist/convex/components/backend/account.d.ts.map +1 -1
- package/dist/convex/components/backend/account.js +55 -4
- 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 +5 -2
- package/dist/convex/components/backend/adapter.js.map +1 -1
- package/dist/convex/components/backend/ai.d.ts +11 -3
- package/dist/convex/components/backend/ai.d.ts.map +1 -1
- package/dist/convex/components/backend/ai.js +18 -52
- package/dist/convex/components/backend/ai.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 +89 -44
- package/dist/convex/components/backend/billing.js.map +1 -1
- package/dist/convex/components/backend/consents.d.ts.map +1 -1
- package/dist/convex/components/backend/consents.js +2 -1
- package/dist/convex/components/backend/consents.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 +3 -3
- package/dist/convex/components/backend/gifts.d.ts.map +1 -1
- package/dist/convex/components/backend/gifts.js +11 -6
- package/dist/convex/components/backend/gifts.js.map +1 -1
- 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/lifecycle.d.ts.map +1 -1
- package/dist/convex/components/backend/lifecycle.js +18 -14
- package/dist/convex/components/backend/lifecycle.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/notifications.d.ts +13 -0
- package/dist/convex/components/backend/notifications.d.ts.map +1 -1
- package/dist/convex/components/backend/notifications.js +21 -0
- package/dist/convex/components/backend/notifications.js.map +1 -1
- package/dist/convex/components/backend/referrals.d.ts.map +1 -1
- package/dist/convex/components/backend/referrals.js +13 -16
- package/dist/convex/components/backend/referrals.js.map +1 -1
- package/dist/convex/components/backend/reports.js +7 -7
- package/dist/convex/components/backend/reports.js.map +1 -1
- package/dist/convex/components/backend/schema.d.ts +548 -59
- package/dist/convex/components/backend/schema.d.ts.map +1 -1
- package/dist/convex/components/backend/schema.js +233 -155
- 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 +67 -10
- package/dist/convex/components/backend/storage.js.map +1 -1
- package/dist/convex/components/backend/subscriptions.d.ts +4 -4
- package/dist/convex/components/backend/subscriptions.d.ts.map +1 -1
- package/dist/convex/components/backend/subscriptions.js +7 -36
- package/dist/convex/components/backend/subscriptions.js.map +1 -1
- package/dist/convex/components/backend/waitlist.d.ts +1 -1
- package/dist/convex/components/backend/webhooks.d.ts +0 -1
- package/dist/convex/components/backend/webhooks.d.ts.map +1 -1
- package/dist/convex/components/backend/webhooks.js +1 -1
- package/dist/convex/components/backend/webhooks.js.map +1 -1
- package/dist/convex/consent-rules.d.ts +0 -2
- package/dist/convex/consent-rules.d.ts.map +1 -1
- package/dist/convex/consent-rules.js.map +1 -1
- package/dist/convex/constants.d.ts +19 -5
- package/dist/convex/constants.d.ts.map +1 -1
- package/dist/convex/constants.js +19 -5
- package/dist/convex/constants.js.map +1 -1
- package/dist/convex/email-templates.d.ts +56 -7
- package/dist/convex/email-templates.d.ts.map +1 -1
- package/dist/convex/email-templates.js +69 -15
- 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/admin.d.ts +2 -1
- package/dist/convex/integrations/admin.d.ts.map +1 -1
- package/dist/convex/integrations/admin.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 +19 -0
- package/dist/convex/integrations/ai/job-errors.d.ts.map +1 -1
- package/dist/convex/integrations/ai/job-errors.js +40 -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 +26 -4
- package/dist/convex/integrations/ai/metering.d.ts.map +1 -1
- package/dist/convex/integrations/ai/metering.js +91 -35
- 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 +223 -46
- 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 +220 -19
- package/dist/convex/integrations/ai/moderation.d.ts.map +1 -1
- package/dist/convex/integrations/ai/moderation.js +388 -39
- 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 +6 -12
- 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 -1
- package/dist/convex/integrations/billing/context.d.ts.map +1 -1
- package/dist/convex/integrations/billing/context.js +21 -5
- 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/customers.d.ts.map +1 -1
- package/dist/convex/integrations/billing/customers.js +25 -5
- package/dist/convex/integrations/billing/customers.js.map +1 -1
- package/dist/convex/integrations/billing/features.d.ts.map +1 -1
- package/dist/convex/integrations/billing/free-plan.d.ts +42 -2
- package/dist/convex/integrations/billing/free-plan.d.ts.map +1 -1
- package/dist/convex/integrations/billing/free-plan.js +110 -33
- package/dist/convex/integrations/billing/free-plan.js.map +1 -1
- package/dist/convex/integrations/billing/functions.d.ts +11 -3
- package/dist/convex/integrations/billing/functions.d.ts.map +1 -1
- package/dist/convex/integrations/billing/functions.js +33 -12
- 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 +39 -8
- 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/history.js +3 -1
- package/dist/convex/integrations/billing/history.js.map +1 -1
- package/dist/convex/integrations/billing/lifecycle.d.ts +13 -4
- package/dist/convex/integrations/billing/lifecycle.d.ts.map +1 -1
- package/dist/convex/integrations/billing/lifecycle.js +47 -7
- package/dist/convex/integrations/billing/lifecycle.js.map +1 -1
- package/dist/convex/integrations/billing/passes.d.ts +0 -2
- package/dist/convex/integrations/billing/passes.d.ts.map +1 -1
- package/dist/convex/integrations/billing/passes.js +4 -5
- package/dist/convex/integrations/billing/passes.js.map +1 -1
- package/dist/convex/integrations/billing/pricing.d.ts +12 -2
- package/dist/convex/integrations/billing/pricing.d.ts.map +1 -1
- package/dist/convex/integrations/billing/pricing.js +48 -12
- package/dist/convex/integrations/billing/pricing.js.map +1 -1
- package/dist/convex/integrations/billing/purchase.d.ts.map +1 -1
- package/dist/convex/integrations/billing/purchase.js +1 -2
- package/dist/convex/integrations/billing/purchase.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 +13 -1
- package/dist/convex/integrations/billing/types/lifecycle.d.ts.map +1 -1
- package/dist/convex/integrations/billing/types/options.d.ts +4 -1
- package/dist/convex/integrations/billing/types/options.d.ts.map +1 -1
- package/dist/convex/integrations/billing/types/records.d.ts +75 -4
- 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 +42 -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 +5 -4
- package/dist/convex/integrations/billing.d.ts.map +1 -1
- package/dist/convex/integrations/billing.js +18 -5
- package/dist/convex/integrations/billing.js.map +1 -1
- package/dist/convex/integrations/email-preferences.d.ts +1 -1
- package/dist/convex/integrations/email-preferences.d.ts.map +1 -1
- package/dist/convex/integrations/email-sync.d.ts.map +1 -1
- package/dist/convex/integrations/email-sync.js +43 -1
- package/dist/convex/integrations/email-sync.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 +30 -6
- package/dist/convex/integrations/notifications.d.ts.map +1 -1
- package/dist/convex/integrations/notifications.js +42 -28
- package/dist/convex/integrations/notifications.js.map +1 -1
- package/dist/convex/integrations/rate-limit.d.ts +24 -5
- package/dist/convex/integrations/rate-limit.d.ts.map +1 -1
- package/dist/convex/integrations/rate-limit.js +24 -8
- package/dist/convex/integrations/rate-limit.js.map +1 -1
- package/dist/convex/integrations/reports.d.ts +5 -2
- package/dist/convex/integrations/reports.d.ts.map +1 -1
- package/dist/convex/integrations/reports.js +14 -14
- 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/integrations/webhooks.d.ts +1 -3
- package/dist/convex/integrations/webhooks.d.ts.map +1 -1
- package/dist/convex/integrations/webhooks.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 +4 -1
- package/dist/convex/label-groups/cancelFlow.d.ts.map +1 -1
- package/dist/convex/label-groups/cancelFlow.js +7 -2
- package/dist/convex/label-groups/cancelFlow.js.map +1 -1
- package/dist/convex/label-groups/credits.d.ts +14 -1
- package/dist/convex/label-groups/credits.d.ts.map +1 -1
- package/dist/convex/label-groups/credits.js +17 -2
- package/dist/convex/label-groups/credits.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 +21 -2
- package/dist/convex/label-groups/notifications.d.ts.map +1 -1
- package/dist/convex/label-groups/notifications.js +21 -15
- 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 +12 -8
- 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/settings.d.ts.map +1 -1
- package/dist/convex/label-groups/settings.js +4 -3
- package/dist/convex/label-groups/settings.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/usage.d.ts +1 -1
- package/dist/convex/label-groups/usage.d.ts.map +1 -1
- package/dist/convex/label-groups/usage.js +2 -2
- package/dist/convex/label-groups/usage.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 +141 -29
- package/dist/convex/label-translations.js.map +1 -1
- package/dist/convex/labels.d.ts +123 -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 +14 -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/notifications.d.ts +77 -0
- package/dist/convex/notifications.d.ts.map +1 -1
- package/dist/convex/notifications.js +64 -13
- package/dist/convex/notifications.js.map +1 -1
- package/dist/convex/proof.d.ts +25 -0
- package/dist/convex/proof.d.ts.map +1 -1
- package/dist/convex/proof.js +39 -0
- package/dist/convex/proof.js.map +1 -1
- package/dist/convex/referral-rules.d.ts +0 -2
- package/dist/convex/referral-rules.d.ts.map +1 -1
- package/dist/convex/referral-rules.js +0 -2
- package/dist/convex/referral-rules.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/convex/waitlist-rules.d.ts +1 -13
- package/dist/convex/waitlist-rules.d.ts.map +1 -1
- package/dist/convex/waitlist-rules.js +2 -14
- package/dist/convex/waitlist-rules.js.map +1 -1
- 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 +138 -39
- package/dist/runtime/locales/en.json +138 -39
- package/dist/runtime/locales/es.json +138 -39
- package/dist/runtime/locales/fr.json +138 -39
- package/dist/runtime/locales/ru.json +138 -39
- 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/server/protection/gate.d.ts +4 -2
- package/dist/runtime/server/protection/gate.js +14 -4
- 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/admin-client.d.ts +18 -0
- package/dist/runtime/vue/admin-client.js +32 -0
- package/dist/runtime/vue/auth-client.d.ts +22 -14
- package/dist/runtime/vue/auth-client.js +3 -1
- 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 +28 -1
- package/dist/runtime/vue/components/admin/AdminUsers.vue +1 -0
- package/dist/runtime/vue/components/admin/AdminUsers.vue.d.ts +28 -1
- 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.d.vue.ts +1 -1
- package/dist/runtime/vue/components/billing/BillingCheckoutLink.vue +2 -0
- package/dist/runtime/vue/components/billing/BillingCheckoutLink.vue.d.ts +1 -1
- 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.d.vue.ts +3 -0
- package/dist/runtime/vue/components/billing/CancelFlow.vue +11 -3
- package/dist/runtime/vue/components/billing/CancelFlow.vue.d.ts +3 -0
- package/dist/runtime/vue/components/billing/CancelFlowConfirm.d.vue.ts +3 -0
- package/dist/runtime/vue/components/billing/CancelFlowConfirm.vue +34 -0
- package/dist/runtime/vue/components/billing/CancelFlowConfirm.vue.d.ts +3 -0
- package/dist/runtime/vue/components/billing/CancelFlowEnd.vue +3 -1
- package/dist/runtime/vue/components/billing/CancelFlowQuestion.vue +2 -1
- package/dist/runtime/vue/components/billing/GiftList.css +1 -1
- package/dist/runtime/vue/components/billing/GiftSent.d.vue.ts +2 -2
- package/dist/runtime/vue/components/billing/GiftSent.vue.d.ts +2 -2
- package/dist/runtime/vue/components/billing/PricingPackCard.css +1 -1
- package/dist/runtime/vue/components/billing/PricingPackCard.vue +6 -3
- package/dist/runtime/vue/components/billing/PricingPlanCard.css +1 -1
- package/dist/runtime/vue/components/billing/PricingPlanCard.vue +11 -2
- package/dist/runtime/vue/components/billing/PricingTable.css +1 -1
- package/dist/runtime/vue/components/billing/PricingTable.d.vue.ts +4 -2
- package/dist/runtime/vue/components/billing/PricingTable.vue +25 -4
- package/dist/runtime/vue/components/billing/PricingTable.vue.d.ts +4 -2
- 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/UsageHistoryEvent.vue +3 -1
- 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/cancel-flow.d.ts +28 -7
- package/dist/runtime/vue/components/billing/cancel-flow.js +25 -2
- 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/NoticeLowCredits.vue +3 -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/WorkspaceCredits.vue +6 -3
- 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-auth.d.ts +13 -1
- package/dist/runtime/vue/composables/use-auth.js +4 -1
- package/dist/runtime/vue/composables/use-billing.d.ts +16 -7
- package/dist/runtime/vue/composables/use-credits.d.ts +3 -0
- package/dist/runtime/vue/composables/use-credits.js +1 -0
- 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.d.ts +5 -1
- package/dist/runtime/vue/composables/use-notifications.js +15 -4
- 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/composables/use-webhook-log.d.ts +4 -2
- package/dist/runtime/vue/organization-client.d.ts +15 -0
- package/dist/runtime/vue/organization-client.js +65 -0
- package/dist/runtime/vue/pages/gifts.vue +9 -0
- package/dist/runtime/vue/parts.d.ts +2 -1
- 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 -3
- package/dist/runtime/vue/plugins/checkout-return.js +3 -5
- package/dist/runtime/vue/plugins/first-touch.js +2 -4
- 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 +14 -6
- package/dist/runtime/vue/utils/checkout-return.js +5 -4
- package/dist/runtime/vue/utils/every-page.d.ts +10 -0
- package/dist/runtime/vue/utils/every-page.js +6 -0
- package/dist/runtime/vue/utils/login-bindings.js +1 -1
- package/dist/runtime/vue/utils/meter-unit.d.ts +14 -0
- package/dist/runtime/vue/utils/meter-unit.js +18 -0
- 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.OQMX-0U7.mjs → nuxt-backend.Bq_mhlky.mjs} +582 -61
- package/dist/shared/{nuxt-backend.CPq101Wi.mjs → nuxt-backend.D9qXcOOI.mjs} +1 -1
- package/dist/shared/{nuxt-backend.S5C2b-4I.mjs → nuxt-backend.DmZI-QSO.mjs} +2 -2
- package/dist/shared/{nuxt-backend.-uB5CGw-.mjs → nuxt-backend.G4JryO1q.mjs} +144 -32
- package/dist/shared/{nuxt-backend.2YoiKo8j.mjs → nuxt-backend.Lk2MQI2u.mjs} +6 -2
- package/dist/types.d.ts +1 -1
- package/package.json +14 -14
- package/skills/nuxt-backend/SKILL.md +3 -3
- package/skills/nuxt-backend/references/api.md +107 -27
- package/skills/nuxt-backend/references/renames.json +114 -2054
- package/skills/nuxt-backend/references/surface.json +124 -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/SKILL.md +2 -1
- package/skills/nuxt-backend-auth/references/api.md +20 -3
- package/skills/nuxt-backend-billing/SKILL.md +7 -0
- package/skills/nuxt-backend-billing/references/api.md +31 -6
- package/skills/nuxt-backend-data/SKILL.md +7 -4
- package/skills/nuxt-backend-data/references/api.md +4 -3
- package/skills/nuxt-backend-email/SKILL.md +4 -0
- package/skills/nuxt-backend-email/references/api.md +3 -2
- 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 +10 -5
- 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 -8
- package/src/convex/app.ts +16 -2
- package/src/convex/billing-launch.ts +42 -0
- package/src/convex/catalog.ts +39 -2
- package/src/convex/client/better-auth-options.ts +11 -1
- package/src/convex/client/client-address.ts +37 -0
- 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 +1267 -242
- package/src/convex/components/backend/access.ts +109 -16
- package/src/convex/components/backend/account.ts +55 -4
- package/src/convex/components/backend/adapter.ts +8 -1
- package/src/convex/components/backend/ai.ts +20 -54
- package/src/convex/components/backend/billing.ts +89 -45
- package/src/convex/components/backend/consents.ts +2 -1
- package/src/convex/components/backend/crons.ts +4 -0
- package/src/convex/components/backend/gifts.ts +13 -7
- package/src/convex/components/backend/jobs.ts +58 -13
- package/src/convex/components/backend/lifecycle.ts +17 -12
- package/src/convex/components/backend/maintenance.ts +14 -1
- package/src/convex/components/backend/moderation.ts +57 -0
- package/src/convex/components/backend/notifications.ts +22 -0
- package/src/convex/components/backend/referrals.ts +14 -16
- package/src/convex/components/backend/reports.ts +7 -7
- package/src/convex/components/backend/schema.ts +251 -163
- package/src/convex/components/backend/storage.ts +67 -10
- package/src/convex/components/backend/subscriptions.ts +8 -36
- package/src/convex/components/backend/webhooks.ts +1 -10
- package/src/convex/consent-rules.ts +0 -3
- package/src/convex/constants.ts +20 -5
- package/src/convex/email-templates.ts +124 -22
- 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/admin.ts +2 -1
- 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 +40 -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 +105 -36
- package/src/convex/integrations/ai/model-id.ts +24 -2
- package/src/convex/integrations/ai/models.ts +276 -59
- 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 +561 -49
- 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 +6 -13
- package/src/convex/integrations/ai.ts +19 -6
- package/src/convex/integrations/billing/checkout.ts +4 -4
- package/src/convex/integrations/billing/context.ts +35 -11
- package/src/convex/integrations/billing/credits.ts +23 -6
- package/src/convex/integrations/billing/customers.ts +28 -5
- package/src/convex/integrations/billing/free-plan.ts +140 -29
- package/src/convex/integrations/billing/functions.ts +37 -13
- package/src/convex/integrations/billing/gifts.ts +36 -8
- package/src/convex/integrations/billing/history.ts +2 -1
- package/src/convex/integrations/billing/lifecycle.ts +43 -8
- package/src/convex/integrations/billing/passes.ts +4 -6
- package/src/convex/integrations/billing/pricing.ts +56 -14
- package/src/convex/integrations/billing/purchase.ts +1 -2
- 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 +14 -1
- package/src/convex/integrations/billing/types/options.ts +4 -1
- package/src/convex/integrations/billing/types/records.ts +74 -4
- package/src/convex/integrations/billing/types/setup.ts +6 -5
- package/src/convex/integrations/billing/types/surface.ts +40 -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 +23 -7
- package/src/convex/integrations/email-preferences.ts +1 -1
- package/src/convex/integrations/email-sync.ts +44 -1
- 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 +80 -32
- package/src/convex/integrations/rate-limit.ts +24 -8
- package/src/convex/integrations/reports.ts +19 -6
- package/src/convex/integrations/retention.ts +73 -5
- package/src/convex/integrations/storage.ts +91 -6
- package/src/convex/integrations/webhooks.ts +1 -4
- package/src/convex/label-format.ts +2 -2
- package/src/convex/label-groups/admin.ts +28 -0
- package/src/convex/label-groups/cancelFlow.ts +7 -2
- package/src/convex/label-groups/credits.ts +17 -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 +21 -15
- package/src/convex/label-groups/pastDue.ts +1 -1
- package/src/convex/label-groups/pricing.ts +12 -8
- package/src/convex/label-groups/referral.ts +2 -2
- package/src/convex/label-groups/report.ts +10 -1
- package/src/convex/label-groups/settings.ts +4 -3
- package/src/convex/label-groups/upload.ts +2 -0
- package/src/convex/label-groups/usage.ts +2 -2
- package/src/convex/label-groups/withdrawal.ts +1 -1
- package/src/convex/label-translations.ts +141 -29
- package/src/convex/labels.ts +25 -0
- package/src/convex/legal.ts +12 -2
- package/src/convex/log.ts +14 -1
- package/src/convex/monitoring.ts +6 -4
- package/src/convex/notifications.ts +99 -13
- package/src/convex/proof.ts +43 -0
- package/src/convex/referral-rules.ts +0 -2
- 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/convex/waitlist-rules.ts +2 -22
- 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 +24 -4
- package/src/runtime/vue/components/billing/CancelFlow.vue +18 -7
- package/src/runtime/vue/components/billing/CancelFlowConfirm.vue +35 -0
- package/src/runtime/vue/components/billing/CancelFlowEnd.vue +3 -1
- package/src/runtime/vue/components/billing/CancelFlowQuestion.vue +8 -2
- 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/PricingPackCard.vue +6 -3
- package/src/runtime/vue/components/billing/PricingPlanCard.css +5 -3
- package/src/runtime/vue/components/billing/PricingPlanCard.vue +11 -2
- package/src/runtime/vue/components/billing/PricingTable.css +1 -1
- package/src/runtime/vue/components/billing/PricingTable.vue +26 -4
- 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/UsageHistoryEvent.vue +3 -1
- 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/NoticeLowCredits.vue +3 -1
- 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 +40 -16
- 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/WorkspaceCredits.vue +6 -3
- 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
|
@@ -92,6 +92,7 @@ export const tables = {
|
|
|
92
92
|
})
|
|
93
93
|
.index('accountId', ['accountId'])
|
|
94
94
|
.index('accountId_providerId', ['accountId', 'providerId'])
|
|
95
|
+
.index('accountId_providerId_userId', ['accountId', 'providerId', 'userId'])
|
|
95
96
|
.index('providerId_userId', ['providerId', 'userId'])
|
|
96
97
|
.index('userId', ['userId']),
|
|
97
98
|
verification: defineTable({
|
|
@@ -132,6 +133,8 @@ export const tables = {
|
|
|
132
133
|
privateKey: v.string(),
|
|
133
134
|
createdAt: v.number(),
|
|
134
135
|
expiresAt: v.optional(v.union(v.null(), v.number())),
|
|
136
|
+
alg: v.optional(v.union(v.null(), v.string())),
|
|
137
|
+
crv: v.optional(v.union(v.null(), v.string())),
|
|
135
138
|
}),
|
|
136
139
|
// Organization plugin: workspaces, memberships, and invitations.
|
|
137
140
|
organization: defineTable({
|
|
@@ -204,6 +207,18 @@ export const vEntitlementBenefit = v.object({
|
|
|
204
207
|
files: v.optional(v.number()),
|
|
205
208
|
repository: v.optional(v.string()),
|
|
206
209
|
});
|
|
210
|
+
/**
|
|
211
|
+
* A credit the cache added before the provider applied its event (a refund,
|
|
212
|
+
* welcome credits), kept for a few minutes (`PENDING_CREDIT_TTL_MS`): a
|
|
213
|
+
* provider read in that time, which may not count the event yet, never takes
|
|
214
|
+
* the meter below what the cache holds. See `credit` and `upsert`.
|
|
215
|
+
*/
|
|
216
|
+
export const vPendingCredit = v.object({
|
|
217
|
+
meterId: v.string(),
|
|
218
|
+
amount: v.number(),
|
|
219
|
+
externalId: v.string(),
|
|
220
|
+
at: v.number(),
|
|
221
|
+
});
|
|
207
222
|
export const vEntitlementMeter = v.object({
|
|
208
223
|
meterId: v.string(),
|
|
209
224
|
consumedUnits: v.number(),
|
|
@@ -262,52 +277,94 @@ export const vPendingSpend = v.object({
|
|
|
262
277
|
* recipient — identified by email — receives. Created at gift checkout, marked
|
|
263
278
|
* `paid` by the billing webhook, and `claimed` once the entitlement is attached
|
|
264
279
|
* to the recipient's billing entity (automatically when the recipient already
|
|
265
|
-
* has an account, otherwise on their first sign-in).
|
|
280
|
+
* has an account, otherwise on their first sign-in). The `billingGifts` row.
|
|
266
281
|
*/
|
|
267
|
-
|
|
268
|
-
|
|
282
|
+
const vGiftRow = v.object({
|
|
283
|
+
// Stored lowercased; matched case-insensitively against the claimant's email.
|
|
269
284
|
recipientEmail: v.string(),
|
|
270
285
|
purchaserUserId: v.string(),
|
|
271
286
|
purchaserEmail: v.optional(v.string()),
|
|
272
287
|
purchaserName: v.optional(v.string()),
|
|
288
|
+
// The credit pack the recipient receives: its provider product.
|
|
273
289
|
productIds: v.array(v.string()),
|
|
290
|
+
// Plain text, shown only inside the app once the recipient signs in.
|
|
274
291
|
message: v.optional(v.string()),
|
|
292
|
+
// 'pending' (checkout created) → 'paid' (the purchase order is paid and
|
|
293
|
+
// its claim discount minted) → 'claimed' (the recipient's $0 order is
|
|
294
|
+
// paid), or 'refunded' (the purchase was refunded before the claim).
|
|
275
295
|
status: v.string(),
|
|
296
|
+
// Before 0.2: the provider customer keyed by the recipient's email,
|
|
297
|
+
// which the purchase was billed to. Gifts are billed to the purchaser now.
|
|
276
298
|
billingCustomerId: v.optional(v.string()),
|
|
299
|
+
// The purchase order, paid by the purchaser's own billing entity.
|
|
277
300
|
billingOrderId: v.optional(v.string()),
|
|
278
301
|
purchaserEntityId: v.optional(v.string()),
|
|
302
|
+
// The pack's catalog key, and the private gift product the purchaser bought.
|
|
279
303
|
pack: v.optional(v.string()),
|
|
280
304
|
giftProductId: v.optional(v.string()),
|
|
305
|
+
// What the purchase order charged, in the currency's smallest unit.
|
|
281
306
|
amount: v.optional(v.number()),
|
|
282
307
|
currency: v.optional(v.string()),
|
|
308
|
+
// The single-use 100% discount the recipient claims the pack with.
|
|
283
309
|
discountId: v.optional(v.string()),
|
|
310
|
+
// The claim checkout in flight: who opened it, for which entity. A plan
|
|
311
|
+
// pass's claim holds the gift until `claimingUntil`, while it switches the
|
|
312
|
+
// workspace at the provider.
|
|
284
313
|
claimingEntityId: v.optional(v.string()),
|
|
285
314
|
claimingUserId: v.optional(v.string()),
|
|
315
|
+
claimingUntil: v.optional(v.number()),
|
|
316
|
+
// The purchaser's cancellation in flight, until then: no claim starts meanwhile.
|
|
317
|
+
cancelingUntil: v.optional(v.number()),
|
|
286
318
|
claimOrderId: v.optional(v.string()),
|
|
287
319
|
claimedByUserId: v.optional(v.string()),
|
|
320
|
+
// The entity the credits landed on: workspace id or user id.
|
|
288
321
|
claimedEntityId: v.optional(v.string()),
|
|
289
322
|
createdAt: v.number(),
|
|
290
323
|
paidAt: v.optional(v.number()),
|
|
291
324
|
notifiedAt: v.optional(v.number()),
|
|
292
325
|
claimedAt: v.optional(v.number()),
|
|
293
326
|
refundedAt: v.optional(v.number()),
|
|
327
|
+
// A plan pass (the gift is a plan for `months` months, not a pack): the
|
|
328
|
+
// plan's catalog key and the length the purchaser paid for.
|
|
294
329
|
plan: v.optional(v.string()),
|
|
295
330
|
months: v.optional(v.number()),
|
|
331
|
+
// When the notice goes out: set when the purchase is paid (the moment
|
|
332
|
+
// it is paid, or the date the purchaser chose). The gift is the
|
|
333
|
+
// recipient's to see and claim once `deliveredAt` is stamped; a row
|
|
334
|
+
// with neither is a gift paid before delivery dates, delivered when paid.
|
|
296
335
|
deliverAt: v.optional(v.number()),
|
|
297
336
|
deliveredAt: v.optional(v.number()),
|
|
337
|
+
// The last notice sent (the first, a reminder or a resend), and how many.
|
|
298
338
|
noticedAt: v.optional(v.number()),
|
|
299
339
|
noticeCount: v.optional(v.number()),
|
|
340
|
+
// How many times the purchaser changed the address: each address's notices carry their own idempotency keys.
|
|
300
341
|
recipientChanges: v.optional(v.number()),
|
|
342
|
+
// The one reminder, a week after delivery.
|
|
301
343
|
remindedAt: v.optional(v.number()),
|
|
344
|
+
// A pass once claimed: the free subscription it switched, when it began
|
|
345
|
+
// and ends (the package keeps the end date), the scheduled return to the
|
|
346
|
+
// free plan, the ending notice and the end itself.
|
|
302
347
|
passSubscriptionId: v.optional(v.string()),
|
|
303
348
|
passStartedAt: v.optional(v.number()),
|
|
304
349
|
passEndsAt: v.optional(v.number()),
|
|
350
|
+
// From when the return may be booked: once the pass's last billing cycle began.
|
|
351
|
+
passReturnFrom: v.optional(v.number()),
|
|
305
352
|
passReturnScheduledAt: v.optional(v.number()),
|
|
306
353
|
passNoticedAt: v.optional(v.number()),
|
|
307
354
|
passEndedAt: v.optional(v.number()),
|
|
355
|
+
// A reverse trial: the pass a new workspace started on,
|
|
356
|
+
// with no purchaser (`status` 'trial'). `recipientEmail` holds its
|
|
357
|
+
// owner's address with plus tags and dots taken out, so an address
|
|
358
|
+
// starts one.
|
|
308
359
|
reverseTrial: v.optional(v.boolean()),
|
|
360
|
+
// A referral reward: the pass a referrer on the free plan got for
|
|
361
|
+
// free months, with no purchaser (`status` 'reward'). `rewardId` is the
|
|
362
|
+
// referral it came from; `recipientEmail` is empty.
|
|
363
|
+
rewardId: v.optional(v.string()),
|
|
309
364
|
});
|
|
310
|
-
/** A
|
|
365
|
+
/** A gift as the component's reads return it: its id, without the claim and cancel holds or the reward it came from. */
|
|
366
|
+
export const vGift = vGiftRow.omit('claimingUntil', 'cancelingUntil', 'passReturnFrom', 'rewardId').extend({ id: v.string() });
|
|
367
|
+
/** A save offer's terms, as the cancel flow made it. */
|
|
311
368
|
export const vSaveOfferTerms = v.object({
|
|
312
369
|
kind: v.union(v.literal('pause'), v.literal('downgrade'), v.literal('discount')),
|
|
313
370
|
months: v.optional(v.number()),
|
|
@@ -316,6 +373,21 @@ export const vSaveOfferTerms = v.object({
|
|
|
316
373
|
productId: v.optional(v.string()),
|
|
317
374
|
discount: v.optional(v.string()),
|
|
318
375
|
});
|
|
376
|
+
/** A renewing checkout's consent proof, as the `billingRenewalConsents` table stores it. */
|
|
377
|
+
export const vRenewalConsent = v.object({
|
|
378
|
+
checkoutId: v.string(),
|
|
379
|
+
entityId: v.string(),
|
|
380
|
+
userId: v.optional(v.string()),
|
|
381
|
+
productId: v.string(),
|
|
382
|
+
amount: v.number(),
|
|
383
|
+
currency: v.string(),
|
|
384
|
+
interval: v.string(),
|
|
385
|
+
intervalCount: v.number(),
|
|
386
|
+
termsVersion: v.optional(v.string()),
|
|
387
|
+
createdAt: v.number(),
|
|
388
|
+
subscriptionId: v.optional(v.string()),
|
|
389
|
+
consentedAt: v.optional(v.number()),
|
|
390
|
+
});
|
|
319
391
|
export const billingTables = {
|
|
320
392
|
billingEntitlements: defineTable({
|
|
321
393
|
// The billing entity id — the workspace id (billTo: 'workspace', the
|
|
@@ -328,10 +400,24 @@ export const billingTables = {
|
|
|
328
400
|
// In-flight spend reservations; see vPendingSpend. Optional so existing
|
|
329
401
|
// rows validate.
|
|
330
402
|
pendingSpends: v.optional(v.array(vPendingSpend)),
|
|
403
|
+
// Credits added ahead of the provider; see vPendingCredit.
|
|
404
|
+
pendingCredits: v.optional(v.array(vPendingCredit)),
|
|
331
405
|
updatedAt: v.number(),
|
|
332
406
|
})
|
|
333
407
|
.index('userId', ['userId'])
|
|
334
408
|
.index('customerId', ['customerId']),
|
|
409
|
+
// Welcome credits given, one row per person: the hash of the owner's
|
|
410
|
+
// address (tags and dots taken out, as the reverse trial keys it, never the
|
|
411
|
+
// address) and the billing entity that got them. A second workspace of the
|
|
412
|
+
// same owner, and an account made again with the same address, get none.
|
|
413
|
+
billingWelcomes: defineTable({
|
|
414
|
+
address: v.string(),
|
|
415
|
+
/** The entity that got them; empty once an account's erasure took that entity, the digest kept. */
|
|
416
|
+
entityId: v.string(),
|
|
417
|
+
at: v.number(),
|
|
418
|
+
})
|
|
419
|
+
.index('address', ['address'])
|
|
420
|
+
.index('entityId', ['entityId']),
|
|
335
421
|
// Live benefit metadata, snapshotted per benefit (not per grant): feature
|
|
336
422
|
// gating joins this at read time, so a `benefit.updated` webhook patches
|
|
337
423
|
// one row here and every `useFeatures()` subscriber updates reactively —
|
|
@@ -404,89 +490,7 @@ export const billingTables = {
|
|
|
404
490
|
})
|
|
405
491
|
.index('entityId', ['entityId'])
|
|
406
492
|
.index('at', ['at']),
|
|
407
|
-
billingGifts: defineTable(
|
|
408
|
-
// Stored lowercased; matched case-insensitively against the claimant's email.
|
|
409
|
-
recipientEmail: v.string(),
|
|
410
|
-
purchaserUserId: v.string(),
|
|
411
|
-
purchaserEmail: v.optional(v.string()),
|
|
412
|
-
purchaserName: v.optional(v.string()),
|
|
413
|
-
// The credit pack the recipient receives: its provider product.
|
|
414
|
-
productIds: v.array(v.string()),
|
|
415
|
-
// Plain text, shown only inside the app once the recipient signs in.
|
|
416
|
-
message: v.optional(v.string()),
|
|
417
|
-
// 'pending' (checkout created) → 'paid' (the purchase order is paid and
|
|
418
|
-
// its claim discount minted) → 'claimed' (the recipient's $0 order is
|
|
419
|
-
// paid), or 'refunded' (the purchase was refunded before the claim).
|
|
420
|
-
status: v.string(),
|
|
421
|
-
// Before 0.2: the provider customer keyed by the recipient's email,
|
|
422
|
-
// which the purchase was billed to. Gifts are billed to the purchaser now.
|
|
423
|
-
billingCustomerId: v.optional(v.string()),
|
|
424
|
-
// The purchase order, paid by the purchaser's own billing entity.
|
|
425
|
-
billingOrderId: v.optional(v.string()),
|
|
426
|
-
purchaserEntityId: v.optional(v.string()),
|
|
427
|
-
// The pack's catalog key, and the private gift product the purchaser bought.
|
|
428
|
-
pack: v.optional(v.string()),
|
|
429
|
-
giftProductId: v.optional(v.string()),
|
|
430
|
-
// What the purchase order charged, in the currency's smallest unit.
|
|
431
|
-
amount: v.optional(v.number()),
|
|
432
|
-
currency: v.optional(v.string()),
|
|
433
|
-
// The single-use 100% discount the recipient claims the pack with.
|
|
434
|
-
discountId: v.optional(v.string()),
|
|
435
|
-
// The claim checkout in flight: who opened it, for which entity. A plan
|
|
436
|
-
// pass's claim holds the gift until `claimingUntil`, while it switches the
|
|
437
|
-
// workspace at the provider.
|
|
438
|
-
claimingEntityId: v.optional(v.string()),
|
|
439
|
-
claimingUserId: v.optional(v.string()),
|
|
440
|
-
claimingUntil: v.optional(v.number()),
|
|
441
|
-
// The purchaser's cancellation in flight, until then: no claim starts meanwhile.
|
|
442
|
-
cancelingUntil: v.optional(v.number()),
|
|
443
|
-
claimOrderId: v.optional(v.string()),
|
|
444
|
-
claimedByUserId: v.optional(v.string()),
|
|
445
|
-
// The entity the credits landed on: workspace id or user id.
|
|
446
|
-
claimedEntityId: v.optional(v.string()),
|
|
447
|
-
createdAt: v.number(),
|
|
448
|
-
paidAt: v.optional(v.number()),
|
|
449
|
-
notifiedAt: v.optional(v.number()),
|
|
450
|
-
claimedAt: v.optional(v.number()),
|
|
451
|
-
refundedAt: v.optional(v.number()),
|
|
452
|
-
// A plan pass (the gift is a plan for `months` months, not a pack): the
|
|
453
|
-
// plan's catalog key and the length the purchaser paid for.
|
|
454
|
-
plan: v.optional(v.string()),
|
|
455
|
-
months: v.optional(v.number()),
|
|
456
|
-
// When the notice goes out: set when the purchase is paid (the moment
|
|
457
|
-
// it is paid, or the date the purchaser chose). The gift is the
|
|
458
|
-
// recipient's to see and claim once `deliveredAt` is stamped; a row
|
|
459
|
-
// with neither is a gift paid before delivery dates, delivered when paid.
|
|
460
|
-
deliverAt: v.optional(v.number()),
|
|
461
|
-
deliveredAt: v.optional(v.number()),
|
|
462
|
-
// The last notice sent (the first, a reminder or a resend), and how many.
|
|
463
|
-
noticedAt: v.optional(v.number()),
|
|
464
|
-
noticeCount: v.optional(v.number()),
|
|
465
|
-
// How many times the purchaser changed the address: each address's notices carry their own idempotency keys.
|
|
466
|
-
recipientChanges: v.optional(v.number()),
|
|
467
|
-
// The one reminder, a week after delivery.
|
|
468
|
-
remindedAt: v.optional(v.number()),
|
|
469
|
-
// A pass once claimed: the free subscription it switched, when it began
|
|
470
|
-
// and ends (the package keeps the end date), the scheduled return to the
|
|
471
|
-
// free plan, the ending notice and the end itself.
|
|
472
|
-
passSubscriptionId: v.optional(v.string()),
|
|
473
|
-
passStartedAt: v.optional(v.number()),
|
|
474
|
-
passEndsAt: v.optional(v.number()),
|
|
475
|
-
// From when the return may be booked: once the pass's last billing cycle began.
|
|
476
|
-
passReturnFrom: v.optional(v.number()),
|
|
477
|
-
passReturnScheduledAt: v.optional(v.number()),
|
|
478
|
-
passNoticedAt: v.optional(v.number()),
|
|
479
|
-
passEndedAt: v.optional(v.number()),
|
|
480
|
-
// A reverse trial (LIFECYCLE): the pass a new workspace started on,
|
|
481
|
-
// with no purchaser (`status` 'trial'). `recipientEmail` holds its
|
|
482
|
-
// owner's address with plus tags and dots taken out, so an address
|
|
483
|
-
// starts one.
|
|
484
|
-
reverseTrial: v.optional(v.boolean()),
|
|
485
|
-
// A referral reward (REF): the pass a referrer on the free plan got for
|
|
486
|
-
// free months, with no purchaser (`status` 'reward'). `rewardId` is the
|
|
487
|
-
// referral it came from; `recipientEmail` is empty.
|
|
488
|
-
rewardId: v.optional(v.string()),
|
|
489
|
-
})
|
|
493
|
+
billingGifts: defineTable(vGiftRow)
|
|
490
494
|
.index('recipientEmail', ['recipientEmail'])
|
|
491
495
|
.index('recipientEmail_status', ['recipientEmail', 'status'])
|
|
492
496
|
.index('recipientEmail_createdAt', ['recipientEmail', 'createdAt'])
|
|
@@ -514,7 +518,7 @@ export const billingTables = {
|
|
|
514
518
|
wake: v.string(),
|
|
515
519
|
updatedAt: v.number(),
|
|
516
520
|
}),
|
|
517
|
-
// The cancel flow's save offers
|
|
521
|
+
// The cancel flow's save offers: one per cancellation, and
|
|
518
522
|
// one per billing entity in 12 months. The browser names an offer by its
|
|
519
523
|
// id; the server finds what it made here, for that subscription, and
|
|
520
524
|
// takes it once.
|
|
@@ -533,20 +537,7 @@ export const billingTables = {
|
|
|
533
537
|
// (what it showed: the plan, the price and its interval, the terms
|
|
534
538
|
// version, who), confirmed when the subscription it started arrives, and
|
|
535
539
|
// deleted three years after. An unconfirmed row goes after two days.
|
|
536
|
-
billingRenewalConsents: defineTable(
|
|
537
|
-
checkoutId: v.string(),
|
|
538
|
-
entityId: v.string(),
|
|
539
|
-
userId: v.optional(v.string()),
|
|
540
|
-
productId: v.string(),
|
|
541
|
-
amount: v.number(),
|
|
542
|
-
currency: v.string(),
|
|
543
|
-
interval: v.string(),
|
|
544
|
-
intervalCount: v.number(),
|
|
545
|
-
termsVersion: v.optional(v.string()),
|
|
546
|
-
createdAt: v.number(),
|
|
547
|
-
subscriptionId: v.optional(v.string()),
|
|
548
|
-
consentedAt: v.optional(v.number()),
|
|
549
|
-
})
|
|
540
|
+
billingRenewalConsents: defineTable(vRenewalConsent)
|
|
550
541
|
.index('checkoutId', ['checkoutId'])
|
|
551
542
|
.index('entityId', ['entityId'])
|
|
552
543
|
.index('userId', ['userId'])
|
|
@@ -576,6 +567,76 @@ export const billingTables = {
|
|
|
576
567
|
.index('userId', ['userId'])
|
|
577
568
|
.index('at', ['at']),
|
|
578
569
|
};
|
|
570
|
+
/** A metered stream's request, as the `aiRequests` table stores it. */
|
|
571
|
+
export const vAiRequest = v.object({
|
|
572
|
+
streamId: v.string(),
|
|
573
|
+
/** Which `ai.stream({ name })` definition drives this request. */
|
|
574
|
+
name: v.string(),
|
|
575
|
+
/** The billing entity (workspace/user) the credits reserve against. */
|
|
576
|
+
entityId: v.string(),
|
|
577
|
+
/** The signed-in caller (for member attribution inside workspaces). */
|
|
578
|
+
userId: v.string(),
|
|
579
|
+
/** JSON-encoded handler args. */
|
|
580
|
+
args: v.string(),
|
|
581
|
+
meterId: v.optional(v.string()),
|
|
582
|
+
cost: v.number(),
|
|
583
|
+
externalId: v.string(),
|
|
584
|
+
status: v.union(v.literal('reserved'), v.literal('streaming'), v.literal('settled'), v.literal('released')),
|
|
585
|
+
createdAt: v.number(),
|
|
586
|
+
});
|
|
587
|
+
/** A knowledge document, as the `aiDocuments` table stores it. */
|
|
588
|
+
export const vAiDocument = v.object({
|
|
589
|
+
/** The knowledge store: its embedding model and dimension. */
|
|
590
|
+
store: v.string(),
|
|
591
|
+
/** The namespace: the billing entity whose members find it, or `app`. */
|
|
592
|
+
owner: v.string(),
|
|
593
|
+
/** The member who added it; empty for the app's own. */
|
|
594
|
+
addedBy: v.string(),
|
|
595
|
+
title: v.string(),
|
|
596
|
+
key: v.optional(v.string()),
|
|
597
|
+
status: v.union(v.literal('pending'), v.literal('ready'), v.literal('failed')),
|
|
598
|
+
entryId: v.optional(v.string()),
|
|
599
|
+
characters: v.number(),
|
|
600
|
+
createdAt: v.number(),
|
|
601
|
+
remove: v.string(),
|
|
602
|
+
read: v.string(),
|
|
603
|
+
namespaces: v.optional(v.string()),
|
|
604
|
+
removeNamespace: v.optional(v.string()),
|
|
605
|
+
});
|
|
606
|
+
/** A flag of the safety classifier, as `aiFlags` keeps it beside when it expires. */
|
|
607
|
+
export const vAiFlag = {
|
|
608
|
+
userId: v.optional(v.string()),
|
|
609
|
+
owner: v.optional(v.string()),
|
|
610
|
+
subject: v.optional(v.string()),
|
|
611
|
+
stage: v.optional(v.string()),
|
|
612
|
+
categories: v.array(v.string()),
|
|
613
|
+
/** Refused under the app's `moderation.block`, or only recorded. */
|
|
614
|
+
blocked: v.boolean(),
|
|
615
|
+
/** One of the app's `moderation.escalate` categories: for an administrator to look at. */
|
|
616
|
+
escalate: v.boolean(),
|
|
617
|
+
/** The classifier that flagged it. */
|
|
618
|
+
model: v.string(),
|
|
619
|
+
/** The providers' own codes for what they found, beside the shared `categories`. */
|
|
620
|
+
codes: v.optional(v.array(v.string())),
|
|
621
|
+
/** Every provider the check asked, in order: the text classifier, the image providers, a second opinion, a known-abuse match. */
|
|
622
|
+
providers: v.optional(v.array(v.string())),
|
|
623
|
+
/** The combined score per shared category, and whether any provider could judge it. */
|
|
624
|
+
scores: v.optional(v.record(v.string(), v.object({ score: v.number(), supported: v.boolean() }))),
|
|
625
|
+
/** The thresholds the check ran on. */
|
|
626
|
+
thresholds: v.optional(v.record(v.string(), v.number())),
|
|
627
|
+
/** The app's moderation policy version (`moderation.policy.version`), named in its statement of reasons. */
|
|
628
|
+
policyVersion: v.optional(v.string()),
|
|
629
|
+
/** Decided by automated means: every check is, until an administrator reviews it. */
|
|
630
|
+
automated: v.optional(v.boolean()),
|
|
631
|
+
/** A known-abuse match's evidence: the image's SHA-256, never the image. */
|
|
632
|
+
hash: v.optional(v.string()),
|
|
633
|
+
/** The playbook a match follows: `csam` for known child sexual abuse material. */
|
|
634
|
+
playbook: v.optional(v.literal('csam')),
|
|
635
|
+
/** The policy it was judged under, as `setupAi({ moderation })` set it then. */
|
|
636
|
+
policy: v.optional(v.string()),
|
|
637
|
+
/** Kept through an erasure until it expires, under the pseudonym: escalated, or child sexual exploitation refused. */
|
|
638
|
+
legalHold: v.optional(v.boolean()),
|
|
639
|
+
};
|
|
579
640
|
/**
|
|
580
641
|
* Metered-stream request plumbing for `setupAi().stream` — the HTTP stream
|
|
581
642
|
* endpoint can't carry Convex args, so `start` records the request (args,
|
|
@@ -587,22 +648,7 @@ export const billingTables = {
|
|
|
587
648
|
* prune.
|
|
588
649
|
*/
|
|
589
650
|
export const aiTables = {
|
|
590
|
-
aiRequests: defineTable(
|
|
591
|
-
streamId: v.string(),
|
|
592
|
-
/** Which `ai.stream({ name })` definition drives this request. */
|
|
593
|
-
name: v.string(),
|
|
594
|
-
/** The billing entity (workspace/user) the credits reserve against. */
|
|
595
|
-
entityId: v.string(),
|
|
596
|
-
/** The signed-in caller (for member attribution inside workspaces). */
|
|
597
|
-
userId: v.string(),
|
|
598
|
-
/** JSON-encoded handler args. */
|
|
599
|
-
args: v.string(),
|
|
600
|
-
meterId: v.optional(v.string()),
|
|
601
|
-
cost: v.number(),
|
|
602
|
-
externalId: v.string(),
|
|
603
|
-
status: v.union(v.literal('reserved'), v.literal('streaming'), v.literal('settled'), v.literal('released')),
|
|
604
|
-
createdAt: v.number(),
|
|
605
|
-
})
|
|
651
|
+
aiRequests: defineTable(vAiRequest)
|
|
606
652
|
.index('streamId', ['streamId'])
|
|
607
653
|
// Maintenance: finished requests past their window.
|
|
608
654
|
.index('status_createdAt', ['status', 'createdAt'])
|
|
@@ -641,24 +687,7 @@ export const aiTables = {
|
|
|
641
687
|
* `namespaces` and `removeNamespace` find its owner's namespace there
|
|
642
688
|
* and delete it, passages and all, when the owner goes.
|
|
643
689
|
*/
|
|
644
|
-
aiDocuments: defineTable(
|
|
645
|
-
/** The knowledge store: its embedding model and dimension. */
|
|
646
|
-
store: v.string(),
|
|
647
|
-
/** The namespace: the billing entity whose members find it, or `app`. */
|
|
648
|
-
owner: v.string(),
|
|
649
|
-
/** The member who added it; empty for the app's own. */
|
|
650
|
-
addedBy: v.string(),
|
|
651
|
-
title: v.string(),
|
|
652
|
-
key: v.optional(v.string()),
|
|
653
|
-
status: v.union(v.literal('pending'), v.literal('ready'), v.literal('failed')),
|
|
654
|
-
entryId: v.optional(v.string()),
|
|
655
|
-
characters: v.number(),
|
|
656
|
-
createdAt: v.number(),
|
|
657
|
-
remove: v.string(),
|
|
658
|
-
read: v.string(),
|
|
659
|
-
namespaces: v.optional(v.string()),
|
|
660
|
-
removeNamespace: v.optional(v.string()),
|
|
661
|
-
})
|
|
690
|
+
aiDocuments: defineTable(vAiDocument)
|
|
662
691
|
.index('store_owner_createdAt', ['store', 'owner', 'createdAt'])
|
|
663
692
|
.index('store_owner_key', ['store', 'owner', 'key'])
|
|
664
693
|
.index('owner', ['owner'])
|
|
@@ -686,6 +715,18 @@ export const aiTables = {
|
|
|
686
715
|
.index('jobId', ['jobId'])
|
|
687
716
|
// A workspace's erasure.
|
|
688
717
|
.index('owner', ['owner']),
|
|
718
|
+
/**
|
|
719
|
+
* What the safety classifier flagged (`setupAi({ moderation })`):
|
|
720
|
+
* categories only, never the content, until `expiresAt` (the app's
|
|
721
|
+
* `moderation.log.days`). `userId` is who the content came from, `owner`
|
|
722
|
+
* the billing entity, `subject` and `stage` the app's id of what was
|
|
723
|
+
* checked and where. The admin console's Moderation tab lists them.
|
|
724
|
+
*/
|
|
725
|
+
aiFlags: defineTable({ ...vAiFlag, expiresAt: v.number() })
|
|
726
|
+
.index('by_expiresAt', ['expiresAt'])
|
|
727
|
+
.index('by_userId', ['userId'])
|
|
728
|
+
.index('by_owner', ['owner'])
|
|
729
|
+
.index('by_escalate', ['escalate']),
|
|
689
730
|
/**
|
|
690
731
|
* What AI cost, per person per UTC day: the job queue's steps, metered
|
|
691
732
|
* actions, streams, chat replies and knowledge embeddings, each added as
|
|
@@ -728,6 +769,8 @@ export const aiTables = {
|
|
|
728
769
|
})
|
|
729
770
|
.index('by_day_and_shard', ['day', 'shard']),
|
|
730
771
|
};
|
|
772
|
+
/** How a webhook delivery ended, as the delivery log records it. */
|
|
773
|
+
export const vDeliveryOutcome = v.union(v.literal('ok'), v.literal('invalid_signature'), v.literal('unknown_type'), v.literal('handler_error'), v.literal('duplicate'), v.literal('oversized'), v.literal('missing_secret'));
|
|
731
774
|
/**
|
|
732
775
|
* The webhook delivery log (see `webhooks.ts`) — powers redelivery dedupe and
|
|
733
776
|
* the DevTools Webhooks page, never a source of truth. A delivery whose
|
|
@@ -743,7 +786,7 @@ export const webhookTables = {
|
|
|
743
786
|
type: v.optional(v.string()),
|
|
744
787
|
// The tallied outcomes stay in the union for rows written before they
|
|
745
788
|
// were tallied; the trim ages them out with the rest.
|
|
746
|
-
outcome:
|
|
789
|
+
outcome: vDeliveryOutcome,
|
|
747
790
|
note: v.optional(v.string()),
|
|
748
791
|
receivedAt: v.number(),
|
|
749
792
|
/** When an administrator last asked the provider to send this delivery again (`replayWebhookDelivery`). */
|
|
@@ -1129,8 +1172,11 @@ export const storageTables = {
|
|
|
1129
1172
|
/** Set when an intimate-image removal named it while it was checked: the check blocks its stripped bytes and removes it with their copies. */
|
|
1130
1173
|
removal: v.optional(v.object({ decision: v.optional(v.id('reportDecisions')) })),
|
|
1131
1174
|
createdAt: v.number(),
|
|
1175
|
+
/** When the app said it goes (`storage.expire`), epoch ms: the component's maintenance deletes it within the hour after. */
|
|
1176
|
+
expiresAt: v.optional(v.number()),
|
|
1132
1177
|
})
|
|
1133
1178
|
.index('storageId', ['storageId'])
|
|
1179
|
+
.index('expiresAt', ['expiresAt'])
|
|
1134
1180
|
.index('servedId', ['servedId'])
|
|
1135
1181
|
.index('sha256', ['sha256'])
|
|
1136
1182
|
.index('userId_workspaceId', ['userId', 'workspaceId'])
|
|
@@ -1151,6 +1197,15 @@ export const storageTables = {
|
|
|
1151
1197
|
source: v.union(v.literal('files'), v.literal('bytes')),
|
|
1152
1198
|
})
|
|
1153
1199
|
.index('key', ['key']),
|
|
1200
|
+
/**
|
|
1201
|
+
* The URL clock: one row its cron moves every half hour. A query that
|
|
1202
|
+
* signs a URL shorter than a day reads it and counts the expiry from it,
|
|
1203
|
+
* so a live query runs again and its page holds fresh URLs before the old
|
|
1204
|
+
* ones expire, and answers the same URL between steps.
|
|
1205
|
+
*/
|
|
1206
|
+
urlClock: defineTable({
|
|
1207
|
+
tickedAt: v.number(),
|
|
1208
|
+
}),
|
|
1154
1209
|
shareLinks: defineTable({
|
|
1155
1210
|
/** The app's table the shared row is in. */
|
|
1156
1211
|
table: v.string(),
|
|
@@ -1166,6 +1221,10 @@ export const storageTables = {
|
|
|
1166
1221
|
.index('tokenHash', ['tokenHash'])
|
|
1167
1222
|
.index('sharedBy', ['sharedBy']),
|
|
1168
1223
|
};
|
|
1224
|
+
/** What a report decision did to the content. */
|
|
1225
|
+
export const vDecisionAction = v.union(v.literal('hidden'), v.literal('dismissed'));
|
|
1226
|
+
/** What a report decision rests on: the law, or the app's terms. */
|
|
1227
|
+
export const vDecisionGround = v.union(v.literal('illegal'), v.literal('terms'));
|
|
1169
1228
|
/** Why someone reported content: the one-click reasons, and the notice form's legal ones. */
|
|
1170
1229
|
export const vReportReason = v.union(v.literal('abuse'), v.literal('sexual'), v.literal('violence'), v.literal('spam'), v.literal('intimate'), v.literal('child_abuse'), v.literal('illegal'), v.literal('other'));
|
|
1171
1230
|
/**
|
|
@@ -1243,11 +1302,11 @@ export const reportTables = {
|
|
|
1243
1302
|
subject: v.optional(v.id('reportSubjects')),
|
|
1244
1303
|
/** The notice decided, for one the app could not place. */
|
|
1245
1304
|
notice: v.optional(v.id('reports')),
|
|
1246
|
-
action:
|
|
1305
|
+
action: vDecisionAction,
|
|
1247
1306
|
/** The facts and the term or law it rests on, as the administrator wrote them. */
|
|
1248
1307
|
reason: v.string(),
|
|
1249
1308
|
/** Whether the content broke the law or the app's terms. */
|
|
1250
|
-
ground:
|
|
1309
|
+
ground: vDecisionGround,
|
|
1251
1310
|
/** The administrator who decided. */
|
|
1252
1311
|
by: v.string(),
|
|
1253
1312
|
at: v.number(),
|
|
@@ -1351,6 +1410,10 @@ export const jobTables = {
|
|
|
1351
1410
|
refunded: v.boolean(),
|
|
1352
1411
|
/** When its charge began: from then on the hold is the charge's to settle or let go. */
|
|
1353
1412
|
charging: v.optional(v.number()),
|
|
1413
|
+
/** What `job.charge` charged, for a kind charged by output (at most `cost`): what a refund gives back. */
|
|
1414
|
+
price: v.optional(v.number()),
|
|
1415
|
+
/** Put in line `{ free: true }`: it holds, charges and counts nothing. */
|
|
1416
|
+
free: v.optional(v.boolean()),
|
|
1354
1417
|
/**
|
|
1355
1418
|
* A charged job that ended owing its credits back: `pending` while its
|
|
1356
1419
|
* refund is tried (the latest try due at `refundAt`), `given_up` after
|
|
@@ -1445,6 +1508,23 @@ export const monitoringTables = {
|
|
|
1445
1508
|
.index('by_alert_and_period', ['alert', 'period'])
|
|
1446
1509
|
.index('by_at', ['at']),
|
|
1447
1510
|
};
|
|
1511
|
+
/** A consent decision, as the `consents` table stores it. */
|
|
1512
|
+
export const vConsent = v.object({
|
|
1513
|
+
userId: v.optional(v.string()),
|
|
1514
|
+
/** SHA-256 of the lower-cased address, for a decision given before the account existed. */
|
|
1515
|
+
emailHash: v.optional(v.string()),
|
|
1516
|
+
kind: v.string(),
|
|
1517
|
+
version: v.string(),
|
|
1518
|
+
/** `true` a grant, `false` a withdrawal. */
|
|
1519
|
+
granted: v.boolean(),
|
|
1520
|
+
at: v.number(),
|
|
1521
|
+
/** Where it came from: `sign-up`, `prompt`, `settings`, `waitlist` or `topic`. */
|
|
1522
|
+
source: v.string(),
|
|
1523
|
+
/** The words the person agreed to, when the form showed its own (the launch-news box). */
|
|
1524
|
+
text: v.optional(v.string()),
|
|
1525
|
+
/** What the decision came with: `checkout:<id>` for a topic's soft opt-in at checkout. */
|
|
1526
|
+
reference: v.optional(v.string()),
|
|
1527
|
+
});
|
|
1448
1528
|
/**
|
|
1449
1529
|
* The consent ledger (see `consents.ts`): one row per decision, a grant or a
|
|
1450
1530
|
* withdrawal, of one kind at one version, never overwritten, so the history
|
|
@@ -1453,22 +1533,7 @@ export const monitoringTables = {
|
|
|
1453
1533
|
* signs up.
|
|
1454
1534
|
*/
|
|
1455
1535
|
export const consentTables = {
|
|
1456
|
-
consents: defineTable(
|
|
1457
|
-
userId: v.optional(v.string()),
|
|
1458
|
-
/** SHA-256 of the lower-cased address, for a decision given before the account existed. */
|
|
1459
|
-
emailHash: v.optional(v.string()),
|
|
1460
|
-
kind: v.string(),
|
|
1461
|
-
version: v.string(),
|
|
1462
|
-
/** `true` a grant, `false` a withdrawal. */
|
|
1463
|
-
granted: v.boolean(),
|
|
1464
|
-
at: v.number(),
|
|
1465
|
-
/** Where it came from: `sign-up`, `prompt`, `settings`, `waitlist` or `topic`. */
|
|
1466
|
-
source: v.string(),
|
|
1467
|
-
/** The words the person agreed to, when the form showed its own (the launch-news box). */
|
|
1468
|
-
text: v.optional(v.string()),
|
|
1469
|
-
/** What the decision came with: `checkout:<id>` for a topic's soft opt-in at checkout. */
|
|
1470
|
-
reference: v.optional(v.string()),
|
|
1471
|
-
})
|
|
1536
|
+
consents: defineTable(vConsent)
|
|
1472
1537
|
.index('userId_kind_at', ['userId', 'kind', 'at'])
|
|
1473
1538
|
.index('userId_at', ['userId', 'at'])
|
|
1474
1539
|
.index('emailHash_at', ['emailHash', 'at']),
|
|
@@ -1506,11 +1571,24 @@ export const accessTables = {
|
|
|
1506
1571
|
revokedAt: v.optional(v.number()),
|
|
1507
1572
|
/** The administrator who made it; absent for one made by server code. */
|
|
1508
1573
|
createdBy: v.optional(v.string()),
|
|
1574
|
+
/**
|
|
1575
|
+
* The member a member ticket belongs to (`access.memberTickets`): an access link the member
|
|
1576
|
+
* reads back and shares while the app is closed. Its token is derived from the member and its
|
|
1577
|
+
* expiry under the auth secret, so only the hash is kept, as for any link.
|
|
1578
|
+
*/
|
|
1579
|
+
holder: v.optional(v.string()),
|
|
1580
|
+
/**
|
|
1581
|
+
* A member ticket's `expiresAt` again, so the Access tab lists the member tickets apart and
|
|
1582
|
+
* the maintenance sweep removes each 30 days after it ended. Absent on an administrator's code or link.
|
|
1583
|
+
*/
|
|
1584
|
+
heldUntil: v.optional(v.number()),
|
|
1509
1585
|
createdAt: v.number(),
|
|
1510
1586
|
})
|
|
1511
1587
|
.index('tokenHash', ['tokenHash'])
|
|
1512
1588
|
.index('createdAt', ['createdAt'])
|
|
1513
1589
|
.index('createdBy', ['createdBy'])
|
|
1590
|
+
.index('holder', ['holder', 'createdAt'])
|
|
1591
|
+
.index('heldUntil', ['heldUntil'])
|
|
1514
1592
|
.index('revokedAt_keyVersion', ['revokedAt', 'keyVersion']),
|
|
1515
1593
|
accessAdmissions: defineTable({
|
|
1516
1594
|
/** The address, trimmed and lower-cased. */
|