@cosmicdrift/kumiko-samples 0.338.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 (1461) hide show
  1. package/LICENSE +57 -0
  2. package/README.md +14 -0
  3. package/package.json +34 -0
  4. package/packages/bundled-features/package.json +647 -0
  5. package/packages/bundled-features/src/admin-shell/changes.json +27 -0
  6. package/packages/bundled-features/src/admin-shell/constants.ts +11 -0
  7. package/packages/bundled-features/src/admin-shell/feature.ts +184 -0
  8. package/packages/bundled-features/src/admin-shell/i18n.ts +54 -0
  9. package/packages/bundled-features/src/admin-shell/index.ts +17 -0
  10. package/packages/bundled-features/src/admin-shell/overview-allowlist.ts +47 -0
  11. package/packages/bundled-features/src/admin-shell/overview-panels.ts +225 -0
  12. package/packages/bundled-features/src/admin-shell/web/client-plugin.tsx +16 -0
  13. package/packages/bundled-features/src/admin-shell/web/i18n.ts +11 -0
  14. package/packages/bundled-features/src/admin-shell/web/index.ts +2 -0
  15. package/packages/bundled-features/src/agent-tools/agent-doc-lint.ts +166 -0
  16. package/packages/bundled-features/src/agent-tools/agent-manifest.ts +460 -0
  17. package/packages/bundled-features/src/agent-tools/changes.json +40 -0
  18. package/packages/bundled-features/src/agent-tools/feature.ts +36 -0
  19. package/packages/bundled-features/src/agent-tools/filter-ops.ts +5 -0
  20. package/packages/bundled-features/src/agent-tools/index.ts +25 -0
  21. package/packages/bundled-features/src/agent-tools/tool-catalog.ts +658 -0
  22. package/packages/bundled-features/src/agent-tools/tool-dispatch.ts +374 -0
  23. package/packages/bundled-features/src/agent-tools/types.ts +222 -0
  24. package/packages/bundled-features/src/audit/changes.json +40 -0
  25. package/packages/bundled-features/src/audit/constants.ts +26 -0
  26. package/packages/bundled-features/src/audit/escape-hatch-audit-sink.ts +52 -0
  27. package/packages/bundled-features/src/audit/feature.ts +145 -0
  28. package/packages/bundled-features/src/audit/handlers/details.query.ts +49 -0
  29. package/packages/bundled-features/src/audit/handlers/list.query.ts +130 -0
  30. package/packages/bundled-features/src/audit/i18n.ts +22 -0
  31. package/packages/bundled-features/src/audit/index.ts +3 -0
  32. package/packages/bundled-features/src/audit/web/client-plugin.tsx +16 -0
  33. package/packages/bundled-features/src/audit/web/i18n.ts +8 -0
  34. package/packages/bundled-features/src/audit/web/index.ts +3 -0
  35. package/packages/bundled-features/src/auth-email-password/auth-paths.ts +28 -0
  36. package/packages/bundled-features/src/auth-email-password/auth-user-row.ts +51 -0
  37. package/packages/bundled-features/src/auth-email-password/changes.json +143 -0
  38. package/packages/bundled-features/src/auth-email-password/constants.ts +146 -0
  39. package/packages/bundled-features/src/auth-email-password/email-templates.ts +198 -0
  40. package/packages/bundled-features/src/auth-email-password/errors.ts +112 -0
  41. package/packages/bundled-features/src/auth-email-password/feature.ts +269 -0
  42. package/packages/bundled-features/src/auth-email-password/handlers/change-password.write.ts +70 -0
  43. package/packages/bundled-features/src/auth-email-password/handlers/confirm-account-unlock.write.ts +61 -0
  44. package/packages/bundled-features/src/auth-email-password/handlers/confirm-token-flow.ts +148 -0
  45. package/packages/bundled-features/src/auth-email-password/handlers/invite-accept-with-login.write.ts +290 -0
  46. package/packages/bundled-features/src/auth-email-password/handlers/invite-accept.write.ts +195 -0
  47. package/packages/bundled-features/src/auth-email-password/handlers/invite-create.write.ts +232 -0
  48. package/packages/bundled-features/src/auth-email-password/handlers/invite-info.query.ts +90 -0
  49. package/packages/bundled-features/src/auth-email-password/handlers/invite-signup-complete.write.ts +221 -0
  50. package/packages/bundled-features/src/auth-email-password/handlers/login.write.ts +344 -0
  51. package/packages/bundled-features/src/auth-email-password/handlers/logout.write.ts +16 -0
  52. package/packages/bundled-features/src/auth-email-password/handlers/request-account-unlock.write.ts +40 -0
  53. package/packages/bundled-features/src/auth-email-password/handlers/request-email-verification.write.ts +37 -0
  54. package/packages/bundled-features/src/auth-email-password/handlers/request-password-reset.write.ts +39 -0
  55. package/packages/bundled-features/src/auth-email-password/handlers/reset-password.write.ts +62 -0
  56. package/packages/bundled-features/src/auth-email-password/handlers/self-registration-status.query.ts +26 -0
  57. package/packages/bundled-features/src/auth-email-password/handlers/signup-confirm.write.ts +249 -0
  58. package/packages/bundled-features/src/auth-email-password/handlers/signup-request.write.ts +229 -0
  59. package/packages/bundled-features/src/auth-email-password/handlers/token-request-handler.ts +170 -0
  60. package/packages/bundled-features/src/auth-email-password/handlers/verify-email.write.ts +62 -0
  61. package/packages/bundled-features/src/auth-email-password/i18n.ts +153 -0
  62. package/packages/bundled-features/src/auth-email-password/index.ts +47 -0
  63. package/packages/bundled-features/src/auth-email-password/invite-token-store.ts +78 -0
  64. package/packages/bundled-features/src/auth-email-password/lockout-store.ts +34 -0
  65. package/packages/bundled-features/src/auth-email-password/magic-link-mail.ts +87 -0
  66. package/packages/bundled-features/src/auth-email-password/password-policy.ts +2108 -0
  67. package/packages/bundled-features/src/auth-email-password/reset-token.ts +30 -0
  68. package/packages/bundled-features/src/auth-email-password/seeding.ts +368 -0
  69. package/packages/bundled-features/src/auth-email-password/self-registration-toggle.ts +25 -0
  70. package/packages/bundled-features/src/auth-email-password/signed-token.ts +4 -0
  71. package/packages/bundled-features/src/auth-email-password/signup-token-store.ts +155 -0
  72. package/packages/bundled-features/src/auth-email-password/testing.ts +5 -0
  73. package/packages/bundled-features/src/auth-email-password/unlock-token.ts +28 -0
  74. package/packages/bundled-features/src/auth-email-password/verification-token.ts +29 -0
  75. package/packages/bundled-features/src/auth-email-password/web/auth-client.ts +472 -0
  76. package/packages/bundled-features/src/auth-email-password/web/auth-form-logic.ts +40 -0
  77. package/packages/bundled-features/src/auth-email-password/web/auth-form-primitives.tsx +112 -0
  78. package/packages/bundled-features/src/auth-email-password/web/auth-gate.tsx +179 -0
  79. package/packages/bundled-features/src/auth-email-password/web/client-plugin.ts +69 -0
  80. package/packages/bundled-features/src/auth-email-password/web/confirm-account-unlock-screen.tsx +96 -0
  81. package/packages/bundled-features/src/auth-email-password/web/default-topbar-actions.tsx +47 -0
  82. package/packages/bundled-features/src/auth-email-password/web/forgot-password-screen.tsx +111 -0
  83. package/packages/bundled-features/src/auth-email-password/web/index.ts +81 -0
  84. package/packages/bundled-features/src/auth-email-password/web/invite-accept-screen.tsx +272 -0
  85. package/packages/bundled-features/src/auth-email-password/web/login-screen.tsx +298 -0
  86. package/packages/bundled-features/src/auth-email-password/web/request-account-unlock-screen.tsx +112 -0
  87. package/packages/bundled-features/src/auth-email-password/web/reset-password-screen.tsx +149 -0
  88. package/packages/bundled-features/src/auth-email-password/web/session-bootstrap-error.tsx +66 -0
  89. package/packages/bundled-features/src/auth-email-password/web/session.tsx +231 -0
  90. package/packages/bundled-features/src/auth-email-password/web/signup-complete-screen.tsx +181 -0
  91. package/packages/bundled-features/src/auth-email-password/web/signup-screen.tsx +128 -0
  92. package/packages/bundled-features/src/auth-email-password/web/tenant-menu-items.tsx +47 -0
  93. package/packages/bundled-features/src/auth-email-password/web/tenant-switcher.tsx +123 -0
  94. package/packages/bundled-features/src/auth-email-password/web/use-shell-user.ts +37 -0
  95. package/packages/bundled-features/src/auth-email-password/web/user-menu.tsx +149 -0
  96. package/packages/bundled-features/src/auth-email-password/web/verify-email-screen.tsx +99 -0
  97. package/packages/bundled-features/src/auth-foundation/boot-checks.ts +150 -0
  98. package/packages/bundled-features/src/auth-foundation/changes.json +20 -0
  99. package/packages/bundled-features/src/auth-foundation/feature.ts +157 -0
  100. package/packages/bundled-features/src/auth-foundation/index.ts +37 -0
  101. package/packages/bundled-features/src/auth-foundation/resolve-anonymous-access.ts +62 -0
  102. package/packages/bundled-features/src/auth-foundation/types.ts +180 -0
  103. package/packages/bundled-features/src/auth-mfa/base32.ts +51 -0
  104. package/packages/bundled-features/src/auth-mfa/changes.json +62 -0
  105. package/packages/bundled-features/src/auth-mfa/config.ts +26 -0
  106. package/packages/bundled-features/src/auth-mfa/constants.ts +47 -0
  107. package/packages/bundled-features/src/auth-mfa/db/queries.ts +45 -0
  108. package/packages/bundled-features/src/auth-mfa/errors.ts +66 -0
  109. package/packages/bundled-features/src/auth-mfa/feature.ts +251 -0
  110. package/packages/bundled-features/src/auth-mfa/handlers/disable.write.ts +83 -0
  111. package/packages/bundled-features/src/auth-mfa/handlers/enable-confirm-preauth.write.ts +242 -0
  112. package/packages/bundled-features/src/auth-mfa/handlers/enable-confirm.write.ts +123 -0
  113. package/packages/bundled-features/src/auth-mfa/handlers/enable-start-preauth.write.ts +104 -0
  114. package/packages/bundled-features/src/auth-mfa/handlers/enable-start.write.ts +95 -0
  115. package/packages/bundled-features/src/auth-mfa/handlers/reencrypt.job.ts +223 -0
  116. package/packages/bundled-features/src/auth-mfa/handlers/regenerate-recovery.write.ts +88 -0
  117. package/packages/bundled-features/src/auth-mfa/handlers/status.query.ts +32 -0
  118. package/packages/bundled-features/src/auth-mfa/handlers/verify.write.ts +203 -0
  119. package/packages/bundled-features/src/auth-mfa/hmac-token-codec.ts +79 -0
  120. package/packages/bundled-features/src/auth-mfa/i18n.ts +50 -0
  121. package/packages/bundled-features/src/auth-mfa/index.ts +30 -0
  122. package/packages/bundled-features/src/auth-mfa/mfa-challenge-token.ts +39 -0
  123. package/packages/bundled-features/src/auth-mfa/mfa-code-verifier.ts +45 -0
  124. package/packages/bundled-features/src/auth-mfa/mfa-preauth-setup-token.ts +38 -0
  125. package/packages/bundled-features/src/auth-mfa/mfa-setup-token.ts +96 -0
  126. package/packages/bundled-features/src/auth-mfa/mfa-status-checker.ts +98 -0
  127. package/packages/bundled-features/src/auth-mfa/mfa-verify-attempts.ts +32 -0
  128. package/packages/bundled-features/src/auth-mfa/otpauth-uri.ts +21 -0
  129. package/packages/bundled-features/src/auth-mfa/recovery-codes.ts +54 -0
  130. package/packages/bundled-features/src/auth-mfa/schema/user-mfa.ts +65 -0
  131. package/packages/bundled-features/src/auth-mfa/screens.ts +124 -0
  132. package/packages/bundled-features/src/auth-mfa/testing.ts +5 -0
  133. package/packages/bundled-features/src/auth-mfa/token-secrets.ts +41 -0
  134. package/packages/bundled-features/src/auth-mfa/totp.ts +67 -0
  135. package/packages/bundled-features/src/auth-mfa/verify-factor.ts +58 -0
  136. package/packages/bundled-features/src/auth-mfa/web/client-plugin.ts +36 -0
  137. package/packages/bundled-features/src/auth-mfa/web/i18n.ts +66 -0
  138. package/packages/bundled-features/src/auth-mfa/web/index.ts +25 -0
  139. package/packages/bundled-features/src/auth-mfa/web/mfa-client.ts +196 -0
  140. package/packages/bundled-features/src/auth-mfa/web/mfa-disable-dialog.tsx +70 -0
  141. package/packages/bundled-features/src/auth-mfa/web/mfa-recovery-codes-reveal.tsx +53 -0
  142. package/packages/bundled-features/src/auth-mfa/web/mfa-regenerate-recovery-dialog.tsx +69 -0
  143. package/packages/bundled-features/src/auth-mfa/web/mfa-setup-preauth-screen.tsx +269 -0
  144. package/packages/bundled-features/src/auth-mfa/web/mfa-verify-screen.tsx +117 -0
  145. package/packages/bundled-features/src/auth-mfa/web/qrcode-browser.d.ts +11 -0
  146. package/packages/bundled-features/src/auth-mfa-user-data/changes.json +1 -0
  147. package/packages/bundled-features/src/auth-mfa-user-data/hooks.ts +60 -0
  148. package/packages/bundled-features/src/auth-mfa-user-data/index.ts +21 -0
  149. package/packages/bundled-features/src/billing-foundation/aggregate-id.ts +74 -0
  150. package/packages/bundled-features/src/billing-foundation/billing-info-query.ts +95 -0
  151. package/packages/bundled-features/src/billing-foundation/changes.json +162 -0
  152. package/packages/bundled-features/src/billing-foundation/checkout-core.ts +395 -0
  153. package/packages/bundled-features/src/billing-foundation/constants.ts +237 -0
  154. package/packages/bundled-features/src/billing-foundation/consumer-protection/confirmation-mail.ts +170 -0
  155. package/packages/bundled-features/src/billing-foundation/consumer-protection/consent-gate.ts +140 -0
  156. package/packages/bundled-features/src/billing-foundation/consumer-protection/consent-locale.ts +18 -0
  157. package/packages/bundled-features/src/billing-foundation/consumer-protection/consent-text.ts +55 -0
  158. package/packages/bundled-features/src/billing-foundation/consumer-protection/issue-confirmation.ts +200 -0
  159. package/packages/bundled-features/src/billing-foundation/consumer-protection/register-consent.ts +97 -0
  160. package/packages/bundled-features/src/billing-foundation/consumer-protection/register-termination.ts +39 -0
  161. package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-mail.ts +128 -0
  162. package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-pages.ts +339 -0
  163. package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-record.ts +206 -0
  164. package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-request.ts +377 -0
  165. package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-texts.ts +242 -0
  166. package/packages/bundled-features/src/billing-foundation/db/queries/payment-projection.ts +19 -0
  167. package/packages/bundled-features/src/billing-foundation/db/queries/subscription-projection.ts +15 -0
  168. package/packages/bundled-features/src/billing-foundation/entities.ts +132 -0
  169. package/packages/bundled-features/src/billing-foundation/events.ts +215 -0
  170. package/packages/bundled-features/src/billing-foundation/feature.ts +290 -0
  171. package/packages/bundled-features/src/billing-foundation/get-subscription-for-tenant.ts +58 -0
  172. package/packages/bundled-features/src/billing-foundation/handlers/billing-plans.query.ts +54 -0
  173. package/packages/bundled-features/src/billing-foundation/handlers/create-checkout-session.write.ts +132 -0
  174. package/packages/bundled-features/src/billing-foundation/handlers/create-portal-session.write.ts +103 -0
  175. package/packages/bundled-features/src/billing-foundation/handlers/list-subscriptions.query.ts +37 -0
  176. package/packages/bundled-features/src/billing-foundation/handlers/process-event.write.ts +244 -0
  177. package/packages/bundled-features/src/billing-foundation/handlers/process-payment-event.write.ts +122 -0
  178. package/packages/bundled-features/src/billing-foundation/handlers/start-plan-checkout.write.ts +100 -0
  179. package/packages/bundled-features/src/billing-foundation/handlers/switch-plan.write.ts +109 -0
  180. package/packages/bundled-features/src/billing-foundation/handlers/sync-subscription.write.ts +163 -0
  181. package/packages/bundled-features/src/billing-foundation/i18n.ts +133 -0
  182. package/packages/bundled-features/src/billing-foundation/index.ts +92 -0
  183. package/packages/bundled-features/src/billing-foundation/plan-catalog.ts +235 -0
  184. package/packages/bundled-features/src/billing-foundation/projection.ts +227 -0
  185. package/packages/bundled-features/src/billing-foundation/screens.ts +25 -0
  186. package/packages/bundled-features/src/billing-foundation/subscription-tier-sync.ts +175 -0
  187. package/packages/bundled-features/src/billing-foundation/tenant-destroy-hook.ts +81 -0
  188. package/packages/bundled-features/src/billing-foundation/types.ts +478 -0
  189. package/packages/bundled-features/src/billing-foundation/validate-options.ts +111 -0
  190. package/packages/bundled-features/src/billing-foundation/web/billing-plans-panel.tsx +361 -0
  191. package/packages/bundled-features/src/billing-foundation/web/cancel-contract-dialog.tsx +201 -0
  192. package/packages/bundled-features/src/billing-foundation/web/checkout-consent-dialog.tsx +146 -0
  193. package/packages/bundled-features/src/billing-foundation/web/client-plugin.tsx +21 -0
  194. package/packages/bundled-features/src/billing-foundation/web/index.ts +23 -0
  195. package/packages/bundled-features/src/billing-foundation/webhook-handler.ts +165 -0
  196. package/packages/bundled-features/src/cap-counter/aggregate-id.ts +49 -0
  197. package/packages/bundled-features/src/cap-counter/book-cap-usage.ts +205 -0
  198. package/packages/bundled-features/src/cap-counter/changes.json +47 -0
  199. package/packages/bundled-features/src/cap-counter/constants.ts +34 -0
  200. package/packages/bundled-features/src/cap-counter/enforce-cap.ts +415 -0
  201. package/packages/bundled-features/src/cap-counter/entity.ts +57 -0
  202. package/packages/bundled-features/src/cap-counter/feature.ts +135 -0
  203. package/packages/bundled-features/src/cap-counter/handlers/get-counter.query.ts +37 -0
  204. package/packages/bundled-features/src/cap-counter/handlers/increment-rolling.write.ts +80 -0
  205. package/packages/bundled-features/src/cap-counter/handlers/increment.write.ts +51 -0
  206. package/packages/bundled-features/src/cap-counter/handlers/mark-soft-warned.write.ts +30 -0
  207. package/packages/bundled-features/src/cap-counter/i18n.ts +13 -0
  208. package/packages/bundled-features/src/cap-counter/index.ts +50 -0
  209. package/packages/bundled-features/src/cap-counter/stock-cap-guard.ts +80 -0
  210. package/packages/bundled-features/src/cap-counter/with-cap-enforcement.ts +183 -0
  211. package/packages/bundled-features/src/cap-overview/access.ts +35 -0
  212. package/packages/bundled-features/src/cap-overview/changes.json +57 -0
  213. package/packages/bundled-features/src/cap-overview/constants.ts +26 -0
  214. package/packages/bundled-features/src/cap-overview/feature.ts +87 -0
  215. package/packages/bundled-features/src/cap-overview/handlers/caps-usage.query.ts +109 -0
  216. package/packages/bundled-features/src/cap-overview/handlers/tenant-caps-list.query.ts +306 -0
  217. package/packages/bundled-features/src/cap-overview/handlers/tenant-options.query.ts +35 -0
  218. package/packages/bundled-features/src/cap-overview/i18n.ts +31 -0
  219. package/packages/bundled-features/src/cap-overview/index.ts +21 -0
  220. package/packages/bundled-features/src/cap-overview/screens.ts +109 -0
  221. package/packages/bundled-features/src/cap-overview/types.ts +66 -0
  222. package/packages/bundled-features/src/cap-overview/usage-math.ts +34 -0
  223. package/packages/bundled-features/src/cap-overview/web/cap-cards-panel.tsx +119 -0
  224. package/packages/bundled-features/src/cap-overview/web/cap-usage-bar.tsx +56 -0
  225. package/packages/bundled-features/src/cap-overview/web/cap-usage-cell.tsx +21 -0
  226. package/packages/bundled-features/src/cap-overview/web/client-plugin.tsx +27 -0
  227. package/packages/bundled-features/src/cap-overview/web/index.ts +10 -0
  228. package/packages/bundled-features/src/channel-email/changes.json +15 -0
  229. package/packages/bundled-features/src/channel-email/email-channel.ts +127 -0
  230. package/packages/bundled-features/src/channel-email/feature.ts +26 -0
  231. package/packages/bundled-features/src/channel-email/index.ts +10 -0
  232. package/packages/bundled-features/src/channel-email/pii-guard.ts +55 -0
  233. package/packages/bundled-features/src/channel-email/smtp-transport.ts +111 -0
  234. package/packages/bundled-features/src/channel-email/types.ts +43 -0
  235. package/packages/bundled-features/src/channel-in-app/changes.json +1 -0
  236. package/packages/bundled-features/src/channel-in-app/constants.ts +11 -0
  237. package/packages/bundled-features/src/channel-in-app/feature.ts +45 -0
  238. package/packages/bundled-features/src/channel-in-app/handlers/inbox.query.ts +30 -0
  239. package/packages/bundled-features/src/channel-in-app/handlers/mark-all-read.write.ts +27 -0
  240. package/packages/bundled-features/src/channel-in-app/handlers/mark-read.write.ts +34 -0
  241. package/packages/bundled-features/src/channel-in-app/handlers/unread-count.query.ts +29 -0
  242. package/packages/bundled-features/src/channel-in-app/in-app-channel.ts +41 -0
  243. package/packages/bundled-features/src/channel-in-app/index.ts +4 -0
  244. package/packages/bundled-features/src/channel-in-app/tables.ts +31 -0
  245. package/packages/bundled-features/src/channel-push/changes.json +1 -0
  246. package/packages/bundled-features/src/channel-push/feature.ts +25 -0
  247. package/packages/bundled-features/src/channel-push/index.ts +3 -0
  248. package/packages/bundled-features/src/channel-push/push-channel.ts +34 -0
  249. package/packages/bundled-features/src/channel-push/types.ts +22 -0
  250. package/packages/bundled-features/src/compliance-profiles/README.md +88 -0
  251. package/packages/bundled-features/src/compliance-profiles/_internal/parse-override.ts +20 -0
  252. package/packages/bundled-features/src/compliance-profiles/changes.json +8 -0
  253. package/packages/bundled-features/src/compliance-profiles/constants.ts +20 -0
  254. package/packages/bundled-features/src/compliance-profiles/feature.ts +114 -0
  255. package/packages/bundled-features/src/compliance-profiles/handlers/for-tenant.query.ts +50 -0
  256. package/packages/bundled-features/src/compliance-profiles/handlers/list-profiles.query.ts +52 -0
  257. package/packages/bundled-features/src/compliance-profiles/handlers/needs-profile.query.ts +75 -0
  258. package/packages/bundled-features/src/compliance-profiles/handlers/set-profile.write.ts +142 -0
  259. package/packages/bundled-features/src/compliance-profiles/handlers/sub-processors.query.ts +46 -0
  260. package/packages/bundled-features/src/compliance-profiles/i18n.ts +31 -0
  261. package/packages/bundled-features/src/compliance-profiles/index.ts +13 -0
  262. package/packages/bundled-features/src/compliance-profiles/resolve-for-tenant.ts +57 -0
  263. package/packages/bundled-features/src/compliance-profiles/schema/profile-selection.ts +53 -0
  264. package/packages/bundled-features/src/compliance-profiles/seeding.ts +101 -0
  265. package/packages/bundled-features/src/compliance-profiles/web/client-plugin.tsx +25 -0
  266. package/packages/bundled-features/src/compliance-profiles/web/compliance-profile-catalog.tsx +55 -0
  267. package/packages/bundled-features/src/compliance-profiles/web/i18n.ts +9 -0
  268. package/packages/bundled-features/src/compliance-profiles/web/index.ts +6 -0
  269. package/packages/bundled-features/src/compliance-profiles-ops/handlers/tenants-missing-profile.query.ts +56 -0
  270. package/packages/bundled-features/src/compliance-profiles-ops/index.ts +34 -0
  271. package/packages/bundled-features/src/config/changes.json +35 -0
  272. package/packages/bundled-features/src/config/constants.ts +30 -0
  273. package/packages/bundled-features/src/config/db/queries/resolver.ts +51 -0
  274. package/packages/bundled-features/src/config/feature.ts +169 -0
  275. package/packages/bundled-features/src/config/handlers/cascade.query.ts +94 -0
  276. package/packages/bundled-features/src/config/handlers/readiness.query.ts +164 -0
  277. package/packages/bundled-features/src/config/handlers/reencrypt.job.ts +274 -0
  278. package/packages/bundled-features/src/config/handlers/reset.write.ts +76 -0
  279. package/packages/bundled-features/src/config/handlers/schema.query.ts +36 -0
  280. package/packages/bundled-features/src/config/handlers/selected-extensions.query.ts +71 -0
  281. package/packages/bundled-features/src/config/handlers/set.write.ts +227 -0
  282. package/packages/bundled-features/src/config/handlers/values.query.ts +92 -0
  283. package/packages/bundled-features/src/config/i18n.ts +4 -0
  284. package/packages/bundled-features/src/config/index.ts +38 -0
  285. package/packages/bundled-features/src/config/read-redaction.ts +64 -0
  286. package/packages/bundled-features/src/config/resolver.ts +687 -0
  287. package/packages/bundled-features/src/config/table.ts +40 -0
  288. package/packages/bundled-features/src/config/web/client-plugin.ts +24 -0
  289. package/packages/bundled-features/src/config/web/i18n.ts +48 -0
  290. package/packages/bundled-features/src/config/web/index.ts +7 -0
  291. package/packages/bundled-features/src/config/write-helpers.ts +377 -0
  292. package/packages/bundled-features/src/crypto-shredding/changes.json +58 -0
  293. package/packages/bundled-features/src/crypto-shredding/constants.ts +11 -0
  294. package/packages/bundled-features/src/crypto-shredding/feature.ts +30 -0
  295. package/packages/bundled-features/src/crypto-shredding/handlers/forget-subject.write.ts +454 -0
  296. package/packages/bundled-features/src/crypto-shredding/index.ts +13 -0
  297. package/packages/bundled-features/src/custom-fields/aggregate-id.ts +34 -0
  298. package/packages/bundled-features/src/custom-fields/changes.json +15 -0
  299. package/packages/bundled-features/src/custom-fields/constants.ts +79 -0
  300. package/packages/bundled-features/src/custom-fields/db/queries/field-access.ts +17 -0
  301. package/packages/bundled-features/src/custom-fields/db/queries/projection.ts +84 -0
  302. package/packages/bundled-features/src/custom-fields/db/queries/quota.ts +20 -0
  303. package/packages/bundled-features/src/custom-fields/db/queries/retention.ts +43 -0
  304. package/packages/bundled-features/src/custom-fields/db/queries/user-data-rights.ts +39 -0
  305. package/packages/bundled-features/src/custom-fields/entity.ts +112 -0
  306. package/packages/bundled-features/src/custom-fields/events.ts +25 -0
  307. package/packages/bundled-features/src/custom-fields/executor.ts +10 -0
  308. package/packages/bundled-features/src/custom-fields/feature.ts +289 -0
  309. package/packages/bundled-features/src/custom-fields/handlers/clear-custom-field.write.ts +82 -0
  310. package/packages/bundled-features/src/custom-fields/handlers/define-system-field.write.ts +45 -0
  311. package/packages/bundled-features/src/custom-fields/handlers/define-tenant-field.write.ts +108 -0
  312. package/packages/bundled-features/src/custom-fields/handlers/delete-system-field.write.ts +49 -0
  313. package/packages/bundled-features/src/custom-fields/handlers/delete-tenant-field.write.ts +74 -0
  314. package/packages/bundled-features/src/custom-fields/handlers/set-custom-field.write.ts +124 -0
  315. package/packages/bundled-features/src/custom-fields/handlers/update-tenant-field.write.ts +98 -0
  316. package/packages/bundled-features/src/custom-fields/index.ts +40 -0
  317. package/packages/bundled-features/src/custom-fields/lib/define-or-resurrect.ts +52 -0
  318. package/packages/bundled-features/src/custom-fields/lib/field-access.ts +75 -0
  319. package/packages/bundled-features/src/custom-fields/lib/field-definition-row.ts +33 -0
  320. package/packages/bundled-features/src/custom-fields/lib/parse-serialized-field.ts +64 -0
  321. package/packages/bundled-features/src/custom-fields/lib/quota.ts +5 -0
  322. package/packages/bundled-features/src/custom-fields/lib/value-schema.ts +91 -0
  323. package/packages/bundled-features/src/custom-fields/run-retention.ts +201 -0
  324. package/packages/bundled-features/src/custom-fields/schemas.ts +98 -0
  325. package/packages/bundled-features/src/custom-fields/web/client-plugin.tsx +27 -0
  326. package/packages/bundled-features/src/custom-fields/web/custom-fields-form-section.tsx +247 -0
  327. package/packages/bundled-features/src/custom-fields/web/i18n.ts +22 -0
  328. package/packages/bundled-features/src/custom-fields/web/index.ts +8 -0
  329. package/packages/bundled-features/src/custom-fields/wire-for-entity.ts +226 -0
  330. package/packages/bundled-features/src/custom-fields/wire-user-data-rights.ts +79 -0
  331. package/packages/bundled-features/src/data-retention/_internal/parse-override.ts +34 -0
  332. package/packages/bundled-features/src/data-retention/changes.json +50 -0
  333. package/packages/bundled-features/src/data-retention/feature.ts +123 -0
  334. package/packages/bundled-features/src/data-retention/handlers/policy-for.query.ts +46 -0
  335. package/packages/bundled-features/src/data-retention/index.ts +20 -0
  336. package/packages/bundled-features/src/data-retention/keep-for.ts +75 -0
  337. package/packages/bundled-features/src/data-retention/override-schema.ts +37 -0
  338. package/packages/bundled-features/src/data-retention/presets.ts +72 -0
  339. package/packages/bundled-features/src/data-retention/resolve-for-tenant.ts +84 -0
  340. package/packages/bundled-features/src/data-retention/resolve-tenant-preset.ts +54 -0
  341. package/packages/bundled-features/src/data-retention/resolver.ts +107 -0
  342. package/packages/bundled-features/src/data-retention/run-retention-cleanup.ts +814 -0
  343. package/packages/bundled-features/src/data-retention/schema/tenant-retention-override.ts +50 -0
  344. package/packages/bundled-features/src/delivery/address-opt-out.ts +204 -0
  345. package/packages/bundled-features/src/delivery/attempt-log.ts +66 -0
  346. package/packages/bundled-features/src/delivery/changes.json +86 -0
  347. package/packages/bundled-features/src/delivery/channel-context.ts +17 -0
  348. package/packages/bundled-features/src/delivery/constants.ts +36 -0
  349. package/packages/bundled-features/src/delivery/db/queries/address-opt-outs.ts +23 -0
  350. package/packages/bundled-features/src/delivery/db/queries/preferences.ts +32 -0
  351. package/packages/bundled-features/src/delivery/delivery-service.ts +625 -0
  352. package/packages/bundled-features/src/delivery/events.ts +24 -0
  353. package/packages/bundled-features/src/delivery/feature.ts +206 -0
  354. package/packages/bundled-features/src/delivery/handlers/log.query.ts +177 -0
  355. package/packages/bundled-features/src/delivery/handlers/preferences.query.ts +42 -0
  356. package/packages/bundled-features/src/delivery/handlers/resubscribe-address.write.ts +42 -0
  357. package/packages/bundled-features/src/delivery/handlers/resubscribe-user.write.ts +41 -0
  358. package/packages/bundled-features/src/delivery/handlers/set-preference.write.ts +47 -0
  359. package/packages/bundled-features/src/delivery/handlers/unsubscribe-address.write.ts +40 -0
  360. package/packages/bundled-features/src/delivery/handlers/unsubscribe-user.write.ts +43 -0
  361. package/packages/bundled-features/src/delivery/i18n.ts +11 -0
  362. package/packages/bundled-features/src/delivery/index.ts +52 -0
  363. package/packages/bundled-features/src/delivery/jobs.ts +169 -0
  364. package/packages/bundled-features/src/delivery/public-names.ts +60 -0
  365. package/packages/bundled-features/src/delivery/tables.ts +155 -0
  366. package/packages/bundled-features/src/delivery/testing.ts +53 -0
  367. package/packages/bundled-features/src/delivery/types.ts +121 -0
  368. package/packages/bundled-features/src/delivery/unsubscribe.ts +429 -0
  369. package/packages/bundled-features/src/delivery/upsert-preference.ts +154 -0
  370. package/packages/bundled-features/src/delivery/web/client-plugin.tsx +19 -0
  371. package/packages/bundled-features/src/delivery/web/delivery-status-cell.tsx +26 -0
  372. package/packages/bundled-features/src/delivery/web/index.ts +3 -0
  373. package/packages/bundled-features/src/derivatives-sharp/changes.json +19 -0
  374. package/packages/bundled-features/src/derivatives-sharp/feature.ts +22 -0
  375. package/packages/bundled-features/src/derivatives-sharp/index.ts +2 -0
  376. package/packages/bundled-features/src/derivatives-sharp/render.ts +431 -0
  377. package/packages/bundled-features/src/document-ingest-foundation/boot-checks.ts +58 -0
  378. package/packages/bundled-features/src/document-ingest-foundation/changes.json +44 -0
  379. package/packages/bundled-features/src/document-ingest-foundation/entity.ts +59 -0
  380. package/packages/bundled-features/src/document-ingest-foundation/events.ts +43 -0
  381. package/packages/bundled-features/src/document-ingest-foundation/executor.ts +12 -0
  382. package/packages/bundled-features/src/document-ingest-foundation/feature.ts +226 -0
  383. package/packages/bundled-features/src/document-ingest-foundation/file-ref-liveness.ts +10 -0
  384. package/packages/bundled-features/src/document-ingest-foundation/forget-extract-with-file-ref.ts +84 -0
  385. package/packages/bundled-features/src/document-ingest-foundation/index.ts +34 -0
  386. package/packages/bundled-features/src/document-ingest-foundation/pages.ts +34 -0
  387. package/packages/bundled-features/src/document-ingest-foundation/providers.ts +87 -0
  388. package/packages/bundled-features/src/document-ingest-foundation/tenant-destroy-hook.ts +34 -0
  389. package/packages/bundled-features/src/document-ingest-foundation/write-document-extract.ts +57 -0
  390. package/packages/bundled-features/src/feature-toggles/changes.json +31 -0
  391. package/packages/bundled-features/src/feature-toggles/compose-tier-resolver.ts +134 -0
  392. package/packages/bundled-features/src/feature-toggles/constants.ts +40 -0
  393. package/packages/bundled-features/src/feature-toggles/events.ts +18 -0
  394. package/packages/bundled-features/src/feature-toggles/feature.ts +173 -0
  395. package/packages/bundled-features/src/feature-toggles/global-feature-state-table.ts +47 -0
  396. package/packages/bundled-features/src/feature-toggles/handlers/list.query.ts +45 -0
  397. package/packages/bundled-features/src/feature-toggles/handlers/registered.query.ts +87 -0
  398. package/packages/bundled-features/src/feature-toggles/handlers/set.write.ts +194 -0
  399. package/packages/bundled-features/src/feature-toggles/i18n.ts +11 -0
  400. package/packages/bundled-features/src/feature-toggles/index.ts +20 -0
  401. package/packages/bundled-features/src/feature-toggles/toggle-runtime.ts +135 -0
  402. package/packages/bundled-features/src/feature-toggles/toggle-sync-signal.ts +64 -0
  403. package/packages/bundled-features/src/feature-toggles/web/client-plugin.tsx +18 -0
  404. package/packages/bundled-features/src/feature-toggles/web/i18n.ts +17 -0
  405. package/packages/bundled-features/src/feature-toggles/web/index.ts +5 -0
  406. package/packages/bundled-features/src/file-derivatives/changes.json +27 -0
  407. package/packages/bundled-features/src/file-derivatives/feature.ts +236 -0
  408. package/packages/bundled-features/src/file-derivatives/handlers/public-variant-by-file-ref.query.ts +57 -0
  409. package/packages/bundled-features/src/file-derivatives/handlers/public-variant.query.ts +156 -0
  410. package/packages/bundled-features/src/file-derivatives/index.ts +11 -0
  411. package/packages/bundled-features/src/file-derivatives/presets.ts +10 -0
  412. package/packages/bundled-features/src/file-foundation/changes.json +9 -0
  413. package/packages/bundled-features/src/file-foundation/feature.ts +72 -0
  414. package/packages/bundled-features/src/file-foundation/index.ts +9 -0
  415. package/packages/bundled-features/src/file-provider-inmemory/changes.json +1 -0
  416. package/packages/bundled-features/src/file-provider-inmemory/feature.ts +84 -0
  417. package/packages/bundled-features/src/file-provider-inmemory/index.ts +3 -0
  418. package/packages/bundled-features/src/file-provider-s3/changes.json +1 -0
  419. package/packages/bundled-features/src/file-provider-s3/feature.ts +176 -0
  420. package/packages/bundled-features/src/file-provider-s3/index.ts +3 -0
  421. package/packages/bundled-features/src/file-provider-s3-env/changes.json +1 -0
  422. package/packages/bundled-features/src/file-provider-s3-env/feature.ts +58 -0
  423. package/packages/bundled-features/src/file-provider-s3-env/index.ts +3 -0
  424. package/packages/bundled-features/src/files/README.md +50 -0
  425. package/packages/bundled-features/src/files/changes.json +1 -0
  426. package/packages/bundled-features/src/files/feature.ts +7 -0
  427. package/packages/bundled-features/src/files/index.ts +1 -0
  428. package/packages/bundled-features/src/files-provider-s3/changes.json +1 -0
  429. package/packages/bundled-features/src/files-provider-s3/env-helper.ts +49 -0
  430. package/packages/bundled-features/src/files-provider-s3/index.ts +3 -0
  431. package/packages/bundled-features/src/files-provider-s3/s3-provider.ts +196 -0
  432. package/packages/bundled-features/src/files-tenant-data/changes.json +9 -0
  433. package/packages/bundled-features/src/files-tenant-data/handlers/sweep-orphaned-derivatives.job.ts +168 -0
  434. package/packages/bundled-features/src/files-tenant-data/hooks.ts +203 -0
  435. package/packages/bundled-features/src/files-tenant-data/index.ts +68 -0
  436. package/packages/bundled-features/src/folders/aggregate-id.ts +23 -0
  437. package/packages/bundled-features/src/folders/changes.json +9 -0
  438. package/packages/bundled-features/src/folders/constants.ts +40 -0
  439. package/packages/bundled-features/src/folders/entity.ts +87 -0
  440. package/packages/bundled-features/src/folders/executor.ts +11 -0
  441. package/packages/bundled-features/src/folders/feature.ts +192 -0
  442. package/packages/bundled-features/src/folders/handlers/clear-folder.write.ts +51 -0
  443. package/packages/bundled-features/src/folders/handlers/delete-folder.write.ts +43 -0
  444. package/packages/bundled-features/src/folders/handlers/set-folder.write.ts +99 -0
  445. package/packages/bundled-features/src/folders/index.ts +23 -0
  446. package/packages/bundled-features/src/folders/schemas.ts +18 -0
  447. package/packages/bundled-features/src/folders/web/client-plugin.tsx +16 -0
  448. package/packages/bundled-features/src/folders/web/folder-manager.tsx +562 -0
  449. package/packages/bundled-features/src/folders/web/folder-section.tsx +205 -0
  450. package/packages/bundled-features/src/folders/web/i18n.ts +34 -0
  451. package/packages/bundled-features/src/folders/web/index.ts +6 -0
  452. package/packages/bundled-features/src/folders/web/tree.ts +65 -0
  453. package/packages/bundled-features/src/folders-user-data/changes.json +1 -0
  454. package/packages/bundled-features/src/folders-user-data/hooks.ts +76 -0
  455. package/packages/bundled-features/src/folders-user-data/index.ts +33 -0
  456. package/packages/bundled-features/src/form-draft/changes.json +1 -0
  457. package/packages/bundled-features/src/form-draft/constants.ts +50 -0
  458. package/packages/bundled-features/src/form-draft/db/queries/cleanup.ts +72 -0
  459. package/packages/bundled-features/src/form-draft/db/queries/draft-count.ts +21 -0
  460. package/packages/bundled-features/src/form-draft/db/queries/owned-file-refs.ts +74 -0
  461. package/packages/bundled-features/src/form-draft/entity.ts +59 -0
  462. package/packages/bundled-features/src/form-draft/executor.ts +7 -0
  463. package/packages/bundled-features/src/form-draft/feature.ts +59 -0
  464. package/packages/bundled-features/src/form-draft/handlers/cleanup.job.ts +200 -0
  465. package/packages/bundled-features/src/form-draft/handlers/discard.write.ts +110 -0
  466. package/packages/bundled-features/src/form-draft/handlers/get.query.ts +38 -0
  467. package/packages/bundled-features/src/form-draft/handlers/list.query.ts +54 -0
  468. package/packages/bundled-features/src/form-draft/handlers/save.write.ts +86 -0
  469. package/packages/bundled-features/src/form-draft/index.ts +28 -0
  470. package/packages/bundled-features/src/form-draft/lookup.ts +62 -0
  471. package/packages/bundled-features/src/form-draft/release-file-refs.ts +69 -0
  472. package/packages/bundled-features/src/form-draft/schemas.ts +61 -0
  473. package/packages/bundled-features/src/form-draft-user-data/changes.json +1 -0
  474. package/packages/bundled-features/src/form-draft-user-data/hooks.ts +57 -0
  475. package/packages/bundled-features/src/form-draft-user-data/index.ts +21 -0
  476. package/packages/bundled-features/src/foundation-shared/changes.json +1 -0
  477. package/packages/bundled-features/src/foundation-shared/config-helpers.ts +97 -0
  478. package/packages/bundled-features/src/foundation-shared/host-allowlist.ts +17 -0
  479. package/packages/bundled-features/src/foundation-shared/index.ts +14 -0
  480. package/packages/bundled-features/src/foundation-shared/mail-host-policy.ts +60 -0
  481. package/packages/bundled-features/src/inbound-mail-foundation/aggregate-id.ts +40 -0
  482. package/packages/bundled-features/src/inbound-mail-foundation/changes.json +32 -0
  483. package/packages/bundled-features/src/inbound-mail-foundation/connect-routes.ts +253 -0
  484. package/packages/bundled-features/src/inbound-mail-foundation/constants.ts +80 -0
  485. package/packages/bundled-features/src/inbound-mail-foundation/db/queries/inbound-projections.ts +38 -0
  486. package/packages/bundled-features/src/inbound-mail-foundation/entities.ts +222 -0
  487. package/packages/bundled-features/src/inbound-mail-foundation/events.ts +147 -0
  488. package/packages/bundled-features/src/inbound-mail-foundation/feature.ts +265 -0
  489. package/packages/bundled-features/src/inbound-mail-foundation/handlers/account-state.ts +23 -0
  490. package/packages/bundled-features/src/inbound-mail-foundation/handlers/connect-account.write.ts +118 -0
  491. package/packages/bundled-features/src/inbound-mail-foundation/handlers/disconnect-account.write.ts +72 -0
  492. package/packages/bundled-features/src/inbound-mail-foundation/handlers/ingest-message.write.ts +339 -0
  493. package/packages/bundled-features/src/inbound-mail-foundation/handlers/list-accounts.query.ts +44 -0
  494. package/packages/bundled-features/src/inbound-mail-foundation/handlers/list-messages.query.ts +59 -0
  495. package/packages/bundled-features/src/inbound-mail-foundation/handlers/scope-visibility.ts +14 -0
  496. package/packages/bundled-features/src/inbound-mail-foundation/handlers/update-account.write.ts +80 -0
  497. package/packages/bundled-features/src/inbound-mail-foundation/index.ts +96 -0
  498. package/packages/bundled-features/src/inbound-mail-foundation/oauth-state.ts +103 -0
  499. package/packages/bundled-features/src/inbound-mail-foundation/projection.ts +155 -0
  500. package/packages/bundled-features/src/inbound-mail-foundation/provider-factory.ts +53 -0
  501. package/packages/bundled-features/src/inbound-mail-foundation/retention-sweep.ts +168 -0
  502. package/packages/bundled-features/src/inbound-mail-foundation/tenant-destroy-hook.ts +88 -0
  503. package/packages/bundled-features/src/inbound-mail-foundation/types.ts +257 -0
  504. package/packages/bundled-features/src/inbound-mail-foundation/watch-supervisor.ts +678 -0
  505. package/packages/bundled-features/src/inbound-provider-imap/changes.json +14 -0
  506. package/packages/bundled-features/src/inbound-provider-imap/credential-document.ts +51 -0
  507. package/packages/bundled-features/src/inbound-provider-imap/feature.ts +286 -0
  508. package/packages/bundled-features/src/inbound-provider-imap/imap-client.ts +216 -0
  509. package/packages/bundled-features/src/inbound-provider-imap/index.ts +17 -0
  510. package/packages/bundled-features/src/inbound-provider-inmemory/changes.json +1 -0
  511. package/packages/bundled-features/src/inbound-provider-inmemory/feature.ts +154 -0
  512. package/packages/bundled-features/src/inbound-provider-inmemory/index.ts +12 -0
  513. package/packages/bundled-features/src/jobs/changes.json +47 -0
  514. package/packages/bundled-features/src/jobs/constants.ts +33 -0
  515. package/packages/bundled-features/src/jobs/db/queries/retention.ts +60 -0
  516. package/packages/bundled-features/src/jobs/db/queries/stale-run-sweep.ts +84 -0
  517. package/packages/bundled-features/src/jobs/events.ts +36 -0
  518. package/packages/bundled-features/src/jobs/feature.ts +256 -0
  519. package/packages/bundled-features/src/jobs/handlers/catalog.query.ts +42 -0
  520. package/packages/bundled-features/src/jobs/handlers/detail.query.ts +69 -0
  521. package/packages/bundled-features/src/jobs/handlers/list.query.ts +79 -0
  522. package/packages/bundled-features/src/jobs/handlers/projection-rebuild.job.ts +43 -0
  523. package/packages/bundled-features/src/jobs/handlers/reindex-entity.job.ts +56 -0
  524. package/packages/bundled-features/src/jobs/handlers/retention-cleanup.job.ts +23 -0
  525. package/packages/bundled-features/src/jobs/handlers/retry.write.ts +100 -0
  526. package/packages/bundled-features/src/jobs/handlers/stale-run-sweep.job.ts +30 -0
  527. package/packages/bundled-features/src/jobs/handlers/tenant-failures.query.ts +73 -0
  528. package/packages/bundled-features/src/jobs/handlers/trigger.write.ts +85 -0
  529. package/packages/bundled-features/src/jobs/i18n.ts +54 -0
  530. package/packages/bundled-features/src/jobs/index.ts +7 -0
  531. package/packages/bundled-features/src/jobs/is-manual-trigger.ts +5 -0
  532. package/packages/bundled-features/src/jobs/job-instant.ts +9 -0
  533. package/packages/bundled-features/src/jobs/job-run-logger.ts +457 -0
  534. package/packages/bundled-features/src/jobs/job-run-table.ts +101 -0
  535. package/packages/bundled-features/src/jobs/tenant-job-failure-table.ts +38 -0
  536. package/packages/bundled-features/src/jobs/web/client-plugin.tsx +16 -0
  537. package/packages/bundled-features/src/jobs/web/i18n.ts +8 -0
  538. package/packages/bundled-features/src/jobs/web/index.ts +2 -0
  539. package/packages/bundled-features/src/ledger/changes.json +16 -0
  540. package/packages/bundled-features/src/ledger/constants.ts +60 -0
  541. package/packages/bundled-features/src/ledger/entity.ts +177 -0
  542. package/packages/bundled-features/src/ledger/executor.ts +18 -0
  543. package/packages/bundled-features/src/ledger/feature.ts +180 -0
  544. package/packages/bundled-features/src/ledger/handlers/confirm-schedule-period.write.ts +134 -0
  545. package/packages/bundled-features/src/ledger/handlers/create-transaction.write.ts +48 -0
  546. package/packages/bundled-features/src/ledger/handlers/reports.query.ts +84 -0
  547. package/packages/bundled-features/src/ledger/handlers/reverse-transaction.write.ts +95 -0
  548. package/packages/bundled-features/src/ledger/index.ts +71 -0
  549. package/packages/bundled-features/src/ledger/recurring.ts +149 -0
  550. package/packages/bundled-features/src/ledger/reports.ts +164 -0
  551. package/packages/bundled-features/src/ledger/schemas.ts +71 -0
  552. package/packages/bundled-features/src/ledger/subject-reference.ts +10 -0
  553. package/packages/bundled-features/src/ledger/web/index.ts +36 -0
  554. package/packages/bundled-features/src/legal-pages/README.md +238 -0
  555. package/packages/bundled-features/src/legal-pages/changes.json +8 -0
  556. package/packages/bundled-features/src/legal-pages/constants.ts +54 -0
  557. package/packages/bundled-features/src/legal-pages/feature.ts +287 -0
  558. package/packages/bundled-features/src/legal-pages/index.ts +16 -0
  559. package/packages/bundled-features/src/legal-pages/markdown.ts +7 -0
  560. package/packages/bundled-features/src/legal-pages/web/client-plugin.ts +81 -0
  561. package/packages/bundled-features/src/legal-pages/web/index.ts +4 -0
  562. package/packages/bundled-features/src/mail-foundation/changes.json +1 -0
  563. package/packages/bundled-features/src/mail-foundation/feature.ts +233 -0
  564. package/packages/bundled-features/src/mail-foundation/index.ts +17 -0
  565. package/packages/bundled-features/src/mail-transport-inmemory/changes.json +1 -0
  566. package/packages/bundled-features/src/mail-transport-inmemory/feature.ts +97 -0
  567. package/packages/bundled-features/src/mail-transport-inmemory/index.ts +3 -0
  568. package/packages/bundled-features/src/mail-transport-smtp/changes.json +20 -0
  569. package/packages/bundled-features/src/mail-transport-smtp/feature.ts +268 -0
  570. package/packages/bundled-features/src/mail-transport-smtp/index.ts +8 -0
  571. package/packages/bundled-features/src/managed-pages/branding.ts +173 -0
  572. package/packages/bundled-features/src/managed-pages/changes.json +25 -0
  573. package/packages/bundled-features/src/managed-pages/css-gate.ts +24 -0
  574. package/packages/bundled-features/src/managed-pages/feature.ts +267 -0
  575. package/packages/bundled-features/src/managed-pages/handlers/branding.query.ts +37 -0
  576. package/packages/bundled-features/src/managed-pages/handlers/by-slug.query.ts +40 -0
  577. package/packages/bundled-features/src/managed-pages/handlers/by-tenant-published.query.ts +55 -0
  578. package/packages/bundled-features/src/managed-pages/handlers/page-crud.ts +49 -0
  579. package/packages/bundled-features/src/managed-pages/handlers/set.write.ts +133 -0
  580. package/packages/bundled-features/src/managed-pages/i18n.ts +62 -0
  581. package/packages/bundled-features/src/managed-pages/index.ts +30 -0
  582. package/packages/bundled-features/src/managed-pages/screens/branding-screen.ts +115 -0
  583. package/packages/bundled-features/src/managed-pages/screens/page-screens.ts +89 -0
  584. package/packages/bundled-features/src/managed-pages/seeding.ts +99 -0
  585. package/packages/bundled-features/src/managed-pages/table.ts +80 -0
  586. package/packages/bundled-features/src/managed-pages/web/client-plugin.tsx +22 -0
  587. package/packages/bundled-features/src/managed-pages/web/i18n.ts +19 -0
  588. package/packages/bundled-features/src/managed-pages/web/index.ts +3 -0
  589. package/packages/bundled-features/src/metrics/changes.json +21 -0
  590. package/packages/bundled-features/src/metrics/compute.ts +243 -0
  591. package/packages/bundled-features/src/metrics/constants.ts +22 -0
  592. package/packages/bundled-features/src/metrics/default-metrics.ts +133 -0
  593. package/packages/bundled-features/src/metrics/feature.ts +159 -0
  594. package/packages/bundled-features/src/metrics/i18n.ts +18 -0
  595. package/packages/bundled-features/src/metrics/index.ts +33 -0
  596. package/packages/bundled-features/src/metrics/types.ts +81 -0
  597. package/packages/bundled-features/src/metrics/validate.ts +73 -0
  598. package/packages/bundled-features/src/metrics/window.ts +89 -0
  599. package/packages/bundled-features/src/notes-history/changes.json +30 -0
  600. package/packages/bundled-features/src/notes-history/constants.ts +34 -0
  601. package/packages/bundled-features/src/notes-history/entity.ts +128 -0
  602. package/packages/bundled-features/src/notes-history/executor.ts +22 -0
  603. package/packages/bundled-features/src/notes-history/feature.ts +150 -0
  604. package/packages/bundled-features/src/notes-history/handlers/add-note.write.ts +118 -0
  605. package/packages/bundled-features/src/notes-history/i18n.ts +3 -0
  606. package/packages/bundled-features/src/notes-history/index.ts +25 -0
  607. package/packages/bundled-features/src/notes-history/schemas.ts +17 -0
  608. package/packages/bundled-features/src/notes-history/web/client-plugin.tsx +16 -0
  609. package/packages/bundled-features/src/notes-history/web/i18n.ts +22 -0
  610. package/packages/bundled-features/src/notes-history/web/index.ts +8 -0
  611. package/packages/bundled-features/src/notes-history/web/notes-section.tsx +190 -0
  612. package/packages/bundled-features/src/notes-history-user-data/changes.json +8 -0
  613. package/packages/bundled-features/src/notes-history-user-data/hooks.ts +131 -0
  614. package/packages/bundled-features/src/notes-history-user-data/index.ts +34 -0
  615. package/packages/bundled-features/src/page-render/branding.ts +100 -0
  616. package/packages/bundled-features/src/page-render/cached-page-response.ts +25 -0
  617. package/packages/bundled-features/src/page-render/changes.json +14 -0
  618. package/packages/bundled-features/src/page-render/css-sanitize.ts +344 -0
  619. package/packages/bundled-features/src/page-render/index.ts +22 -0
  620. package/packages/bundled-features/src/page-render/layout.ts +115 -0
  621. package/packages/bundled-features/src/page-render/markdown.ts +31 -0
  622. package/packages/bundled-features/src/page-render/security-headers.ts +19 -0
  623. package/packages/bundled-features/src/page-render/web.ts +14 -0
  624. package/packages/bundled-features/src/personal-access-tokens/changes.json +25 -0
  625. package/packages/bundled-features/src/personal-access-tokens/constants.ts +45 -0
  626. package/packages/bundled-features/src/personal-access-tokens/expiry.ts +7 -0
  627. package/packages/bundled-features/src/personal-access-tokens/feature.ts +184 -0
  628. package/packages/bundled-features/src/personal-access-tokens/handlers/available-scopes.query.ts +29 -0
  629. package/packages/bundled-features/src/personal-access-tokens/handlers/create.write.ts +124 -0
  630. package/packages/bundled-features/src/personal-access-tokens/handlers/list.query.ts +117 -0
  631. package/packages/bundled-features/src/personal-access-tokens/handlers/revoke.write.ts +62 -0
  632. package/packages/bundled-features/src/personal-access-tokens/hash.ts +17 -0
  633. package/packages/bundled-features/src/personal-access-tokens/i18n.ts +64 -0
  634. package/packages/bundled-features/src/personal-access-tokens/index.ts +43 -0
  635. package/packages/bundled-features/src/personal-access-tokens/pat-revoked-event.ts +23 -0
  636. package/packages/bundled-features/src/personal-access-tokens/resolver.ts +53 -0
  637. package/packages/bundled-features/src/personal-access-tokens/revoke-for-user.ts +62 -0
  638. package/packages/bundled-features/src/personal-access-tokens/roles.ts +37 -0
  639. package/packages/bundled-features/src/personal-access-tokens/schema/api-token.ts +93 -0
  640. package/packages/bundled-features/src/personal-access-tokens/scopes.ts +43 -0
  641. package/packages/bundled-features/src/personal-access-tokens/screens.ts +131 -0
  642. package/packages/bundled-features/src/presets/changes.json +8 -0
  643. package/packages/bundled-features/src/presets/dsgvo-self-service.ts +33 -0
  644. package/packages/bundled-features/src/presets/index.ts +2 -0
  645. package/packages/bundled-features/src/presets/security-baseline.ts +19 -0
  646. package/packages/bundled-features/src/rate-limiting/changes.json +14 -0
  647. package/packages/bundled-features/src/rate-limiting/constants.ts +10 -0
  648. package/packages/bundled-features/src/rate-limiting/feature.ts +30 -0
  649. package/packages/bundled-features/src/rate-limiting/handlers/bucket-access.ts +45 -0
  650. package/packages/bundled-features/src/rate-limiting/handlers/status.query.ts +60 -0
  651. package/packages/bundled-features/src/rate-limiting/i18n.ts +10 -0
  652. package/packages/bundled-features/src/rate-limiting/index.ts +2 -0
  653. package/packages/bundled-features/src/readiness/changes.json +1 -0
  654. package/packages/bundled-features/src/readiness/constants.ts +7 -0
  655. package/packages/bundled-features/src/readiness/feature.ts +31 -0
  656. package/packages/bundled-features/src/readiness/handlers/status.query.ts +55 -0
  657. package/packages/bundled-features/src/readiness/index.ts +3 -0
  658. package/packages/bundled-features/src/renderer-foundation/README.md +86 -0
  659. package/packages/bundled-features/src/renderer-foundation/api.ts +106 -0
  660. package/packages/bundled-features/src/renderer-foundation/changes.json +8 -0
  661. package/packages/bundled-features/src/renderer-foundation/constants.ts +25 -0
  662. package/packages/bundled-features/src/renderer-foundation/feature.ts +52 -0
  663. package/packages/bundled-features/src/renderer-foundation/index.ts +28 -0
  664. package/packages/bundled-features/src/renderer-foundation/types.ts +131 -0
  665. package/packages/bundled-features/src/renderer-simple/changes.json +1 -0
  666. package/packages/bundled-features/src/renderer-simple/feature.ts +57 -0
  667. package/packages/bundled-features/src/renderer-simple/index.ts +2 -0
  668. package/packages/bundled-features/src/renderer-simple/resolve-variables.ts +57 -0
  669. package/packages/bundled-features/src/renderer-simple/simple-renderer.ts +65 -0
  670. package/packages/bundled-features/src/secrets/changes.json +29 -0
  671. package/packages/bundled-features/src/secrets/constants.ts +12 -0
  672. package/packages/bundled-features/src/secrets/db/queries/read.ts +16 -0
  673. package/packages/bundled-features/src/secrets/feature.ts +197 -0
  674. package/packages/bundled-features/src/secrets/handlers/delete.write.ts +29 -0
  675. package/packages/bundled-features/src/secrets/handlers/list.query.ts +40 -0
  676. package/packages/bundled-features/src/secrets/handlers/rotate.job.ts +166 -0
  677. package/packages/bundled-features/src/secrets/handlers/set.write.ts +60 -0
  678. package/packages/bundled-features/src/secrets/i18n.ts +10 -0
  679. package/packages/bundled-features/src/secrets/index.ts +23 -0
  680. package/packages/bundled-features/src/secrets/secrets-context.ts +261 -0
  681. package/packages/bundled-features/src/secrets/table.ts +69 -0
  682. package/packages/bundled-features/src/secrets/write-gate.ts +62 -0
  683. package/packages/bundled-features/src/seo/changes.json +20 -0
  684. package/packages/bundled-features/src/seo/constants.ts +60 -0
  685. package/packages/bundled-features/src/seo/feature.ts +317 -0
  686. package/packages/bundled-features/src/seo/handlers/seo-config.query.ts +38 -0
  687. package/packages/bundled-features/src/seo/index.ts +24 -0
  688. package/packages/bundled-features/src/seo/llms-txt.ts +33 -0
  689. package/packages/bundled-features/src/seo/robots-txt.ts +33 -0
  690. package/packages/bundled-features/src/seo/schema-builders.ts +57 -0
  691. package/packages/bundled-features/src/seo/sitemap.ts +33 -0
  692. package/packages/bundled-features/src/sessions/changes.json +45 -0
  693. package/packages/bundled-features/src/sessions/constants.ts +58 -0
  694. package/packages/bundled-features/src/sessions/db/queries/cleanup.ts +21 -0
  695. package/packages/bundled-features/src/sessions/feature.ts +240 -0
  696. package/packages/bundled-features/src/sessions/handlers/cleanup.job.ts +83 -0
  697. package/packages/bundled-features/src/sessions/handlers/detail.query.ts +51 -0
  698. package/packages/bundled-features/src/sessions/handlers/list.query.ts +92 -0
  699. package/packages/bundled-features/src/sessions/handlers/mine.query.ts +67 -0
  700. package/packages/bundled-features/src/sessions/handlers/revoke-all-for-user.write.ts +122 -0
  701. package/packages/bundled-features/src/sessions/handlers/revoke-all-others.write.ts +68 -0
  702. package/packages/bundled-features/src/sessions/handlers/revoke.write.ts +94 -0
  703. package/packages/bundled-features/src/sessions/i18n.ts +33 -0
  704. package/packages/bundled-features/src/sessions/index.ts +25 -0
  705. package/packages/bundled-features/src/sessions/schema/user-session.ts +91 -0
  706. package/packages/bundled-features/src/sessions/screens.ts +157 -0
  707. package/packages/bundled-features/src/sessions/session-callbacks.ts +302 -0
  708. package/packages/bundled-features/src/sessions/session-revoked-event.ts +37 -0
  709. package/packages/bundled-features/src/sessions/testing.ts +55 -0
  710. package/packages/bundled-features/src/shared/assert-erased.ts +26 -0
  711. package/packages/bundled-features/src/shared/changes.json +14 -0
  712. package/packages/bundled-features/src/shared/chunked-entity-migration.ts +89 -0
  713. package/packages/bundled-features/src/shared/classify-stored-envelope.ts +21 -0
  714. package/packages/bundled-features/src/shared/decrypt-stored-pii.ts +26 -0
  715. package/packages/bundled-features/src/shared/encrypt-for-direct-write.ts +29 -0
  716. package/packages/bundled-features/src/shared/entities-of.ts +17 -0
  717. package/packages/bundled-features/src/shared/grace-period.ts +21 -0
  718. package/packages/bundled-features/src/shared/has-where-rule.ts +11 -0
  719. package/packages/bundled-features/src/shared/identity-v3-hash.ts +97 -0
  720. package/packages/bundled-features/src/shared/index.ts +53 -0
  721. package/packages/bundled-features/src/shared/is-tenant-db.ts +9 -0
  722. package/packages/bundled-features/src/shared/lockout-counter.ts +108 -0
  723. package/packages/bundled-features/src/shared/map-with-concurrency.ts +38 -0
  724. package/packages/bundled-features/src/shared/parent-visibility.ts +104 -0
  725. package/packages/bundled-features/src/shared/password-hashing.ts +55 -0
  726. package/packages/bundled-features/src/shared/row-bound-grant.ts +128 -0
  727. package/packages/bundled-features/src/shared/run-in-sub-transaction.ts +35 -0
  728. package/packages/bundled-features/src/shared/session-locale-field.ts +9 -0
  729. package/packages/bundled-features/src/shared/session-timezone-field.ts +8 -0
  730. package/packages/bundled-features/src/shared/signed-token.ts +101 -0
  731. package/packages/bundled-features/src/shared/signup-handover.ts +67 -0
  732. package/packages/bundled-features/src/shared/single-use-token-store.ts +148 -0
  733. package/packages/bundled-features/src/shared/system-query.ts +5 -0
  734. package/packages/bundled-features/src/shared/token-burn-store.ts +57 -0
  735. package/packages/bundled-features/src/step-dispatcher/changes.json +32 -0
  736. package/packages/bundled-features/src/step-dispatcher/feature.ts +299 -0
  737. package/packages/bundled-features/src/step-dispatcher/index.ts +25 -0
  738. package/packages/bundled-features/src/step-dispatcher/mail-runner.ts +39 -0
  739. package/packages/bundled-features/src/step-dispatcher/webhook-runner.ts +221 -0
  740. package/packages/bundled-features/src/subscription-mollie/changes.json +28 -0
  741. package/packages/bundled-features/src/subscription-mollie/constants.ts +33 -0
  742. package/packages/bundled-features/src/subscription-mollie/feature.ts +169 -0
  743. package/packages/bundled-features/src/subscription-mollie/index.ts +14 -0
  744. package/packages/bundled-features/src/subscription-mollie/plugin-methods.ts +97 -0
  745. package/packages/bundled-features/src/subscription-mollie/verify-webhook.ts +259 -0
  746. package/packages/bundled-features/src/subscription-stripe/changes.json +80 -0
  747. package/packages/bundled-features/src/subscription-stripe/constants.ts +35 -0
  748. package/packages/bundled-features/src/subscription-stripe/feature.ts +251 -0
  749. package/packages/bundled-features/src/subscription-stripe/index.ts +18 -0
  750. package/packages/bundled-features/src/subscription-stripe/plugin-methods.ts +646 -0
  751. package/packages/bundled-features/src/subscription-stripe/runtime.ts +193 -0
  752. package/packages/bundled-features/src/subscription-stripe/verify-webhook.ts +436 -0
  753. package/packages/bundled-features/src/tags/aggregate-id.ts +23 -0
  754. package/packages/bundled-features/src/tags/changes.json +16 -0
  755. package/packages/bundled-features/src/tags/constants.ts +61 -0
  756. package/packages/bundled-features/src/tags/entity.ts +99 -0
  757. package/packages/bundled-features/src/tags/executor.ts +24 -0
  758. package/packages/bundled-features/src/tags/feature.ts +219 -0
  759. package/packages/bundled-features/src/tags/handlers/assign-tag.write.ts +101 -0
  760. package/packages/bundled-features/src/tags/handlers/create-tag.write.ts +27 -0
  761. package/packages/bundled-features/src/tags/handlers/delete-tag.write.ts +60 -0
  762. package/packages/bundled-features/src/tags/handlers/remove-tag.write.ts +53 -0
  763. package/packages/bundled-features/src/tags/handlers/update-tag.write.ts +36 -0
  764. package/packages/bundled-features/src/tags/i18n.ts +9 -0
  765. package/packages/bundled-features/src/tags/index.ts +48 -0
  766. package/packages/bundled-features/src/tags/schemas.ts +61 -0
  767. package/packages/bundled-features/src/tags/screens.ts +70 -0
  768. package/packages/bundled-features/src/tags/web/client-plugin.tsx +30 -0
  769. package/packages/bundled-features/src/tags/web/entity-tags.tsx +54 -0
  770. package/packages/bundled-features/src/tags/web/i18n.ts +34 -0
  771. package/packages/bundled-features/src/tags/web/index.ts +18 -0
  772. package/packages/bundled-features/src/tags/web/tag-chip.tsx +65 -0
  773. package/packages/bundled-features/src/tags/web/tag-filter.tsx +100 -0
  774. package/packages/bundled-features/src/tags/web/tag-manager.tsx +391 -0
  775. package/packages/bundled-features/src/tags/web/tag-picker.tsx +55 -0
  776. package/packages/bundled-features/src/tags/web/tag-section.tsx +179 -0
  777. package/packages/bundled-features/src/tags/web/tags-cell.tsx +46 -0
  778. package/packages/bundled-features/src/template-resolver/README.md +255 -0
  779. package/packages/bundled-features/src/template-resolver/api.ts +202 -0
  780. package/packages/bundled-features/src/template-resolver/changes.json +16 -0
  781. package/packages/bundled-features/src/template-resolver/constants.ts +54 -0
  782. package/packages/bundled-features/src/template-resolver/feature.ts +99 -0
  783. package/packages/bundled-features/src/template-resolver/handlers/by-slug.query.ts +61 -0
  784. package/packages/bundled-features/src/template-resolver/handlers/by-tenant.query.ts +63 -0
  785. package/packages/bundled-features/src/template-resolver/handlers/collection-item.query.ts +53 -0
  786. package/packages/bundled-features/src/template-resolver/handlers/collection-list.query.ts +56 -0
  787. package/packages/bundled-features/src/template-resolver/handlers/collection-set.write.ts +117 -0
  788. package/packages/bundled-features/src/template-resolver/handlers/collection-shared.ts +90 -0
  789. package/packages/bundled-features/src/template-resolver/handlers/find-by-id.query.ts +44 -0
  790. package/packages/bundled-features/src/template-resolver/handlers/list.query.ts +60 -0
  791. package/packages/bundled-features/src/template-resolver/handlers/set.write.ts +126 -0
  792. package/packages/bundled-features/src/template-resolver/handlers/shared.ts +51 -0
  793. package/packages/bundled-features/src/template-resolver/handlers/toggle-status.write.ts +46 -0
  794. package/packages/bundled-features/src/template-resolver/handlers/upsert-system.write.ts +81 -0
  795. package/packages/bundled-features/src/template-resolver/handlers/upsert-tenant.write.ts +105 -0
  796. package/packages/bundled-features/src/template-resolver/index.ts +44 -0
  797. package/packages/bundled-features/src/template-resolver/qualified-names.ts +40 -0
  798. package/packages/bundled-features/src/template-resolver/seeding.ts +323 -0
  799. package/packages/bundled-features/src/template-resolver/table.ts +90 -0
  800. package/packages/bundled-features/src/template-resolver/testing.ts +199 -0
  801. package/packages/bundled-features/src/template-resolver/user-content-table.ts +68 -0
  802. package/packages/bundled-features/src/template-resolver/web/client-plugin.tsx +516 -0
  803. package/packages/bundled-features/src/template-resolver/web/i18n.ts +25 -0
  804. package/packages/bundled-features/src/template-resolver/web/index.ts +8 -0
  805. package/packages/bundled-features/src/template-resolver-user-data/hooks.ts +40 -0
  806. package/packages/bundled-features/src/template-resolver-user-data/index.ts +25 -0
  807. package/packages/bundled-features/src/tenant/cancel-pending-invitation.ts +43 -0
  808. package/packages/bundled-features/src/tenant/changes.json +105 -0
  809. package/packages/bundled-features/src/tenant/command-schemas.ts +37 -0
  810. package/packages/bundled-features/src/tenant/constants.ts +78 -0
  811. package/packages/bundled-features/src/tenant/feature.ts +213 -0
  812. package/packages/bundled-features/src/tenant/handlers/active-tenant-ids.query.ts +30 -0
  813. package/packages/bundled-features/src/tenant/handlers/add-member.write.ts +64 -0
  814. package/packages/bundled-features/src/tenant/handlers/cancel-invitation.write.ts +68 -0
  815. package/packages/bundled-features/src/tenant/handlers/create.write.ts +37 -0
  816. package/packages/bundled-features/src/tenant/handlers/invitations.query.ts +58 -0
  817. package/packages/bundled-features/src/tenant/handlers/is-system-admin.ts +5 -0
  818. package/packages/bundled-features/src/tenant/handlers/list.query.ts +30 -0
  819. package/packages/bundled-features/src/tenant/handlers/me.query.ts +38 -0
  820. package/packages/bundled-features/src/tenant/handlers/member-directory.query.ts +108 -0
  821. package/packages/bundled-features/src/tenant/handlers/members.query.ts +73 -0
  822. package/packages/bundled-features/src/tenant/handlers/memberships.query.ts +58 -0
  823. package/packages/bundled-features/src/tenant/handlers/remove-member.write.ts +142 -0
  824. package/packages/bundled-features/src/tenant/handlers/resolve-user-ids.query.ts +44 -0
  825. package/packages/bundled-features/src/tenant/handlers/team-list.query.ts +257 -0
  826. package/packages/bundled-features/src/tenant/handlers/tenant-directory.query.ts +71 -0
  827. package/packages/bundled-features/src/tenant/handlers/toggle-enabled.write.ts +37 -0
  828. package/packages/bundled-features/src/tenant/handlers/update-member-roles.write.ts +208 -0
  829. package/packages/bundled-features/src/tenant/handlers/update.write.ts +55 -0
  830. package/packages/bundled-features/src/tenant/i18n.ts +61 -0
  831. package/packages/bundled-features/src/tenant/index.ts +24 -0
  832. package/packages/bundled-features/src/tenant/invitation-table.ts +104 -0
  833. package/packages/bundled-features/src/tenant/invited-membership.ts +97 -0
  834. package/packages/bundled-features/src/tenant/is-tenant-serving-public-content.ts +13 -0
  835. package/packages/bundled-features/src/tenant/last-tenant-admin.ts +43 -0
  836. package/packages/bundled-features/src/tenant/membership-roles.ts +34 -0
  837. package/packages/bundled-features/src/tenant/membership-table.ts +32 -0
  838. package/packages/bundled-features/src/tenant/schema/tenant.ts +73 -0
  839. package/packages/bundled-features/src/tenant/screens.ts +221 -0
  840. package/packages/bundled-features/src/tenant/seeding.ts +335 -0
  841. package/packages/bundled-features/src/tenant/testing.ts +8 -0
  842. package/packages/bundled-features/src/tenant/web/client-plugin.tsx +25 -0
  843. package/packages/bundled-features/src/tenant/web/index.ts +4 -0
  844. package/packages/bundled-features/src/tenant/web/member-roles-cell.tsx +21 -0
  845. package/packages/bundled-features/src/tenant/web/member-status-cell.tsx +27 -0
  846. package/packages/bundled-features/src/tenant/web/translate-or-raw.ts +13 -0
  847. package/packages/bundled-features/src/tenant-handover/changes.json +34 -0
  848. package/packages/bundled-features/src/tenant-handover/events.ts +32 -0
  849. package/packages/bundled-features/src/tenant-handover/feature.ts +46 -0
  850. package/packages/bundled-features/src/tenant-handover/grant.ts +43 -0
  851. package/packages/bundled-features/src/tenant-handover/handlers/claim.write.ts +134 -0
  852. package/packages/bundled-features/src/tenant-handover/index.ts +9 -0
  853. package/packages/bundled-features/src/tenant-handover/move-entity-graph.ts +355 -0
  854. package/packages/bundled-features/src/tenant-handover/root-anchor.ts +50 -0
  855. package/packages/bundled-features/src/tenant-handover/signup-handover-provider.ts +62 -0
  856. package/packages/bundled-features/src/tenant-handover/transfer-graph.ts +128 -0
  857. package/packages/bundled-features/src/tenant-lifecycle/boot-checks.ts +79 -0
  858. package/packages/bundled-features/src/tenant-lifecycle/changes.json +8 -0
  859. package/packages/bundled-features/src/tenant-lifecycle/constants.ts +56 -0
  860. package/packages/bundled-features/src/tenant-lifecycle/events.ts +46 -0
  861. package/packages/bundled-features/src/tenant-lifecycle/feature.ts +150 -0
  862. package/packages/bundled-features/src/tenant-lifecycle/handlers/cancel-destruction.write.ts +86 -0
  863. package/packages/bundled-features/src/tenant-lifecycle/handlers/request-destruction.write.ts +94 -0
  864. package/packages/bundled-features/src/tenant-lifecycle/index.ts +7 -0
  865. package/packages/bundled-features/src/tenant-lifecycle/lib/revoke-tenant-sessions.ts +16 -0
  866. package/packages/bundled-features/src/tenant-lifecycle/lifecycle-gate.ts +87 -0
  867. package/packages/bundled-features/src/tenant-lifecycle/run-tenant-destroy.ts +387 -0
  868. package/packages/bundled-features/src/tenant-lifecycle/stages.ts +242 -0
  869. package/packages/bundled-features/src/tenant-settings/changes.json +1 -0
  870. package/packages/bundled-features/src/tenant-settings/config.ts +43 -0
  871. package/packages/bundled-features/src/tenant-settings/constants.ts +21 -0
  872. package/packages/bundled-features/src/tenant-settings/feature.ts +55 -0
  873. package/packages/bundled-features/src/tenant-settings/index.ts +8 -0
  874. package/packages/bundled-features/src/tenant-settings/tenant-defaults.ts +78 -0
  875. package/packages/bundled-features/src/tier-engine/aggregate-id.ts +28 -0
  876. package/packages/bundled-features/src/tier-engine/changes.json +16 -0
  877. package/packages/bundled-features/src/tier-engine/compose-app.ts +153 -0
  878. package/packages/bundled-features/src/tier-engine/constants.ts +28 -0
  879. package/packages/bundled-features/src/tier-engine/entity.ts +55 -0
  880. package/packages/bundled-features/src/tier-engine/feature.ts +549 -0
  881. package/packages/bundled-features/src/tier-engine/handlers/active-tier.query.ts +25 -0
  882. package/packages/bundled-features/src/tier-engine/handlers/get-tenant-tier.query.ts +32 -0
  883. package/packages/bundled-features/src/tier-engine/handlers/set-tenant-tier.write.ts +108 -0
  884. package/packages/bundled-features/src/tier-engine/i18n.ts +31 -0
  885. package/packages/bundled-features/src/tier-engine/index.ts +32 -0
  886. package/packages/bundled-features/src/tier-engine/tier-resolver.ts +38 -0
  887. package/packages/bundled-features/src/tier-engine/trial.ts +26 -0
  888. package/packages/bundled-features/src/tier-engine/web/client-plugin.tsx +21 -0
  889. package/packages/bundled-features/src/tier-engine/web/index.ts +7 -0
  890. package/packages/bundled-features/src/user/changes.json +48 -0
  891. package/packages/bundled-features/src/user/command-schemas.ts +15 -0
  892. package/packages/bundled-features/src/user/constants.ts +32 -0
  893. package/packages/bundled-features/src/user/db/queries/stream-tenant-backfill.ts +113 -0
  894. package/packages/bundled-features/src/user/feature.ts +61 -0
  895. package/packages/bundled-features/src/user/handlers/create.write.ts +136 -0
  896. package/packages/bundled-features/src/user/handlers/detail.query.ts +34 -0
  897. package/packages/bundled-features/src/user/handlers/find-for-auth.query.ts +51 -0
  898. package/packages/bundled-features/src/user/handlers/list.query.ts +123 -0
  899. package/packages/bundled-features/src/user/handlers/me.query.ts +38 -0
  900. package/packages/bundled-features/src/user/handlers/update-roles.ts +203 -0
  901. package/packages/bundled-features/src/user/handlers/update.write.ts +112 -0
  902. package/packages/bundled-features/src/user/i18n.ts +23 -0
  903. package/packages/bundled-features/src/user/index.ts +19 -0
  904. package/packages/bundled-features/src/user/principal-status.ts +47 -0
  905. package/packages/bundled-features/src/user/roles-input-schema.ts +20 -0
  906. package/packages/bundled-features/src/user/schema/user.ts +215 -0
  907. package/packages/bundled-features/src/user/screens.ts +54 -0
  908. package/packages/bundled-features/src/user/seeding.ts +139 -0
  909. package/packages/bundled-features/src/user/testing.ts +5 -0
  910. package/packages/bundled-features/src/user-data-rights/COMPLIANCE.md +202 -0
  911. package/packages/bundled-features/src/user-data-rights/README.md +109 -0
  912. package/packages/bundled-features/src/user-data-rights/audit-download.ts +125 -0
  913. package/packages/bundled-features/src/user-data-rights/boot-checks.ts +71 -0
  914. package/packages/bundled-features/src/user-data-rights/changes.json +116 -0
  915. package/packages/bundled-features/src/user-data-rights/constants.ts +63 -0
  916. package/packages/bundled-features/src/user-data-rights/db/queries/export-jobs.ts +28 -0
  917. package/packages/bundled-features/src/user-data-rights/db/queries/forget-cleanup.ts +25 -0
  918. package/packages/bundled-features/src/user-data-rights/deletion-token.ts +58 -0
  919. package/packages/bundled-features/src/user-data-rights/email-templates.ts +175 -0
  920. package/packages/bundled-features/src/user-data-rights/feature.ts +808 -0
  921. package/packages/bundled-features/src/user-data-rights/handlers/cancel-deletion.write.ts +83 -0
  922. package/packages/bundled-features/src/user-data-rights/handlers/confirm-deletion-by-token.write.ts +107 -0
  923. package/packages/bundled-features/src/user-data-rights/handlers/deletion-grace-period.ts +138 -0
  924. package/packages/bundled-features/src/user-data-rights/handlers/download-attempt-list.query.ts +20 -0
  925. package/packages/bundled-features/src/user-data-rights/handlers/download-by-job.query.ts +220 -0
  926. package/packages/bundled-features/src/user-data-rights/handlers/download-by-token.query.ts +259 -0
  927. package/packages/bundled-features/src/user-data-rights/handlers/export-job-detail.query.ts +13 -0
  928. package/packages/bundled-features/src/user-data-rights/handlers/export-job-list.query.ts +14 -0
  929. package/packages/bundled-features/src/user-data-rights/handlers/export-status.query.ts +75 -0
  930. package/packages/bundled-features/src/user-data-rights/handlers/lift-restriction.write.ts +88 -0
  931. package/packages/bundled-features/src/user-data-rights/handlers/list-download-attempts.query.ts +49 -0
  932. package/packages/bundled-features/src/user-data-rights/handlers/my-audit-log.query.ts +87 -0
  933. package/packages/bundled-features/src/user-data-rights/handlers/request-deletion-by-email.write.ts +127 -0
  934. package/packages/bundled-features/src/user-data-rights/handlers/request-deletion.write.ts +117 -0
  935. package/packages/bundled-features/src/user-data-rights/handlers/request-export.write.ts +165 -0
  936. package/packages/bundled-features/src/user-data-rights/handlers/restrict-account.write.ts +133 -0
  937. package/packages/bundled-features/src/user-data-rights/handlers/run-forget-cleanup.write.ts +95 -0
  938. package/packages/bundled-features/src/user-data-rights/i18n.ts +39 -0
  939. package/packages/bundled-features/src/user-data-rights/index.ts +33 -0
  940. package/packages/bundled-features/src/user-data-rights/lib/default-mailers.ts +120 -0
  941. package/packages/bundled-features/src/user-data-rights/lib/deny-if-target-outside-admin-tenant.ts +32 -0
  942. package/packages/bundled-features/src/user-data-rights/lib/is-admin-actor.ts +19 -0
  943. package/packages/bundled-features/src/user-data-rights/lib/mail-transport-resolver.ts +50 -0
  944. package/packages/bundled-features/src/user-data-rights/lib/resolve-tenant-model.ts +34 -0
  945. package/packages/bundled-features/src/user-data-rights/lib/storage-provider-resolver.ts +49 -0
  946. package/packages/bundled-features/src/user-data-rights/lib/update-user-lifecycle.ts +126 -0
  947. package/packages/bundled-features/src/user-data-rights/run-export-jobs.ts +998 -0
  948. package/packages/bundled-features/src/user-data-rights/run-forget-cleanup.ts +665 -0
  949. package/packages/bundled-features/src/user-data-rights/run-user-export.ts +346 -0
  950. package/packages/bundled-features/src/user-data-rights/schema/download-attempt.ts +57 -0
  951. package/packages/bundled-features/src/user-data-rights/schema/download-token.ts +119 -0
  952. package/packages/bundled-features/src/user-data-rights/schema/export-job.ts +174 -0
  953. package/packages/bundled-features/src/user-data-rights/screens.ts +77 -0
  954. package/packages/bundled-features/src/user-data-rights/token-helpers.ts +67 -0
  955. package/packages/bundled-features/src/user-data-rights/web/client-plugin.tsx +52 -0
  956. package/packages/bundled-features/src/user-data-rights/web/confirm-deletion-screen.tsx +97 -0
  957. package/packages/bundled-features/src/user-data-rights/web/i18n.ts +93 -0
  958. package/packages/bundled-features/src/user-data-rights/web/index.ts +15 -0
  959. package/packages/bundled-features/src/user-data-rights/web/privacy-center-screen.tsx +185 -0
  960. package/packages/bundled-features/src/user-data-rights/web/public-deletion-gate.tsx +42 -0
  961. package/packages/bundled-features/src/user-data-rights/web/request-deletion-screen.tsx +104 -0
  962. package/packages/bundled-features/src/user-data-rights/zip-path.ts +94 -0
  963. package/packages/bundled-features/src/user-data-rights-defaults/changes.json +13 -0
  964. package/packages/bundled-features/src/user-data-rights-defaults/feature.ts +136 -0
  965. package/packages/bundled-features/src/user-data-rights-defaults/hooks/api-token.userdata-hook.ts +36 -0
  966. package/packages/bundled-features/src/user-data-rights-defaults/hooks/config-value.userdata-hook.ts +57 -0
  967. package/packages/bundled-features/src/user-data-rights-defaults/hooks/delivery-attempt.userdata-hook.ts +36 -0
  968. package/packages/bundled-features/src/user-data-rights-defaults/hooks/feature-mounted.ts +10 -0
  969. package/packages/bundled-features/src/user-data-rights-defaults/hooks/file-ref.userdata-hook.ts +280 -0
  970. package/packages/bundled-features/src/user-data-rights-defaults/hooks/in-app-message.userdata-hook.ts +37 -0
  971. package/packages/bundled-features/src/user-data-rights-defaults/hooks/job-run.userdata-hook.ts +34 -0
  972. package/packages/bundled-features/src/user-data-rights-defaults/hooks/notification-preference.userdata-hook.ts +63 -0
  973. package/packages/bundled-features/src/user-data-rights-defaults/hooks/tenant-invitation.userdata-hook.ts +144 -0
  974. package/packages/bundled-features/src/user-data-rights-defaults/hooks/user-session.userdata-hook.ts +41 -0
  975. package/packages/bundled-features/src/user-data-rights-defaults/hooks/user.userdata-hook.ts +126 -0
  976. package/packages/bundled-features/src/user-data-rights-defaults/index.ts +32 -0
  977. package/packages/bundled-features/src/user-profile/changes.json +21 -0
  978. package/packages/bundled-features/src/user-profile/constants.ts +35 -0
  979. package/packages/bundled-features/src/user-profile/feature.ts +154 -0
  980. package/packages/bundled-features/src/user-profile/handlers/change-email.write.ts +99 -0
  981. package/packages/bundled-features/src/user-profile/i18n.ts +46 -0
  982. package/packages/bundled-features/src/user-profile/index.ts +11 -0
  983. package/packages/bundled-features/src/user-profile/web/client-plugin.ts +45 -0
  984. package/packages/bundled-features/src/user-profile/web/index.ts +6 -0
  985. package/packages/bundled-features/src/user-profile/web/profile-screen.tsx +234 -0
  986. package/packages/bundled-features/src/workflow-runner/aggregate-id.ts +20 -0
  987. package/packages/bundled-features/src/workflow-runner/changes.json +20 -0
  988. package/packages/bundled-features/src/workflow-runner/db/queries/due-runs.ts +24 -0
  989. package/packages/bundled-features/src/workflow-runner/event-subscriber.ts +113 -0
  990. package/packages/bundled-features/src/workflow-runner/event-trigger.ts +121 -0
  991. package/packages/bundled-features/src/workflow-runner/feature.ts +96 -0
  992. package/packages/bundled-features/src/workflow-runner/handlers/resume-run.write.ts +358 -0
  993. package/packages/bundled-features/src/workflow-runner/index.ts +12 -0
  994. package/packages/bundled-features/src/workflow-runner/pending-projection.ts +158 -0
  995. package/packages/bundled-features/src/workflow-runner/runner.ts +153 -0
  996. package/packages/bundled-features/src/workflow-runner/tables.ts +95 -0
  997. package/packages/bundled-features/src/workflow-runner/workflow-registry.ts +23 -0
  998. package/samples/apps/admin-console/README.md +90 -0
  999. package/samples/apps/admin-console/package.json +22 -0
  1000. package/samples/apps/admin-console/playwright.config.ts +13 -0
  1001. package/samples/apps/admin-console/src/app/auth-constants.ts +10 -0
  1002. package/samples/apps/admin-console/src/app/client.tsx +29 -0
  1003. package/samples/apps/admin-console/src/app/home-screen.tsx +14 -0
  1004. package/samples/apps/admin-console/src/app/seed-users.ts +42 -0
  1005. package/samples/apps/admin-console/src/app/server.ts +35 -0
  1006. package/samples/apps/admin-console/src/app/shell.tsx +48 -0
  1007. package/samples/apps/admin-console/src/run-config.ts +60 -0
  1008. package/samples/apps/admin-console/tsconfig.json +23 -0
  1009. package/samples/apps/cap-billing-demo/README.md +151 -0
  1010. package/samples/apps/cap-billing-demo/bin/server.ts +37 -0
  1011. package/samples/apps/cap-billing-demo/package.json +16 -0
  1012. package/samples/apps/cap-billing-demo/src/feature.ts +208 -0
  1013. package/samples/apps/cap-billing-demo/src/run-config.ts +51 -0
  1014. package/samples/apps/cap-billing-demo/src/tier-map.ts +46 -0
  1015. package/samples/apps/cap-billing-demo/tsconfig.json +21 -0
  1016. package/samples/apps/config-demo/README.md +81 -0
  1017. package/samples/apps/config-demo/package.json +22 -0
  1018. package/samples/apps/config-demo/playwright.config.ts +11 -0
  1019. package/samples/apps/config-demo/src/app/client.tsx +12 -0
  1020. package/samples/apps/config-demo/src/app/server.ts +31 -0
  1021. package/samples/apps/config-demo/src/app/shell.tsx +31 -0
  1022. package/samples/apps/config-demo/src/features/demo/feature.ts +84 -0
  1023. package/samples/apps/config-demo/src/features/demo/i18n.ts +23 -0
  1024. package/samples/apps/config-demo/src/features/demo/web/index.ts +7 -0
  1025. package/samples/apps/config-demo/tsconfig.json +41 -0
  1026. package/samples/apps/marketing-demo/README.md +89 -0
  1027. package/samples/apps/marketing-demo/package.json +22 -0
  1028. package/samples/apps/marketing-demo/playwright.config.ts +16 -0
  1029. package/samples/apps/marketing-demo/src/app/client.tsx +13 -0
  1030. package/samples/apps/marketing-demo/src/app/seed-data.ts +443 -0
  1031. package/samples/apps/marketing-demo/src/app/seed.ts +143 -0
  1032. package/samples/apps/marketing-demo/src/app/server.ts +25 -0
  1033. package/samples/apps/marketing-demo/src/app/shell.tsx +37 -0
  1034. package/samples/apps/marketing-demo/src/db/queries/seed-counts.ts +18 -0
  1035. package/samples/apps/marketing-demo/src/features/assets/feature.ts +54 -0
  1036. package/samples/apps/marketing-demo/src/features/assets/i18n.ts +103 -0
  1037. package/samples/apps/marketing-demo/src/features/assets/schema/asset.ts +129 -0
  1038. package/samples/apps/marketing-demo/src/features/assets/schema/index.ts +11 -0
  1039. package/samples/apps/marketing-demo/src/features/assets/web/index.ts +10 -0
  1040. package/samples/apps/marketing-demo/src/features/helpdesk/feature.ts +52 -0
  1041. package/samples/apps/marketing-demo/src/features/helpdesk/i18n.ts +100 -0
  1042. package/samples/apps/marketing-demo/src/features/helpdesk/schema/index.ts +13 -0
  1043. package/samples/apps/marketing-demo/src/features/helpdesk/schema/ticket.ts +136 -0
  1044. package/samples/apps/marketing-demo/src/features/helpdesk/web/index.ts +7 -0
  1045. package/samples/apps/marketing-demo/tsconfig.json +23 -0
  1046. package/samples/apps/showcase/README.md +123 -0
  1047. package/samples/apps/showcase/kumiko.config.ts +10 -0
  1048. package/samples/apps/showcase/package.json +23 -0
  1049. package/samples/apps/showcase/playwright.config.ts +13 -0
  1050. package/samples/apps/showcase/src/app/client.tsx +15 -0
  1051. package/samples/apps/showcase/src/app/mount-public-screenshots.ts +26 -0
  1052. package/samples/apps/showcase/src/app/seed-items.ts +129 -0
  1053. package/samples/apps/showcase/src/app/server.ts +30 -0
  1054. package/samples/apps/showcase/src/app/shell.tsx +110 -0
  1055. package/samples/apps/showcase/src/features/demos/feature.ts +168 -0
  1056. package/samples/apps/showcase/src/features/demos/i18n.ts +45 -0
  1057. package/samples/apps/showcase/src/features/demos/index.ts +5 -0
  1058. package/samples/apps/showcase/src/features/demos/web/components/page.tsx +50 -0
  1059. package/samples/apps/showcase/src/features/demos/web/index.ts +30 -0
  1060. package/samples/apps/showcase/src/features/demos/web/pages/banner.tsx +36 -0
  1061. package/samples/apps/showcase/src/features/demos/web/pages/buttons.tsx +55 -0
  1062. package/samples/apps/showcase/src/features/demos/web/pages/dialog.tsx +89 -0
  1063. package/samples/apps/showcase/src/features/demos/web/pages/inputs.tsx +242 -0
  1064. package/samples/apps/showcase/src/features/demos/web/pages/layout.tsx +203 -0
  1065. package/samples/apps/showcase/src/features/demos/web/pages/sidebar-panel.tsx +144 -0
  1066. package/samples/apps/showcase/src/features/demos/web/pages/text.tsx +27 -0
  1067. package/samples/apps/showcase/src/features/demos/web/pages/toast.tsx +71 -0
  1068. package/samples/apps/showcase/src/features/items/feature.ts +109 -0
  1069. package/samples/apps/showcase/src/features/items/i18n.ts +79 -0
  1070. package/samples/apps/showcase/src/features/items/index.ts +6 -0
  1071. package/samples/apps/showcase/src/features/items/schema/index.ts +13 -0
  1072. package/samples/apps/showcase/src/features/items/schema/item.ts +215 -0
  1073. package/samples/apps/showcase/src/features/items/web/index.ts +15 -0
  1074. package/samples/apps/styleguide/README.md +47 -0
  1075. package/samples/apps/styleguide/package.json +22 -0
  1076. package/samples/apps/styleguide/playwright.config.ts +11 -0
  1077. package/samples/apps/styleguide/src/app/client.tsx +28 -0
  1078. package/samples/apps/styleguide/src/app/seed.ts +58 -0
  1079. package/samples/apps/styleguide/src/app/server.ts +51 -0
  1080. package/samples/apps/styleguide/src/app/shell.tsx +66 -0
  1081. package/samples/apps/styleguide/src/features/ai-settings/catalog.ts +82 -0
  1082. package/samples/apps/styleguide/src/features/ai-settings/feature.ts +295 -0
  1083. package/samples/apps/styleguide/src/features/ai-settings/i18n.ts +54 -0
  1084. package/samples/apps/styleguide/src/features/ai-settings/seed.ts +29 -0
  1085. package/samples/apps/styleguide/src/features/ai-settings/web.ts +14 -0
  1086. package/samples/apps/styleguide/src/features/content/feature.ts +39 -0
  1087. package/samples/apps/styleguide/src/features/content/web.tsx +160 -0
  1088. package/samples/apps/styleguide/src/features/demo/feature.ts +288 -0
  1089. package/samples/apps/styleguide/src/features/demo/i18n.ts +38 -0
  1090. package/samples/apps/styleguide/src/features/demo/web.ts +13 -0
  1091. package/samples/apps/styleguide/src/features/examples/feature.ts +173 -0
  1092. package/samples/apps/styleguide/src/features/examples/i18n.ts +69 -0
  1093. package/samples/apps/styleguide/src/features/examples/web.ts +14 -0
  1094. package/samples/apps/styleguide/src/features/gallery/feature.ts +35 -0
  1095. package/samples/apps/styleguide/src/features/gallery/web/Gallery.tsx +832 -0
  1096. package/samples/apps/styleguide/src/features/gallery/web/index.ts +16 -0
  1097. package/samples/apps/styleguide/src/features/shared-i18n.ts +16 -0
  1098. package/samples/apps/styleguide/src/features/widgets/ai-text-demo.ts +70 -0
  1099. package/samples/apps/styleguide/src/features/widgets/feature.ts +314 -0
  1100. package/samples/apps/styleguide/src/features/widgets/i18n.ts +208 -0
  1101. package/samples/apps/styleguide/src/features/widgets/lib/format.ts +32 -0
  1102. package/samples/apps/styleguide/src/features/widgets/web/DashboardFilterEcho.tsx +21 -0
  1103. package/samples/apps/styleguide/src/features/widgets/web/DashboardKpiIcon.tsx +20 -0
  1104. package/samples/apps/styleguide/src/features/widgets/web/FormExamples.tsx +352 -0
  1105. package/samples/apps/styleguide/src/features/widgets/web/Widgets.tsx +656 -0
  1106. package/samples/apps/styleguide/src/features/widgets/web/index.ts +30 -0
  1107. package/samples/apps/styleguide/tsconfig.json +41 -0
  1108. package/samples/apps/ui-walkthrough/README.md +105 -0
  1109. package/samples/apps/ui-walkthrough/kumiko/schema.ts +14 -0
  1110. package/samples/apps/ui-walkthrough/package.json +23 -0
  1111. package/samples/apps/ui-walkthrough/playwright.config.ts +29 -0
  1112. package/samples/apps/ui-walkthrough/scripts/emit-e2e-data.ts +19 -0
  1113. package/samples/apps/ui-walkthrough/src/app/assistant-action.tsx +49 -0
  1114. package/samples/apps/ui-walkthrough/src/app/auth-constants.ts +20 -0
  1115. package/samples/apps/ui-walkthrough/src/app/client.tsx +21 -0
  1116. package/samples/apps/ui-walkthrough/src/app/seed-rental.ts +266 -0
  1117. package/samples/apps/ui-walkthrough/src/app/seed-vehicles.ts +172 -0
  1118. package/samples/apps/ui-walkthrough/src/app/seed.ts +25 -0
  1119. package/samples/apps/ui-walkthrough/src/app/server.ts +56 -0
  1120. package/samples/apps/ui-walkthrough/src/app/shell.tsx +67 -0
  1121. package/samples/apps/ui-walkthrough/src/db/queries/row-counts.ts +24 -0
  1122. package/samples/apps/ui-walkthrough/src/db/queries/task-counts.ts +10 -0
  1123. package/samples/apps/ui-walkthrough/src/features/rental/entities.ts +57 -0
  1124. package/samples/apps/ui-walkthrough/src/features/rental/feature.ts +258 -0
  1125. package/samples/apps/ui-walkthrough/src/features/rental/i18n.ts +214 -0
  1126. package/samples/apps/ui-walkthrough/src/features/rental/index.ts +2 -0
  1127. package/samples/apps/ui-walkthrough/src/features/rental/lease-support.ts +110 -0
  1128. package/samples/apps/ui-walkthrough/src/features/rental/qualified-names.ts +12 -0
  1129. package/samples/apps/ui-walkthrough/src/features/rental/screens.ts +450 -0
  1130. package/samples/apps/ui-walkthrough/src/features/rental/web/index.ts +12 -0
  1131. package/samples/apps/ui-walkthrough/src/features/rental/web/lease-hub-components.tsx +29 -0
  1132. package/samples/apps/ui-walkthrough/src/features/tasks/feature.ts +49 -0
  1133. package/samples/apps/ui-walkthrough/src/features/tasks/i18n.ts +39 -0
  1134. package/samples/apps/ui-walkthrough/src/features/tasks/index.ts +4 -0
  1135. package/samples/apps/ui-walkthrough/src/features/tasks/schema/index.ts +3 -0
  1136. package/samples/apps/ui-walkthrough/src/features/tasks/schema/task.ts +85 -0
  1137. package/samples/apps/ui-walkthrough/src/features/tasks/web/index.ts +10 -0
  1138. package/samples/apps/ui-walkthrough/src/features/translations.ts +17 -0
  1139. package/samples/apps/ui-walkthrough/src/features/vehicles/campaign-support.ts +22 -0
  1140. package/samples/apps/ui-walkthrough/src/features/vehicles/entities.ts +89 -0
  1141. package/samples/apps/ui-walkthrough/src/features/vehicles/feature.ts +95 -0
  1142. package/samples/apps/ui-walkthrough/src/features/vehicles/i18n.ts +222 -0
  1143. package/samples/apps/ui-walkthrough/src/features/vehicles/index.ts +2 -0
  1144. package/samples/apps/ui-walkthrough/src/features/vehicles/qualified-names.ts +7 -0
  1145. package/samples/apps/ui-walkthrough/src/features/vehicles/screens.ts +188 -0
  1146. package/samples/apps/ui-walkthrough/src/features/vehicles/web/index.ts +7 -0
  1147. package/samples/apps/ui-walkthrough/src/run-config.ts +15 -0
  1148. package/samples/apps/ui-walkthrough/tsconfig.json +19 -0
  1149. package/samples/apps/use-all-bundled/README.md +57 -0
  1150. package/samples/apps/use-all-bundled/bin/main.ts +53 -0
  1151. package/samples/apps/use-all-bundled/feature-manifest.json +2963 -0
  1152. package/samples/apps/use-all-bundled/kumiko/migrations/0003_notes-history.rebuild.json +4 -0
  1153. package/samples/apps/use-all-bundled/kumiko/migrations/0005_user-content-entries.rebuild.json +4 -0
  1154. package/samples/apps/use-all-bundled/kumiko/migrations/0007_form-draft.rebuild.json +4 -0
  1155. package/samples/apps/use-all-bundled/kumiko/migrations/0008_ledger-date-column-1924.rebuild.json +4 -0
  1156. package/samples/apps/use-all-bundled/kumiko/migrations/0009_form-draft-owner-required.rebuild.json +4 -0
  1157. package/samples/apps/use-all-bundled/kumiko/migrations/0012_add-user-email-unique-index.rebuild.json +4 -0
  1158. package/samples/apps/use-all-bundled/kumiko/migrations/0015_pii-field-api-v2-bidx.rebuild.json +4 -0
  1159. package/samples/apps/use-all-bundled/kumiko/migrations/0023_add-note-mentions.rebuild.json +4 -0
  1160. package/samples/apps/use-all-bundled/kumiko/migrations/0028_add-ledger-account-code-unique-index.rebuild.json +4 -0
  1161. package/samples/apps/use-all-bundled/kumiko/schema.ts +24 -0
  1162. package/samples/apps/use-all-bundled/kumiko.config.ts +24 -0
  1163. package/samples/apps/use-all-bundled/package.json +30 -0
  1164. package/samples/apps/use-all-bundled/playwright.config.ts +10 -0
  1165. package/samples/apps/use-all-bundled/schema/generate.ts +577 -0
  1166. package/samples/apps/use-all-bundled/schema/migrations/meta/0000_snapshot.json +3055 -0
  1167. package/samples/apps/use-all-bundled/schema/migrations/meta/_journal.json +13 -0
  1168. package/samples/apps/use-all-bundled/schema/schema.generated.ts +88 -0
  1169. package/samples/apps/use-all-bundled/schema/schema.ts +9 -0
  1170. package/samples/apps/use-all-bundled/scripts/check-coverage.ts +203 -0
  1171. package/samples/apps/use-all-bundled/scripts/gen-feature-manifest.ts +85 -0
  1172. package/samples/apps/use-all-bundled/scripts/gen-sample-index.ts +290 -0
  1173. package/samples/apps/use-all-bundled/src/app/auth-constants.ts +16 -0
  1174. package/samples/apps/use-all-bundled/src/app/cap-overview-caps.ts +71 -0
  1175. package/samples/apps/use-all-bundled/src/app/cap-overview-labels-feature.ts +18 -0
  1176. package/samples/apps/use-all-bundled/src/app/client.tsx +126 -0
  1177. package/samples/apps/use-all-bundled/src/app/collection-labels-feature.ts +16 -0
  1178. package/samples/apps/use-all-bundled/src/app/dev-app-options.ts +75 -0
  1179. package/samples/apps/use-all-bundled/src/app/notes-feature.ts +174 -0
  1180. package/samples/apps/use-all-bundled/src/app/screens-feature.ts +39 -0
  1181. package/samples/apps/use-all-bundled/src/app/seed.ts +429 -0
  1182. package/samples/apps/use-all-bundled/src/app/server.ts +5 -0
  1183. package/samples/apps/use-all-bundled/src/app/shell.tsx +62 -0
  1184. package/samples/apps/use-all-bundled/src/run-config.ts +433 -0
  1185. package/samples/apps/use-all-bundled/tsconfig.json +31 -0
  1186. package/samples/apps/user-data-rights-demo/README.md +159 -0
  1187. package/samples/apps/user-data-rights-demo/bin/server.ts +35 -0
  1188. package/samples/apps/user-data-rights-demo/package.json +16 -0
  1189. package/samples/apps/user-data-rights-demo/src/feature.ts +200 -0
  1190. package/samples/apps/user-data-rights-demo/src/run-config.ts +48 -0
  1191. package/samples/apps/user-data-rights-demo/tsconfig.json +21 -0
  1192. package/samples/apps/workspaces/README.md +69 -0
  1193. package/samples/apps/workspaces/package.json +20 -0
  1194. package/samples/apps/workspaces/playwright.config.ts +18 -0
  1195. package/samples/apps/workspaces/src/app/auth-constants.ts +6 -0
  1196. package/samples/apps/workspaces/src/app/client.tsx +11 -0
  1197. package/samples/apps/workspaces/src/app/server.ts +47 -0
  1198. package/samples/apps/workspaces/src/app/shell.tsx +51 -0
  1199. package/samples/apps/workspaces/src/features/demo/feature.ts +89 -0
  1200. package/samples/apps/workspaces/src/features/demo/i18n.ts +20 -0
  1201. package/samples/apps/workspaces/src/features/demo/index.ts +2 -0
  1202. package/samples/apps/workspaces/src/features/demo/schema/index.ts +1 -0
  1203. package/samples/apps/workspaces/src/features/demo/schema/order.ts +43 -0
  1204. package/samples/apps/workspaces/src/features/demo/web/index.ts +7 -0
  1205. package/samples/apps/workspaces/src/features/demo-driver/feature.ts +31 -0
  1206. package/samples/apps/workspaces/src/features/demo-driver/i18n.ts +10 -0
  1207. package/samples/apps/workspaces/src/features/demo-driver/index.ts +2 -0
  1208. package/samples/apps/workspaces/src/features/demo-driver/web/index.ts +7 -0
  1209. package/samples/recipes/access-control/README.md +21 -0
  1210. package/samples/recipes/access-control/package.json +8 -0
  1211. package/samples/recipes/access-control/src/feature.ts +145 -0
  1212. package/samples/recipes/anonymous-access/README.md +21 -0
  1213. package/samples/recipes/anonymous-access/package.json +8 -0
  1214. package/samples/recipes/anonymous-access/src/feature.ts +132 -0
  1215. package/samples/recipes/anonymous-access-multitenant/README.md +21 -0
  1216. package/samples/recipes/anonymous-access-multitenant/package.json +8 -0
  1217. package/samples/recipes/anonymous-access-multitenant/src/feature.ts +65 -0
  1218. package/samples/recipes/anonymous-access-multitenant/src/subdomain-resolver.ts +105 -0
  1219. package/samples/recipes/apex-landing/README.md +32 -0
  1220. package/samples/recipes/apex-landing/package.json +16 -0
  1221. package/samples/recipes/apex-landing/playwright.config.ts +23 -0
  1222. package/samples/recipes/apex-landing/src/constants.ts +7 -0
  1223. package/samples/recipes/apex-landing/src/feature.ts +307 -0
  1224. package/samples/recipes/apex-surface-auth/README.md +114 -0
  1225. package/samples/recipes/apex-surface-auth/package.json +9 -0
  1226. package/samples/recipes/apex-surface-auth/src/feature.ts +113 -0
  1227. package/samples/recipes/api-worker-split/README.md +68 -0
  1228. package/samples/recipes/api-worker-split/bin/api.ts +13 -0
  1229. package/samples/recipes/api-worker-split/bin/kumiko.ts +7 -0
  1230. package/samples/recipes/api-worker-split/bin/worker.ts +24 -0
  1231. package/samples/recipes/api-worker-split/package.json +16 -0
  1232. package/samples/recipes/api-worker-split/src/feature.ts +167 -0
  1233. package/samples/recipes/auth-claims/README.md +21 -0
  1234. package/samples/recipes/auth-claims/package.json +8 -0
  1235. package/samples/recipes/auth-claims/src/feature.ts +123 -0
  1236. package/samples/recipes/auth-foundation-providers/README.md +19 -0
  1237. package/samples/recipes/auth-foundation-providers/package.json +9 -0
  1238. package/samples/recipes/auth-foundation-providers/src/feature.ts +76 -0
  1239. package/samples/recipes/auth-mfa/README.md +67 -0
  1240. package/samples/recipes/auth-mfa/package.json +9 -0
  1241. package/samples/recipes/auth-mfa/src/feature.ts +72 -0
  1242. package/samples/recipes/basic-entity/README.md +64 -0
  1243. package/samples/recipes/basic-entity/package.json +8 -0
  1244. package/samples/recipes/basic-entity/src/feature.ts +45 -0
  1245. package/samples/recipes/boot-check/README.md +54 -0
  1246. package/samples/recipes/boot-check/package.json +8 -0
  1247. package/samples/recipes/boot-check/src/feature.ts +29 -0
  1248. package/samples/recipes/compliance-profiles-demo/README.md +68 -0
  1249. package/samples/recipes/compliance-profiles-demo/package.json +9 -0
  1250. package/samples/recipes/compliance-profiles-demo/src/feature.ts +27 -0
  1251. package/samples/recipes/cross-feature-events/README.md +63 -0
  1252. package/samples/recipes/cross-feature-events/package.json +9 -0
  1253. package/samples/recipes/cross-feature-events/src/feature.ts +122 -0
  1254. package/samples/recipes/crypto-shredding-hr/README.md +74 -0
  1255. package/samples/recipes/crypto-shredding-hr/package.json +8 -0
  1256. package/samples/recipes/crypto-shredding-hr/src/feature.ts +38 -0
  1257. package/samples/recipes/currencies-global/README.md +21 -0
  1258. package/samples/recipes/currencies-global/package.json +8 -0
  1259. package/samples/recipes/currencies-global/src/entities/currency.ts +15 -0
  1260. package/samples/recipes/currencies-global/src/entities/invoice.ts +18 -0
  1261. package/samples/recipes/currencies-global/src/entities/tenant-currency.ts +19 -0
  1262. package/samples/recipes/currencies-global/src/feature.ts +62 -0
  1263. package/samples/recipes/currencies-global/src/handlers/invoice-create.write.ts +68 -0
  1264. package/samples/recipes/currencies-global/src/handlers/invoice-detail.query.ts +19 -0
  1265. package/samples/recipes/currencies-global/src/handlers/tenant-currency-assign.write.ts +40 -0
  1266. package/samples/recipes/currencies-per-tenant/README.md +21 -0
  1267. package/samples/recipes/currencies-per-tenant/package.json +8 -0
  1268. package/samples/recipes/currencies-per-tenant/src/entities/currency.ts +20 -0
  1269. package/samples/recipes/currencies-per-tenant/src/entities/invoice.ts +18 -0
  1270. package/samples/recipes/currencies-per-tenant/src/feature.ts +29 -0
  1271. package/samples/recipes/currencies-per-tenant/src/handlers/currency-create.write.ts +24 -0
  1272. package/samples/recipes/currencies-per-tenant/src/handlers/invoice-create.write.ts +66 -0
  1273. package/samples/recipes/currencies-per-tenant/src/handlers/invoice-detail.query.ts +19 -0
  1274. package/samples/recipes/custom-fields-basic/README.md +84 -0
  1275. package/samples/recipes/custom-fields-basic/package.json +9 -0
  1276. package/samples/recipes/custom-fields-basic/src/feature.ts +98 -0
  1277. package/samples/recipes/custom-handlers/README.md +46 -0
  1278. package/samples/recipes/custom-handlers/package.json +8 -0
  1279. package/samples/recipes/custom-handlers/src/feature.ts +118 -0
  1280. package/samples/recipes/delivery-notifications/README.md +48 -0
  1281. package/samples/recipes/delivery-notifications/package.json +9 -0
  1282. package/samples/recipes/delivery-notifications/src/feature.ts +108 -0
  1283. package/samples/recipes/designer-demo/README.md +16 -0
  1284. package/samples/recipes/designer-demo/package.json +8 -0
  1285. package/samples/recipes/designer-demo/src/feature.ts +55 -0
  1286. package/samples/recipes/e2e-generator/README.md +19 -0
  1287. package/samples/recipes/e2e-generator/package.json +8 -0
  1288. package/samples/recipes/e2e-generator/src/feature.ts +83 -0
  1289. package/samples/recipes/embedded/README.md +33 -0
  1290. package/samples/recipes/embedded/package.json +8 -0
  1291. package/samples/recipes/embedded/src/entities/contact.ts +46 -0
  1292. package/samples/recipes/embedded/src/entities/invoice.ts +35 -0
  1293. package/samples/recipes/embedded/src/entities/product.ts +14 -0
  1294. package/samples/recipes/embedded/src/feature.ts +58 -0
  1295. package/samples/recipes/embedded/src/handlers/contact-create.write.ts +45 -0
  1296. package/samples/recipes/embedded/src/handlers/contact-detail.query.ts +20 -0
  1297. package/samples/recipes/embedded-entity-form/README.md +65 -0
  1298. package/samples/recipes/embedded-entity-form/package.json +14 -0
  1299. package/samples/recipes/embedded-entity-form/src/entities/prospect.ts +21 -0
  1300. package/samples/recipes/embedded-entity-form/src/entities/suggestion.ts +22 -0
  1301. package/samples/recipes/embedded-entity-form/src/feature.ts +120 -0
  1302. package/samples/recipes/embedded-entity-form/src/screens/prospect-accept-screen.ts +13 -0
  1303. package/samples/recipes/embedded-entity-form/src/web/accept-suggestion-drawer.tsx +125 -0
  1304. package/samples/recipes/embedded-entity-form/tsconfig.json +8 -0
  1305. package/samples/recipes/encrypted-tenant-config/README.md +131 -0
  1306. package/samples/recipes/encrypted-tenant-config/package.json +9 -0
  1307. package/samples/recipes/encrypted-tenant-config/src/feature.ts +100 -0
  1308. package/samples/recipes/error-contract/README.md +97 -0
  1309. package/samples/recipes/error-contract/package.json +8 -0
  1310. package/samples/recipes/error-contract/src/feature.ts +238 -0
  1311. package/samples/recipes/event-sourcing/README.md +70 -0
  1312. package/samples/recipes/event-sourcing/package.json +9 -0
  1313. package/samples/recipes/event-sourcing/src/feature.ts +486 -0
  1314. package/samples/recipes/event-sourcing/tsconfig.json +26 -0
  1315. package/samples/recipes/feature-toggles/README.md +21 -0
  1316. package/samples/recipes/feature-toggles/package.json +9 -0
  1317. package/samples/recipes/feature-toggles/src/feature.ts +111 -0
  1318. package/samples/recipes/field-access/README.md +71 -0
  1319. package/samples/recipes/field-access/package.json +8 -0
  1320. package/samples/recipes/field-access/src/feature.ts +32 -0
  1321. package/samples/recipes/files-post-processing/README.md +21 -0
  1322. package/samples/recipes/files-post-processing/package.json +12 -0
  1323. package/samples/recipes/files-post-processing/src/feature.ts +138 -0
  1324. package/samples/recipes/i18n/README.md +36 -0
  1325. package/samples/recipes/i18n/package.json +8 -0
  1326. package/samples/recipes/i18n/src/feature.ts +52 -0
  1327. package/samples/recipes/idempotency/README.md +21 -0
  1328. package/samples/recipes/idempotency/package.json +8 -0
  1329. package/samples/recipes/idempotency/src/feature.ts +50 -0
  1330. package/samples/recipes/inbound-mail-triage/README.md +30 -0
  1331. package/samples/recipes/inbound-mail-triage/package.json +9 -0
  1332. package/samples/recipes/inbound-mail-triage/src/feature.ts +68 -0
  1333. package/samples/recipes/lane-routing/README.md +21 -0
  1334. package/samples/recipes/lane-routing/package.json +8 -0
  1335. package/samples/recipes/lane-routing/src/feature.ts +106 -0
  1336. package/samples/recipes/ledger-banking/README.md +47 -0
  1337. package/samples/recipes/ledger-banking/package.json +9 -0
  1338. package/samples/recipes/ledger-banking/src/usage.ts +86 -0
  1339. package/samples/recipes/ledger-invoicing/README.md +54 -0
  1340. package/samples/recipes/ledger-invoicing/package.json +9 -0
  1341. package/samples/recipes/ledger-invoicing/src/usage.ts +93 -0
  1342. package/samples/recipes/legal-pages/README.md +204 -0
  1343. package/samples/recipes/legal-pages/package.json +9 -0
  1344. package/samples/recipes/legal-pages/src/feature.ts +50 -0
  1345. package/samples/recipes/lifecycle-hooks/README.md +46 -0
  1346. package/samples/recipes/lifecycle-hooks/package.json +8 -0
  1347. package/samples/recipes/lifecycle-hooks/src/feature.ts +104 -0
  1348. package/samples/recipes/managed-config/README.md +136 -0
  1349. package/samples/recipes/managed-config/package.json +9 -0
  1350. package/samples/recipes/managed-config/src/feature.ts +88 -0
  1351. package/samples/recipes/managed-pages/README.md +158 -0
  1352. package/samples/recipes/managed-pages/package.json +9 -0
  1353. package/samples/recipes/managed-pages/src/feature.ts +25 -0
  1354. package/samples/recipes/notes-history-basic/README.md +93 -0
  1355. package/samples/recipes/notes-history-basic/package.json +9 -0
  1356. package/samples/recipes/notes-history-basic/src/feature.ts +72 -0
  1357. package/samples/recipes/notes-history-basic/src/usage.ts +42 -0
  1358. package/samples/recipes/ownership/README.md +21 -0
  1359. package/samples/recipes/ownership/package.json +8 -0
  1360. package/samples/recipes/ownership/src/feature.ts +98 -0
  1361. package/samples/recipes/pipeline-basics/README.md +106 -0
  1362. package/samples/recipes/pipeline-basics/package.json +8 -0
  1363. package/samples/recipes/pipeline-basics/src/feature.ts +424 -0
  1364. package/samples/recipes/pipeline-basics/tsconfig.json +15 -0
  1365. package/samples/recipes/public-share-token/README.md +37 -0
  1366. package/samples/recipes/public-share-token/package.json +8 -0
  1367. package/samples/recipes/public-share-token/src/feature.ts +197 -0
  1368. package/samples/recipes/rate-limiting/README.md +21 -0
  1369. package/samples/recipes/rate-limiting/package.json +8 -0
  1370. package/samples/recipes/rate-limiting/src/feature.ts +26 -0
  1371. package/samples/recipes/realtime-sse/README.md +21 -0
  1372. package/samples/recipes/realtime-sse/package.json +8 -0
  1373. package/samples/recipes/realtime-sse/src/feature.ts +27 -0
  1374. package/samples/recipes/record-detail-layout/README.md +25 -0
  1375. package/samples/recipes/record-detail-layout/package.json +22 -0
  1376. package/samples/recipes/record-detail-layout/src/feature.ts +140 -0
  1377. package/samples/recipes/reference-data/README.md +21 -0
  1378. package/samples/recipes/reference-data/package.json +8 -0
  1379. package/samples/recipes/reference-data/src/feature.ts +37 -0
  1380. package/samples/recipes/relations/README.md +21 -0
  1381. package/samples/recipes/relations/package.json +8 -0
  1382. package/samples/recipes/relations/src/feature.ts +81 -0
  1383. package/samples/recipes/screens-nav/README.md +19 -0
  1384. package/samples/recipes/screens-nav/package.json +8 -0
  1385. package/samples/recipes/screens-nav/src/feature.ts +142 -0
  1386. package/samples/recipes/search/README.md +21 -0
  1387. package/samples/recipes/search/package.json +8 -0
  1388. package/samples/recipes/search/src/feature.ts +72 -0
  1389. package/samples/recipes/secrets-demo/README.md +21 -0
  1390. package/samples/recipes/secrets-demo/package.json +9 -0
  1391. package/samples/recipes/secrets-demo/src/feature.ts +88 -0
  1392. package/samples/recipes/security-baseline/README.md +81 -0
  1393. package/samples/recipes/security-baseline/package.json +9 -0
  1394. package/samples/recipes/security-baseline/src/feature.ts +19 -0
  1395. package/samples/recipes/seed-migration/README.md +81 -0
  1396. package/samples/recipes/seed-migration/package.json +10 -0
  1397. package/samples/recipes/seed-migration/scripts/smoke.ts +125 -0
  1398. package/samples/recipes/seed-migration/seeds/2026-01-01-initial-tenants.ts +32 -0
  1399. package/samples/recipes/seed-migration/seeds/2026-02-01-fix-admin-roles.ts +38 -0
  1400. package/samples/recipes/session-revocation/README.md +49 -0
  1401. package/samples/recipes/session-revocation/package.json +9 -0
  1402. package/samples/recipes/session-revocation/src/feature.ts +50 -0
  1403. package/samples/recipes/state-machine/README.md +21 -0
  1404. package/samples/recipes/state-machine/package.json +9 -0
  1405. package/samples/recipes/state-machine/src/entities/invoice.ts +35 -0
  1406. package/samples/recipes/state-machine/src/events.ts +32 -0
  1407. package/samples/recipes/state-machine/src/feature.ts +89 -0
  1408. package/samples/recipes/state-machine/src/handlers/_helpers.ts +68 -0
  1409. package/samples/recipes/state-machine/src/handlers/create.ts +27 -0
  1410. package/samples/recipes/state-machine/src/handlers/transitions.ts +137 -0
  1411. package/samples/recipes/state-machine/src/reducer.ts +50 -0
  1412. package/samples/recipes/state-machine/tsconfig.json +26 -0
  1413. package/samples/recipes/tags-basic/README.md +100 -0
  1414. package/samples/recipes/tags-basic/package.json +9 -0
  1415. package/samples/recipes/tags-basic/src/feature.ts +71 -0
  1416. package/samples/recipes/tags-basic/src/usage.ts +50 -0
  1417. package/samples/recipes/tenant-isolation/README.md +21 -0
  1418. package/samples/recipes/tenant-isolation/package.json +8 -0
  1419. package/samples/recipes/tenant-isolation/src/feature.ts +28 -0
  1420. package/samples/recipes/tenant-settings/README.md +112 -0
  1421. package/samples/recipes/tenant-settings/package.json +9 -0
  1422. package/samples/recipes/tenant-settings/src/feature.ts +35 -0
  1423. package/samples/recipes/tier-admin/README.md +80 -0
  1424. package/samples/recipes/tier-admin/package.json +9 -0
  1425. package/samples/recipes/tier-admin/src/feature.ts +60 -0
  1426. package/samples/recipes/timezones/README.md +97 -0
  1427. package/samples/recipes/timezones/package.json +8 -0
  1428. package/samples/recipes/timezones/src/feature.ts +72 -0
  1429. package/samples/recipes/tsconfig.base.json +23 -0
  1430. package/samples/recipes/user-data-rights/README.md +100 -0
  1431. package/samples/recipes/user-data-rights/package.json +9 -0
  1432. package/samples/recipes/user-data-rights/src/feature.ts +97 -0
  1433. package/samples/recipes/user-profile/README.md +86 -0
  1434. package/samples/recipes/user-profile/package.json +9 -0
  1435. package/samples/recipes/user-profile/src/feature.ts +73 -0
  1436. package/samples/recipes/webhook-step/README.md +47 -0
  1437. package/samples/recipes/webhook-step/package.json +9 -0
  1438. package/samples/recipes/webhook-step/src/feature.ts +203 -0
  1439. package/samples/recipes/webhook-step/tsconfig.json +18 -0
  1440. package/samples/recipes/wizard-form/README.md +79 -0
  1441. package/samples/recipes/wizard-form/package.json +23 -0
  1442. package/samples/recipes/wizard-form/src/entities/listing.ts +27 -0
  1443. package/samples/recipes/wizard-form/src/feature.ts +48 -0
  1444. package/samples/recipes/wizard-form/src/web/index.ts +16 -0
  1445. package/samples/recipes/wizard-form/src/web/listing-review-section.tsx +21 -0
  1446. package/samples/recipes/wizard-form/tsconfig.json +8 -0
  1447. package/samples/recipes/workflow-engine/README.md +21 -0
  1448. package/samples/recipes/workflow-engine/package.json +9 -0
  1449. package/samples/recipes/workflow-engine/src/cron-scheduler.ts +110 -0
  1450. package/samples/recipes/workflow-engine/src/db/queries/suspended-runs.ts +14 -0
  1451. package/samples/recipes/workflow-engine/src/event-trigger.ts +84 -0
  1452. package/samples/recipes/workflow-engine/src/feature.ts +167 -0
  1453. package/samples/recipes/workflow-engine/src/postgres-resume-loop.ts +98 -0
  1454. package/samples/recipes/workflow-engine/src/resume-loop.ts +209 -0
  1455. package/samples/recipes/workflow-engine/src/workflow-runner.ts +97 -0
  1456. package/samples/recipes/workflow-engine/tsconfig.json +21 -0
  1457. package/samples/recipes/writeform-section/README.md +30 -0
  1458. package/samples/recipes/writeform-section/package.json +23 -0
  1459. package/samples/recipes/writeform-section/src/feature.ts +123 -0
  1460. package/samples/recipes/writeform-section/src/note-fixture.ts +8 -0
  1461. package/samples/recipes/writeform-section/tsconfig.json +8 -0
@@ -0,0 +1,3055 @@
1
+ {
2
+ "id": "a66620f8-9978-4446-af32-f5a324b93035",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.kumiko_archived_streams": {
8
+ "name": "kumiko_archived_streams",
9
+ "schema": "",
10
+ "columns": {
11
+ "tenant_id": {
12
+ "name": "tenant_id",
13
+ "type": "uuid",
14
+ "primaryKey": false,
15
+ "notNull": true
16
+ },
17
+ "aggregate_id": {
18
+ "name": "aggregate_id",
19
+ "type": "uuid",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "aggregate_type": {
24
+ "name": "aggregate_type",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "archived_at": {
30
+ "name": "archived_at",
31
+ "type": "timestamp(3) with time zone",
32
+ "primaryKey": false,
33
+ "notNull": true,
34
+ "default": "now()"
35
+ },
36
+ "archived_by": {
37
+ "name": "archived_by",
38
+ "type": "text",
39
+ "primaryKey": false,
40
+ "notNull": true
41
+ },
42
+ "reason": {
43
+ "name": "reason",
44
+ "type": "text",
45
+ "primaryKey": false,
46
+ "notNull": false
47
+ }
48
+ },
49
+ "indexes": {
50
+ "kumiko_archived_streams_pk": {
51
+ "name": "kumiko_archived_streams_pk",
52
+ "columns": [
53
+ {
54
+ "expression": "tenant_id",
55
+ "isExpression": false,
56
+ "asc": true,
57
+ "nulls": "last"
58
+ },
59
+ {
60
+ "expression": "aggregate_id",
61
+ "isExpression": false,
62
+ "asc": true,
63
+ "nulls": "last"
64
+ }
65
+ ],
66
+ "isUnique": true,
67
+ "concurrently": false,
68
+ "method": "btree",
69
+ "with": {}
70
+ }
71
+ },
72
+ "foreignKeys": {},
73
+ "compositePrimaryKeys": {},
74
+ "uniqueConstraints": {},
75
+ "policies": {},
76
+ "checkConstraints": {},
77
+ "isRLSEnabled": false
78
+ },
79
+ "public.kumiko_event_consumers": {
80
+ "name": "kumiko_event_consumers",
81
+ "schema": "",
82
+ "columns": {
83
+ "name": {
84
+ "name": "name",
85
+ "type": "text",
86
+ "primaryKey": false,
87
+ "notNull": true
88
+ },
89
+ "instance_id": {
90
+ "name": "instance_id",
91
+ "type": "text",
92
+ "primaryKey": false,
93
+ "notNull": true,
94
+ "default": "'__shared__'"
95
+ },
96
+ "last_processed_event_id": {
97
+ "name": "last_processed_event_id",
98
+ "type": "bigint",
99
+ "primaryKey": false,
100
+ "notNull": true,
101
+ "default": "0"
102
+ },
103
+ "status": {
104
+ "name": "status",
105
+ "type": "text",
106
+ "primaryKey": false,
107
+ "notNull": true,
108
+ "default": "'idle'"
109
+ },
110
+ "attempts": {
111
+ "name": "attempts",
112
+ "type": "integer",
113
+ "primaryKey": false,
114
+ "notNull": true,
115
+ "default": 0
116
+ },
117
+ "last_error": {
118
+ "name": "last_error",
119
+ "type": "text",
120
+ "primaryKey": false,
121
+ "notNull": false
122
+ },
123
+ "updated_at": {
124
+ "name": "updated_at",
125
+ "type": "timestamp(3) with time zone",
126
+ "primaryKey": false,
127
+ "notNull": true,
128
+ "default": "now()"
129
+ }
130
+ },
131
+ "indexes": {
132
+ "kumiko_event_consumers_status_idx": {
133
+ "name": "kumiko_event_consumers_status_idx",
134
+ "columns": [
135
+ {
136
+ "expression": "status",
137
+ "isExpression": false,
138
+ "asc": true,
139
+ "nulls": "last"
140
+ }
141
+ ],
142
+ "isUnique": false,
143
+ "concurrently": false,
144
+ "method": "btree",
145
+ "with": {}
146
+ }
147
+ },
148
+ "foreignKeys": {},
149
+ "compositePrimaryKeys": {
150
+ "kumiko_event_consumers_name_instance_id_pk": {
151
+ "name": "kumiko_event_consumers_name_instance_id_pk",
152
+ "columns": ["name", "instance_id"]
153
+ }
154
+ },
155
+ "uniqueConstraints": {},
156
+ "policies": {},
157
+ "checkConstraints": {},
158
+ "isRLSEnabled": false
159
+ },
160
+ "public.kumiko_events": {
161
+ "name": "kumiko_events",
162
+ "schema": "",
163
+ "columns": {
164
+ "id": {
165
+ "name": "id",
166
+ "type": "bigserial",
167
+ "primaryKey": true,
168
+ "notNull": true
169
+ },
170
+ "aggregate_id": {
171
+ "name": "aggregate_id",
172
+ "type": "uuid",
173
+ "primaryKey": false,
174
+ "notNull": true
175
+ },
176
+ "aggregate_type": {
177
+ "name": "aggregate_type",
178
+ "type": "text",
179
+ "primaryKey": false,
180
+ "notNull": true
181
+ },
182
+ "tenant_id": {
183
+ "name": "tenant_id",
184
+ "type": "uuid",
185
+ "primaryKey": false,
186
+ "notNull": true
187
+ },
188
+ "version": {
189
+ "name": "version",
190
+ "type": "integer",
191
+ "primaryKey": false,
192
+ "notNull": true
193
+ },
194
+ "type": {
195
+ "name": "type",
196
+ "type": "text",
197
+ "primaryKey": false,
198
+ "notNull": true
199
+ },
200
+ "event_version": {
201
+ "name": "event_version",
202
+ "type": "integer",
203
+ "primaryKey": false,
204
+ "notNull": true,
205
+ "default": 1
206
+ },
207
+ "payload": {
208
+ "name": "payload",
209
+ "type": "jsonb",
210
+ "primaryKey": false,
211
+ "notNull": true
212
+ },
213
+ "metadata": {
214
+ "name": "metadata",
215
+ "type": "jsonb",
216
+ "primaryKey": false,
217
+ "notNull": true
218
+ },
219
+ "created_at": {
220
+ "name": "created_at",
221
+ "type": "timestamp(3) with time zone",
222
+ "primaryKey": false,
223
+ "notNull": true,
224
+ "default": "now()"
225
+ },
226
+ "created_by": {
227
+ "name": "created_by",
228
+ "type": "text",
229
+ "primaryKey": false,
230
+ "notNull": true
231
+ }
232
+ },
233
+ "indexes": {
234
+ "events_aggregate_version_uq": {
235
+ "name": "events_aggregate_version_uq",
236
+ "columns": [
237
+ {
238
+ "expression": "tenant_id",
239
+ "isExpression": false,
240
+ "asc": true,
241
+ "nulls": "last"
242
+ },
243
+ {
244
+ "expression": "aggregate_id",
245
+ "isExpression": false,
246
+ "asc": true,
247
+ "nulls": "last"
248
+ },
249
+ {
250
+ "expression": "version",
251
+ "isExpression": false,
252
+ "asc": true,
253
+ "nulls": "last"
254
+ }
255
+ ],
256
+ "isUnique": true,
257
+ "concurrently": false,
258
+ "method": "btree",
259
+ "with": {}
260
+ },
261
+ "events_load_idx": {
262
+ "name": "events_load_idx",
263
+ "columns": [
264
+ {
265
+ "expression": "aggregate_id",
266
+ "isExpression": false,
267
+ "asc": true,
268
+ "nulls": "last"
269
+ },
270
+ {
271
+ "expression": "version",
272
+ "isExpression": false,
273
+ "asc": true,
274
+ "nulls": "last"
275
+ }
276
+ ],
277
+ "isUnique": false,
278
+ "concurrently": false,
279
+ "method": "btree",
280
+ "with": {}
281
+ },
282
+ "events_tenant_type_idx": {
283
+ "name": "events_tenant_type_idx",
284
+ "columns": [
285
+ {
286
+ "expression": "tenant_id",
287
+ "isExpression": false,
288
+ "asc": true,
289
+ "nulls": "last"
290
+ },
291
+ {
292
+ "expression": "aggregate_type",
293
+ "isExpression": false,
294
+ "asc": true,
295
+ "nulls": "last"
296
+ },
297
+ {
298
+ "expression": "created_at",
299
+ "isExpression": false,
300
+ "asc": true,
301
+ "nulls": "last"
302
+ }
303
+ ],
304
+ "isUnique": false,
305
+ "concurrently": false,
306
+ "method": "btree",
307
+ "with": {}
308
+ }
309
+ },
310
+ "foreignKeys": {},
311
+ "compositePrimaryKeys": {},
312
+ "uniqueConstraints": {},
313
+ "policies": {},
314
+ "checkConstraints": {},
315
+ "isRLSEnabled": false
316
+ },
317
+ "public.kumiko_projections": {
318
+ "name": "kumiko_projections",
319
+ "schema": "",
320
+ "columns": {
321
+ "name": {
322
+ "name": "name",
323
+ "type": "text",
324
+ "primaryKey": true,
325
+ "notNull": true
326
+ },
327
+ "last_processed_event_id": {
328
+ "name": "last_processed_event_id",
329
+ "type": "bigint",
330
+ "primaryKey": false,
331
+ "notNull": true,
332
+ "default": "0"
333
+ },
334
+ "status": {
335
+ "name": "status",
336
+ "type": "text",
337
+ "primaryKey": false,
338
+ "notNull": true,
339
+ "default": "'idle'"
340
+ },
341
+ "last_rebuild_at": {
342
+ "name": "last_rebuild_at",
343
+ "type": "timestamp(3) with time zone",
344
+ "primaryKey": false,
345
+ "notNull": false
346
+ },
347
+ "last_error": {
348
+ "name": "last_error",
349
+ "type": "text",
350
+ "primaryKey": false,
351
+ "notNull": false
352
+ },
353
+ "updated_at": {
354
+ "name": "updated_at",
355
+ "type": "timestamp(3) with time zone",
356
+ "primaryKey": false,
357
+ "notNull": true,
358
+ "default": "now()"
359
+ }
360
+ },
361
+ "indexes": {
362
+ "kumiko_projections_status_idx": {
363
+ "name": "kumiko_projections_status_idx",
364
+ "columns": [
365
+ {
366
+ "expression": "status",
367
+ "isExpression": false,
368
+ "asc": true,
369
+ "nulls": "last"
370
+ }
371
+ ],
372
+ "isUnique": false,
373
+ "concurrently": false,
374
+ "method": "btree",
375
+ "with": {}
376
+ }
377
+ },
378
+ "foreignKeys": {},
379
+ "compositePrimaryKeys": {},
380
+ "uniqueConstraints": {},
381
+ "policies": {},
382
+ "checkConstraints": {},
383
+ "isRLSEnabled": false
384
+ },
385
+ "public.kumiko_snapshots": {
386
+ "name": "kumiko_snapshots",
387
+ "schema": "",
388
+ "columns": {
389
+ "aggregate_id": {
390
+ "name": "aggregate_id",
391
+ "type": "uuid",
392
+ "primaryKey": false,
393
+ "notNull": true
394
+ },
395
+ "tenant_id": {
396
+ "name": "tenant_id",
397
+ "type": "uuid",
398
+ "primaryKey": false,
399
+ "notNull": true
400
+ },
401
+ "aggregate_type": {
402
+ "name": "aggregate_type",
403
+ "type": "text",
404
+ "primaryKey": false,
405
+ "notNull": true
406
+ },
407
+ "version": {
408
+ "name": "version",
409
+ "type": "integer",
410
+ "primaryKey": false,
411
+ "notNull": true
412
+ },
413
+ "state": {
414
+ "name": "state",
415
+ "type": "jsonb",
416
+ "primaryKey": false,
417
+ "notNull": true
418
+ },
419
+ "created_at": {
420
+ "name": "created_at",
421
+ "type": "timestamp(3) with time zone",
422
+ "primaryKey": false,
423
+ "notNull": true,
424
+ "default": "now()"
425
+ }
426
+ },
427
+ "indexes": {
428
+ "kumiko_snapshots_latest_idx": {
429
+ "name": "kumiko_snapshots_latest_idx",
430
+ "columns": [
431
+ {
432
+ "expression": "aggregate_id",
433
+ "isExpression": false,
434
+ "asc": true,
435
+ "nulls": "last"
436
+ },
437
+ {
438
+ "expression": "tenant_id",
439
+ "isExpression": false,
440
+ "asc": true,
441
+ "nulls": "last"
442
+ },
443
+ {
444
+ "expression": "version",
445
+ "isExpression": false,
446
+ "asc": true,
447
+ "nulls": "last"
448
+ }
449
+ ],
450
+ "isUnique": false,
451
+ "concurrently": false,
452
+ "method": "btree",
453
+ "with": {}
454
+ }
455
+ },
456
+ "foreignKeys": {},
457
+ "compositePrimaryKeys": {
458
+ "kumiko_snapshots_aggregate_id_version_pk": {
459
+ "name": "kumiko_snapshots_aggregate_id_version_pk",
460
+ "columns": ["aggregate_id", "version"]
461
+ }
462
+ },
463
+ "uniqueConstraints": {},
464
+ "policies": {},
465
+ "checkConstraints": {},
466
+ "isRLSEnabled": false
467
+ },
468
+ "public.read_cap_counters": {
469
+ "name": "read_cap_counters",
470
+ "schema": "",
471
+ "columns": {
472
+ "id": {
473
+ "name": "id",
474
+ "type": "uuid",
475
+ "primaryKey": true,
476
+ "notNull": true,
477
+ "default": "gen_random_uuid()"
478
+ },
479
+ "tenant_id": {
480
+ "name": "tenant_id",
481
+ "type": "uuid",
482
+ "primaryKey": false,
483
+ "notNull": true
484
+ },
485
+ "version": {
486
+ "name": "version",
487
+ "type": "integer",
488
+ "primaryKey": false,
489
+ "notNull": true,
490
+ "default": 1
491
+ },
492
+ "inserted_at": {
493
+ "name": "inserted_at",
494
+ "type": "timestamptz",
495
+ "primaryKey": false,
496
+ "notNull": true,
497
+ "default": "now()"
498
+ },
499
+ "modified_at": {
500
+ "name": "modified_at",
501
+ "type": "timestamptz",
502
+ "primaryKey": false,
503
+ "notNull": false
504
+ },
505
+ "inserted_by_id": {
506
+ "name": "inserted_by_id",
507
+ "type": "text",
508
+ "primaryKey": false,
509
+ "notNull": false
510
+ },
511
+ "modified_by_id": {
512
+ "name": "modified_by_id",
513
+ "type": "text",
514
+ "primaryKey": false,
515
+ "notNull": false
516
+ },
517
+ "cap_name": {
518
+ "name": "cap_name",
519
+ "type": "text",
520
+ "primaryKey": false,
521
+ "notNull": true
522
+ },
523
+ "value": {
524
+ "name": "value",
525
+ "type": "integer",
526
+ "primaryKey": false,
527
+ "notNull": true
528
+ },
529
+ "period_start": {
530
+ "name": "period_start",
531
+ "type": "timestamptz",
532
+ "primaryKey": false,
533
+ "notNull": true
534
+ },
535
+ "last_soft_warned_at": {
536
+ "name": "last_soft_warned_at",
537
+ "type": "timestamptz",
538
+ "primaryKey": false,
539
+ "notNull": false
540
+ }
541
+ },
542
+ "indexes": {
543
+ "read_cap_counters_tenant_id_idx": {
544
+ "name": "read_cap_counters_tenant_id_idx",
545
+ "columns": [
546
+ {
547
+ "expression": "tenant_id",
548
+ "isExpression": false,
549
+ "asc": true,
550
+ "nulls": "last"
551
+ }
552
+ ],
553
+ "isUnique": false,
554
+ "concurrently": false,
555
+ "method": "btree",
556
+ "with": {}
557
+ }
558
+ },
559
+ "foreignKeys": {},
560
+ "compositePrimaryKeys": {},
561
+ "uniqueConstraints": {},
562
+ "policies": {},
563
+ "checkConstraints": {},
564
+ "isRLSEnabled": false
565
+ },
566
+ "public.read_config_values": {
567
+ "name": "read_config_values",
568
+ "schema": "",
569
+ "columns": {
570
+ "id": {
571
+ "name": "id",
572
+ "type": "uuid",
573
+ "primaryKey": true,
574
+ "notNull": true,
575
+ "default": "gen_random_uuid()"
576
+ },
577
+ "tenant_id": {
578
+ "name": "tenant_id",
579
+ "type": "uuid",
580
+ "primaryKey": false,
581
+ "notNull": true
582
+ },
583
+ "version": {
584
+ "name": "version",
585
+ "type": "integer",
586
+ "primaryKey": false,
587
+ "notNull": true,
588
+ "default": 1
589
+ },
590
+ "inserted_at": {
591
+ "name": "inserted_at",
592
+ "type": "timestamptz",
593
+ "primaryKey": false,
594
+ "notNull": true,
595
+ "default": "now()"
596
+ },
597
+ "modified_at": {
598
+ "name": "modified_at",
599
+ "type": "timestamptz",
600
+ "primaryKey": false,
601
+ "notNull": false
602
+ },
603
+ "inserted_by_id": {
604
+ "name": "inserted_by_id",
605
+ "type": "text",
606
+ "primaryKey": false,
607
+ "notNull": false
608
+ },
609
+ "modified_by_id": {
610
+ "name": "modified_by_id",
611
+ "type": "text",
612
+ "primaryKey": false,
613
+ "notNull": false
614
+ },
615
+ "key": {
616
+ "name": "key",
617
+ "type": "text",
618
+ "primaryKey": false,
619
+ "notNull": true
620
+ },
621
+ "value": {
622
+ "name": "value",
623
+ "type": "text",
624
+ "primaryKey": false,
625
+ "notNull": false
626
+ },
627
+ "user_id": {
628
+ "name": "user_id",
629
+ "type": "text",
630
+ "primaryKey": false,
631
+ "notNull": false
632
+ }
633
+ },
634
+ "indexes": {
635
+ "read_config_values_tenant_id_idx": {
636
+ "name": "read_config_values_tenant_id_idx",
637
+ "columns": [
638
+ {
639
+ "expression": "tenant_id",
640
+ "isExpression": false,
641
+ "asc": true,
642
+ "nulls": "last"
643
+ }
644
+ ],
645
+ "isUnique": false,
646
+ "concurrently": false,
647
+ "method": "btree",
648
+ "with": {}
649
+ },
650
+ "read_config_values_unique": {
651
+ "name": "read_config_values_unique",
652
+ "columns": [
653
+ {
654
+ "expression": "key",
655
+ "isExpression": false,
656
+ "asc": true,
657
+ "nulls": "last"
658
+ },
659
+ {
660
+ "expression": "tenant_id",
661
+ "isExpression": false,
662
+ "asc": true,
663
+ "nulls": "last"
664
+ },
665
+ {
666
+ "expression": "user_id",
667
+ "isExpression": false,
668
+ "asc": true,
669
+ "nulls": "last"
670
+ }
671
+ ],
672
+ "isUnique": true,
673
+ "concurrently": false,
674
+ "method": "btree",
675
+ "with": {}
676
+ }
677
+ },
678
+ "foreignKeys": {},
679
+ "compositePrimaryKeys": {},
680
+ "uniqueConstraints": {},
681
+ "policies": {},
682
+ "checkConstraints": {},
683
+ "isRLSEnabled": false
684
+ },
685
+ "public.read_delivery_attempts": {
686
+ "name": "read_delivery_attempts",
687
+ "schema": "",
688
+ "columns": {
689
+ "id": {
690
+ "name": "id",
691
+ "type": "uuid",
692
+ "primaryKey": true,
693
+ "notNull": true
694
+ },
695
+ "tenant_id": {
696
+ "name": "tenant_id",
697
+ "type": "uuid",
698
+ "primaryKey": false,
699
+ "notNull": true
700
+ },
701
+ "notification_type": {
702
+ "name": "notification_type",
703
+ "type": "text",
704
+ "primaryKey": false,
705
+ "notNull": true
706
+ },
707
+ "channel": {
708
+ "name": "channel",
709
+ "type": "text",
710
+ "primaryKey": false,
711
+ "notNull": true
712
+ },
713
+ "recipient_id": {
714
+ "name": "recipient_id",
715
+ "type": "text",
716
+ "primaryKey": false,
717
+ "notNull": false
718
+ },
719
+ "recipient_address": {
720
+ "name": "recipient_address",
721
+ "type": "text",
722
+ "primaryKey": false,
723
+ "notNull": false
724
+ },
725
+ "status": {
726
+ "name": "status",
727
+ "type": "text",
728
+ "primaryKey": false,
729
+ "notNull": true
730
+ },
731
+ "error": {
732
+ "name": "error",
733
+ "type": "text",
734
+ "primaryKey": false,
735
+ "notNull": false
736
+ },
737
+ "created_at": {
738
+ "name": "created_at",
739
+ "type": "timestamptz",
740
+ "primaryKey": false,
741
+ "notNull": true,
742
+ "default": "now()"
743
+ }
744
+ },
745
+ "indexes": {},
746
+ "foreignKeys": {},
747
+ "compositePrimaryKeys": {},
748
+ "uniqueConstraints": {},
749
+ "policies": {},
750
+ "checkConstraints": {},
751
+ "isRLSEnabled": false
752
+ },
753
+ "public.read_download_attempts": {
754
+ "name": "read_download_attempts",
755
+ "schema": "",
756
+ "columns": {
757
+ "id": {
758
+ "name": "id",
759
+ "type": "uuid",
760
+ "primaryKey": true,
761
+ "notNull": true,
762
+ "default": "gen_random_uuid()"
763
+ },
764
+ "tenant_id": {
765
+ "name": "tenant_id",
766
+ "type": "uuid",
767
+ "primaryKey": false,
768
+ "notNull": true
769
+ },
770
+ "version": {
771
+ "name": "version",
772
+ "type": "integer",
773
+ "primaryKey": false,
774
+ "notNull": true,
775
+ "default": 1
776
+ },
777
+ "inserted_at": {
778
+ "name": "inserted_at",
779
+ "type": "timestamptz",
780
+ "primaryKey": false,
781
+ "notNull": true,
782
+ "default": "now()"
783
+ },
784
+ "modified_at": {
785
+ "name": "modified_at",
786
+ "type": "timestamptz",
787
+ "primaryKey": false,
788
+ "notNull": false
789
+ },
790
+ "inserted_by_id": {
791
+ "name": "inserted_by_id",
792
+ "type": "text",
793
+ "primaryKey": false,
794
+ "notNull": false
795
+ },
796
+ "modified_by_id": {
797
+ "name": "modified_by_id",
798
+ "type": "text",
799
+ "primaryKey": false,
800
+ "notNull": false
801
+ },
802
+ "result": {
803
+ "name": "result",
804
+ "type": "text",
805
+ "primaryKey": false,
806
+ "notNull": true
807
+ },
808
+ "via": {
809
+ "name": "via",
810
+ "type": "text",
811
+ "primaryKey": false,
812
+ "notNull": true
813
+ },
814
+ "token_hash": {
815
+ "name": "token_hash",
816
+ "type": "text",
817
+ "primaryKey": false,
818
+ "notNull": false
819
+ },
820
+ "job_id": {
821
+ "name": "job_id",
822
+ "type": "text",
823
+ "primaryKey": false,
824
+ "notNull": false
825
+ },
826
+ "attempted_by_user_id": {
827
+ "name": "attempted_by_user_id",
828
+ "type": "text",
829
+ "primaryKey": false,
830
+ "notNull": false
831
+ },
832
+ "ip": {
833
+ "name": "ip",
834
+ "type": "text",
835
+ "primaryKey": false,
836
+ "notNull": false
837
+ },
838
+ "user_agent": {
839
+ "name": "user_agent",
840
+ "type": "text",
841
+ "primaryKey": false,
842
+ "notNull": false
843
+ },
844
+ "attempted_at": {
845
+ "name": "attempted_at",
846
+ "type": "timestamptz",
847
+ "primaryKey": false,
848
+ "notNull": true
849
+ }
850
+ },
851
+ "indexes": {
852
+ "read_download_attempts_tenant_id_idx": {
853
+ "name": "read_download_attempts_tenant_id_idx",
854
+ "columns": [
855
+ {
856
+ "expression": "tenant_id",
857
+ "isExpression": false,
858
+ "asc": true,
859
+ "nulls": "last"
860
+ }
861
+ ],
862
+ "isUnique": false,
863
+ "concurrently": false,
864
+ "method": "btree",
865
+ "with": {}
866
+ }
867
+ },
868
+ "foreignKeys": {},
869
+ "compositePrimaryKeys": {},
870
+ "uniqueConstraints": {},
871
+ "policies": {},
872
+ "checkConstraints": {},
873
+ "isRLSEnabled": false
874
+ },
875
+ "public.read_export_download_tokens": {
876
+ "name": "read_export_download_tokens",
877
+ "schema": "",
878
+ "columns": {
879
+ "id": {
880
+ "name": "id",
881
+ "type": "uuid",
882
+ "primaryKey": true,
883
+ "notNull": true,
884
+ "default": "gen_random_uuid()"
885
+ },
886
+ "tenant_id": {
887
+ "name": "tenant_id",
888
+ "type": "uuid",
889
+ "primaryKey": false,
890
+ "notNull": true
891
+ },
892
+ "version": {
893
+ "name": "version",
894
+ "type": "integer",
895
+ "primaryKey": false,
896
+ "notNull": true,
897
+ "default": 1
898
+ },
899
+ "inserted_at": {
900
+ "name": "inserted_at",
901
+ "type": "timestamptz",
902
+ "primaryKey": false,
903
+ "notNull": true,
904
+ "default": "now()"
905
+ },
906
+ "modified_at": {
907
+ "name": "modified_at",
908
+ "type": "timestamptz",
909
+ "primaryKey": false,
910
+ "notNull": false
911
+ },
912
+ "inserted_by_id": {
913
+ "name": "inserted_by_id",
914
+ "type": "text",
915
+ "primaryKey": false,
916
+ "notNull": false
917
+ },
918
+ "modified_by_id": {
919
+ "name": "modified_by_id",
920
+ "type": "text",
921
+ "primaryKey": false,
922
+ "notNull": false
923
+ },
924
+ "job_id": {
925
+ "name": "job_id",
926
+ "type": "text",
927
+ "primaryKey": false,
928
+ "notNull": true
929
+ },
930
+ "token_hash": {
931
+ "name": "token_hash",
932
+ "type": "text",
933
+ "primaryKey": false,
934
+ "notNull": true
935
+ },
936
+ "issued_at": {
937
+ "name": "issued_at",
938
+ "type": "timestamptz",
939
+ "primaryKey": false,
940
+ "notNull": true
941
+ },
942
+ "expires_at": {
943
+ "name": "expires_at",
944
+ "type": "timestamptz",
945
+ "primaryKey": false,
946
+ "notNull": true
947
+ },
948
+ "last_used_at": {
949
+ "name": "last_used_at",
950
+ "type": "timestamptz",
951
+ "primaryKey": false,
952
+ "notNull": false
953
+ },
954
+ "use_count": {
955
+ "name": "use_count",
956
+ "type": "bigint",
957
+ "primaryKey": false,
958
+ "notNull": false
959
+ },
960
+ "last_used_from_ip": {
961
+ "name": "last_used_from_ip",
962
+ "type": "text",
963
+ "primaryKey": false,
964
+ "notNull": false
965
+ },
966
+ "last_used_user_agent": {
967
+ "name": "last_used_user_agent",
968
+ "type": "text",
969
+ "primaryKey": false,
970
+ "notNull": false
971
+ }
972
+ },
973
+ "indexes": {
974
+ "read_export_download_tokens_tenant_id_idx": {
975
+ "name": "read_export_download_tokens_tenant_id_idx",
976
+ "columns": [
977
+ {
978
+ "expression": "tenant_id",
979
+ "isExpression": false,
980
+ "asc": true,
981
+ "nulls": "last"
982
+ }
983
+ ],
984
+ "isUnique": false,
985
+ "concurrently": false,
986
+ "method": "btree",
987
+ "with": {}
988
+ },
989
+ "read_export_download_tokens_one_per_job": {
990
+ "name": "read_export_download_tokens_one_per_job",
991
+ "columns": [
992
+ {
993
+ "expression": "job_id",
994
+ "isExpression": false,
995
+ "asc": true,
996
+ "nulls": "last"
997
+ }
998
+ ],
999
+ "isUnique": true,
1000
+ "concurrently": false,
1001
+ "method": "btree",
1002
+ "with": {}
1003
+ }
1004
+ },
1005
+ "foreignKeys": {},
1006
+ "compositePrimaryKeys": {},
1007
+ "uniqueConstraints": {},
1008
+ "policies": {},
1009
+ "checkConstraints": {},
1010
+ "isRLSEnabled": false
1011
+ },
1012
+ "public.read_export_jobs": {
1013
+ "name": "read_export_jobs",
1014
+ "schema": "",
1015
+ "columns": {
1016
+ "id": {
1017
+ "name": "id",
1018
+ "type": "uuid",
1019
+ "primaryKey": true,
1020
+ "notNull": true,
1021
+ "default": "gen_random_uuid()"
1022
+ },
1023
+ "tenant_id": {
1024
+ "name": "tenant_id",
1025
+ "type": "uuid",
1026
+ "primaryKey": false,
1027
+ "notNull": true
1028
+ },
1029
+ "version": {
1030
+ "name": "version",
1031
+ "type": "integer",
1032
+ "primaryKey": false,
1033
+ "notNull": true,
1034
+ "default": 1
1035
+ },
1036
+ "inserted_at": {
1037
+ "name": "inserted_at",
1038
+ "type": "timestamptz",
1039
+ "primaryKey": false,
1040
+ "notNull": true,
1041
+ "default": "now()"
1042
+ },
1043
+ "modified_at": {
1044
+ "name": "modified_at",
1045
+ "type": "timestamptz",
1046
+ "primaryKey": false,
1047
+ "notNull": false
1048
+ },
1049
+ "inserted_by_id": {
1050
+ "name": "inserted_by_id",
1051
+ "type": "text",
1052
+ "primaryKey": false,
1053
+ "notNull": false
1054
+ },
1055
+ "modified_by_id": {
1056
+ "name": "modified_by_id",
1057
+ "type": "text",
1058
+ "primaryKey": false,
1059
+ "notNull": false
1060
+ },
1061
+ "user_id": {
1062
+ "name": "user_id",
1063
+ "type": "text",
1064
+ "primaryKey": false,
1065
+ "notNull": true
1066
+ },
1067
+ "requested_from_tenant_id": {
1068
+ "name": "requested_from_tenant_id",
1069
+ "type": "text",
1070
+ "primaryKey": false,
1071
+ "notNull": true
1072
+ },
1073
+ "status": {
1074
+ "name": "status",
1075
+ "type": "text",
1076
+ "primaryKey": false,
1077
+ "notNull": true
1078
+ },
1079
+ "requested_at": {
1080
+ "name": "requested_at",
1081
+ "type": "timestamptz",
1082
+ "primaryKey": false,
1083
+ "notNull": true
1084
+ },
1085
+ "started_at": {
1086
+ "name": "started_at",
1087
+ "type": "timestamptz",
1088
+ "primaryKey": false,
1089
+ "notNull": false
1090
+ },
1091
+ "completed_at": {
1092
+ "name": "completed_at",
1093
+ "type": "timestamptz",
1094
+ "primaryKey": false,
1095
+ "notNull": false
1096
+ },
1097
+ "download_storage_key": {
1098
+ "name": "download_storage_key",
1099
+ "type": "text",
1100
+ "primaryKey": false,
1101
+ "notNull": false
1102
+ },
1103
+ "expires_at": {
1104
+ "name": "expires_at",
1105
+ "type": "timestamptz",
1106
+ "primaryKey": false,
1107
+ "notNull": false
1108
+ },
1109
+ "error_message": {
1110
+ "name": "error_message",
1111
+ "type": "text",
1112
+ "primaryKey": false,
1113
+ "notNull": false
1114
+ },
1115
+ "bytes_written": {
1116
+ "name": "bytes_written",
1117
+ "type": "bigint",
1118
+ "primaryKey": false,
1119
+ "notNull": false
1120
+ }
1121
+ },
1122
+ "indexes": {
1123
+ "read_export_jobs_tenant_id_idx": {
1124
+ "name": "read_export_jobs_tenant_id_idx",
1125
+ "columns": [
1126
+ {
1127
+ "expression": "tenant_id",
1128
+ "isExpression": false,
1129
+ "asc": true,
1130
+ "nulls": "last"
1131
+ }
1132
+ ],
1133
+ "isUnique": false,
1134
+ "concurrently": false,
1135
+ "method": "btree",
1136
+ "with": {}
1137
+ },
1138
+ "read_export_jobs_one_active_per_user": {
1139
+ "name": "read_export_jobs_one_active_per_user",
1140
+ "columns": [
1141
+ {
1142
+ "expression": "user_id",
1143
+ "isExpression": false,
1144
+ "asc": true,
1145
+ "nulls": "last"
1146
+ }
1147
+ ],
1148
+ "isUnique": true,
1149
+ "where": "status IN ('pending', 'running')",
1150
+ "concurrently": false,
1151
+ "method": "btree",
1152
+ "with": {}
1153
+ }
1154
+ },
1155
+ "foreignKeys": {},
1156
+ "compositePrimaryKeys": {},
1157
+ "uniqueConstraints": {},
1158
+ "policies": {},
1159
+ "checkConstraints": {},
1160
+ "isRLSEnabled": false
1161
+ },
1162
+ "public.read_custom_field_definitions": {
1163
+ "name": "read_custom_field_definitions",
1164
+ "schema": "",
1165
+ "columns": {
1166
+ "id": {
1167
+ "name": "id",
1168
+ "type": "uuid",
1169
+ "primaryKey": true,
1170
+ "notNull": true,
1171
+ "default": "gen_random_uuid()"
1172
+ },
1173
+ "tenant_id": {
1174
+ "name": "tenant_id",
1175
+ "type": "uuid",
1176
+ "primaryKey": false,
1177
+ "notNull": true
1178
+ },
1179
+ "version": {
1180
+ "name": "version",
1181
+ "type": "integer",
1182
+ "primaryKey": false,
1183
+ "notNull": true,
1184
+ "default": 1
1185
+ },
1186
+ "inserted_at": {
1187
+ "name": "inserted_at",
1188
+ "type": "timestamptz",
1189
+ "primaryKey": false,
1190
+ "notNull": true,
1191
+ "default": "now()"
1192
+ },
1193
+ "modified_at": {
1194
+ "name": "modified_at",
1195
+ "type": "timestamptz",
1196
+ "primaryKey": false,
1197
+ "notNull": false
1198
+ },
1199
+ "inserted_by_id": {
1200
+ "name": "inserted_by_id",
1201
+ "type": "text",
1202
+ "primaryKey": false,
1203
+ "notNull": false
1204
+ },
1205
+ "modified_by_id": {
1206
+ "name": "modified_by_id",
1207
+ "type": "text",
1208
+ "primaryKey": false,
1209
+ "notNull": false
1210
+ },
1211
+ "entity_name": {
1212
+ "name": "entity_name",
1213
+ "type": "text",
1214
+ "primaryKey": false,
1215
+ "notNull": true
1216
+ },
1217
+ "field_key": {
1218
+ "name": "field_key",
1219
+ "type": "text",
1220
+ "primaryKey": false,
1221
+ "notNull": true
1222
+ },
1223
+ "type": {
1224
+ "name": "type",
1225
+ "type": "text",
1226
+ "primaryKey": false,
1227
+ "notNull": true
1228
+ },
1229
+ "required": {
1230
+ "name": "required",
1231
+ "type": "boolean",
1232
+ "primaryKey": false,
1233
+ "notNull": true,
1234
+ "default": false
1235
+ },
1236
+ "searchable": {
1237
+ "name": "searchable",
1238
+ "type": "boolean",
1239
+ "primaryKey": false,
1240
+ "notNull": true,
1241
+ "default": false
1242
+ },
1243
+ "display_order": {
1244
+ "name": "display_order",
1245
+ "type": "integer",
1246
+ "primaryKey": false,
1247
+ "notNull": true
1248
+ },
1249
+ "serialized_field": {
1250
+ "name": "serialized_field",
1251
+ "type": "text",
1252
+ "primaryKey": false,
1253
+ "notNull": true
1254
+ }
1255
+ },
1256
+ "indexes": {
1257
+ "read_custom_field_definitions_tenant_id_idx": {
1258
+ "name": "read_custom_field_definitions_tenant_id_idx",
1259
+ "columns": [
1260
+ {
1261
+ "expression": "tenant_id",
1262
+ "isExpression": false,
1263
+ "asc": true,
1264
+ "nulls": "last"
1265
+ }
1266
+ ],
1267
+ "isUnique": false,
1268
+ "concurrently": false,
1269
+ "method": "btree",
1270
+ "with": {}
1271
+ }
1272
+ },
1273
+ "foreignKeys": {},
1274
+ "compositePrimaryKeys": {},
1275
+ "uniqueConstraints": {},
1276
+ "policies": {},
1277
+ "checkConstraints": {},
1278
+ "isRLSEnabled": false
1279
+ },
1280
+ "public.file_refs": {
1281
+ "name": "file_refs",
1282
+ "schema": "",
1283
+ "columns": {
1284
+ "id": {
1285
+ "name": "id",
1286
+ "type": "uuid",
1287
+ "primaryKey": true,
1288
+ "notNull": true,
1289
+ "default": "gen_random_uuid()"
1290
+ },
1291
+ "tenant_id": {
1292
+ "name": "tenant_id",
1293
+ "type": "uuid",
1294
+ "primaryKey": false,
1295
+ "notNull": true
1296
+ },
1297
+ "version": {
1298
+ "name": "version",
1299
+ "type": "integer",
1300
+ "primaryKey": false,
1301
+ "notNull": true,
1302
+ "default": 1
1303
+ },
1304
+ "inserted_at": {
1305
+ "name": "inserted_at",
1306
+ "type": "timestamptz",
1307
+ "primaryKey": false,
1308
+ "notNull": false
1309
+ },
1310
+ "modified_at": {
1311
+ "name": "modified_at",
1312
+ "type": "timestamptz",
1313
+ "primaryKey": false,
1314
+ "notNull": false
1315
+ },
1316
+ "inserted_by_id": {
1317
+ "name": "inserted_by_id",
1318
+ "type": "text",
1319
+ "primaryKey": false,
1320
+ "notNull": false
1321
+ },
1322
+ "modified_by_id": {
1323
+ "name": "modified_by_id",
1324
+ "type": "text",
1325
+ "primaryKey": false,
1326
+ "notNull": false
1327
+ },
1328
+ "storage_key": {
1329
+ "name": "storage_key",
1330
+ "type": "text",
1331
+ "primaryKey": false,
1332
+ "notNull": true
1333
+ },
1334
+ "file_name": {
1335
+ "name": "file_name",
1336
+ "type": "text",
1337
+ "primaryKey": false,
1338
+ "notNull": true
1339
+ },
1340
+ "mime_type": {
1341
+ "name": "mime_type",
1342
+ "type": "text",
1343
+ "primaryKey": false,
1344
+ "notNull": true
1345
+ },
1346
+ "size": {
1347
+ "name": "size",
1348
+ "type": "integer",
1349
+ "primaryKey": false,
1350
+ "notNull": true
1351
+ },
1352
+ "entity_type": {
1353
+ "name": "entity_type",
1354
+ "type": "text",
1355
+ "primaryKey": false,
1356
+ "notNull": false
1357
+ },
1358
+ "entity_id": {
1359
+ "name": "entity_id",
1360
+ "type": "text",
1361
+ "primaryKey": false,
1362
+ "notNull": false
1363
+ },
1364
+ "field_name": {
1365
+ "name": "field_name",
1366
+ "type": "text",
1367
+ "primaryKey": false,
1368
+ "notNull": false
1369
+ }
1370
+ },
1371
+ "indexes": {
1372
+ "file_refs_tenant_id_idx": {
1373
+ "name": "file_refs_tenant_id_idx",
1374
+ "columns": [
1375
+ {
1376
+ "expression": "tenant_id",
1377
+ "isExpression": false,
1378
+ "asc": true,
1379
+ "nulls": "last"
1380
+ }
1381
+ ],
1382
+ "isUnique": false,
1383
+ "concurrently": false,
1384
+ "method": "btree",
1385
+ "with": {}
1386
+ }
1387
+ },
1388
+ "foreignKeys": {},
1389
+ "compositePrimaryKeys": {},
1390
+ "uniqueConstraints": {},
1391
+ "policies": {},
1392
+ "checkConstraints": {},
1393
+ "isRLSEnabled": false
1394
+ },
1395
+ "public.read_job_run_logs": {
1396
+ "name": "read_job_run_logs",
1397
+ "schema": "",
1398
+ "columns": {
1399
+ "id": {
1400
+ "name": "id",
1401
+ "type": "serial",
1402
+ "primaryKey": true,
1403
+ "notNull": true
1404
+ },
1405
+ "run_id": {
1406
+ "name": "run_id",
1407
+ "type": "text",
1408
+ "primaryKey": false,
1409
+ "notNull": true
1410
+ },
1411
+ "level": {
1412
+ "name": "level",
1413
+ "type": "text",
1414
+ "primaryKey": false,
1415
+ "notNull": true
1416
+ },
1417
+ "message": {
1418
+ "name": "message",
1419
+ "type": "text",
1420
+ "primaryKey": false,
1421
+ "notNull": true
1422
+ },
1423
+ "timestamp": {
1424
+ "name": "timestamp",
1425
+ "type": "timestamptz",
1426
+ "primaryKey": false,
1427
+ "notNull": true
1428
+ }
1429
+ },
1430
+ "indexes": {},
1431
+ "foreignKeys": {},
1432
+ "compositePrimaryKeys": {},
1433
+ "uniqueConstraints": {},
1434
+ "policies": {},
1435
+ "checkConstraints": {},
1436
+ "isRLSEnabled": false
1437
+ },
1438
+ "public.read_job_runs": {
1439
+ "name": "read_job_runs",
1440
+ "schema": "",
1441
+ "columns": {
1442
+ "id": {
1443
+ "name": "id",
1444
+ "type": "uuid",
1445
+ "primaryKey": true,
1446
+ "notNull": true,
1447
+ "default": "gen_random_uuid()"
1448
+ },
1449
+ "tenant_id": {
1450
+ "name": "tenant_id",
1451
+ "type": "uuid",
1452
+ "primaryKey": false,
1453
+ "notNull": true
1454
+ },
1455
+ "version": {
1456
+ "name": "version",
1457
+ "type": "integer",
1458
+ "primaryKey": false,
1459
+ "notNull": true,
1460
+ "default": 1
1461
+ },
1462
+ "inserted_at": {
1463
+ "name": "inserted_at",
1464
+ "type": "timestamptz",
1465
+ "primaryKey": false,
1466
+ "notNull": true,
1467
+ "default": "now()"
1468
+ },
1469
+ "modified_at": {
1470
+ "name": "modified_at",
1471
+ "type": "timestamptz",
1472
+ "primaryKey": false,
1473
+ "notNull": false
1474
+ },
1475
+ "inserted_by_id": {
1476
+ "name": "inserted_by_id",
1477
+ "type": "text",
1478
+ "primaryKey": false,
1479
+ "notNull": false
1480
+ },
1481
+ "modified_by_id": {
1482
+ "name": "modified_by_id",
1483
+ "type": "text",
1484
+ "primaryKey": false,
1485
+ "notNull": false
1486
+ },
1487
+ "job_name": {
1488
+ "name": "job_name",
1489
+ "type": "text",
1490
+ "primaryKey": false,
1491
+ "notNull": true
1492
+ },
1493
+ "bull_job_id": {
1494
+ "name": "bull_job_id",
1495
+ "type": "text",
1496
+ "primaryKey": false,
1497
+ "notNull": true
1498
+ },
1499
+ "status": {
1500
+ "name": "status",
1501
+ "type": "text",
1502
+ "primaryKey": false,
1503
+ "notNull": true
1504
+ },
1505
+ "payload": {
1506
+ "name": "payload",
1507
+ "type": "text",
1508
+ "primaryKey": false,
1509
+ "notNull": false
1510
+ },
1511
+ "error": {
1512
+ "name": "error",
1513
+ "type": "text",
1514
+ "primaryKey": false,
1515
+ "notNull": false
1516
+ },
1517
+ "attempt": {
1518
+ "name": "attempt",
1519
+ "type": "integer",
1520
+ "primaryKey": false,
1521
+ "notNull": true,
1522
+ "default": 1
1523
+ },
1524
+ "started_at": {
1525
+ "name": "started_at",
1526
+ "type": "timestamptz",
1527
+ "primaryKey": false,
1528
+ "notNull": true
1529
+ },
1530
+ "finished_at": {
1531
+ "name": "finished_at",
1532
+ "type": "timestamptz",
1533
+ "primaryKey": false,
1534
+ "notNull": false
1535
+ },
1536
+ "duration": {
1537
+ "name": "duration",
1538
+ "type": "integer",
1539
+ "primaryKey": false,
1540
+ "notNull": false
1541
+ },
1542
+ "triggered_by_id": {
1543
+ "name": "triggered_by_id",
1544
+ "type": "text",
1545
+ "primaryKey": false,
1546
+ "notNull": false
1547
+ }
1548
+ },
1549
+ "indexes": {},
1550
+ "foreignKeys": {},
1551
+ "compositePrimaryKeys": {},
1552
+ "uniqueConstraints": {},
1553
+ "policies": {},
1554
+ "checkConstraints": {},
1555
+ "isRLSEnabled": false
1556
+ },
1557
+ "public.read_notification_preferences": {
1558
+ "name": "read_notification_preferences",
1559
+ "schema": "",
1560
+ "columns": {
1561
+ "id": {
1562
+ "name": "id",
1563
+ "type": "uuid",
1564
+ "primaryKey": true,
1565
+ "notNull": true,
1566
+ "default": "gen_random_uuid()"
1567
+ },
1568
+ "tenant_id": {
1569
+ "name": "tenant_id",
1570
+ "type": "uuid",
1571
+ "primaryKey": false,
1572
+ "notNull": true
1573
+ },
1574
+ "version": {
1575
+ "name": "version",
1576
+ "type": "integer",
1577
+ "primaryKey": false,
1578
+ "notNull": true,
1579
+ "default": 1
1580
+ },
1581
+ "inserted_at": {
1582
+ "name": "inserted_at",
1583
+ "type": "timestamptz",
1584
+ "primaryKey": false,
1585
+ "notNull": true,
1586
+ "default": "now()"
1587
+ },
1588
+ "modified_at": {
1589
+ "name": "modified_at",
1590
+ "type": "timestamptz",
1591
+ "primaryKey": false,
1592
+ "notNull": false
1593
+ },
1594
+ "inserted_by_id": {
1595
+ "name": "inserted_by_id",
1596
+ "type": "text",
1597
+ "primaryKey": false,
1598
+ "notNull": false
1599
+ },
1600
+ "modified_by_id": {
1601
+ "name": "modified_by_id",
1602
+ "type": "text",
1603
+ "primaryKey": false,
1604
+ "notNull": false
1605
+ },
1606
+ "user_id": {
1607
+ "name": "user_id",
1608
+ "type": "text",
1609
+ "primaryKey": false,
1610
+ "notNull": true
1611
+ },
1612
+ "notification_type": {
1613
+ "name": "notification_type",
1614
+ "type": "text",
1615
+ "primaryKey": false,
1616
+ "notNull": true
1617
+ },
1618
+ "channel": {
1619
+ "name": "channel",
1620
+ "type": "text",
1621
+ "primaryKey": false,
1622
+ "notNull": true
1623
+ },
1624
+ "enabled": {
1625
+ "name": "enabled",
1626
+ "type": "boolean",
1627
+ "primaryKey": false,
1628
+ "notNull": true,
1629
+ "default": true
1630
+ }
1631
+ },
1632
+ "indexes": {
1633
+ "read_notification_preferences_tenant_id_idx": {
1634
+ "name": "read_notification_preferences_tenant_id_idx",
1635
+ "columns": [
1636
+ {
1637
+ "expression": "tenant_id",
1638
+ "isExpression": false,
1639
+ "asc": true,
1640
+ "nulls": "last"
1641
+ }
1642
+ ],
1643
+ "isUnique": false,
1644
+ "concurrently": false,
1645
+ "method": "btree",
1646
+ "with": {}
1647
+ }
1648
+ },
1649
+ "foreignKeys": {},
1650
+ "compositePrimaryKeys": {},
1651
+ "uniqueConstraints": {},
1652
+ "policies": {},
1653
+ "checkConstraints": {},
1654
+ "isRLSEnabled": false
1655
+ },
1656
+ "public.read_subscriptions": {
1657
+ "name": "read_subscriptions",
1658
+ "schema": "",
1659
+ "columns": {
1660
+ "id": {
1661
+ "name": "id",
1662
+ "type": "uuid",
1663
+ "primaryKey": true,
1664
+ "notNull": true,
1665
+ "default": "gen_random_uuid()"
1666
+ },
1667
+ "tenant_id": {
1668
+ "name": "tenant_id",
1669
+ "type": "uuid",
1670
+ "primaryKey": false,
1671
+ "notNull": true
1672
+ },
1673
+ "version": {
1674
+ "name": "version",
1675
+ "type": "integer",
1676
+ "primaryKey": false,
1677
+ "notNull": true,
1678
+ "default": 1
1679
+ },
1680
+ "inserted_at": {
1681
+ "name": "inserted_at",
1682
+ "type": "timestamptz",
1683
+ "primaryKey": false,
1684
+ "notNull": true,
1685
+ "default": "now()"
1686
+ },
1687
+ "modified_at": {
1688
+ "name": "modified_at",
1689
+ "type": "timestamptz",
1690
+ "primaryKey": false,
1691
+ "notNull": false
1692
+ },
1693
+ "inserted_by_id": {
1694
+ "name": "inserted_by_id",
1695
+ "type": "text",
1696
+ "primaryKey": false,
1697
+ "notNull": false
1698
+ },
1699
+ "modified_by_id": {
1700
+ "name": "modified_by_id",
1701
+ "type": "text",
1702
+ "primaryKey": false,
1703
+ "notNull": false
1704
+ },
1705
+ "provider_name": {
1706
+ "name": "provider_name",
1707
+ "type": "text",
1708
+ "primaryKey": false,
1709
+ "notNull": true
1710
+ },
1711
+ "provider_customer_id": {
1712
+ "name": "provider_customer_id",
1713
+ "type": "text",
1714
+ "primaryKey": false,
1715
+ "notNull": true
1716
+ },
1717
+ "provider_subscription_id": {
1718
+ "name": "provider_subscription_id",
1719
+ "type": "text",
1720
+ "primaryKey": false,
1721
+ "notNull": true
1722
+ },
1723
+ "status": {
1724
+ "name": "status",
1725
+ "type": "text",
1726
+ "primaryKey": false,
1727
+ "notNull": true
1728
+ },
1729
+ "tier": {
1730
+ "name": "tier",
1731
+ "type": "text",
1732
+ "primaryKey": false,
1733
+ "notNull": true
1734
+ },
1735
+ "current_period_end": {
1736
+ "name": "current_period_end",
1737
+ "type": "timestamptz",
1738
+ "primaryKey": false,
1739
+ "notNull": true
1740
+ }
1741
+ },
1742
+ "indexes": {
1743
+ "read_subscriptions_tenant_id_idx": {
1744
+ "name": "read_subscriptions_tenant_id_idx",
1745
+ "columns": [
1746
+ {
1747
+ "expression": "tenant_id",
1748
+ "isExpression": false,
1749
+ "asc": true,
1750
+ "nulls": "last"
1751
+ }
1752
+ ],
1753
+ "isUnique": false,
1754
+ "concurrently": false,
1755
+ "method": "btree",
1756
+ "with": {}
1757
+ }
1758
+ },
1759
+ "foreignKeys": {},
1760
+ "compositePrimaryKeys": {},
1761
+ "uniqueConstraints": {},
1762
+ "policies": {},
1763
+ "checkConstraints": {},
1764
+ "isRLSEnabled": false
1765
+ },
1766
+ "public.read_template_resources": {
1767
+ "name": "read_template_resources",
1768
+ "schema": "",
1769
+ "columns": {
1770
+ "id": {
1771
+ "name": "id",
1772
+ "type": "uuid",
1773
+ "primaryKey": true,
1774
+ "notNull": true,
1775
+ "default": "gen_random_uuid()"
1776
+ },
1777
+ "tenant_id": {
1778
+ "name": "tenant_id",
1779
+ "type": "uuid",
1780
+ "primaryKey": false,
1781
+ "notNull": true
1782
+ },
1783
+ "version": {
1784
+ "name": "version",
1785
+ "type": "integer",
1786
+ "primaryKey": false,
1787
+ "notNull": true,
1788
+ "default": 1
1789
+ },
1790
+ "inserted_at": {
1791
+ "name": "inserted_at",
1792
+ "type": "timestamptz",
1793
+ "primaryKey": false,
1794
+ "notNull": true,
1795
+ "default": "now()"
1796
+ },
1797
+ "modified_at": {
1798
+ "name": "modified_at",
1799
+ "type": "timestamptz",
1800
+ "primaryKey": false,
1801
+ "notNull": false
1802
+ },
1803
+ "inserted_by_id": {
1804
+ "name": "inserted_by_id",
1805
+ "type": "text",
1806
+ "primaryKey": false,
1807
+ "notNull": false
1808
+ },
1809
+ "modified_by_id": {
1810
+ "name": "modified_by_id",
1811
+ "type": "text",
1812
+ "primaryKey": false,
1813
+ "notNull": false
1814
+ },
1815
+ "slug": {
1816
+ "name": "slug",
1817
+ "type": "text",
1818
+ "primaryKey": false,
1819
+ "notNull": true
1820
+ },
1821
+ "kind": {
1822
+ "name": "kind",
1823
+ "type": "text",
1824
+ "primaryKey": false,
1825
+ "notNull": true
1826
+ },
1827
+ "locale": {
1828
+ "name": "locale",
1829
+ "type": "text",
1830
+ "primaryKey": false,
1831
+ "notNull": true
1832
+ },
1833
+ "content": {
1834
+ "name": "content",
1835
+ "type": "text",
1836
+ "primaryKey": false,
1837
+ "notNull": false
1838
+ },
1839
+ "content_format": {
1840
+ "name": "content_format",
1841
+ "type": "text",
1842
+ "primaryKey": false,
1843
+ "notNull": true
1844
+ },
1845
+ "variable_schema": {
1846
+ "name": "variable_schema",
1847
+ "type": "text",
1848
+ "primaryKey": false,
1849
+ "notNull": false
1850
+ },
1851
+ "linked_resources": {
1852
+ "name": "linked_resources",
1853
+ "type": "text",
1854
+ "primaryKey": false,
1855
+ "notNull": false
1856
+ },
1857
+ "scope": {
1858
+ "name": "scope",
1859
+ "type": "text",
1860
+ "primaryKey": false,
1861
+ "notNull": true
1862
+ },
1863
+ "parent_template_id": {
1864
+ "name": "parent_template_id",
1865
+ "type": "text",
1866
+ "primaryKey": false,
1867
+ "notNull": false
1868
+ },
1869
+ "status": {
1870
+ "name": "status",
1871
+ "type": "text",
1872
+ "primaryKey": false,
1873
+ "notNull": true
1874
+ }
1875
+ },
1876
+ "indexes": {
1877
+ "read_template_resources_tenant_id_idx": {
1878
+ "name": "read_template_resources_tenant_id_idx",
1879
+ "columns": [
1880
+ {
1881
+ "expression": "tenant_id",
1882
+ "isExpression": false,
1883
+ "asc": true,
1884
+ "nulls": "last"
1885
+ }
1886
+ ],
1887
+ "isUnique": false,
1888
+ "concurrently": false,
1889
+ "method": "btree",
1890
+ "with": {}
1891
+ },
1892
+ "read_template_resources_unique": {
1893
+ "name": "read_template_resources_unique",
1894
+ "columns": [
1895
+ {
1896
+ "expression": "tenant_id",
1897
+ "isExpression": false,
1898
+ "asc": true,
1899
+ "nulls": "last"
1900
+ },
1901
+ {
1902
+ "expression": "slug",
1903
+ "isExpression": false,
1904
+ "asc": true,
1905
+ "nulls": "last"
1906
+ },
1907
+ {
1908
+ "expression": "kind",
1909
+ "isExpression": false,
1910
+ "asc": true,
1911
+ "nulls": "last"
1912
+ },
1913
+ {
1914
+ "expression": "locale",
1915
+ "isExpression": false,
1916
+ "asc": true,
1917
+ "nulls": "last"
1918
+ }
1919
+ ],
1920
+ "isUnique": true,
1921
+ "concurrently": false,
1922
+ "method": "btree",
1923
+ "with": {}
1924
+ }
1925
+ },
1926
+ "foreignKeys": {},
1927
+ "compositePrimaryKeys": {},
1928
+ "uniqueConstraints": {},
1929
+ "policies": {},
1930
+ "checkConstraints": {},
1931
+ "isRLSEnabled": false
1932
+ },
1933
+ "public.read_tenant_compliance_profiles": {
1934
+ "name": "read_tenant_compliance_profiles",
1935
+ "schema": "",
1936
+ "columns": {
1937
+ "id": {
1938
+ "name": "id",
1939
+ "type": "uuid",
1940
+ "primaryKey": true,
1941
+ "notNull": true,
1942
+ "default": "gen_random_uuid()"
1943
+ },
1944
+ "tenant_id": {
1945
+ "name": "tenant_id",
1946
+ "type": "uuid",
1947
+ "primaryKey": false,
1948
+ "notNull": true
1949
+ },
1950
+ "version": {
1951
+ "name": "version",
1952
+ "type": "integer",
1953
+ "primaryKey": false,
1954
+ "notNull": true,
1955
+ "default": 1
1956
+ },
1957
+ "inserted_at": {
1958
+ "name": "inserted_at",
1959
+ "type": "timestamptz",
1960
+ "primaryKey": false,
1961
+ "notNull": true,
1962
+ "default": "now()"
1963
+ },
1964
+ "modified_at": {
1965
+ "name": "modified_at",
1966
+ "type": "timestamptz",
1967
+ "primaryKey": false,
1968
+ "notNull": false
1969
+ },
1970
+ "inserted_by_id": {
1971
+ "name": "inserted_by_id",
1972
+ "type": "text",
1973
+ "primaryKey": false,
1974
+ "notNull": false
1975
+ },
1976
+ "modified_by_id": {
1977
+ "name": "modified_by_id",
1978
+ "type": "text",
1979
+ "primaryKey": false,
1980
+ "notNull": false
1981
+ },
1982
+ "profile_key": {
1983
+ "name": "profile_key",
1984
+ "type": "text",
1985
+ "primaryKey": false,
1986
+ "notNull": true
1987
+ },
1988
+ "override": {
1989
+ "name": "override",
1990
+ "type": "text",
1991
+ "primaryKey": false,
1992
+ "notNull": false
1993
+ }
1994
+ },
1995
+ "indexes": {
1996
+ "read_tenant_compliance_profiles_tenant_id_idx": {
1997
+ "name": "read_tenant_compliance_profiles_tenant_id_idx",
1998
+ "columns": [
1999
+ {
2000
+ "expression": "tenant_id",
2001
+ "isExpression": false,
2002
+ "asc": true,
2003
+ "nulls": "last"
2004
+ }
2005
+ ],
2006
+ "isUnique": false,
2007
+ "concurrently": false,
2008
+ "method": "btree",
2009
+ "with": {}
2010
+ },
2011
+ "read_tenant_compliance_profiles_tenant_id_unique": {
2012
+ "name": "read_tenant_compliance_profiles_tenant_id_unique",
2013
+ "columns": [
2014
+ {
2015
+ "expression": "tenant_id",
2016
+ "isExpression": false,
2017
+ "asc": true,
2018
+ "nulls": "last"
2019
+ }
2020
+ ],
2021
+ "isUnique": true,
2022
+ "concurrently": false,
2023
+ "method": "btree",
2024
+ "with": {}
2025
+ }
2026
+ },
2027
+ "foreignKeys": {},
2028
+ "compositePrimaryKeys": {},
2029
+ "uniqueConstraints": {},
2030
+ "policies": {},
2031
+ "checkConstraints": {},
2032
+ "isRLSEnabled": false
2033
+ },
2034
+ "public.read_tenant_invitations": {
2035
+ "name": "read_tenant_invitations",
2036
+ "schema": "",
2037
+ "columns": {
2038
+ "id": {
2039
+ "name": "id",
2040
+ "type": "uuid",
2041
+ "primaryKey": true,
2042
+ "notNull": true,
2043
+ "default": "gen_random_uuid()"
2044
+ },
2045
+ "tenant_id": {
2046
+ "name": "tenant_id",
2047
+ "type": "uuid",
2048
+ "primaryKey": false,
2049
+ "notNull": true
2050
+ },
2051
+ "version": {
2052
+ "name": "version",
2053
+ "type": "integer",
2054
+ "primaryKey": false,
2055
+ "notNull": true,
2056
+ "default": 1
2057
+ },
2058
+ "inserted_at": {
2059
+ "name": "inserted_at",
2060
+ "type": "timestamptz",
2061
+ "primaryKey": false,
2062
+ "notNull": true,
2063
+ "default": "now()"
2064
+ },
2065
+ "modified_at": {
2066
+ "name": "modified_at",
2067
+ "type": "timestamptz",
2068
+ "primaryKey": false,
2069
+ "notNull": false
2070
+ },
2071
+ "inserted_by_id": {
2072
+ "name": "inserted_by_id",
2073
+ "type": "text",
2074
+ "primaryKey": false,
2075
+ "notNull": false
2076
+ },
2077
+ "modified_by_id": {
2078
+ "name": "modified_by_id",
2079
+ "type": "text",
2080
+ "primaryKey": false,
2081
+ "notNull": false
2082
+ },
2083
+ "email": {
2084
+ "name": "email",
2085
+ "type": "text",
2086
+ "primaryKey": false,
2087
+ "notNull": true
2088
+ },
2089
+ "role": {
2090
+ "name": "role",
2091
+ "type": "text",
2092
+ "primaryKey": false,
2093
+ "notNull": true
2094
+ },
2095
+ "status": {
2096
+ "name": "status",
2097
+ "type": "text",
2098
+ "primaryKey": false,
2099
+ "notNull": true
2100
+ },
2101
+ "invited_by": {
2102
+ "name": "invited_by",
2103
+ "type": "text",
2104
+ "primaryKey": false,
2105
+ "notNull": true
2106
+ },
2107
+ "expires_at": {
2108
+ "name": "expires_at",
2109
+ "type": "timestamptz",
2110
+ "primaryKey": false,
2111
+ "notNull": true
2112
+ }
2113
+ },
2114
+ "indexes": {
2115
+ "read_tenant_invitations_tenant_id_idx": {
2116
+ "name": "read_tenant_invitations_tenant_id_idx",
2117
+ "columns": [
2118
+ {
2119
+ "expression": "tenant_id",
2120
+ "isExpression": false,
2121
+ "asc": true,
2122
+ "nulls": "last"
2123
+ }
2124
+ ],
2125
+ "isUnique": false,
2126
+ "concurrently": false,
2127
+ "method": "btree",
2128
+ "with": {}
2129
+ },
2130
+ "read_tenant_invitations_tenant_email_unique": {
2131
+ "name": "read_tenant_invitations_tenant_email_unique",
2132
+ "columns": [
2133
+ {
2134
+ "expression": "tenant_id",
2135
+ "isExpression": false,
2136
+ "asc": true,
2137
+ "nulls": "last"
2138
+ },
2139
+ {
2140
+ "expression": "email",
2141
+ "isExpression": false,
2142
+ "asc": true,
2143
+ "nulls": "last"
2144
+ }
2145
+ ],
2146
+ "isUnique": true,
2147
+ "concurrently": false,
2148
+ "method": "btree",
2149
+ "with": {}
2150
+ }
2151
+ },
2152
+ "foreignKeys": {},
2153
+ "compositePrimaryKeys": {},
2154
+ "uniqueConstraints": {},
2155
+ "policies": {},
2156
+ "checkConstraints": {},
2157
+ "isRLSEnabled": false
2158
+ },
2159
+ "public.read_tenant_memberships": {
2160
+ "name": "read_tenant_memberships",
2161
+ "schema": "",
2162
+ "columns": {
2163
+ "id": {
2164
+ "name": "id",
2165
+ "type": "uuid",
2166
+ "primaryKey": true,
2167
+ "notNull": true,
2168
+ "default": "gen_random_uuid()"
2169
+ },
2170
+ "tenant_id": {
2171
+ "name": "tenant_id",
2172
+ "type": "uuid",
2173
+ "primaryKey": false,
2174
+ "notNull": true
2175
+ },
2176
+ "version": {
2177
+ "name": "version",
2178
+ "type": "integer",
2179
+ "primaryKey": false,
2180
+ "notNull": true,
2181
+ "default": 1
2182
+ },
2183
+ "inserted_at": {
2184
+ "name": "inserted_at",
2185
+ "type": "timestamptz",
2186
+ "primaryKey": false,
2187
+ "notNull": true,
2188
+ "default": "now()"
2189
+ },
2190
+ "modified_at": {
2191
+ "name": "modified_at",
2192
+ "type": "timestamptz",
2193
+ "primaryKey": false,
2194
+ "notNull": false
2195
+ },
2196
+ "inserted_by_id": {
2197
+ "name": "inserted_by_id",
2198
+ "type": "text",
2199
+ "primaryKey": false,
2200
+ "notNull": false
2201
+ },
2202
+ "modified_by_id": {
2203
+ "name": "modified_by_id",
2204
+ "type": "text",
2205
+ "primaryKey": false,
2206
+ "notNull": false
2207
+ },
2208
+ "user_id": {
2209
+ "name": "user_id",
2210
+ "type": "text",
2211
+ "primaryKey": false,
2212
+ "notNull": true
2213
+ },
2214
+ "roles": {
2215
+ "name": "roles",
2216
+ "type": "text",
2217
+ "primaryKey": false,
2218
+ "notNull": true
2219
+ }
2220
+ },
2221
+ "indexes": {
2222
+ "read_tenant_memberships_tenant_id_idx": {
2223
+ "name": "read_tenant_memberships_tenant_id_idx",
2224
+ "columns": [
2225
+ {
2226
+ "expression": "tenant_id",
2227
+ "isExpression": false,
2228
+ "asc": true,
2229
+ "nulls": "last"
2230
+ }
2231
+ ],
2232
+ "isUnique": false,
2233
+ "concurrently": false,
2234
+ "method": "btree",
2235
+ "with": {}
2236
+ },
2237
+ "read_tenant_memberships_unique": {
2238
+ "name": "read_tenant_memberships_unique",
2239
+ "columns": [
2240
+ {
2241
+ "expression": "user_id",
2242
+ "isExpression": false,
2243
+ "asc": true,
2244
+ "nulls": "last"
2245
+ },
2246
+ {
2247
+ "expression": "tenant_id",
2248
+ "isExpression": false,
2249
+ "asc": true,
2250
+ "nulls": "last"
2251
+ }
2252
+ ],
2253
+ "isUnique": true,
2254
+ "concurrently": false,
2255
+ "method": "btree",
2256
+ "with": {}
2257
+ }
2258
+ },
2259
+ "foreignKeys": {},
2260
+ "compositePrimaryKeys": {},
2261
+ "uniqueConstraints": {},
2262
+ "policies": {},
2263
+ "checkConstraints": {},
2264
+ "isRLSEnabled": false
2265
+ },
2266
+ "public.read_tenant_retention_overrides": {
2267
+ "name": "read_tenant_retention_overrides",
2268
+ "schema": "",
2269
+ "columns": {
2270
+ "id": {
2271
+ "name": "id",
2272
+ "type": "uuid",
2273
+ "primaryKey": true,
2274
+ "notNull": true,
2275
+ "default": "gen_random_uuid()"
2276
+ },
2277
+ "tenant_id": {
2278
+ "name": "tenant_id",
2279
+ "type": "uuid",
2280
+ "primaryKey": false,
2281
+ "notNull": true
2282
+ },
2283
+ "version": {
2284
+ "name": "version",
2285
+ "type": "integer",
2286
+ "primaryKey": false,
2287
+ "notNull": true,
2288
+ "default": 1
2289
+ },
2290
+ "inserted_at": {
2291
+ "name": "inserted_at",
2292
+ "type": "timestamptz",
2293
+ "primaryKey": false,
2294
+ "notNull": true,
2295
+ "default": "now()"
2296
+ },
2297
+ "modified_at": {
2298
+ "name": "modified_at",
2299
+ "type": "timestamptz",
2300
+ "primaryKey": false,
2301
+ "notNull": false
2302
+ },
2303
+ "inserted_by_id": {
2304
+ "name": "inserted_by_id",
2305
+ "type": "text",
2306
+ "primaryKey": false,
2307
+ "notNull": false
2308
+ },
2309
+ "modified_by_id": {
2310
+ "name": "modified_by_id",
2311
+ "type": "text",
2312
+ "primaryKey": false,
2313
+ "notNull": false
2314
+ },
2315
+ "entity_name": {
2316
+ "name": "entity_name",
2317
+ "type": "text",
2318
+ "primaryKey": false,
2319
+ "notNull": true
2320
+ },
2321
+ "config": {
2322
+ "name": "config",
2323
+ "type": "text",
2324
+ "primaryKey": false,
2325
+ "notNull": true
2326
+ },
2327
+ "reason": {
2328
+ "name": "reason",
2329
+ "type": "text",
2330
+ "primaryKey": false,
2331
+ "notNull": true
2332
+ }
2333
+ },
2334
+ "indexes": {
2335
+ "read_tenant_retention_overrides_tenant_id_idx": {
2336
+ "name": "read_tenant_retention_overrides_tenant_id_idx",
2337
+ "columns": [
2338
+ {
2339
+ "expression": "tenant_id",
2340
+ "isExpression": false,
2341
+ "asc": true,
2342
+ "nulls": "last"
2343
+ }
2344
+ ],
2345
+ "isUnique": false,
2346
+ "concurrently": false,
2347
+ "method": "btree",
2348
+ "with": {}
2349
+ },
2350
+ "read_tenant_retention_overrides_tenant_id_entity_name_unique": {
2351
+ "name": "read_tenant_retention_overrides_tenant_id_entity_name_unique",
2352
+ "columns": [
2353
+ {
2354
+ "expression": "tenant_id",
2355
+ "isExpression": false,
2356
+ "asc": true,
2357
+ "nulls": "last"
2358
+ },
2359
+ {
2360
+ "expression": "entity_name",
2361
+ "isExpression": false,
2362
+ "asc": true,
2363
+ "nulls": "last"
2364
+ }
2365
+ ],
2366
+ "isUnique": true,
2367
+ "concurrently": false,
2368
+ "method": "btree",
2369
+ "with": {}
2370
+ }
2371
+ },
2372
+ "foreignKeys": {},
2373
+ "compositePrimaryKeys": {},
2374
+ "uniqueConstraints": {},
2375
+ "policies": {},
2376
+ "checkConstraints": {},
2377
+ "isRLSEnabled": false
2378
+ },
2379
+ "public.read_tenant_secrets": {
2380
+ "name": "read_tenant_secrets",
2381
+ "schema": "",
2382
+ "columns": {
2383
+ "id": {
2384
+ "name": "id",
2385
+ "type": "uuid",
2386
+ "primaryKey": true,
2387
+ "notNull": true,
2388
+ "default": "gen_random_uuid()"
2389
+ },
2390
+ "tenant_id": {
2391
+ "name": "tenant_id",
2392
+ "type": "uuid",
2393
+ "primaryKey": false,
2394
+ "notNull": true
2395
+ },
2396
+ "version": {
2397
+ "name": "version",
2398
+ "type": "integer",
2399
+ "primaryKey": false,
2400
+ "notNull": true,
2401
+ "default": 1
2402
+ },
2403
+ "inserted_at": {
2404
+ "name": "inserted_at",
2405
+ "type": "timestamptz",
2406
+ "primaryKey": false,
2407
+ "notNull": true,
2408
+ "default": "now()"
2409
+ },
2410
+ "modified_at": {
2411
+ "name": "modified_at",
2412
+ "type": "timestamptz",
2413
+ "primaryKey": false,
2414
+ "notNull": false
2415
+ },
2416
+ "inserted_by_id": {
2417
+ "name": "inserted_by_id",
2418
+ "type": "text",
2419
+ "primaryKey": false,
2420
+ "notNull": false
2421
+ },
2422
+ "modified_by_id": {
2423
+ "name": "modified_by_id",
2424
+ "type": "text",
2425
+ "primaryKey": false,
2426
+ "notNull": false
2427
+ },
2428
+ "key": {
2429
+ "name": "key",
2430
+ "type": "text",
2431
+ "primaryKey": false,
2432
+ "notNull": true
2433
+ },
2434
+ "kek_version": {
2435
+ "name": "kek_version",
2436
+ "type": "integer",
2437
+ "primaryKey": false,
2438
+ "notNull": true
2439
+ }
2440
+ },
2441
+ "indexes": {
2442
+ "read_tenant_secrets_tenant_id_idx": {
2443
+ "name": "read_tenant_secrets_tenant_id_idx",
2444
+ "columns": [
2445
+ {
2446
+ "expression": "tenant_id",
2447
+ "isExpression": false,
2448
+ "asc": true,
2449
+ "nulls": "last"
2450
+ }
2451
+ ],
2452
+ "isUnique": false,
2453
+ "concurrently": false,
2454
+ "method": "btree",
2455
+ "with": {}
2456
+ }
2457
+ },
2458
+ "foreignKeys": {},
2459
+ "compositePrimaryKeys": {},
2460
+ "uniqueConstraints": {},
2461
+ "policies": {},
2462
+ "checkConstraints": {},
2463
+ "isRLSEnabled": false
2464
+ },
2465
+ "public.read_tenants": {
2466
+ "name": "read_tenants",
2467
+ "schema": "",
2468
+ "columns": {
2469
+ "id": {
2470
+ "name": "id",
2471
+ "type": "uuid",
2472
+ "primaryKey": true,
2473
+ "notNull": true,
2474
+ "default": "gen_random_uuid()"
2475
+ },
2476
+ "tenant_id": {
2477
+ "name": "tenant_id",
2478
+ "type": "uuid",
2479
+ "primaryKey": false,
2480
+ "notNull": true
2481
+ },
2482
+ "version": {
2483
+ "name": "version",
2484
+ "type": "integer",
2485
+ "primaryKey": false,
2486
+ "notNull": true,
2487
+ "default": 1
2488
+ },
2489
+ "inserted_at": {
2490
+ "name": "inserted_at",
2491
+ "type": "timestamptz",
2492
+ "primaryKey": false,
2493
+ "notNull": true,
2494
+ "default": "now()"
2495
+ },
2496
+ "modified_at": {
2497
+ "name": "modified_at",
2498
+ "type": "timestamptz",
2499
+ "primaryKey": false,
2500
+ "notNull": false
2501
+ },
2502
+ "inserted_by_id": {
2503
+ "name": "inserted_by_id",
2504
+ "type": "text",
2505
+ "primaryKey": false,
2506
+ "notNull": false
2507
+ },
2508
+ "modified_by_id": {
2509
+ "name": "modified_by_id",
2510
+ "type": "text",
2511
+ "primaryKey": false,
2512
+ "notNull": false
2513
+ },
2514
+ "key": {
2515
+ "name": "key",
2516
+ "type": "text",
2517
+ "primaryKey": false,
2518
+ "notNull": true
2519
+ },
2520
+ "name": {
2521
+ "name": "name",
2522
+ "type": "text",
2523
+ "primaryKey": false,
2524
+ "notNull": true
2525
+ },
2526
+ "is_enabled": {
2527
+ "name": "is_enabled",
2528
+ "type": "boolean",
2529
+ "primaryKey": false,
2530
+ "notNull": true,
2531
+ "default": true
2532
+ }
2533
+ },
2534
+ "indexes": {
2535
+ "read_tenants_tenant_id_idx": {
2536
+ "name": "read_tenants_tenant_id_idx",
2537
+ "columns": [
2538
+ {
2539
+ "expression": "tenant_id",
2540
+ "isExpression": false,
2541
+ "asc": true,
2542
+ "nulls": "last"
2543
+ }
2544
+ ],
2545
+ "isUnique": false,
2546
+ "concurrently": false,
2547
+ "method": "btree",
2548
+ "with": {}
2549
+ },
2550
+ "read_tenants_key_unique": {
2551
+ "name": "read_tenants_key_unique",
2552
+ "columns": [
2553
+ {
2554
+ "expression": "key",
2555
+ "isExpression": false,
2556
+ "asc": true,
2557
+ "nulls": "last"
2558
+ }
2559
+ ],
2560
+ "isUnique": true,
2561
+ "concurrently": false,
2562
+ "method": "btree",
2563
+ "with": {}
2564
+ }
2565
+ },
2566
+ "foreignKeys": {},
2567
+ "compositePrimaryKeys": {},
2568
+ "uniqueConstraints": {},
2569
+ "policies": {},
2570
+ "checkConstraints": {},
2571
+ "isRLSEnabled": false
2572
+ },
2573
+ "public.read_text_blocks": {
2574
+ "name": "read_text_blocks",
2575
+ "schema": "",
2576
+ "columns": {
2577
+ "id": {
2578
+ "name": "id",
2579
+ "type": "uuid",
2580
+ "primaryKey": true,
2581
+ "notNull": true,
2582
+ "default": "gen_random_uuid()"
2583
+ },
2584
+ "tenant_id": {
2585
+ "name": "tenant_id",
2586
+ "type": "uuid",
2587
+ "primaryKey": false,
2588
+ "notNull": true
2589
+ },
2590
+ "version": {
2591
+ "name": "version",
2592
+ "type": "integer",
2593
+ "primaryKey": false,
2594
+ "notNull": true,
2595
+ "default": 1
2596
+ },
2597
+ "inserted_at": {
2598
+ "name": "inserted_at",
2599
+ "type": "timestamptz",
2600
+ "primaryKey": false,
2601
+ "notNull": true,
2602
+ "default": "now()"
2603
+ },
2604
+ "modified_at": {
2605
+ "name": "modified_at",
2606
+ "type": "timestamptz",
2607
+ "primaryKey": false,
2608
+ "notNull": false
2609
+ },
2610
+ "inserted_by_id": {
2611
+ "name": "inserted_by_id",
2612
+ "type": "text",
2613
+ "primaryKey": false,
2614
+ "notNull": false
2615
+ },
2616
+ "modified_by_id": {
2617
+ "name": "modified_by_id",
2618
+ "type": "text",
2619
+ "primaryKey": false,
2620
+ "notNull": false
2621
+ },
2622
+ "slug": {
2623
+ "name": "slug",
2624
+ "type": "text",
2625
+ "primaryKey": false,
2626
+ "notNull": true
2627
+ },
2628
+ "lang": {
2629
+ "name": "lang",
2630
+ "type": "text",
2631
+ "primaryKey": false,
2632
+ "notNull": true
2633
+ },
2634
+ "title": {
2635
+ "name": "title",
2636
+ "type": "text",
2637
+ "primaryKey": false,
2638
+ "notNull": true
2639
+ },
2640
+ "body": {
2641
+ "name": "body",
2642
+ "type": "text",
2643
+ "primaryKey": false,
2644
+ "notNull": false
2645
+ },
2646
+ "folder": {
2647
+ "name": "folder",
2648
+ "type": "text",
2649
+ "primaryKey": false,
2650
+ "notNull": false
2651
+ }
2652
+ },
2653
+ "indexes": {
2654
+ "read_text_blocks_tenant_id_idx": {
2655
+ "name": "read_text_blocks_tenant_id_idx",
2656
+ "columns": [
2657
+ {
2658
+ "expression": "tenant_id",
2659
+ "isExpression": false,
2660
+ "asc": true,
2661
+ "nulls": "last"
2662
+ }
2663
+ ],
2664
+ "isUnique": false,
2665
+ "concurrently": false,
2666
+ "method": "btree",
2667
+ "with": {}
2668
+ },
2669
+ "read_text_blocks_unique": {
2670
+ "name": "read_text_blocks_unique",
2671
+ "columns": [
2672
+ {
2673
+ "expression": "tenant_id",
2674
+ "isExpression": false,
2675
+ "asc": true,
2676
+ "nulls": "last"
2677
+ },
2678
+ {
2679
+ "expression": "slug",
2680
+ "isExpression": false,
2681
+ "asc": true,
2682
+ "nulls": "last"
2683
+ },
2684
+ {
2685
+ "expression": "lang",
2686
+ "isExpression": false,
2687
+ "asc": true,
2688
+ "nulls": "last"
2689
+ }
2690
+ ],
2691
+ "isUnique": true,
2692
+ "concurrently": false,
2693
+ "method": "btree",
2694
+ "with": {}
2695
+ }
2696
+ },
2697
+ "foreignKeys": {},
2698
+ "compositePrimaryKeys": {},
2699
+ "uniqueConstraints": {},
2700
+ "policies": {},
2701
+ "checkConstraints": {},
2702
+ "isRLSEnabled": false
2703
+ },
2704
+ "public.read_tier_assignments": {
2705
+ "name": "read_tier_assignments",
2706
+ "schema": "",
2707
+ "columns": {
2708
+ "id": {
2709
+ "name": "id",
2710
+ "type": "uuid",
2711
+ "primaryKey": true,
2712
+ "notNull": true,
2713
+ "default": "gen_random_uuid()"
2714
+ },
2715
+ "tenant_id": {
2716
+ "name": "tenant_id",
2717
+ "type": "uuid",
2718
+ "primaryKey": false,
2719
+ "notNull": true
2720
+ },
2721
+ "version": {
2722
+ "name": "version",
2723
+ "type": "integer",
2724
+ "primaryKey": false,
2725
+ "notNull": true,
2726
+ "default": 1
2727
+ },
2728
+ "inserted_at": {
2729
+ "name": "inserted_at",
2730
+ "type": "timestamptz",
2731
+ "primaryKey": false,
2732
+ "notNull": true,
2733
+ "default": "now()"
2734
+ },
2735
+ "modified_at": {
2736
+ "name": "modified_at",
2737
+ "type": "timestamptz",
2738
+ "primaryKey": false,
2739
+ "notNull": false
2740
+ },
2741
+ "inserted_by_id": {
2742
+ "name": "inserted_by_id",
2743
+ "type": "text",
2744
+ "primaryKey": false,
2745
+ "notNull": false
2746
+ },
2747
+ "modified_by_id": {
2748
+ "name": "modified_by_id",
2749
+ "type": "text",
2750
+ "primaryKey": false,
2751
+ "notNull": false
2752
+ },
2753
+ "tier": {
2754
+ "name": "tier",
2755
+ "type": "text",
2756
+ "primaryKey": false,
2757
+ "notNull": true
2758
+ }
2759
+ },
2760
+ "indexes": {
2761
+ "read_tier_assignments_tenant_id_idx": {
2762
+ "name": "read_tier_assignments_tenant_id_idx",
2763
+ "columns": [
2764
+ {
2765
+ "expression": "tenant_id",
2766
+ "isExpression": false,
2767
+ "asc": true,
2768
+ "nulls": "last"
2769
+ }
2770
+ ],
2771
+ "isUnique": false,
2772
+ "concurrently": false,
2773
+ "method": "btree",
2774
+ "with": {}
2775
+ }
2776
+ },
2777
+ "foreignKeys": {},
2778
+ "compositePrimaryKeys": {},
2779
+ "uniqueConstraints": {},
2780
+ "policies": {},
2781
+ "checkConstraints": {},
2782
+ "isRLSEnabled": false
2783
+ },
2784
+ "public.read_user_sessions": {
2785
+ "name": "read_user_sessions",
2786
+ "schema": "",
2787
+ "columns": {
2788
+ "id": {
2789
+ "name": "id",
2790
+ "type": "uuid",
2791
+ "primaryKey": true,
2792
+ "notNull": true,
2793
+ "default": "gen_random_uuid()"
2794
+ },
2795
+ "tenant_id": {
2796
+ "name": "tenant_id",
2797
+ "type": "text",
2798
+ "primaryKey": false,
2799
+ "notNull": true
2800
+ },
2801
+ "version": {
2802
+ "name": "version",
2803
+ "type": "integer",
2804
+ "primaryKey": false,
2805
+ "notNull": true,
2806
+ "default": 1
2807
+ },
2808
+ "inserted_at": {
2809
+ "name": "inserted_at",
2810
+ "type": "timestamptz",
2811
+ "primaryKey": false,
2812
+ "notNull": true,
2813
+ "default": "now()"
2814
+ },
2815
+ "modified_at": {
2816
+ "name": "modified_at",
2817
+ "type": "timestamptz",
2818
+ "primaryKey": false,
2819
+ "notNull": false
2820
+ },
2821
+ "inserted_by_id": {
2822
+ "name": "inserted_by_id",
2823
+ "type": "text",
2824
+ "primaryKey": false,
2825
+ "notNull": false
2826
+ },
2827
+ "modified_by_id": {
2828
+ "name": "modified_by_id",
2829
+ "type": "text",
2830
+ "primaryKey": false,
2831
+ "notNull": false
2832
+ },
2833
+ "user_id": {
2834
+ "name": "user_id",
2835
+ "type": "text",
2836
+ "primaryKey": false,
2837
+ "notNull": true
2838
+ },
2839
+ "created_at": {
2840
+ "name": "created_at",
2841
+ "type": "timestamptz",
2842
+ "primaryKey": false,
2843
+ "notNull": true
2844
+ },
2845
+ "expires_at": {
2846
+ "name": "expires_at",
2847
+ "type": "timestamptz",
2848
+ "primaryKey": false,
2849
+ "notNull": true
2850
+ },
2851
+ "revoked_at": {
2852
+ "name": "revoked_at",
2853
+ "type": "timestamptz",
2854
+ "primaryKey": false,
2855
+ "notNull": false
2856
+ },
2857
+ "ip": {
2858
+ "name": "ip",
2859
+ "type": "text",
2860
+ "primaryKey": false,
2861
+ "notNull": false
2862
+ },
2863
+ "user_agent": {
2864
+ "name": "user_agent",
2865
+ "type": "text",
2866
+ "primaryKey": false,
2867
+ "notNull": false
2868
+ }
2869
+ },
2870
+ "indexes": {
2871
+ "read_user_sessions_tenant_id_idx": {
2872
+ "name": "read_user_sessions_tenant_id_idx",
2873
+ "columns": [
2874
+ {
2875
+ "expression": "tenant_id",
2876
+ "isExpression": false,
2877
+ "asc": true,
2878
+ "nulls": "last"
2879
+ }
2880
+ ],
2881
+ "isUnique": false,
2882
+ "concurrently": false,
2883
+ "method": "btree",
2884
+ "with": {}
2885
+ }
2886
+ },
2887
+ "foreignKeys": {},
2888
+ "compositePrimaryKeys": {},
2889
+ "uniqueConstraints": {},
2890
+ "policies": {},
2891
+ "checkConstraints": {},
2892
+ "isRLSEnabled": false
2893
+ },
2894
+ "public.read_users": {
2895
+ "name": "read_users",
2896
+ "schema": "",
2897
+ "columns": {
2898
+ "id": {
2899
+ "name": "id",
2900
+ "type": "uuid",
2901
+ "primaryKey": true,
2902
+ "notNull": true,
2903
+ "default": "gen_random_uuid()"
2904
+ },
2905
+ "tenant_id": {
2906
+ "name": "tenant_id",
2907
+ "type": "uuid",
2908
+ "primaryKey": false,
2909
+ "notNull": true
2910
+ },
2911
+ "version": {
2912
+ "name": "version",
2913
+ "type": "integer",
2914
+ "primaryKey": false,
2915
+ "notNull": true,
2916
+ "default": 1
2917
+ },
2918
+ "inserted_at": {
2919
+ "name": "inserted_at",
2920
+ "type": "timestamptz",
2921
+ "primaryKey": false,
2922
+ "notNull": true,
2923
+ "default": "now()"
2924
+ },
2925
+ "modified_at": {
2926
+ "name": "modified_at",
2927
+ "type": "timestamptz",
2928
+ "primaryKey": false,
2929
+ "notNull": false
2930
+ },
2931
+ "inserted_by_id": {
2932
+ "name": "inserted_by_id",
2933
+ "type": "text",
2934
+ "primaryKey": false,
2935
+ "notNull": false
2936
+ },
2937
+ "modified_by_id": {
2938
+ "name": "modified_by_id",
2939
+ "type": "text",
2940
+ "primaryKey": false,
2941
+ "notNull": false
2942
+ },
2943
+ "is_deleted": {
2944
+ "name": "is_deleted",
2945
+ "type": "boolean",
2946
+ "primaryKey": false,
2947
+ "notNull": true,
2948
+ "default": false
2949
+ },
2950
+ "deleted_at": {
2951
+ "name": "deleted_at",
2952
+ "type": "timestamptz",
2953
+ "primaryKey": false,
2954
+ "notNull": false
2955
+ },
2956
+ "deleted_by_id": {
2957
+ "name": "deleted_by_id",
2958
+ "type": "text",
2959
+ "primaryKey": false,
2960
+ "notNull": false
2961
+ },
2962
+ "email": {
2963
+ "name": "email",
2964
+ "type": "text",
2965
+ "primaryKey": false,
2966
+ "notNull": true
2967
+ },
2968
+ "password_hash": {
2969
+ "name": "password_hash",
2970
+ "type": "text",
2971
+ "primaryKey": false,
2972
+ "notNull": false
2973
+ },
2974
+ "display_name": {
2975
+ "name": "display_name",
2976
+ "type": "text",
2977
+ "primaryKey": false,
2978
+ "notNull": true
2979
+ },
2980
+ "locale": {
2981
+ "name": "locale",
2982
+ "type": "text",
2983
+ "primaryKey": false,
2984
+ "notNull": false
2985
+ },
2986
+ "last_active_tenant_id": {
2987
+ "name": "last_active_tenant_id",
2988
+ "type": "text",
2989
+ "primaryKey": false,
2990
+ "notNull": false
2991
+ },
2992
+ "email_verified": {
2993
+ "name": "email_verified",
2994
+ "type": "boolean",
2995
+ "primaryKey": false,
2996
+ "notNull": true,
2997
+ "default": false
2998
+ },
2999
+ "roles": {
3000
+ "name": "roles",
3001
+ "type": "text",
3002
+ "primaryKey": false,
3003
+ "notNull": true,
3004
+ "default": "'[]'"
3005
+ },
3006
+ "status": {
3007
+ "name": "status",
3008
+ "type": "text",
3009
+ "primaryKey": false,
3010
+ "notNull": true
3011
+ },
3012
+ "grace_period_end": {
3013
+ "name": "grace_period_end",
3014
+ "type": "timestamptz",
3015
+ "primaryKey": false,
3016
+ "notNull": false
3017
+ }
3018
+ },
3019
+ "indexes": {
3020
+ "read_users_tenant_id_idx": {
3021
+ "name": "read_users_tenant_id_idx",
3022
+ "columns": [
3023
+ {
3024
+ "expression": "tenant_id",
3025
+ "isExpression": false,
3026
+ "asc": true,
3027
+ "nulls": "last"
3028
+ }
3029
+ ],
3030
+ "isUnique": false,
3031
+ "concurrently": false,
3032
+ "method": "btree",
3033
+ "with": {}
3034
+ }
3035
+ },
3036
+ "foreignKeys": {},
3037
+ "compositePrimaryKeys": {},
3038
+ "uniqueConstraints": {},
3039
+ "policies": {},
3040
+ "checkConstraints": {},
3041
+ "isRLSEnabled": false
3042
+ }
3043
+ },
3044
+ "enums": {},
3045
+ "schemas": {},
3046
+ "sequences": {},
3047
+ "roles": {},
3048
+ "policies": {},
3049
+ "views": {},
3050
+ "_meta": {
3051
+ "columns": {},
3052
+ "schemas": {},
3053
+ "tables": {}
3054
+ }
3055
+ }