@cosmicdrift/kumiko-bundled-features 0.393.0 → 0.395.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 (446) hide show
  1. package/dist/account-security/feature.d.ts +2 -0
  2. package/dist/account-security/feature.js +3 -1
  3. package/dist/audit/event-classification.js +1 -0
  4. package/dist/auth-email-password/handlers/change-password.write.d.ts +1 -1
  5. package/dist/auth-email-password/handlers/confirm-account-unlock.write.d.ts +1 -1
  6. package/dist/auth-email-password/handlers/invite-accept-with-login.write.d.ts +1 -1
  7. package/dist/auth-email-password/handlers/invite-accept.write.d.ts +1 -1
  8. package/dist/auth-email-password/handlers/invite-create.write.d.ts +2 -2
  9. package/dist/auth-email-password/handlers/invite-signup-complete.write.d.ts +1 -1
  10. package/dist/auth-email-password/handlers/login.write.d.ts +1 -1
  11. package/dist/auth-email-password/handlers/logout.write.d.ts +1 -1
  12. package/dist/auth-email-password/handlers/request-account-unlock.write.d.ts +1 -1
  13. package/dist/auth-email-password/handlers/request-email-verification.write.d.ts +1 -1
  14. package/dist/auth-email-password/handlers/request-password-reset.write.d.ts +1 -1
  15. package/dist/auth-email-password/handlers/reset-password.write.d.ts +1 -1
  16. package/dist/auth-email-password/handlers/signup-confirm.write.d.ts +1 -1
  17. package/dist/auth-email-password/handlers/signup-request.write.d.ts +1 -1
  18. package/dist/auth-email-password/handlers/switch-tenant-mfa-gate.write.d.ts +1 -1
  19. package/dist/auth-email-password/handlers/token-request-handler.d.ts +1 -1
  20. package/dist/auth-email-password/handlers/verify-email.write.d.ts +1 -1
  21. package/dist/auth-email-password/web/auth-client.d.ts +3 -7
  22. package/dist/auth-email-password/web/auth-client.js +3 -24
  23. package/dist/auth-email-password/web/auth-gate.d.ts +2 -4
  24. package/dist/auth-email-password/web/auth-redirect.d.ts +2 -2
  25. package/dist/auth-email-password/web/auth-redirect.js +3 -12
  26. package/dist/auth-email-password/web/index.d.ts +2 -1
  27. package/dist/auth-email-password/web/index.js +1 -0
  28. package/dist/auth-email-password/web/login-failure.d.ts +9 -0
  29. package/dist/auth-email-password/web/login-failure.js +32 -0
  30. package/dist/auth-email-password/web/login-url.d.ts +5 -0
  31. package/dist/auth-email-password/web/login-url.js +13 -0
  32. package/dist/auth-email-password/web/static-login.d.ts +42 -0
  33. package/dist/auth-email-password/web/static-login.js +122 -0
  34. package/dist/auth-mfa/handlers/disable.write.d.ts +1 -1
  35. package/dist/auth-mfa/handlers/enable-confirm-preauth.write.d.ts +1 -1
  36. package/dist/auth-mfa/handlers/enable-confirm.write.d.ts +1 -1
  37. package/dist/auth-mfa/handlers/enable-start-preauth.write.d.ts +1 -1
  38. package/dist/auth-mfa/handlers/enable-start.write.d.ts +1 -1
  39. package/dist/auth-mfa/handlers/regenerate-recovery.write.d.ts +1 -1
  40. package/dist/auth-mfa/handlers/verify.write.d.ts +1 -1
  41. package/dist/auth-mfa/web/mfa-client.js +4 -43
  42. package/dist/billing-foundation/checkout-core.d.ts +2 -1
  43. package/dist/billing-foundation/checkout-core.js +2 -11
  44. package/dist/billing-foundation/events.d.ts +1 -0
  45. package/dist/billing-foundation/events.js +2 -0
  46. package/dist/billing-foundation/feature.js +1 -1
  47. package/dist/billing-foundation/handlers/create-checkout-session.write.js +9 -2
  48. package/dist/billing-foundation/handlers/process-payment-event.write.d.ts +1 -0
  49. package/dist/billing-foundation/handlers/process-payment-event.write.js +2 -0
  50. package/dist/billing-foundation/index.d.ts +1 -1
  51. package/dist/billing-foundation/one-off-checkout-gate.d.ts +9 -0
  52. package/dist/billing-foundation/one-off-checkout-gate.js +30 -0
  53. package/dist/billing-foundation/one-off-customer.d.ts +6 -0
  54. package/dist/billing-foundation/one-off-customer.js +12 -0
  55. package/dist/billing-foundation/plan-catalog.js +1 -0
  56. package/dist/billing-foundation/types.d.ts +25 -0
  57. package/dist/billing-foundation/web/billing-plans-panel.js +1 -0
  58. package/dist/billing-foundation/web/plan-switch-confirm-dialog.js +7 -3
  59. package/dist/billing-foundation/web/plan-switch-recurring.d.ts +16 -0
  60. package/dist/billing-foundation/web/plan-switch-recurring.js +10 -0
  61. package/dist/billing-foundation/webhook-handler.js +1 -0
  62. package/dist/cap-overview/handlers/caps-usage.query.js +3 -3
  63. package/dist/cap-overview/types.d.ts +2 -0
  64. package/dist/channel-in-app/handlers/mark-all-read.write.d.ts +1 -1
  65. package/dist/channel-in-app/handlers/mark-read.write.d.ts +1 -1
  66. package/dist/compliance-profiles/handlers/set-profile.write.d.ts +1 -1
  67. package/dist/compliance-profiles/web/compliance-profile-catalog.js +8 -1
  68. package/dist/config/handlers/reset.write.d.ts +1 -1
  69. package/dist/config/handlers/set.write.d.ts +1 -1
  70. package/dist/crypto-shredding/handlers/forget-subject.write.d.ts +1 -1
  71. package/dist/delivery/handlers/resubscribe-address.write.d.ts +1 -1
  72. package/dist/delivery/handlers/resubscribe-user.write.d.ts +1 -1
  73. package/dist/delivery/handlers/set-preference.write.d.ts +1 -1
  74. package/dist/delivery/handlers/unsubscribe-address.write.d.ts +1 -1
  75. package/dist/delivery/handlers/unsubscribe-user.write.d.ts +1 -1
  76. package/dist/feature-toggles/handlers/set.write.d.ts +1 -1
  77. package/dist/file-foundation/read-file-ref-content.d.ts +2 -0
  78. package/dist/file-foundation/read-file-ref-content.js +9 -3
  79. package/dist/form-draft/handlers/discard.write.d.ts +1 -1
  80. package/dist/form-draft/handlers/save.write.d.ts +1 -1
  81. package/dist/inbound-mail-foundation/account-health.d.ts +17 -0
  82. package/dist/inbound-mail-foundation/account-health.js +101 -0
  83. package/dist/inbound-mail-foundation/account-poll-schedule.d.ts +19 -0
  84. package/dist/inbound-mail-foundation/account-poll-schedule.js +44 -0
  85. package/dist/inbound-mail-foundation/account-poll.d.ts +24 -0
  86. package/dist/inbound-mail-foundation/account-poll.js +157 -0
  87. package/dist/inbound-mail-foundation/account-record.d.ts +1 -0
  88. package/dist/inbound-mail-foundation/account-record.js +1 -0
  89. package/dist/inbound-mail-foundation/account-wake.d.ts +3 -0
  90. package/dist/inbound-mail-foundation/account-wake.js +17 -0
  91. package/dist/inbound-mail-foundation/connect-callback-verify.d.ts +10 -0
  92. package/dist/inbound-mail-foundation/connect-callback-verify.js +31 -0
  93. package/dist/inbound-mail-foundation/connect-route-responses.d.ts +13 -0
  94. package/dist/inbound-mail-foundation/connect-route-responses.js +16 -0
  95. package/dist/inbound-mail-foundation/connect-routes.js +52 -33
  96. package/dist/inbound-mail-foundation/constants.d.ts +50 -2
  97. package/dist/inbound-mail-foundation/constants.js +53 -3
  98. package/dist/inbound-mail-foundation/content-refetch.d.ts +14 -0
  99. package/dist/inbound-mail-foundation/content-refetch.js +93 -0
  100. package/dist/inbound-mail-foundation/describe-error.d.ts +1 -0
  101. package/dist/inbound-mail-foundation/describe-error.js +5 -0
  102. package/dist/inbound-mail-foundation/entities.d.ts +26 -0
  103. package/dist/inbound-mail-foundation/entities.js +43 -3
  104. package/dist/inbound-mail-foundation/events.d.ts +97 -0
  105. package/dist/inbound-mail-foundation/events.js +57 -2
  106. package/dist/inbound-mail-foundation/feature.d.ts +5 -2
  107. package/dist/inbound-mail-foundation/feature.js +122 -106
  108. package/dist/inbound-mail-foundation/file-storage-failure.d.ts +8 -0
  109. package/dist/inbound-mail-foundation/file-storage-failure.js +19 -0
  110. package/dist/inbound-mail-foundation/handlers/account-address.d.ts +16 -0
  111. package/dist/inbound-mail-foundation/handlers/account-address.js +51 -0
  112. package/dist/inbound-mail-foundation/handlers/acknowledge-quarantine.write.d.ts +8 -0
  113. package/dist/inbound-mail-foundation/handlers/acknowledge-quarantine.write.js +39 -0
  114. package/dist/inbound-mail-foundation/handlers/attach-message-content.write.d.ts +60 -0
  115. package/dist/inbound-mail-foundation/handlers/attach-message-content.write.js +128 -0
  116. package/dist/inbound-mail-foundation/handlers/connect-account.write.d.ts +3 -2
  117. package/dist/inbound-mail-foundation/handlers/connect-account.write.js +96 -55
  118. package/dist/inbound-mail-foundation/handlers/disconnect-account.write.d.ts +2 -1
  119. package/dist/inbound-mail-foundation/handlers/disconnect-account.write.js +55 -42
  120. package/dist/inbound-mail-foundation/handlers/ingest-message-prepare.d.ts +26 -0
  121. package/dist/inbound-mail-foundation/handlers/ingest-message-prepare.js +131 -0
  122. package/dist/inbound-mail-foundation/handlers/ingest-message-schema.d.ts +64 -0
  123. package/dist/inbound-mail-foundation/handlers/ingest-message-schema.js +39 -0
  124. package/dist/inbound-mail-foundation/handlers/ingest-message.write.d.ts +74 -21
  125. package/dist/inbound-mail-foundation/handlers/ingest-message.write.js +57 -134
  126. package/dist/inbound-mail-foundation/handlers/list-accounts.query.d.ts +2 -1
  127. package/dist/inbound-mail-foundation/handlers/list-accounts.query.js +60 -26
  128. package/dist/inbound-mail-foundation/handlers/list-messages.query.d.ts +2 -1
  129. package/dist/inbound-mail-foundation/handlers/list-messages.query.js +43 -29
  130. package/dist/inbound-mail-foundation/handlers/list-quarantine.query.d.ts +3 -0
  131. package/dist/inbound-mail-foundation/handlers/list-quarantine.query.js +75 -0
  132. package/dist/inbound-mail-foundation/handlers/mark-credential-stored.write.d.ts +7 -0
  133. package/dist/inbound-mail-foundation/handlers/mark-credential-stored.write.js +38 -0
  134. package/dist/inbound-mail-foundation/handlers/message-content.d.ts +70 -0
  135. package/dist/inbound-mail-foundation/handlers/message-content.js +137 -0
  136. package/dist/inbound-mail-foundation/handlers/message-content.query.d.ts +19 -0
  137. package/dist/inbound-mail-foundation/handlers/message-content.query.js +59 -0
  138. package/dist/inbound-mail-foundation/handlers/message-detail.query.d.ts +3 -0
  139. package/dist/inbound-mail-foundation/handlers/message-detail.query.js +23 -0
  140. package/dist/inbound-mail-foundation/handlers/reactivate-account.write.d.ts +8 -0
  141. package/dist/inbound-mail-foundation/handlers/reactivate-account.write.js +84 -0
  142. package/dist/inbound-mail-foundation/handlers/retry-quarantined-message.write.d.ts +8 -0
  143. package/dist/inbound-mail-foundation/handlers/retry-quarantined-message.write.js +34 -0
  144. package/dist/inbound-mail-foundation/handlers/scope-visibility.d.ts +10 -2
  145. package/dist/inbound-mail-foundation/handlers/scope-visibility.js +27 -8
  146. package/dist/inbound-mail-foundation/handlers/set-trusted-authserv-id.write.d.ts +13 -0
  147. package/dist/inbound-mail-foundation/handlers/set-trusted-authserv-id.write.js +54 -0
  148. package/dist/inbound-mail-foundation/handlers/thread-rollup.d.ts +24 -0
  149. package/dist/inbound-mail-foundation/handlers/thread-rollup.js +98 -0
  150. package/dist/inbound-mail-foundation/handlers/trusted-authserv-id.d.ts +3 -0
  151. package/dist/inbound-mail-foundation/handlers/trusted-authserv-id.js +3 -0
  152. package/dist/inbound-mail-foundation/handlers/update-account.write.d.ts +13 -3
  153. package/dist/inbound-mail-foundation/handlers/update-account.write.js +61 -45
  154. package/dist/inbound-mail-foundation/i18n.js +72 -3
  155. package/dist/inbound-mail-foundation/inbound-oauth-flow.d.ts +43 -0
  156. package/dist/inbound-mail-foundation/inbound-oauth-flow.js +1 -0
  157. package/dist/inbound-mail-foundation/index.d.ts +19 -6
  158. package/dist/inbound-mail-foundation/index.js +17 -6
  159. package/dist/inbound-mail-foundation/ingest-failures.d.ts +77 -0
  160. package/dist/inbound-mail-foundation/ingest-failures.js +79 -0
  161. package/dist/inbound-mail-foundation/ingest-payload.d.ts +7 -0
  162. package/dist/inbound-mail-foundation/ingest-payload.js +34 -0
  163. package/dist/inbound-mail-foundation/mail-roles.d.ts +21 -0
  164. package/dist/inbound-mail-foundation/mail-roles.js +83 -0
  165. package/dist/inbound-mail-foundation/normalize-inbound-message.d.ts +17 -0
  166. package/dist/inbound-mail-foundation/normalize-inbound-message.js +90 -0
  167. package/dist/inbound-mail-foundation/oauth-access-token.d.ts +3 -1
  168. package/dist/inbound-mail-foundation/oauth-access-token.js +13 -2
  169. package/dist/inbound-mail-foundation/outbound-attachment-access.d.ts +5 -0
  170. package/dist/inbound-mail-foundation/outbound-attachment-access.js +16 -0
  171. package/dist/inbound-mail-foundation/outbound-attachments.d.ts +18 -0
  172. package/dist/inbound-mail-foundation/outbound-attachments.js +77 -0
  173. package/dist/inbound-mail-foundation/outbound-mail.d.ts +15 -1
  174. package/dist/inbound-mail-foundation/outbound-mail.js +4 -0
  175. package/dist/inbound-mail-foundation/probe.js +1 -1
  176. package/dist/inbound-mail-foundation/projection.d.ts +28 -0
  177. package/dist/inbound-mail-foundation/projection.js +25 -3
  178. package/dist/inbound-mail-foundation/provider-errors.d.ts +28 -0
  179. package/dist/inbound-mail-foundation/provider-errors.js +66 -0
  180. package/dist/inbound-mail-foundation/quarantine-entities.d.ts +61 -0
  181. package/dist/inbound-mail-foundation/quarantine-entities.js +47 -0
  182. package/dist/inbound-mail-foundation/quarantine-header-import.d.ts +9 -0
  183. package/dist/inbound-mail-foundation/quarantine-header-import.js +53 -0
  184. package/dist/inbound-mail-foundation/quarantine-retry.d.ts +13 -0
  185. package/dist/inbound-mail-foundation/quarantine-retry.js +97 -0
  186. package/dist/inbound-mail-foundation/quarantine-screens.d.ts +4 -0
  187. package/dist/inbound-mail-foundation/quarantine-screens.js +57 -0
  188. package/dist/inbound-mail-foundation/quarantine.d.ts +13 -0
  189. package/dist/inbound-mail-foundation/quarantine.js +46 -0
  190. package/dist/inbound-mail-foundation/retention-job.d.ts +2 -0
  191. package/dist/inbound-mail-foundation/retention-job.js +62 -0
  192. package/dist/inbound-mail-foundation/retention-sweep.d.ts +4 -0
  193. package/dist/inbound-mail-foundation/retention-sweep.js +35 -8
  194. package/dist/inbound-mail-foundation/screens.d.ts +13 -2
  195. package/dist/inbound-mail-foundation/screens.js +216 -89
  196. package/dist/inbound-mail-foundation/send-from-account.d.ts +11 -1
  197. package/dist/inbound-mail-foundation/send-from-account.js +19 -2
  198. package/dist/inbound-mail-foundation/sender-auth.d.ts +63 -0
  199. package/dist/inbound-mail-foundation/sender-auth.js +198 -0
  200. package/dist/inbound-mail-foundation/supervisor-ingest.d.ts +43 -0
  201. package/dist/inbound-mail-foundation/supervisor-ingest.js +195 -0
  202. package/dist/inbound-mail-foundation/sync-account-now.d.ts +22 -0
  203. package/dist/inbound-mail-foundation/sync-account-now.js +29 -0
  204. package/dist/inbound-mail-foundation/sync-cursor-store.d.ts +9 -0
  205. package/dist/inbound-mail-foundation/sync-cursor-store.js +54 -0
  206. package/dist/inbound-mail-foundation/syncable-accounts.d.ts +16 -0
  207. package/dist/inbound-mail-foundation/syncable-accounts.js +79 -0
  208. package/dist/inbound-mail-foundation/tenant-destroy-hook.js +5 -1
  209. package/dist/inbound-mail-foundation/types.d.ts +61 -62
  210. package/dist/inbound-mail-foundation/types.js +0 -54
  211. package/dist/inbound-mail-foundation/wake-consumer.d.ts +2 -0
  212. package/dist/inbound-mail-foundation/wake-consumer.js +30 -0
  213. package/dist/inbound-mail-foundation/watch-catch-up.d.ts +19 -0
  214. package/dist/inbound-mail-foundation/watch-catch-up.js +33 -0
  215. package/dist/inbound-mail-foundation/watch-lease.d.ts +15 -0
  216. package/dist/inbound-mail-foundation/watch-lease.js +81 -0
  217. package/dist/inbound-mail-foundation/watch-supervisor-types.d.ts +83 -0
  218. package/dist/inbound-mail-foundation/watch-supervisor-types.js +1 -0
  219. package/dist/inbound-mail-foundation/watch-supervisor.d.ts +1 -53
  220. package/dist/inbound-mail-foundation/watch-supervisor.js +123 -290
  221. package/dist/inbound-mail-foundation/web/client-plugin.d.ts +14 -0
  222. package/dist/inbound-mail-foundation/web/client-plugin.js +40 -0
  223. package/dist/inbound-mail-foundation/web/constants.d.ts +5 -0
  224. package/dist/inbound-mail-foundation/web/constants.js +6 -0
  225. package/dist/inbound-mail-foundation/web/index.d.ts +1 -0
  226. package/dist/inbound-mail-foundation/web/index.js +1 -0
  227. package/dist/inbound-provider-imap/connect-mailbox.d.ts +21 -3
  228. package/dist/inbound-provider-imap/connect-mailbox.js +69 -20
  229. package/dist/inbound-provider-imap/connect-my-mailbox.d.ts +13 -0
  230. package/dist/inbound-provider-imap/connect-my-mailbox.js +25 -0
  231. package/dist/inbound-provider-imap/constants.d.ts +2 -1
  232. package/dist/inbound-provider-imap/constants.js +2 -1
  233. package/dist/inbound-provider-imap/credential-document.js +2 -2
  234. package/dist/inbound-provider-imap/download-batch.d.ts +6 -0
  235. package/dist/inbound-provider-imap/download-batch.js +24 -0
  236. package/dist/inbound-provider-imap/feature.d.ts +2 -2
  237. package/dist/inbound-provider-imap/feature.js +40 -117
  238. package/dist/inbound-provider-imap/fetch-content.d.ts +4 -0
  239. package/dist/inbound-provider-imap/fetch-content.js +68 -0
  240. package/dist/inbound-provider-imap/i18n.js +8 -1
  241. package/dist/inbound-provider-imap/imap-client.d.ts +27 -23
  242. package/dist/inbound-provider-imap/imap-client.js +30 -68
  243. package/dist/inbound-provider-imap/index.d.ts +2 -1
  244. package/dist/inbound-provider-imap/index.js +2 -1
  245. package/dist/inbound-provider-imap/mime-content.d.ts +11 -0
  246. package/dist/inbound-provider-imap/mime-content.js +66 -0
  247. package/dist/inbound-provider-imap/parse-message.d.ts +35 -0
  248. package/dist/inbound-provider-imap/parse-message.js +113 -0
  249. package/dist/inbound-provider-imap/reconnect-account.d.ts +2 -0
  250. package/dist/inbound-provider-imap/reconnect-account.js +4 -6
  251. package/dist/inbound-provider-imap/reconnect-mailbox.d.ts +4 -2
  252. package/dist/inbound-provider-imap/reconnect-mailbox.js +35 -12
  253. package/dist/inbound-provider-imap/reconnect-prefill.query.d.ts +2 -1
  254. package/dist/inbound-provider-imap/reconnect-prefill.query.js +11 -8
  255. package/dist/inbound-provider-imap/screens.d.ts +6 -2
  256. package/dist/inbound-provider-imap/screens.js +171 -109
  257. package/dist/inbound-provider-imap/send-mail.d.ts +2 -2
  258. package/dist/inbound-provider-imap/send-mail.js +8 -1
  259. package/dist/inbound-provider-imap/sender-auth-headers.d.ts +3 -0
  260. package/dist/inbound-provider-imap/sender-auth-headers.js +18 -0
  261. package/dist/inbound-provider-imap/watch-mailbox.d.ts +5 -0
  262. package/dist/inbound-provider-imap/watch-mailbox.js +92 -0
  263. package/dist/inbound-provider-inmemory/feature.d.ts +15 -0
  264. package/dist/inbound-provider-inmemory/feature.js +57 -2
  265. package/dist/inbound-provider-inmemory/index.d.ts +1 -1
  266. package/dist/inbound-provider-inmemory/index.js +1 -1
  267. package/dist/jobs/handlers/consumer.write.d.ts +4 -4
  268. package/dist/jobs/handlers/retry.write.d.ts +1 -1
  269. package/dist/jobs/handlers/trigger.write.d.ts +1 -1
  270. package/dist/managed-pages/constants.d.ts +1 -0
  271. package/dist/managed-pages/constants.js +1 -0
  272. package/dist/managed-pages/feature.js +5 -3
  273. package/dist/managed-pages/handlers/by-slug.query.d.ts +1 -0
  274. package/dist/managed-pages/handlers/by-slug.query.js +2 -0
  275. package/dist/managed-pages/handlers/page-body-guard.d.ts +2 -0
  276. package/dist/managed-pages/handlers/page-body-guard.js +46 -0
  277. package/dist/managed-pages/handlers/page-body-issues.d.ts +10 -0
  278. package/dist/managed-pages/handlers/page-body-issues.js +21 -0
  279. package/dist/managed-pages/handlers/page-crud.js +5 -4
  280. package/dist/managed-pages/handlers/set.write.d.ts +5 -1
  281. package/dist/managed-pages/handlers/set.write.js +16 -4
  282. package/dist/managed-pages/render-page-body.d.ts +10 -0
  283. package/dist/managed-pages/render-page-body.js +19 -0
  284. package/dist/managed-pages/screens/page-screens.js +6 -2
  285. package/dist/managed-pages/seeding.d.ts +2 -0
  286. package/dist/managed-pages/seeding.js +12 -2
  287. package/dist/managed-pages/table.d.ts +46 -0
  288. package/dist/managed-pages/table.js +5 -3
  289. package/dist/managed-pages/web/client-plugin.js +6 -4
  290. package/dist/managed-pages/web/constants.d.ts +5 -0
  291. package/dist/managed-pages/web/constants.js +9 -0
  292. package/dist/managed-pages/web/i18n.js +13 -0
  293. package/dist/managed-pages/web/lossy-markdown.d.ts +3 -0
  294. package/dist/managed-pages/web/lossy-markdown.js +59 -0
  295. package/dist/managed-pages/web/markdown-to-document.d.ts +1 -0
  296. package/dist/managed-pages/web/markdown-to-document.js +26 -0
  297. package/dist/managed-pages/web/page-body-section.d.ts +3 -0
  298. package/dist/managed-pages/web/page-body-section.js +41 -0
  299. package/dist/personal-access-tokens/handlers/create.write.d.ts +1 -1
  300. package/dist/personal-access-tokens/handlers/revoke.write.d.ts +1 -1
  301. package/dist/readiness/handlers/run-probes.write.d.ts +1 -1
  302. package/dist/secrets/handlers/delete.write.d.ts +1 -1
  303. package/dist/secrets/handlers/set.write.d.ts +1 -1
  304. package/dist/sessions/handlers/revoke-all-for-user.write.d.ts +1 -1
  305. package/dist/sessions/handlers/revoke-all-others.write.d.ts +1 -1
  306. package/dist/sessions/handlers/revoke.write.d.ts +1 -1
  307. package/dist/subscription-paddle/checkout-config.query.d.ts +3 -0
  308. package/dist/subscription-paddle/checkout-config.query.js +14 -0
  309. package/dist/subscription-paddle/checkout-methods.d.ts +6 -0
  310. package/dist/subscription-paddle/checkout-methods.js +85 -0
  311. package/dist/subscription-paddle/checkout-page.d.ts +19 -0
  312. package/dist/subscription-paddle/checkout-page.js +126 -0
  313. package/dist/subscription-paddle/client.d.ts +24 -0
  314. package/dist/subscription-paddle/client.js +60 -0
  315. package/dist/subscription-paddle/constants.d.ts +16 -0
  316. package/dist/subscription-paddle/constants.js +25 -0
  317. package/dist/subscription-paddle/feature.d.ts +49 -0
  318. package/dist/subscription-paddle/feature.js +192 -0
  319. package/dist/subscription-paddle/index.d.ts +2 -0
  320. package/dist/subscription-paddle/index.js +4 -0
  321. package/dist/subscription-paddle/plan-switch-methods.d.ts +6 -0
  322. package/dist/subscription-paddle/plan-switch-methods.js +114 -0
  323. package/dist/subscription-paddle/price-methods.d.ts +15 -0
  324. package/dist/subscription-paddle/price-methods.js +105 -0
  325. package/dist/subscription-paddle/runtime.d.ts +42 -0
  326. package/dist/subscription-paddle/runtime.js +109 -0
  327. package/dist/subscription-paddle/subscription-state.d.ts +34 -0
  328. package/dist/subscription-paddle/subscription-state.js +48 -0
  329. package/dist/subscription-paddle/tenant-binding.d.ts +8 -0
  330. package/dist/subscription-paddle/tenant-binding.js +26 -0
  331. package/dist/subscription-paddle/verify-webhook.d.ts +4 -0
  332. package/dist/subscription-paddle/verify-webhook.js +55 -0
  333. package/dist/subscription-paddle/webhook-events.d.ts +9 -0
  334. package/dist/subscription-paddle/webhook-events.js +124 -0
  335. package/dist/template-resolver/document-sanitizer.d.ts +6 -2
  336. package/dist/template-resolver/document-sanitizer.js +5 -4
  337. package/dist/template-resolver/feature.js +12 -1
  338. package/dist/template-resolver/handlers/collection-item.query.js +2 -2
  339. package/dist/template-resolver/handlers/collection-list.query.js +4 -2
  340. package/dist/template-resolver/handlers/collection-set.write.d.ts +2 -7
  341. package/dist/template-resolver/handlers/collection-set.write.js +21 -6
  342. package/dist/template-resolver/handlers/collection-shared.d.ts +13 -0
  343. package/dist/template-resolver/handlers/collection-shared.js +21 -0
  344. package/dist/template-resolver/handlers/copy-locale.write.d.ts +1 -1
  345. package/dist/template-resolver/handlers/discard-draft.write.d.ts +2 -2
  346. package/dist/template-resolver/handlers/import-bundle-system.write.d.ts +1 -1
  347. package/dist/template-resolver/handlers/import-bundle.write.d.ts +1 -1
  348. package/dist/template-resolver/handlers/patch-draft.write.d.ts +1 -1
  349. package/dist/template-resolver/handlers/reset-to-system.write.d.ts +1 -1
  350. package/dist/template-resolver/handlers/resource-link-pdf.write.d.ts +1 -1
  351. package/dist/template-resolver/handlers/resource-remove.write.d.ts +1 -1
  352. package/dist/template-resolver/handlers/resource-upload.write.d.ts +1 -1
  353. package/dist/template-resolver/handlers/send-test.write.d.ts +1 -1
  354. package/dist/template-resolver/handlers/set.write.d.ts +1 -1
  355. package/dist/template-resolver/handlers/set.write.js +1 -0
  356. package/dist/template-resolver/handlers/shared.js +3 -3
  357. package/dist/template-resolver/handlers/toggle-status.write.d.ts +4 -4
  358. package/dist/template-resolver/handlers/upsert-system.write.d.ts +1 -1
  359. package/dist/template-resolver/handlers/upsert-tenant.write.d.ts +1 -1
  360. package/dist/template-resolver/web/client-plugin.d.ts +0 -11
  361. package/dist/template-resolver/web/client-plugin.js +13 -286
  362. package/dist/template-resolver/web/collection-entry-create-form.d.ts +11 -0
  363. package/dist/template-resolver/web/collection-entry-create-form.js +31 -0
  364. package/dist/template-resolver/web/collection-lookup.d.ts +4 -0
  365. package/dist/template-resolver/web/collection-lookup.js +24 -0
  366. package/dist/template-resolver/web/constants.d.ts +2 -0
  367. package/dist/template-resolver/web/constants.js +2 -0
  368. package/dist/template-resolver/web/content-field.d.ts +9 -0
  369. package/dist/template-resolver/web/content-field.js +14 -0
  370. package/dist/template-resolver/web/content-tree-provider.d.ts +14 -0
  371. package/dist/template-resolver/web/content-tree-provider.js +197 -0
  372. package/dist/template-resolver/web/document-reference-name.d.ts +1 -0
  373. package/dist/template-resolver/web/document-reference-name.js +9 -0
  374. package/dist/template-resolver/web/document-schema.d.ts +2 -1
  375. package/dist/template-resolver/web/document-schema.js +2 -8
  376. package/dist/template-resolver/web/i18n.js +7 -1
  377. package/dist/template-resolver/web/legacy-variable-text.d.ts +1 -0
  378. package/dist/template-resolver/web/legacy-variable-text.js +23 -0
  379. package/dist/template-resolver/web/tenant-override.d.ts +3 -0
  380. package/dist/template-resolver/web/tenant-override.js +4 -0
  381. package/dist/template-resolver/web/text-block-editor.d.ts +6 -0
  382. package/dist/template-resolver/web/text-block-editor.js +22 -0
  383. package/dist/template-resolver/web/use-collection-editor-context.d.ts +14 -0
  384. package/dist/template-resolver/web/use-collection-editor-context.js +21 -0
  385. package/dist/template-resolver/web/use-collection-entry-create.d.ts +18 -0
  386. package/dist/template-resolver/web/use-collection-entry-create.js +78 -0
  387. package/dist/template-resolver/web/use-content-write.d.ts +17 -0
  388. package/dist/template-resolver/web/use-content-write.js +54 -0
  389. package/dist/template-resolver/web/use-text-block-editor.d.ts +19 -0
  390. package/dist/template-resolver/web/use-text-block-editor.js +85 -0
  391. package/dist/tenant/handlers/add-member.write.d.ts +1 -1
  392. package/dist/tenant/handlers/cancel-invitation.write.d.ts +1 -1
  393. package/dist/tenant/handlers/create.write.d.ts +1 -1
  394. package/dist/tenant/handlers/remove-member.write.d.ts +1 -1
  395. package/dist/tenant/handlers/toggle-enabled.write.d.ts +2 -2
  396. package/dist/tenant/handlers/update-member-roles.write.d.ts +1 -1
  397. package/dist/tenant/handlers/update.write.d.ts +1 -1
  398. package/dist/tenant-handover/handlers/claim.write.d.ts +1 -1
  399. package/dist/tenant-lifecycle/handlers/cancel-destruction.write.d.ts +1 -1
  400. package/dist/tenant-lifecycle/handlers/request-destruction.write.d.ts +1 -1
  401. package/dist/tier-engine/feature.js +9 -1
  402. package/dist/tier-engine/handlers/set-tenant-tier.write.d.ts +1 -1
  403. package/dist/user/handlers/create.write.d.ts +1 -1
  404. package/dist/user/handlers/update.write.d.ts +1 -1
  405. package/dist/user-data-rights/handlers/cancel-deletion.write.d.ts +1 -1
  406. package/dist/user-data-rights/handlers/confirm-deletion-by-token.write.d.ts +1 -1
  407. package/dist/user-data-rights/handlers/lift-restriction.write.d.ts +1 -1
  408. package/dist/user-data-rights/handlers/request-deletion-by-email.write.d.ts +1 -1
  409. package/dist/user-data-rights/handlers/request-deletion.write.d.ts +1 -1
  410. package/dist/user-data-rights/handlers/request-export.write.d.ts +1 -1
  411. package/dist/user-data-rights/handlers/restrict-account.write.d.ts +1 -1
  412. package/dist/user-data-rights/handlers/run-forget-cleanup.write.d.ts +1 -1
  413. package/dist/user-data-rights-defaults/hooks/file-ref.userdata-hook.js +2 -1
  414. package/dist/user-profile/handlers/change-email.write.d.ts +1 -1
  415. package/dist/waitlist/handlers/export-purge.write.d.ts +2 -2
  416. package/dist/waitlist/handlers/invite.write.d.ts +1 -1
  417. package/dist/waitlist/handlers/reject.write.d.ts +1 -1
  418. package/dist/waitlist/handlers/submit.write.d.ts +1 -1
  419. package/package.json +33 -17
  420. package/src/account-security/changes.json +6 -0
  421. package/src/auth-email-password/changes.json +6 -0
  422. package/src/billing-foundation/changes.json +30 -0
  423. package/src/cap-overview/changes.json +6 -0
  424. package/src/files/changes.json +18 -0
  425. package/src/inbound-mail-foundation/changes.json +143 -0
  426. package/src/inbound-provider-imap/changes.json +36 -0
  427. package/src/jobs/changes.json +18 -0
  428. package/src/managed-pages/changes.json +7 -0
  429. package/src/subscription-paddle/changes.json +15 -0
  430. package/src/template-resolver/changes.json +20 -0
  431. package/src/tier-engine/changes.json +6 -0
  432. package/dist/subscription-dodo/client.d.ts +0 -17
  433. package/dist/subscription-dodo/client.js +0 -31
  434. package/dist/subscription-dodo/constants.d.ts +0 -12
  435. package/dist/subscription-dodo/constants.js +0 -19
  436. package/dist/subscription-dodo/feature.d.ts +0 -37
  437. package/dist/subscription-dodo/feature.js +0 -144
  438. package/dist/subscription-dodo/index.d.ts +0 -2
  439. package/dist/subscription-dodo/index.js +0 -4
  440. package/dist/subscription-dodo/plugin-methods.d.ts +0 -23
  441. package/dist/subscription-dodo/plugin-methods.js +0 -260
  442. package/dist/subscription-dodo/runtime.d.ts +0 -27
  443. package/dist/subscription-dodo/runtime.js +0 -89
  444. package/dist/subscription-dodo/verify-webhook.d.ts +0 -37
  445. package/dist/subscription-dodo/verify-webhook.js +0 -189
  446. package/src/subscription-dodo/changes.json +0 -14
@@ -1,7 +1,9 @@
1
1
  import { type AccessRule, type FeatureDefinition } from "@cosmicdrift/kumiko-framework/engine";
2
+ import type { NavIconKey } from "@cosmicdrift/kumiko-types/nav-icon";
2
3
  export interface AccountSecurityNavOptions {
3
4
  readonly order?: number;
4
5
  readonly parent?: string;
6
+ readonly icon?: NavIconKey;
5
7
  }
6
8
  export interface AccountSecurityFeatureOptions {
7
9
  readonly access?: AccessRule;
@@ -7,6 +7,7 @@ const DEFAULT_ACCESS = {
7
7
  openToAll: { reason: "signed-in users manage their own account security" },
8
8
  };
9
9
  const DEFAULT_NAV_ORDER = 90;
10
+ const DEFAULT_NAV_ICON = "user";
10
11
  export const accountSecurityMfaStatusVisibility = {
11
12
  query: AuthMfaQueries.status,
12
13
  field: "enabled",
@@ -49,10 +50,11 @@ export function createAccountSecurityFeature(options = {}) {
49
50
  // Explicit property assignments: the feature-AST parser reads neither
50
51
  // `??`, shorthand properties nor a conditional spread, and the boot validator treats
51
52
  // `parent: undefined` as a top-level entry.
52
- const { order: navOrder = DEFAULT_NAV_ORDER, parent: navParent } = nav;
53
+ const { order: navOrder = DEFAULT_NAV_ORDER, parent: navParent, icon: navIcon = DEFAULT_NAV_ICON, } = nav;
53
54
  r.nav({
54
55
  id: ACCOUNT_SECURITY_SCREEN_ID,
55
56
  label: ACCOUNT_SECURITY_NAV_LABEL,
57
+ icon: navIcon,
56
58
  screen: ACCOUNT_SECURITY_SCREEN_QN,
57
59
  order: navOrder,
58
60
  parent: navParent,
@@ -12,6 +12,7 @@ export const AUDIT_EVENT_STANCES = {
12
12
  "cap-counter:event:rolling-incremented": TECHNICAL_EVENT,
13
13
  "cap-counter:event:rolling-released": TECHNICAL_EVENT,
14
14
  "inbound-mail-foundation:event:inbound-message-received": TECHNICAL_EVENT,
15
+ "inbound-mail-foundation:event:inbound-message-content-fetched": TECHNICAL_EVENT,
15
16
  "inbound-mail-foundation:event:mail-thread-updated": TECHNICAL_EVENT,
16
17
  "document-ingest-foundation:event:document-ingest-requested": TECHNICAL_EVENT,
17
18
  "document-ingest-foundation:event:document-ingest-skipped": TECHNICAL_EVENT,
@@ -4,4 +4,4 @@ export declare const changePasswordWrite: import("@cosmicdrift/kumiko-types/defi
4
4
  newPassword: z.ZodString;
5
5
  }, z.core.$strip>, {
6
6
  kind: string;
7
- }, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
7
+ }, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
@@ -6,4 +6,4 @@ export declare function createConfirmAccountUnlockHandler(opts: ConfirmAccountUn
6
6
  token: z.ZodString;
7
7
  }, z.core.$strip>, {
8
8
  kind: "account-unlocked";
9
- }, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
9
+ }, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
@@ -18,4 +18,4 @@ export declare function createInviteAcceptWithLoginHandler(opts?: InviteAcceptWi
18
18
  token: z.ZodString;
19
19
  email: z.ZodEmail;
20
20
  password: z.ZodString;
21
- }, z.core.$strip>, InviteAcceptWithLoginData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
21
+ }, z.core.$strip>, InviteAcceptWithLoginData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
@@ -8,4 +8,4 @@ export type InviteAcceptData = {
8
8
  };
9
9
  export declare function createInviteAcceptHandler(): import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<"invite-accept", z.ZodObject<{
10
10
  token: z.ZodString;
11
- }, z.core.$strip>, InviteAcceptData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
11
+ }, z.core.$strip>, InviteAcceptData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
@@ -32,7 +32,7 @@ export type InviteCreateOptions = {
32
32
  export declare function createInviteCreateHandler(opts: InviteCreateOptions): import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<"invite-create", z.ZodObject<{
33
33
  email: z.ZodEmail;
34
34
  role: z.ZodString;
35
- }, z.core.$strip>, InviteCreateData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
35
+ }, z.core.$strip>, InviteCreateData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
36
36
  export declare function createSystemInviteCreateHandler(opts: InviteCreateOptions): import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<"system-invite-create", z.ZodObject<{
37
37
  email: z.ZodEmail;
38
38
  role: z.ZodString;
@@ -40,4 +40,4 @@ export declare function createSystemInviteCreateHandler(opts: InviteCreateOption
40
40
  SystemAdmin: "SystemAdmin";
41
41
  }>>>;
42
42
  locale: z.ZodOptional<z.ZodString>;
43
- }, z.core.$strip>, InviteCreateData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
43
+ }, z.core.$strip>, InviteCreateData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
@@ -13,4 +13,4 @@ export type InviteSignupCompleteOptions = Pick<LoginHandlerOptions, "mfaStatusCh
13
13
  export declare function createInviteSignupCompleteHandler(opts?: InviteSignupCompleteOptions): import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<"invite-signup-complete", z.ZodObject<{
14
14
  token: z.ZodString;
15
15
  password: z.ZodString;
16
- }, z.core.$strip>, InviteSignupCompleteData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
16
+ }, z.core.$strip>, InviteSignupCompleteData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
@@ -75,5 +75,5 @@ export declare function gateBuildSession(ctx: HandlerContext, userId: string, te
75
75
  export declare function createLoginHandler(opts?: LoginHandlerOptions): import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<"login", z.ZodObject<{
76
76
  email: z.ZodEmail;
77
77
  password: z.ZodString;
78
- }, z.core.$strip>, LoginResult, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
78
+ }, z.core.$strip>, LoginResult, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
79
79
  export {};
@@ -1,2 +1,2 @@
1
1
  import * as z from "zod";
2
- export declare const logoutWrite: import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<"logout", z.ZodObject<{}, z.core.$strip>, unknown, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
2
+ export declare const logoutWrite: import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<"logout", z.ZodObject<{}, z.core.$strip>, unknown, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
@@ -4,4 +4,4 @@ export type RequestUnlockData = TokenRequestData<"unlock-requested">;
4
4
  export declare function createRequestAccountUnlockHandler(opts: RequestAccountUnlockOptions): import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<"request-account-unlock", import("zod").ZodObject<{
5
5
  email: import("zod").ZodEmail;
6
6
  returnTo: import("zod").ZodCatch<import("zod").ZodOptional<import("zod").ZodString>>;
7
- }, import("zod/v4/core").$strip>, TokenRequestData<"unlock-requested">, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
7
+ }, import("zod/v4/core").$strip>, TokenRequestData<"unlock-requested">, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
@@ -4,4 +4,4 @@ export type RequestVerificationData = TokenRequestData<"verification-requested">
4
4
  export declare function createRequestEmailVerificationHandler(opts: RequestEmailVerificationOptions): import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<"request-email-verification", import("zod").ZodObject<{
5
5
  email: import("zod").ZodEmail;
6
6
  returnTo: import("zod").ZodCatch<import("zod").ZodOptional<import("zod").ZodString>>;
7
- }, import("zod/v4/core").$strip>, TokenRequestData<"verification-requested">, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
7
+ }, import("zod/v4/core").$strip>, TokenRequestData<"verification-requested">, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
@@ -4,4 +4,4 @@ export type RequestResetData = TokenRequestData<"reset-requested">;
4
4
  export declare function createRequestPasswordResetHandler(opts: RequestPasswordResetOptions): import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<"request-password-reset", import("zod").ZodObject<{
5
5
  email: import("zod").ZodEmail;
6
6
  returnTo: import("zod").ZodCatch<import("zod").ZodOptional<import("zod").ZodString>>;
7
- }, import("zod/v4/core").$strip>, TokenRequestData<"reset-requested">, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
7
+ }, import("zod/v4/core").$strip>, TokenRequestData<"reset-requested">, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
@@ -7,4 +7,4 @@ export declare function createResetPasswordHandler(opts: ResetPasswordOptions):
7
7
  newPassword: z.ZodString;
8
8
  }, z.core.$strip>, {
9
9
  kind: "password-reset";
10
- }, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
10
+ }, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
@@ -27,5 +27,5 @@ type ClaimedHandover = {
27
27
  export declare function createSignupConfirmHandler(opts?: SignupConfirmOptions): import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<"signup-confirm", z.ZodObject<{
28
28
  token: z.ZodString;
29
29
  password: z.ZodString;
30
- }, z.core.$strip>, SignupConfirmData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
30
+ }, z.core.$strip>, SignupConfirmData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
31
31
  export {};
@@ -30,4 +30,4 @@ export declare function createSignupRequestHandler(opts: SignupRequestOptions):
30
30
  token: z.ZodString;
31
31
  }, z.core.$strip>>;
32
32
  returnTo: z.ZodCatch<z.ZodOptional<z.ZodString>>;
33
- }, z.core.$strip>, SignupRequestData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
33
+ }, z.core.$strip>, SignupRequestData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
@@ -7,4 +7,4 @@ export type SwitchTenantMfaGateData = {
7
7
  export declare function createSwitchTenantMfaGateHandler(opts: Pick<LoginHandlerOptions, "mfaStatusChecker">): import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<"switch-tenant-mfa-gate", z.ZodObject<{
8
8
  userId: z.ZodString;
9
9
  tenantId: z.ZodString;
10
- }, z.core.$strip>, SwitchTenantMfaGateData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
10
+ }, z.core.$strip>, SwitchTenantMfaGateData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
@@ -43,4 +43,4 @@ export type TokenRequestOptions = {
43
43
  export declare function createTokenRequestHandler<TName extends string, TSuccessKind extends string>(spec: TokenRequestSpec<TName, TSuccessKind>, opts: TokenRequestOptions): import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<TName, z.ZodObject<{
44
44
  email: z.ZodEmail;
45
45
  returnTo: z.ZodCatch<z.ZodOptional<z.ZodString>>;
46
- }, z.core.$strip>, TokenRequestData<TSuccessKind>, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
46
+ }, z.core.$strip>, TokenRequestData<TSuccessKind>, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
@@ -9,4 +9,4 @@ export type VerifyEmailData = {
9
9
  };
10
10
  export declare function createVerifyEmailHandler(opts: VerifyEmailOptions): import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<"verify-email", z.ZodObject<{
11
11
  token: z.ZodString;
12
- }, z.core.$strip>, VerifyEmailData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
12
+ }, z.core.$strip>, VerifyEmailData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
@@ -1,3 +1,6 @@
1
+ import { type LoginFailure, parseRetryAfterSeconds } from "./login-failure.ts";
2
+ export type { KnownLoginFailureReason, LoginFailure } from "./login-failure.ts";
3
+ export { parseRetryAfterSeconds };
1
4
  export type TenantSummary = {
2
5
  readonly tenantId: string;
3
6
  readonly roles: readonly string[];
@@ -19,19 +22,12 @@ export type LoginResponse = {
19
22
  };
20
23
  readonly landingPath?: string;
21
24
  };
22
- export type KnownLoginFailureReason = "invalid_credentials" | "no_membership" | "account_locked" | "email_not_verified" | "rate_limited" | "invalid_body" | "mfa_not_supported" | "mfa_setup_required";
23
- export type LoginFailure = {
24
- readonly reason: KnownLoginFailureReason | (string & {});
25
- readonly message?: string;
26
- readonly retryAfterSeconds?: number;
27
- };
28
25
  export declare function csrfHeader(): Record<string, string>;
29
26
  export declare class AuthRequestError extends Error {
30
27
  readonly status: number;
31
28
  readonly retryAfterSeconds: number | undefined;
32
29
  constructor(message: string, status: number, retryAfterSeconds: number | undefined);
33
30
  }
34
- export declare function parseRetryAfterSeconds(header: string | null): number | undefined;
35
31
  export type LoginResult = {
36
32
  readonly kind: "success";
37
33
  readonly data: LoginResponse;
@@ -8,6 +8,8 @@
8
8
  // the cookie and header constants from diverging.
9
9
  import { parseRoles } from "@cosmicdrift/kumiko-framework/utils";
10
10
  import { CSRF_HEADER_NAME, readCsrfToken } from "@cosmicdrift/kumiko-renderer/live";
11
+ import { failureFromErrorField, parseRetryAfterSeconds, } from "./login-failure.js";
12
+ export { parseRetryAfterSeconds };
11
13
  export function csrfHeader() {
12
14
  const token = readCsrfToken();
13
15
  return token !== undefined ? { [CSRF_HEADER_NAME]: token } : {};
@@ -23,14 +25,6 @@ export class AuthRequestError extends Error {
23
25
  this.retryAfterSeconds = retryAfterSeconds;
24
26
  }
25
27
  }
26
- // Only a non-negative integer second count is usable; anything else is treated as absent.
27
- export function parseRetryAfterSeconds(header) {
28
- if (header === null)
29
- return undefined;
30
- if (!/^\d+$/.test(header))
31
- return undefined;
32
- return Number(header);
33
- }
34
28
  export function toLoginResponse(token, user, landingPath) {
35
29
  return typeof landingPath === "string" ? { token, user, landingPath } : { token, user };
36
30
  }
@@ -69,22 +63,7 @@ export async function login(req) {
69
63
  return { kind: "success", data: toLoginResponse(body.token, body.user, body.landingPath) };
70
64
  }
71
65
  }
72
- // The server sends error either as a string ("invalid_body") or as a
73
- // structured object. Extract the most descriptive reason.
74
- const err = body.error;
75
- if (typeof err === "string") {
76
- return { kind: "failure", error: { reason: err } };
77
- }
78
- const reason = err?.details?.reason ?? err?.code ?? "login_failed";
79
- const retry = err?.details?.retryAfterSeconds;
80
- return {
81
- kind: "failure",
82
- error: {
83
- reason,
84
- ...(err?.message !== undefined && { message: err.message }),
85
- ...(retry !== undefined && { retryAfterSeconds: retry }),
86
- },
87
- };
66
+ return { kind: "failure", error: failureFromErrorField(body.error, "login_failed") };
88
67
  }
89
68
  // POST /api/auth/logout. The server revokes the session when
90
69
  // sessionRevoker is wired and clears the cookies. A navigation refresh
@@ -1,5 +1,7 @@
1
1
  import { type ComponentType, type ReactNode } from "react";
2
2
  import { type LoginScreenProps } from "./login-screen.tsx";
3
+ import type { LoginUrlBuilder } from "./login-url.ts";
4
+ export type { LoginUrlBuilder };
3
5
  export type MfaVerifyComponentProps = {
4
6
  readonly challengeToken: string;
5
7
  readonly onSuccess?: (landingPath?: string) => void;
@@ -23,9 +25,6 @@ export type LoginRouteOptions = {
23
25
  readonly onAuthenticated?: () => void;
24
26
  };
25
27
  export declare function createLoginRoute(opts?: LoginRouteOptions): ComponentType<Record<string, never>>;
26
- /** Builds the login page URL. `returnPath` is the current path + query + hash;
27
- * append it as `next` yourself (use `NEXT_QUERY_PARAM`) if the login page should return there. */
28
- export type LoginUrlBuilder = (locale: string, returnPath: string) => string;
29
28
  export type AuthGateOptions = LoginRouteOptions & {
30
29
  /** Login page outside the SPA (root-relative path or http(s) URL), or a function
31
30
  * that builds it per locale. Unauthenticated visitors are sent there with
@@ -50,4 +49,3 @@ export declare function makeAuthGate(opts?: AuthGateOptions): ComponentType<{
50
49
  export declare function makeSessionAuthGate(opts?: SessionAuthGateOptions): ComponentType<{
51
50
  children: ReactNode;
52
51
  }>;
53
- export {};
@@ -1,9 +1,9 @@
1
+ import { appendReturnTo, NEXT_QUERY_PARAM } from "./login-url.ts";
1
2
  import { isSafeReturnPath } from "./return-path.ts";
2
- export declare const NEXT_QUERY_PARAM = "next";
3
+ export { appendReturnTo, NEXT_QUERY_PARAM };
3
4
  export declare const isSafeNextPath: typeof isSafeReturnPath;
4
5
  export declare function readNextFromSearch(search: string): string | null;
5
6
  export declare function readReturnToFromWindow(): string | null;
6
- export declare function appendReturnTo(href: string, returnTo: string | null): string;
7
7
  export declare function readNextFromWindow(): string | null;
8
8
  export declare function assertNavigableUrl(url: string, optionName: string): void;
9
9
  export declare function buildLoginRedirectUrl(loginUrl: string, returnPath: string, currentOrigin: string): string;
@@ -1,8 +1,9 @@
1
1
  // Redirect targets for external login pages. `next` travels through the query
2
2
  // string, so anything read back from it is untrusted: only same-origin
3
3
  // root-relative paths pass (no "//host", no "/\host", no scheme).
4
- import { isSafeReturnPath, RETURN_TO_QUERY_PARAM, readReturnToFromSearch } from "./return-path.js";
5
- export const NEXT_QUERY_PARAM = "next";
4
+ import { appendReturnTo, NEXT_QUERY_PARAM } from "./login-url.js";
5
+ import { isSafeReturnPath, readReturnToFromSearch } from "./return-path.js";
6
+ export { appendReturnTo, NEXT_QUERY_PARAM };
6
7
  export const isSafeNextPath = isSafeReturnPath;
7
8
  export function readNextFromSearch(search) {
8
9
  const candidate = new URLSearchParams(search).get(NEXT_QUERY_PARAM);
@@ -12,16 +13,6 @@ export function readNextFromSearch(search) {
12
13
  export function readReturnToFromWindow() {
13
14
  return typeof window === "undefined" ? null : readReturnToFromSearch(window.location.search);
14
15
  }
15
- // Adds returnTo to an href of a sibling auth page; a missing value leaves the href untouched.
16
- export function appendReturnTo(href, returnTo) {
17
- if (returnTo === null)
18
- return href;
19
- const hashAt = href.indexOf("#");
20
- const base = hashAt === -1 ? href : href.slice(0, hashAt);
21
- const hash = hashAt === -1 ? "" : href.slice(hashAt);
22
- const separator = base.includes("?") ? "&" : "?";
23
- return `${base}${separator}${RETURN_TO_QUERY_PARAM}=${encodeURIComponent(returnTo)}${hash}`;
24
- }
25
16
  // The safe `next` of this page's URL; null on native, where there is no window.
26
17
  export function readNextFromWindow() {
27
18
  return typeof window === "undefined" ? null : readNextFromSearch(window.location.search);
@@ -2,7 +2,7 @@ export type { AuthTokenFailure, CurrentUserProfile, LoginFailure, LoginRequest,
2
2
  export { AuthRequestError, confirmAccountUnlock, confirmSignup, requestAccountUnlock, requestEmailVerification, requestPasswordReset, requestSignup, resetPassword, toLoginResponse, verifyEmail, } from "./auth-client.ts";
3
3
  export type { AuthCardProps, AuthShellRenderer } from "./auth-form-primitives.tsx";
4
4
  export { AuthCard, AuthShellProvider, useAuthShell } from "./auth-form-primitives.tsx";
5
- export type { AuthGateOptions, LoginRouteOptions, MfaSetupComponentProps, MfaVerifyComponentProps, SessionAuthGateOptions, } from "./auth-gate.tsx";
5
+ export type { AuthGateOptions, LoginRouteOptions, LoginUrlBuilder, MfaSetupComponentProps, MfaVerifyComponentProps, SessionAuthGateOptions, } from "./auth-gate.tsx";
6
6
  export { createLoginRoute, makeAuthGate, makeSessionAuthGate } from "./auth-gate.tsx";
7
7
  export { buildLoginRedirectUrl, isSafeNextPath, NEXT_QUERY_PARAM, readNextFromSearch, } from "./auth-redirect.ts";
8
8
  export type { EmailPasswordClientFeature, EmailPasswordClientOptions, } from "./client-plugin.ts";
@@ -16,6 +16,7 @@ export { ForgotPasswordScreen } from "./forgot-password-screen.tsx";
16
16
  export { defaultTranslations, mergeTranslations } from "./i18n.ts";
17
17
  export type { InviteAcceptScreenProps } from "./invite-accept-screen.tsx";
18
18
  export { InviteAcceptScreen } from "./invite-accept-screen.tsx";
19
+ export { failureFromErrorField } from "./login-failure.ts";
19
20
  export type { AuthLegalLink, LoginScreenProps } from "./login-screen.tsx";
20
21
  export { LoginScreen } from "./login-screen.tsx";
21
22
  export type { RequestAccountUnlockScreenProps } from "./request-account-unlock-screen.tsx";
@@ -13,6 +13,7 @@ export { DefaultTopbarActions } from "./default-topbar-actions.js";
13
13
  export { ForgotPasswordScreen } from "./forgot-password-screen.js";
14
14
  export { defaultTranslations, mergeTranslations } from "./i18n.js";
15
15
  export { InviteAcceptScreen } from "./invite-accept-screen.js";
16
+ export { failureFromErrorField } from "./login-failure.js";
16
17
  export { LoginScreen } from "./login-screen.js";
17
18
  export { RequestAccountUnlockScreen } from "./request-account-unlock-screen.js";
18
19
  export { ResetPasswordScreen } from "./reset-password-screen.js";
@@ -0,0 +1,9 @@
1
+ export type KnownLoginFailureReason = "invalid_credentials" | "no_membership" | "account_locked" | "email_not_verified" | "rate_limited" | "invalid_body" | "mfa_not_supported" | "mfa_setup_required";
2
+ export type LoginFailure = {
3
+ readonly reason: KnownLoginFailureReason | (string & {});
4
+ readonly message?: string;
5
+ readonly retryAfterSeconds?: number;
6
+ };
7
+ export declare function parseRetryAfterSeconds(header: string | null): number | undefined;
8
+ export declare function isRecord(value: unknown): value is Record<string, unknown>;
9
+ export declare function failureFromErrorField(error: unknown, fallbackReason: string): LoginFailure;
@@ -0,0 +1,32 @@
1
+ // Pure (no DOM, no renderer): shared by the SPA clients and the static login, which must stay
2
+ // importable from a plain script.
3
+ // Only a non-negative integer second count is usable; anything else is treated as absent.
4
+ export function parseRetryAfterSeconds(header) {
5
+ if (header === null)
6
+ return undefined;
7
+ if (!/^\d+$/.test(header))
8
+ return undefined;
9
+ return Number(header);
10
+ }
11
+ export function isRecord(value) {
12
+ return typeof value === "object" && value !== null && !Array.isArray(value);
13
+ }
14
+ function stringOrUndefined(value) {
15
+ return typeof value === "string" ? value : undefined;
16
+ }
17
+ // The server sends `error` either as a string ("invalid_body") or as a structured object; this
18
+ // extracts the most descriptive reason, falling back to the endpoint's generic one.
19
+ export function failureFromErrorField(error, fallbackReason) {
20
+ if (typeof error === "string")
21
+ return { reason: error };
22
+ const fields = isRecord(error) ? error : {};
23
+ const details = isRecord(fields["details"]) ? fields["details"] : {};
24
+ const reason = stringOrUndefined(details["reason"]) ?? stringOrUndefined(fields["code"]) ?? fallbackReason;
25
+ const message = stringOrUndefined(fields["message"]);
26
+ const retry = details["retryAfterSeconds"];
27
+ return {
28
+ reason,
29
+ ...(message !== undefined && { message }),
30
+ ...(typeof retry === "number" && { retryAfterSeconds: retry }),
31
+ };
32
+ }
@@ -0,0 +1,5 @@
1
+ export declare const NEXT_QUERY_PARAM = "next";
2
+ /** Builds the login page URL. `returnPath` is the current path + query + hash;
3
+ * append it as `next` yourself (use `NEXT_QUERY_PARAM`) if the login page should return there. */
4
+ export type LoginUrlBuilder = (locale: string, returnPath: string) => string;
5
+ export declare function appendReturnTo(href: string, returnTo: string | null): string;
@@ -0,0 +1,13 @@
1
+ // Pure (no DOM, no `new URL`): the redirect vocabulary shared by the SPA gate and the static login.
2
+ import { RETURN_TO_QUERY_PARAM } from "./return-path.js";
3
+ export const NEXT_QUERY_PARAM = "next";
4
+ // Adds returnTo to an href of a sibling auth page; a missing value leaves the href untouched.
5
+ export function appendReturnTo(href, returnTo) {
6
+ if (returnTo === null)
7
+ return href;
8
+ const hashAt = href.indexOf("#");
9
+ const base = hashAt === -1 ? href : href.slice(0, hashAt);
10
+ const hash = hashAt === -1 ? "" : href.slice(hashAt);
11
+ const separator = base.includes("?") ? "&" : "?";
12
+ return `${base}${separator}${RETURN_TO_QUERY_PARAM}=${encodeURIComponent(returnTo)}${hash}`;
13
+ }
@@ -0,0 +1,42 @@
1
+ import { type KnownLoginFailureReason } from "./login-failure.ts";
2
+ import { type LoginUrlBuilder, NEXT_QUERY_PARAM } from "./login-url.ts";
3
+ export { NEXT_QUERY_PARAM };
4
+ export declare const STATIC_LOGIN_FAILED_REASON = "login_failed";
5
+ export declare const STATIC_MFA_VERIFY_FAILED_REASON = "mfa_verify_failed";
6
+ export declare const STATIC_NETWORK_FAILURE_REASON = "network";
7
+ export declare const STATIC_RATE_LIMITED_REASON = "rate_limited";
8
+ export declare const STATIC_MFA_SETUP_REQUIRED_REASON = "mfa_setup_required";
9
+ export type StaticAuthResult = {
10
+ readonly kind: "success";
11
+ readonly landingPath?: string;
12
+ } | {
13
+ readonly kind: "mfa-challenge";
14
+ readonly challengeToken: string;
15
+ } | {
16
+ readonly kind: "mfa-setup-required";
17
+ } | {
18
+ readonly kind: "failure";
19
+ readonly reason: KnownLoginFailureReason | (string & {});
20
+ readonly retryAfterSeconds?: number;
21
+ };
22
+ export declare function loginWithPassword(email: string, password: string): Promise<StaticAuthResult>;
23
+ export declare function verifyMfaCode(challengeToken: string, code: string): Promise<StaticAuthResult>;
24
+ export type IsAppPath = (pathname: string) => boolean;
25
+ export declare function appReturnPath(candidate: unknown, isAppPath: IsAppPath): string | null;
26
+ export declare function postLoginPath(options: {
27
+ readonly search: string;
28
+ readonly landingPath?: string | undefined;
29
+ readonly isAppPath: IsAppPath;
30
+ readonly fallbackPath: string;
31
+ }): string;
32
+ export declare function forgotPasswordHref(forgotPasswordPath: string, search: string, isAppPath: IsAppPath): string;
33
+ export type MarketingLoginPaths = {
34
+ readonly default: string;
35
+ /** Lowercase locale prefix ("de") to its login path. */
36
+ readonly byLocale?: Readonly<Record<string, string>>;
37
+ };
38
+ export declare function isMarketingLoginPath(pathname: string, localePaths: MarketingLoginPaths): boolean;
39
+ export declare function marketingLoginUrl(options: {
40
+ readonly localePaths: MarketingLoginPaths;
41
+ readonly isAppPath: IsAppPath;
42
+ }): LoginUrlBuilder;
@@ -0,0 +1,122 @@
1
+ // DOM-free login for static sites (plain Astro scripts): fetch plus pure string logic only. It
2
+ // must not import auth-client.ts or auth-gate.tsx, which pull in the renderer, React and window
3
+ // access at import time. Only the pure modules below are allowed.
4
+ import { failureFromErrorField, isRecord, parseRetryAfterSeconds, } from "./login-failure.js";
5
+ import { appendReturnTo, NEXT_QUERY_PARAM } from "./login-url.js";
6
+ import { isSafeReturnPath } from "./return-path.js";
7
+ export { NEXT_QUERY_PARAM };
8
+ export const STATIC_LOGIN_FAILED_REASON = "login_failed";
9
+ export const STATIC_MFA_VERIFY_FAILED_REASON = "mfa_verify_failed";
10
+ export const STATIC_NETWORK_FAILURE_REASON = "network";
11
+ export const STATIC_RATE_LIMITED_REASON = "rate_limited";
12
+ export const STATIC_MFA_SETUP_REQUIRED_REASON = "mfa_setup_required";
13
+ function failure(reason, retryAfterSeconds) {
14
+ return {
15
+ kind: "failure",
16
+ reason,
17
+ ...(retryAfterSeconds !== undefined && { retryAfterSeconds }),
18
+ };
19
+ }
20
+ function interpretBody(body, fallbackReason) {
21
+ if (body["isSuccess"] === true) {
22
+ const challengeToken = body["challengeToken"];
23
+ if (body["mfaRequired"] === true && typeof challengeToken === "string") {
24
+ return { kind: "mfa-challenge", challengeToken };
25
+ }
26
+ if (body["mfaSetupRequired"] === true)
27
+ return { kind: "mfa-setup-required" };
28
+ if (body["token"] !== undefined && body["user"] !== undefined) {
29
+ const landingPath = body["landingPath"];
30
+ return typeof landingPath === "string"
31
+ ? { kind: "success", landingPath }
32
+ : { kind: "success" };
33
+ }
34
+ }
35
+ const { reason, retryAfterSeconds } = failureFromErrorField(body["error"], fallbackReason);
36
+ if (reason === STATIC_MFA_SETUP_REQUIRED_REASON)
37
+ return { kind: "mfa-setup-required" };
38
+ return failure(reason, retryAfterSeconds);
39
+ }
40
+ // Same request shape as auth-client's login() and mfa-client's verifyMfaChallenge(): no CSRF
41
+ // header because no session exists yet.
42
+ async function postAuth(path, payload, fallbackReason) {
43
+ let res;
44
+ try {
45
+ res = await fetch(path, {
46
+ method: "POST",
47
+ credentials: "same-origin",
48
+ headers: { "Content-Type": "application/json" },
49
+ body: JSON.stringify(payload),
50
+ });
51
+ }
52
+ catch {
53
+ return failure(STATIC_NETWORK_FAILURE_REASON);
54
+ }
55
+ if (res.status === 429) {
56
+ return failure(STATIC_RATE_LIMITED_REASON, parseRetryAfterSeconds(res.headers.get("Retry-After")));
57
+ }
58
+ const parsed = await res.json().catch(() => ({}));
59
+ return interpretBody(isRecord(parsed) ? parsed : {}, fallbackReason);
60
+ }
61
+ export function loginWithPassword(email, password) {
62
+ return postAuth("/api/auth/login", { email, password }, STATIC_LOGIN_FAILED_REASON);
63
+ }
64
+ export function verifyMfaCode(challengeToken, code) {
65
+ return postAuth("/api/auth/mfa/verify", { challengeToken, code }, STATIC_MFA_VERIFY_FAILED_REASON);
66
+ }
67
+ function pathnameOf(pathAndQuery) {
68
+ const end = pathAndQuery.search(/[?#]/);
69
+ return end === -1 ? pathAndQuery : pathAndQuery.slice(0, end);
70
+ }
71
+ // `next` is read from a URL, so beyond the shared same-origin check it must also point into the
72
+ // app; string logic only, because React Native's URL getters throw.
73
+ export function appReturnPath(candidate, isAppPath) {
74
+ if (!isSafeReturnPath(candidate))
75
+ return null;
76
+ return isAppPath(pathnameOf(candidate)) ? candidate : null;
77
+ }
78
+ function readAppNext(search, isAppPath) {
79
+ return appReturnPath(new URLSearchParams(search).get(NEXT_QUERY_PARAM), isAppPath);
80
+ }
81
+ export function postLoginPath(options) {
82
+ const next = readAppNext(options.search, options.isAppPath);
83
+ if (next !== null)
84
+ return next;
85
+ return appReturnPath(options.landingPath, options.isAppPath) ?? options.fallbackPath;
86
+ }
87
+ export function forgotPasswordHref(forgotPasswordPath, search, isAppPath) {
88
+ return appendReturnTo(forgotPasswordPath, readAppNext(search, isAppPath));
89
+ }
90
+ function trimTrailingSlashes(pathname) {
91
+ return pathname.replace(/\/+$/, "");
92
+ }
93
+ export function isMarketingLoginPath(pathname, localePaths) {
94
+ const target = trimTrailingSlashes(pathname);
95
+ const loginPaths = [localePaths.default, ...Object.values(localePaths.byLocale ?? {})];
96
+ return loginPaths.some((loginPath) => trimTrailingSlashes(loginPath) === target);
97
+ }
98
+ function loginPathFor(locale, localePaths) {
99
+ const prefix = (locale.toLowerCase().split(/[-_]/)[0] ?? "").trim();
100
+ const byLocale = localePaths.byLocale;
101
+ if (byLocale !== undefined && Object.hasOwn(byLocale, prefix)) {
102
+ return byLocale[prefix] ?? localePaths.default;
103
+ }
104
+ return localePaths.default;
105
+ }
106
+ // Marketing site to app login: keeps the user's place as `next` when it is an app path, and never
107
+ // bounces from a login page back to itself.
108
+ export function marketingLoginUrl(options) {
109
+ const { localePaths, isAppPath } = options;
110
+ return (locale, returnPath) => {
111
+ const hashAt = returnPath.indexOf("#");
112
+ const pathAndQuery = hashAt === -1 ? returnPath : returnPath.slice(0, hashAt);
113
+ const pathname = pathnameOf(pathAndQuery);
114
+ if (isMarketingLoginPath(pathname, localePaths))
115
+ return pathname;
116
+ const loginPath = loginPathFor(locale, localePaths);
117
+ const next = appReturnPath(pathAndQuery, isAppPath);
118
+ return next === null
119
+ ? loginPath
120
+ : `${loginPath}?${NEXT_QUERY_PARAM}=${encodeURIComponent(next)}`;
121
+ };
122
+ }
@@ -7,4 +7,4 @@ export declare function createDisableHandler(opts: DisableOptions): import("@cos
7
7
  code: z.ZodString;
8
8
  }, z.core.$strip>, {
9
9
  disabled: boolean;
10
- }, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
10
+ }, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
@@ -13,4 +13,4 @@ export declare function createEnableConfirmPreauthHandler(opts: EnableConfirmPre
13
13
  }, z.core.$strip>, {
14
14
  kind: string;
15
15
  session: SessionUser;
16
- }, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
16
+ }, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
@@ -9,4 +9,4 @@ export declare function createEnableConfirmHandler(opts: EnableConfirmOptions):
9
9
  code: z.ZodString;
10
10
  }, z.core.$strip>, {
11
11
  enabled: boolean;
12
- }, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
12
+ }, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
@@ -11,4 +11,4 @@ export declare function createEnableStartPreauthHandler(opts: EnableStartPreauth
11
11
  setupToken: string;
12
12
  otpauthUri: string;
13
13
  recoveryCodes: string[];
14
- }, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
14
+ }, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
@@ -10,4 +10,4 @@ export declare function createEnableStartHandler(opts: EnableStartOptions): impo
10
10
  otpauthUri: string;
11
11
  totpSecret: string;
12
12
  recoveryCodes: string[];
13
- }, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
13
+ }, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;