nuxt-backend 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/catalog.mjs +1 -1
- package/dist/chunks/doctor.mjs +71 -12
- 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 +7 -5
- package/dist/cli.mjs +122 -23
- package/dist/convex/account-data.d.ts +0 -2
- package/dist/convex/account-data.d.ts.map +1 -1
- package/dist/convex/account-data.js +0 -4
- package/dist/convex/account-data.js.map +1 -1
- package/dist/convex/catalog.d.ts +22 -0
- 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/index.d.ts +34 -2
- package/dist/convex/client/index.d.ts.map +1 -1
- package/dist/convex/components/backend/_generated/component.d.ts +6 -0
- package/dist/convex/components/backend/_generated/component.d.ts.map +1 -1
- package/dist/convex/components/backend/account.d.ts +6 -6
- package/dist/convex/components/backend/account.d.ts.map +1 -1
- package/dist/convex/components/backend/account.js +6 -2
- package/dist/convex/components/backend/account.js.map +1 -1
- package/dist/convex/components/backend/adapter.d.ts.map +1 -1
- package/dist/convex/components/backend/adapter.js +4 -1
- 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.map +1 -1
- package/dist/convex/components/backend/billing.js +12 -32
- 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/gifts.d.ts +1 -1
- package/dist/convex/components/backend/gifts.d.ts.map +1 -1
- package/dist/convex/components/backend/gifts.js +9 -4
- package/dist/convex/components/backend/gifts.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/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 +151 -35
- package/dist/convex/components/backend/schema.d.ts.map +1 -1
- package/dist/convex/components/backend/schema.js +127 -153
- package/dist/convex/components/backend/schema.js.map +1 -1
- package/dist/convex/components/backend/storage.d.ts.map +1 -1
- package/dist/convex/components/backend/storage.js +10 -10
- package/dist/convex/components/backend/storage.js.map +1 -1
- package/dist/convex/components/backend/subscriptions.d.ts +3 -3
- package/dist/convex/components/backend/subscriptions.d.ts.map +1 -1
- package/dist/convex/components/backend/subscriptions.js +6 -35
- 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 +0 -1
- package/dist/convex/constants.d.ts.map +1 -1
- package/dist/convex/constants.js +0 -1
- package/dist/convex/constants.js.map +1 -1
- package/dist/convex/email-templates.d.ts +0 -1
- package/dist/convex/email-templates.d.ts.map +1 -1
- package/dist/convex/email-templates.js +0 -1
- package/dist/convex/email-templates.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/job-errors.d.ts +7 -0
- package/dist/convex/integrations/ai/job-errors.d.ts.map +1 -1
- package/dist/convex/integrations/ai/job-errors.js +22 -0
- package/dist/convex/integrations/ai/job-errors.js.map +1 -1
- package/dist/convex/integrations/ai/metering.d.ts +12 -0
- package/dist/convex/integrations/ai/metering.d.ts.map +1 -1
- package/dist/convex/integrations/ai/metering.js +19 -10
- package/dist/convex/integrations/ai/metering.js.map +1 -1
- package/dist/convex/integrations/ai/models.d.ts.map +1 -1
- package/dist/convex/integrations/ai/models.js +3 -1
- package/dist/convex/integrations/ai/models.js.map +1 -1
- package/dist/convex/integrations/ai/moderation.d.ts +2 -0
- package/dist/convex/integrations/ai/moderation.d.ts.map +1 -1
- package/dist/convex/integrations/ai/moderation.js +29 -2
- package/dist/convex/integrations/ai/moderation.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 +3 -11
- package/dist/convex/integrations/ai/stream.js.map +1 -1
- package/dist/convex/integrations/billing/context.d.ts +0 -1
- package/dist/convex/integrations/billing/context.d.ts.map +1 -1
- package/dist/convex/integrations/billing/context.js +1 -4
- package/dist/convex/integrations/billing/context.js.map +1 -1
- package/dist/convex/integrations/billing/credits.d.ts.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 +1 -1
- package/dist/convex/integrations/billing/free-plan.d.ts.map +1 -1
- package/dist/convex/integrations/billing/free-plan.js +18 -4
- package/dist/convex/integrations/billing/free-plan.js.map +1 -1
- package/dist/convex/integrations/billing/functions.d.ts +5 -1
- package/dist/convex/integrations/billing/functions.d.ts.map +1 -1
- package/dist/convex/integrations/billing/functions.js +16 -5
- package/dist/convex/integrations/billing/functions.js.map +1 -1
- package/dist/convex/integrations/billing/gifts.d.ts.map +1 -1
- package/dist/convex/integrations/billing/gifts.js +2 -2
- 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 +4 -1
- package/dist/convex/integrations/billing/lifecycle.d.ts.map +1 -1
- package/dist/convex/integrations/billing/lifecycle.js +33 -2
- 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 +2 -3
- package/dist/convex/integrations/billing/passes.js.map +1 -1
- package/dist/convex/integrations/billing/pricing.d.ts +4 -1
- package/dist/convex/integrations/billing/pricing.d.ts.map +1 -1
- package/dist/convex/integrations/billing/pricing.js +11 -9
- 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/subscriptions.d.ts.map +1 -1
- package/dist/convex/integrations/billing/types/lifecycle.d.ts +12 -0
- 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 +7 -1
- package/dist/convex/integrations/billing/types/records.d.ts.map +1 -1
- package/dist/convex/integrations/billing/types/surface.d.ts +5 -1
- package/dist/convex/integrations/billing/types/surface.d.ts.map +1 -1
- package/dist/convex/integrations/billing.d.ts +2 -2
- package/dist/convex/integrations/billing.d.ts.map +1 -1
- package/dist/convex/integrations/billing.js +1 -0
- 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/notifications.d.ts +24 -4
- package/dist/convex/integrations/notifications.d.ts.map +1 -1
- package/dist/convex/integrations/notifications.js +30 -14
- package/dist/convex/integrations/notifications.js.map +1 -1
- package/dist/convex/integrations/rate-limit.d.ts +6 -5
- package/dist/convex/integrations/rate-limit.d.ts.map +1 -1
- package/dist/convex/integrations/rate-limit.js +6 -5
- package/dist/convex/integrations/rate-limit.js.map +1 -1
- package/dist/convex/integrations/reports.d.ts +1 -1
- package/dist/convex/integrations/reports.d.ts.map +1 -1
- package/dist/convex/integrations/reports.js +0 -11
- package/dist/convex/integrations/reports.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-groups/cancelFlow.d.ts +3 -0
- package/dist/convex/label-groups/cancelFlow.d.ts.map +1 -1
- package/dist/convex/label-groups/cancelFlow.js +5 -0
- 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/notifications.d.ts +19 -2
- package/dist/convex/label-groups/notifications.d.ts.map +1 -1
- package/dist/convex/label-groups/notifications.js +19 -15
- package/dist/convex/label-groups/notifications.js.map +1 -1
- package/dist/convex/label-groups/pricing.js +8 -8
- package/dist/convex/label-groups/pricing.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/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-translations.d.ts.map +1 -1
- package/dist/convex/label-translations.js +52 -0
- package/dist/convex/label-translations.js.map +1 -1
- package/dist/convex/labels.d.ts +23 -0
- package/dist/convex/labels.d.ts.map +1 -1
- package/dist/convex/log.js +2 -0
- package/dist/convex/log.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/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/index.html +1 -1
- package/dist/module.js +2 -2
- package/dist/module.json +1 -1
- package/dist/runtime/locales/de.json +47 -24
- package/dist/runtime/locales/en.json +47 -24
- package/dist/runtime/locales/es.json +47 -24
- package/dist/runtime/locales/fr.json +47 -24
- package/dist/runtime/locales/ru.json +47 -24
- package/dist/runtime/server/protection/gate.d.ts +4 -2
- package/dist/runtime/server/protection/gate.js +14 -4
- 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 +16 -11
- package/dist/runtime/vue/auth-client.js +3 -1
- package/dist/runtime/vue/components/admin/AdminUsers.d.vue.ts +1 -1
- package/dist/runtime/vue/components/admin/AdminUsers.vue.d.ts +1 -1
- package/dist/runtime/vue/components/billing/BillingCheckoutLink.d.vue.ts +1 -1
- package/dist/runtime/vue/components/billing/BillingCheckoutLink.vue.d.ts +1 -1
- 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 +10 -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/CancelFlowQuestion.vue +2 -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.vue +6 -3
- package/dist/runtime/vue/components/billing/PricingPlanCard.vue +3 -1
- package/dist/runtime/vue/components/billing/PricingTable.d.vue.ts +2 -2
- package/dist/runtime/vue/components/billing/PricingTable.vue +3 -1
- package/dist/runtime/vue/components/billing/PricingTable.vue.d.ts +2 -2
- package/dist/runtime/vue/components/billing/UsageHistoryEvent.vue +3 -1
- 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/shell/NoticeLowCredits.vue +3 -1
- package/dist/runtime/vue/components/tokens.css +1 -1
- package/dist/runtime/vue/components/workspaces/WorkspaceCredits.vue +6 -3
- package/dist/runtime/vue/components/workspaces/WorkspaceSettings.d.vue.ts +2 -2
- package/dist/runtime/vue/components/workspaces/WorkspaceSettings.vue.d.ts +2 -2
- 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 +10 -2
- 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-notifications.d.ts +5 -1
- package/dist/runtime/vue/composables/use-notifications.js +12 -4
- 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/parts.d.ts +2 -1
- package/dist/runtime/vue/plugins/checkout-return.d.ts +3 -2
- package/dist/runtime/vue/plugins/checkout-return.js +2 -4
- package/dist/runtime/vue/plugins/first-touch.js +2 -4
- package/dist/runtime/vue/utils/checkout-return.d.ts +9 -2
- package/dist/runtime/vue/utils/checkout-return.js +2 -1
- 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/meter-unit.d.ts +14 -0
- package/dist/runtime/vue/utils/meter-unit.js +18 -0
- package/dist/shared/{nuxt-backend.2YoiKo8j.mjs → nuxt-backend.2m535CLS.mjs} +6 -2
- package/dist/shared/{nuxt-backend.CPq101Wi.mjs → nuxt-backend.DXEf0rrv.mjs} +1 -1
- package/dist/shared/{nuxt-backend.-uB5CGw-.mjs → nuxt-backend.Dm1NkY7v.mjs} +1 -1
- package/dist/shared/{nuxt-backend.OQMX-0U7.mjs → nuxt-backend.KEzfHO2K.mjs} +6 -3
- package/dist/shared/{nuxt-backend.S5C2b-4I.mjs → nuxt-backend.ikObmtHs.mjs} +2 -2
- package/package.json +2 -2
- package/skills/nuxt-backend/references/api.md +13 -3
- package/skills/nuxt-backend/references/surface.json +12 -0
- package/skills/nuxt-backend-auth/SKILL.md +2 -1
- package/skills/nuxt-backend-billing/SKILL.md +7 -0
- package/skills/nuxt-backend-billing/references/api.md +12 -2
- package/skills/nuxt-backend-data/SKILL.md +4 -1
- package/skills/nuxt-backend-email/SKILL.md +4 -0
- package/skills/nuxt-backend-email/references/api.md +1 -1
- package/skills/nuxt-backend-ui/SKILL.md +6 -5
- package/src/convex/account-data.ts +0 -5
- package/src/convex/catalog.ts +23 -0
- package/src/convex/client/better-auth-options.ts +11 -1
- package/src/convex/client/client-address.ts +37 -0
- package/src/convex/components/backend/_generated/component.ts +12 -0
- package/src/convex/components/backend/account.ts +7 -2
- package/src/convex/components/backend/adapter.ts +4 -1
- package/src/convex/components/backend/ai.ts +20 -54
- package/src/convex/components/backend/billing.ts +14 -33
- package/src/convex/components/backend/consents.ts +2 -1
- package/src/convex/components/backend/gifts.ts +11 -5
- package/src/convex/components/backend/lifecycle.ts +17 -12
- 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 +143 -161
- package/src/convex/components/backend/storage.ts +11 -10
- package/src/convex/components/backend/subscriptions.ts +7 -35
- package/src/convex/components/backend/webhooks.ts +1 -10
- package/src/convex/consent-rules.ts +0 -3
- package/src/convex/constants.ts +0 -1
- package/src/convex/email-templates.ts +0 -1
- package/src/convex/integrations/admin.ts +2 -1
- package/src/convex/integrations/ai/job-errors.ts +21 -0
- package/src/convex/integrations/ai/metering.ts +24 -10
- package/src/convex/integrations/ai/models.ts +3 -1
- package/src/convex/integrations/ai/moderation.ts +31 -2
- package/src/convex/integrations/ai/stream.ts +3 -11
- package/src/convex/integrations/billing/context.ts +1 -9
- package/src/convex/integrations/billing/customers.ts +28 -5
- package/src/convex/integrations/billing/free-plan.ts +20 -5
- package/src/convex/integrations/billing/functions.ts +17 -5
- package/src/convex/integrations/billing/gifts.ts +2 -2
- package/src/convex/integrations/billing/history.ts +2 -1
- package/src/convex/integrations/billing/lifecycle.ts +30 -3
- package/src/convex/integrations/billing/passes.ts +2 -4
- package/src/convex/integrations/billing/pricing.ts +14 -10
- package/src/convex/integrations/billing/purchase.ts +1 -2
- package/src/convex/integrations/billing/types/lifecycle.ts +13 -0
- package/src/convex/integrations/billing/types/options.ts +4 -1
- package/src/convex/integrations/billing/types/records.ts +7 -1
- package/src/convex/integrations/billing/types/surface.ts +3 -1
- package/src/convex/integrations/billing.ts +3 -2
- package/src/convex/integrations/email-preferences.ts +1 -1
- package/src/convex/integrations/email-sync.ts +44 -1
- package/src/convex/integrations/notifications.ts +65 -16
- package/src/convex/integrations/rate-limit.ts +6 -5
- package/src/convex/integrations/reports.ts +1 -1
- package/src/convex/integrations/webhooks.ts +1 -4
- package/src/convex/label-groups/cancelFlow.ts +5 -0
- package/src/convex/label-groups/credits.ts +17 -2
- package/src/convex/label-groups/notifications.ts +19 -15
- package/src/convex/label-groups/pricing.ts +8 -8
- package/src/convex/label-groups/settings.ts +4 -3
- package/src/convex/label-groups/usage.ts +2 -2
- package/src/convex/label-translations.ts +52 -0
- package/src/convex/log.ts +2 -0
- 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/waitlist-rules.ts +2 -22
- package/src/runtime/vue/components/billing/CancelFlow.css +16 -0
- package/src/runtime/vue/components/billing/CancelFlow.vue +16 -6
- package/src/runtime/vue/components/billing/CancelFlowConfirm.vue +35 -0
- package/src/runtime/vue/components/billing/CancelFlowQuestion.vue +8 -2
- package/src/runtime/vue/components/billing/PricingPackCard.vue +6 -3
- package/src/runtime/vue/components/billing/PricingPlanCard.vue +3 -1
- package/src/runtime/vue/components/billing/PricingTable.vue +3 -1
- package/src/runtime/vue/components/billing/UsageHistoryEvent.vue +3 -1
- package/src/runtime/vue/components/shell/NoticeLowCredits.vue +3 -1
- package/src/runtime/vue/components/tokens.css +19 -15
- package/src/runtime/vue/components/workspaces/WorkspaceCredits.vue +6 -3
|
@@ -215,13 +215,13 @@
|
|
|
215
215
|
"loading": "Chargement des forfaits…",
|
|
216
216
|
"empty": "Aucun forfait n’est encore configuré.",
|
|
217
217
|
"credits": {
|
|
218
|
-
"month": "{count}
|
|
219
|
-
"year": "{count}
|
|
218
|
+
"month": "{count} {unit} / mois",
|
|
219
|
+
"year": "{count} {unit} / an"
|
|
220
220
|
},
|
|
221
221
|
"retired": "Plus proposé",
|
|
222
|
-
"packCredits": "{count}
|
|
223
|
-
"perCredit": "{price} par
|
|
224
|
-
"lessPerCredit": "{percent}
|
|
222
|
+
"packCredits": "{count} {unit}",
|
|
223
|
+
"perCredit": "{price} par {unit}",
|
|
224
|
+
"lessPerCredit": "{percent} % de moins par {unit}",
|
|
225
225
|
"bestValue": "Meilleure offre",
|
|
226
226
|
"promotion": {
|
|
227
227
|
"once": "{off} de réduction sur le premier paiement, puis {price}",
|
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
"canceling": "Résiliation…",
|
|
260
260
|
"uncanceling": "Conservation du forfait…",
|
|
261
261
|
"openingPortal": "Ouverture du portail…",
|
|
262
|
-
"managed": "Le propriétaire et les administrateurs de votre espace de travail gèrent son forfait et achètent ses
|
|
262
|
+
"managed": "Le propriétaire et les administrateurs de votre espace de travail gèrent son forfait et achètent ses {unit}.",
|
|
263
263
|
"finishingPurchase": "Finalisation de votre achat…",
|
|
264
264
|
"confirmTitle": "Résilier le forfait",
|
|
265
265
|
"confirmEnds": "Le forfait prend fin le {date}. Tout ce qu’il inclut reste disponible d’ici là.",
|
|
@@ -332,9 +332,9 @@
|
|
|
332
332
|
},
|
|
333
333
|
"files": "{count} fichier | {count} fichiers",
|
|
334
334
|
"benefitsPortal": "Les clés complètes, les fichiers et les comptes connectés se trouvent dans le portail de facturation.",
|
|
335
|
-
"credits": "
|
|
336
|
-
"balance": "{count}
|
|
337
|
-
"balanceUnknown": "—
|
|
335
|
+
"credits": "{unit}",
|
|
336
|
+
"balance": "{count} {unit}",
|
|
337
|
+
"balanceUnknown": "— {unit}",
|
|
338
338
|
"credited": "Crédités : {count}",
|
|
339
339
|
"used": "Utilisés : {count}",
|
|
340
340
|
"buyPack": "Acheter {pack}",
|
|
@@ -361,7 +361,7 @@
|
|
|
361
361
|
},
|
|
362
362
|
"usage": {
|
|
363
363
|
"title": "",
|
|
364
|
-
"units": "{count}
|
|
364
|
+
"units": "{count} {unit}",
|
|
365
365
|
"empty": "Aucune utilisation enregistrée pour l’instant.",
|
|
366
366
|
"loading": "Chargement…",
|
|
367
367
|
"newer": "Plus récents",
|
|
@@ -1373,7 +1373,14 @@
|
|
|
1373
1373
|
"noToken": "Ce lien ne contient pas de code. Ouvrez à nouveau le lien de l’e-mail."
|
|
1374
1374
|
},
|
|
1375
1375
|
"credits": {
|
|
1376
|
-
"low": "Il vous reste {balance}
|
|
1376
|
+
"low": "Il vous reste {balance} {unit}.",
|
|
1377
|
+
"unit": {
|
|
1378
|
+
"one": "crédit",
|
|
1379
|
+
"few": "crédits",
|
|
1380
|
+
"many": "crédits",
|
|
1381
|
+
"other": "crédits"
|
|
1382
|
+
},
|
|
1383
|
+
"unitTitle": "Crédits",
|
|
1377
1384
|
"topUp": "Recharger",
|
|
1378
1385
|
"topUpPack": "Acheter {pack}",
|
|
1379
1386
|
"toppingUp": "Ouverture du paiement…",
|
|
@@ -1405,6 +1412,9 @@
|
|
|
1405
1412
|
"continue": "Continuer",
|
|
1406
1413
|
"cancel": "Résilier mon forfait",
|
|
1407
1414
|
"canceling": "Résiliation…",
|
|
1415
|
+
"confirmEnds": "Votre forfait prend fin avec la période en cours. D’ici là, tout continue de fonctionner.",
|
|
1416
|
+
"confirmCancel": "Confirmer la résiliation",
|
|
1417
|
+
"back": "Retour",
|
|
1408
1418
|
"offerTitle": "Avant de partir",
|
|
1409
1419
|
"offerPause": "Mettez plutôt {plan} en pause pendant {count} mois. Il reprend automatiquement le {date}, et rien ne vous est facturé entre-temps. | Mettez plutôt {plan} en pause pendant {count} mois. Il reprend automatiquement le {date}, et rien ne vous est facturé entre-temps.",
|
|
1410
1420
|
"offerDowngrade": "Passez plutôt à {plan} à partir du {date}, à la fin de cette période.",
|
|
@@ -2111,11 +2121,13 @@
|
|
|
2111
2121
|
"billing": {
|
|
2112
2122
|
"plan_changed": {
|
|
2113
2123
|
"title": "Le forfait de {workspace} a changé",
|
|
2114
|
-
"body": "{actor} a modifié l’abonnement."
|
|
2124
|
+
"body": "{actor} a modifié l’abonnement.",
|
|
2125
|
+
"titleYours": "Votre forfait a changé"
|
|
2115
2126
|
},
|
|
2116
2127
|
"subscription_created": {
|
|
2117
2128
|
"title": "Un abonnement a commencé",
|
|
2118
|
-
"body": "Le forfait de {workspace} est actif."
|
|
2129
|
+
"body": "Le forfait de {workspace} est actif.",
|
|
2130
|
+
"bodyYours": "Votre forfait est actif."
|
|
2119
2131
|
},
|
|
2120
2132
|
"subscription_canceled": {
|
|
2121
2133
|
"title": "Un abonnement a été annulé",
|
|
@@ -2123,11 +2135,13 @@
|
|
|
2123
2135
|
},
|
|
2124
2136
|
"subscription_revoked": {
|
|
2125
2137
|
"title": "Un abonnement a pris fin",
|
|
2126
|
-
"body": "Le forfait de {workspace} n’est plus actif."
|
|
2138
|
+
"body": "Le forfait de {workspace} n’est plus actif.",
|
|
2139
|
+
"bodyYours": "Votre forfait n’est plus actif."
|
|
2127
2140
|
},
|
|
2128
2141
|
"subscription_past_due": {
|
|
2129
2142
|
"title": "Un paiement a échoué",
|
|
2130
|
-
"body": "Mettez à jour le moyen de paiement de {workspace} pour conserver son forfait."
|
|
2143
|
+
"body": "Mettez à jour le moyen de paiement de {workspace} pour conserver son forfait.",
|
|
2144
|
+
"bodyYours": "Mettez à jour votre moyen de paiement pour conserver votre forfait."
|
|
2131
2145
|
},
|
|
2132
2146
|
"order_paid": {
|
|
2133
2147
|
"title": "Paiement reçu",
|
|
@@ -2139,23 +2153,28 @@
|
|
|
2139
2153
|
},
|
|
2140
2154
|
"credits_low": {
|
|
2141
2155
|
"title": "Vos crédits s’épuisent",
|
|
2142
|
-
"body": "Crédits restants dans {workspace} : {balance}."
|
|
2156
|
+
"body": "Crédits restants dans {workspace} : {balance}.",
|
|
2157
|
+
"bodyYours": "Crédits restants : {balance}."
|
|
2143
2158
|
},
|
|
2144
2159
|
"credits_exhausted": {
|
|
2145
2160
|
"title": "Crédits épuisés",
|
|
2146
|
-
"body": "Rechargez {workspace} pour continuer."
|
|
2161
|
+
"body": "Rechargez {workspace} pour continuer.",
|
|
2162
|
+
"bodyYours": "Rechargez pour continuer."
|
|
2147
2163
|
},
|
|
2148
2164
|
"save_offer_accepted": {
|
|
2149
2165
|
"title": "Le forfait de {workspace} est conservé",
|
|
2150
|
-
"body": "{actor} a accepté une offre au lieu d’annuler."
|
|
2166
|
+
"body": "{actor} a accepté une offre au lieu d’annuler.",
|
|
2167
|
+
"titleYours": "Votre forfait est conservé"
|
|
2151
2168
|
},
|
|
2152
2169
|
"contract_withdrawn": {
|
|
2153
2170
|
"title": "Rétractation d’un achat",
|
|
2154
|
-
"body": "{actor} s’est rétracté du forfait de {workspace}."
|
|
2171
|
+
"body": "{actor} s’est rétracté du forfait de {workspace}.",
|
|
2172
|
+
"bodyYours": "{actor} s’est rétracté de votre forfait."
|
|
2155
2173
|
},
|
|
2156
2174
|
"trial_pass_started": {
|
|
2157
2175
|
"title": "Votre essai a commencé",
|
|
2158
|
-
"body": "{workspace} bénéficie du forfait complet pendant l’essai, sans carte bancaire."
|
|
2176
|
+
"body": "{workspace} bénéficie du forfait complet pendant l’essai, sans carte bancaire.",
|
|
2177
|
+
"bodyYours": "Vous bénéficiez du forfait complet pendant l’essai, sans carte bancaire."
|
|
2159
2178
|
}
|
|
2160
2179
|
},
|
|
2161
2180
|
"gift": {
|
|
@@ -2165,19 +2184,23 @@
|
|
|
2165
2184
|
},
|
|
2166
2185
|
"claimed": {
|
|
2167
2186
|
"title": "Un cadeau a été récupéré",
|
|
2168
|
-
"body": "Il a été ajouté à {workspace}."
|
|
2187
|
+
"body": "Il a été ajouté à {workspace}.",
|
|
2188
|
+
"bodyYours": "Il a été ajouté à votre compte."
|
|
2169
2189
|
},
|
|
2170
2190
|
"pass_started": {
|
|
2171
2191
|
"title": "Un pass de forfait a commencé",
|
|
2172
|
-
"body": "{workspace} bénéficie du forfait offert, sans carte bancaire ni renouvellement."
|
|
2192
|
+
"body": "{workspace} bénéficie du forfait offert, sans carte bancaire ni renouvellement.",
|
|
2193
|
+
"bodyYours": "Vous bénéficiez du forfait offert, sans carte bancaire ni renouvellement."
|
|
2173
2194
|
},
|
|
2174
2195
|
"pass_ending": {
|
|
2175
2196
|
"title": "Un pass de forfait se termine dans une semaine",
|
|
2176
|
-
"body": "Choisissez le forfait de {workspace} pour le conserver."
|
|
2197
|
+
"body": "Choisissez le forfait de {workspace} pour le conserver.",
|
|
2198
|
+
"bodyYours": "Choisissez le forfait pour le conserver."
|
|
2177
2199
|
},
|
|
2178
2200
|
"pass_ended": {
|
|
2179
2201
|
"title": "Un pass de forfait est terminé",
|
|
2180
|
-
"body": "Le forfait offert de {workspace} est terminé."
|
|
2202
|
+
"body": "Le forfait offert de {workspace} est terminé.",
|
|
2203
|
+
"bodyYours": "Votre forfait offert est terminé."
|
|
2181
2204
|
},
|
|
2182
2205
|
"refunded": {
|
|
2183
2206
|
"title": "Un cadeau a été remboursé",
|
|
@@ -215,13 +215,13 @@
|
|
|
215
215
|
"loading": "Загружаем тарифы…",
|
|
216
216
|
"empty": "Тарифы пока не настроены.",
|
|
217
217
|
"credits": {
|
|
218
|
-
"month": "{count}
|
|
219
|
-
"year": "{count}
|
|
218
|
+
"month": "{count} {unit} в месяц",
|
|
219
|
+
"year": "{count} {unit} в год"
|
|
220
220
|
},
|
|
221
221
|
"retired": "Больше не предлагается",
|
|
222
|
-
"packCredits": "{count}
|
|
223
|
-
"perCredit": "{
|
|
224
|
-
"lessPerCredit": "
|
|
222
|
+
"packCredits": "{count} {unit}",
|
|
223
|
+
"perCredit": "1 {unit} — {price}",
|
|
224
|
+
"lessPerCredit": "1 {unit} на {percent}% дешевле",
|
|
225
225
|
"bestValue": "Самый выгодный",
|
|
226
226
|
"promotion": {
|
|
227
227
|
"once": "Скидка {off} на первый платёж, затем {price}",
|
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
"canceling": "Отменяем…",
|
|
260
260
|
"uncanceling": "Оставляем тариф…",
|
|
261
261
|
"openingPortal": "Открываем портал…",
|
|
262
|
-
"managed": "Тарифом рабочего пространства и покупкой
|
|
262
|
+
"managed": "Тарифом рабочего пространства и покупкой {unit} управляют его владелец и администраторы.",
|
|
263
263
|
"finishingPurchase": "Завершаем покупку…",
|
|
264
264
|
"confirmTitle": "Отмена тарифа",
|
|
265
265
|
"confirmEnds": "Тариф закончится {date}. До этого всё, что в него входит, остаётся доступным.",
|
|
@@ -332,9 +332,9 @@
|
|
|
332
332
|
},
|
|
333
333
|
"files": "{count} файл | Файлов: {count}",
|
|
334
334
|
"benefitsPortal": "Полные ключи, файлы и подключённые аккаунты — в платёжном портале.",
|
|
335
|
-
"credits": "
|
|
336
|
-
"balance": "{count}
|
|
337
|
-
"balanceUnknown": "—
|
|
335
|
+
"credits": "{unit}",
|
|
336
|
+
"balance": "{count} {unit}",
|
|
337
|
+
"balanceUnknown": "— {unit}",
|
|
338
338
|
"credited": "Начислено: {count}",
|
|
339
339
|
"used": "Использовано: {count}",
|
|
340
340
|
"buyPack": "Купить {pack}",
|
|
@@ -361,7 +361,7 @@
|
|
|
361
361
|
},
|
|
362
362
|
"usage": {
|
|
363
363
|
"title": "",
|
|
364
|
-
"units": "{count}
|
|
364
|
+
"units": "{count} {unit}",
|
|
365
365
|
"empty": "Расход пока не зафиксирован.",
|
|
366
366
|
"loading": "Загрузка…",
|
|
367
367
|
"newer": "Новее",
|
|
@@ -1373,7 +1373,14 @@
|
|
|
1373
1373
|
"noToken": "В ссылке нет кода. Откройте ссылку из письма ещё раз."
|
|
1374
1374
|
},
|
|
1375
1375
|
"credits": {
|
|
1376
|
-
"low": "
|
|
1376
|
+
"low": "Остаток: {balance} {unit}.",
|
|
1377
|
+
"unit": {
|
|
1378
|
+
"one": "кредит",
|
|
1379
|
+
"few": "кредита",
|
|
1380
|
+
"many": "кредитов",
|
|
1381
|
+
"other": "кредита"
|
|
1382
|
+
},
|
|
1383
|
+
"unitTitle": "Кредиты",
|
|
1377
1384
|
"topUp": "Пополнить",
|
|
1378
1385
|
"topUpPack": "Купить {pack}",
|
|
1379
1386
|
"toppingUp": "Открываем оплату…",
|
|
@@ -1405,6 +1412,9 @@
|
|
|
1405
1412
|
"continue": "Продолжить",
|
|
1406
1413
|
"cancel": "Отменить мой тариф",
|
|
1407
1414
|
"canceling": "Отменяем…",
|
|
1415
|
+
"confirmEnds": "Тариф закончится вместе с текущим периодом. До этого всё продолжит работать.",
|
|
1416
|
+
"confirmCancel": "Подтвердить отмену",
|
|
1417
|
+
"back": "Назад",
|
|
1408
1418
|
"offerTitle": "Прежде чем вы уйдёте",
|
|
1409
1419
|
"offerPause": "Вместо этого приостановите {plan} на {count} месяц. Тариф возобновится сам {date}, а за это время ничего не спишется. | Вместо этого приостановите {plan} на {count} мес. Тариф возобновится сам {date}, а за это время ничего не спишется.",
|
|
1410
1420
|
"offerDowngrade": "Вместо этого перейдите на {plan} с {date}, когда закончится текущий период.",
|
|
@@ -2111,11 +2121,13 @@
|
|
|
2111
2121
|
"billing": {
|
|
2112
2122
|
"plan_changed": {
|
|
2113
2123
|
"title": "Тариф пространства {workspace} изменён",
|
|
2114
|
-
"body": "Подписка изменена. Кем: {actor}."
|
|
2124
|
+
"body": "Подписка изменена. Кем: {actor}.",
|
|
2125
|
+
"titleYours": "Ваш тариф изменён"
|
|
2115
2126
|
},
|
|
2116
2127
|
"subscription_created": {
|
|
2117
2128
|
"title": "Подписка оформлена",
|
|
2118
|
-
"body": "Тариф пространства {workspace} активен."
|
|
2129
|
+
"body": "Тариф пространства {workspace} активен.",
|
|
2130
|
+
"bodyYours": "Ваш тариф активен."
|
|
2119
2131
|
},
|
|
2120
2132
|
"subscription_canceled": {
|
|
2121
2133
|
"title": "Подписка отменена",
|
|
@@ -2123,11 +2135,13 @@
|
|
|
2123
2135
|
},
|
|
2124
2136
|
"subscription_revoked": {
|
|
2125
2137
|
"title": "Подписка закончилась",
|
|
2126
|
-
"body": "Тариф пространства {workspace} больше не действует."
|
|
2138
|
+
"body": "Тариф пространства {workspace} больше не действует.",
|
|
2139
|
+
"bodyYours": "Ваш тариф больше не действует."
|
|
2127
2140
|
},
|
|
2128
2141
|
"subscription_past_due": {
|
|
2129
2142
|
"title": "Платёж не прошёл",
|
|
2130
|
-
"body": "Обновите способ оплаты пространства {workspace}, чтобы сохранить тариф."
|
|
2143
|
+
"body": "Обновите способ оплаты пространства {workspace}, чтобы сохранить тариф.",
|
|
2144
|
+
"bodyYours": "Обновите способ оплаты, чтобы сохранить тариф."
|
|
2131
2145
|
},
|
|
2132
2146
|
"order_paid": {
|
|
2133
2147
|
"title": "Платёж получен",
|
|
@@ -2139,23 +2153,28 @@
|
|
|
2139
2153
|
},
|
|
2140
2154
|
"credits_low": {
|
|
2141
2155
|
"title": "Кредиты заканчиваются",
|
|
2142
|
-
"body": "Осталось кредитов в пространстве {workspace}: {balance}."
|
|
2156
|
+
"body": "Осталось кредитов в пространстве {workspace}: {balance}.",
|
|
2157
|
+
"bodyYours": "Осталось кредитов: {balance}."
|
|
2143
2158
|
},
|
|
2144
2159
|
"credits_exhausted": {
|
|
2145
2160
|
"title": "Кредиты закончились",
|
|
2146
|
-
"body": "Пополните баланс пространства {workspace}, чтобы продолжить."
|
|
2161
|
+
"body": "Пополните баланс пространства {workspace}, чтобы продолжить.",
|
|
2162
|
+
"bodyYours": "Пополните баланс, чтобы продолжить."
|
|
2147
2163
|
},
|
|
2148
2164
|
"save_offer_accepted": {
|
|
2149
2165
|
"title": "Тариф пространства {workspace} сохранён",
|
|
2150
|
-
"body": "Вместо отмены принято специальное предложение. Кем: {actor}."
|
|
2166
|
+
"body": "Вместо отмены принято специальное предложение. Кем: {actor}.",
|
|
2167
|
+
"titleYours": "Ваш тариф сохранён"
|
|
2151
2168
|
},
|
|
2152
2169
|
"contract_withdrawn": {
|
|
2153
2170
|
"title": "Отказ от покупки",
|
|
2154
|
-
"body": "Отказ от тарифа пространства {workspace}. Кем: {actor}."
|
|
2171
|
+
"body": "Отказ от тарифа пространства {workspace}. Кем: {actor}.",
|
|
2172
|
+
"bodyYours": "Отказ от вашего тарифа. Кем: {actor}."
|
|
2155
2173
|
},
|
|
2156
2174
|
"trial_pass_started": {
|
|
2157
2175
|
"title": "Пробный период начался",
|
|
2158
|
-
"body": "На время пробного периода у пространства {workspace} полный тариф, без карты."
|
|
2176
|
+
"body": "На время пробного периода у пространства {workspace} полный тариф, без карты.",
|
|
2177
|
+
"bodyYours": "На время пробного периода у вас полный тариф, без карты."
|
|
2159
2178
|
}
|
|
2160
2179
|
},
|
|
2161
2180
|
"gift": {
|
|
@@ -2165,19 +2184,23 @@
|
|
|
2165
2184
|
},
|
|
2166
2185
|
"claimed": {
|
|
2167
2186
|
"title": "Подарок получен",
|
|
2168
|
-
"body": "Он зачислен в пространство {workspace}."
|
|
2187
|
+
"body": "Он зачислен в пространство {workspace}.",
|
|
2188
|
+
"bodyYours": "Он зачислен на ваш аккаунт."
|
|
2169
2189
|
},
|
|
2170
2190
|
"pass_started": {
|
|
2171
2191
|
"title": "Подаренный тариф начал действовать",
|
|
2172
|
-
"body": "У пространства {workspace} подаренный тариф — без карты и без продления."
|
|
2192
|
+
"body": "У пространства {workspace} подаренный тариф — без карты и без продления.",
|
|
2193
|
+
"bodyYours": "У вас подаренный тариф — без карты и без продления."
|
|
2173
2194
|
},
|
|
2174
2195
|
"pass_ending": {
|
|
2175
2196
|
"title": "Подаренный тариф закончится через неделю",
|
|
2176
|
-
"body": "Выберите тариф для пространства {workspace}, чтобы сохранить его."
|
|
2197
|
+
"body": "Выберите тариф для пространства {workspace}, чтобы сохранить его.",
|
|
2198
|
+
"bodyYours": "Выберите тариф, чтобы сохранить его."
|
|
2177
2199
|
},
|
|
2178
2200
|
"pass_ended": {
|
|
2179
2201
|
"title": "Подаренный тариф закончился",
|
|
2180
|
-
"body": "Подаренный тариф пространства {workspace} больше не действует."
|
|
2202
|
+
"body": "Подаренный тариф пространства {workspace} больше не действует.",
|
|
2203
|
+
"bodyYours": "Ваш подаренный тариф больше не действует."
|
|
2181
2204
|
},
|
|
2182
2205
|
"refunded": {
|
|
2183
2206
|
"title": "Подарок возвращён",
|
|
@@ -28,8 +28,10 @@ export declare function verdictRefusal(verdict: 'bot' | 'unavailable'): Response
|
|
|
28
28
|
* with a proof signed under `PROTECTION_PROOF_SECRET` for its method, path
|
|
29
29
|
* and address and for the deployment it goes to, which that deployment
|
|
30
30
|
* checks: Better Auth runs on the deployment's own public URL, and a
|
|
31
|
-
* request that skipped this check carries none.
|
|
32
|
-
*
|
|
31
|
+
* request that skipped this check carries none. Every request to the auth
|
|
32
|
+
* routes, whatever its method, also leaves with the client's address
|
|
33
|
+
* signed in (`setClientAddress`). Global middleware matched in-handler,
|
|
34
|
+
* like the agent gate.
|
|
33
35
|
*/
|
|
34
36
|
declare const _default: import("nuxt/server").EventHandler<Promise<Response | {
|
|
35
37
|
proof: string | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineEventHandler, getCookie, getRequestProtocol, getRequestURL, readBody, setCookie, useRuntimeConfig } from "nuxt/server";
|
|
1
|
+
import { defineEventHandler, getCookie, getRequestIP, getRequestProtocol, getRequestURL, readBody, setCookie, useRuntimeConfig } from "nuxt/server";
|
|
2
2
|
import { backendError, refusalResponse } from "../../../convex/errors.js";
|
|
3
|
-
import { CALL_METHOD, HUMAN_PROOF_ROUTE, isActionName, isProtectedAuthPath, newVisitorId, PROOF_HEADER, proofAudience, proofSubject, readVisitor, requestSubject, SECURE_VISITOR_COOKIE, signProof, signVisitor, VISITOR_COOKIE, VISITOR_COOKIE_MAX_AGE_SECONDS, VISITOR_METHOD, withVisitor } from "../../../convex/proof.js";
|
|
3
|
+
import { CALL_METHOD, CLIENT_ADDRESS_HEADER, HUMAN_PROOF_ROUTE, isActionName, isProtectedAuthPath, newVisitorId, PROOF_HEADER, proofAudience, proofSubject, readVisitor, requestSubject, SECURE_VISITOR_COOKIE, signClientAddress, signProof, signVisitor, VISITOR_COOKIE, VISITOR_COOKIE_MAX_AGE_SECONDS, VISITOR_METHOD, withVisitor } from "../../../convex/proof.js";
|
|
4
4
|
import { readSiteUrl } from "../site-url.js";
|
|
5
5
|
let unsignedWarned = false;
|
|
6
6
|
let absentWarned = false;
|
|
@@ -47,6 +47,15 @@ function setProofHeader(event, proof) {
|
|
|
47
47
|
event.req.headers.delete(PROOF_HEADER);
|
|
48
48
|
if (proof) event.req.headers.set(PROOF_HEADER, proof);
|
|
49
49
|
}
|
|
50
|
+
async function setClientAddress(event) {
|
|
51
|
+
event.req.headers.delete(CLIENT_ADDRESS_HEADER);
|
|
52
|
+
const secret = proofSecret();
|
|
53
|
+
const address = secret ? getRequestIP(event, { xForwardedFor: true }) : void 0;
|
|
54
|
+
if (secret && address) event.req.headers.set(CLIENT_ADDRESS_HEADER, await signClientAddress(secret, address, serverAudience()));
|
|
55
|
+
}
|
|
56
|
+
function isAuthPath(path, authRoute) {
|
|
57
|
+
return path === authRoute || path.startsWith(`${authRoute}/`);
|
|
58
|
+
}
|
|
50
59
|
export function verdictRefusal(verdict) {
|
|
51
60
|
return refusalResponse(verdict === "bot" ? backendError("forbidden", { reason: "bot_check" }) : backendError("unavailable", { service: "protection", reason: "provider_refused" }));
|
|
52
61
|
}
|
|
@@ -79,10 +88,11 @@ async function visitorOf(event, secret, audience) {
|
|
|
79
88
|
}
|
|
80
89
|
export default defineEventHandler(async (event) => {
|
|
81
90
|
const { method } = event.req;
|
|
82
|
-
if (method !== "POST") return;
|
|
83
91
|
const path = getRequestURL(event).pathname;
|
|
84
|
-
if (path === HUMAN_PROOF_ROUTE) return proofForCall(event);
|
|
85
92
|
const authRoute = useRuntimeConfig().public.backend?.authRoute ?? "/api/auth";
|
|
93
|
+
if (isAuthPath(path, authRoute)) await setClientAddress(event);
|
|
94
|
+
if (method !== "POST") return;
|
|
95
|
+
if (path === HUMAN_PROOF_ROUTE) return proofForCall(event);
|
|
86
96
|
if (!isProtectedAuthPath(path, authRoute)) return;
|
|
87
97
|
setProofHeader(event, null);
|
|
88
98
|
const verdict = await botVerdict();
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { adminClient as betterAuthAdminClient, AdminClientOptions } from 'better-auth/client/plugins';
|
|
2
|
+
/** Better Auth's admin client plugin, as `adminClient()` from `better-auth/client/plugins` returns it. */
|
|
3
|
+
export type AdminClientPlugin = ReturnType<typeof betterAuthAdminClient<AdminClientOptions>>;
|
|
4
|
+
/**
|
|
5
|
+
* Better Auth's admin client plugin without its error-code table.
|
|
6
|
+
* `createAuthClient` takes its plugins at construction and the base module
|
|
7
|
+
* imports the client on every page, so this plugin is in every page's entry.
|
|
8
|
+
* What it does at runtime is small: impersonating and stopping refresh the
|
|
9
|
+
* session, `list-users` is a GET, and `checkRolePermission` answers from the
|
|
10
|
+
* default roles, synchronously, as Better Auth's does. Its `$ERROR_CODES`
|
|
11
|
+
* table, about a third of the plugin, is type-level for a client plugin
|
|
12
|
+
* (Better Auth's client never reads it at runtime), so it stays out of the
|
|
13
|
+
* page. Every admin call is a request through the client's own proxy: there
|
|
14
|
+
* is nothing else to load on first use.
|
|
15
|
+
*
|
|
16
|
+
* test/unit/role-clients.test.ts holds it to Better Auth's own plugin.
|
|
17
|
+
*/
|
|
18
|
+
export declare function adminClient(): AdminClientPlugin;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { adminAc, userAc } from "better-auth/plugins/admin/access";
|
|
2
|
+
const roles = { admin: adminAc, user: userAc };
|
|
3
|
+
export function adminClient() {
|
|
4
|
+
const plugin = {
|
|
5
|
+
id: "admin-client",
|
|
6
|
+
// Type-level only, as in Better Auth's plugin: the server plugin it pairs with.
|
|
7
|
+
$InferServerPlugin: {},
|
|
8
|
+
getActions: () => ({
|
|
9
|
+
admin: {
|
|
10
|
+
checkRolePermission: (data) => {
|
|
11
|
+
if (!data.permissions) return false;
|
|
12
|
+
for (const role of (data.role || "user").split(",")) {
|
|
13
|
+
if (roles[role]?.authorize(data.permissions).success) return true;
|
|
14
|
+
}
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}),
|
|
19
|
+
pathMethods: {
|
|
20
|
+
"/admin/list-users": "GET",
|
|
21
|
+
"/admin/impersonate-user": "POST",
|
|
22
|
+
"/admin/stop-impersonating": "POST"
|
|
23
|
+
},
|
|
24
|
+
atomListeners: [
|
|
25
|
+
{
|
|
26
|
+
matcher: (path) => path === "/admin/impersonate-user" || path === "/admin/stop-impersonating",
|
|
27
|
+
signal: "$sessionSignal"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
};
|
|
31
|
+
return plugin;
|
|
32
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { convexClient } from '@convex-dev/better-auth/client/plugins';
|
|
2
|
-
import {
|
|
2
|
+
import { emailOTPClient } from 'better-auth/client/plugins';
|
|
3
3
|
import { type VueAuthClient } from 'better-auth/vue';
|
|
4
|
+
import { type AdminClientPlugin } from './admin-client.js';
|
|
5
|
+
import { type OrganizationClientPlugin } from './organization-client.js';
|
|
4
6
|
import { passkeyClient } from './passkey-client.js';
|
|
5
7
|
import { protectionClient } from './protection/state.js';
|
|
6
8
|
/**
|
|
@@ -9,7 +11,7 @@ import { protectionClient } from './protection/state.js';
|
|
|
9
11
|
* type spelled out (about 150 kB of the package). The two generic plugins
|
|
10
12
|
* are named with the options a call without any infers.
|
|
11
13
|
*/
|
|
12
|
-
type BackendAuthPlugin = ReturnType<typeof convexClient> | ReturnType<typeof emailOTPClient> | ReturnType<typeof passkeyClient> |
|
|
14
|
+
type BackendAuthPlugin = ReturnType<typeof convexClient> | ReturnType<typeof emailOTPClient> | ReturnType<typeof passkeyClient> | AdminClientPlugin | OrganizationClientPlugin | ReturnType<typeof protectionClient>;
|
|
13
15
|
/**
|
|
14
16
|
* The backend's Better Auth client — the client-side counterpart of the
|
|
15
17
|
* server setup this package ships: passwordless sign-in (OTP + passkeys),
|
|
@@ -20,18 +22,21 @@ type BackendAuthPlugin = ReturnType<typeof convexClient> | ReturnType<typeof ema
|
|
|
20
22
|
* Every plugin is registered here, at construction, and the base module
|
|
21
23
|
* imports this client on every page. The passkey plugin is the package's
|
|
22
24
|
* own (`./passkey-client`): Better Auth's, with the WebAuthn ceremony loaded
|
|
23
|
-
* apart from the page, once it is idle.
|
|
24
|
-
*
|
|
25
|
-
*
|
|
25
|
+
* apart from the page, once it is idle. So are the admin and organization
|
|
26
|
+
* plugins (`./admin-client`, `./organization-client`): Better Auth's,
|
|
27
|
+
* without the error-code tables a client never reads at runtime. The
|
|
28
|
+
* protection plugin answers the bot check's challenge on the requests that
|
|
29
|
+
* send a code, when the app shows one.
|
|
26
30
|
*
|
|
27
31
|
* Point `convex.betterAuth.authClient` at your own module to replace it —
|
|
28
32
|
* include these plugins (plus yours, e.g. `crossDomainClient()`) to keep the
|
|
29
|
-
* bundled flows and composables working. The package's
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
33
|
+
* bundled flows and composables working. The package's own plugins are not
|
|
34
|
+
* public exports; without the protection plugin, a challenge is yours to
|
|
35
|
+
* answer, as the `x-captcha-response` header. For the others, use Better
|
|
36
|
+
* Auth's there — `passkeyClient()` from `@better-auth/passkey/client`,
|
|
37
|
+
* `adminClient()` and `organizationClient()` from
|
|
38
|
+
* `better-auth/client/plugins` — which work the same and load more with
|
|
39
|
+
* every page (the passkey ceremony alone is about 12 kB).
|
|
35
40
|
*/
|
|
36
41
|
export declare const authClient: VueAuthClient<{
|
|
37
42
|
plugins: BackendAuthPlugin[];
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { convexClient } from "@convex-dev/better-auth/client/plugins";
|
|
2
|
-
import {
|
|
2
|
+
import { emailOTPClient } from "better-auth/client/plugins";
|
|
3
3
|
import { createAuthClient } from "better-auth/vue";
|
|
4
|
+
import { adminClient } from "./admin-client.js";
|
|
5
|
+
import { organizationClient } from "./organization-client.js";
|
|
4
6
|
import { passkeyClient } from "./passkey-client.js";
|
|
5
7
|
import { protectionClient } from "./protection/state.js";
|
|
6
8
|
const plugins = [convexClient(), emailOTPClient(), passkeyClient(), adminClient(), organizationClient(), protectionClient()];
|
|
@@ -30,8 +30,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
30
30
|
"onSessions-revoked"?: ((_userId: string) => any) | undefined;
|
|
31
31
|
"onRole-changed"?: ((_userId: string, _role: string) => any) | undefined;
|
|
32
32
|
}>, {
|
|
33
|
-
userId: string;
|
|
34
33
|
roles: string[];
|
|
34
|
+
userId: string;
|
|
35
35
|
limit: number;
|
|
36
36
|
confirm: (message: string) => boolean | Promise<boolean>;
|
|
37
37
|
landing: string;
|
|
@@ -30,8 +30,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
30
30
|
"onSessions-revoked"?: ((_userId: string) => any) | undefined;
|
|
31
31
|
"onRole-changed"?: ((_userId: string, _role: string) => any) | undefined;
|
|
32
32
|
}>, {
|
|
33
|
-
userId: string;
|
|
34
33
|
roles: string[];
|
|
34
|
+
userId: string;
|
|
35
35
|
limit: number;
|
|
36
36
|
confirm: (message: string) => boolean | Promise<boolean>;
|
|
37
37
|
landing: string;
|
|
@@ -31,8 +31,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
31
31
|
onError?: ((_error: unknown) => any) | undefined;
|
|
32
32
|
}>, {
|
|
33
33
|
locale: string;
|
|
34
|
-
redirect: boolean;
|
|
35
34
|
metadata: Record<string, string>;
|
|
35
|
+
redirect: boolean;
|
|
36
36
|
api: BillingApi;
|
|
37
37
|
discount: string;
|
|
38
38
|
subscriptionId: string;
|
|
@@ -31,8 +31,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
31
31
|
onError?: ((_error: unknown) => any) | undefined;
|
|
32
32
|
}>, {
|
|
33
33
|
locale: string;
|
|
34
|
-
redirect: boolean;
|
|
35
34
|
metadata: Record<string, string>;
|
|
35
|
+
redirect: boolean;
|
|
36
36
|
api: BillingApi;
|
|
37
37
|
discount: string;
|
|
38
38
|
subscriptionId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer nuxt-backend{[data-cancel-flow=root]{background:var(--bk-surface);border:1px solid var(--bk-edge);border-radius:var(--bk-radius);color:var(--bk-ink);display:grid;gap:.75rem;padding:1rem}[data-cancel-flow=title]{font-size:1rem;margin:0}[data-cancel-flow=end],[data-cancel-flow=offer],[data-cancel-flow=question]{display:grid;gap:.6rem}[data-cancel-flow=reasons]{border:0;display:grid;gap:.35rem;margin:0;padding:0}[data-cancel-flow=comment-label],[data-cancel-flow=question-title]{font-size:.88rem;font-weight:600;margin-block-end:.25rem}[data-cancel-flow=reason]{align-items:center;display:flex;font-size:.9rem;gap:.45rem}[data-cancel-flow=comment]{background:transparent;border:1px solid var(--bk-edge);border-radius:var(--bk-radius-control);color:var(--bk-ink);font:inherit;padding:.5rem}[data-cancel-flow=accept],[data-cancel-flow=cancel],[data-cancel-flow=close],[data-cancel-flow=continue],[data-cancel-flow=keep]{background:transparent;border:1px solid var(--bk-edge);border-radius:var(--bk-radius-control);color:var(--bk-ink);flex:1 1 10rem;font-size:.88rem;font-weight:600;padding:.5rem .9rem}[data-cancel-flow=ends],[data-cancel-flow=kept],[data-cancel-flow=offer-terms]{font-weight:600;margin:0}[data-cancel-flow=end-note]{color:var(--bk-muted);font-size:.88rem;margin:0}[data-cancel-flow=error]{color:var(--bk-error);font-size:.85rem;margin:0}}
|
|
1
|
+
@layer nuxt-backend{[data-cancel-flow=root]{background:var(--bk-surface);border:1px solid var(--bk-edge);border-radius:var(--bk-radius);color:var(--bk-ink);display:grid;gap:.75rem;padding:1rem}[data-cancel-flow=title]{font-size:1rem;margin:0}[data-cancel-flow=confirm],[data-cancel-flow=end],[data-cancel-flow=offer],[data-cancel-flow=question]{display:grid;gap:.6rem}[data-cancel-flow=reasons]{border:0;display:grid;gap:.35rem;margin:0;padding:0}[data-cancel-flow=comment-label],[data-cancel-flow=question-title]{font-size:.88rem;font-weight:600;margin-block-end:.25rem}[data-cancel-flow=reason]{align-items:center;display:flex;font-size:.9rem;gap:.45rem}[data-cancel-flow=comment]{background:transparent;border:1px solid var(--bk-edge);border-radius:var(--bk-radius-control);color:var(--bk-ink);font:inherit;padding:.5rem}[data-cancel-flow=accept],[data-cancel-flow=back],[data-cancel-flow=cancel],[data-cancel-flow=close],[data-cancel-flow=confirm-cancel],[data-cancel-flow=continue],[data-cancel-flow=keep]{background:transparent;border:1px solid var(--bk-edge);border-radius:var(--bk-radius-control);color:var(--bk-ink);flex:1 1 10rem;font-size:.88rem;font-weight:600;padding:.5rem .9rem}[data-cancel-flow=continue][data-intent=cancel]{border-color:color-mix(in srgb,var(--bk-error) 50%,transparent);color:var(--bk-error)}[data-cancel-flow=confirm-cancel]{border-color:var(--bk-error);color:var(--bk-error)}[data-cancel-flow=confirm-ends],[data-cancel-flow=ends],[data-cancel-flow=kept],[data-cancel-flow=offer-terms]{font-weight:600;margin:0}[data-cancel-flow=end-note]{color:var(--bk-muted);font-size:.88rem;margin:0}[data-cancel-flow=error]{color:var(--bk-error);font-size:.85rem;margin:0}}
|
|
@@ -35,6 +35,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
35
35
|
continue: string;
|
|
36
36
|
cancel: string;
|
|
37
37
|
canceling: string;
|
|
38
|
+
confirmEnds: string;
|
|
39
|
+
confirmCancel: string;
|
|
40
|
+
back: string;
|
|
38
41
|
offerTitle: string;
|
|
39
42
|
offerPause: string;
|
|
40
43
|
offerDowngrade: string;
|
|
@@ -61,6 +61,13 @@ function keydown(event) {
|
|
|
61
61
|
>
|
|
62
62
|
<CancelFlowOffer :flow="flow" />
|
|
63
63
|
</slot>
|
|
64
|
+
<slot
|
|
65
|
+
v-else-if="step === 'confirm'"
|
|
66
|
+
name="confirm"
|
|
67
|
+
v-bind="flow"
|
|
68
|
+
>
|
|
69
|
+
<CancelFlowConfirm :flow="flow" />
|
|
70
|
+
</slot>
|
|
64
71
|
<slot
|
|
65
72
|
v-else
|
|
66
73
|
name="end"
|
|
@@ -68,9 +75,9 @@ function keydown(event) {
|
|
|
68
75
|
>
|
|
69
76
|
<CancelFlowEnd :flow="flow" />
|
|
70
77
|
</slot>
|
|
71
|
-
<!-- "Cancel my plan"
|
|
78
|
+
<!-- "Cancel my plan" before the end, finishing at once, unless the question's own button is it (or the confirmation's); "Close" after it. -->
|
|
72
79
|
<button
|
|
73
|
-
v-if="step === 'question' || step === 'offer'"
|
|
80
|
+
v-if="step === 'question' && flow.offers.value || step === 'offer'"
|
|
74
81
|
data-cancel-flow="cancel"
|
|
75
82
|
type="button"
|
|
76
83
|
v-bind="flow.busy('cancel')"
|
|
@@ -79,7 +86,7 @@ function keydown(event) {
|
|
|
79
86
|
{{ flow.running.value === "cancel" ? t("canceling") : t("cancel") }}
|
|
80
87
|
</button>
|
|
81
88
|
<button
|
|
82
|
-
v-else
|
|
89
|
+
v-else-if="step === 'ended' || step === 'kept'"
|
|
83
90
|
data-cancel-flow="close"
|
|
84
91
|
type="button"
|
|
85
92
|
@click="emit('close')"
|
|
@@ -35,6 +35,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
35
35
|
continue: string;
|
|
36
36
|
cancel: string;
|
|
37
37
|
canceling: string;
|
|
38
|
+
confirmEnds: string;
|
|
39
|
+
confirmCancel: string;
|
|
40
|
+
back: string;
|
|
38
41
|
offerTitle: string;
|
|
39
42
|
offerPause: string;
|
|
40
43
|
offerDowngrade: string;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("../../parts.js").CancelFlowPartProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("../../parts.js").CancelFlowPartProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|