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.
Files changed (373) hide show
  1. package/dist/chunks/catalog.mjs +1 -1
  2. package/dist/chunks/doctor.mjs +71 -12
  3. package/dist/chunks/email-previews.mjs +1 -1
  4. package/dist/chunks/health.mjs +2 -2
  5. package/dist/chunks/index.mjs +3 -3
  6. package/dist/chunks/install.mjs +4 -4
  7. package/dist/chunks/run.mjs +1 -1
  8. package/dist/chunks/server.mjs +7 -5
  9. package/dist/cli.mjs +122 -23
  10. package/dist/convex/account-data.d.ts +0 -2
  11. package/dist/convex/account-data.d.ts.map +1 -1
  12. package/dist/convex/account-data.js +0 -4
  13. package/dist/convex/account-data.js.map +1 -1
  14. package/dist/convex/catalog.d.ts +22 -0
  15. package/dist/convex/catalog.d.ts.map +1 -1
  16. package/dist/convex/catalog.js.map +1 -1
  17. package/dist/convex/client/better-auth-options.d.ts.map +1 -1
  18. package/dist/convex/client/better-auth-options.js +11 -1
  19. package/dist/convex/client/better-auth-options.js.map +1 -1
  20. package/dist/convex/client/client-address.d.ts +21 -0
  21. package/dist/convex/client/client-address.d.ts.map +1 -0
  22. package/dist/convex/client/client-address.js +37 -0
  23. package/dist/convex/client/client-address.js.map +1 -0
  24. package/dist/convex/client/index.d.ts +34 -2
  25. package/dist/convex/client/index.d.ts.map +1 -1
  26. package/dist/convex/components/backend/_generated/component.d.ts +6 -0
  27. package/dist/convex/components/backend/_generated/component.d.ts.map +1 -1
  28. package/dist/convex/components/backend/account.d.ts +6 -6
  29. package/dist/convex/components/backend/account.d.ts.map +1 -1
  30. package/dist/convex/components/backend/account.js +6 -2
  31. package/dist/convex/components/backend/account.js.map +1 -1
  32. package/dist/convex/components/backend/adapter.d.ts.map +1 -1
  33. package/dist/convex/components/backend/adapter.js +4 -1
  34. package/dist/convex/components/backend/adapter.js.map +1 -1
  35. package/dist/convex/components/backend/ai.d.ts +11 -3
  36. package/dist/convex/components/backend/ai.d.ts.map +1 -1
  37. package/dist/convex/components/backend/ai.js +18 -52
  38. package/dist/convex/components/backend/ai.js.map +1 -1
  39. package/dist/convex/components/backend/billing.d.ts.map +1 -1
  40. package/dist/convex/components/backend/billing.js +12 -32
  41. package/dist/convex/components/backend/billing.js.map +1 -1
  42. package/dist/convex/components/backend/consents.d.ts.map +1 -1
  43. package/dist/convex/components/backend/consents.js +2 -1
  44. package/dist/convex/components/backend/consents.js.map +1 -1
  45. package/dist/convex/components/backend/gifts.d.ts +1 -1
  46. package/dist/convex/components/backend/gifts.d.ts.map +1 -1
  47. package/dist/convex/components/backend/gifts.js +9 -4
  48. package/dist/convex/components/backend/gifts.js.map +1 -1
  49. package/dist/convex/components/backend/lifecycle.d.ts.map +1 -1
  50. package/dist/convex/components/backend/lifecycle.js +18 -14
  51. package/dist/convex/components/backend/lifecycle.js.map +1 -1
  52. package/dist/convex/components/backend/notifications.d.ts +13 -0
  53. package/dist/convex/components/backend/notifications.d.ts.map +1 -1
  54. package/dist/convex/components/backend/notifications.js +21 -0
  55. package/dist/convex/components/backend/notifications.js.map +1 -1
  56. package/dist/convex/components/backend/referrals.d.ts.map +1 -1
  57. package/dist/convex/components/backend/referrals.js +13 -16
  58. package/dist/convex/components/backend/referrals.js.map +1 -1
  59. package/dist/convex/components/backend/reports.js +7 -7
  60. package/dist/convex/components/backend/reports.js.map +1 -1
  61. package/dist/convex/components/backend/schema.d.ts +151 -35
  62. package/dist/convex/components/backend/schema.d.ts.map +1 -1
  63. package/dist/convex/components/backend/schema.js +127 -153
  64. package/dist/convex/components/backend/schema.js.map +1 -1
  65. package/dist/convex/components/backend/storage.d.ts.map +1 -1
  66. package/dist/convex/components/backend/storage.js +10 -10
  67. package/dist/convex/components/backend/storage.js.map +1 -1
  68. package/dist/convex/components/backend/subscriptions.d.ts +3 -3
  69. package/dist/convex/components/backend/subscriptions.d.ts.map +1 -1
  70. package/dist/convex/components/backend/subscriptions.js +6 -35
  71. package/dist/convex/components/backend/subscriptions.js.map +1 -1
  72. package/dist/convex/components/backend/waitlist.d.ts +1 -1
  73. package/dist/convex/components/backend/webhooks.d.ts +0 -1
  74. package/dist/convex/components/backend/webhooks.d.ts.map +1 -1
  75. package/dist/convex/components/backend/webhooks.js +1 -1
  76. package/dist/convex/components/backend/webhooks.js.map +1 -1
  77. package/dist/convex/consent-rules.d.ts +0 -2
  78. package/dist/convex/consent-rules.d.ts.map +1 -1
  79. package/dist/convex/consent-rules.js.map +1 -1
  80. package/dist/convex/constants.d.ts +0 -1
  81. package/dist/convex/constants.d.ts.map +1 -1
  82. package/dist/convex/constants.js +0 -1
  83. package/dist/convex/constants.js.map +1 -1
  84. package/dist/convex/email-templates.d.ts +0 -1
  85. package/dist/convex/email-templates.d.ts.map +1 -1
  86. package/dist/convex/email-templates.js +0 -1
  87. package/dist/convex/email-templates.js.map +1 -1
  88. package/dist/convex/integrations/admin.d.ts +2 -1
  89. package/dist/convex/integrations/admin.d.ts.map +1 -1
  90. package/dist/convex/integrations/admin.js.map +1 -1
  91. package/dist/convex/integrations/ai/job-errors.d.ts +7 -0
  92. package/dist/convex/integrations/ai/job-errors.d.ts.map +1 -1
  93. package/dist/convex/integrations/ai/job-errors.js +22 -0
  94. package/dist/convex/integrations/ai/job-errors.js.map +1 -1
  95. package/dist/convex/integrations/ai/metering.d.ts +12 -0
  96. package/dist/convex/integrations/ai/metering.d.ts.map +1 -1
  97. package/dist/convex/integrations/ai/metering.js +19 -10
  98. package/dist/convex/integrations/ai/metering.js.map +1 -1
  99. package/dist/convex/integrations/ai/models.d.ts.map +1 -1
  100. package/dist/convex/integrations/ai/models.js +3 -1
  101. package/dist/convex/integrations/ai/models.js.map +1 -1
  102. package/dist/convex/integrations/ai/moderation.d.ts +2 -0
  103. package/dist/convex/integrations/ai/moderation.d.ts.map +1 -1
  104. package/dist/convex/integrations/ai/moderation.js +29 -2
  105. package/dist/convex/integrations/ai/moderation.js.map +1 -1
  106. package/dist/convex/integrations/ai/stream.d.ts +1 -1
  107. package/dist/convex/integrations/ai/stream.d.ts.map +1 -1
  108. package/dist/convex/integrations/ai/stream.js +3 -11
  109. package/dist/convex/integrations/ai/stream.js.map +1 -1
  110. package/dist/convex/integrations/billing/context.d.ts +0 -1
  111. package/dist/convex/integrations/billing/context.d.ts.map +1 -1
  112. package/dist/convex/integrations/billing/context.js +1 -4
  113. package/dist/convex/integrations/billing/context.js.map +1 -1
  114. package/dist/convex/integrations/billing/credits.d.ts.map +1 -1
  115. package/dist/convex/integrations/billing/customers.d.ts.map +1 -1
  116. package/dist/convex/integrations/billing/customers.js +25 -5
  117. package/dist/convex/integrations/billing/customers.js.map +1 -1
  118. package/dist/convex/integrations/billing/features.d.ts.map +1 -1
  119. package/dist/convex/integrations/billing/free-plan.d.ts +1 -1
  120. package/dist/convex/integrations/billing/free-plan.d.ts.map +1 -1
  121. package/dist/convex/integrations/billing/free-plan.js +18 -4
  122. package/dist/convex/integrations/billing/free-plan.js.map +1 -1
  123. package/dist/convex/integrations/billing/functions.d.ts +5 -1
  124. package/dist/convex/integrations/billing/functions.d.ts.map +1 -1
  125. package/dist/convex/integrations/billing/functions.js +16 -5
  126. package/dist/convex/integrations/billing/functions.js.map +1 -1
  127. package/dist/convex/integrations/billing/gifts.d.ts.map +1 -1
  128. package/dist/convex/integrations/billing/gifts.js +2 -2
  129. package/dist/convex/integrations/billing/gifts.js.map +1 -1
  130. package/dist/convex/integrations/billing/history.d.ts.map +1 -1
  131. package/dist/convex/integrations/billing/history.js +3 -1
  132. package/dist/convex/integrations/billing/history.js.map +1 -1
  133. package/dist/convex/integrations/billing/lifecycle.d.ts +4 -1
  134. package/dist/convex/integrations/billing/lifecycle.d.ts.map +1 -1
  135. package/dist/convex/integrations/billing/lifecycle.js +33 -2
  136. package/dist/convex/integrations/billing/lifecycle.js.map +1 -1
  137. package/dist/convex/integrations/billing/passes.d.ts +0 -2
  138. package/dist/convex/integrations/billing/passes.d.ts.map +1 -1
  139. package/dist/convex/integrations/billing/passes.js +2 -3
  140. package/dist/convex/integrations/billing/passes.js.map +1 -1
  141. package/dist/convex/integrations/billing/pricing.d.ts +4 -1
  142. package/dist/convex/integrations/billing/pricing.d.ts.map +1 -1
  143. package/dist/convex/integrations/billing/pricing.js +11 -9
  144. package/dist/convex/integrations/billing/pricing.js.map +1 -1
  145. package/dist/convex/integrations/billing/purchase.d.ts.map +1 -1
  146. package/dist/convex/integrations/billing/purchase.js +1 -2
  147. package/dist/convex/integrations/billing/purchase.js.map +1 -1
  148. package/dist/convex/integrations/billing/quotas.d.ts.map +1 -1
  149. package/dist/convex/integrations/billing/subscriptions.d.ts.map +1 -1
  150. package/dist/convex/integrations/billing/types/lifecycle.d.ts +12 -0
  151. package/dist/convex/integrations/billing/types/lifecycle.d.ts.map +1 -1
  152. package/dist/convex/integrations/billing/types/options.d.ts +4 -1
  153. package/dist/convex/integrations/billing/types/options.d.ts.map +1 -1
  154. package/dist/convex/integrations/billing/types/records.d.ts +7 -1
  155. package/dist/convex/integrations/billing/types/records.d.ts.map +1 -1
  156. package/dist/convex/integrations/billing/types/surface.d.ts +5 -1
  157. package/dist/convex/integrations/billing/types/surface.d.ts.map +1 -1
  158. package/dist/convex/integrations/billing.d.ts +2 -2
  159. package/dist/convex/integrations/billing.d.ts.map +1 -1
  160. package/dist/convex/integrations/billing.js +1 -0
  161. package/dist/convex/integrations/billing.js.map +1 -1
  162. package/dist/convex/integrations/email-preferences.d.ts +1 -1
  163. package/dist/convex/integrations/email-preferences.d.ts.map +1 -1
  164. package/dist/convex/integrations/email-sync.d.ts.map +1 -1
  165. package/dist/convex/integrations/email-sync.js +43 -1
  166. package/dist/convex/integrations/email-sync.js.map +1 -1
  167. package/dist/convex/integrations/notifications.d.ts +24 -4
  168. package/dist/convex/integrations/notifications.d.ts.map +1 -1
  169. package/dist/convex/integrations/notifications.js +30 -14
  170. package/dist/convex/integrations/notifications.js.map +1 -1
  171. package/dist/convex/integrations/rate-limit.d.ts +6 -5
  172. package/dist/convex/integrations/rate-limit.d.ts.map +1 -1
  173. package/dist/convex/integrations/rate-limit.js +6 -5
  174. package/dist/convex/integrations/rate-limit.js.map +1 -1
  175. package/dist/convex/integrations/reports.d.ts +1 -1
  176. package/dist/convex/integrations/reports.d.ts.map +1 -1
  177. package/dist/convex/integrations/reports.js +0 -11
  178. package/dist/convex/integrations/reports.js.map +1 -1
  179. package/dist/convex/integrations/webhooks.d.ts +1 -3
  180. package/dist/convex/integrations/webhooks.d.ts.map +1 -1
  181. package/dist/convex/integrations/webhooks.js.map +1 -1
  182. package/dist/convex/label-groups/cancelFlow.d.ts +3 -0
  183. package/dist/convex/label-groups/cancelFlow.d.ts.map +1 -1
  184. package/dist/convex/label-groups/cancelFlow.js +5 -0
  185. package/dist/convex/label-groups/cancelFlow.js.map +1 -1
  186. package/dist/convex/label-groups/credits.d.ts +14 -1
  187. package/dist/convex/label-groups/credits.d.ts.map +1 -1
  188. package/dist/convex/label-groups/credits.js +17 -2
  189. package/dist/convex/label-groups/credits.js.map +1 -1
  190. package/dist/convex/label-groups/notifications.d.ts +19 -2
  191. package/dist/convex/label-groups/notifications.d.ts.map +1 -1
  192. package/dist/convex/label-groups/notifications.js +19 -15
  193. package/dist/convex/label-groups/notifications.js.map +1 -1
  194. package/dist/convex/label-groups/pricing.js +8 -8
  195. package/dist/convex/label-groups/pricing.js.map +1 -1
  196. package/dist/convex/label-groups/settings.d.ts.map +1 -1
  197. package/dist/convex/label-groups/settings.js +4 -3
  198. package/dist/convex/label-groups/settings.js.map +1 -1
  199. package/dist/convex/label-groups/usage.d.ts +1 -1
  200. package/dist/convex/label-groups/usage.d.ts.map +1 -1
  201. package/dist/convex/label-groups/usage.js +2 -2
  202. package/dist/convex/label-groups/usage.js.map +1 -1
  203. package/dist/convex/label-translations.d.ts.map +1 -1
  204. package/dist/convex/label-translations.js +52 -0
  205. package/dist/convex/label-translations.js.map +1 -1
  206. package/dist/convex/labels.d.ts +23 -0
  207. package/dist/convex/labels.d.ts.map +1 -1
  208. package/dist/convex/log.js +2 -0
  209. package/dist/convex/log.js.map +1 -1
  210. package/dist/convex/notifications.d.ts +77 -0
  211. package/dist/convex/notifications.d.ts.map +1 -1
  212. package/dist/convex/notifications.js +64 -13
  213. package/dist/convex/notifications.js.map +1 -1
  214. package/dist/convex/proof.d.ts +25 -0
  215. package/dist/convex/proof.d.ts.map +1 -1
  216. package/dist/convex/proof.js +39 -0
  217. package/dist/convex/proof.js.map +1 -1
  218. package/dist/convex/referral-rules.d.ts +0 -2
  219. package/dist/convex/referral-rules.d.ts.map +1 -1
  220. package/dist/convex/referral-rules.js +0 -2
  221. package/dist/convex/referral-rules.js.map +1 -1
  222. package/dist/convex/waitlist-rules.d.ts +1 -13
  223. package/dist/convex/waitlist-rules.d.ts.map +1 -1
  224. package/dist/convex/waitlist-rules.js +2 -14
  225. package/dist/convex/waitlist-rules.js.map +1 -1
  226. package/dist/devtools-client/index.html +1 -1
  227. package/dist/module.js +2 -2
  228. package/dist/module.json +1 -1
  229. package/dist/runtime/locales/de.json +47 -24
  230. package/dist/runtime/locales/en.json +47 -24
  231. package/dist/runtime/locales/es.json +47 -24
  232. package/dist/runtime/locales/fr.json +47 -24
  233. package/dist/runtime/locales/ru.json +47 -24
  234. package/dist/runtime/server/protection/gate.d.ts +4 -2
  235. package/dist/runtime/server/protection/gate.js +14 -4
  236. package/dist/runtime/vue/admin-client.d.ts +18 -0
  237. package/dist/runtime/vue/admin-client.js +32 -0
  238. package/dist/runtime/vue/auth-client.d.ts +16 -11
  239. package/dist/runtime/vue/auth-client.js +3 -1
  240. package/dist/runtime/vue/components/admin/AdminUsers.d.vue.ts +1 -1
  241. package/dist/runtime/vue/components/admin/AdminUsers.vue.d.ts +1 -1
  242. package/dist/runtime/vue/components/billing/BillingCheckoutLink.d.vue.ts +1 -1
  243. package/dist/runtime/vue/components/billing/BillingCheckoutLink.vue.d.ts +1 -1
  244. package/dist/runtime/vue/components/billing/CancelFlow.css +1 -1
  245. package/dist/runtime/vue/components/billing/CancelFlow.d.vue.ts +3 -0
  246. package/dist/runtime/vue/components/billing/CancelFlow.vue +10 -3
  247. package/dist/runtime/vue/components/billing/CancelFlow.vue.d.ts +3 -0
  248. package/dist/runtime/vue/components/billing/CancelFlowConfirm.d.vue.ts +3 -0
  249. package/dist/runtime/vue/components/billing/CancelFlowConfirm.vue +34 -0
  250. package/dist/runtime/vue/components/billing/CancelFlowConfirm.vue.d.ts +3 -0
  251. package/dist/runtime/vue/components/billing/CancelFlowQuestion.vue +2 -1
  252. package/dist/runtime/vue/components/billing/GiftSent.d.vue.ts +2 -2
  253. package/dist/runtime/vue/components/billing/GiftSent.vue.d.ts +2 -2
  254. package/dist/runtime/vue/components/billing/PricingPackCard.vue +6 -3
  255. package/dist/runtime/vue/components/billing/PricingPlanCard.vue +3 -1
  256. package/dist/runtime/vue/components/billing/PricingTable.d.vue.ts +2 -2
  257. package/dist/runtime/vue/components/billing/PricingTable.vue +3 -1
  258. package/dist/runtime/vue/components/billing/PricingTable.vue.d.ts +2 -2
  259. package/dist/runtime/vue/components/billing/UsageHistoryEvent.vue +3 -1
  260. package/dist/runtime/vue/components/billing/cancel-flow.d.ts +28 -7
  261. package/dist/runtime/vue/components/billing/cancel-flow.js +25 -2
  262. package/dist/runtime/vue/components/shell/NoticeLowCredits.vue +3 -1
  263. package/dist/runtime/vue/components/tokens.css +1 -1
  264. package/dist/runtime/vue/components/workspaces/WorkspaceCredits.vue +6 -3
  265. package/dist/runtime/vue/components/workspaces/WorkspaceSettings.d.vue.ts +2 -2
  266. package/dist/runtime/vue/components/workspaces/WorkspaceSettings.vue.d.ts +2 -2
  267. package/dist/runtime/vue/composables/use-auth.d.ts +13 -1
  268. package/dist/runtime/vue/composables/use-auth.js +4 -1
  269. package/dist/runtime/vue/composables/use-billing.d.ts +10 -2
  270. package/dist/runtime/vue/composables/use-credits.d.ts +3 -0
  271. package/dist/runtime/vue/composables/use-credits.js +1 -0
  272. package/dist/runtime/vue/composables/use-notifications.d.ts +5 -1
  273. package/dist/runtime/vue/composables/use-notifications.js +12 -4
  274. package/dist/runtime/vue/composables/use-webhook-log.d.ts +4 -2
  275. package/dist/runtime/vue/organization-client.d.ts +15 -0
  276. package/dist/runtime/vue/organization-client.js +65 -0
  277. package/dist/runtime/vue/parts.d.ts +2 -1
  278. package/dist/runtime/vue/plugins/checkout-return.d.ts +3 -2
  279. package/dist/runtime/vue/plugins/checkout-return.js +2 -4
  280. package/dist/runtime/vue/plugins/first-touch.js +2 -4
  281. package/dist/runtime/vue/utils/checkout-return.d.ts +9 -2
  282. package/dist/runtime/vue/utils/checkout-return.js +2 -1
  283. package/dist/runtime/vue/utils/every-page.d.ts +10 -0
  284. package/dist/runtime/vue/utils/every-page.js +6 -0
  285. package/dist/runtime/vue/utils/meter-unit.d.ts +14 -0
  286. package/dist/runtime/vue/utils/meter-unit.js +18 -0
  287. package/dist/shared/{nuxt-backend.2YoiKo8j.mjs → nuxt-backend.2m535CLS.mjs} +6 -2
  288. package/dist/shared/{nuxt-backend.CPq101Wi.mjs → nuxt-backend.DXEf0rrv.mjs} +1 -1
  289. package/dist/shared/{nuxt-backend.-uB5CGw-.mjs → nuxt-backend.Dm1NkY7v.mjs} +1 -1
  290. package/dist/shared/{nuxt-backend.OQMX-0U7.mjs → nuxt-backend.KEzfHO2K.mjs} +6 -3
  291. package/dist/shared/{nuxt-backend.S5C2b-4I.mjs → nuxt-backend.ikObmtHs.mjs} +2 -2
  292. package/package.json +2 -2
  293. package/skills/nuxt-backend/references/api.md +13 -3
  294. package/skills/nuxt-backend/references/surface.json +12 -0
  295. package/skills/nuxt-backend-auth/SKILL.md +2 -1
  296. package/skills/nuxt-backend-billing/SKILL.md +7 -0
  297. package/skills/nuxt-backend-billing/references/api.md +12 -2
  298. package/skills/nuxt-backend-data/SKILL.md +4 -1
  299. package/skills/nuxt-backend-email/SKILL.md +4 -0
  300. package/skills/nuxt-backend-email/references/api.md +1 -1
  301. package/skills/nuxt-backend-ui/SKILL.md +6 -5
  302. package/src/convex/account-data.ts +0 -5
  303. package/src/convex/catalog.ts +23 -0
  304. package/src/convex/client/better-auth-options.ts +11 -1
  305. package/src/convex/client/client-address.ts +37 -0
  306. package/src/convex/components/backend/_generated/component.ts +12 -0
  307. package/src/convex/components/backend/account.ts +7 -2
  308. package/src/convex/components/backend/adapter.ts +4 -1
  309. package/src/convex/components/backend/ai.ts +20 -54
  310. package/src/convex/components/backend/billing.ts +14 -33
  311. package/src/convex/components/backend/consents.ts +2 -1
  312. package/src/convex/components/backend/gifts.ts +11 -5
  313. package/src/convex/components/backend/lifecycle.ts +17 -12
  314. package/src/convex/components/backend/notifications.ts +22 -0
  315. package/src/convex/components/backend/referrals.ts +14 -16
  316. package/src/convex/components/backend/reports.ts +7 -7
  317. package/src/convex/components/backend/schema.ts +143 -161
  318. package/src/convex/components/backend/storage.ts +11 -10
  319. package/src/convex/components/backend/subscriptions.ts +7 -35
  320. package/src/convex/components/backend/webhooks.ts +1 -10
  321. package/src/convex/consent-rules.ts +0 -3
  322. package/src/convex/constants.ts +0 -1
  323. package/src/convex/email-templates.ts +0 -1
  324. package/src/convex/integrations/admin.ts +2 -1
  325. package/src/convex/integrations/ai/job-errors.ts +21 -0
  326. package/src/convex/integrations/ai/metering.ts +24 -10
  327. package/src/convex/integrations/ai/models.ts +3 -1
  328. package/src/convex/integrations/ai/moderation.ts +31 -2
  329. package/src/convex/integrations/ai/stream.ts +3 -11
  330. package/src/convex/integrations/billing/context.ts +1 -9
  331. package/src/convex/integrations/billing/customers.ts +28 -5
  332. package/src/convex/integrations/billing/free-plan.ts +20 -5
  333. package/src/convex/integrations/billing/functions.ts +17 -5
  334. package/src/convex/integrations/billing/gifts.ts +2 -2
  335. package/src/convex/integrations/billing/history.ts +2 -1
  336. package/src/convex/integrations/billing/lifecycle.ts +30 -3
  337. package/src/convex/integrations/billing/passes.ts +2 -4
  338. package/src/convex/integrations/billing/pricing.ts +14 -10
  339. package/src/convex/integrations/billing/purchase.ts +1 -2
  340. package/src/convex/integrations/billing/types/lifecycle.ts +13 -0
  341. package/src/convex/integrations/billing/types/options.ts +4 -1
  342. package/src/convex/integrations/billing/types/records.ts +7 -1
  343. package/src/convex/integrations/billing/types/surface.ts +3 -1
  344. package/src/convex/integrations/billing.ts +3 -2
  345. package/src/convex/integrations/email-preferences.ts +1 -1
  346. package/src/convex/integrations/email-sync.ts +44 -1
  347. package/src/convex/integrations/notifications.ts +65 -16
  348. package/src/convex/integrations/rate-limit.ts +6 -5
  349. package/src/convex/integrations/reports.ts +1 -1
  350. package/src/convex/integrations/webhooks.ts +1 -4
  351. package/src/convex/label-groups/cancelFlow.ts +5 -0
  352. package/src/convex/label-groups/credits.ts +17 -2
  353. package/src/convex/label-groups/notifications.ts +19 -15
  354. package/src/convex/label-groups/pricing.ts +8 -8
  355. package/src/convex/label-groups/settings.ts +4 -3
  356. package/src/convex/label-groups/usage.ts +2 -2
  357. package/src/convex/label-translations.ts +52 -0
  358. package/src/convex/log.ts +2 -0
  359. package/src/convex/notifications.ts +99 -13
  360. package/src/convex/proof.ts +43 -0
  361. package/src/convex/referral-rules.ts +0 -2
  362. package/src/convex/waitlist-rules.ts +2 -22
  363. package/src/runtime/vue/components/billing/CancelFlow.css +16 -0
  364. package/src/runtime/vue/components/billing/CancelFlow.vue +16 -6
  365. package/src/runtime/vue/components/billing/CancelFlowConfirm.vue +35 -0
  366. package/src/runtime/vue/components/billing/CancelFlowQuestion.vue +8 -2
  367. package/src/runtime/vue/components/billing/PricingPackCard.vue +6 -3
  368. package/src/runtime/vue/components/billing/PricingPlanCard.vue +3 -1
  369. package/src/runtime/vue/components/billing/PricingTable.vue +3 -1
  370. package/src/runtime/vue/components/billing/UsageHistoryEvent.vue +3 -1
  371. package/src/runtime/vue/components/shell/NoticeLowCredits.vue +3 -1
  372. package/src/runtime/vue/components/tokens.css +19 -15
  373. package/src/runtime/vue/components/workspaces/WorkspaceCredits.vue +6 -3
@@ -11,7 +11,7 @@ import { logBackend } from '../log.js'
11
11
  import { type AdapterFindOne, type Administrators, createAccessReads, isAdministratorNow, requireAdministratorInPerson } from './access.js'
12
12
  import { type Audit, setupAudit } from './audit.js'
13
13
  import { providerClientOptions } from './billing/provider-client.js'
14
- import type { WebhookDeliveryRow, WebhookOutcome } from './webhook-guard.js'
14
+ import type { WebhookDeliveryRow, WebhookOutcome, WebhookService } from './webhook-guard.js'
15
15
 
16
16
  export type { WebhookDeliveryRow, WebhookOutcome } from './webhook-guard.js'
17
17
 
@@ -24,9 +24,6 @@ export type { WebhookDeliveryRow, WebhookOutcome } from './webhook-guard.js'
24
24
  // sign-in, stamped on the delivery (`replayedAt`) and recorded on the
25
25
  // activity trail (`webhook.replayed`).
26
26
 
27
- /** The services whose deliveries the log keeps. */
28
- export type WebhookService = 'billing' | 'email'
29
-
30
27
  /** What a replay answered: the provider took it, and when the delivery was stamped. */
31
28
  export interface WebhookReplay {
32
29
  replayedAt: number
@@ -22,8 +22,13 @@ const CANCEL_FLOW_LABELS = {
22
22
  },
23
23
  comment: 'Anything you want to tell us? (optional)',
24
24
  continue: 'Continue',
25
+ // Beside every step before the end; the question's own button too, when no offer can stand.
25
26
  cancel: 'Cancel my plan',
26
27
  canceling: 'Canceling…',
28
+ // The confirmation, when no offer can stand and "Cancel my plan" ends the plan.
29
+ confirmEnds: 'Your plan ends when the current period does. Until then everything keeps working.',
30
+ confirmCancel: 'Confirm cancellation',
31
+ back: 'Back',
27
32
  // The one offer, by its kind.
28
33
  offerTitle: 'Before you go',
29
34
  offerPause: 'Pause {plan} for {count} month instead. It resumes by itself on {date}, and nothing is charged meanwhile. | Pause {plan} for {count} months instead. It resumes by itself on {date}, and nothing is charged meanwhile.',
@@ -1,8 +1,23 @@
1
1
  import type { LabelTree } from '../label-format.js'
2
2
 
3
- /** The low-credits notice of `<BackendNotices>`. `low` takes the balance as `{balance}`, which is also its plural count. */
3
+ /**
4
+ * The low-credits notice of `<BackendNotices>`, and the unit every billing
5
+ * label names. `low` takes the balance as `{balance}`. `{unit}`, here and
6
+ * in the `usage`, `settings` and `pricing` groups, is the meter's unit in
7
+ * the form its count takes: the catalog's (`meters.<key>.unit`), else
8
+ * `unit` below.
9
+ */
4
10
  const CREDITS_LABELS = {
5
- low: '{balance} credit left. | {balance} credits left.',
11
+ low: '{balance} {unit} left.',
12
+ // A meter's unit when the catalog names none: its word for each plural
13
+ // category (`few` and `many` for the languages that have them), and as a heading.
14
+ unit: {
15
+ one: 'credit',
16
+ few: 'credits',
17
+ many: 'credits',
18
+ other: 'credits',
19
+ },
20
+ unitTitle: 'Credits',
6
21
  topUp: 'Top up',
7
22
  // The action that buys the pack preselected for the shortfall.
8
23
  topUpPack: 'Buy {pack}',
@@ -7,8 +7,12 @@ import type { LabelTree } from '../label-format.js'
7
7
  * has its words under its type without `app.` (`strip_shared.title`).
8
8
  * Placeholders: `{actor}` is who did it, `{workspace}` the workspace it
9
9
  * happened in, `{amount}` an amount in its currency, and the rest are the
10
- * kind's own fields (`{role}`, `{balance}`). The component's own keys
11
- * always hold a capital letter, so they never meet a kind's.
10
+ * kind's own fields (`{role}`, `{balance}`). A billing, gift or pass
11
+ * kind whose words name `{workspace}` has a second set for an app that
12
+ * bills the person (`billTo: 'user'`), where the plan is their own:
13
+ * `titleYours` and `bodyYours`, read in place of `title` and `body`.
14
+ * The component's own keys always hold a capital letter, so they never
15
+ * meet a kind's.
12
16
  */
13
17
  const NOTIFICATIONS_LABELS = {
14
18
  // The button's name, and its name with the unread count: spoken, not only shown.
@@ -54,25 +58,25 @@ const NOTIFICATIONS_LABELS = {
54
58
  role_changed: { title: 'Your role changed', body: 'An administrator set your role to {role}.' },
55
59
  },
56
60
  billing: {
57
- plan_changed: { title: 'The plan of {workspace} changed', body: '{actor} changed the subscription.' },
58
- subscription_created: { title: 'A subscription started', body: 'The plan of {workspace} is active.' },
61
+ plan_changed: { title: 'The plan of {workspace} changed', body: '{actor} changed the subscription.', titleYours: 'Your plan changed' },
62
+ subscription_created: { title: 'A subscription started', body: 'The plan of {workspace} is active.', bodyYours: 'Your plan is active.' },
59
63
  subscription_canceled: { title: 'A subscription was canceled', body: 'It stays active until the end of the period.' },
60
- subscription_revoked: { title: 'A subscription ended', body: 'The plan of {workspace} is no longer active.' },
61
- subscription_past_due: { title: 'A payment failed', body: 'Update the payment method of {workspace} to keep its plan.' },
64
+ subscription_revoked: { title: 'A subscription ended', body: 'The plan of {workspace} is no longer active.', bodyYours: 'Your plan is no longer active.' },
65
+ subscription_past_due: { title: 'A payment failed', body: 'Update the payment method of {workspace} to keep its plan.', bodyYours: 'Update your payment method to keep your plan.' },
62
66
  order_paid: { title: 'Payment received', body: 'An order of {amount} was paid.' },
63
67
  order_refunded: { title: 'An order was refunded', body: '{amount} was refunded.' },
64
- credits_low: { title: 'Credits are running low', body: '{balance} credits are left in {workspace}.' },
65
- credits_exhausted: { title: 'Credits ran out', body: 'Top up {workspace} to keep going.' },
66
- save_offer_accepted: { title: 'The plan of {workspace} was kept', body: '{actor} took an offer instead of canceling.' },
67
- contract_withdrawn: { title: 'A purchase was withdrawn', body: '{actor} withdrew from the plan of {workspace}.' },
68
- trial_pass_started: { title: 'Your trial started', body: '{workspace} has the full plan for the trial, with no card.' },
68
+ credits_low: { title: 'Credits are running low', body: '{balance} credits are left in {workspace}.', bodyYours: '{balance} credits are left.' },
69
+ credits_exhausted: { title: 'Credits ran out', body: 'Top up {workspace} to keep going.', bodyYours: 'Top up to keep going.' },
70
+ save_offer_accepted: { title: 'The plan of {workspace} was kept', body: '{actor} took an offer instead of canceling.', titleYours: 'Your plan was kept' },
71
+ contract_withdrawn: { title: 'A purchase was withdrawn', body: '{actor} withdrew from the plan of {workspace}.', bodyYours: '{actor} withdrew from your plan.' },
72
+ trial_pass_started: { title: 'Your trial started', body: '{workspace} has the full plan for the trial, with no card.', bodyYours: 'You have the full plan for the trial, with no card.' },
69
73
  },
70
74
  gift: {
71
75
  purchased: { title: 'A gift was bought', body: 'Its recipient was told.' },
72
- claimed: { title: 'A gift was claimed', body: 'It landed in {workspace}.' },
73
- pass_started: { title: 'A plan pass started', body: '{workspace} has the gifted plan, with no card and no renewal.' },
74
- pass_ending: { title: 'A plan pass ends in a week', body: 'Choose the plan for {workspace} to keep it.' },
75
- pass_ended: { title: 'A plan pass ended', body: 'The gifted plan of {workspace} is over.' },
76
+ claimed: { title: 'A gift was claimed', body: 'It landed in {workspace}.', bodyYours: 'It landed on your account.' },
77
+ pass_started: { title: 'A plan pass started', body: '{workspace} has the gifted plan, with no card and no renewal.', bodyYours: 'You have the gifted plan, with no card and no renewal.' },
78
+ pass_ending: { title: 'A plan pass ends in a week', body: 'Choose the plan for {workspace} to keep it.', bodyYours: 'Choose the plan to keep it.' },
79
+ pass_ended: { title: 'A plan pass ended', body: 'The gifted plan of {workspace} is over.', bodyYours: 'Your gifted plan is over.' },
76
80
  refunded: { title: 'A gift was refunded', body: 'It was refunded before anyone claimed it.' },
77
81
  },
78
82
  referral: {
@@ -26,17 +26,17 @@ const PRICING_LABELS = {
26
26
  // While the plans load.
27
27
  loading: 'Loading plans…',
28
28
  empty: 'No plans are configured yet.',
29
- // What a plan grants every cycle, by its interval.
29
+ // What a plan grants every cycle, by its interval. `{unit}` is the meter's unit, as the `credits` group says.
30
30
  credits: {
31
- month: '{count} credit / month | {count} credits / month',
32
- year: '{count} credit / year | {count} credits / year',
31
+ month: '{count} {unit} / month',
32
+ year: '{count} {unit} / year',
33
33
  },
34
34
  // A retired plan, shown only to the people still on it.
35
35
  retired: 'No longer offered',
36
- // A credit pack: what it holds, and how its credits compare.
37
- packCredits: '{count} credit | {count} credits',
38
- perCredit: '{price} per credit',
39
- lessPerCredit: '{percent}% less per credit',
36
+ // A credit pack: what it holds, and what one of its units costs, compared.
37
+ packCredits: '{count} {unit}',
38
+ perCredit: '{price} per {unit}',
39
+ lessPerCredit: '{percent}% less per {unit}',
40
40
  bestValue: 'Best value',
41
41
  // A promotion on a price (`<PricingTable discount>`): its real terms, then
42
42
  // the regular price, and its real end as a date. {off} is a percentage or
@@ -84,7 +84,7 @@ const PRICING_LABELS = {
84
84
  uncanceling: 'Keeping the plan…',
85
85
  openingPortal: 'Opening the portal…',
86
86
  // What a workspace member who manages none of its billing reads in place of the plan and pack buttons.
87
- managed: 'Your workspace\'s owner and admins manage its plan and buy its credits.',
87
+ managed: 'Your workspace\'s owner and admins manage its plan and buy its {unit}.',
88
88
  // Back from checkout, while the new plan is read.
89
89
  finishingPurchase: 'Finishing your purchase…',
90
90
  // Cancelling takes one step: what ends when, and the one button that cancels.
@@ -75,10 +75,11 @@ const SETTINGS_LABELS = {
75
75
  },
76
76
  files: '{count} file | {count} files',
77
77
  benefitsPortal: 'Whole keys, files and connected accounts are in the billing portal.',
78
- credits: 'Credits',
79
- balance: '{count} credit | {count} credits',
78
+ // The credits section, by the meter's unit as a heading; `{unit}` as the `credits` group says.
79
+ credits: '{unit}',
80
+ balance: '{count} {unit}',
80
81
  // While the balance loads.
81
- balanceUnknown: '— credits',
82
+ balanceUnknown: '— {unit}',
82
83
  credited: '{count} credited',
83
84
  used: '{count} used',
84
85
  // A credit pack's button, by the pack's product name.
@@ -1,9 +1,9 @@
1
1
  import type { LabelTree } from '../label-format.js'
2
2
 
3
- /** `<UsageHistory>`: metered consumption. `title` is empty, as in `history`. */
3
+ /** `<UsageHistory>`: metered consumption. `title` is empty, as in `history`. `{unit}` is the meter's unit (see the `credits` group). */
4
4
  const USAGE_LABELS = {
5
5
  title: '',
6
- units: '{count} credit | {count} credits',
6
+ units: '{count} {unit}',
7
7
  empty: 'No usage recorded yet.',
8
8
  loading: 'Loading…',
9
9
  newer: 'Newer',
@@ -308,10 +308,12 @@ export const LABEL_TRANSLATIONS: Record<string, LabelTree> = {
308
308
  plan_changed: {
309
309
  title: 'Тариф пространства {workspace} изменён',
310
310
  body: 'Подписка изменена. Кем: {actor}.',
311
+ titleYours: 'Ваш тариф изменён',
311
312
  },
312
313
  subscription_created: {
313
314
  title: 'Подписка оформлена',
314
315
  body: 'Тариф пространства {workspace} активен.',
316
+ bodyYours: 'Ваш тариф активен.',
315
317
  },
316
318
  subscription_canceled: {
317
319
  title: 'Подписка отменена',
@@ -320,10 +322,12 @@ export const LABEL_TRANSLATIONS: Record<string, LabelTree> = {
320
322
  subscription_revoked: {
321
323
  title: 'Подписка закончилась',
322
324
  body: 'Тариф пространства {workspace} больше не действует.',
325
+ bodyYours: 'Ваш тариф больше не действует.',
323
326
  },
324
327
  subscription_past_due: {
325
328
  title: 'Платёж не прошёл',
326
329
  body: 'Обновите способ оплаты пространства {workspace}, чтобы сохранить тариф.',
330
+ bodyYours: 'Обновите способ оплаты, чтобы сохранить тариф.',
327
331
  },
328
332
  order_paid: {
329
333
  title: 'Платёж получен',
@@ -336,22 +340,27 @@ export const LABEL_TRANSLATIONS: Record<string, LabelTree> = {
336
340
  credits_low: {
337
341
  title: 'Кредиты заканчиваются',
338
342
  body: 'Осталось кредитов в пространстве {workspace}: {balance}.',
343
+ bodyYours: 'Осталось кредитов: {balance}.',
339
344
  },
340
345
  credits_exhausted: {
341
346
  title: 'Кредиты закончились',
342
347
  body: 'Пополните баланс пространства {workspace}, чтобы продолжить.',
348
+ bodyYours: 'Пополните баланс, чтобы продолжить.',
343
349
  },
344
350
  save_offer_accepted: {
345
351
  title: 'Тариф пространства {workspace} сохранён',
346
352
  body: 'Вместо отмены принято специальное предложение. Кем: {actor}.',
353
+ titleYours: 'Ваш тариф сохранён',
347
354
  },
348
355
  contract_withdrawn: {
349
356
  title: 'Отказ от покупки',
350
357
  body: 'Отказ от тарифа пространства {workspace}. Кем: {actor}.',
358
+ bodyYours: 'Отказ от вашего тарифа. Кем: {actor}.',
351
359
  },
352
360
  trial_pass_started: {
353
361
  title: 'Пробный период начался',
354
362
  body: 'На время пробного периода у пространства {workspace} полный тариф, без карты.',
363
+ bodyYours: 'На время пробного периода у вас полный тариф, без карты.',
355
364
  },
356
365
  },
357
366
  gift: {
@@ -362,18 +371,22 @@ export const LABEL_TRANSLATIONS: Record<string, LabelTree> = {
362
371
  claimed: {
363
372
  title: 'Подарок получен',
364
373
  body: 'Он зачислен в пространство {workspace}.',
374
+ bodyYours: 'Он зачислен на ваш аккаунт.',
365
375
  },
366
376
  pass_started: {
367
377
  title: 'Подаренный тариф начал действовать',
368
378
  body: 'У пространства {workspace} подаренный тариф — без карты и без продления.',
379
+ bodyYours: 'У вас подаренный тариф — без карты и без продления.',
369
380
  },
370
381
  pass_ending: {
371
382
  title: 'Подаренный тариф закончится через неделю',
372
383
  body: 'Выберите тариф для пространства {workspace}, чтобы сохранить его.',
384
+ bodyYours: 'Выберите тариф, чтобы сохранить его.',
373
385
  },
374
386
  pass_ended: {
375
387
  title: 'Подаренный тариф закончился',
376
388
  body: 'Подаренный тариф пространства {workspace} больше не действует.',
389
+ bodyYours: 'Ваш подаренный тариф больше не действует.',
377
390
  },
378
391
  refunded: {
379
392
  title: 'Подарок возвращён',
@@ -752,10 +765,12 @@ export const LABEL_TRANSLATIONS: Record<string, LabelTree> = {
752
765
  plan_changed: {
753
766
  title: 'Der Tarif von {workspace} hat sich geändert',
754
767
  body: '{actor} hat das Abo geändert.',
768
+ titleYours: 'Ihr Tarif hat sich geändert',
755
769
  },
756
770
  subscription_created: {
757
771
  title: 'Ein Abo wurde abgeschlossen',
758
772
  body: 'Der Tarif von {workspace} ist aktiv.',
773
+ bodyYours: 'Ihr Tarif ist aktiv.',
759
774
  },
760
775
  subscription_canceled: {
761
776
  title: 'Ein Abo wurde gekündigt',
@@ -764,10 +779,12 @@ export const LABEL_TRANSLATIONS: Record<string, LabelTree> = {
764
779
  subscription_revoked: {
765
780
  title: 'Ein Abo ist beendet',
766
781
  body: 'Der Tarif von {workspace} ist nicht mehr aktiv.',
782
+ bodyYours: 'Ihr Tarif ist nicht mehr aktiv.',
767
783
  },
768
784
  subscription_past_due: {
769
785
  title: 'Eine Zahlung ist fehlgeschlagen',
770
786
  body: 'Aktualisieren Sie die Zahlungsmethode von {workspace}, um den Tarif zu behalten.',
787
+ bodyYours: 'Aktualisieren Sie Ihre Zahlungsmethode, um Ihren Tarif zu behalten.',
771
788
  },
772
789
  order_paid: {
773
790
  title: 'Zahlung eingegangen',
@@ -780,22 +797,27 @@ export const LABEL_TRANSLATIONS: Record<string, LabelTree> = {
780
797
  credits_low: {
781
798
  title: 'Die Credits werden knapp',
782
799
  body: 'Verbleibende Credits in {workspace}: {balance}.',
800
+ bodyYours: 'Verbleibende Credits: {balance}.',
783
801
  },
784
802
  credits_exhausted: {
785
803
  title: 'Die Credits sind aufgebraucht',
786
804
  body: 'Laden Sie in {workspace} Credits auf, um weiterzumachen.',
805
+ bodyYours: 'Laden Sie Credits auf, um weiterzumachen.',
787
806
  },
788
807
  save_offer_accepted: {
789
808
  title: 'Der Tarif von {workspace} bleibt bestehen',
790
809
  body: '{actor} hat ein Angebot angenommen, statt zu kündigen.',
810
+ titleYours: 'Ihr Tarif bleibt bestehen',
791
811
  },
792
812
  contract_withdrawn: {
793
813
  title: 'Von einem Kauf wurde zurückgetreten',
794
814
  body: '{actor} ist vom Tarif von {workspace} zurückgetreten.',
815
+ bodyYours: '{actor} ist von Ihrem Tarif zurückgetreten.',
795
816
  },
796
817
  trial_pass_started: {
797
818
  title: 'Ihre Testphase hat begonnen',
798
819
  body: 'In {workspace} gilt während der Testphase der volle Tarif, ohne Karte.',
820
+ bodyYours: 'Während der Testphase haben Sie den vollen Tarif, ohne Karte.',
799
821
  },
800
822
  },
801
823
  gift: {
@@ -806,18 +828,22 @@ export const LABEL_TRANSLATIONS: Record<string, LabelTree> = {
806
828
  claimed: {
807
829
  title: 'Ein Geschenk wurde eingelöst',
808
830
  body: 'Es ist in {workspace} angekommen.',
831
+ bodyYours: 'Es ist in Ihrem Konto angekommen.',
809
832
  },
810
833
  pass_started: {
811
834
  title: 'Ein Tarifpass hat begonnen',
812
835
  body: 'In {workspace} gilt der geschenkte Tarif, ohne Karte und ohne Verlängerung.',
836
+ bodyYours: 'Sie haben den geschenkten Tarif, ohne Karte und ohne Verlängerung.',
813
837
  },
814
838
  pass_ending: {
815
839
  title: 'Ein Tarifpass endet in einer Woche',
816
840
  body: 'Wählen Sie den Tarif für {workspace}, um ihn zu behalten.',
841
+ bodyYours: 'Wählen Sie den Tarif, um ihn zu behalten.',
817
842
  },
818
843
  pass_ended: {
819
844
  title: 'Ein Tarifpass ist abgelaufen',
820
845
  body: 'Der geschenkte Tarif von {workspace} ist abgelaufen.',
846
+ bodyYours: 'Ihr geschenkter Tarif ist abgelaufen.',
821
847
  },
822
848
  refunded: {
823
849
  title: 'Ein Geschenk wurde erstattet',
@@ -1196,10 +1222,12 @@ export const LABEL_TRANSLATIONS: Record<string, LabelTree> = {
1196
1222
  plan_changed: {
1197
1223
  title: 'El plan de {workspace} cambió',
1198
1224
  body: '{actor} cambió la suscripción.',
1225
+ titleYours: 'Tu plan cambió',
1199
1226
  },
1200
1227
  subscription_created: {
1201
1228
  title: 'Se inició una suscripción',
1202
1229
  body: 'El plan de {workspace} está activo.',
1230
+ bodyYours: 'Tu plan está activo.',
1203
1231
  },
1204
1232
  subscription_canceled: {
1205
1233
  title: 'Se canceló una suscripción',
@@ -1208,10 +1236,12 @@ export const LABEL_TRANSLATIONS: Record<string, LabelTree> = {
1208
1236
  subscription_revoked: {
1209
1237
  title: 'Una suscripción finalizó',
1210
1238
  body: 'El plan de {workspace} ya no está activo.',
1239
+ bodyYours: 'Tu plan ya no está activo.',
1211
1240
  },
1212
1241
  subscription_past_due: {
1213
1242
  title: 'Un pago falló',
1214
1243
  body: 'Actualiza el método de pago de {workspace} para conservar su plan.',
1244
+ bodyYours: 'Actualiza tu método de pago para conservar tu plan.',
1215
1245
  },
1216
1246
  order_paid: {
1217
1247
  title: 'Pago recibido',
@@ -1224,22 +1254,27 @@ export const LABEL_TRANSLATIONS: Record<string, LabelTree> = {
1224
1254
  credits_low: {
1225
1255
  title: 'Quedan pocos créditos',
1226
1256
  body: 'Créditos restantes en {workspace}: {balance}.',
1257
+ bodyYours: 'Créditos restantes: {balance}.',
1227
1258
  },
1228
1259
  credits_exhausted: {
1229
1260
  title: 'Se agotaron los créditos',
1230
1261
  body: 'Recarga {workspace} para seguir.',
1262
+ bodyYours: 'Recarga para seguir.',
1231
1263
  },
1232
1264
  save_offer_accepted: {
1233
1265
  title: 'Se conservó el plan de {workspace}',
1234
1266
  body: '{actor} aceptó una oferta en lugar de cancelar.',
1267
+ titleYours: 'Se conservó tu plan',
1235
1268
  },
1236
1269
  contract_withdrawn: {
1237
1270
  title: 'Se desistió de una compra',
1238
1271
  body: '{actor} desistió del plan de {workspace}.',
1272
+ bodyYours: '{actor} desistió de tu plan.',
1239
1273
  },
1240
1274
  trial_pass_started: {
1241
1275
  title: 'Tu prueba empezó',
1242
1276
  body: '{workspace} tiene el plan completo durante la prueba, sin tarjeta.',
1277
+ bodyYours: 'Tienes el plan completo durante la prueba, sin tarjeta.',
1243
1278
  },
1244
1279
  },
1245
1280
  gift: {
@@ -1250,18 +1285,22 @@ export const LABEL_TRANSLATIONS: Record<string, LabelTree> = {
1250
1285
  claimed: {
1251
1286
  title: 'Se canjeó un regalo',
1252
1287
  body: 'Llegó a {workspace}.',
1288
+ bodyYours: 'Llegó a tu cuenta.',
1253
1289
  },
1254
1290
  pass_started: {
1255
1291
  title: 'Empezó un pase de plan',
1256
1292
  body: '{workspace} tiene el plan regalado, sin tarjeta y sin renovación.',
1293
+ bodyYours: 'Tienes el plan regalado, sin tarjeta y sin renovación.',
1257
1294
  },
1258
1295
  pass_ending: {
1259
1296
  title: 'Un pase de plan termina en una semana',
1260
1297
  body: 'Elige el plan de {workspace} para conservarlo.',
1298
+ bodyYours: 'Elige el plan para conservarlo.',
1261
1299
  },
1262
1300
  pass_ended: {
1263
1301
  title: 'Un pase de plan terminó',
1264
1302
  body: 'El plan regalado de {workspace} ha terminado.',
1303
+ bodyYours: 'Tu plan regalado ha terminado.',
1265
1304
  },
1266
1305
  refunded: {
1267
1306
  title: 'Se reembolsó un regalo',
@@ -1640,10 +1679,12 @@ export const LABEL_TRANSLATIONS: Record<string, LabelTree> = {
1640
1679
  plan_changed: {
1641
1680
  title: 'Le forfait de {workspace} a changé',
1642
1681
  body: '{actor} a modifié l’abonnement.',
1682
+ titleYours: 'Votre forfait a changé',
1643
1683
  },
1644
1684
  subscription_created: {
1645
1685
  title: 'Un abonnement a commencé',
1646
1686
  body: 'Le forfait de {workspace} est actif.',
1687
+ bodyYours: 'Votre forfait est actif.',
1647
1688
  },
1648
1689
  subscription_canceled: {
1649
1690
  title: 'Un abonnement a été annulé',
@@ -1652,10 +1693,12 @@ export const LABEL_TRANSLATIONS: Record<string, LabelTree> = {
1652
1693
  subscription_revoked: {
1653
1694
  title: 'Un abonnement a pris fin',
1654
1695
  body: 'Le forfait de {workspace} n’est plus actif.',
1696
+ bodyYours: 'Votre forfait n’est plus actif.',
1655
1697
  },
1656
1698
  subscription_past_due: {
1657
1699
  title: 'Un paiement a échoué',
1658
1700
  body: 'Mettez à jour le moyen de paiement de {workspace} pour conserver son forfait.',
1701
+ bodyYours: 'Mettez à jour votre moyen de paiement pour conserver votre forfait.',
1659
1702
  },
1660
1703
  order_paid: {
1661
1704
  title: 'Paiement reçu',
@@ -1668,22 +1711,27 @@ export const LABEL_TRANSLATIONS: Record<string, LabelTree> = {
1668
1711
  credits_low: {
1669
1712
  title: 'Vos crédits s’épuisent',
1670
1713
  body: 'Crédits restants dans {workspace} : {balance}.',
1714
+ bodyYours: 'Crédits restants : {balance}.',
1671
1715
  },
1672
1716
  credits_exhausted: {
1673
1717
  title: 'Crédits épuisés',
1674
1718
  body: 'Rechargez {workspace} pour continuer.',
1719
+ bodyYours: 'Rechargez pour continuer.',
1675
1720
  },
1676
1721
  save_offer_accepted: {
1677
1722
  title: 'Le forfait de {workspace} est conservé',
1678
1723
  body: '{actor} a accepté une offre au lieu d’annuler.',
1724
+ titleYours: 'Votre forfait est conservé',
1679
1725
  },
1680
1726
  contract_withdrawn: {
1681
1727
  title: 'Rétractation d’un achat',
1682
1728
  body: '{actor} s’est rétracté du forfait de {workspace}.',
1729
+ bodyYours: '{actor} s’est rétracté de votre forfait.',
1683
1730
  },
1684
1731
  trial_pass_started: {
1685
1732
  title: 'Votre essai a commencé',
1686
1733
  body: '{workspace} bénéficie du forfait complet pendant l’essai, sans carte bancaire.',
1734
+ bodyYours: 'Vous bénéficiez du forfait complet pendant l’essai, sans carte bancaire.',
1687
1735
  },
1688
1736
  },
1689
1737
  gift: {
@@ -1694,18 +1742,22 @@ export const LABEL_TRANSLATIONS: Record<string, LabelTree> = {
1694
1742
  claimed: {
1695
1743
  title: 'Un cadeau a été récupéré',
1696
1744
  body: 'Il a été ajouté à {workspace}.',
1745
+ bodyYours: 'Il a été ajouté à votre compte.',
1697
1746
  },
1698
1747
  pass_started: {
1699
1748
  title: 'Un pass de forfait a commencé',
1700
1749
  body: '{workspace} bénéficie du forfait offert, sans carte bancaire ni renouvellement.',
1750
+ bodyYours: 'Vous bénéficiez du forfait offert, sans carte bancaire ni renouvellement.',
1701
1751
  },
1702
1752
  pass_ending: {
1703
1753
  title: 'Un pass de forfait se termine dans une semaine',
1704
1754
  body: 'Choisissez le forfait de {workspace} pour le conserver.',
1755
+ bodyYours: 'Choisissez le forfait pour le conserver.',
1705
1756
  },
1706
1757
  pass_ended: {
1707
1758
  title: 'Un pass de forfait est terminé',
1708
1759
  body: 'Le forfait offert de {workspace} est terminé.',
1760
+ bodyYours: 'Votre forfait offert est terminé.',
1709
1761
  },
1710
1762
  refunded: {
1711
1763
  title: 'Un cadeau a été remboursé',
package/src/convex/log.ts CHANGED
@@ -80,6 +80,7 @@ export const LOG_CODES = {
80
80
  'billing.product_resync_failed': 'A benefit changed at the provider but the products table could not be re-synced; pricing shows the old figures until the next product event. The delivery itself was handled.',
81
81
  'billing.free_plan_unqueued': 'A new workspace (or account, with billTo: \'user\') could not be queued for the free plan; it was created all the same.',
82
82
  'billing.free_plan_customer_taken': 'An account (billTo: \'user\') was not put on the free plan: its email belongs to another account\'s customer at the provider, which keeps individual customers\' emails unique.',
83
+ 'billing.customer_mapping_stale': 'A billing entity is mapped onto a customer the billing provider does not know: BILLING_ACCESS_TOKEN names another organization than the one the mapping was made in. Its billing calls are refused (`unavailable`, reason `customer_unknown`) until the deployment\'s billing data is reset.',
83
84
  'billing.customer_mapping_shared': 'A billing entity is mapped onto a customer keyed to another entity, from before 0.2; it is refused until the deployment\'s billing data is reset.',
84
85
  'protection.refused': 'A request or call behind the bot check carried no proof or challenge answer that passed, and was refused as forbidden (bot_check).',
85
86
  'protection.challenge_unavailable': 'The challenge provider could not be reached to verify an answer, so the request or call was refused.',
@@ -108,6 +109,7 @@ export const LOG_CODES = {
108
109
  'ai.provenance_unsigned': 'Generated images were stored with the IPTC source type only, no signed C2PA manifest: PROVENANCE_PRIVATE_KEY and PROVENANCE_CERTIFICATE are not set, cannot be read or do not match, or signing failed. Once per isolate.',
109
110
  'ai.provenance_skipped': 'A generated file was stored without the package\'s C2PA manifest: its format carries none (JPEG, PNG and WebP do), or it carried content credentials of its own, which were kept. Its provenance record was written. Once per isolate.',
110
111
  'ai.moderation_unreadable': 'The safety classifier answered something other than a verdict ("safe", or "unsafe" and its categories): the content was refused as unchecked (`unavailable`, reason `provider_refused`). Check that setupAi({ moderation }) names a classifier, not a chat model.',
112
+ 'ai.moderation_failed': 'The safety classifier\'s call failed: an error of its provider (named in the line when the gateway passed one on), or no answer within 30 seconds. The content was refused as unchecked (`unavailable`, reason `provider_refused`), and the caller may try again.',
111
113
  'ai.moderation_images_unchecked': 'Images were passed to a moderation check whose classifier reads text only (any but Llama Guard 4): the check was refused as unchecked (`unavailable`, reason `not_configured`). Once per isolate.',
112
114
  'reports.describe_failed': 'setupAdmin({ reports })\'s describe threw for a reported row: the Reports tab shows it as gone, and a report of it is refused.',
113
115
  'reports.copies_unmatched': 'A removed intimate image named a file whose identical copies could not be looked for: setupStorage does not keep it, or its bytes could not be read. Nothing was blocked for it.',