nuxt-backend 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (414) hide show
  1. package/README.md +5 -2
  2. package/dist/capabilities/registry.js +1 -1
  3. package/dist/chunks/catalog.mjs +1 -1
  4. package/dist/chunks/{index.mjs → devtools.mjs} +2 -2
  5. package/dist/chunks/doctor.mjs +14 -6
  6. package/dist/chunks/email-previews.mjs +1 -1
  7. package/dist/chunks/health.mjs +2 -2
  8. package/dist/chunks/install.mjs +4 -4
  9. package/dist/chunks/run.mjs +1 -1
  10. package/dist/chunks/server.mjs +15 -4
  11. package/dist/cli.mjs +24 -4
  12. package/dist/convex/access-tickets.d.ts +17 -2
  13. package/dist/convex/access-tickets.d.ts.map +1 -1
  14. package/dist/convex/account-data.d.ts +4 -4
  15. package/dist/convex/account-data.d.ts.map +1 -1
  16. package/dist/convex/account-data.js +5 -4
  17. package/dist/convex/account-data.js.map +1 -1
  18. package/dist/convex/app.d.ts +1 -0
  19. package/dist/convex/app.d.ts.map +1 -1
  20. package/dist/convex/app.js +2 -1
  21. package/dist/convex/app.js.map +1 -1
  22. package/dist/convex/client/better-auth-options.d.ts.map +1 -1
  23. package/dist/convex/client/better-auth-options.js +12 -3
  24. package/dist/convex/client/better-auth-options.js.map +1 -1
  25. package/dist/convex/client/component.d.ts +4 -0
  26. package/dist/convex/client/component.d.ts.map +1 -1
  27. package/dist/convex/client/index.d.ts +5 -0
  28. package/dist/convex/client/index.d.ts.map +1 -1
  29. package/dist/convex/client/launch-gate.d.ts.map +1 -1
  30. package/dist/convex/client/launch-gate.js +30 -1
  31. package/dist/convex/client/launch-gate.js.map +1 -1
  32. package/dist/convex/client/plugins.d.ts.map +1 -1
  33. package/dist/convex/client/plugins.js +3 -0
  34. package/dist/convex/client/plugins.js.map +1 -1
  35. package/dist/convex/client/two-factor.d.ts +7 -0
  36. package/dist/convex/client/two-factor.d.ts.map +1 -0
  37. package/dist/convex/client/two-factor.js +57 -0
  38. package/dist/convex/client/two-factor.js.map +1 -0
  39. package/dist/convex/components/backend/_generated/api.d.ts +2 -0
  40. package/dist/convex/components/backend/_generated/api.d.ts.map +1 -1
  41. package/dist/convex/components/backend/_generated/api.js.map +1 -1
  42. package/dist/convex/components/backend/_generated/component.d.ts +292 -10
  43. package/dist/convex/components/backend/_generated/component.d.ts.map +1 -1
  44. package/dist/convex/components/backend/account.d.ts +63 -17
  45. package/dist/convex/components/backend/account.d.ts.map +1 -1
  46. package/dist/convex/components/backend/account.js +24 -1
  47. package/dist/convex/components/backend/account.js.map +1 -1
  48. package/dist/convex/components/backend/adapter.d.ts.map +1 -1
  49. package/dist/convex/components/backend/adapter.js +7 -2
  50. package/dist/convex/components/backend/adapter.js.map +1 -1
  51. package/dist/convex/components/backend/ai.d.ts +1 -1
  52. package/dist/convex/components/backend/billing.d.ts +10 -0
  53. package/dist/convex/components/backend/billing.d.ts.map +1 -1
  54. package/dist/convex/components/backend/billing.js +2 -1
  55. package/dist/convex/components/backend/billing.js.map +1 -1
  56. package/dist/convex/components/backend/commerce.d.ts +229 -0
  57. package/dist/convex/components/backend/commerce.d.ts.map +1 -0
  58. package/dist/convex/components/backend/commerce.js +392 -0
  59. package/dist/convex/components/backend/commerce.js.map +1 -0
  60. package/dist/convex/components/backend/funnel.d.ts +6 -6
  61. package/dist/convex/components/backend/jobs.d.ts +1 -1
  62. package/dist/convex/components/backend/referrals.d.ts +2 -2
  63. package/dist/convex/components/backend/schema.d.ts +327 -21
  64. package/dist/convex/components/backend/schema.d.ts.map +1 -1
  65. package/dist/convex/components/backend/schema.js +108 -1
  66. package/dist/convex/components/backend/schema.js.map +1 -1
  67. package/dist/convex/components/backend/waitlist.d.ts +42 -6
  68. package/dist/convex/components/backend/waitlist.d.ts.map +1 -1
  69. package/dist/convex/components/backend/waitlist.js +142 -39
  70. package/dist/convex/components/backend/waitlist.js.map +1 -1
  71. package/dist/convex/email-templates.d.ts +12 -0
  72. package/dist/convex/email-templates.d.ts.map +1 -1
  73. package/dist/convex/email-templates.js +3 -0
  74. package/dist/convex/email-templates.js.map +1 -1
  75. package/dist/convex/emails/waitlist-friend-joined.d.ts +9 -0
  76. package/dist/convex/emails/waitlist-friend-joined.d.ts.map +1 -0
  77. package/dist/convex/emails/waitlist-friend-joined.js +22 -0
  78. package/dist/convex/emails/waitlist-friend-joined.js.map +1 -0
  79. package/dist/convex/errors.d.ts +6 -6
  80. package/dist/convex/errors.d.ts.map +1 -1
  81. package/dist/convex/errors.js +14 -2
  82. package/dist/convex/errors.js.map +1 -1
  83. package/dist/convex/events.d.ts +19 -0
  84. package/dist/convex/events.d.ts.map +1 -1
  85. package/dist/convex/events.js +14 -0
  86. package/dist/convex/events.js.map +1 -1
  87. package/dist/convex/integrations/billing/checkout.d.ts +2 -2
  88. package/dist/convex/integrations/billing/checkout.d.ts.map +1 -1
  89. package/dist/convex/integrations/billing/checkout.js +79 -11
  90. package/dist/convex/integrations/billing/checkout.js.map +1 -1
  91. package/dist/convex/integrations/billing/commerce-entitlements.d.ts +12 -0
  92. package/dist/convex/integrations/billing/commerce-entitlements.d.ts.map +1 -0
  93. package/dist/convex/integrations/billing/commerce-entitlements.js +78 -0
  94. package/dist/convex/integrations/billing/commerce-entitlements.js.map +1 -0
  95. package/dist/convex/integrations/billing/commerce-events.d.ts +15 -0
  96. package/dist/convex/integrations/billing/commerce-events.d.ts.map +1 -0
  97. package/dist/convex/integrations/billing/commerce-events.js +433 -0
  98. package/dist/convex/integrations/billing/commerce-events.js.map +1 -0
  99. package/dist/convex/integrations/billing/commerce-history.d.ts +20 -0
  100. package/dist/convex/integrations/billing/commerce-history.d.ts.map +1 -0
  101. package/dist/convex/integrations/billing/commerce-history.js +106 -0
  102. package/dist/convex/integrations/billing/commerce-history.js.map +1 -0
  103. package/dist/convex/integrations/billing/commerce-webhooks.d.ts +23 -0
  104. package/dist/convex/integrations/billing/commerce-webhooks.d.ts.map +1 -0
  105. package/dist/convex/integrations/billing/commerce-webhooks.js +49 -0
  106. package/dist/convex/integrations/billing/commerce-webhooks.js.map +1 -0
  107. package/dist/convex/integrations/billing/commerce.d.ts +100 -0
  108. package/dist/convex/integrations/billing/commerce.d.ts.map +1 -0
  109. package/dist/convex/integrations/billing/commerce.js +323 -0
  110. package/dist/convex/integrations/billing/commerce.js.map +1 -0
  111. package/dist/convex/integrations/billing/context.d.ts +8 -0
  112. package/dist/convex/integrations/billing/context.d.ts.map +1 -1
  113. package/dist/convex/integrations/billing/context.js +14 -2
  114. package/dist/convex/integrations/billing/context.js.map +1 -1
  115. package/dist/convex/integrations/billing/credits.d.ts +1 -1
  116. package/dist/convex/integrations/billing/credits.d.ts.map +1 -1
  117. package/dist/convex/integrations/billing/credits.js +49 -28
  118. package/dist/convex/integrations/billing/credits.js.map +1 -1
  119. package/dist/convex/integrations/billing/customers.d.ts +1 -1
  120. package/dist/convex/integrations/billing/customers.d.ts.map +1 -1
  121. package/dist/convex/integrations/billing/customers.js +15 -1
  122. package/dist/convex/integrations/billing/customers.js.map +1 -1
  123. package/dist/convex/integrations/billing/entitlements.d.ts +1 -1
  124. package/dist/convex/integrations/billing/entitlements.d.ts.map +1 -1
  125. package/dist/convex/integrations/billing/entitlements.js +6 -1
  126. package/dist/convex/integrations/billing/entitlements.js.map +1 -1
  127. package/dist/convex/integrations/billing/erasure.d.ts +1 -1
  128. package/dist/convex/integrations/billing/erasure.d.ts.map +1 -1
  129. package/dist/convex/integrations/billing/erasure.js +10 -5
  130. package/dist/convex/integrations/billing/erasure.js.map +1 -1
  131. package/dist/convex/integrations/billing/free-plan.d.ts +6 -1
  132. package/dist/convex/integrations/billing/free-plan.d.ts.map +1 -1
  133. package/dist/convex/integrations/billing/free-plan.js +22 -4
  134. package/dist/convex/integrations/billing/free-plan.js.map +1 -1
  135. package/dist/convex/integrations/billing/functions.d.ts +1 -1
  136. package/dist/convex/integrations/billing/functions.d.ts.map +1 -1
  137. package/dist/convex/integrations/billing/functions.js +3 -2
  138. package/dist/convex/integrations/billing/functions.js.map +1 -1
  139. package/dist/convex/integrations/billing/gifts.d.ts.map +1 -1
  140. package/dist/convex/integrations/billing/gifts.js +3 -0
  141. package/dist/convex/integrations/billing/gifts.js.map +1 -1
  142. package/dist/convex/integrations/billing/history.d.ts +1 -1
  143. package/dist/convex/integrations/billing/history.d.ts.map +1 -1
  144. package/dist/convex/integrations/billing/history.js +6 -1
  145. package/dist/convex/integrations/billing/history.js.map +1 -1
  146. package/dist/convex/integrations/billing/lifecycle.d.ts +1 -1
  147. package/dist/convex/integrations/billing/lifecycle.d.ts.map +1 -1
  148. package/dist/convex/integrations/billing/lifecycle.js +4 -1
  149. package/dist/convex/integrations/billing/lifecycle.js.map +1 -1
  150. package/dist/convex/integrations/billing/providers/capabilities.d.ts +17 -0
  151. package/dist/convex/integrations/billing/providers/capabilities.d.ts.map +1 -0
  152. package/dist/convex/integrations/billing/providers/capabilities.js +77 -0
  153. package/dist/convex/integrations/billing/providers/capabilities.js.map +1 -0
  154. package/dist/convex/integrations/billing/providers/consent.d.ts +52 -0
  155. package/dist/convex/integrations/billing/providers/consent.d.ts.map +1 -0
  156. package/dist/convex/integrations/billing/providers/consent.js +79 -0
  157. package/dist/convex/integrations/billing/providers/consent.js.map +1 -0
  158. package/dist/convex/integrations/billing/providers/creem.d.ts +22 -0
  159. package/dist/convex/integrations/billing/providers/creem.d.ts.map +1 -0
  160. package/dist/convex/integrations/billing/providers/creem.js +208 -0
  161. package/dist/convex/integrations/billing/providers/creem.js.map +1 -0
  162. package/dist/convex/integrations/billing/providers/dodo.d.ts +15 -0
  163. package/dist/convex/integrations/billing/providers/dodo.d.ts.map +1 -0
  164. package/dist/convex/integrations/billing/providers/dodo.js +197 -0
  165. package/dist/convex/integrations/billing/providers/dodo.js.map +1 -0
  166. package/dist/convex/integrations/billing/providers/http.d.ts +41 -0
  167. package/dist/convex/integrations/billing/providers/http.d.ts.map +1 -0
  168. package/dist/convex/integrations/billing/providers/http.js +146 -0
  169. package/dist/convex/integrations/billing/providers/http.js.map +1 -0
  170. package/dist/convex/integrations/billing/providers/index.d.ts +35 -0
  171. package/dist/convex/integrations/billing/providers/index.d.ts.map +1 -0
  172. package/dist/convex/integrations/billing/providers/index.js +62 -0
  173. package/dist/convex/integrations/billing/providers/index.js.map +1 -0
  174. package/dist/convex/integrations/billing/providers/stripe.d.ts +28 -0
  175. package/dist/convex/integrations/billing/providers/stripe.d.ts.map +1 -0
  176. package/dist/convex/integrations/billing/providers/stripe.js +327 -0
  177. package/dist/convex/integrations/billing/providers/stripe.js.map +1 -0
  178. package/dist/convex/integrations/billing/providers/types.d.ts +263 -0
  179. package/dist/convex/integrations/billing/providers/types.d.ts.map +1 -0
  180. package/dist/convex/integrations/billing/providers/types.js +48 -0
  181. package/dist/convex/integrations/billing/providers/types.js.map +1 -0
  182. package/dist/convex/integrations/billing/subscriptions.d.ts +1 -1
  183. package/dist/convex/integrations/billing/subscriptions.d.ts.map +1 -1
  184. package/dist/convex/integrations/billing/subscriptions.js +20 -6
  185. package/dist/convex/integrations/billing/subscriptions.js.map +1 -1
  186. package/dist/convex/integrations/billing/types/setup.d.ts +64 -1
  187. package/dist/convex/integrations/billing/types/setup.d.ts.map +1 -1
  188. package/dist/convex/integrations/billing.d.ts +4 -1
  189. package/dist/convex/integrations/billing.d.ts.map +1 -1
  190. package/dist/convex/integrations/billing.js +12 -2
  191. package/dist/convex/integrations/billing.js.map +1 -1
  192. package/dist/convex/integrations/email.d.ts +1 -1
  193. package/dist/convex/integrations/email.d.ts.map +1 -1
  194. package/dist/convex/integrations/email.js.map +1 -1
  195. package/dist/convex/integrations/launch.d.ts +27 -2
  196. package/dist/convex/integrations/launch.d.ts.map +1 -1
  197. package/dist/convex/integrations/launch.js +15 -3
  198. package/dist/convex/integrations/launch.js.map +1 -1
  199. package/dist/convex/integrations/presence.d.ts +110 -0
  200. package/dist/convex/integrations/presence.d.ts.map +1 -0
  201. package/dist/convex/integrations/presence.js +92 -0
  202. package/dist/convex/integrations/presence.js.map +1 -0
  203. package/dist/convex/integrations/waitlist.d.ts +41 -7
  204. package/dist/convex/integrations/waitlist.d.ts.map +1 -1
  205. package/dist/convex/integrations/waitlist.js +45 -6
  206. package/dist/convex/integrations/waitlist.js.map +1 -1
  207. package/dist/convex/integrations/webhook-guard.d.ts +8 -0
  208. package/dist/convex/integrations/webhook-guard.d.ts.map +1 -1
  209. package/dist/convex/integrations/webhook-guard.js +11 -4
  210. package/dist/convex/integrations/webhook-guard.js.map +1 -1
  211. package/dist/convex/label-groups/admin.d.ts +9 -0
  212. package/dist/convex/label-groups/admin.d.ts.map +1 -1
  213. package/dist/convex/label-groups/admin.js +9 -0
  214. package/dist/convex/label-groups/admin.js.map +1 -1
  215. package/dist/convex/label-groups/audit.d.ts +2 -0
  216. package/dist/convex/label-groups/audit.d.ts.map +1 -1
  217. package/dist/convex/label-groups/audit.js +2 -0
  218. package/dist/convex/label-groups/audit.js.map +1 -1
  219. package/dist/convex/label-groups/auth.d.ts +9 -0
  220. package/dist/convex/label-groups/auth.d.ts.map +1 -1
  221. package/dist/convex/label-groups/auth.js +10 -0
  222. package/dist/convex/label-groups/auth.js.map +1 -1
  223. package/dist/convex/label-groups/email.d.ts +6 -0
  224. package/dist/convex/label-groups/email.d.ts.map +1 -1
  225. package/dist/convex/label-groups/email.js +7 -0
  226. package/dist/convex/label-groups/email.js.map +1 -1
  227. package/dist/convex/label-groups/errors.d.ts +4 -0
  228. package/dist/convex/label-groups/errors.d.ts.map +1 -1
  229. package/dist/convex/label-groups/errors.js +4 -0
  230. package/dist/convex/label-groups/errors.js.map +1 -1
  231. package/dist/convex/label-groups/security.d.ts +19 -0
  232. package/dist/convex/label-groups/security.d.ts.map +1 -1
  233. package/dist/convex/label-groups/security.js +20 -0
  234. package/dist/convex/label-groups/security.js.map +1 -1
  235. package/dist/convex/label-groups/waitlist.d.ts +8 -0
  236. package/dist/convex/label-groups/waitlist.d.ts.map +1 -1
  237. package/dist/convex/label-groups/waitlist.js +9 -0
  238. package/dist/convex/label-groups/waitlist.js.map +1 -1
  239. package/dist/convex/label-translations.d.ts.map +1 -1
  240. package/dist/convex/label-translations.js +24 -0
  241. package/dist/convex/label-translations.js.map +1 -1
  242. package/dist/convex/labels.d.ts +57 -0
  243. package/dist/convex/labels.d.ts.map +1 -1
  244. package/dist/convex/log.js +2 -0
  245. package/dist/convex/log.js.map +1 -1
  246. package/dist/convex/sensitive-actions.d.ts.map +1 -1
  247. package/dist/convex/sensitive-actions.js +11 -0
  248. package/dist/convex/sensitive-actions.js.map +1 -1
  249. package/dist/convex/waitlist-rules.d.ts +63 -9
  250. package/dist/convex/waitlist-rules.d.ts.map +1 -1
  251. package/dist/convex/waitlist-rules.js +38 -7
  252. package/dist/convex/waitlist-rules.js.map +1 -1
  253. package/dist/devtools-client/_nuxt/DHNi4uhO.js +6 -0
  254. package/dist/devtools-client/index.html +1 -1
  255. package/dist/env-registry.js +9 -0
  256. package/dist/module.d.ts +14 -2
  257. package/dist/module.js +2 -2
  258. package/dist/module.json +2 -2
  259. package/dist/runtime/locales/de.json +58 -1
  260. package/dist/runtime/locales/en.json +60 -3
  261. package/dist/runtime/locales/es.json +58 -1
  262. package/dist/runtime/locales/fr.json +58 -1
  263. package/dist/runtime/locales/ru.json +58 -1
  264. package/dist/runtime/server/monitoring/backend-calls.d.ts +3 -3
  265. package/dist/runtime/server/monitoring/backend-calls.js +2 -2
  266. package/dist/runtime/server/monitoring/health.js +2 -2
  267. package/dist/runtime/vue/auth-client.d.ts +3 -2
  268. package/dist/runtime/vue/auth-client.js +2 -1
  269. package/dist/runtime/vue/components/account/SecuritySettings.d.vue.ts +25 -2
  270. package/dist/runtime/vue/components/account/SecuritySettings.vue +52 -2
  271. package/dist/runtime/vue/components/account/SecuritySettings.vue.d.ts +25 -2
  272. package/dist/runtime/vue/components/account/SecurityTwoFactor.css +1 -0
  273. package/dist/runtime/vue/components/account/SecurityTwoFactor.d.vue.ts +4 -0
  274. package/dist/runtime/vue/components/account/SecurityTwoFactor.vue +107 -0
  275. package/dist/runtime/vue/components/account/SecurityTwoFactor.vue.d.ts +4 -0
  276. package/dist/runtime/vue/components/account/security-settings.d.ts +18 -1
  277. package/dist/runtime/vue/components/admin/AdminUsers.d.vue.ts +11 -2
  278. package/dist/runtime/vue/components/admin/AdminUsers.vue.d.ts +11 -2
  279. package/dist/runtime/vue/components/admin/AdminWaitlist.css +1 -1
  280. package/dist/runtime/vue/components/admin/AdminWaitlistActions.vue +41 -1
  281. package/dist/runtime/vue/components/admin/AdminWorkspaces.d.vue.ts +9 -0
  282. package/dist/runtime/vue/components/admin/AdminWorkspaces.vue.d.ts +9 -0
  283. package/dist/runtime/vue/components/admin/admin-waitlist-tab.js +28 -0
  284. package/dist/runtime/vue/components/auth/AuthForm.d.vue.ts +9 -0
  285. package/dist/runtime/vue/components/auth/AuthForm.vue +8 -0
  286. package/dist/runtime/vue/components/auth/AuthForm.vue.d.ts +9 -0
  287. package/dist/runtime/vue/components/auth/AuthFormTwoFactor.css +1 -0
  288. package/dist/runtime/vue/components/auth/AuthFormTwoFactor.d.vue.ts +3 -0
  289. package/dist/runtime/vue/components/auth/AuthFormTwoFactor.vue +70 -0
  290. package/dist/runtime/vue/components/auth/AuthFormTwoFactor.vue.d.ts +3 -0
  291. package/dist/runtime/vue/components/auth/AuthFormWaitlisted.vue +7 -2
  292. package/dist/runtime/vue/components/auth/WaitlistForm.d.vue.ts +8 -0
  293. package/dist/runtime/vue/components/auth/WaitlistForm.vue.d.ts +8 -0
  294. package/dist/runtime/vue/components/auth/WaitlistPlace.css +1 -1
  295. package/dist/runtime/vue/components/auth/WaitlistPlace.vue +37 -0
  296. package/dist/runtime/vue/components/auth/WaitlistShare.vue +2 -2
  297. package/dist/runtime/vue/components/auth/auth-form.d.ts +2 -0
  298. package/dist/runtime/vue/components/workspaces/AuditLog.d.vue.ts +2 -0
  299. package/dist/runtime/vue/components/workspaces/AuditLog.vue.d.ts +2 -0
  300. package/dist/runtime/vue/components/workspaces/WorkspaceSettings.d.vue.ts +2 -2
  301. package/dist/runtime/vue/components/workspaces/WorkspaceSettings.vue.d.ts +2 -2
  302. package/dist/runtime/vue/composables/use-login-flow.d.ts +19 -4
  303. package/dist/runtime/vue/composables/use-login-flow.js +31 -0
  304. package/dist/runtime/vue/composables/use-room-presence.d.ts +63 -0
  305. package/dist/runtime/vue/composables/use-room-presence.js +31 -0
  306. package/dist/runtime/vue/composables/use-two-factor.d.ts +58 -0
  307. package/dist/runtime/vue/composables/use-two-factor.js +49 -0
  308. package/dist/runtime/vue/composables/use-waitlist-admin.d.ts +5 -0
  309. package/dist/runtime/vue/composables/use-waitlist-admin.js +5 -1
  310. package/dist/runtime/vue/composables/use-waitlist.d.ts +4 -0
  311. package/dist/runtime/vue/composables/use-waitlist.js +1 -1
  312. package/dist/runtime/vue/parts.d.ts +8 -1
  313. package/dist/runtime/vue/two-factor-client.d.ts +15 -0
  314. package/dist/runtime/vue/two-factor-client.js +19 -0
  315. package/dist/runtime/vue/utils/auth-session.js +10 -1
  316. package/dist/runtime/vue/utils/login-bindings.js +1 -0
  317. package/dist/runtime/vue/utils/page-guard.d.ts +2 -2
  318. package/dist/runtime/vue/utils/page-guard.js +2 -2
  319. package/dist/shared/{nuxt-backend.BvKvJ1mo.mjs → nuxt-backend.CM_p0XQE.mjs} +1 -1
  320. package/dist/shared/{nuxt-backend.DRuHg-IQ.mjs → nuxt-backend.C_Y_BtBs.mjs} +2 -2
  321. package/dist/shared/{nuxt-backend.suXOnqOQ.mjs → nuxt-backend.ChvlbHQq.mjs} +42 -7
  322. package/dist/shared/{nuxt-backend.0r1vvS1c.mjs → nuxt-backend.D16peTIt.mjs} +56 -34
  323. package/dist/shared/{nuxt-backend.zY6UDqDu.mjs → nuxt-backend.D4JXvCP6.mjs} +3 -2
  324. package/dist/types.d.ts +1 -1
  325. package/package.json +19 -10
  326. package/skills/nuxt-backend/SKILL.md +18 -18
  327. package/skills/nuxt-backend/references/api.md +30 -5
  328. package/skills/nuxt-backend/references/install.md +1 -1
  329. package/skills/nuxt-backend/references/renames.json +8 -0
  330. package/skills/nuxt-backend/references/surface.json +62 -2
  331. package/skills/nuxt-backend-auth/SKILL.md +8 -2
  332. package/skills/nuxt-backend-auth/references/api.md +3 -1
  333. package/skills/nuxt-backend-billing/SKILL.md +15 -0
  334. package/skills/nuxt-backend-billing/references/api.md +14 -1
  335. package/skills/nuxt-backend-data/SKILL.md +1 -0
  336. package/skills/nuxt-backend-data/references/api.md +10 -1
  337. package/skills/nuxt-backend-email/references/api.md +1 -1
  338. package/skills/nuxt-backend-ship/SKILL.md +2 -1
  339. package/skills/nuxt-backend-upgrade/references/upgrade.md +6 -0
  340. package/src/convex/access-tickets.ts +10 -2
  341. package/src/convex/account-data.ts +5 -4
  342. package/src/convex/app.ts +2 -1
  343. package/src/convex/client/better-auth-options.ts +12 -3
  344. package/src/convex/client/launch-gate.ts +28 -1
  345. package/src/convex/client/plugins.ts +3 -0
  346. package/src/convex/client/two-factor.ts +66 -0
  347. package/src/convex/components/backend/_generated/api.ts +2 -0
  348. package/src/convex/components/backend/_generated/component.ts +500 -2
  349. package/src/convex/components/backend/account.ts +25 -1
  350. package/src/convex/components/backend/adapter.ts +7 -2
  351. package/src/convex/components/backend/billing.ts +2 -1
  352. package/src/convex/components/backend/commerce.ts +408 -0
  353. package/src/convex/components/backend/schema.ts +110 -1
  354. package/src/convex/components/backend/waitlist.ts +144 -40
  355. package/src/convex/email-templates.ts +16 -0
  356. package/src/convex/emails/waitlist-friend-joined.ts +23 -0
  357. package/src/convex/errors.ts +15 -2
  358. package/src/convex/events.ts +14 -0
  359. package/src/convex/integrations/billing/checkout.ts +78 -11
  360. package/src/convex/integrations/billing/commerce-entitlements.ts +92 -0
  361. package/src/convex/integrations/billing/commerce-events.ts +487 -0
  362. package/src/convex/integrations/billing/commerce-history.ts +110 -0
  363. package/src/convex/integrations/billing/commerce-webhooks.ts +69 -0
  364. package/src/convex/integrations/billing/commerce.ts +366 -0
  365. package/src/convex/integrations/billing/context.ts +19 -2
  366. package/src/convex/integrations/billing/credits.ts +47 -27
  367. package/src/convex/integrations/billing/customers.ts +15 -1
  368. package/src/convex/integrations/billing/entitlements.ts +5 -1
  369. package/src/convex/integrations/billing/erasure.ts +11 -6
  370. package/src/convex/integrations/billing/free-plan.ts +30 -5
  371. package/src/convex/integrations/billing/functions.ts +3 -2
  372. package/src/convex/integrations/billing/gifts.ts +2 -0
  373. package/src/convex/integrations/billing/history.ts +9 -0
  374. package/src/convex/integrations/billing/lifecycle.ts +3 -1
  375. package/src/convex/integrations/billing/providers/capabilities.ts +78 -0
  376. package/src/convex/integrations/billing/providers/consent.ts +94 -0
  377. package/src/convex/integrations/billing/providers/creem.ts +225 -0
  378. package/src/convex/integrations/billing/providers/dodo.ts +214 -0
  379. package/src/convex/integrations/billing/providers/http.ts +168 -0
  380. package/src/convex/integrations/billing/providers/index.ts +65 -0
  381. package/src/convex/integrations/billing/providers/stripe.ts +345 -0
  382. package/src/convex/integrations/billing/providers/types.ts +281 -0
  383. package/src/convex/integrations/billing/subscriptions.ts +20 -6
  384. package/src/convex/integrations/billing/types/setup.ts +63 -1
  385. package/src/convex/integrations/billing.ts +46 -3
  386. package/src/convex/integrations/email.ts +1 -0
  387. package/src/convex/integrations/launch.ts +45 -7
  388. package/src/convex/integrations/presence.ts +160 -0
  389. package/src/convex/integrations/waitlist.ts +84 -12
  390. package/src/convex/integrations/webhook-guard.ts +20 -4
  391. package/src/convex/label-groups/admin.ts +9 -0
  392. package/src/convex/label-groups/audit.ts +2 -0
  393. package/src/convex/label-groups/auth.ts +10 -0
  394. package/src/convex/label-groups/email.ts +7 -0
  395. package/src/convex/label-groups/errors.ts +4 -0
  396. package/src/convex/label-groups/security.ts +20 -0
  397. package/src/convex/label-groups/waitlist.ts +9 -0
  398. package/src/convex/label-translations.ts +24 -0
  399. package/src/convex/log.ts +2 -0
  400. package/src/convex/sensitive-actions.ts +11 -0
  401. package/src/convex/waitlist-rules.ts +84 -8
  402. package/src/runtime/vue/components/account/SecuritySettings.vue +58 -4
  403. package/src/runtime/vue/components/account/SecurityTwoFactor.css +68 -0
  404. package/src/runtime/vue/components/account/SecurityTwoFactor.vue +113 -0
  405. package/src/runtime/vue/components/admin/AdminWaitlist.css +1 -0
  406. package/src/runtime/vue/components/admin/AdminWaitlistActions.vue +44 -2
  407. package/src/runtime/vue/components/auth/AuthForm.vue +8 -0
  408. package/src/runtime/vue/components/auth/AuthFormTwoFactor.css +40 -0
  409. package/src/runtime/vue/components/auth/AuthFormTwoFactor.vue +75 -0
  410. package/src/runtime/vue/components/auth/AuthFormWaitlisted.vue +11 -4
  411. package/src/runtime/vue/components/auth/WaitlistPlace.css +16 -0
  412. package/src/runtime/vue/components/auth/WaitlistPlace.vue +49 -2
  413. package/src/runtime/vue/components/auth/WaitlistShare.vue +4 -3
  414. package/dist/devtools-client/_nuxt/CiCAOwUc.js +0 -5
@@ -20,15 +20,15 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
20
20
  banned: (_userId: string) => void;
21
21
  impersonated: (_userId: string) => void;
22
22
  unbanned: (_userId: string) => void;
23
- "sessions-revoked": (_userId: string) => void;
24
23
  "role-changed": (_userId: string, _role: string) => void;
24
+ "sessions-revoked": (_userId: string) => void;
25
25
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
26
26
  onError?: ((_message: string) => any) | undefined;
27
27
  onBanned?: ((_userId: string) => any) | undefined;
28
28
  onImpersonated?: ((_userId: string) => any) | undefined;
29
29
  onUnbanned?: ((_userId: string) => any) | undefined;
30
- "onSessions-revoked"?: ((_userId: string) => any) | undefined;
31
30
  "onRole-changed"?: ((_userId: string, _role: string) => any) | undefined;
31
+ "onSessions-revoked"?: ((_userId: string) => any) | undefined;
32
32
  }>, {
33
33
  roles: string[];
34
34
  userId: string;
@@ -764,6 +764,15 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
764
764
  declineConfirm: string;
765
765
  abuseConfirm: string;
766
766
  noEntries: string;
767
+ planTitle: string;
768
+ planHint: string;
769
+ planSize: string;
770
+ planOpensAt: string;
771
+ plan: string;
772
+ planning: string;
773
+ planned: string;
774
+ planCleared: string;
775
+ planClear: string;
767
776
  capsTitle: string;
768
777
  capsHint: string;
769
778
  capCodes: string;
@@ -1 +1 @@
1
- @layer nuxt-backend{:where([data-admin=waitlist])>section,[data-admin=waitlist]{color:var(--bk-ink);display:flex;flex-direction:column;gap:.75rem;min-width:0}[data-admin=waitlist-counts]{display:flex;flex-wrap:wrap;gap:1rem;list-style:none;margin:0;padding:0}:where([data-admin=waitlist-counts]) li{display:flex;flex-direction:column}[data-admin=waitlist-actions],[data-admin=waitlist-filter],[data-admin=waitlist-note],[data-admin=waitlist-wave]{align-items:end;display:flex;flex-wrap:wrap;gap:.5rem}:where([data-admin=waitlist]) label{display:flex;flex-direction:column;gap:.25rem}:where([data-admin=waitlist]) table{border-collapse:collapse;width:100%}:where([data-admin=waitlist]) td,:where([data-admin=waitlist]) th{border-bottom:1px solid var(--bk-edge);padding:.35rem .5rem;text-align:start}:where([data-admin=waitlist] tr)[data-state=declined],:where([data-admin=waitlist] tr)[data-state=joined]{color:var(--bk-muted)}[data-admin=waitlist] [data-state=ok]{color:var(--bk-ok)}[data-admin=waitlist] [data-state=drift],[data-admin=waitlist] [data-state=error]{color:var(--bk-error)}}
1
+ @layer nuxt-backend{:where([data-admin=waitlist])>section,[data-admin=waitlist]{color:var(--bk-ink);display:flex;flex-direction:column;gap:.75rem;min-width:0}[data-admin=waitlist-counts]{display:flex;flex-wrap:wrap;gap:1rem;list-style:none;margin:0;padding:0}:where([data-admin=waitlist-counts]) li{display:flex;flex-direction:column}[data-admin=waitlist-actions],[data-admin=waitlist-filter],[data-admin=waitlist-note],[data-admin=waitlist-plan],[data-admin=waitlist-wave]{align-items:end;display:flex;flex-wrap:wrap;gap:.5rem}:where([data-admin=waitlist]) label{display:flex;flex-direction:column;gap:.25rem}:where([data-admin=waitlist]) table{border-collapse:collapse;width:100%}:where([data-admin=waitlist]) td,:where([data-admin=waitlist]) th{border-bottom:1px solid var(--bk-edge);padding:.35rem .5rem;text-align:start}:where([data-admin=waitlist] tr)[data-state=declined],:where([data-admin=waitlist] tr)[data-state=joined]{color:var(--bk-muted)}[data-admin=waitlist] [data-state=ok]{color:var(--bk-ok)}[data-admin=waitlist] [data-state=drift],[data-admin=waitlist] [data-state=error]{color:var(--bk-error)}}
@@ -2,7 +2,7 @@
2
2
  const props = defineProps({
3
3
  tab: { type: null, required: true }
4
4
  });
5
- const { t, running, selected, next } = props.tab;
5
+ const { t, running, selected, next, plan } = props.tab;
6
6
  const state = (key) => props.tab.busy(key) ?? (selected.value.length ? void 0 : "true");
7
7
  </script>
8
8
 
@@ -29,6 +29,46 @@ const state = (key) => props.tab.busy(key) ?? (selected.value.length ? void 0 :
29
29
  {{ running === "next" ? t("waitlist.approving") : t("waitlist.approveNext") }}
30
30
  </button>
31
31
  </form>
32
+ <form
33
+ data-admin="waitlist-plan"
34
+ :aria-label="t('waitlist.planTitle')"
35
+ @submit.prevent="tab.planWave()"
36
+ >
37
+ <label>
38
+ {{ t("waitlist.planSize") }}
39
+ <input
40
+ v-model="plan.size"
41
+ type="number"
42
+ required
43
+ min="1"
44
+ :max="tab.planMax"
45
+ inputmode="numeric"
46
+ >
47
+ </label>
48
+ <label>
49
+ {{ t("waitlist.planOpensAt") }}
50
+ <input
51
+ v-model="plan.opensAt"
52
+ type="date"
53
+ >
54
+ </label>
55
+ <button
56
+ type="submit"
57
+ data-admin="waitlist-plan-save"
58
+ :aria-disabled="tab.busy('plan')"
59
+ >
60
+ {{ running === "plan" ? t("waitlist.planning") : t("waitlist.plan") }}
61
+ </button>
62
+ <button
63
+ type="button"
64
+ data-admin="waitlist-plan-clear"
65
+ :aria-disabled="tab.busy('plan')"
66
+ @click="tab.planWave(true)"
67
+ >
68
+ {{ t("waitlist.planClear") }}
69
+ </button>
70
+ <p>{{ t("waitlist.planHint") }}</p>
71
+ </form>
32
72
  <div data-admin="waitlist-actions">
33
73
  <button
34
74
  type="button"
@@ -747,6 +747,15 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
747
747
  declineConfirm: string;
748
748
  abuseConfirm: string;
749
749
  noEntries: string;
750
+ planTitle: string;
751
+ planHint: string;
752
+ planSize: string;
753
+ planOpensAt: string;
754
+ plan: string;
755
+ planning: string;
756
+ planned: string;
757
+ planCleared: string;
758
+ planClear: string;
750
759
  capsTitle: string;
751
760
  capsHint: string;
752
761
  capCodes: string;
@@ -747,6 +747,15 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
747
747
  declineConfirm: string;
748
748
  abuseConfirm: string;
749
749
  noEntries: string;
750
+ planTitle: string;
751
+ planHint: string;
752
+ planSize: string;
753
+ planOpensAt: string;
754
+ plan: string;
755
+ planning: string;
756
+ planned: string;
757
+ planCleared: string;
758
+ planClear: string;
750
759
  capsTitle: string;
751
760
  capsHint: string;
752
761
  capCodes: string;
@@ -3,6 +3,7 @@ import { formatBillingDate } from "../../composables/billing-format.js";
3
3
  import { useWaitlistAdmin } from "../../composables/use-waitlist-admin.js";
4
4
  import { useAdminChanges } from "../../utils/admin-changes.js";
5
5
  const WAVE_MAX = 200;
6
+ const PLAN_MAX = 1e4;
6
7
  export function useWaitlistTab(confirm) {
7
8
  const filter = reactive({ status: "waiting", domain: "", source: "", question: "", answer: "" });
8
9
  const applied = ref({ ...filter });
@@ -58,6 +59,30 @@ export function useWaitlistTab(confirm) {
58
59
  async function loadCaps() {
59
60
  caps.value = await waitlist.caps().catch(() => null);
60
61
  }
62
+ const plan = reactive({ size: "", opensAt: "" });
63
+ const dateField = (at) => new Date(at).toISOString().slice(0, 10);
64
+ const savedPlan = computed(() => {
65
+ const wave = waitlist.console.value?.wave;
66
+ return wave === void 0 ? void 0 : JSON.stringify(wave);
67
+ });
68
+ watch(savedPlan, () => {
69
+ const wave = waitlist.console.value?.wave;
70
+ if (wave === void 0) return;
71
+ plan.size = wave ? String(wave.size) : "";
72
+ plan.opensAt = wave?.opensAt ? dateField(wave.opensAt) : "";
73
+ }, { immediate: true });
74
+ async function planWave(clear = false) {
75
+ const size = clear ? 0 : Math.min(PLAN_MAX, Math.trunc(Number(plan.size)) || 0);
76
+ const kept = waitlist.console.value?.wave?.opensAt;
77
+ const opensAt = !plan.opensAt ? null : kept && dateField(kept) === plan.opensAt ? kept : Date.parse(`${plan.opensAt}T00:00:00Z`);
78
+ if (!clear && size < 1) return;
79
+ const wave = clear ? null : { size, opensAt: Number.isFinite(opensAt) ? opensAt : null };
80
+ const saved = await change("plan", async () => {
81
+ await waitlist.plan(wave);
82
+ return true;
83
+ }, () => t(wave ? "waitlist.planned" : "waitlist.planCleared"));
84
+ if (saved && !wave) Object.assign(plan, { size: "", opensAt: "" });
85
+ }
61
86
  return {
62
87
  id,
63
88
  t,
@@ -88,6 +113,9 @@ export function useWaitlistTab(confirm) {
88
113
  saveNote,
89
114
  caps,
90
115
  loadCaps,
116
+ plan,
117
+ planMax: PLAN_MAX,
118
+ planWave,
91
119
  statuses: ["waiting", "admitted", "declined", "joined"]
92
120
  };
93
121
  }
@@ -59,6 +59,15 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
59
59
  ageQuestion: string;
60
60
  ageSubmit: string;
61
61
  ageChecking: string;
62
+ twoFactorIntro: string;
63
+ twoFactorBackupIntro: string;
64
+ twoFactorCode: string;
65
+ twoFactorBackupCode: string;
66
+ twoFactorTrustDevice: string;
67
+ twoFactorSubmit: string;
68
+ twoFactorChecking: string;
69
+ twoFactorUseBackup: string;
70
+ twoFactorUseApp: string;
62
71
  haveInviteCode: string;
63
72
  undeliverable: string;
64
73
  tryAnotherEmail: string;
@@ -73,6 +73,7 @@ const slotFlow = {
73
73
  recover: byPerson(flow.recover),
74
74
  redeemInviteCode: byPerson(flow.redeemInviteCode),
75
75
  submitAge: byPerson(flow.submitAge),
76
+ verifyTwoFactor: byPerson(flow.verifyTwoFactor),
76
77
  bind: loginBindings({
77
78
  ...flow,
78
79
  signInWithPasskey,
@@ -161,6 +162,13 @@ provideAuthFormView({
161
162
  >
162
163
  <AuthFormAge :flow="slotFlow" />
163
164
  </slot>
165
+ <slot
166
+ v-else-if="flow.step.value === 'two-factor'"
167
+ name="two-factor"
168
+ v-bind="slotFlow"
169
+ >
170
+ <AuthFormTwoFactor :flow="slotFlow" />
171
+ </slot>
164
172
  <slot
165
173
  v-else-if="flow.step.value === 'undeliverable'"
166
174
  name="undeliverable"
@@ -59,6 +59,15 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
59
59
  ageQuestion: string;
60
60
  ageSubmit: string;
61
61
  ageChecking: string;
62
+ twoFactorIntro: string;
63
+ twoFactorBackupIntro: string;
64
+ twoFactorCode: string;
65
+ twoFactorBackupCode: string;
66
+ twoFactorTrustDevice: string;
67
+ twoFactorSubmit: string;
68
+ twoFactorChecking: string;
69
+ twoFactorUseBackup: string;
70
+ twoFactorUseApp: string;
62
71
  haveInviteCode: string;
63
72
  undeliverable: string;
64
73
  tryAnotherEmail: string;
@@ -0,0 +1 @@
1
+ @layer nuxt-backend{[data-auth=two-factor-note]{color:var(--auth-muted);font-size:.85rem;line-height:1.5;margin:0}[data-auth=input-two-factor-code][inputmode=numeric]{font-variant-numeric:tabular-nums;letter-spacing:.15em;max-width:10rem}[data-auth=label-trust-device]{align-items:center;display:flex;gap:.5rem}[data-auth=two-factor-switch]{align-self:center;background:none;border:0;box-shadow:none;color:var(--auth-muted);font-size:.85rem;font-weight:500;text-decoration:underline;text-underline-offset:.2em;translate:none}}
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<import("../../parts.js").AuthFormPartProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("../../parts.js").AuthFormPartProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,70 @@
1
+ <script setup>
2
+ import { fieldState, useAuthFormView } from "./auth-form";
3
+ defineOptions({ name: "AuthFormTwoFactor" });
4
+ defineProps({
5
+ flow: { type: Object, required: true }
6
+ });
7
+ const view = useAuthFormView("AuthFormTwoFactor");
8
+ const { t } = view.labels;
9
+ </script>
10
+
11
+ <template>
12
+ <form
13
+ data-auth="step-two-factor"
14
+ @submit.prevent="flow.verifyTwoFactor()"
15
+ >
16
+ <p data-auth="two-factor-note">
17
+ {{ flow.withBackupCode.value ? t("twoFactorBackupIntro") : t("twoFactorIntro") }}
18
+ </p>
19
+ <label data-auth="label-two-factor-code">
20
+ {{ flow.withBackupCode.value ? t("twoFactorBackupCode") : t("twoFactorCode") }}
21
+ <input
22
+ v-model="flow.twoFactorCode.value"
23
+ data-auth="input-two-factor-code"
24
+ type="text"
25
+ :inputmode="flow.withBackupCode.value ? 'text' : 'numeric'"
26
+ :autocomplete="flow.withBackupCode.value ? 'off' : 'one-time-code'"
27
+ :pattern="flow.withBackupCode.value ? void 0 : '[0-9 ]*'"
28
+ :maxlength="flow.withBackupCode.value ? 32 : 7"
29
+ spellcheck="false"
30
+ required
31
+ v-bind="fieldState(flow, view, 'twoFactorCode')"
32
+ >
33
+ </label>
34
+ <label data-auth="label-trust-device">
35
+ <input
36
+ v-model="flow.trustDevice.value"
37
+ data-auth="input-trust-device"
38
+ type="checkbox"
39
+ >
40
+ {{ t("twoFactorTrustDevice") }}
41
+ </label>
42
+ <!-- The busy button's words, said: a polite status that is empty until the code is being checked. -->
43
+ <p
44
+ data-auth="two-factor-status"
45
+ role="status"
46
+ aria-live="polite"
47
+ >
48
+ {{ flow.isPending.value ? t("twoFactorChecking") : "" }}
49
+ </p>
50
+ <button
51
+ data-auth="submit"
52
+ v-bind="flow.bind.submit"
53
+ >
54
+ {{ flow.isPending.value ? t("twoFactorChecking") : t("twoFactorSubmit") }}
55
+ </button>
56
+ <button
57
+ data-auth="two-factor-switch"
58
+ type="button"
59
+ @click="flow.withBackupCode.value = !flow.withBackupCode.value"
60
+ >
61
+ {{ flow.withBackupCode.value ? t("twoFactorUseApp") : t("twoFactorUseBackup") }}
62
+ </button>
63
+ <button
64
+ data-auth="back"
65
+ v-bind="flow.bind.back"
66
+ >
67
+ {{ t("back") }}
68
+ </button>
69
+ </form>
70
+ </template>
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<import("../../parts.js").AuthFormPartProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("../../parts.js").AuthFormPartProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -1,12 +1,17 @@
1
1
  <script setup>
2
+ import { computed } from "vue";
2
3
  import { busyAttributes } from "../../a11y";
3
4
  import { useAuthFormView } from "./auth-form";
4
5
  defineOptions({ name: "AuthFormWaitlisted" });
5
- defineProps({
6
+ const props = defineProps({
6
7
  flow: { type: Object, required: true }
7
8
  });
8
9
  const view = useAuthFormView("AuthFormWaitlisted");
9
10
  const { t } = view.labels;
11
+ const note = computed(() => {
12
+ const place = props.flow.waitlist.value;
13
+ return place?.position ? t("waitlistedPlace", { position: place.position, total: place.total ?? place.position }) : t("waitlisted");
14
+ });
10
15
  </script>
11
16
 
12
17
  <template>
@@ -16,7 +21,7 @@ const { t } = view.labels;
16
21
  role="status"
17
22
  aria-live="polite"
18
23
  >
19
- {{ flow.waitlist.value ? t("waitlistedPlace", { position: flow.waitlist.value.position, total: flow.waitlist.value.total }) : t("waitlisted") }}
24
+ {{ note }}
20
25
  </p>
21
26
  <p
22
27
  v-if="flow.waitlist.value"
@@ -38,6 +38,13 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
38
38
  back: string;
39
39
  placed: string;
40
40
  placedUnknown: string;
41
+ joinedOn: string;
42
+ credit: string;
43
+ creditHours: string;
44
+ creditMinutes: string;
45
+ waveIn: string;
46
+ waveShort: string;
47
+ waveOpens: string;
41
48
  disclosure: string;
42
49
  admitted: string;
43
50
  signUp: string;
@@ -47,6 +54,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
47
54
  dropReferral: string;
48
55
  shareTitle: string;
49
56
  shareIntro: string;
57
+ shareIntroOpen: string;
50
58
  shareLink: string;
51
59
  copy: string;
52
60
  copied: string;
@@ -38,6 +38,13 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
38
38
  back: string;
39
39
  placed: string;
40
40
  placedUnknown: string;
41
+ joinedOn: string;
42
+ credit: string;
43
+ creditHours: string;
44
+ creditMinutes: string;
45
+ waveIn: string;
46
+ waveShort: string;
47
+ waveOpens: string;
41
48
  disclosure: string;
42
49
  admitted: string;
43
50
  signUp: string;
@@ -47,6 +54,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
47
54
  dropReferral: string;
48
55
  shareTitle: string;
49
56
  shareIntro: string;
57
+ shareIntroOpen: string;
50
58
  shareLink: string;
51
59
  copy: string;
52
60
  copied: string;
@@ -1 +1 @@
1
- @layer nuxt-backend{[data-waitlist=place]{color:var(--bk-ink);display:flex;flex-direction:column;gap:.75rem}[data-waitlist=position]{font-size:1.4rem;font-variant-numeric:tabular-nums;font-weight:600;margin:0}[data-waitlist=place]>:where([data-waitlist=admitted],[data-waitlist=declined],[data-waitlist=joined]){font-weight:600;margin:0}[data-waitlist=sign-up]{align-self:flex-start;background:var(--bk-accent);border-radius:var(--bk-radius-control);color:var(--bk-on-accent);font-weight:600;padding:.5rem .9rem;text-decoration:none}[data-waitlist=leave]{align-self:flex-start;background:transparent;border:var(--bk-border-width-control,var(--bk-border-width)) solid var(--bk-edge);border-radius:var(--bk-radius-control);box-shadow:var(--_bk-press-shadow,var(--bk-shadow-control));color:inherit;cursor:pointer;font:inherit;font-family:var(--bk-font-control,var(--bk-font));letter-spacing:var(--bk-tracking-control,revert-layer);padding:.45rem .85rem;translate:var(--_bk-press-offset)}[data-waitlist=place] :where(a,button):focus-visible{outline:2px solid var(--bk-accent);outline-offset:2px}}
1
+ @layer nuxt-backend{[data-waitlist=place]{color:var(--bk-ink);display:flex;flex-direction:column;gap:.75rem}[data-waitlist=position]{font-size:1.4rem;font-variant-numeric:tabular-nums;font-weight:600;margin:0}[data-waitlist=place]>:where([data-waitlist=admitted],[data-waitlist=declined],[data-waitlist=joined]){font-weight:600;margin:0}[data-waitlist=facts]{display:flex;flex-direction:column;gap:.75rem}[data-waitlist=facts]:empty{position:absolute}[data-waitlist=fact]{margin:0}[data-waitlist=sign-up]{align-self:flex-start;background:var(--bk-accent);border-radius:var(--bk-radius-control);color:var(--bk-on-accent);font-weight:600;padding:.5rem .9rem;text-decoration:none}[data-waitlist=leave]{align-self:flex-start;background:transparent;border:var(--bk-border-width-control,var(--bk-border-width)) solid var(--bk-edge);border-radius:var(--bk-radius-control);box-shadow:var(--_bk-press-shadow,var(--bk-shadow-control));color:inherit;cursor:pointer;font:inherit;font-family:var(--bk-font-control,var(--bk-font));letter-spacing:var(--bk-tracking-control,revert-layer);padding:.45rem .85rem;translate:var(--_bk-press-offset)}[data-waitlist=place] :where(a,button):focus-visible{outline:2px solid var(--bk-accent);outline-offset:2px}}
@@ -12,6 +12,29 @@ const { t, errorMessage, locale } = useLabels("waitlist", view.labels);
12
12
  const loginPath = useBackendPagePath("login");
13
13
  const place = computed(() => props.waitlist.place.value);
14
14
  const number = (value) => value.toLocaleString(locale.value);
15
+ const day = (at) => new Date(at).toLocaleDateString(locale.value, { dateStyle: "long" });
16
+ const utcDay = (at) => new Date(at).toLocaleDateString(locale.value, { dateStyle: "long", timeZone: "UTC" });
17
+ const MINUTE_MS = 60 * 1e3;
18
+ const HOUR_MS = 60 * MINUTE_MS;
19
+ const DAY_MS = 24 * HOUR_MS;
20
+ function creditLine(credit) {
21
+ if (credit >= DAY_MS) return t("credit", { count: Math.floor(credit / DAY_MS) });
22
+ if (credit >= HOUR_MS) return t("creditHours", { count: Math.floor(credit / HOUR_MS) });
23
+ if (credit >= MINUTE_MS) return t("creditMinutes", { count: Math.floor(credit / MINUTE_MS) });
24
+ return null;
25
+ }
26
+ const facts = computed(() => {
27
+ const standing = place.value;
28
+ if (standing?.status !== "waiting" || standing.position || !standing.joinedAt) return [];
29
+ const lines = [t("joinedOn", { date: day(standing.joinedAt) })];
30
+ const credit = creditLine(standing.credit ?? 0);
31
+ if (credit) lines.push(credit);
32
+ const wave = standing.wave;
33
+ if (wave?.included) lines.push(t("waveIn"));
34
+ else if (wave?.friendsShort) lines.push(t("waveShort", { count: wave.friendsShort }));
35
+ if (wave?.opensAt) lines.push(t("waveOpens", { date: utcDay(wave.opensAt) }));
36
+ return lines;
37
+ });
15
38
  const headline = computed(() => {
16
39
  const standing = place.value;
17
40
  if (standing?.status === "waiting") return standing.position ? t("placed", { position: number(standing.position), total: number(standing.total) }) : t("placedUnknown");
@@ -42,6 +65,20 @@ const headline = computed(() => {
42
65
  >
43
66
  {{ t("signUp") }}
44
67
  </a>
68
+ <!-- Mounted, empty, before the facts arrive, so the first ones are heard too. -->
69
+ <div
70
+ data-waitlist="facts"
71
+ role="status"
72
+ aria-live="polite"
73
+ >
74
+ <p
75
+ v-for="line in facts"
76
+ :key="line"
77
+ data-waitlist="fact"
78
+ >
79
+ {{ line }}
80
+ </p>
81
+ </div>
45
82
  <template v-if="place?.status === 'waiting'">
46
83
  <p data-waitlist="disclosure">
47
84
  {{ t("disclosure") }}
@@ -23,14 +23,14 @@ async function copy() {
23
23
 
24
24
  <template>
25
25
  <section
26
- v-if="link"
26
+ v-if="link && place?.cap !== 0"
27
27
  data-waitlist="share"
28
28
  >
29
29
  <h3 data-waitlist="share-title">
30
30
  {{ t("shareTitle") }}
31
31
  </h3>
32
32
  <p data-waitlist="share-intro">
33
- {{ t("shareIntro", { cap: place?.cap ?? 0 }) }} {{ t("shareText") }}
33
+ {{ place?.cap === null ? t("shareIntroOpen") : t("shareIntro", { cap: place?.cap ?? 0 }) }} {{ t("shareText") }}
34
34
  </p>
35
35
  <label data-waitlist="share-label">
36
36
  {{ t("shareLink") }}
@@ -26,6 +26,8 @@ export interface AuthFormSlots {
26
26
  'invite-code': (flow: UseLoginFlowReturn) => unknown;
27
27
  /** A new address, when the app sets a minimum age: the question "How old are you?", asked once. */
28
28
  'age': (flow: UseLoginFlowReturn) => unknown;
29
+ /** An account with an authenticator app, after its sign-in code: the app's code or a backup code, and whether to trust this device. */
30
+ 'two-factor': (flow: UseLoginFlowReturn) => unknown;
29
31
  /** An address the email provider stopped delivering to: no code was sent, the same words for new and existing accounts, and a way back to try another address. */
30
32
  'undeliverable': (flow: UseLoginFlowReturn) => unknown;
31
33
  /** Why the last step failed; rendered only while `error` is set. */
@@ -108,6 +108,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
108
108
  admitted: string;
109
109
  declined: string;
110
110
  left: string;
111
+ friend_joined: string;
112
+ wave_planned: string;
111
113
  };
112
114
  report: {
113
115
  decided: string;
@@ -108,6 +108,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
108
108
  admitted: string;
109
109
  declined: string;
110
110
  left: string;
111
+ friend_joined: string;
112
+ wave_planned: string;
111
113
  };
112
114
  report: {
113
115
  decided: string;
@@ -11,9 +11,9 @@ type __VLS_Props = {
11
11
  type __VLS_Slots = WorkspaceSettingsSlots;
12
12
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
13
  error: (_message: string) => void;
14
- "workspace-created": (_workspace: Workspace) => void;
15
14
  "plan-changed": (_productId: string) => void;
16
15
  "topped-up": (_key: string) => void;
16
+ "workspace-created": (_workspace: Workspace) => void;
17
17
  "plan-canceled": () => void;
18
18
  "plan-uncanceled": () => void;
19
19
  "plan-resumed": () => void;
@@ -22,9 +22,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
22
22
  "workspace-switched": (_id: string) => void;
23
23
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
24
24
  onError?: ((_message: string) => any) | undefined;
25
- "onWorkspace-created"?: ((_workspace: Workspace) => any) | undefined;
26
25
  "onPlan-changed"?: ((_productId: string) => any) | undefined;
27
26
  "onTopped-up"?: ((_key: string) => any) | undefined;
27
+ "onWorkspace-created"?: ((_workspace: Workspace) => any) | undefined;
28
28
  "onPlan-canceled"?: (() => any) | undefined;
29
29
  "onPlan-uncanceled"?: (() => any) | undefined;
30
30
  "onPlan-resumed"?: (() => any) | undefined;
@@ -11,9 +11,9 @@ type __VLS_Props = {
11
11
  type __VLS_Slots = WorkspaceSettingsSlots;
12
12
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
13
  error: (_message: string) => void;
14
- "workspace-created": (_workspace: Workspace) => void;
15
14
  "plan-changed": (_productId: string) => void;
16
15
  "topped-up": (_key: string) => void;
16
+ "workspace-created": (_workspace: Workspace) => void;
17
17
  "plan-canceled": () => void;
18
18
  "plan-uncanceled": () => void;
19
19
  "plan-resumed": () => void;
@@ -22,9 +22,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
22
22
  "workspace-switched": (_id: string) => void;
23
23
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
24
24
  onError?: ((_message: string) => any) | undefined;
25
- "onWorkspace-created"?: ((_workspace: Workspace) => any) | undefined;
26
25
  "onPlan-changed"?: ((_productId: string) => any) | undefined;
27
26
  "onTopped-up"?: ((_key: string) => any) | undefined;
27
+ "onWorkspace-created"?: ((_workspace: Workspace) => any) | undefined;
28
28
  "onPlan-canceled"?: (() => any) | undefined;
29
29
  "onPlan-uncanceled"?: (() => any) | undefined;
30
30
  "onPlan-resumed"?: (() => any) | undefined;
@@ -16,7 +16,7 @@ export type { LoginBindings } from '../utils/login-bindings.js';
16
16
  * ownership); a passkey is added afterwards from the authenticated session.
17
17
  */
18
18
  export type { SignInMethod } from '../utils/auth-session.js';
19
- export type LoginStep = 'choose' | 'request-code' | 'verify-code' | 'passkey-offer' | 'recover' | 'waitlisted' | 'invite-code' | 'age' | 'undeliverable';
19
+ export type LoginStep = 'choose' | 'request-code' | 'verify-code' | 'passkey-offer' | 'recover' | 'waitlisted' | 'invite-code' | 'age' | 'undeliverable' | 'two-factor';
20
20
  export interface UseLoginFlowOptions {
21
21
  /**
22
22
  * Gate the email before sending. Return `true` to accept, `false` for the
@@ -97,13 +97,20 @@ export interface UseLoginFlowReturn {
97
97
  /**
98
98
  * Where the address stands on the waitlist, once its code checked while
99
99
  * the app is in early access (the `waitlisted` step shows it); `null`
100
- * otherwise.
100
+ * otherwise. `position` and `total` only where the waitlist shows rank
101
+ * (`setupAccess({ waitlist: { place: { rank: false } } })` leaves the token alone).
101
102
  */
102
103
  waitlist: Ref<{
103
- position: number;
104
- total: number;
104
+ position?: number;
105
+ total?: number;
105
106
  token: string;
106
107
  } | null>;
108
+ /** The code from the authenticator app (or, with `withBackupCode`, a backup code) an account with one types on `two-factor`. */
109
+ twoFactorCode: Ref<string>;
110
+ /** Whether `two-factor` takes a backup code instead of the app's code. Switching clears the field and `error`. */
111
+ withBackupCode: Ref<boolean>;
112
+ /** Whether this browser skips the `two-factor` step for thirty days once the code checks. */
113
+ trustDevice: Ref<boolean>;
107
114
  /** `true` on `passkey-offer` after a recovery: a passkey must be saved, and `skipPasskey()` does nothing. */
108
115
  passkeyRequired: ComputedRef<boolean>;
109
116
  /** `true` while a step's call runs. */
@@ -130,6 +137,14 @@ export interface UseLoginFlowReturn {
130
137
  * done at once where this browser can save no passkey.
131
138
  */
132
139
  verifyCode: () => Promise<void>;
140
+ /**
141
+ * Check `twoFactorCode` on `two-factor`, the step a sign-in code moves
142
+ * an account with an authenticator app to → `passkey-offer`, as
143
+ * `verifyCode`. A wrong code stays, refused as `invalid_input` on
144
+ * `twoFactorCode`; once the ten minutes after the sign-in code passed
145
+ * (reason `two_factor_expired`), `goTo('request-code')` starts again.
146
+ */
147
+ verifyTwoFactor: () => Promise<void>;
133
148
  /**
134
149
  * Check `inviteCode` and sign up with it and the code already typed →
135
150
  * `passkey-offer`. A code that admits nobody stays on `invite-code`,