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
@@ -262,51 +262,93 @@ export const vPendingSpend = v.object({
262
262
  * recipient — identified by email — receives. Created at gift checkout, marked
263
263
  * `paid` by the billing webhook, and `claimed` once the entitlement is attached
264
264
  * to the recipient's billing entity (automatically when the recipient already
265
- * has an account, otherwise on their first sign-in).
265
+ * has an account, otherwise on their first sign-in). The `billingGifts` row.
266
266
  */
267
- export const vGift = v.object({
268
- id: v.string(),
267
+ const vGiftRow = v.object({
268
+ // Stored lowercased; matched case-insensitively against the claimant's email.
269
269
  recipientEmail: v.string(),
270
270
  purchaserUserId: v.string(),
271
271
  purchaserEmail: v.optional(v.string()),
272
272
  purchaserName: v.optional(v.string()),
273
+ // The credit pack the recipient receives: its provider product.
273
274
  productIds: v.array(v.string()),
275
+ // Plain text, shown only inside the app once the recipient signs in.
274
276
  message: v.optional(v.string()),
277
+ // 'pending' (checkout created) → 'paid' (the purchase order is paid and
278
+ // its claim discount minted) → 'claimed' (the recipient's $0 order is
279
+ // paid), or 'refunded' (the purchase was refunded before the claim).
275
280
  status: v.string(),
281
+ // Before 0.2: the provider customer keyed by the recipient's email,
282
+ // which the purchase was billed to. Gifts are billed to the purchaser now.
276
283
  billingCustomerId: v.optional(v.string()),
284
+ // The purchase order, paid by the purchaser's own billing entity.
277
285
  billingOrderId: v.optional(v.string()),
278
286
  purchaserEntityId: v.optional(v.string()),
287
+ // The pack's catalog key, and the private gift product the purchaser bought.
279
288
  pack: v.optional(v.string()),
280
289
  giftProductId: v.optional(v.string()),
290
+ // What the purchase order charged, in the currency's smallest unit.
281
291
  amount: v.optional(v.number()),
282
292
  currency: v.optional(v.string()),
293
+ // The single-use 100% discount the recipient claims the pack with.
283
294
  discountId: v.optional(v.string()),
295
+ // The claim checkout in flight: who opened it, for which entity. A plan
296
+ // pass's claim holds the gift until `claimingUntil`, while it switches the
297
+ // workspace at the provider.
284
298
  claimingEntityId: v.optional(v.string()),
285
299
  claimingUserId: v.optional(v.string()),
300
+ claimingUntil: v.optional(v.number()),
301
+ // The purchaser's cancellation in flight, until then: no claim starts meanwhile.
302
+ cancelingUntil: v.optional(v.number()),
286
303
  claimOrderId: v.optional(v.string()),
287
304
  claimedByUserId: v.optional(v.string()),
305
+ // The entity the credits landed on: workspace id or user id.
288
306
  claimedEntityId: v.optional(v.string()),
289
307
  createdAt: v.number(),
290
308
  paidAt: v.optional(v.number()),
291
309
  notifiedAt: v.optional(v.number()),
292
310
  claimedAt: v.optional(v.number()),
293
311
  refundedAt: v.optional(v.number()),
312
+ // A plan pass (the gift is a plan for `months` months, not a pack): the
313
+ // plan's catalog key and the length the purchaser paid for.
294
314
  plan: v.optional(v.string()),
295
315
  months: v.optional(v.number()),
316
+ // When the notice goes out: set when the purchase is paid (the moment
317
+ // it is paid, or the date the purchaser chose). The gift is the
318
+ // recipient's to see and claim once `deliveredAt` is stamped; a row
319
+ // with neither is a gift paid before delivery dates, delivered when paid.
296
320
  deliverAt: v.optional(v.number()),
297
321
  deliveredAt: v.optional(v.number()),
322
+ // The last notice sent (the first, a reminder or a resend), and how many.
298
323
  noticedAt: v.optional(v.number()),
299
324
  noticeCount: v.optional(v.number()),
325
+ // How many times the purchaser changed the address: each address's notices carry their own idempotency keys.
300
326
  recipientChanges: v.optional(v.number()),
327
+ // The one reminder, a week after delivery.
301
328
  remindedAt: v.optional(v.number()),
329
+ // A pass once claimed: the free subscription it switched, when it began
330
+ // and ends (the package keeps the end date), the scheduled return to the
331
+ // free plan, the ending notice and the end itself.
302
332
  passSubscriptionId: v.optional(v.string()),
303
333
  passStartedAt: v.optional(v.number()),
304
334
  passEndsAt: v.optional(v.number()),
335
+ // From when the return may be booked: once the pass's last billing cycle began.
336
+ passReturnFrom: v.optional(v.number()),
305
337
  passReturnScheduledAt: v.optional(v.number()),
306
338
  passNoticedAt: v.optional(v.number()),
307
339
  passEndedAt: v.optional(v.number()),
340
+ // A reverse trial (LIFECYCLE): the pass a new workspace started on,
341
+ // with no purchaser (`status` 'trial'). `recipientEmail` holds its
342
+ // owner's address with plus tags and dots taken out, so an address
343
+ // starts one.
308
344
  reverseTrial: v.optional(v.boolean()),
345
+ // A referral reward (REF): the pass a referrer on the free plan got for
346
+ // free months, with no purchaser (`status` 'reward'). `rewardId` is the
347
+ // referral it came from; `recipientEmail` is empty.
348
+ rewardId: v.optional(v.string()),
309
349
  });
350
+ /** A gift as the component's reads return it: its id, without the claim and cancel holds or the reward it came from. */
351
+ export const vGift = vGiftRow.omit('claimingUntil', 'cancelingUntil', 'passReturnFrom', 'rewardId').extend({ id: v.string() });
310
352
  /** A save offer's terms, as the cancel flow made it (LIFECYCLE). */
311
353
  export const vSaveOfferTerms = v.object({
312
354
  kind: v.union(v.literal('pause'), v.literal('downgrade'), v.literal('discount')),
@@ -316,6 +358,21 @@ export const vSaveOfferTerms = v.object({
316
358
  productId: v.optional(v.string()),
317
359
  discount: v.optional(v.string()),
318
360
  });
361
+ /** A renewing checkout's consent proof, as the `billingRenewalConsents` table stores it. */
362
+ export const vRenewalConsent = v.object({
363
+ checkoutId: v.string(),
364
+ entityId: v.string(),
365
+ userId: v.optional(v.string()),
366
+ productId: v.string(),
367
+ amount: v.number(),
368
+ currency: v.string(),
369
+ interval: v.string(),
370
+ intervalCount: v.number(),
371
+ termsVersion: v.optional(v.string()),
372
+ createdAt: v.number(),
373
+ subscriptionId: v.optional(v.string()),
374
+ consentedAt: v.optional(v.number()),
375
+ });
319
376
  export const billingTables = {
320
377
  billingEntitlements: defineTable({
321
378
  // The billing entity id — the workspace id (billTo: 'workspace', the
@@ -404,89 +461,7 @@ export const billingTables = {
404
461
  })
405
462
  .index('entityId', ['entityId'])
406
463
  .index('at', ['at']),
407
- billingGifts: defineTable({
408
- // Stored lowercased; matched case-insensitively against the claimant's email.
409
- recipientEmail: v.string(),
410
- purchaserUserId: v.string(),
411
- purchaserEmail: v.optional(v.string()),
412
- purchaserName: v.optional(v.string()),
413
- // The credit pack the recipient receives: its provider product.
414
- productIds: v.array(v.string()),
415
- // Plain text, shown only inside the app once the recipient signs in.
416
- message: v.optional(v.string()),
417
- // 'pending' (checkout created) → 'paid' (the purchase order is paid and
418
- // its claim discount minted) → 'claimed' (the recipient's $0 order is
419
- // paid), or 'refunded' (the purchase was refunded before the claim).
420
- status: v.string(),
421
- // Before 0.2: the provider customer keyed by the recipient's email,
422
- // which the purchase was billed to. Gifts are billed to the purchaser now.
423
- billingCustomerId: v.optional(v.string()),
424
- // The purchase order, paid by the purchaser's own billing entity.
425
- billingOrderId: v.optional(v.string()),
426
- purchaserEntityId: v.optional(v.string()),
427
- // The pack's catalog key, and the private gift product the purchaser bought.
428
- pack: v.optional(v.string()),
429
- giftProductId: v.optional(v.string()),
430
- // What the purchase order charged, in the currency's smallest unit.
431
- amount: v.optional(v.number()),
432
- currency: v.optional(v.string()),
433
- // The single-use 100% discount the recipient claims the pack with.
434
- discountId: v.optional(v.string()),
435
- // The claim checkout in flight: who opened it, for which entity. A plan
436
- // pass's claim holds the gift until `claimingUntil`, while it switches the
437
- // workspace at the provider.
438
- claimingEntityId: v.optional(v.string()),
439
- claimingUserId: v.optional(v.string()),
440
- claimingUntil: v.optional(v.number()),
441
- // The purchaser's cancellation in flight, until then: no claim starts meanwhile.
442
- cancelingUntil: v.optional(v.number()),
443
- claimOrderId: v.optional(v.string()),
444
- claimedByUserId: v.optional(v.string()),
445
- // The entity the credits landed on: workspace id or user id.
446
- claimedEntityId: v.optional(v.string()),
447
- createdAt: v.number(),
448
- paidAt: v.optional(v.number()),
449
- notifiedAt: v.optional(v.number()),
450
- claimedAt: v.optional(v.number()),
451
- refundedAt: v.optional(v.number()),
452
- // A plan pass (the gift is a plan for `months` months, not a pack): the
453
- // plan's catalog key and the length the purchaser paid for.
454
- plan: v.optional(v.string()),
455
- months: v.optional(v.number()),
456
- // When the notice goes out: set when the purchase is paid (the moment
457
- // it is paid, or the date the purchaser chose). The gift is the
458
- // recipient's to see and claim once `deliveredAt` is stamped; a row
459
- // with neither is a gift paid before delivery dates, delivered when paid.
460
- deliverAt: v.optional(v.number()),
461
- deliveredAt: v.optional(v.number()),
462
- // The last notice sent (the first, a reminder or a resend), and how many.
463
- noticedAt: v.optional(v.number()),
464
- noticeCount: v.optional(v.number()),
465
- // How many times the purchaser changed the address: each address's notices carry their own idempotency keys.
466
- recipientChanges: v.optional(v.number()),
467
- // The one reminder, a week after delivery.
468
- remindedAt: v.optional(v.number()),
469
- // A pass once claimed: the free subscription it switched, when it began
470
- // and ends (the package keeps the end date), the scheduled return to the
471
- // free plan, the ending notice and the end itself.
472
- passSubscriptionId: v.optional(v.string()),
473
- passStartedAt: v.optional(v.number()),
474
- passEndsAt: v.optional(v.number()),
475
- // From when the return may be booked: once the pass's last billing cycle began.
476
- passReturnFrom: v.optional(v.number()),
477
- passReturnScheduledAt: v.optional(v.number()),
478
- passNoticedAt: v.optional(v.number()),
479
- passEndedAt: v.optional(v.number()),
480
- // A reverse trial (LIFECYCLE): the pass a new workspace started on,
481
- // with no purchaser (`status` 'trial'). `recipientEmail` holds its
482
- // owner's address with plus tags and dots taken out, so an address
483
- // starts one.
484
- reverseTrial: v.optional(v.boolean()),
485
- // A referral reward (REF): the pass a referrer on the free plan got for
486
- // free months, with no purchaser (`status` 'reward'). `rewardId` is the
487
- // referral it came from; `recipientEmail` is empty.
488
- rewardId: v.optional(v.string()),
489
- })
464
+ billingGifts: defineTable(vGiftRow)
490
465
  .index('recipientEmail', ['recipientEmail'])
491
466
  .index('recipientEmail_status', ['recipientEmail', 'status'])
492
467
  .index('recipientEmail_createdAt', ['recipientEmail', 'createdAt'])
@@ -533,20 +508,7 @@ export const billingTables = {
533
508
  // (what it showed: the plan, the price and its interval, the terms
534
509
  // version, who), confirmed when the subscription it started arrives, and
535
510
  // deleted three years after. An unconfirmed row goes after two days.
536
- billingRenewalConsents: defineTable({
537
- checkoutId: v.string(),
538
- entityId: v.string(),
539
- userId: v.optional(v.string()),
540
- productId: v.string(),
541
- amount: v.number(),
542
- currency: v.string(),
543
- interval: v.string(),
544
- intervalCount: v.number(),
545
- termsVersion: v.optional(v.string()),
546
- createdAt: v.number(),
547
- subscriptionId: v.optional(v.string()),
548
- consentedAt: v.optional(v.number()),
549
- })
511
+ billingRenewalConsents: defineTable(vRenewalConsent)
550
512
  .index('checkoutId', ['checkoutId'])
551
513
  .index('entityId', ['entityId'])
552
514
  .index('userId', ['userId'])
@@ -576,6 +538,42 @@ export const billingTables = {
576
538
  .index('userId', ['userId'])
577
539
  .index('at', ['at']),
578
540
  };
541
+ /** A metered stream's request, as the `aiRequests` table stores it. */
542
+ export const vAiRequest = v.object({
543
+ streamId: v.string(),
544
+ /** Which `ai.stream({ name })` definition drives this request. */
545
+ name: v.string(),
546
+ /** The billing entity (workspace/user) the credits reserve against. */
547
+ entityId: v.string(),
548
+ /** The signed-in caller (for member attribution inside workspaces). */
549
+ userId: v.string(),
550
+ /** JSON-encoded handler args. */
551
+ args: v.string(),
552
+ meterId: v.optional(v.string()),
553
+ cost: v.number(),
554
+ externalId: v.string(),
555
+ status: v.union(v.literal('reserved'), v.literal('streaming'), v.literal('settled'), v.literal('released')),
556
+ createdAt: v.number(),
557
+ });
558
+ /** A knowledge document, as the `aiDocuments` table stores it. */
559
+ export const vAiDocument = v.object({
560
+ /** The knowledge store: its embedding model and dimension. */
561
+ store: v.string(),
562
+ /** The namespace: the billing entity whose members find it, or `app`. */
563
+ owner: v.string(),
564
+ /** The member who added it; empty for the app's own. */
565
+ addedBy: v.string(),
566
+ title: v.string(),
567
+ key: v.optional(v.string()),
568
+ status: v.union(v.literal('pending'), v.literal('ready'), v.literal('failed')),
569
+ entryId: v.optional(v.string()),
570
+ characters: v.number(),
571
+ createdAt: v.number(),
572
+ remove: v.string(),
573
+ read: v.string(),
574
+ namespaces: v.optional(v.string()),
575
+ removeNamespace: v.optional(v.string()),
576
+ });
579
577
  /**
580
578
  * Metered-stream request plumbing for `setupAi().stream` — the HTTP stream
581
579
  * endpoint can't carry Convex args, so `start` records the request (args,
@@ -587,22 +585,7 @@ export const billingTables = {
587
585
  * prune.
588
586
  */
589
587
  export const aiTables = {
590
- aiRequests: defineTable({
591
- streamId: v.string(),
592
- /** Which `ai.stream({ name })` definition drives this request. */
593
- name: v.string(),
594
- /** The billing entity (workspace/user) the credits reserve against. */
595
- entityId: v.string(),
596
- /** The signed-in caller (for member attribution inside workspaces). */
597
- userId: v.string(),
598
- /** JSON-encoded handler args. */
599
- args: v.string(),
600
- meterId: v.optional(v.string()),
601
- cost: v.number(),
602
- externalId: v.string(),
603
- status: v.union(v.literal('reserved'), v.literal('streaming'), v.literal('settled'), v.literal('released')),
604
- createdAt: v.number(),
605
- })
588
+ aiRequests: defineTable(vAiRequest)
606
589
  .index('streamId', ['streamId'])
607
590
  // Maintenance: finished requests past their window.
608
591
  .index('status_createdAt', ['status', 'createdAt'])
@@ -641,24 +624,7 @@ export const aiTables = {
641
624
  * `namespaces` and `removeNamespace` find its owner's namespace there
642
625
  * and delete it, passages and all, when the owner goes.
643
626
  */
644
- aiDocuments: defineTable({
645
- /** The knowledge store: its embedding model and dimension. */
646
- store: v.string(),
647
- /** The namespace: the billing entity whose members find it, or `app`. */
648
- owner: v.string(),
649
- /** The member who added it; empty for the app's own. */
650
- addedBy: v.string(),
651
- title: v.string(),
652
- key: v.optional(v.string()),
653
- status: v.union(v.literal('pending'), v.literal('ready'), v.literal('failed')),
654
- entryId: v.optional(v.string()),
655
- characters: v.number(),
656
- createdAt: v.number(),
657
- remove: v.string(),
658
- read: v.string(),
659
- namespaces: v.optional(v.string()),
660
- removeNamespace: v.optional(v.string()),
661
- })
627
+ aiDocuments: defineTable(vAiDocument)
662
628
  .index('store_owner_createdAt', ['store', 'owner', 'createdAt'])
663
629
  .index('store_owner_key', ['store', 'owner', 'key'])
664
630
  .index('owner', ['owner'])
@@ -728,6 +694,8 @@ export const aiTables = {
728
694
  })
729
695
  .index('by_day_and_shard', ['day', 'shard']),
730
696
  };
697
+ /** How a webhook delivery ended, as the delivery log records it. */
698
+ export const vDeliveryOutcome = v.union(v.literal('ok'), v.literal('invalid_signature'), v.literal('unknown_type'), v.literal('handler_error'), v.literal('duplicate'), v.literal('oversized'), v.literal('missing_secret'));
731
699
  /**
732
700
  * The webhook delivery log (see `webhooks.ts`) — powers redelivery dedupe and
733
701
  * the DevTools Webhooks page, never a source of truth. A delivery whose
@@ -743,7 +711,7 @@ export const webhookTables = {
743
711
  type: v.optional(v.string()),
744
712
  // The tallied outcomes stay in the union for rows written before they
745
713
  // were tallied; the trim ages them out with the rest.
746
- outcome: v.union(v.literal('ok'), v.literal('invalid_signature'), v.literal('unknown_type'), v.literal('handler_error'), v.literal('duplicate'), v.literal('oversized'), v.literal('missing_secret')),
714
+ outcome: vDeliveryOutcome,
747
715
  note: v.optional(v.string()),
748
716
  receivedAt: v.number(),
749
717
  /** When an administrator last asked the provider to send this delivery again (`replayWebhookDelivery`). */
@@ -1166,6 +1134,10 @@ export const storageTables = {
1166
1134
  .index('tokenHash', ['tokenHash'])
1167
1135
  .index('sharedBy', ['sharedBy']),
1168
1136
  };
1137
+ /** What a report decision did to the content. */
1138
+ export const vDecisionAction = v.union(v.literal('hidden'), v.literal('dismissed'));
1139
+ /** What a report decision rests on: the law, or the app's terms. */
1140
+ export const vDecisionGround = v.union(v.literal('illegal'), v.literal('terms'));
1169
1141
  /** Why someone reported content: the one-click reasons, and the notice form's legal ones. */
1170
1142
  export const vReportReason = v.union(v.literal('abuse'), v.literal('sexual'), v.literal('violence'), v.literal('spam'), v.literal('intimate'), v.literal('child_abuse'), v.literal('illegal'), v.literal('other'));
1171
1143
  /**
@@ -1243,11 +1215,11 @@ export const reportTables = {
1243
1215
  subject: v.optional(v.id('reportSubjects')),
1244
1216
  /** The notice decided, for one the app could not place. */
1245
1217
  notice: v.optional(v.id('reports')),
1246
- action: v.union(v.literal('hidden'), v.literal('dismissed')),
1218
+ action: vDecisionAction,
1247
1219
  /** The facts and the term or law it rests on, as the administrator wrote them. */
1248
1220
  reason: v.string(),
1249
1221
  /** Whether the content broke the law or the app's terms. */
1250
- ground: v.union(v.literal('illegal'), v.literal('terms')),
1222
+ ground: vDecisionGround,
1251
1223
  /** The administrator who decided. */
1252
1224
  by: v.string(),
1253
1225
  at: v.number(),
@@ -1445,6 +1417,23 @@ export const monitoringTables = {
1445
1417
  .index('by_alert_and_period', ['alert', 'period'])
1446
1418
  .index('by_at', ['at']),
1447
1419
  };
1420
+ /** A consent decision, as the `consents` table stores it. */
1421
+ export const vConsent = v.object({
1422
+ userId: v.optional(v.string()),
1423
+ /** SHA-256 of the lower-cased address, for a decision given before the account existed. */
1424
+ emailHash: v.optional(v.string()),
1425
+ kind: v.string(),
1426
+ version: v.string(),
1427
+ /** `true` a grant, `false` a withdrawal. */
1428
+ granted: v.boolean(),
1429
+ at: v.number(),
1430
+ /** Where it came from: `sign-up`, `prompt`, `settings`, `waitlist` or `topic`. */
1431
+ source: v.string(),
1432
+ /** The words the person agreed to, when the form showed its own (the launch-news box). */
1433
+ text: v.optional(v.string()),
1434
+ /** What the decision came with: `checkout:<id>` for a topic's soft opt-in at checkout. */
1435
+ reference: v.optional(v.string()),
1436
+ });
1448
1437
  /**
1449
1438
  * The consent ledger (see `consents.ts`): one row per decision, a grant or a
1450
1439
  * withdrawal, of one kind at one version, never overwritten, so the history
@@ -1453,22 +1442,7 @@ export const monitoringTables = {
1453
1442
  * signs up.
1454
1443
  */
1455
1444
  export const consentTables = {
1456
- consents: defineTable({
1457
- userId: v.optional(v.string()),
1458
- /** SHA-256 of the lower-cased address, for a decision given before the account existed. */
1459
- emailHash: v.optional(v.string()),
1460
- kind: v.string(),
1461
- version: v.string(),
1462
- /** `true` a grant, `false` a withdrawal. */
1463
- granted: v.boolean(),
1464
- at: v.number(),
1465
- /** Where it came from: `sign-up`, `prompt`, `settings`, `waitlist` or `topic`. */
1466
- source: v.string(),
1467
- /** The words the person agreed to, when the form showed its own (the launch-news box). */
1468
- text: v.optional(v.string()),
1469
- /** What the decision came with: `checkout:<id>` for a topic's soft opt-in at checkout. */
1470
- reference: v.optional(v.string()),
1471
- })
1445
+ consents: defineTable(vConsent)
1472
1446
  .index('userId_kind_at', ['userId', 'kind', 'at'])
1473
1447
  .index('userId_at', ['userId', 'at'])
1474
1448
  .index('emailHash_at', ['emailHash', 'at']),