better-supabase 0.55.0 → 0.57.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 (400) hide show
  1. package/dist/{agents-CBXJce8J.d.ts → agents-BXjBzFlb.d.ts} +2 -2
  2. package/dist/{ai-schedules-CtwkMJDZ.d.ts → ai-schedules-F9MS-bie.d.ts} +1 -1
  3. package/dist/ai-sdk/agents/index.d.ts +1 -1
  4. package/dist/ai-sdk/workflow/index.d.ts +1 -1
  5. package/dist/{app-tables-BsDmauWB.d.ts → app-tables-DypEnAID.d.ts} +1 -1
  6. package/dist/{authorization-DK7YSiFV.d.ts → authorization-CRKL2OFQ.d.ts} +1 -1
  7. package/dist/{bind-DiGmjHzz.d.ts → bind-DEPqZLwv.d.ts} +3 -3
  8. package/dist/{block-env-BTKZBCL4.d.ts → block-env-CAdE4Q5v.d.ts} +4 -4
  9. package/dist/{block-subjects-BoJrJAgR.js → block-subjects-B9hb1LLk.js} +2 -2
  10. package/dist/{block-tables-B6Jt0mWg.d.ts → block-tables-BATer_QF.d.ts} +1 -1
  11. package/dist/blocks/access-requests/index.d.ts +1 -1
  12. package/dist/blocks/accounting/index.d.ts +1 -1
  13. package/dist/blocks/acknowledgements/index.d.ts +1 -1
  14. package/dist/blocks/activities/index.d.ts +2 -2
  15. package/dist/blocks/advisories/index.d.ts +1 -1
  16. package/dist/blocks/agent-checkout/index.d.ts +1 -1
  17. package/dist/blocks/agents/index.d.ts +1 -1
  18. package/dist/blocks/ai-cache/index.d.ts +1 -1
  19. package/dist/blocks/ai-chat/index.d.ts +1 -1
  20. package/dist/blocks/ai-evals/index.d.ts +1 -1
  21. package/dist/blocks/ai-files/index.d.ts +1 -1
  22. package/dist/blocks/ai-guardrails/index.d.ts +1 -1
  23. package/dist/blocks/ai-keys/index.d.ts +1 -1
  24. package/dist/blocks/ai-schedules/index.d.ts +2 -2
  25. package/dist/blocks/announcements/index.d.ts +4 -4
  26. package/dist/blocks/api-keys/index.d.ts +1 -1
  27. package/dist/blocks/appraisals/index.d.ts +1 -1
  28. package/dist/blocks/approvals/index.d.ts +1 -1
  29. package/dist/blocks/assets/index.d.ts +2 -2
  30. package/dist/blocks/assignment/index.d.ts +1 -1
  31. package/dist/blocks/attachments/index.d.ts +5 -5
  32. package/dist/blocks/audit/index.d.ts +2 -2
  33. package/dist/blocks/automations/index.d.ts +3 -3
  34. package/dist/blocks/banking/index.d.ts +1 -1
  35. package/dist/blocks/billable-time/index.d.ts +1 -1
  36. package/dist/blocks/billing/index.d.ts +2 -2
  37. package/dist/blocks/bookings/index.d.ts +2 -2
  38. package/dist/blocks/bulk/index.d.ts +1 -1
  39. package/dist/blocks/calendar/index.d.ts +3 -3
  40. package/dist/blocks/care/index.d.ts +27 -27
  41. package/dist/blocks/care-plans/index.d.ts +3 -3
  42. package/dist/blocks/cases/index.d.ts +3 -3
  43. package/dist/blocks/catalog/index.d.ts +2 -2
  44. package/dist/blocks/channels/index.d.ts +1 -1
  45. package/dist/blocks/clinical-decision-support/index.d.ts +1 -1
  46. package/dist/blocks/cms/index.d.ts +5 -5
  47. package/dist/blocks/collaboration/index.d.ts +6 -6
  48. package/dist/blocks/collections/index.d.ts +1 -1
  49. package/dist/blocks/comments/index.d.ts +2 -2
  50. package/dist/blocks/commerce/index.d.ts +5 -5
  51. package/dist/blocks/commissions/index.d.ts +1 -1
  52. package/dist/blocks/compliance/index.d.ts +1 -1
  53. package/dist/blocks/connectors/index.d.ts +1 -1
  54. package/dist/blocks/consents/index.d.ts +2 -2
  55. package/dist/blocks/contacts/index.d.ts +2 -2
  56. package/dist/blocks/content/index.d.ts +2 -2
  57. package/dist/blocks/contracts/index.d.ts +1 -1
  58. package/dist/blocks/courses/index.d.ts +3 -3
  59. package/dist/blocks/created-by/index.d.ts +2 -2
  60. package/dist/blocks/crm/index.d.ts +16 -16
  61. package/dist/blocks/custom-fields/index.d.ts +1 -1
  62. package/dist/blocks/dam/index.d.ts +2 -2
  63. package/dist/blocks/data-lifecycle/index.d.ts +2 -2
  64. package/dist/blocks/deadlines/index.d.ts +249 -43
  65. package/dist/blocks/deadlines/index.js +862 -20
  66. package/dist/blocks/deals/index.d.ts +1 -1
  67. package/dist/blocks/dispatch/index.d.ts +2 -2
  68. package/dist/blocks/document-templates/index.d.ts +2 -2
  69. package/dist/blocks/documents/index.d.ts +1 -1
  70. package/dist/blocks/domains/index.d.ts +1 -1
  71. package/dist/blocks/donations/index.d.ts +1 -1
  72. package/dist/blocks/drive/index.d.ts +5 -5
  73. package/dist/blocks/e-prescribing/index.d.ts +1 -1
  74. package/dist/blocks/employees/index.d.ts +1 -1
  75. package/dist/blocks/enrichment/index.d.ts +1 -1
  76. package/dist/blocks/enrollments/index.d.ts +2 -2
  77. package/dist/blocks/entitlements/index.d.ts +3 -3
  78. package/dist/blocks/events/index.d.ts +3 -3
  79. package/dist/blocks/expenses/index.d.ts +1 -1
  80. package/dist/blocks/field-history/index.d.ts +1 -1
  81. package/dist/blocks/filespace/index.d.ts +8 -8
  82. package/dist/blocks/finance/index.d.ts +5 -5
  83. package/dist/blocks/flags/index.d.ts +1 -1
  84. package/dist/blocks/forecasts/index.d.ts +1 -1
  85. package/dist/blocks/forms/index.d.ts +3 -3
  86. package/dist/blocks/funding/index.d.ts +2 -2
  87. package/dist/blocks/goals/index.d.ts +1 -1
  88. package/dist/blocks/governance/index.d.ts +4 -4
  89. package/dist/blocks/guests/index.d.ts +1 -1
  90. package/dist/blocks/hiring/index.d.ts +1 -1
  91. package/dist/blocks/identities/index.d.ts +1 -1
  92. package/dist/blocks/imports/index.d.ts +2 -2
  93. package/dist/blocks/inbox/index.d.ts +6 -6
  94. package/dist/blocks/incidents/index.d.ts +1 -1
  95. package/dist/blocks/index.d.ts +3 -3
  96. package/dist/blocks/inspections/index.d.ts +2 -2
  97. package/dist/blocks/inventory/index.d.ts +1 -1
  98. package/dist/blocks/invoices/index.d.ts +1 -1
  99. package/dist/blocks/knowledge/index.d.ts +1 -1
  100. package/dist/blocks/lead-scoring/index.d.ts +2 -2
  101. package/dist/blocks/learning/index.d.ts +3 -3
  102. package/dist/blocks/leases/index.d.ts +1 -1
  103. package/dist/blocks/leave/index.d.ts +1 -1
  104. package/dist/blocks/ledger/index.d.ts +1 -1
  105. package/dist/blocks/legal-entities/index.d.ts +2 -2
  106. package/dist/blocks/lims/index.d.ts +2 -2
  107. package/dist/blocks/mail-sync/index.d.ts +3 -3
  108. package/dist/blocks/maintenance/index.d.ts +2 -2
  109. package/dist/blocks/manufacturing/index.d.ts +2 -2
  110. package/dist/blocks/medications/index.d.ts +1 -1
  111. package/dist/blocks/meetings/index.d.ts +3 -3
  112. package/dist/blocks/memberships/index.d.ts +2 -2
  113. package/dist/blocks/memory/index.d.ts +1 -1
  114. package/dist/blocks/messaging/index.d.ts +5 -5
  115. package/dist/blocks/metrics/index.d.ts +1 -1
  116. package/dist/blocks/mfa/index.d.ts +2 -2
  117. package/dist/blocks/moderation/index.d.ts +2 -2
  118. package/dist/blocks/notifications/index.d.ts +5 -5
  119. package/dist/blocks/numbering/index.d.ts +1 -1
  120. package/dist/blocks/oauth-server/index.d.ts +1 -1
  121. package/dist/blocks/observations/index.d.ts +2 -2
  122. package/dist/blocks/onboarding/index.d.ts +2 -2
  123. package/dist/blocks/option-sets/index.d.ts +2 -2
  124. package/dist/blocks/orders/index.d.ts +1 -1
  125. package/dist/blocks/organizations/index.d.ts +2 -2
  126. package/dist/blocks/outbox/index.d.ts +1 -1
  127. package/dist/blocks/passes/index.d.ts +2 -2
  128. package/dist/blocks/payroll-export/index.d.ts +2 -2
  129. package/dist/blocks/people/index.d.ts +7 -7
  130. package/dist/blocks/periods/index.d.ts +1 -1
  131. package/dist/blocks/permissions/index.d.ts +3 -3
  132. package/dist/blocks/pipelines/index.d.ts +1 -1
  133. package/dist/blocks/posts/index.d.ts +2 -2
  134. package/dist/blocks/procurement/index.d.ts +5 -5
  135. package/dist/blocks/profiles/index.d.ts +1 -1
  136. package/dist/blocks/projects/index.d.ts +7 -7
  137. package/dist/blocks/promotions/index.d.ts +1 -1
  138. package/dist/blocks/prompts/index.d.ts +1 -1
  139. package/dist/blocks/push/index.d.ts +2 -2
  140. package/dist/blocks/qualifications/index.d.ts +2 -2
  141. package/dist/blocks/queue/index.d.ts +2 -2
  142. package/dist/blocks/quotes/index.d.ts +1 -1
  143. package/dist/blocks/rank/index.d.ts +1 -1
  144. package/dist/blocks/reactions/index.d.ts +4 -4
  145. package/dist/blocks/recruiting/index.d.ts +4 -4
  146. package/dist/blocks/referrals/index.d.ts +1 -1
  147. package/dist/blocks/relations/index.d.ts +1 -1
  148. package/dist/blocks/reminders/index.d.ts +1 -1
  149. package/dist/blocks/reviews/index.d.ts +1 -1
  150. package/dist/blocks/rfqs/index.d.ts +2 -2
  151. package/dist/blocks/risks/index.d.ts +2 -2
  152. package/dist/blocks/saas/index.d.ts +12 -12
  153. package/dist/blocks/sales/index.d.ts +1 -1
  154. package/dist/blocks/saved-views/index.d.ts +2 -2
  155. package/dist/blocks/scheduling/index.d.ts +4 -4
  156. package/dist/blocks/scores/index.d.ts +2 -2
  157. package/dist/blocks/search/index.d.ts +3 -3
  158. package/dist/blocks/security-events/index.d.ts +1 -1
  159. package/dist/blocks/segments/index.d.ts +2 -2
  160. package/dist/blocks/sequences/index.d.ts +3 -3
  161. package/dist/blocks/service/index.d.ts +7 -7
  162. package/dist/blocks/service-accounts/index.d.ts +1 -1
  163. package/dist/blocks/sessions/index.d.ts +2 -2
  164. package/dist/blocks/settings/index.d.ts +2 -2
  165. package/dist/blocks/share-links/index.d.ts +1 -1
  166. package/dist/blocks/shifts/index.d.ts +2 -2
  167. package/dist/blocks/shipments/index.d.ts +2 -2
  168. package/dist/blocks/signatures/index.d.ts +2 -2
  169. package/dist/blocks/signing-keys/index.d.ts +1 -1
  170. package/dist/blocks/sla/index.d.ts +1 -1
  171. package/dist/blocks/sso/index.d.ts +1 -1
  172. package/dist/blocks/state-machine/index.d.ts +1 -1
  173. package/dist/blocks/subjects/index.d.ts +2 -2
  174. package/dist/blocks/support/index.d.ts +5 -5
  175. package/dist/blocks/tags/index.d.ts +2 -2
  176. package/dist/blocks/tasks/index.d.ts +2 -2
  177. package/dist/blocks/tax/index.d.ts +2 -2
  178. package/dist/blocks/teams/index.d.ts +1 -1
  179. package/dist/blocks/templates/index.d.ts +1 -1
  180. package/dist/blocks/tills/index.d.ts +1 -1
  181. package/dist/blocks/time-tracking/index.d.ts +2 -2
  182. package/dist/blocks/timeline/index.d.ts +1 -1
  183. package/dist/blocks/trash/index.d.ts +1 -1
  184. package/dist/blocks/undo/index.d.ts +2 -2
  185. package/dist/blocks/updated-at/index.d.ts +2 -2
  186. package/dist/blocks/usage/index.d.ts +2 -2
  187. package/dist/blocks/vercel-marketplace/index.d.ts +1 -1
  188. package/dist/blocks/versions/index.d.ts +1 -1
  189. package/dist/blocks/waitlist/index.d.ts +1 -1
  190. package/dist/blocks/warehouse/index.d.ts +1 -1
  191. package/dist/blocks/webhooks/index.d.ts +1 -1
  192. package/dist/blocks/workflow-editor/index.d.ts +4 -4
  193. package/dist/blocks/workflows/index.d.ts +4 -4
  194. package/dist/{blocks-2HFgUcqG.d.ts → blocks-Cf2U_jmO.d.ts} +4 -4
  195. package/dist/claims/index.d.ts +3 -3
  196. package/dist/cli/{add-LvxZ-JNB.js → add-CB2nU8nW.js} +2 -2
  197. package/dist/cli/{add-BnYh-Kpy.js → add-DQXg3MLt.js} +10 -10
  198. package/dist/cli/add-DWUCeKIl.js +1 -0
  199. package/dist/cli/{app-table-files-7M0I9LaE.js → app-table-files-Ch3GTFjg.js} +2 -2
  200. package/dist/cli/{app-tables-BfWPWiOJ.js → app-tables-CwSpV4yV.js} +2 -2
  201. package/dist/cli/{backfill-i0Tx24Sa.js → backfill-Cngd3Ax2.js} +1 -1
  202. package/dist/cli/bin.js +1 -1
  203. package/dist/cli/{blocks-C_7ioBdJ.js → blocks--hf8elE7.js} +1 -1
  204. package/dist/cli/{blocks-X_eD_t_f.js → blocks-BGHYZGoh.js} +1 -1
  205. package/dist/cli/{cache-D98rjB1C.js → cache-DMqncCOE.js} +1 -1
  206. package/dist/cli/{codemod-j1nCkgA5.js → codemod-BrNMM9qN.js} +1 -1
  207. package/dist/cli/{content-mapper-UsLt4y0J.js → content-mapper-CBBnca0p.js} +2 -2
  208. package/dist/cli/{doctor-BYJM72wi.js → doctor-BHsw2SGl.js} +15 -15
  209. package/dist/cli/{gen-D47t5jj3.js → gen-BbLeZxhv.js} +11 -11
  210. package/dist/cli/index.d.ts +1 -1
  211. package/dist/cli/index.js +6 -6
  212. package/dist/cli/{init-CAWeLXCs.js → init-DH0LI0hx.js} +9 -9
  213. package/dist/cli/{live-DNd8MMNk.js → live-DFlCT5Uk.js} +2 -2
  214. package/dist/cli/{mcp-BUs7M6fq.js → mcp-B9ZwlZrA.js} +2 -2
  215. package/dist/cli/{metadata-UwEYCntC.js → metadata-DmXQDGq9.js} +3 -3
  216. package/dist/cli/{migrate-D-GzXR4D.js → migrate-DG4_cemN.js} +1 -1
  217. package/dist/cli/{migration-safety-Cg9jf2s-.js → migration-safety-CMvBM2Vi.js} +1 -1
  218. package/dist/cli/{migrations-Bhcf7MHM.js → migrations-B88uNBtB.js} +2 -2
  219. package/dist/cli/{module-migration-BJaOdOWy.js → module-migration-CrVdvTsm.js} +2 -2
  220. package/dist/cli/{powersync-DQKdjG_K.js → powersync-CiWMuRwt.js} +3 -3
  221. package/dist/cli/powersync-TFSmK9XH.js +1 -0
  222. package/dist/cli/{print-B1onZWRG.js → print-DJtwCt5U.js} +2 -2
  223. package/dist/cli/{providers-M7s8btf1.js → providers-CN8w11Yf.js} +1 -1
  224. package/dist/cli/{prune-workflows-BiRF1YBZ.js → prune-workflows-Bwzd1_z4.js} +1 -1
  225. package/dist/cli/{remove-BHyzqWNm.js → remove-D4fXl2zz.js} +6 -6
  226. package/dist/cli/{render-DDCy_0V_.js → render-Fafpgh5a.js} +3 -3
  227. package/dist/cli/{run-DDUBMkbN.js → run-BM4C0L-r.js} +9 -9
  228. package/dist/cli/{run-Csm1-Uto.js → run-du7PclzJ.js} +31 -31
  229. package/dist/cli/{shared-Cv22MEAO.js → shared-l0oG47Rc.js} +1 -1
  230. package/dist/cli/{snapshot-9xnSt525.js → snapshot-DAVFBIVQ.js} +2 -2
  231. package/dist/cli/{source-B_miugrh.js → source-CfPOobxZ.js} +1 -1
  232. package/dist/cli/{spec-dYLJbr9J.js → spec-DCSih_mA.js} +2 -2
  233. package/dist/cli/{spec-BeAgQ-of.js → spec-Dlbmh0EH.js} +1 -1
  234. package/dist/cli/{sql-layout-3YU4941N.js → sql-layout-DpCFWUnX.js} +2 -2
  235. package/dist/cli/{sync-Bfwk4Ldc.js → sync-3LMoCI1x.js} +4 -4
  236. package/dist/cli/{upgrade-BMrkzAcD.js → upgrade-4A6oQN-6.js} +5 -5
  237. package/dist/cli/{upgrade-DRvMFW2T.js → upgrade-DyE_4LAn.js} +2 -2
  238. package/dist/cli/{version-BXjNETWS.js → version-DaV4RlVP.js} +1 -1
  239. package/dist/client/index.d.ts +5 -5
  240. package/dist/client/native/index.d.ts +4 -4
  241. package/dist/config/index.d.ts +4 -4
  242. package/dist/config/index.js +4 -4
  243. package/dist/{config-CsX2THwJ.js → config-Bx3UYp8b.js} +3 -3
  244. package/dist/{config-Dgl6AxKE.js → config-CAjlOSQY.js} +1 -1
  245. package/dist/{context-DSJpfeVv.d.ts → context-C3-QkbC2.d.ts} +3 -3
  246. package/dist/contract/index.d.ts +3 -3
  247. package/dist/{controller-BVee4yX8.d.ts → controller-6_Uo4WEe.d.ts} +1 -1
  248. package/dist/{conversion-BPkWkVoa.d.ts → conversion-kJKGDyKY.d.ts} +1 -1
  249. package/dist/create/index.d.ts +4 -4
  250. package/dist/create/index.js +3 -3
  251. package/dist/create/lite/index.d.ts +3 -3
  252. package/dist/create/lite/index.js +2 -2
  253. package/dist/deadlines-values-vmaCCdGl.js +92 -0
  254. package/dist/{define-block-Cu67KCN1.d.ts → define-block-Dle1hNrI.d.ts} +1 -1
  255. package/dist/{drive-D008IDpI.d.ts → drive-C2EYvBxH.d.ts} +1 -1
  256. package/dist/{entitlements-CRBZg5y2.d.ts → entitlements-Bb-dOARS.d.ts} +1 -1
  257. package/dist/{extract-BU5w3k5s.d.ts → extract-BwhGjyWJ.d.ts} +1 -1
  258. package/dist/{field-errors-CjEgbjO9.d.ts → field-errors-CjEfOrH1.d.ts} +5 -5
  259. package/dist/{index-voglIa16.d.ts → index-2gyZE8Rf.d.ts} +3 -3
  260. package/dist/{index-CDEzb5bl.d.ts → index-B5Qh7kMt.d.ts} +1 -1
  261. package/dist/{index-DhS8Qkgj.d.ts → index-BE4JTKF9.d.ts} +2 -2
  262. package/dist/{index-DYzQ_PPW.d.ts → index-BEmlle8t.d.ts} +1 -1
  263. package/dist/{index-BDn4Mqq0.d.ts → index-BEtCBklB.d.ts} +1 -1
  264. package/dist/{index-AmPcMT_X.d.ts → index-BY1YQVSU.d.ts} +1 -1
  265. package/dist/{index-Dyq6B4gZ.d.ts → index-BYV1G4-b.d.ts} +2 -2
  266. package/dist/{index-DZRsTCds.d.ts → index-BjIGMnQ0.d.ts} +1 -1
  267. package/dist/{index-CKdNndE3.d.ts → index-BqD3Iu_J.d.ts} +2 -2
  268. package/dist/{index-BTl5A8Aj.d.ts → index-BqJum_h9.d.ts} +1 -1
  269. package/dist/{index-DtMdKIJU.d.ts → index-Buxrux0m.d.ts} +2 -2
  270. package/dist/{index-DR4P3Lf9.d.ts → index-BzrihVGI.d.ts} +2 -2
  271. package/dist/{index-BeU2DRAI.d.ts → index-C8S7_Q8r.d.ts} +1 -1
  272. package/dist/{index-r3QZBY7z.d.ts → index-CC34bHDQ.d.ts} +1 -1
  273. package/dist/{index-_RnZChF8.d.ts → index-CN3C6JkR.d.ts} +1 -1
  274. package/dist/{index-CaW37FHZ.d.ts → index-CNuolr9n.d.ts} +1 -1
  275. package/dist/{index-DJ1Uk4ff.d.ts → index-COIhSgY7.d.ts} +4 -4
  276. package/dist/{index-BOZ6AsMs.d.ts → index-Cg7SR_qX.d.ts} +1 -1
  277. package/dist/{index-BvPirjfD.d.ts → index-Cm8MeW9i.d.ts} +4 -4
  278. package/dist/{index-ChaJiMkI.d.ts → index-CwPttFTz.d.ts} +2 -2
  279. package/dist/{index-u8EXkOzJ.d.ts → index-D1O-RJWe.d.ts} +1 -1
  280. package/dist/{index-BleHtlJ6.d.ts → index-D9nVD78s.d.ts} +1 -1
  281. package/dist/{index-dMGEJLxl.d.ts → index-DBFr7a8o.d.ts} +1 -1
  282. package/dist/{index-BVJsz3pS.d.ts → index-DOfmW2AH.d.ts} +2 -2
  283. package/dist/{index-D5nY5k-2.d.ts → index-DSAikYZQ.d.ts} +7 -7
  284. package/dist/{index-D-3fZP5z.d.ts → index-DbCYIGAY.d.ts} +1 -1
  285. package/dist/{index--7HXH_H_.d.ts → index-DdMcDiIK.d.ts} +2 -2
  286. package/dist/{index-DsA7MQwZ.d.ts → index-Ddo11etS.d.ts} +1 -1
  287. package/dist/{index-BR8ZkijS.d.ts → index-DugPUkCG.d.ts} +2 -2
  288. package/dist/{index-BoCyVsCr.d.ts → index-DwDtMCDt.d.ts} +1 -1
  289. package/dist/{index-_wr8wCe9.d.ts → index-Dx6jNpfl.d.ts} +1 -1
  290. package/dist/{index-D7zwaGAP.d.ts → index-Dxza7aew.d.ts} +1 -1
  291. package/dist/{index-ilxdL8pz.d.ts → index-NzTBsdNG.d.ts} +1 -1
  292. package/dist/{index-DDDHYXtr.d.ts → index-U2_mkKvZ.d.ts} +8 -8
  293. package/dist/{index-JzAR_Y7n.d.ts → index-bTW0dRZY.d.ts} +3 -3
  294. package/dist/{index-E_Q5L9PV.d.ts → index-hctpn1Mt.d.ts} +1 -1
  295. package/dist/{index-slG4UpF_.d.ts → index-yL19hBMN.d.ts} +2 -2
  296. package/dist/{instances-BMjIO6Xu.js → instances-z6DJn2Gr.js} +20 -1
  297. package/dist/{manifest-CbKgs5qA.d.ts → manifest-2z4m-cwI.d.ts} +1 -1
  298. package/dist/{manifest-CoFpa0dN.d.ts → manifest-64Zd4QzL.d.ts} +1 -1
  299. package/dist/{manifest-DhpmWh55.d.ts → manifest-9tZFwb_N.d.ts} +1 -1
  300. package/dist/{manifest-BZL2TAB1.d.ts → manifest-B0-5rKJ_.d.ts} +1 -1
  301. package/dist/{manifest-CELTce26.d.ts → manifest-B0ByrOJ2.d.ts} +1 -1
  302. package/dist/{manifest-CGZQ9lU3.d.ts → manifest-B4yf2Fir.d.ts} +1 -1
  303. package/dist/{manifest-D2Z_2z9-.d.ts → manifest-BBETqrI-.d.ts} +1 -1
  304. package/dist/{manifest-CMnLDDS3.d.ts → manifest-BEFiuvqo.d.ts} +1 -1
  305. package/dist/{manifest-BE7UwezO.d.ts → manifest-BG6K9qvU.d.ts} +1 -1
  306. package/dist/{manifest-6PhMgCFi.d.ts → manifest-BOkGzZcG.d.ts} +1 -1
  307. package/dist/{manifest-BzsuqiQx.d.ts → manifest-BReV7Ehb.d.ts} +1 -1
  308. package/dist/{manifest-CdD44xlg.d.ts → manifest-BSmnJW4X.d.ts} +1 -1
  309. package/dist/{manifest-DYPVnKW_.d.ts → manifest-BV8_wZab.d.ts} +1 -1
  310. package/dist/{manifest-xikzppm9.d.ts → manifest-BXvY6i0C.d.ts} +1 -1
  311. package/dist/{manifest-lzwWCAYV.d.ts → manifest-BbUa_z3D.d.ts} +1 -1
  312. package/dist/{manifest-Eazz96as.d.ts → manifest-BcurR7jz.d.ts} +1 -1
  313. package/dist/{manifest-BknZ4yQ-.d.ts → manifest-BfWK-zw_.d.ts} +1 -1
  314. package/dist/{manifest-Dk_7prKx.d.ts → manifest-Bl4kFo6c.d.ts} +1 -1
  315. package/dist/{manifest-CSHNTEJZ.d.ts → manifest-Bsr9SSG5.d.ts} +1 -1
  316. package/dist/{manifest-DxPLHyKY.d.ts → manifest-BtI5HhXk.d.ts} +1 -1
  317. package/dist/{manifest-BMNwdO5D.d.ts → manifest-BxY9kn1w.d.ts} +1 -1
  318. package/dist/{manifest-BSvxbZH5.d.ts → manifest-C2QmAn2x.d.ts} +1 -1
  319. package/dist/{manifest-DhXoSaUC.d.ts → manifest-C5CZYXC2.d.ts} +1 -1
  320. package/dist/{manifest-Bz0EjE76.d.ts → manifest-C9PoeugH.d.ts} +1 -1
  321. package/dist/{manifest-DwCorUVJ.d.ts → manifest-C9x5lxeF.d.ts} +1 -1
  322. package/dist/{manifest-CaA-2HPK.d.ts → manifest-CKAtEVtk.d.ts} +1 -1
  323. package/dist/{manifest-C_dVunWg.d.ts → manifest-CVQ3q-JJ.d.ts} +1 -1
  324. package/dist/{manifest-BYbt4y_O.d.ts → manifest-CWKtnWcS.d.ts} +1 -1
  325. package/dist/{manifest-Dl_bw4IU.d.ts → manifest-CchgUbRg.d.ts} +1 -1
  326. package/dist/{manifest-auanzyjB.d.ts → manifest-Cjt5fW9U.d.ts} +1 -1
  327. package/dist/{manifest-Bp0oZ3-W.d.ts → manifest-CuuE9u0c.d.ts} +1 -1
  328. package/dist/{manifest-D7mliM-d.d.ts → manifest-D23v7_Fg.d.ts} +1 -1
  329. package/dist/{manifest-CGcGylmw.d.ts → manifest-D9fWfK2i.d.ts} +1 -1
  330. package/dist/{manifest-DMvx2rWH.d.ts → manifest-DGHeP3gy.d.ts} +1 -1
  331. package/dist/{manifest-DGiswyG5.d.ts → manifest-DGePKO35.d.ts} +1 -1
  332. package/dist/{manifest-gGFtQDJz.d.ts → manifest-DHAShiq8.d.ts} +1 -1
  333. package/dist/{manifest-DPqKZgWn.d.ts → manifest-DPSgN4LB.d.ts} +1 -1
  334. package/dist/{manifest-D2d1wS7g.d.ts → manifest-DPeSW0P5.d.ts} +1 -1
  335. package/dist/{manifest-CBwrN4Nf.d.ts → manifest-DT4l91L_.d.ts} +1 -1
  336. package/dist/{manifest-Pl5us_yz.d.ts → manifest-DUA64Tnn.d.ts} +1 -1
  337. package/dist/{manifest-DUlZ8qck.d.ts → manifest-DVBfzRly.d.ts} +1 -1
  338. package/dist/{manifest-uIIb_YLI.d.ts → manifest-DXuOYu6Q.d.ts} +1 -1
  339. package/dist/{manifest-Df1QDhiQ.d.ts → manifest-D_AT0kqo.d.ts} +1 -1
  340. package/dist/{manifest-B4CEdcH_.d.ts → manifest-D_aJ09Il.d.ts} +1 -1
  341. package/dist/{manifest-D_VmA0aC.d.ts → manifest-D_kxP0yH.d.ts} +1 -1
  342. package/dist/{manifest-X4analSK.d.ts → manifest-DgtO2rew.d.ts} +1 -1
  343. package/dist/{manifest-DG0oDOmq.d.ts → manifest-DiKKpytg.d.ts} +1 -1
  344. package/dist/{manifest-BVjhJ3Mj.d.ts → manifest-DlWg4mC8.d.ts} +1 -1
  345. package/dist/{manifest-DAXz8rxB.d.ts → manifest-DlyGRc_x.d.ts} +1 -1
  346. package/dist/{manifest-BB3GjGa3.d.ts → manifest-DreoW4xj.d.ts} +1 -1
  347. package/dist/{manifest-Dc8pNExY.d.ts → manifest-Gwsis09w.d.ts} +1 -1
  348. package/dist/{manifest-CWj5SFuw.d.ts → manifest-K1yCH7Ai.d.ts} +1 -1
  349. package/dist/{manifest-DtEcJBdE.d.ts → manifest-TSUBAvih.d.ts} +1 -1
  350. package/dist/{manifest-DsuoLp-Y.d.ts → manifest-WuPrNtWh.d.ts} +1 -1
  351. package/dist/{manifest-yKx0faak.d.ts → manifest-b1ei2NBj.d.ts} +1 -1
  352. package/dist/{manifest-BXxSqnLS.d.ts → manifest-byZwzlAG.d.ts} +1 -1
  353. package/dist/{manifest-D9P9Yhe3.d.ts → manifest-fUQWT0ft.d.ts} +1 -1
  354. package/dist/{manifest-DGLrMEdB.d.ts → manifest-hrX9Hsgd.d.ts} +1 -1
  355. package/dist/{manifest-D0FjVeay.d.ts → manifest-iRyMyb7t.d.ts} +1 -1
  356. package/dist/{manifest-B17Sra5h.d.ts → manifest-r5iVaZrT.d.ts} +1 -1
  357. package/dist/{manifest-DIZ6chpf.d.ts → manifest-xVl_34TT.d.ts} +1 -1
  358. package/dist/{manifest-CMNPpmWS.d.ts → manifest-yUJGXgsd.d.ts} +2 -2
  359. package/dist/mapper/bin.js +5 -5
  360. package/dist/mcp/index.d.ts +1 -1
  361. package/dist/next/index.d.ts +7 -7
  362. package/dist/{operations-DKfYeS5z.d.ts → operations-DvIB3N20.d.ts} +1 -1
  363. package/dist/otel/index.js +4 -4
  364. package/dist/{permissions-C5h1cU25.d.ts → permissions-CtS73Ot8.d.ts} +1 -1
  365. package/dist/{ports-DvaVv_3b.d.ts → ports-D_z0B0OU.d.ts} +1 -1
  366. package/dist/powersync/index.d.ts +2 -2
  367. package/dist/preset/index.d.ts +4 -4
  368. package/dist/preset/index.js +3 -3
  369. package/dist/{preset-Cl3Q5ASC.js → preset-CPUA9haY.js} +3 -3
  370. package/dist/{preview-Bwg7r1Lf.d.ts → preview-B0MvbKqQ.d.ts} +2 -2
  371. package/dist/{project-At5wBJSS.js → project-CMRUh_6Z.js} +5 -5
  372. package/dist/{push-token-C6ZGE1g0.d.ts → push-token--jdbVbWv.d.ts} +1 -1
  373. package/dist/query/index.d.ts +1 -1
  374. package/dist/react/index.d.ts +5 -5
  375. package/dist/react/native/index.d.ts +1 -1
  376. package/dist/react/server.d.ts +5 -5
  377. package/dist/realtime/index.d.ts +3 -3
  378. package/dist/{record-form-DTncyqVH.d.ts → record-form-Bb3mf114.d.ts} +1 -1
  379. package/dist/records/index.d.ts +7 -7
  380. package/dist/server/index.d.ts +3 -3
  381. package/dist/solid/index.d.ts +5 -5
  382. package/dist/sql/index.d.ts +5 -5
  383. package/dist/sql/index.js +2 -2
  384. package/dist/{sql-CdZdPqjA.js → sql-DXME28Gr.js} +1560 -264
  385. package/dist/ssr/index.d.ts +1 -1
  386. package/dist/svelte/index.d.ts +5 -5
  387. package/dist/{tenant-BTnwa5oZ.d.ts → tenant-sm9d_APF.d.ts} +1 -1
  388. package/dist/testing/index.d.ts +6 -6
  389. package/dist/testing/index.js +1 -1
  390. package/dist/{timeline-B7kBQ1gh.d.ts → timeline-BR-oKhI4.d.ts} +2 -2
  391. package/dist/{topic-hu0RP7CG.d.ts → topic-CBTgUy6t.d.ts} +1 -1
  392. package/dist/{types-DvglaQ_D.d.ts → types-DRNzKqdm.d.ts} +2 -2
  393. package/dist/vue/index.d.ts +5 -5
  394. package/dist/{watch-topic-C_rGHxIA.d.ts → watch-topic-DYDnWH_a.d.ts} +1 -1
  395. package/dist/webmcp/index.d.ts +1 -1
  396. package/dist/yjs/index.d.ts +1 -1
  397. package/package.json +1 -1
  398. package/dist/cli/add-D0TUMxXn.js +0 -1
  399. package/dist/cli/powersync-Bn-u0TGP.js +0 -1
  400. package/dist/deadlines-values-B7ArpVJU.js +0 -127
@@ -4,19 +4,34 @@ import { n as Logger } from "../../logger-0LfhvwE4.js";
4
4
  import { t as AsyncResult } from "../../result-CMqlHv82.js";
5
5
  import { n as BlockOptions } from "../../block-helpers-rTsuHt6v.js";
6
6
  import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CP4wAHU-.js";
7
- import { c as BlockOf } from "../../define-block-Cu67KCN1.js";
7
+ import { c as BlockOf } from "../../define-block-Dle1hNrI.js";
8
8
  import { Dt as Events } from "../../events-DN9PAcjq.js";
9
9
  /** The states of a version of a rule set. */
10
10
  declare const RULE_VERSION_STATUSES: readonly ["draft", "approved"];
11
- /** What a deadline row holds: a date, or the facts it still waits for. */
12
- declare const DEADLINE_RESULTS: readonly ["due", "unknown"];
11
+ /** What one group of a rule set version yields for a subject. */
12
+ declare const DEADLINE_RESULTS: readonly ["due", "unknown", "pending", "undated", "not_covered", "not_applicable", "not_required", "barred"];
13
+ type DeadlineResult = (typeof DEADLINE_RESULTS)[number];
13
14
  /** Where a deadline stands: pending until an action satisfies it. */
14
15
  declare const DEADLINE_STATES: readonly ["pending", "satisfied"];
15
16
  declare const OFFSET_UNITS: readonly ["days", "business_days", "months"];
16
17
  type OffsetUnit = (typeof OFFSET_UNITS)[number];
17
- /** How a date that lands on a weekend moves. */
18
+ /** How a date that lands on a non-business day moves after the roll. */
18
19
  declare const DEADLINE_ADJUSTMENTS: readonly ["none", "next_business_day", "previous_business_day"];
19
20
  type DeadlineAdjustment = (typeof DEADLINE_ADJUSTMENTS)[number];
21
+ /** The approval state of a rule, an exception or a counting block. */
22
+ declare const PART_STATUSES: readonly ["approved", "draft", "review_required"];
23
+ type PartStatus = (typeof PART_STATUSES)[number];
24
+ /** What a settled exception decides; `review_required` never decides. */
25
+ declare const EXCEPTION_RESULTS: readonly ["barred", "not_applicable", "not_required", "review_required"];
26
+ /** The days a counting block can roll a last day past. */
27
+ declare const ROLL_DAYS: readonly ["saturday", "sunday", "holiday"];
28
+ type RollDay = (typeof ROLL_DAYS)[number];
29
+ declare const WEEKDAYS: readonly ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"];
30
+ type Weekday = (typeof WEEKDAYS)[number];
31
+ /** The listed day an observed shift reads. */
32
+ declare const OBSERVED_FALLS_ON: readonly ["saturday", "sunday", "other_than_sunday"];
33
+ /** Where an observed shift moves a holiday, strictly before or after it. */
34
+ declare const OBSERVED_MOVES: readonly ["preceding_friday", "following_monday", "preceding_sunday", "following_sunday"];
20
35
  /** Where a rule comes from. */
21
36
  interface DeadlineCitation {
22
37
  /** A statute or regulation reference, such as `Section 12(3)`. */
@@ -25,31 +40,182 @@ interface DeadlineCitation {
25
40
  /** The quoted text the rule follows. */
26
41
  readonly text?: string;
27
42
  }
28
- /** One rule: a date computed from an anchor fact. */
43
+ /**
44
+ * One condition value: equals for a string or a boolean, any of for a list of
45
+ * codes, and the existence of the fact for `present` or `absent`.
46
+ */
47
+ type ConditionValue = string | boolean | readonly string[];
48
+ /** An AND of entries, keyed by fact name. */
49
+ type Condition = Readonly<Record<string, ConditionValue>>;
50
+ /** A date regime: the fact's date is on or after `from` and before `before`. */
51
+ interface DateRegime {
52
+ readonly from?: string;
53
+ readonly before?: string;
54
+ }
55
+ /**
56
+ * What selects a rule: a list of codes per fact, `present` or `absent`, and at
57
+ * most one date regime.
58
+ */
59
+ type Applies = Readonly<Record<string, ConditionValue | DateRegime>>;
60
+ /** One count: `n` units from a fact's date, or before it. */
61
+ interface DeadlineCount {
62
+ /** Required unless the count is `before` a fact without one ("on or before"). */
63
+ readonly n?: number;
64
+ /** Required with `n`. */
65
+ readonly unit?: OffsetUnit;
66
+ /** Exactly one of `from` and `before` names the fact the count reads. */
67
+ readonly from?: string;
68
+ readonly before?: string;
69
+ /** With `months`: the day of the target month, clamped to its last day. */
70
+ readonly day_of_month?: number;
71
+ /** One deadline per furnishing month, each counted from the first of it. */
72
+ readonly each?: "furnishing_month";
73
+ }
74
+ /** A rule's deadline: none, one count, or a combinator of two or more. */
75
+ type DeadlineSpec = "none" | DeadlineCount | {
76
+ readonly first_of: readonly DeadlineCount[];
77
+ } | {
78
+ readonly earlier_of: readonly DeadlineCount[];
79
+ } | {
80
+ readonly later_of: readonly DeadlineCount[];
81
+ };
82
+ /** An exception of a rule: what the subject's facts change about the duty. */
83
+ interface DeadlineException {
84
+ readonly name: string;
85
+ readonly when: Condition;
86
+ /** A missing `unless` never holds. */
87
+ readonly unless?: Condition;
88
+ readonly result: (typeof EXCEPTION_RESULTS)[number];
89
+ /** Where the remedy moved when barred, such as `claim_against_bond`. */
90
+ readonly remedy?: string;
91
+ readonly citation: DeadlineCitation;
92
+ readonly note?: string;
93
+ /** `approved` by default; `review_required` never decides. */
94
+ readonly status?: PartStatus;
95
+ }
96
+ /** One rule: when it applies, its exceptions and the deadline it counts. */
29
97
  interface DeadlineRule {
30
- /** The name of the rule inside its rule set. */
98
+ /** The name of the rule inside its version. */
31
99
  readonly key: string;
100
+ /** The group it belongs to; the first rule of a group that applies wins. */
101
+ readonly group: string;
32
102
  readonly title?: string;
33
- /** The fact that holds the date the deadline counts from. */
34
- readonly anchor: string;
35
- readonly offset: {
36
- readonly amount: number;
37
- readonly unit: OffsetUnit;
38
- };
39
- /** Moves a result that lands on a weekend; `none` by default. */
103
+ /** Absent: the rule applies to every subject. */
104
+ readonly applies?: Applies;
105
+ /** `false`: the duty does not exist for the subjects it selects. */
106
+ readonly required?: boolean;
107
+ /** Absent means `none`: a duty without a date. */
108
+ readonly deadline?: DeadlineSpec;
109
+ readonly exceptions?: readonly DeadlineException[];
110
+ /** Moves a result off a non-business day after the counting roll. */
40
111
  readonly adjust?: DeadlineAdjustment;
41
- /** Facts that must be present next to the anchor. */
112
+ /** `approved` by default; any other status is carried for review only. */
113
+ readonly status?: PartStatus;
114
+ readonly citation: DeadlineCitation;
115
+ /** Opaque data the block keeps and never reads. */
116
+ readonly meta?: Readonly<Record<string, unknown>>;
117
+ }
118
+ /** A group of rules: one result per subject (one per month for a periodic rule). */
119
+ interface DeadlineGroup {
120
+ readonly key: string;
121
+ readonly title?: string;
122
+ readonly citation: DeadlineCitation;
123
+ /** Groups whose `barred` result bars this one too. */
42
124
  readonly requires?: readonly string[];
125
+ readonly meta?: Readonly<Record<string, unknown>>;
126
+ }
127
+ /** One holiday of a counting block. */
128
+ interface DeadlineHoliday {
129
+ readonly name: string;
130
+ readonly date: {
131
+ readonly month: number;
132
+ readonly day: number;
133
+ } | {
134
+ readonly month: number;
135
+ readonly weekday: Weekday;
136
+ readonly nth: 1 | 2 | 3 | 4 | 5 | "last";
137
+ };
43
138
  readonly citation: DeadlineCitation;
139
+ readonly observed?: readonly {
140
+ readonly falls_on: (typeof OBSERVED_FALLS_ON)[number];
141
+ readonly observe: (typeof OBSERVED_MOVES)[number];
142
+ /** The listed date stops being a holiday. */
143
+ readonly replaces?: boolean;
144
+ readonly citation: DeadlineCitation;
145
+ }[];
44
146
  }
45
- /** The result of one evaluation. */
46
- type DeadlineEvaluation = {
47
- readonly status: "due";
48
- readonly dueOn: string;
147
+ /** How a version counts: the days a last day rolls past, and its holidays. */
148
+ interface DeadlineCounting {
149
+ readonly roll_to: "next_business_day";
150
+ readonly roll_when: readonly RollDay[];
151
+ readonly holidays?: readonly DeadlineHoliday[];
152
+ readonly citation?: DeadlineCitation;
153
+ /** Only an approved block rolls a date. */
154
+ readonly status?: PartStatus;
155
+ }
156
+ /** What `save_rule_version` takes and a version row holds. */
157
+ interface RuleVersionContent {
158
+ readonly rules: readonly DeadlineRule[];
159
+ readonly groups: readonly DeadlineGroup[];
160
+ readonly counting?: DeadlineCounting | null;
161
+ readonly meta?: Readonly<Record<string, unknown>> | null;
162
+ }
163
+ /** Why a result needs a person to look at it; it never changes the result. */
164
+ type DeadlineReview = {
165
+ readonly kind: "regime";
166
+ readonly fact: string;
167
+ readonly from: string | null;
49
168
  } | {
50
- readonly status: "unknown";
51
- readonly missing: readonly string[];
169
+ readonly kind: "exception";
170
+ readonly name: string;
171
+ readonly citation: DeadlineCitation;
172
+ readonly note?: string;
173
+ } | {
174
+ readonly kind: "rule";
175
+ readonly status: PartStatus;
176
+ } | {
177
+ readonly kind: "counting";
178
+ readonly status: PartStatus;
52
179
  };
180
+ /** What a dated result rests on. */
181
+ interface DeadlineBasis {
182
+ /** The fact and date the taken count read; null for earlier_of and later_of. */
183
+ readonly anchor: {
184
+ readonly fact: string;
185
+ readonly date: string;
186
+ } | null;
187
+ /** The `from` facts counted as not having happened. */
188
+ readonly without: readonly string[];
189
+ }
190
+ /** The exception that decided a result. */
191
+ interface DeadlineExceptionResult {
192
+ readonly name: string;
193
+ readonly citation: DeadlineCitation;
194
+ readonly remedy?: string;
195
+ readonly note?: string;
196
+ }
197
+ /** One result of a group for a subject. */
198
+ interface DeadlineGroupResult {
199
+ readonly group: string;
200
+ readonly ruleKey: string | null;
201
+ /** `YYYY-MM` for a monthly count's month. */
202
+ readonly period: string | null;
203
+ readonly result: DeadlineResult;
204
+ readonly dueOn: string | null;
205
+ /** A date or result that a missing answer could still change. */
206
+ readonly provisional: boolean;
207
+ /** The facts still asked, sorted. */
208
+ readonly missing: readonly string[];
209
+ readonly exception: DeadlineExceptionResult | null;
210
+ readonly review: readonly DeadlineReview[];
211
+ readonly basis: DeadlineBasis | null;
212
+ /** The selected rule's deadline as authored. */
213
+ readonly deadline: DeadlineSpec | null;
214
+ /** The rule's citation, else the group's. */
215
+ readonly citation: DeadlineCitation;
216
+ }
217
+ /** Facts: a missing key is unknown, `null` does not exist or has not happened. */
218
+ type DeadlineFacts = Readonly<Record<string, unknown>>;
53
219
  /** A version of a rule set: draft until approved, then frozen. */
54
220
  interface RuleVersion {
55
221
  readonly id: string;
@@ -58,7 +224,11 @@ interface RuleVersion {
58
224
  readonly version: number;
59
225
  readonly status: (typeof RULE_VERSION_STATUSES)[number];
60
226
  readonly rules: readonly DeadlineRule[];
61
- /** SHA-256 of the rules, set when the version is approved. */
227
+ readonly groups: readonly DeadlineGroup[];
228
+ readonly counting?: DeadlineCounting;
229
+ /** Opaque data the block keeps and never reads. */
230
+ readonly meta?: Readonly<Record<string, unknown>>;
231
+ /** SHA-256 of the content, set when the version is approved. */
62
232
  readonly contentHash?: string;
63
233
  /** The first day the version applies. */
64
234
  readonly effectiveFrom?: Temporal.PlainDate;
@@ -66,7 +236,7 @@ interface RuleVersion {
66
236
  readonly approvedAt?: Temporal.Instant;
67
237
  readonly createdAt: Temporal.Instant;
68
238
  }
69
- /** A deadline of one rule for one subject. */
239
+ /** The deadline of one group (one month of a periodic rule) for one subject. */
70
240
  interface Deadline {
71
241
  readonly id: string;
72
242
  readonly organizationId: string;
@@ -74,16 +244,32 @@ interface Deadline {
74
244
  readonly subjectId: string;
75
245
  readonly jurisdiction: string;
76
246
  readonly kind: string;
77
- readonly ruleKey: string;
247
+ readonly groupKey: string;
248
+ /** The rule that applied; absent when none did. */
249
+ readonly ruleKey?: string;
250
+ /** `YYYY-MM` for one month of a periodic rule. */
251
+ readonly period?: string;
78
252
  readonly ruleVersionId: string;
79
253
  readonly ruleVersion?: number;
80
- readonly facts: Readonly<Record<string, unknown>>;
254
+ readonly facts: DeadlineFacts;
81
255
  readonly result: (typeof DEADLINE_RESULTS)[number];
82
256
  /** Set when the result is `due`. */
83
257
  readonly dueOn?: Temporal.PlainDate;
84
- /** The facts a result of `unknown` waits for. */
258
+ /** A date or result a missing answer could still change. */
259
+ readonly provisional: boolean;
260
+ /** The facts the deadline still asks, sorted. */
85
261
  readonly missing: readonly string[];
262
+ /** The exception that decided a refusal. */
263
+ readonly exception?: DeadlineExceptionResult;
264
+ /** What needs a person's review; it never changes the result. */
265
+ readonly review: readonly DeadlineReview[];
266
+ /** What a due date rests on. */
267
+ readonly basis?: DeadlineBasis;
268
+ /** The applied rule's deadline as authored. */
269
+ readonly deadline?: DeadlineSpec;
86
270
  readonly citation: DeadlineCitation;
271
+ /** The date the deadline was evaluated on. */
272
+ readonly asOf: Temporal.PlainDate;
87
273
  readonly state: (typeof DEADLINE_STATES)[number];
88
274
  readonly satisfiedAt?: Temporal.Instant;
89
275
  readonly satisfiedBy?: string;
@@ -98,8 +284,11 @@ interface DeadlineSubject {
98
284
  interface DeadlineListOptions {
99
285
  readonly subjectType?: string;
100
286
  readonly subjectId?: string;
287
+ readonly groupKey?: string;
288
+ readonly period?: string;
101
289
  readonly state?: Deadline["state"];
102
290
  readonly result?: Deadline["result"];
291
+ readonly provisional?: boolean;
103
292
  /** Only deadlines due before this date. */
104
293
  readonly dueBefore?: Temporal.PlainDate;
105
294
  /** At most 500; 100 by default. */
@@ -111,13 +300,13 @@ interface DeadlinesOptions extends BlockOptions {
111
300
  }
112
301
  interface Deadlines {
113
302
  /**
114
- * Saves rules as a draft version of a rule set, creating the set on first
115
- * use. Service role only.
303
+ * Saves a version's content as a draft version of a rule set, creating the
304
+ * set on first use. Service role only.
116
305
  */
117
306
  saveRules(input: {
118
307
  readonly jurisdiction: string;
119
308
  readonly kind: string;
120
- readonly rules: readonly DeadlineRule[];
309
+ readonly content: RuleVersionContent;
121
310
  readonly effectiveFrom?: Temporal.PlainDate;
122
311
  readonly title?: string;
123
312
  }): AsyncResult<RuleVersion>;
@@ -137,14 +326,19 @@ interface Deadlines {
137
326
  readonly kind: string;
138
327
  readonly date?: Temporal.PlainDate;
139
328
  }): AsyncResult<RuleVersion | undefined>;
140
- /** Computes and stores the deadline of one rule from a subject's facts. */
329
+ /**
330
+ * Computes and stores a subject's deadlines from its facts: one per group of
331
+ * the version that applies on `asOf` (today by default), or only `group`'s,
332
+ * and one per month for a periodic rule. A missing fact is unknown and `null`
333
+ * does not exist or has not happened.
334
+ */
141
335
  compute(input: DeadlineSubject & {
142
336
  readonly jurisdiction: string;
143
337
  readonly kind: string;
144
- readonly ruleKey: string;
145
- readonly facts: Readonly<Record<string, unknown>>;
338
+ readonly facts: DeadlineFacts;
146
339
  readonly asOf?: Temporal.PlainDate;
147
- }): AsyncResult<Deadline>;
340
+ readonly group?: string;
341
+ }): AsyncResult<readonly Deadline[]>;
148
342
  /** Re-evaluates a subject's pending deadlines with extra facts. */
149
343
  recompute(input: DeadlineSubject & {
150
344
  readonly facts?: Readonly<Record<string, unknown>>;
@@ -157,16 +351,18 @@ interface Deadlines {
157
351
  list(options?: DeadlineListOptions): AsyncResult<readonly Deadline[]>;
158
352
  }
159
353
  /**
160
- * Evaluates one rule against facts in TypeScript, with the same result as the
161
- * database. Use it to preview a draft or to show a date without a round trip.
354
+ * Evaluates a rule set version against facts in TypeScript, with the same
355
+ * results as the database: one per group (one per month for a periodic rule),
356
+ * or only `group`'s. Use it to preview a draft or to show dates without a round
357
+ * trip. `asOf` is an ISO date, today by default.
162
358
  */
163
- export declare function evaluateRule(rule: DeadlineRule, facts: Readonly<Record<string, unknown>>): DeadlineEvaluation;
164
- /** The problems of a rule list, or an empty array when it can be saved. */
165
- export declare function validateRules(rules: unknown): readonly string[];
359
+ export declare function evaluateVersion(content: RuleVersionContent, facts: DeadlineFacts, asOf?: Temporal.PlainDate | string, group?: string): readonly DeadlineGroupResult[];
360
+ /** The problems of a version's content, or an empty array when it can be saved. */
361
+ export declare function validateRuleVersion(content: unknown): readonly string[];
166
362
  /**
167
363
  * Deadlines: rule sets owned by the platform, versioned and approved once, and
168
- * the deadlines computed from a subject's facts. A rule whose facts are not all
169
- * known yields `unknown` with the facts it waits for, never a guess.
364
+ * the deadlines computed from a subject's facts. A deadline whose facts are not
365
+ * all known is `unknown` with the facts it waits for, never a guess.
170
366
  */
171
367
  export declare function createDeadlines(options: DeadlinesOptions): Deadlines;
172
368
  /** What every `deadline.*` event carries. */
@@ -175,11 +371,21 @@ interface DeadlineEventData {
175
371
  readonly id: string;
176
372
  readonly subjectType: string;
177
373
  readonly subjectId: string;
178
- readonly ruleKey: string;
179
- /** `due` or `unknown`. */
374
+ /** The group of the rule set version the deadline belongs to. */
375
+ readonly groupKey: string;
376
+ /** The rule that applied; null when none did. */
377
+ readonly ruleKey?: string | null;
378
+ /** `YYYY-MM` for one month of a periodic rule. */
379
+ readonly period?: string | null;
380
+ /**
381
+ * `due`, `unknown`, `pending`, `undated`, `not_covered`, `not_applicable`,
382
+ * `not_required` or `barred`.
383
+ */
180
384
  readonly result: string;
181
- /** The due date as an ISO date; absent while the result is `unknown`. */
385
+ /** The due date as an ISO date; set only while the result is `due`. */
182
386
  readonly dueOn?: string | null;
387
+ /** A date or result a missing answer could still change. */
388
+ readonly provisional: boolean;
183
389
  }
184
390
  /** The events of the `deadlines` block: type to data. */
185
391
  type DeadlinesEvents = {
@@ -190,4 +396,4 @@ type DeadlinesEvents = {
190
396
  export declare const deadlinesEvents: Events<DeadlinesEvents>;
191
397
  /** The `deadlines` block's manifest. */
192
398
  export declare const deadlinesBlock: BlockOf<"deadlines", typeof createDeadlines, DeadlinesEvents>;
193
- export { type BlockHooks, type BlockTransport, type BlockTransportMiddleware, type Deadline, type DeadlineCitation, type DeadlineEvaluation, type DeadlineEventData, type DeadlineListOptions, type DeadlineRule, type DeadlineSubject, type Deadlines, type DeadlinesEvents, type DeadlinesOptions, type RpcClient, type RuleVersion, dbTransport, extendBlock, rpcTransport, sqlTransport, withBlockHooks, wrapTransport };
399
+ export { type Applies, type BlockHooks, type BlockTransport, type BlockTransportMiddleware, type Condition, type ConditionValue, type DateRegime, type Deadline, type DeadlineBasis, type DeadlineCitation, type DeadlineCount, type DeadlineCounting, type DeadlineEventData, type DeadlineException, type DeadlineExceptionResult, type DeadlineFacts, type DeadlineGroup, type DeadlineGroupResult, type DeadlineHoliday, type DeadlineListOptions, type DeadlineResult, type DeadlineReview, type DeadlineRule, type DeadlineSpec, type DeadlineSubject, type Deadlines, type DeadlinesEvents, type DeadlinesOptions, type RpcClient, type RuleVersion, type RuleVersionContent, dbTransport, extendBlock, rpcTransport, sqlTransport, withBlockHooks, wrapTransport };