@cosmicdrift/kumiko-bundled-features 0.368.0 → 0.370.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 (620) hide show
  1. package/dist/account-security/constants.d.ts +4 -0
  2. package/dist/account-security/constants.js +5 -0
  3. package/dist/account-security/feature.d.ts +14 -0
  4. package/dist/account-security/feature.js +62 -0
  5. package/dist/account-security/i18n.d.ts +6 -0
  6. package/dist/account-security/i18n.js +6 -0
  7. package/dist/account-security/index.d.ts +3 -0
  8. package/dist/account-security/index.js +3 -0
  9. package/dist/admin-shell/feature.d.ts +1 -1
  10. package/dist/admin-shell/index.d.ts +4 -4
  11. package/dist/admin-shell/overview-panels.d.ts +1 -1
  12. package/dist/admin-shell/web/index.d.ts +1 -1
  13. package/dist/agent-tools/agent-manifest.d.ts +1 -1
  14. package/dist/agent-tools/index.d.ts +8 -8
  15. package/dist/agent-tools/manifest-deny-qns.d.ts +1 -1
  16. package/dist/agent-tools/tool-catalog.d.ts +1 -1
  17. package/dist/agent-tools/tool-dispatch.d.ts +1 -1
  18. package/dist/audit/handlers/resolve-audit-tenant.d.ts +1 -1
  19. package/dist/audit/index.d.ts +3 -3
  20. package/dist/audit/web/index.d.ts +1 -1
  21. package/dist/auth-email-password/bootstrap.d.ts +1 -1
  22. package/dist/auth-email-password/feature.d.ts +7 -6
  23. package/dist/auth-email-password/feature.js +3 -1
  24. package/dist/auth-email-password/handlers/confirm-token-flow.d.ts +1 -1
  25. package/dist/auth-email-password/handlers/invite-accept-with-login.write.d.ts +1 -1
  26. package/dist/auth-email-password/handlers/invite-create.write.d.ts +2 -2
  27. package/dist/auth-email-password/handlers/invite-signup-complete.write.d.ts +1 -1
  28. package/dist/auth-email-password/handlers/login.write.d.ts +1 -1
  29. package/dist/auth-email-password/handlers/request-account-unlock.write.d.ts +1 -1
  30. package/dist/auth-email-password/handlers/request-email-verification.write.d.ts +1 -1
  31. package/dist/auth-email-password/handlers/request-password-reset.write.d.ts +1 -1
  32. package/dist/auth-email-password/handlers/signup-confirm.write.d.ts +1 -1
  33. package/dist/auth-email-password/handlers/signup-request.write.d.ts +1 -1
  34. package/dist/auth-email-password/handlers/switch-tenant-mfa-gate.write.d.ts +1 -1
  35. package/dist/auth-email-password/handlers/token-request-handler.d.ts +2 -2
  36. package/dist/auth-email-password/index.d.ts +13 -13
  37. package/dist/auth-email-password/lockout-store.d.ts +1 -1
  38. package/dist/auth-email-password/magic-link-mail.d.ts +1 -1
  39. package/dist/auth-email-password/seeding.d.ts +3 -3
  40. package/dist/auth-email-password/signed-token.d.ts +1 -1
  41. package/dist/auth-email-password/signup-token-store.d.ts +1 -1
  42. package/dist/auth-email-password/testing.d.ts +1 -1
  43. package/dist/auth-email-password/web/auth-gate.d.ts +1 -1
  44. package/dist/auth-email-password/web/client-plugin.d.ts +2 -2
  45. package/dist/auth-email-password/web/index.d.ts +42 -42
  46. package/dist/auth-email-password/web/session-bootstrap-error.d.ts +1 -1
  47. package/dist/auth-email-password/web/session.d.ts +1 -1
  48. package/dist/auth-email-password/web/signup-complete-screen.d.ts +1 -1
  49. package/dist/auth-foundation/feature.d.ts +2 -6
  50. package/dist/auth-foundation/feature.js +0 -2
  51. package/dist/auth-foundation/index.d.ts +3 -3
  52. package/dist/auth-foundation/index.js +1 -1
  53. package/dist/auth-foundation/resolve-anonymous-access.d.ts +1 -1
  54. package/dist/auth-mfa/env.d.ts +13 -0
  55. package/dist/auth-mfa/env.js +24 -0
  56. package/dist/auth-mfa/errors.d.ts +1 -1
  57. package/dist/auth-mfa/feature-exports.d.ts +12 -0
  58. package/dist/auth-mfa/feature-exports.js +72 -0
  59. package/dist/auth-mfa/feature.d.ts +6 -12
  60. package/dist/auth-mfa/feature.js +53 -70
  61. package/dist/auth-mfa/handlers/reencrypt.job.d.ts +1 -1
  62. package/dist/auth-mfa/index.d.ts +12 -9
  63. package/dist/auth-mfa/index.js +4 -2
  64. package/dist/auth-mfa/mfa-challenge-token.d.ts +1 -1
  65. package/dist/auth-mfa/mfa-preauth-setup-token.d.ts +1 -1
  66. package/dist/auth-mfa/mfa-status-checker.d.ts +1 -1
  67. package/dist/auth-mfa/mfa-verify-attempts.d.ts +1 -1
  68. package/dist/auth-mfa/testing.d.ts +1 -1
  69. package/dist/auth-mfa/token-secrets.d.ts +7 -0
  70. package/dist/auth-mfa/token-secrets.js +13 -0
  71. package/dist/auth-mfa/verify-factor.d.ts +1 -1
  72. package/dist/auth-mfa/web/index.d.ts +15 -15
  73. package/dist/auth-mfa/web/mfa-client.d.ts +1 -1
  74. package/dist/auth-mfa-user-data/index.d.ts +0 -4
  75. package/dist/auth-mfa-user-data/index.js +0 -2
  76. package/dist/billing-foundation/checkout-core.d.ts +2 -2
  77. package/dist/billing-foundation/consumer-protection/confirmation-mail.d.ts +2 -2
  78. package/dist/billing-foundation/consumer-protection/consent-gate.d.ts +1 -1
  79. package/dist/billing-foundation/consumer-protection/consent-text.d.ts +2 -2
  80. package/dist/billing-foundation/consumer-protection/issue-confirmation.d.ts +1 -1
  81. package/dist/billing-foundation/consumer-protection/register-consent.d.ts +1 -1
  82. package/dist/billing-foundation/consumer-protection/register-termination.d.ts +1 -1
  83. package/dist/billing-foundation/consumer-protection/termination-mail.d.ts +3 -3
  84. package/dist/billing-foundation/consumer-protection/termination-notify.d.ts +5 -5
  85. package/dist/billing-foundation/consumer-protection/termination-pages.d.ts +2 -2
  86. package/dist/billing-foundation/consumer-protection/termination-record.d.ts +3 -3
  87. package/dist/billing-foundation/consumer-protection/termination-request.d.ts +2 -2
  88. package/dist/billing-foundation/consumer-protection/termination-texts.d.ts +2 -2
  89. package/dist/billing-foundation/feature.d.ts +1 -3
  90. package/dist/billing-foundation/feature.js +0 -2
  91. package/dist/billing-foundation/handlers/billing-plans.query.d.ts +1 -1
  92. package/dist/billing-foundation/handlers/create-checkout-session.write.d.ts +1 -1
  93. package/dist/billing-foundation/handlers/create-portal-session.write.d.ts +1 -1
  94. package/dist/billing-foundation/handlers/start-plan-checkout.write.d.ts +1 -1
  95. package/dist/billing-foundation/handlers/switch-plan.write.d.ts +1 -1
  96. package/dist/billing-foundation/index.d.ts +16 -16
  97. package/dist/billing-foundation/index.js +1 -1
  98. package/dist/billing-foundation/plan-catalog.d.ts +1 -1
  99. package/dist/billing-foundation/subscription-tier-sync.d.ts +3 -1
  100. package/dist/billing-foundation/subscription-tier-sync.js +3 -2
  101. package/dist/billing-foundation/types.d.ts +3 -3
  102. package/dist/billing-foundation/validate-options.d.ts +1 -1
  103. package/dist/billing-foundation/web/checkout-consent-dialog.d.ts +1 -1
  104. package/dist/billing-foundation/web/index.d.ts +6 -6
  105. package/dist/cap-counter/calendar-cap-usage-reservation.d.ts +4 -4
  106. package/dist/cap-counter/cap-reservation.d.ts +1 -1
  107. package/dist/cap-counter/enforce-cap.d.ts +1 -1
  108. package/dist/cap-counter/feature.d.ts +0 -4
  109. package/dist/cap-counter/feature.js +0 -2
  110. package/dist/cap-counter/index.d.ts +13 -13
  111. package/dist/cap-counter/index.js +1 -1
  112. package/dist/cap-counter/value-cap-guard.d.ts +1 -1
  113. package/dist/cap-counter/with-cap-enforcement.d.ts +1 -1
  114. package/dist/cap-overview/feature.d.ts +1 -1
  115. package/dist/cap-overview/handlers/caps-usage.query.d.ts +1 -1
  116. package/dist/cap-overview/handlers/tenant-caps-list.query.d.ts +1 -1
  117. package/dist/cap-overview/index.d.ts +6 -6
  118. package/dist/cap-overview/screens.d.ts +1 -1
  119. package/dist/cap-overview/types.d.ts +1 -1
  120. package/dist/cap-overview/usage-math.d.ts +1 -1
  121. package/dist/cap-overview/web/cap-usage-bar.d.ts +1 -1
  122. package/dist/cap-overview/web/index.d.ts +4 -4
  123. package/dist/channel-discord/discord-channel.d.ts +1 -1
  124. package/dist/channel-discord/feature.d.ts +1 -1
  125. package/dist/channel-discord/index.d.ts +2 -2
  126. package/dist/channel-email/email-channel.d.ts +15 -7
  127. package/dist/channel-email/email-channel.js +17 -3
  128. package/dist/channel-email/env.d.ts +14 -0
  129. package/dist/channel-email/env.js +27 -0
  130. package/dist/channel-email/feature.d.ts +14 -3
  131. package/dist/channel-email/feature.js +6 -2
  132. package/dist/channel-email/index.d.ts +6 -5
  133. package/dist/channel-email/index.js +2 -1
  134. package/dist/channel-email/pii-guard.d.ts +1 -1
  135. package/dist/channel-email/smtp-transport.d.ts +1 -1
  136. package/dist/channel-email/types.d.ts +1 -1
  137. package/dist/channel-in-app/in-app-channel.d.ts +1 -1
  138. package/dist/channel-in-app/index.d.ts +4 -4
  139. package/dist/channel-push/feature.d.ts +1 -1
  140. package/dist/channel-push/index.d.ts +3 -3
  141. package/dist/channel-push/push-channel.d.ts +2 -2
  142. package/dist/channel-slack/feature.d.ts +1 -1
  143. package/dist/channel-slack/index.d.ts +2 -2
  144. package/dist/channel-slack/slack-channel.d.ts +1 -1
  145. package/dist/channel-teams/feature.d.ts +1 -1
  146. package/dist/channel-teams/index.d.ts +2 -2
  147. package/dist/channel-teams/teams-channel.d.ts +1 -1
  148. package/dist/channel-telegram/feature.d.ts +1 -1
  149. package/dist/channel-telegram/index.d.ts +2 -2
  150. package/dist/channel-telegram/telegram-channel.d.ts +1 -1
  151. package/dist/compliance-profiles/feature.d.ts +1 -1
  152. package/dist/compliance-profiles/index.d.ts +3 -3
  153. package/dist/compliance-profiles/web/index.d.ts +2 -2
  154. package/dist/compliance-profiles-ops/index.d.ts +0 -8
  155. package/dist/compliance-profiles-ops/index.js +0 -2
  156. package/dist/config/feature.d.ts +1 -1
  157. package/dist/config/handlers/reencrypt.job.d.ts +1 -1
  158. package/dist/config/index.d.ts +8 -8
  159. package/dist/config/web/client-plugin.d.ts +1 -1
  160. package/dist/config/web/i18n.js +1 -2
  161. package/dist/config/web/index.d.ts +2 -2
  162. package/dist/crypto-shredding/env/index.d.ts +21 -0
  163. package/dist/crypto-shredding/env/index.js +78 -0
  164. package/dist/crypto-shredding/feature.d.ts +17 -2
  165. package/dist/crypto-shredding/feature.js +5 -1
  166. package/dist/crypto-shredding/index.d.ts +4 -3
  167. package/dist/crypto-shredding/index.js +1 -0
  168. package/dist/custom-fields/feature.d.ts +0 -17
  169. package/dist/custom-fields/feature.js +0 -2
  170. package/dist/custom-fields/index.d.ts +10 -10
  171. package/dist/custom-fields/index.js +1 -1
  172. package/dist/custom-fields/lib/define-or-resurrect.d.ts +2 -2
  173. package/dist/custom-fields/lib/field-access.d.ts +1 -1
  174. package/dist/custom-fields/lib/field-definition-row.d.ts +1 -1
  175. package/dist/custom-fields/lib/quota.d.ts +1 -1
  176. package/dist/custom-fields/web/index.d.ts +3 -3
  177. package/dist/data-retention/_internal/parse-override.d.ts +1 -1
  178. package/dist/data-retention/feature.d.ts +7 -7
  179. package/dist/data-retention/handlers/policy-for.query.d.ts +1 -1
  180. package/dist/data-retention/index.d.ts +3 -3
  181. package/dist/data-retention/resolve-for-tenant.d.ts +2 -2
  182. package/dist/data-retention/resolve-tenant-preset.d.ts +1 -1
  183. package/dist/data-retention/resolver.d.ts +1 -1
  184. package/dist/data-retention/run-retention-cleanup.d.ts +2 -2
  185. package/dist/delivery/attachment-ref.d.ts +1 -1
  186. package/dist/delivery/attempt-log.d.ts +1 -1
  187. package/dist/delivery/channel-context.d.ts +2 -2
  188. package/dist/delivery/chat-webhook-channel.d.ts +2 -2
  189. package/dist/delivery/constants.d.ts +1 -1
  190. package/dist/delivery/delivery-service.d.ts +2 -2
  191. package/dist/delivery/feature.js +3 -1
  192. package/dist/delivery/handlers/log.query.d.ts +1 -1
  193. package/dist/delivery/handlers/unsubscribe-page-chrome.query.d.ts +5 -0
  194. package/dist/delivery/handlers/unsubscribe-page-chrome.query.js +44 -0
  195. package/dist/delivery/index.d.ts +20 -19
  196. package/dist/delivery/index.js +3 -2
  197. package/dist/delivery/notify-factory.d.ts +1 -1
  198. package/dist/delivery/public-names.d.ts +1 -0
  199. package/dist/delivery/public-names.js +1 -0
  200. package/dist/delivery/testing.d.ts +3 -3
  201. package/dist/delivery/types.d.ts +3 -3
  202. package/dist/delivery/unsubscribe-link.d.ts +1 -1
  203. package/dist/delivery/unsubscribe-page-strings.d.ts +4 -0
  204. package/dist/delivery/unsubscribe-page-strings.js +4 -0
  205. package/dist/delivery/unsubscribe-page.d.ts +27 -0
  206. package/dist/delivery/unsubscribe-page.js +192 -0
  207. package/dist/delivery/unsubscribe.d.ts +22 -1
  208. package/dist/delivery/unsubscribe.js +152 -65
  209. package/dist/delivery/web/index.d.ts +2 -2
  210. package/dist/derivatives-sharp/feature.d.ts +0 -4
  211. package/dist/derivatives-sharp/feature.js +0 -2
  212. package/dist/derivatives-sharp/index.d.ts +2 -2
  213. package/dist/derivatives-sharp/index.js +1 -1
  214. package/dist/document-ingest-foundation/feature.d.ts +0 -7
  215. package/dist/document-ingest-foundation/feature.js +0 -2
  216. package/dist/document-ingest-foundation/index.d.ts +7 -7
  217. package/dist/document-ingest-foundation/index.js +1 -1
  218. package/dist/document-ingest-foundation/pages.d.ts +1 -1
  219. package/dist/document-ingest-foundation/providers.d.ts +1 -1
  220. package/dist/document-ingest-foundation/write-document-extract.d.ts +1 -1
  221. package/dist/feature-toggles/compose-tier-resolver.d.ts +1 -1
  222. package/dist/feature-toggles/feature.d.ts +5 -5
  223. package/dist/feature-toggles/handlers/set.write.d.ts +1 -1
  224. package/dist/feature-toggles/index.d.ts +3 -3
  225. package/dist/feature-toggles/toggle-sync-signal.d.ts +1 -1
  226. package/dist/feature-toggles/web/index.d.ts +1 -1
  227. package/dist/file-derivatives/feature.d.ts +0 -2
  228. package/dist/file-derivatives/feature.js +0 -2
  229. package/dist/file-derivatives/index.d.ts +4 -4
  230. package/dist/file-derivatives/index.js +1 -1
  231. package/dist/file-foundation/feature.d.ts +0 -6
  232. package/dist/file-foundation/feature.js +0 -2
  233. package/dist/file-foundation/index.d.ts +2 -2
  234. package/dist/file-foundation/index.js +1 -1
  235. package/dist/file-provider-inmemory/feature.d.ts +0 -4
  236. package/dist/file-provider-inmemory/feature.js +0 -2
  237. package/dist/file-provider-inmemory/index.d.ts +1 -1
  238. package/dist/file-provider-inmemory/index.js +1 -1
  239. package/dist/file-provider-s3/env-feature.d.ts +12 -2
  240. package/dist/file-provider-s3/env-feature.js +9 -6
  241. package/dist/file-provider-s3/env-schema.d.ts +38 -0
  242. package/dist/file-provider-s3/env-schema.js +51 -0
  243. package/dist/file-provider-s3/feature.d.ts +1 -14
  244. package/dist/file-provider-s3/feature.js +0 -2
  245. package/dist/file-provider-s3/index.d.ts +2 -1
  246. package/dist/file-provider-s3/index.js +2 -1
  247. package/dist/file-provider-s3/lib/env-helper.d.ts +1 -1
  248. package/dist/file-provider-s3/lib/index.d.ts +3 -3
  249. package/dist/files/index.d.ts +1 -1
  250. package/dist/files-tenant-data/index.d.ts +2 -2
  251. package/dist/folders/feature.d.ts +0 -4
  252. package/dist/folders/feature.js +0 -2
  253. package/dist/folders/index.d.ts +7 -7
  254. package/dist/folders/index.js +1 -1
  255. package/dist/folders/web/folder-manager.d.ts +1 -1
  256. package/dist/folders/web/index.d.ts +5 -5
  257. package/dist/folders-user-data/index.d.ts +0 -4
  258. package/dist/folders-user-data/index.js +0 -2
  259. package/dist/form-draft/db/queries/cleanup.d.ts +1 -1
  260. package/dist/form-draft/feature.d.ts +0 -4
  261. package/dist/form-draft/feature.js +0 -2
  262. package/dist/form-draft/handlers/cleanup.job.d.ts +1 -1
  263. package/dist/form-draft/handlers/get.query.d.ts +1 -1
  264. package/dist/form-draft/index.d.ts +10 -10
  265. package/dist/form-draft/index.js +1 -1
  266. package/dist/form-draft/lookup.d.ts +1 -1
  267. package/dist/form-draft/release-file-refs.d.ts +1 -1
  268. package/dist/form-draft-user-data/index.d.ts +0 -4
  269. package/dist/form-draft-user-data/index.js +0 -2
  270. package/dist/foundation-shared/build-info-env.d.ts +7 -0
  271. package/dist/foundation-shared/build-info-env.js +15 -0
  272. package/dist/foundation-shared/demo-admin-env.d.ts +12 -0
  273. package/dist/foundation-shared/demo-admin-env.js +21 -0
  274. package/dist/foundation-shared/index.d.ts +5 -3
  275. package/dist/foundation-shared/index.js +2 -0
  276. package/dist/host-routing/constants.d.ts +8 -0
  277. package/dist/host-routing/constants.js +19 -0
  278. package/dist/host-routing/dispatch.d.ts +24 -0
  279. package/dist/host-routing/dispatch.js +102 -0
  280. package/dist/host-routing/feature.d.ts +3 -0
  281. package/dist/host-routing/feature.js +102 -0
  282. package/dist/host-routing/host.d.ts +14 -0
  283. package/dist/host-routing/host.js +37 -0
  284. package/dist/host-routing/index.d.ts +5 -0
  285. package/dist/host-routing/index.js +4 -0
  286. package/dist/host-routing/options.d.ts +27 -0
  287. package/dist/host-routing/options.js +1 -0
  288. package/dist/host-routing/validate-options.d.ts +2 -0
  289. package/dist/host-routing/validate-options.js +29 -0
  290. package/dist/inbound-mail-foundation/connect-routes.d.ts +2 -2
  291. package/dist/inbound-mail-foundation/feature.d.ts +0 -4
  292. package/dist/inbound-mail-foundation/feature.js +0 -2
  293. package/dist/inbound-mail-foundation/handlers/account-state.d.ts +1 -1
  294. package/dist/inbound-mail-foundation/index.d.ts +12 -12
  295. package/dist/inbound-mail-foundation/index.js +1 -1
  296. package/dist/inbound-mail-foundation/oauth-access-token.d.ts +1 -1
  297. package/dist/inbound-mail-foundation/provider-factory.d.ts +1 -1
  298. package/dist/inbound-mail-foundation/types.d.ts +1 -1
  299. package/dist/inbound-mail-foundation/watch-supervisor.d.ts +2 -2
  300. package/dist/inbound-provider-imap/feature.d.ts +1 -5
  301. package/dist/inbound-provider-imap/feature.js +0 -2
  302. package/dist/inbound-provider-imap/imap-client.d.ts +1 -1
  303. package/dist/inbound-provider-imap/index.d.ts +3 -3
  304. package/dist/inbound-provider-imap/index.js +1 -1
  305. package/dist/inbound-provider-inmemory/feature.d.ts +0 -4
  306. package/dist/inbound-provider-inmemory/feature.js +0 -2
  307. package/dist/inbound-provider-inmemory/index.d.ts +1 -1
  308. package/dist/inbound-provider-inmemory/index.js +1 -1
  309. package/dist/jobs/handlers/tenant-runs.query.d.ts +1 -1
  310. package/dist/jobs/index.d.ts +9 -9
  311. package/dist/jobs/web/index.d.ts +1 -1
  312. package/dist/ledger/feature.d.ts +0 -4
  313. package/dist/ledger/feature.js +0 -2
  314. package/dist/ledger/index.d.ts +10 -10
  315. package/dist/ledger/index.js +1 -1
  316. package/dist/ledger/recurring.d.ts +2 -2
  317. package/dist/ledger/reports.d.ts +2 -2
  318. package/dist/ledger/web/index.d.ts +3 -3
  319. package/dist/legal-pages/constants.d.ts +12 -0
  320. package/dist/legal-pages/constants.js +16 -0
  321. package/dist/legal-pages/feature.d.ts +6 -3
  322. package/dist/legal-pages/feature.js +5 -2
  323. package/dist/legal-pages/index.d.ts +5 -3
  324. package/dist/legal-pages/index.js +3 -1
  325. package/dist/legal-pages/layout.d.ts +10 -0
  326. package/dist/legal-pages/layout.js +32 -0
  327. package/dist/legal-pages/lib/boot-check.d.ts +1 -1
  328. package/dist/legal-pages/lib/validate-routes.d.ts +1 -1
  329. package/dist/legal-pages/markdown.d.ts +2 -2
  330. package/dist/legal-pages/seed.d.ts +12 -0
  331. package/dist/legal-pages/seed.js +38 -0
  332. package/dist/legal-pages/web/index.d.ts +1 -1
  333. package/dist/mail-foundation/feature.d.ts +4 -7
  334. package/dist/mail-foundation/feature.js +16 -14
  335. package/dist/mail-foundation/i18n.d.ts +14 -0
  336. package/dist/mail-foundation/i18n.js +8 -0
  337. package/dist/mail-foundation/index.d.ts +1 -1
  338. package/dist/mail-foundation/index.js +1 -1
  339. package/dist/mail-transport-inmemory/feature.d.ts +0 -4
  340. package/dist/mail-transport-inmemory/feature.js +6 -2
  341. package/dist/mail-transport-inmemory/index.d.ts +1 -1
  342. package/dist/mail-transport-inmemory/index.js +1 -1
  343. package/dist/mail-transport-smtp/config-keys.d.ts +7 -0
  344. package/dist/mail-transport-smtp/config-keys.js +65 -0
  345. package/dist/mail-transport-smtp/feature.d.ts +0 -16
  346. package/dist/mail-transport-smtp/feature.js +5 -35
  347. package/dist/mail-transport-smtp/i18n.d.ts +41 -0
  348. package/dist/mail-transport-smtp/i18n.js +28 -0
  349. package/dist/mail-transport-smtp/index.d.ts +1 -1
  350. package/dist/mail-transport-smtp/index.js +1 -1
  351. package/dist/managed-pages/branding.d.ts +1 -1
  352. package/dist/managed-pages/feature.d.ts +1 -1
  353. package/dist/managed-pages/handlers/branding.query.d.ts +1 -1
  354. package/dist/managed-pages/index.d.ts +5 -5
  355. package/dist/managed-pages/web/index.d.ts +2 -2
  356. package/dist/metrics/compute.d.ts +2 -2
  357. package/dist/metrics/default-metrics.d.ts +9 -9
  358. package/dist/metrics/feature.d.ts +1 -1
  359. package/dist/metrics/filters.d.ts +1 -1
  360. package/dist/metrics/index.d.ts +5 -5
  361. package/dist/metrics/types.d.ts +1 -1
  362. package/dist/metrics/validate.d.ts +1 -1
  363. package/dist/metrics/window.d.ts +2 -2
  364. package/dist/notes-history/feature.d.ts +0 -4
  365. package/dist/notes-history/feature.js +0 -2
  366. package/dist/notes-history/handlers/add-note.write.d.ts +1 -1
  367. package/dist/notes-history/index.d.ts +6 -6
  368. package/dist/notes-history/index.js +1 -1
  369. package/dist/notes-history/web/index.d.ts +3 -3
  370. package/dist/notes-history-user-data/index.d.ts +1 -5
  371. package/dist/notes-history-user-data/index.js +0 -2
  372. package/dist/page-render/index.d.ts +7 -7
  373. package/dist/page-render/layout.d.ts +1 -1
  374. package/dist/page-render/web.d.ts +5 -5
  375. package/dist/personal-access-tokens/feature.d.ts +3 -3
  376. package/dist/personal-access-tokens/handlers/available-scopes.query.d.ts +1 -1
  377. package/dist/personal-access-tokens/i18n.d.ts +1 -1
  378. package/dist/personal-access-tokens/index.d.ts +13 -13
  379. package/dist/personal-access-tokens/resolver.d.ts +1 -1
  380. package/dist/personal-access-tokens/screens.d.ts +1 -1
  381. package/dist/presets/dsgvo-self-service.d.ts +3 -1
  382. package/dist/presets/dsgvo-self-service.js +2 -0
  383. package/dist/presets/index.d.ts +2 -2
  384. package/dist/presets/security-baseline.d.ts +2 -0
  385. package/dist/presets/security-baseline.js +2 -0
  386. package/dist/rate-limiting/index.d.ts +2 -2
  387. package/dist/readiness/feature.d.ts +0 -8
  388. package/dist/readiness/feature.js +0 -2
  389. package/dist/readiness/index.d.ts +3 -3
  390. package/dist/readiness/index.js +1 -1
  391. package/dist/renderer-foundation/api.d.ts +2 -2
  392. package/dist/renderer-foundation/constants.d.ts +2 -2
  393. package/dist/renderer-foundation/feature.d.ts +1 -1
  394. package/dist/renderer-foundation/index.d.ts +5 -5
  395. package/dist/renderer-foundation/types.d.ts +24 -2
  396. package/dist/renderer-pdf/feature.d.ts +1 -1
  397. package/dist/renderer-pdf/index.d.ts +2 -2
  398. package/dist/renderer-pdf/render-table-pdf.d.ts +1 -1
  399. package/dist/secrets/constants.d.ts +7 -0
  400. package/dist/secrets/constants.js +7 -0
  401. package/dist/secrets/db/queries/read.d.ts +1 -1
  402. package/dist/secrets/feature.d.ts +5 -3
  403. package/dist/secrets/feature.js +19 -5
  404. package/dist/secrets/handlers/delete.write.js +4 -3
  405. package/dist/secrets/handlers/rotate.job.d.ts +1 -1
  406. package/dist/secrets/handlers/set.write.js +4 -3
  407. package/dist/secrets/index.d.ts +7 -7
  408. package/dist/secrets/index.js +1 -1
  409. package/dist/secrets/secrets-context.d.ts +1 -1
  410. package/dist/seo/feature.d.ts +3 -3
  411. package/dist/seo/index.d.ts +6 -6
  412. package/dist/sessions/feature.d.ts +1 -1
  413. package/dist/sessions/index.d.ts +8 -8
  414. package/dist/sessions/session-callbacks.d.ts +1 -1
  415. package/dist/sessions/testing.d.ts +1 -1
  416. package/dist/shared/index.d.ts +31 -31
  417. package/dist/step-dispatcher/dispatch-payload.d.ts +2 -2
  418. package/dist/step-dispatcher/index.d.ts +3 -3
  419. package/dist/subscription-mollie/feature.d.ts +2 -2
  420. package/dist/subscription-mollie/index.d.ts +3 -3
  421. package/dist/subscription-mollie/verify-webhook.d.ts +1 -1
  422. package/dist/subscription-stripe/feature.d.ts +17 -1
  423. package/dist/subscription-stripe/feature.js +19 -1
  424. package/dist/subscription-stripe/index.d.ts +2 -2
  425. package/dist/subscription-stripe/index.js +1 -1
  426. package/dist/subscription-stripe/plugin-methods.d.ts +1 -1
  427. package/dist/subscription-stripe/verify-webhook.d.ts +1 -1
  428. package/dist/tags/feature.d.ts +0 -4
  429. package/dist/tags/feature.js +0 -2
  430. package/dist/tags/handlers/assign-tag.write.d.ts +1 -1
  431. package/dist/tags/handlers/remove-tag.write.d.ts +1 -1
  432. package/dist/tags/index.d.ts +11 -11
  433. package/dist/tags/index.js +1 -1
  434. package/dist/tags/web/index.d.ts +9 -9
  435. package/dist/template-resolver/api.d.ts +4 -4
  436. package/dist/template-resolver/constants.d.ts +1 -2
  437. package/dist/template-resolver/constants.js +0 -1
  438. package/dist/template-resolver/document-sanitizer.d.ts +1 -1
  439. package/dist/template-resolver/handlers/bundle-import.d.ts +3 -3
  440. package/dist/template-resolver/handlers/collection-shared.d.ts +2 -2
  441. package/dist/template-resolver/handlers/copy-locale.write.d.ts +1 -1
  442. package/dist/template-resolver/handlers/diff-to-system.query.d.ts +1 -1
  443. package/dist/template-resolver/handlers/find-by-id.query.d.ts +1 -1
  444. package/dist/template-resolver/handlers/import-bundle-system.write.d.ts +1 -1
  445. package/dist/template-resolver/handlers/import-bundle.write.d.ts +1 -1
  446. package/dist/template-resolver/handlers/layout-source.query.d.ts +3 -3
  447. package/dist/template-resolver/handlers/override-diff.d.ts +2 -2
  448. package/dist/template-resolver/handlers/overview.query.d.ts +3 -3
  449. package/dist/template-resolver/handlers/preview.query.d.ts +1 -1
  450. package/dist/template-resolver/handlers/resource-link-pdf.write.d.ts +1 -1
  451. package/dist/template-resolver/handlers/resource-upload.write.d.ts +1 -1
  452. package/dist/template-resolver/handlers/send-test.write.d.ts +1 -1
  453. package/dist/template-resolver/handlers/send-test.write.js +4 -2
  454. package/dist/template-resolver/handlers/shared.d.ts +1 -1
  455. package/dist/template-resolver/handlers/template-gates.d.ts +4 -4
  456. package/dist/template-resolver/handlers/template-write.d.ts +4 -4
  457. package/dist/template-resolver/handlers/tenant-overrides.query.d.ts +1 -1
  458. package/dist/template-resolver/handlers/toggle-status.write.d.ts +1 -1
  459. package/dist/template-resolver/handlers/upsert-system.write.d.ts +1 -1
  460. package/dist/template-resolver/handlers/upsert-tenant.write.d.ts +1 -1
  461. package/dist/template-resolver/handlers/usage.query.d.ts +1 -1
  462. package/dist/template-resolver/handlers/validate.query.d.ts +3 -3
  463. package/dist/template-resolver/index.d.ts +25 -25
  464. package/dist/template-resolver/layout-appearance.d.ts +1 -1
  465. package/dist/template-resolver/layout-regions.d.ts +2 -2
  466. package/dist/template-resolver/linked-resources.d.ts +1 -1
  467. package/dist/template-resolver/preview-display-html.d.ts +1 -1
  468. package/dist/template-resolver/resource-image.d.ts +1 -1
  469. package/dist/template-resolver/seeding.d.ts +2 -2
  470. package/dist/template-resolver/store-template-resource.d.ts +1 -1
  471. package/dist/template-resolver/template-draft.d.ts +2 -2
  472. package/dist/template-resolver/template-meta.d.ts +2 -2
  473. package/dist/template-resolver/template-preview.d.ts +7 -6
  474. package/dist/template-resolver/template-preview.js +19 -12
  475. package/dist/template-resolver/template-resources.d.ts +1 -1
  476. package/dist/template-resolver/template-usage.d.ts +3 -1
  477. package/dist/template-resolver/template-usage.js +1 -0
  478. package/dist/template-resolver/template-validation.d.ts +1 -1
  479. package/dist/template-resolver/testing.d.ts +1 -1
  480. package/dist/template-resolver/user-content-table.d.ts +1 -1
  481. package/dist/template-resolver/web/document-editor-extensions.d.ts +1 -1
  482. package/dist/template-resolver/web/document-editor-extensions.js +6 -2
  483. package/dist/template-resolver/web/document-editor.d.ts +1 -1
  484. package/dist/template-resolver/web/document-tiptap-editor.d.ts +1 -1
  485. package/dist/template-resolver/web/document-tiptap-editor.js +13 -10
  486. package/dist/template-resolver/web/editor-handle.d.ts +1 -1
  487. package/dist/template-resolver/web/index.d.ts +7 -7
  488. package/dist/template-resolver/web/placeholder-line-editor-lazy.d.ts +2 -2
  489. package/dist/template-resolver/web/placeholder-line-editor.d.ts +1 -1
  490. package/dist/template-resolver-user-data/index.d.ts +0 -4
  491. package/dist/template-resolver-user-data/index.js +0 -2
  492. package/dist/tenant/feature.d.ts +1 -1
  493. package/dist/tenant/index.d.ts +10 -10
  494. package/dist/tenant/is-tenant-serving-public-content.d.ts +1 -1
  495. package/dist/tenant/testing.d.ts +1 -1
  496. package/dist/tenant/web/index.d.ts +3 -3
  497. package/dist/tenant-handover/feature.d.ts +1 -1
  498. package/dist/tenant-handover/index.d.ts +3 -3
  499. package/dist/tenant-handover/signup-handover-provider.d.ts +1 -1
  500. package/dist/tenant-lifecycle/feature.d.ts +2 -2
  501. package/dist/tenant-lifecycle/index.d.ts +3 -3
  502. package/dist/tenant-lifecycle/run-tenant-destroy.d.ts +1 -1
  503. package/dist/tenant-lifecycle/stages.d.ts +1 -1
  504. package/dist/tenant-lifecycle/testing.d.ts +1 -1
  505. package/dist/tenant-settings/feature.d.ts +1 -3
  506. package/dist/tenant-settings/feature.js +0 -2
  507. package/dist/tenant-settings/index.d.ts +4 -4
  508. package/dist/tenant-settings/index.js +1 -1
  509. package/dist/tier-engine/entity.d.ts +1 -1
  510. package/dist/tier-engine/feature.d.ts +2 -4
  511. package/dist/tier-engine/feature.js +0 -2
  512. package/dist/tier-engine/handlers/get-tenant-tier.query.d.ts +1 -1
  513. package/dist/tier-engine/i18n.d.ts +0 -2
  514. package/dist/tier-engine/i18n.js +4 -4
  515. package/dist/tier-engine/index.d.ts +8 -8
  516. package/dist/tier-engine/index.js +1 -1
  517. package/dist/tier-engine/tier-option-gate.d.ts +1 -1
  518. package/dist/tier-engine/tier-resolver.d.ts +1 -1
  519. package/dist/tier-engine/web/client-plugin.js +3 -2
  520. package/dist/tier-engine/web/index.d.ts +1 -1
  521. package/dist/user/index.d.ts +8 -8
  522. package/dist/user/invited-global-roles.d.ts +1 -1
  523. package/dist/user/principal-status.d.ts +1 -1
  524. package/dist/user/seeding.d.ts +1 -1
  525. package/dist/user/testing.d.ts +1 -1
  526. package/dist/user-data-rights/deletion-token.d.ts +1 -1
  527. package/dist/user-data-rights/feature.d.ts +5 -5
  528. package/dist/user-data-rights/feature.js +7 -4
  529. package/dist/user-data-rights/handlers/request-deletion.write.d.ts +1 -1
  530. package/dist/user-data-rights/handlers/run-forget-cleanup.write.d.ts +3 -3
  531. package/dist/user-data-rights/index.d.ts +13 -13
  532. package/dist/user-data-rights/lib/default-mailers.d.ts +7 -4
  533. package/dist/user-data-rights/lib/default-mailers.js +25 -3
  534. package/dist/user-data-rights/web/client-plugin.d.ts +1 -1
  535. package/dist/user-data-rights/web/index.d.ts +8 -8
  536. package/dist/user-data-rights-defaults/index.d.ts +11 -11
  537. package/dist/user-profile/index.d.ts +2 -2
  538. package/dist/user-profile/web/index.d.ts +2 -2
  539. package/dist/waitlist/constants.d.ts +9 -0
  540. package/dist/waitlist/constants.js +11 -0
  541. package/dist/waitlist/entity.d.ts +38 -6
  542. package/dist/waitlist/entity.js +4 -2
  543. package/dist/waitlist/entries-admin.d.ts +4 -0
  544. package/dist/waitlist/entries-admin.js +42 -0
  545. package/dist/waitlist/feature.d.ts +1 -1
  546. package/dist/waitlist/feature.js +16 -1
  547. package/dist/waitlist/handlers/export-purge.write.d.ts +12 -0
  548. package/dist/waitlist/handlers/export-purge.write.js +61 -0
  549. package/dist/waitlist/handlers/invite.write.d.ts +1 -1
  550. package/dist/waitlist/handlers/submit.write.d.ts +1 -1
  551. package/dist/waitlist/i18n.js +4 -0
  552. package/dist/waitlist/import.d.ts +24 -0
  553. package/dist/waitlist/import.js +51 -0
  554. package/dist/waitlist/index.d.ts +7 -5
  555. package/dist/waitlist/index.js +2 -0
  556. package/dist/waitlist/legacy-migrate.d.ts +27 -0
  557. package/dist/waitlist/legacy-migrate.js +173 -0
  558. package/dist/waitlist/lib.d.ts +2 -2
  559. package/dist/waitlist/link-on-signup.d.ts +3 -0
  560. package/dist/waitlist/link-on-signup.js +83 -0
  561. package/dist/waitlist/options.d.ts +11 -3
  562. package/dist/waitlist/payloads.d.ts +3 -0
  563. package/dist/waitlist/payloads.js +1 -0
  564. package/dist/workflow-runner/feature.d.ts +0 -4
  565. package/dist/workflow-runner/feature.js +0 -2
  566. package/dist/workflow-runner/index.d.ts +4 -4
  567. package/dist/workflow-runner/index.js +1 -1
  568. package/package.json +43 -27
  569. package/src/account-security/changes.json +8 -0
  570. package/src/auth-email-password/changes.json +6 -0
  571. package/src/auth-foundation/changes.json +8 -0
  572. package/src/auth-mfa/changes.json +6 -0
  573. package/src/auth-mfa-user-data/changes.json +10 -1
  574. package/src/billing-foundation/changes.json +8 -0
  575. package/src/cap-counter/changes.json +8 -0
  576. package/src/channel-email/changes.json +13 -0
  577. package/src/compliance-profiles-ops/changes.json +10 -0
  578. package/src/crypto-shredding/changes.json +6 -0
  579. package/src/custom-fields/changes.json +8 -0
  580. package/src/delivery/changes.json +12 -0
  581. package/src/derivatives-sharp/changes.json +8 -0
  582. package/src/document-ingest-foundation/changes.json +8 -0
  583. package/src/file-derivatives/changes.json +8 -0
  584. package/src/file-foundation/changes.json +8 -0
  585. package/src/file-provider-inmemory/changes.json +10 -1
  586. package/src/file-provider-s3/changes.json +22 -0
  587. package/src/folders/changes.json +8 -0
  588. package/src/folders-user-data/changes.json +10 -1
  589. package/src/form-draft/changes.json +8 -0
  590. package/src/form-draft-user-data/changes.json +10 -1
  591. package/src/foundation-shared/changes.json +8 -1
  592. package/src/host-routing/changes.json +8 -0
  593. package/src/inbound-mail-foundation/changes.json +8 -0
  594. package/src/inbound-provider-imap/changes.json +8 -0
  595. package/src/inbound-provider-inmemory/changes.json +10 -1
  596. package/src/ledger/changes.json +8 -0
  597. package/src/legal-pages/changes.json +6 -0
  598. package/src/mail-foundation/changes.json +10 -1
  599. package/src/mail-transport-inmemory/changes.json +10 -1
  600. package/src/mail-transport-smtp/changes.json +15 -0
  601. package/src/notes-history/changes.json +8 -0
  602. package/src/notes-history-user-data/changes.json +8 -0
  603. package/src/presets/changes.json +6 -0
  604. package/src/readiness/changes.json +10 -1
  605. package/src/secrets/changes.json +18 -0
  606. package/src/subscription-stripe/changes.json +6 -0
  607. package/src/tags/changes.json +8 -0
  608. package/src/template-resolver/changes.json +6 -0
  609. package/src/template-resolver-user-data/changes.json +10 -0
  610. package/src/tenant-settings/changes.json +10 -1
  611. package/src/tier-engine/changes.json +8 -0
  612. package/src/user-data-rights/changes.json +6 -0
  613. package/src/waitlist/changes.json +7 -0
  614. package/src/workflow-runner/changes.json +8 -0
  615. package/dist/file-provider-s3-env/index.d.ts +0 -8
  616. package/dist/file-provider-s3-env/index.js +0 -7
  617. package/dist/files-provider-s3/index.d.ts +0 -5
  618. package/dist/files-provider-s3/index.js +0 -5
  619. package/src/file-provider-s3-env/changes.json +0 -1
  620. package/src/files-provider-s3/changes.json +0 -1
@@ -1,4 +1,4 @@
1
- import type { RenderKind as RenderKindLocal } from "../template-resolver/index.js";
1
+ import type { RenderKind as RenderKindLocal } from "../template-resolver/index.ts";
2
2
  export declare const RENDERER_EXTENSION: "renderer";
3
- export { CONTENT_FORMATS, type ContentFormat, RENDER_KINDS, type RenderKind, } from "../template-resolver/index.js";
3
+ export { CONTENT_FORMATS, type ContentFormat, RENDER_KINDS, type RenderKind, } from "../template-resolver/index.ts";
4
4
  export declare const DEFAULT_PLUGIN_BY_KIND: Readonly<Record<RenderKindLocal, string>>;
@@ -1,5 +1,5 @@
1
1
  import { type Registry } from "@cosmicdrift/kumiko-framework/engine";
2
- import { type RendererPlugin } from "./types.js";
2
+ import { type RendererPlugin } from "./types.ts";
3
3
  export declare function createRendererFoundationFeature(): import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
4
4
  readonly exports: {};
5
5
  };
@@ -1,5 +1,5 @@
1
- export { attachmentFileNameSchema } from "../shared/index.js";
2
- export { createRendererFoundationApi, type RendererFoundationApi, requireRendererFoundation, } from "./api.js";
3
- export { CONTENT_FORMATS, type ContentFormat, DEFAULT_PLUGIN_BY_KIND, RENDER_KINDS, RENDERER_EXTENSION, type RenderKind, } from "./constants.js";
4
- export { collectRendererPlugins, createRendererFoundationFeature } from "./feature.js";
5
- export { type DocumentPayload, type DocumentPdfDraft, type DocumentPdfPayload, type DocumentPreview, type DocumentPreviewRequest, type FileAttachmentRef, type ImageOptions, type InlineAttachmentRef, isRendererRegistrationPlugin, type MailAttachmentRef, type MailDraft, type MailPayload, type PdfOptions, type RenderedPdfAttachmentRef, type RenderedTemplateRef, type RendererContext, RendererError, type RendererPlugin, type RendererRegistrationPlugin, type RenderProvenance, type RenderRequest, type RenderResponse, } from "./types.js";
1
+ export { attachmentFileNameSchema } from "../shared/index.ts";
2
+ export { createRendererFoundationApi, type RendererFoundationApi, requireRendererFoundation, } from "./api.ts";
3
+ export { CONTENT_FORMATS, type ContentFormat, DEFAULT_PLUGIN_BY_KIND, RENDER_KINDS, RENDERER_EXTENSION, type RenderKind, } from "./constants.ts";
4
+ export { collectRendererPlugins, createRendererFoundationFeature } from "./feature.ts";
5
+ export { type DocumentPayload, type DocumentPdfDraft, type DocumentPdfPayload, type DocumentPreview, type DocumentPreviewRequest, type FileAttachmentRef, type ImageOptions, type InlineAttachmentRef, isRendererRegistrationPlugin, type MailAttachmentRef, type MailChrome, type MailChromeLink, type MailChromeRequest, type MailDraft, type MailPayload, type PdfOptions, type RenderedPdfAttachmentRef, type RenderedTemplateRef, type RendererContext, RendererError, type RendererPlugin, type RendererRegistrationPlugin, type RenderProvenance, type RenderRequest, type RenderResponse, } from "./types.ts";
@@ -1,8 +1,8 @@
1
1
  import type { DbRunner, TenantDb } from "@cosmicdrift/kumiko-framework/db";
2
2
  import type { ConfigAccessor, Registry, TenantId } from "@cosmicdrift/kumiko-framework/engine";
3
3
  import type { FileContext } from "@cosmicdrift/kumiko-framework/files";
4
- import type { LinkedResourceEntry, MailTemplateMeta, PdfPageFormat, PdfTemplateMeta, TemplateScope } from "../template-resolver/index.js";
5
- import { type ContentFormat, RENDERER_EXTENSION, type RenderKind } from "./constants.js";
4
+ import type { LinkedResourceEntry, MailTemplateMeta, PdfPageFormat, PdfTemplateMeta, TemplateScope } from "../template-resolver/index.ts";
5
+ import { type ContentFormat, RENDERER_EXTENSION, type RenderKind } from "./constants.ts";
6
6
  export type RenderRequest = {
7
7
  kind: "mail";
8
8
  payload: MailPayload;
@@ -142,12 +142,34 @@ export type RendererContext = {
142
142
  /** Only plugins that embed resource bytes (PDF) need it; without it images are dropped. */
143
143
  readonly filesForTenant?: (tenantId: string) => FileContext | undefined;
144
144
  };
145
+ export type MailChromeLink = {
146
+ readonly label: string;
147
+ readonly url: string;
148
+ };
149
+ /** The tenant's mail look with every text resolved for one locale, for pages a
150
+ * recipient reaches from a mail link. URLs are http(s) only, the logo https only,
151
+ * the accent color a #rrggbb hex. */
152
+ export type MailChrome = {
153
+ readonly tenantName: string;
154
+ readonly brandSuffix: string;
155
+ readonly logoUrl?: string;
156
+ readonly accentColor?: string;
157
+ readonly siteUrl?: string;
158
+ readonly footerText?: string;
159
+ readonly imprint?: MailChromeLink;
160
+ readonly privacy?: MailChromeLink;
161
+ };
162
+ export type MailChromeRequest = {
163
+ readonly locale: string;
164
+ };
145
165
  export type RendererPlugin = {
146
166
  readonly name: string;
147
167
  readonly kinds: ReadonlyArray<RenderKind>;
148
168
  render(req: RenderRequest, ctx: RendererContext): Promise<RenderResponse>;
149
169
  /** Optional: plugins that print documents offer a preview that never reaches the print service. */
150
170
  previewDocument?(req: DocumentPreviewRequest, ctx: RendererContext): Promise<DocumentPreview>;
171
+ /** Optional: mail plugins hand out their brand row and footer for pages outside a mail. */
172
+ readMailChrome?(req: MailChromeRequest, ctx: RendererContext): Promise<MailChrome>;
151
173
  };
152
174
  export declare class RendererError extends Error {
153
175
  readonly code: "no_plugin_for_kind" | "invalid_payload" | "unavailable" | "other";
@@ -1,4 +1,4 @@
1
1
  import { type FeatureDefinition } from "@cosmicdrift/kumiko-framework/engine";
2
- import { type RenderRequest, type RenderResponse } from "../renderer-foundation/index.js";
2
+ import { type RenderRequest, type RenderResponse } from "../renderer-foundation/index.ts";
3
3
  export declare function renderTablePdfRequest(req: RenderRequest): Promise<RenderResponse>;
4
4
  export declare function createRendererPdfFeature(): FeatureDefinition;
@@ -1,2 +1,2 @@
1
- export { createRendererPdfFeature } from "./feature.js";
2
- export { type PdfTableColumn, type PdfTableDocument, type PdfTableOptions, type PdfTableResult, pdfTableDocumentSchema, renderTablePdf, } from "./render-table-pdf.js";
1
+ export { createRendererPdfFeature } from "./feature.ts";
2
+ export { type PdfTableColumn, type PdfTableDocument, type PdfTableOptions, type PdfTableResult, pdfTableDocumentSchema, renderTablePdf, } from "./render-table-pdf.ts";
@@ -1,5 +1,5 @@
1
1
  import * as z from "zod";
2
- import type { PdfPageFormat } from "../template-resolver/index.js";
2
+ import type { PdfPageFormat } from "../template-resolver/index.ts";
3
3
  declare const pdfTableColumnSchema: z.ZodReadonly<z.ZodObject<{
4
4
  header: z.ZodString;
5
5
  weight: z.ZodOptional<z.ZodNumber>;
@@ -6,4 +6,11 @@ export declare const SECRETS_ERROR_KEYS: {
6
6
  readonly writeDenied: "secrets.errors.writeDenied";
7
7
  readonly invalidValue: "secrets.errors.invalidValue";
8
8
  };
9
+ export declare const SecretsHandlers: {
10
+ readonly set: "secrets:write:set";
11
+ readonly delete: "secrets:write:delete";
12
+ };
13
+ export declare const SecretsQueries: {
14
+ readonly list: "secrets:query:list";
15
+ };
9
16
  export declare const INVALID_SECRET_VALUE_CODE: "invalid_secret_value";
@@ -14,4 +14,11 @@ export const SECRETS_ERROR_KEYS = {
14
14
  writeDenied: "secrets.errors.writeDenied",
15
15
  invalidValue: "secrets.errors.invalidValue",
16
16
  };
17
+ export const SecretsHandlers = {
18
+ set: "secrets:write:set",
19
+ delete: "secrets:write:delete",
20
+ };
21
+ export const SecretsQueries = {
22
+ list: "secrets:query:list",
23
+ };
17
24
  export const INVALID_SECRET_VALUE_CODE = "invalid_secret_value";
@@ -1,4 +1,4 @@
1
1
  import type { DbRunner } from "@cosmicdrift/kumiko-framework/db";
2
2
  import type { TenantId } from "@cosmicdrift/kumiko-framework/engine";
3
- import type { StoredEnvelope } from "../../table.js";
3
+ import type { StoredEnvelope } from "../../table.ts";
4
4
  export declare function selectTenantSecretEnvelope(db: DbRunner, tenantId: TenantId, key: string): Promise<StoredEnvelope | undefined>;
@@ -1,4 +1,5 @@
1
1
  import { type AccessRule, type FeatureDefinition } from "@cosmicdrift/kumiko-framework/engine";
2
+ import { type FeatureWithEnvSchema } from "@cosmicdrift/kumiko-framework/env";
2
3
  import type { SecretsContext } from "@cosmicdrift/kumiko-framework/secrets";
3
4
  import * as z from "zod";
4
5
  /**
@@ -20,8 +21,9 @@ export declare const secretsEnvSchema: z.ZodObject<{
20
21
  KUMIKO_SECRETS_MASTER_KEY_V1: z.ZodString;
21
22
  KUMIKO_SECRETS_MASTER_KEY_CURRENT_VERSION: z.ZodDefault<z.ZodString>;
22
23
  }, z.core.$strip>;
23
- export { createSecretsContext, type SecretsContext, type SecretsContextOptions, TENANT_SECRET_READ_EVENT, } from "./secrets-context.js";
24
- export { type StoredEnvelope, type StoredMetadata, tenantSecretsTable } from "./table.js";
24
+ export { createSecretsContext, type SecretsContext, type SecretsContextOptions, TENANT_SECRET_READ_EVENT, } from "./secrets-context.ts";
25
+ export { type StoredEnvelope, type StoredMetadata, tenantSecretsTable } from "./table.ts";
26
+ export declare const JOIN_REQUEST_TRANSACTION_REASON = "the secret write runs on the request transaction so a failing batch rolls it back together with the config writes";
25
27
  export declare function requireSecretsContext(ctx: {
26
28
  readonly secrets?: SecretsContext;
27
29
  readonly _userId?: string | undefined;
@@ -42,4 +44,4 @@ export type SecretsFeatureOptions = {
42
44
  /** Shorthand for { access: { roles } }. Mutually exclusive with `access`. */
43
45
  readonly roles?: readonly string[];
44
46
  };
45
- export declare function createSecretsFeature(opts?: SecretsFeatureOptions): FeatureDefinition;
47
+ export declare function createSecretsFeature(opts?: SecretsFeatureOptions): FeatureWithEnvSchema<FeatureDefinition, typeof secretsEnvSchema.shape>;
@@ -1,4 +1,5 @@
1
- import { defineFeature, } from "@cosmicdrift/kumiko-framework/engine";
1
+ import { defineFeature, SYSTEM_ROLE, } from "@cosmicdrift/kumiko-framework/engine";
2
+ import { featureWithEnvSchema } from "@cosmicdrift/kumiko-framework/env";
2
3
  import { InternalError } from "@cosmicdrift/kumiko-framework/errors";
3
4
  import { SETTINGS_HUB_I18N } from "@cosmicdrift/kumiko-framework/i18n";
4
5
  import * as z from "zod";
@@ -44,6 +45,9 @@ export const secretsEnvSchema = z.object({
44
45
  });
45
46
  export { createSecretsContext, TENANT_SECRET_READ_EVENT, } from "./secrets-context.js";
46
47
  export { tenantSecretsTable } from "./table.js";
48
+ // The settings form saves config values and secrets in one /api/batch; the secret
49
+ // write has to join that transaction so a rejected command rolls it back too.
50
+ export const JOIN_REQUEST_TRANSACTION_REASON = "the secret write runs on the request transaction so a failing batch rolls it back together with the config writes";
47
51
  // AppContext carries ctx.secrets via extraContext. requireSecretsContext
48
52
  // wraps that raw context so every `.get(...)` call auto-includes the
49
53
  // current user + handler as audit metadata — feature code can't forget
@@ -90,10 +94,19 @@ function resolveSecretsAccess(opts) {
90
94
  return { roles: opts.roles };
91
95
  return DEFAULT_SECRETS_ACCESS;
92
96
  }
97
+ // Server-side system writes (dispatchSystemWrite, e.g. a wire hook migrating credentials) take the
98
+ // same declared-key gate, value check and cache-sync announce as an admin instead of bypassing them
99
+ // via SecretsContext.set. The system role is in-process only and never minted into a session.
100
+ function withSystemWriter(rule) {
101
+ if (!("roles" in rule) || rule.roles.includes(SYSTEM_ROLE))
102
+ return rule;
103
+ return { ...rule, roles: [SYSTEM_ROLE, ...rule.roles] };
104
+ }
93
105
  export function createSecretsFeature(opts = {}) {
94
106
  const access = resolveSecretsAccess(opts);
95
- return defineFeature(SECRETS_FEATURE_NAME, (r) => {
96
- r.describe('Stores arbitrary per-tenant secrets (API keys, tokens, credentials) encrypted at rest using AES-256 with a KEK loaded from `KUMIKO_SECRETS_MASTER_KEY_V1` (and successive versions for rotation). Read a secret in handlers via `ctx.secrets.get(tenantId, handle)`, which automatically appends a `tenantSecretRead` audit event so every access is traceable. A `rotate` job re-encrypts all envelopes after a KEK version bump. The `set`/`delete`/`list` handlers share one access rule — default { roles: ["TenantAdmin"] }; adopt the host\'s role vocabulary with createSecretsFeature({ roles }) or open it to every authenticated tenant user with { access: { openToAll: { reason } } } (larger blast radius: any tenant member can then read secret previews and write/delete secrets, not just admins).');
107
+ const writeAccess = withSystemWriter(access);
108
+ const feature = defineFeature(SECRETS_FEATURE_NAME, (r) => {
109
+ r.describe('Stores arbitrary per-tenant secrets (API keys, tokens, credentials) encrypted at rest using AES-256 with a KEK loaded from `KUMIKO_SECRETS_MASTER_KEY_V1` (and successive versions for rotation). Read a secret in handlers via `ctx.secrets.get(tenantId, handle)`, which automatically appends a `tenantSecretRead` audit event so every access is traceable. A `rotate` job re-encrypts all envelopes after a KEK version bump. The `set`/`delete`/`list` handlers share one access rule — default { roles: ["TenantAdmin"] }; adopt the host\'s role vocabulary with createSecretsFeature({ roles }) or open it to every authenticated tenant user with { access: { openToAll: { reason } } } (larger blast radius: any tenant member can then read secret previews and write/delete secrets, not just admins). Server-side code writes a tenant secret with `dispatchSystemWrite({ handlerQn: SecretsHandlers.set, payload, tenantId })`: set and delete also admit the in-process system identity, so such writes pass the same declared-key and value checks.');
97
110
  r.uiHints({
98
111
  displayLabel: "Tenant Secrets",
99
112
  category: "infrastructure",
@@ -128,8 +141,8 @@ export function createSecretsFeature(opts = {}) {
128
141
  // The rotation job deliberately reaches for ctx.db.unsafeRaw() (raw,
129
142
  // cross-tenant) because rotation is a deployment-wide operation — no
130
143
  // feature-wide r.systemScope() needed.
131
- r.writeHandler(createSetHandler(access));
132
- r.writeHandler(createDeleteHandler(access));
144
+ r.writeHandler(createSetHandler(writeAccess));
145
+ r.writeHandler(createDeleteHandler(writeAccess));
133
146
  r.queryHandler(createListHandler(access));
134
147
  // Manual-only by design: ops triggers rotation after a KEK version flip.
135
148
  // BullMQ delivers to exactly one worker, so running it against a busy
@@ -149,4 +162,5 @@ export function createSecretsFeature(opts = {}) {
149
162
  // ops-tool (see docs/plans/architecture/event-dispatcher.md §retention).
150
163
  // No per-feature retention-job anymore.
151
164
  });
165
+ return featureWithEnvSchema(feature, secretsEnvSchema);
152
166
  }
@@ -2,8 +2,8 @@ import { defineWriteHandler } from "@cosmicdrift/kumiko-framework/engine";
2
2
  import { failNotFound } from "@cosmicdrift/kumiko-framework/errors";
3
3
  import * as z from "zod";
4
4
  import { announceSecretChange } from "../announce-secret-change.js";
5
- import { DEFAULT_SECRETS_ACCESS } from "../constants.js";
6
- import { requireSecretsContext } from "../feature.js";
5
+ import { DEFAULT_SECRETS_ACCESS, SecretsHandlers } from "../constants.js";
6
+ import { JOIN_REQUEST_TRANSACTION_REASON, requireSecretsContext } from "../feature.js";
7
7
  import { checkSecretKeyWrite } from "../write-gate.js";
8
8
  export function createDeleteHandler(access = DEFAULT_SECRETS_ACCESS) {
9
9
  return defineWriteHandler({
@@ -14,8 +14,9 @@ export function createDeleteHandler(access = DEFAULT_SECRETS_ACCESS) {
14
14
  key: z.string().min(1).max(100),
15
15
  }),
16
16
  access,
17
+ escapeHatch: { grants: ["unsafeRaw"], reason: JOIN_REQUEST_TRANSACTION_REASON },
17
18
  handler: async (event, ctx) => {
18
- const secrets = requireSecretsContext(ctx, "secrets:write:delete");
19
+ const secrets = requireSecretsContext(ctx, SecretsHandlers.delete).withRunner(ctx.db.unsafeRaw());
19
20
  const gate = checkSecretKeyWrite(ctx.registry, event.user.roles, event.payload.key, {
20
21
  allowUndeclared: true,
21
22
  });
@@ -1,6 +1,6 @@
1
1
  import { type DbConnection } from "@cosmicdrift/kumiko-framework/db";
2
2
  import type { JobContext } from "@cosmicdrift/kumiko-framework/engine";
3
- import { type ChunkedMigrationStopReason } from "../../shared/index.js";
3
+ import { type ChunkedMigrationStopReason } from "../../shared/index.ts";
4
4
  export type RotateJobPayload = {
5
5
  readonly batchSize?: number;
6
6
  readonly maxDurationMs?: number;
@@ -1,8 +1,8 @@
1
1
  import { defineWriteHandler } from "@cosmicdrift/kumiko-framework/engine";
2
2
  import * as z from "zod";
3
3
  import { announceSecretChange } from "../announce-secret-change.js";
4
- import { DEFAULT_SECRETS_ACCESS } from "../constants.js";
5
- import { requireSecretsContext } from "../feature.js";
4
+ import { DEFAULT_SECRETS_ACCESS, SecretsHandlers } from "../constants.js";
5
+ import { JOIN_REQUEST_TRANSACTION_REASON, requireSecretsContext } from "../feature.js";
6
6
  import { checkSecretKeyWrite, checkSecretValue } from "../write-gate.js";
7
7
  export function createSetHandler(access = DEFAULT_SECRETS_ACCESS) {
8
8
  return defineWriteHandler({
@@ -21,8 +21,9 @@ export function createSetHandler(access = DEFAULT_SECRETS_ACCESS) {
21
21
  hint: z.string().max(200).optional(),
22
22
  }),
23
23
  access,
24
+ escapeHatch: { grants: ["unsafeRaw"], reason: JOIN_REQUEST_TRANSACTION_REASON },
24
25
  handler: async (event, ctx) => {
25
- const secrets = requireSecretsContext(ctx, "secrets:write:set");
26
+ const secrets = requireSecretsContext(ctx, SecretsHandlers.set).withRunner(ctx.db.unsafeRaw());
26
27
  const { key, value, redactedPreview, hint } = event.payload;
27
28
  // Preview-priority: explicit payload param > feature-declared redact
28
29
  // (via r.secret()) > generic default. A feature that declared a
@@ -1,7 +1,7 @@
1
- export { DEFAULT_SECRETS_ACCESS, DEFAULT_SECRETS_ROLES, INVALID_SECRET_VALUE_CODE, SECRETS_ERROR_KEYS, } from "./constants.js";
2
- export { createSecretsContext, createSecretsFeature, requireSecretsContext, SECRETS_FEATURE_NAME, SECRETS_MASTER_KEK_ENV_KEYS, type SecretsContext, type SecretsContextOptions, type SecretsFeatureOptions, type StoredEnvelope, type StoredMetadata, secretsEnvSchema, TENANT_SECRET_READ_EVENT, tenantSecretsTable, } from "./feature.js";
3
- export { createDeleteHandler } from "./handlers/delete.write.js";
4
- export { createListHandler } from "./handlers/list.query.js";
5
- export { type RotateJobPayload, type RotateJobResult, rotateJob, } from "./handlers/rotate.job.js";
6
- export { createSetHandler } from "./handlers/set.write.js";
7
- export { isInvalidSecretValueError } from "./write-gate.js";
1
+ export { DEFAULT_SECRETS_ACCESS, DEFAULT_SECRETS_ROLES, INVALID_SECRET_VALUE_CODE, SECRETS_ERROR_KEYS, SecretsHandlers, SecretsQueries, } from "./constants.ts";
2
+ export { createSecretsContext, createSecretsFeature, requireSecretsContext, SECRETS_FEATURE_NAME, SECRETS_MASTER_KEK_ENV_KEYS, type SecretsContext, type SecretsContextOptions, type SecretsFeatureOptions, type StoredEnvelope, type StoredMetadata, secretsEnvSchema, TENANT_SECRET_READ_EVENT, tenantSecretsTable, } from "./feature.ts";
3
+ export { createDeleteHandler } from "./handlers/delete.write.ts";
4
+ export { createListHandler } from "./handlers/list.query.ts";
5
+ export { type RotateJobPayload, type RotateJobResult, rotateJob, } from "./handlers/rotate.job.ts";
6
+ export { createSetHandler } from "./handlers/set.write.ts";
7
+ export { isInvalidSecretValueError } from "./write-gate.ts";
@@ -1,4 +1,4 @@
1
- export { DEFAULT_SECRETS_ACCESS, DEFAULT_SECRETS_ROLES, INVALID_SECRET_VALUE_CODE, SECRETS_ERROR_KEYS, } from "./constants.js";
1
+ export { DEFAULT_SECRETS_ACCESS, DEFAULT_SECRETS_ROLES, INVALID_SECRET_VALUE_CODE, SECRETS_ERROR_KEYS, SecretsHandlers, SecretsQueries, } from "./constants.js";
2
2
  export { createSecretsContext, createSecretsFeature, requireSecretsContext, SECRETS_FEATURE_NAME, SECRETS_MASTER_KEK_ENV_KEYS, secretsEnvSchema, TENANT_SECRET_READ_EVENT, tenantSecretsTable, } from "./feature.js";
3
3
  export { createDeleteHandler } from "./handlers/delete.write.js";
4
4
  export { createListHandler } from "./handlers/list.query.js";
@@ -1,7 +1,7 @@
1
1
  import { type DbConnection } from "@cosmicdrift/kumiko-framework/db";
2
2
  import { type DekCache, type MasterKeyProvider, type SecretsContext } from "@cosmicdrift/kumiko-framework/secrets";
3
3
  import * as z from "zod";
4
- import { type SecretValueSchemaSource } from "./write-gate.js";
4
+ import { type SecretValueSchemaSource } from "./write-gate.ts";
5
5
  export type { Secret, SecretsContext } from "@cosmicdrift/kumiko-framework/secrets";
6
6
  export type SecretsContextOptions = {
7
7
  readonly db: DbConnection;
@@ -1,7 +1,7 @@
1
1
  import { type FeatureDefinition } from "@cosmicdrift/kumiko-framework/engine";
2
- import { SEO_DEFAULT_PATHS } from "./constants.js";
3
- import { type RobotsPolicy } from "./robots-txt.js";
4
- import { type SitemapEntry } from "./sitemap.js";
2
+ import { SEO_DEFAULT_PATHS } from "./constants.ts";
3
+ import { type RobotsPolicy } from "./robots-txt.ts";
4
+ import { type SitemapEntry } from "./sitemap.ts";
5
5
  export type ManagedPagesDiscoveryOptions = {
6
6
  /** Same per-host tenant resolver the app already passes to
7
7
  * createManagedPagesFeature — needed to X-Tenant-scope the anonymous
@@ -1,6 +1,6 @@
1
- export { SEO_CONFIG_KEYS, SEO_CONFIG_QN, SEO_DEFAULT_PATHS, SEO_FEATURE } from "./constants.js";
2
- export { createSeoFeature, type ManagedPagesDiscoveryOptions, runSeoBootCheck, type SeoBootCheckCtx, type SeoOptions, } from "./feature.js";
3
- export { buildLlmsTxt, type LlmsTxtInput, type LlmsTxtLink, type LlmsTxtSection, } from "./llms-txt.js";
4
- export { buildRobotsTxt, type RobotsPolicy } from "./robots-txt.js";
5
- export { type FaqItem, faqPageSchema, type OrganizationSchemaInput, organizationSchema, type WebPageSchemaInput, webPageSchema, } from "./schema-builders.js";
6
- export { buildSitemapXml, type SitemapEntry } from "./sitemap.js";
1
+ export { SEO_CONFIG_KEYS, SEO_CONFIG_QN, SEO_DEFAULT_PATHS, SEO_FEATURE } from "./constants.ts";
2
+ export { createSeoFeature, type ManagedPagesDiscoveryOptions, runSeoBootCheck, type SeoBootCheckCtx, type SeoOptions, } from "./feature.ts";
3
+ export { buildLlmsTxt, type LlmsTxtInput, type LlmsTxtLink, type LlmsTxtSection, } from "./llms-txt.ts";
4
+ export { buildRobotsTxt, type RobotsPolicy } from "./robots-txt.ts";
5
+ export { type FaqItem, faqPageSchema, type OrganizationSchemaInput, organizationSchema, type WebPageSchemaInput, webPageSchema, } from "./schema-builders.ts";
6
+ export { buildSitemapXml, type SitemapEntry } from "./sitemap.ts";
@@ -1,5 +1,5 @@
1
1
  import { type FeatureDefinition } from "@cosmicdrift/kumiko-framework/engine";
2
- import { type SessionAllOthersRevoker, type SessionMassRevoker } from "./session-callbacks.js";
2
+ import { type SessionAllOthersRevoker, type SessionMassRevoker } from "./session-callbacks.ts";
3
3
  export type SessionsFeatureOptions = {
4
4
  readonly autoRevokeOnPasswordChange?: SessionMassRevoker;
5
5
  readonly expiresInMs?: number;
@@ -1,8 +1,8 @@
1
- export { DEFAULT_SESSION_CACHE_TTL_MS, DEFAULT_SESSION_EXPIRY_MS, SESSION_MINE_SCREEN_ID, SESSIONS_FEATURE, SessionErrors, SessionHandlers, SessionQueries, } from "./constants.js";
2
- export type { BindAutoRevokeOnPasswordChange, SessionsFeatureOptions } from "./feature.js";
3
- export { bindAutoRevokeFromFeature, createSessionsFeature } from "./feature.js";
4
- export { userSessionEntity, userSessionTable } from "./schema/user-session.js";
5
- export type { SessionCallbacks, SessionCallbacksOptions, SessionMassRevoker, } from "./session-callbacks.js";
6
- export { createSessionCallbacks, isPrincipalBlocked } from "./session-callbacks.js";
7
- export type { SessionRevokedPayload } from "./session-revoked-event.js";
8
- export { SESSION_REVOKED_AGGREGATE_TYPE, SESSION_REVOKED_EVENT_QN, SESSION_REVOKED_EVENT_SHORT, sessionRevokedSchema, } from "./session-revoked-event.js";
1
+ export { DEFAULT_SESSION_CACHE_TTL_MS, DEFAULT_SESSION_EXPIRY_MS, SESSION_MINE_SCREEN_ID, SESSIONS_FEATURE, SessionErrors, SessionHandlers, SessionQueries, } from "./constants.ts";
2
+ export type { BindAutoRevokeOnPasswordChange, SessionsFeatureOptions } from "./feature.ts";
3
+ export { bindAutoRevokeFromFeature, createSessionsFeature } from "./feature.ts";
4
+ export { userSessionEntity, userSessionTable } from "./schema/user-session.ts";
5
+ export type { SessionCallbacks, SessionCallbacksOptions, SessionMassRevoker, } from "./session-callbacks.ts";
6
+ export { createSessionCallbacks, isPrincipalBlocked } from "./session-callbacks.ts";
7
+ export type { SessionRevokedPayload } from "./session-revoked-event.ts";
8
+ export { SESSION_REVOKED_AGGREGATE_TYPE, SESSION_REVOKED_EVENT_QN, SESSION_REVOKED_EVENT_SHORT, sessionRevokedSchema, } from "./session-revoked-event.ts";
@@ -1,7 +1,7 @@
1
1
  import type { SessionChecker, SessionCreator, SessionMassRevoker, SessionRevoker } from "@cosmicdrift/kumiko-framework/api";
2
2
  export type { SessionMassRevoker } from "@cosmicdrift/kumiko-framework/api";
3
3
  import type { DbConnection } from "@cosmicdrift/kumiko-framework/db";
4
- import { isPrincipalBlocked } from "../user/index.js";
4
+ import { isPrincipalBlocked } from "../user/index.ts";
5
5
  export { isPrincipalBlocked };
6
6
  export type SessionAllOthersRevoker = (userId: string, currentSid: string | undefined) => Promise<number>;
7
7
  export type SessionCallbacksOptions = {
@@ -1,7 +1,7 @@
1
1
  import type { AuthRoutesConfig, SessionCreator } from "@cosmicdrift/kumiko-framework/api";
2
2
  import type { SessionUser } from "@cosmicdrift/kumiko-framework/engine";
3
3
  import type { LateBoundHolder } from "@cosmicdrift/kumiko-testing/helpers";
4
- import type { SessionCallbacks, SessionMassRevoker } from "./session-callbacks.js";
4
+ import type { SessionCallbacks, SessionMassRevoker } from "./session-callbacks.ts";
5
5
  export type BoundSessionCallbacks = {
6
6
  /** auth-config fragment: creator + revoker + checker, all late-bound. */
7
7
  asAuthConfig(): Pick<AuthRoutesConfig, "sessionCreator" | "sessionRevoker" | "sessionChecker">;
@@ -1,31 +1,31 @@
1
- export { collectErasureFailure, throwIfErasureFailed } from "./assert-erased.js";
2
- export { assertNoWhereRuleInOwnershipWrite } from "./assert-no-where-rule-in-ownership-write.js";
3
- export { attachmentFileNameSchema, sanitizePdfAttachmentFileName, } from "./attachment-file-name.js";
4
- export { type ChunkedMigrationOptions, type ChunkedMigrationResult, type ChunkedMigrationStopReason, type MigrationRowOutcome, runChunkedMigration, } from "./chunked-entity-migration.js";
5
- export { classifyStoredEnvelope, type StoredEnvelopeClassification, } from "./classify-stored-envelope.js";
6
- export { decryptStoredPii } from "./decrypt-stored-pii.js";
7
- export { encryptForDirectWrite } from "./encrypt-for-direct-write.js";
8
- export { entitiesOf } from "./entities-of.js";
9
- export { isWithinGracePeriod } from "./grace-period.js";
10
- export { isIdentityV3Hash, verifyIdentityV3Hash } from "./identity-v3-hash.js";
11
- export { isTenantDb } from "./is-tenant-db.js";
12
- export { createLockoutCounter, type LockoutCounterState } from "./lockout-counter.js";
13
- export { mailHeading, mailParagraph, mailRepeatedRows } from "./mail-template-body.js";
14
- export { mapWithConcurrency } from "./map-with-concurrency.js";
15
- export { denyUnlessJoinRowParentVisible, hostRowIsGone, joinRowParentIsVisible, parentRowIsVisible, } from "./parent-visibility.js";
16
- export { hashPassword, verifyDummyPassword, verifyPassword } from "./password-hashing.js";
17
- export { rateLimitedTextResponse } from "./rate-limited-text-response.js";
18
- export { redactBotTokens, redactEmailAddresses, redactErrorText, redactUrls, } from "./redact.js";
19
- export { REDACTED_PII_PLACEHOLDER, redactPiiCiphertext } from "./redact-pii-ciphertext.js";
20
- export { requireForTenant } from "./require-for-tenant.js";
21
- export { extensionForResourceContentType, isResourceImageContentType, isResourceImageFormat, RESOURCE_IMAGE_FORMATS, type ResourceImageContentType, type ResourceImageFormat, } from "./resource-image-formats.js";
22
- export { type RowBoundGrantResult, redeemRowBoundGrant, signRowBoundGrant, } from "./row-bound-grant.js";
23
- export { runInSubTransaction } from "./run-in-sub-transaction.js";
24
- export { registrationLocaleFromRequest, sessionLocaleField } from "./session-locale-field.js";
25
- export { sessionTimezoneField } from "./session-timezone-field.js";
26
- export { assertNotSvg, MAX_INPUT_PIXELS, SHARP_INPUT_OPTIONS } from "./sharp-input-limits.js";
27
- export { peekTokenSubject, signToken, TokenPurpose, type VerifyResult, verifyToken, } from "./signed-token.js";
28
- export { EXT_SIGNUP_HANDOVER, findSignupHandoverProvider, isSignupHandoverProvider, SIGNUP_HANDOVER_BENIGN_CLAIM_REJECTION_CODE, type SignupHandoverBinding, type SignupHandoverProvider, } from "./signup-handover.js";
29
- export { createSingleUseTokenStore, hashSingleUseToken } from "./single-use-token-store.js";
30
- export type { SystemQueryFn } from "./system-query.js";
31
- export { type BurnResult, burnToken, unburnToken } from "./token-burn-store.js";
1
+ export { collectErasureFailure, throwIfErasureFailed } from "./assert-erased.ts";
2
+ export { assertNoWhereRuleInOwnershipWrite } from "./assert-no-where-rule-in-ownership-write.ts";
3
+ export { attachmentFileNameSchema, sanitizePdfAttachmentFileName, } from "./attachment-file-name.ts";
4
+ export { type ChunkedMigrationOptions, type ChunkedMigrationResult, type ChunkedMigrationStopReason, type MigrationRowOutcome, runChunkedMigration, } from "./chunked-entity-migration.ts";
5
+ export { classifyStoredEnvelope, type StoredEnvelopeClassification, } from "./classify-stored-envelope.ts";
6
+ export { decryptStoredPii } from "./decrypt-stored-pii.ts";
7
+ export { encryptForDirectWrite } from "./encrypt-for-direct-write.ts";
8
+ export { entitiesOf } from "./entities-of.ts";
9
+ export { isWithinGracePeriod } from "./grace-period.ts";
10
+ export { isIdentityV3Hash, verifyIdentityV3Hash } from "./identity-v3-hash.ts";
11
+ export { isTenantDb } from "./is-tenant-db.ts";
12
+ export { createLockoutCounter, type LockoutCounterState } from "./lockout-counter.ts";
13
+ export { mailHeading, mailParagraph, mailRepeatedRows } from "./mail-template-body.ts";
14
+ export { mapWithConcurrency } from "./map-with-concurrency.ts";
15
+ export { denyUnlessJoinRowParentVisible, hostRowIsGone, joinRowParentIsVisible, parentRowIsVisible, } from "./parent-visibility.ts";
16
+ export { hashPassword, verifyDummyPassword, verifyPassword } from "./password-hashing.ts";
17
+ export { rateLimitedTextResponse } from "./rate-limited-text-response.ts";
18
+ export { redactBotTokens, redactEmailAddresses, redactErrorText, redactUrls, } from "./redact.ts";
19
+ export { REDACTED_PII_PLACEHOLDER, redactPiiCiphertext } from "./redact-pii-ciphertext.ts";
20
+ export { requireForTenant } from "./require-for-tenant.ts";
21
+ export { extensionForResourceContentType, isResourceImageContentType, isResourceImageFormat, RESOURCE_IMAGE_FORMATS, type ResourceImageContentType, type ResourceImageFormat, } from "./resource-image-formats.ts";
22
+ export { type RowBoundGrantResult, redeemRowBoundGrant, signRowBoundGrant, } from "./row-bound-grant.ts";
23
+ export { runInSubTransaction } from "./run-in-sub-transaction.ts";
24
+ export { registrationLocaleFromRequest, sessionLocaleField } from "./session-locale-field.ts";
25
+ export { sessionTimezoneField } from "./session-timezone-field.ts";
26
+ export { assertNotSvg, MAX_INPUT_PIXELS, SHARP_INPUT_OPTIONS } from "./sharp-input-limits.ts";
27
+ export { peekTokenSubject, signToken, TokenPurpose, type VerifyResult, verifyToken, } from "./signed-token.ts";
28
+ export { EXT_SIGNUP_HANDOVER, findSignupHandoverProvider, isSignupHandoverProvider, SIGNUP_HANDOVER_BENIGN_CLAIM_REJECTION_CODE, type SignupHandoverBinding, type SignupHandoverProvider, } from "./signup-handover.ts";
29
+ export { createSingleUseTokenStore, hashSingleUseToken } from "./single-use-token-store.ts";
30
+ export type { SystemQueryFn } from "./system-query.ts";
31
+ export { type BurnResult, burnToken, unburnToken } from "./token-burn-store.ts";
@@ -1,6 +1,6 @@
1
1
  import * as z from "zod";
2
- import { type MailSpec } from "./mail-runner.js";
3
- import { type WebhookSpec } from "./webhook-runner.js";
2
+ import { type MailSpec } from "./mail-runner.ts";
3
+ import { type WebhookSpec } from "./webhook-runner.ts";
4
4
  export declare const dispatchRequestedPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5
5
  stepKind: z.ZodLiteral<"webhook.send">;
6
6
  url: z.ZodString;
@@ -1,3 +1,3 @@
1
- export { createStepDispatcherFeature, STEP_DISPATCH_AGGREGATE_TYPE, stepDispatcherEnvSchema, } from "./feature.js";
2
- export { type MailDispatchResult, type MailSpec, mailSpecSchema, performMailDispatch, setMailRunner, } from "./mail-runner.js";
3
- export { performWebhookDispatch, readAllowedPrivateWebhookHostsFromEnv, setWebhookFetch, setWebhookHostLookup, WEBHOOK_ALLOWED_PRIVATE_HOSTS_ENV_VAR, WEBHOOK_AUTH_SECRET_KEY_PREFIX, type WebhookDispatchDeps, type WebhookDispatchResult, type WebhookSpec, webhookAuthSecretKey, webhookSpecSchema, } from "./webhook-runner.js";
1
+ export { createStepDispatcherFeature, STEP_DISPATCH_AGGREGATE_TYPE, stepDispatcherEnvSchema, } from "./feature.ts";
2
+ export { type MailDispatchResult, type MailSpec, mailSpecSchema, performMailDispatch, setMailRunner, } from "./mail-runner.ts";
3
+ export { performWebhookDispatch, readAllowedPrivateWebhookHostsFromEnv, setWebhookFetch, setWebhookHostLookup, WEBHOOK_ALLOWED_PRIVATE_HOSTS_ENV_VAR, WEBHOOK_AUTH_SECRET_KEY_PREFIX, type WebhookDispatchDeps, type WebhookDispatchResult, type WebhookSpec, webhookAuthSecretKey, webhookSpecSchema, } from "./webhook-runner.ts";
@@ -1,7 +1,7 @@
1
1
  import { type FeatureDefinition } from "@cosmicdrift/kumiko-framework/engine";
2
2
  import * as z from "zod";
3
- import { type MolliePriceConfig } from "./plugin-methods.js";
4
- import { type MollieClientShape } from "./verify-webhook.js";
3
+ import { type MolliePriceConfig } from "./plugin-methods.ts";
4
+ import { type MollieClientShape } from "./verify-webhook.ts";
5
5
  /**
6
6
  * Env-vars contract for the `subscription-mollie` feature.
7
7
  * Apps load `MOLLIE_API_KEY` from env and forward it to
@@ -1,3 +1,3 @@
1
- export { MOLLIE_PROVIDER_NAME, SUBSCRIPTION_MOLLIE_FEATURE } from "./constants.js";
2
- export { createSubscriptionMollieFeature, type SubscriptionMollieOptions, subscriptionMollieEnvSchema, } from "./feature.js";
3
- export type { MolliePriceConfig } from "./plugin-methods.js";
1
+ export { MOLLIE_PROVIDER_NAME, SUBSCRIPTION_MOLLIE_FEATURE } from "./constants.ts";
2
+ export { createSubscriptionMollieFeature, type SubscriptionMollieOptions, subscriptionMollieEnvSchema, } from "./feature.ts";
3
+ export type { MolliePriceConfig } from "./plugin-methods.ts";
@@ -1,6 +1,6 @@
1
1
  import { type SubscriptionEvent, type SubscriptionEventType, type SubscriptionStatus } from "@cosmicdrift/kumiko-bundled-features/billing-foundation";
2
2
  import type { Payment as MolliePayment, Subscription as MollieSubscription } from "@mollie/api-client";
3
- import type { MolliePriceConfig } from "./plugin-methods.js";
3
+ import type { MolliePriceConfig } from "./plugin-methods.ts";
4
4
  /** Minimal-Subset des Mollie-Clients, das der Plugin nutzt — separat
5
5
  * damit Tests ohne den vollen MollieClient mocken können. Adapter in
6
6
  * feature.ts bridged das gegen den echten SDK. */
@@ -1,4 +1,5 @@
1
1
  import { type FeatureDefinition } from "@cosmicdrift/kumiko-framework/engine";
2
+ import { type FeatureWithEnvSchema } from "@cosmicdrift/kumiko-framework/env";
2
3
  import * as z from "zod";
3
4
  /**
4
5
  * Env-vars contract for the `subscription-stripe` feature — now a **bridge
@@ -12,6 +13,20 @@ export declare const subscriptionStripeEnvSchema: z.ZodObject<{
12
13
  STRIPE_WEBHOOK_SECRET: z.ZodOptional<z.ZodString>;
13
14
  STRIPE_API_KEY: z.ZodOptional<z.ZodString>;
14
15
  }, z.core.$strip>;
16
+ type StripePriceEnvShape<TPrice extends string> = {
17
+ [Key in `STRIPE_PRICE_${TPrice}`]: z.ZodOptional<z.ZodString>;
18
+ };
19
+ /** Stripe env block plus one `STRIPE_PRICE_<NAME>` slot per price the app
20
+ * maps to a tier, e.g. `stripeEnvSchema({ prices: ["PRO", "TEAM"] })`.
21
+ * Shares its bridge fields with `subscriptionStripeEnvSchema`, so spreading
22
+ * it into `composeEnvSchema({ extend })` next to the mounted feature is no
23
+ * key clash. */
24
+ export declare function stripeEnvSchema<const TPrice extends string>(options: {
25
+ readonly prices: readonly TPrice[];
26
+ }): z.ZodObject<{
27
+ STRIPE_WEBHOOK_SECRET: z.ZodOptional<z.ZodString>;
28
+ STRIPE_API_KEY: z.ZodOptional<z.ZodString>;
29
+ } & StripePriceEnvShape<TPrice> extends infer T ? { -readonly [P in keyof T]: T[P]; } : never, z.core.$strip>;
15
30
  export type SubscriptionStripeOptions = {
16
31
  /** Bridge-fallback webhook-secret. Optional: v2 liest aus dem
17
32
  * `subscription-stripe:config:webhook-secret`-Key (backing:"secrets").
@@ -47,4 +62,5 @@ export type SubscriptionStripeOptions = {
47
62
  * registriert den Plugin gegen billing-foundation's "subscriptionProvider"-
48
63
  * extension unter entityName "stripe".
49
64
  */
50
- export declare function createSubscriptionStripeFeature(options?: SubscriptionStripeOptions): FeatureDefinition;
65
+ export declare function createSubscriptionStripeFeature(options?: SubscriptionStripeOptions): FeatureWithEnvSchema<FeatureDefinition, typeof subscriptionStripeEnvSchema.shape>;
66
+ export {};
@@ -31,6 +31,7 @@
31
31
  // scoped SecretsContext als 3. Arg durch, aus dem der Plugin api-key +
32
32
  // webhook-secret un-audited liest (sanctioned framework-internal read).
33
33
  import { access, createSystemConfig, defineFeature, } from "@cosmicdrift/kumiko-framework/engine";
34
+ import { featureWithEnvSchema } from "@cosmicdrift/kumiko-framework/env";
34
35
  import * as z from "zod";
35
36
  import { STRIPE_API_KEY_CONFIG, STRIPE_BILLING_LIVE_CONFIG, STRIPE_PROVIDER_NAME, STRIPE_WEBHOOK_SECRET_CONFIG, SUBSCRIPTION_STRIPE_FEATURE, } from "./constants.js";
36
37
  import { createStripeCancelSubscription, createStripeCheckoutSession, createStripePlanSwitchSession, createStripePortalSession, createStripePriceCache, createStripeRetrievePrices, createStripeRetrieveSubscription, } from "./plugin-methods.js";
@@ -58,6 +59,22 @@ export const subscriptionStripeEnvSchema = z.object({
58
59
  .meta({ kumiko: { pulumi: { secret: true } } })
59
60
  .optional(),
60
61
  });
62
+ /** Stripe env block plus one `STRIPE_PRICE_<NAME>` slot per price the app
63
+ * maps to a tier, e.g. `stripeEnvSchema({ prices: ["PRO", "TEAM"] })`.
64
+ * Shares its bridge fields with `subscriptionStripeEnvSchema`, so spreading
65
+ * it into `composeEnvSchema({ extend })` next to the mounted feature is no
66
+ * key clash. */
67
+ export function stripeEnvSchema(options) {
68
+ const priceShape = Object.fromEntries(options.prices.map((price) => [
69
+ `STRIPE_PRICE_${price}`,
70
+ z
71
+ .string()
72
+ .regex(/^price_/, `STRIPE_PRICE_${price} must start with 'price_'`)
73
+ .optional()
74
+ .describe(`Stripe price id (\`price_...\`) of the ${price} plan.`),
75
+ ]));
76
+ return z.object({ ...subscriptionStripeEnvSchema.shape, ...priceShape });
77
+ }
61
78
  // Validated once at feature-build time (not per-request) so a config typo
62
79
  // (a pasted-twice priceId, a blank string from a bad env-join) fails app
63
80
  // startup instead of silently widening — or narrowing — the one-off
@@ -83,7 +100,7 @@ function validateOneOffPriceIds(priceIds) {
83
100
  */
84
101
  export function createSubscriptionStripeFeature(options = {}) {
85
102
  validateOneOffPriceIds(options.oneOffPriceIds ?? []);
86
- return defineFeature(SUBSCRIPTION_STRIPE_FEATURE, (r) => {
103
+ const feature = defineFeature(SUBSCRIPTION_STRIPE_FEATURE, (r) => {
87
104
  r.describe('Stripe payment provider plugin for `billing-foundation`. Reads its Stripe API key + webhook secret from system config keys with `backing:"secrets"` (envelope-encrypted in the secrets store under the system tenant) and a `billingLive` **system config** flag — all at runtime, so keys rotate and prod goes live without a redeploy. The `mask` on each key derives the sysadmin settings screen + nav, so no app wires a hand-written config UI. Mount via `createSubscriptionStripeFeature({ priceToTier })`; the optional `apiKey`/`webhookSecret` options are env→secrets bridge fallbacks. The plugin always mounts — `createCheckoutSession` throws `feature_disabled` unless `billingLive` is true, so sk_test_ keys in prod never produce a live checkout. Implements webhook verify, checkout, portal, cancel, `retrievePrices` (10-minute TTL-cached price lookup for the billing-plans catalog), `createPlanSwitchSession` (auto-provisions a Customer-Portal configuration for switching an existing subscription to another plan tier — each tier needs its own Stripe product), `retrieveSubscription` (live provider-side snapshot for the `sync-subscriptions` backfill job, mapped identically to the webhook path), plus `isBillingEnabled` (billingLive + an api-key existence probe, no secret read).');
88
105
  r.uiHints({
89
106
  displayLabel: "Billing · Stripe",
@@ -176,4 +193,5 @@ export function createSubscriptionStripeFeature(options = {}) {
176
193
  r.useExtension("subscriptionProvider", STRIPE_PROVIDER_NAME, plugin);
177
194
  return { configKeys };
178
195
  });
196
+ return featureWithEnvSchema(feature, subscriptionStripeEnvSchema);
179
197
  }
@@ -1,2 +1,2 @@
1
- export { STRIPE_PROVIDER_NAME, StripeEventTypes, SUBSCRIPTION_STRIPE_FEATURE, } from "./constants.js";
2
- export { createSubscriptionStripeFeature, type SubscriptionStripeOptions, subscriptionStripeEnvSchema, } from "./feature.js";
1
+ export { STRIPE_PROVIDER_NAME, StripeEventTypes, SUBSCRIPTION_STRIPE_FEATURE, } from "./constants.ts";
2
+ export { createSubscriptionStripeFeature, type SubscriptionStripeOptions, stripeEnvSchema, subscriptionStripeEnvSchema, } from "./feature.ts";
@@ -6,4 +6,4 @@
6
6
  // - mapStripeEventType / mapStripeStatus (pure helpers, test-only;
7
7
  // direct-import aus dem File wenn echt mal extern gebraucht)
8
8
  export { STRIPE_PROVIDER_NAME, StripeEventTypes, SUBSCRIPTION_STRIPE_FEATURE, } from "./constants.js";
9
- export { createSubscriptionStripeFeature, subscriptionStripeEnvSchema, } from "./feature.js";
9
+ export { createSubscriptionStripeFeature, stripeEnvSchema, subscriptionStripeEnvSchema, } from "./feature.js";
@@ -1,7 +1,7 @@
1
1
  import { type ProviderPrice, type ProviderSubscriptionSnapshot, type SubscriptionProviderPlugin } from "@cosmicdrift/kumiko-bundled-features/billing-foundation";
2
2
  import type { HandlerContext } from "@cosmicdrift/kumiko-framework/engine";
3
3
  import Stripe from "stripe";
4
- import type { StripeCtxRuntime } from "./runtime.js";
4
+ import type { StripeCtxRuntime } from "./runtime.ts";
5
5
  export type StripeCheckoutOptions = Parameters<NonNullable<SubscriptionProviderPlugin["createCheckoutSession"]>>[1];
6
6
  export type StripeCheckoutSessionRuntimeOptions = {
7
7
  /** Whether a mode:"payment" checkout gets a Stripe invoice. Default true.