better-supabase 0.54.0 → 0.56.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 (445) hide show
  1. package/dist/{agents-DcZk8HBB.d.ts → agents-DJChYmXn.d.ts} +2 -2
  2. package/dist/{ai-schedules-b-uWaxba.d.ts → ai-schedules-5fxfEOWM.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-B2xNMyLA.d.ts → app-tables-CWnf7wpo.d.ts} +1 -1
  6. package/dist/{audit-actions-Dni5Y4wV.d.ts → audit-actions-DC-AtyWB.d.ts} +6 -0
  7. package/dist/{authorization-Bk6cLL5f.d.ts → authorization-Hh9xUm0r.d.ts} +1 -1
  8. package/dist/{automations-CjKWYzIu.js → automations-Cu1KdCvL.js} +3 -1
  9. package/dist/{bind-DWElQa6I.d.ts → bind-CC5-eBT-.d.ts} +4 -4
  10. package/dist/{block-env-CQQUMPYZ.d.ts → block-env-CzT1OAiI.d.ts} +4 -4
  11. package/dist/{block-subjects-9KU6Q6-3.js → block-subjects-B9hb1LLk.js} +4 -3
  12. package/dist/{block-tables-JC1dMLaA.d.ts → block-tables-DOGtmm0m.d.ts} +1 -1
  13. package/dist/blocks/access-requests/index.d.ts +1 -1
  14. package/dist/blocks/accounting/index.d.ts +1 -1
  15. package/dist/blocks/acknowledgements/index.d.ts +1 -1
  16. package/dist/blocks/activities/index.d.ts +2 -2
  17. package/dist/blocks/advisories/index.d.ts +1 -1
  18. package/dist/blocks/agent-checkout/index.d.ts +1 -1
  19. package/dist/blocks/agents/index.d.ts +1 -1
  20. package/dist/blocks/ai-cache/index.d.ts +1 -1
  21. package/dist/blocks/ai-chat/index.d.ts +1 -1
  22. package/dist/blocks/ai-evals/index.d.ts +1 -1
  23. package/dist/blocks/ai-files/index.d.ts +1 -1
  24. package/dist/blocks/ai-guardrails/index.d.ts +1 -1
  25. package/dist/blocks/ai-keys/index.d.ts +1 -1
  26. package/dist/blocks/ai-schedules/index.d.ts +2 -2
  27. package/dist/blocks/announcements/index.d.ts +4 -4
  28. package/dist/blocks/api-keys/index.d.ts +1 -1
  29. package/dist/blocks/appraisals/index.d.ts +1 -1
  30. package/dist/blocks/approvals/index.d.ts +1 -1
  31. package/dist/blocks/assets/index.d.ts +2 -2
  32. package/dist/blocks/assignment/index.d.ts +1 -1
  33. package/dist/blocks/attachments/index.d.ts +5 -5
  34. package/dist/blocks/audit/index.d.ts +2 -2
  35. package/dist/blocks/automations/index.d.ts +3 -3
  36. package/dist/blocks/banking/index.d.ts +1 -1
  37. package/dist/blocks/billable-time/index.d.ts +1 -1
  38. package/dist/blocks/billing/index.d.ts +2 -2
  39. package/dist/blocks/bookings/index.d.ts +2 -2
  40. package/dist/blocks/bulk/index.d.ts +1 -1
  41. package/dist/blocks/calendar/index.d.ts +3 -3
  42. package/dist/blocks/care/index.d.ts +27 -27
  43. package/dist/blocks/care-plans/index.d.ts +3 -3
  44. package/dist/blocks/cases/index.d.ts +3 -3
  45. package/dist/blocks/catalog/index.d.ts +2 -2
  46. package/dist/blocks/channels/index.d.ts +1 -1
  47. package/dist/blocks/clinical-decision-support/index.d.ts +1 -1
  48. package/dist/blocks/cms/index.d.ts +5 -5
  49. package/dist/blocks/collaboration/index.d.ts +6 -6
  50. package/dist/blocks/collections/index.d.ts +1 -1
  51. package/dist/blocks/comments/index.d.ts +2 -2
  52. package/dist/blocks/commerce/index.d.ts +5 -5
  53. package/dist/blocks/commerce/index.js +2 -2
  54. package/dist/blocks/commissions/index.d.ts +1 -1
  55. package/dist/blocks/compliance/index.d.ts +1 -1
  56. package/dist/blocks/connectors/index.d.ts +1 -1
  57. package/dist/blocks/consents/index.d.ts +2 -2
  58. package/dist/blocks/contacts/index.d.ts +2 -2
  59. package/dist/blocks/content/index.d.ts +2 -2
  60. package/dist/blocks/contracts/index.d.ts +1 -1
  61. package/dist/blocks/courses/index.d.ts +3 -3
  62. package/dist/blocks/created-by/index.d.ts +2 -2
  63. package/dist/blocks/crm/index.d.ts +16 -16
  64. package/dist/blocks/crm/index.js +2 -2
  65. package/dist/blocks/custom-fields/index.d.ts +1 -1
  66. package/dist/blocks/dam/index.d.ts +2 -2
  67. package/dist/blocks/data-lifecycle/index.d.ts +2 -2
  68. package/dist/blocks/deadlines/index.d.ts +249 -43
  69. package/dist/blocks/deadlines/index.js +862 -20
  70. package/dist/blocks/deals/index.d.ts +1 -1
  71. package/dist/blocks/dispatch/index.d.ts +2 -2
  72. package/dist/blocks/document-templates/index.d.ts +2 -2
  73. package/dist/blocks/documents/index.d.ts +1 -1
  74. package/dist/blocks/domains/index.d.ts +1 -1
  75. package/dist/blocks/donations/index.d.ts +1 -1
  76. package/dist/blocks/drive/index.d.ts +5 -5
  77. package/dist/blocks/e-prescribing/index.d.ts +1 -1
  78. package/dist/blocks/employees/index.d.ts +1 -1
  79. package/dist/blocks/enrichment/index.d.ts +1 -1
  80. package/dist/blocks/enrollments/index.d.ts +2 -2
  81. package/dist/blocks/entitlements/index.d.ts +3 -3
  82. package/dist/blocks/events/index.d.ts +3 -3
  83. package/dist/blocks/expenses/index.d.ts +1 -1
  84. package/dist/blocks/field-history/index.d.ts +1 -1
  85. package/dist/blocks/filespace/index.d.ts +8 -8
  86. package/dist/blocks/finance/index.d.ts +5 -5
  87. package/dist/blocks/finance/index.js +1 -1
  88. package/dist/blocks/flags/index.d.ts +1 -1
  89. package/dist/blocks/forecasts/index.d.ts +1 -1
  90. package/dist/blocks/forms/index.d.ts +3 -3
  91. package/dist/blocks/funding/index.d.ts +2 -2
  92. package/dist/blocks/goals/index.d.ts +1 -1
  93. package/dist/blocks/governance/index.d.ts +4 -4
  94. package/dist/blocks/guests/index.d.ts +1 -1
  95. package/dist/blocks/hiring/index.d.ts +1 -1
  96. package/dist/blocks/identities/index.d.ts +1 -1
  97. package/dist/blocks/imports/index.d.ts +2 -2
  98. package/dist/blocks/inbox/index.d.ts +6 -6
  99. package/dist/blocks/incidents/index.d.ts +1 -1
  100. package/dist/blocks/index.d.ts +4 -4
  101. package/dist/blocks/inspections/index.d.ts +2 -2
  102. package/dist/blocks/inventory/index.d.ts +1 -1
  103. package/dist/blocks/inventory/index.js +1 -1
  104. package/dist/blocks/invoices/index.d.ts +1 -1
  105. package/dist/blocks/invoices/index.js +1 -1
  106. package/dist/blocks/knowledge/index.d.ts +1 -1
  107. package/dist/blocks/lead-scoring/index.d.ts +2 -2
  108. package/dist/blocks/learning/index.d.ts +3 -3
  109. package/dist/blocks/leases/index.d.ts +1 -1
  110. package/dist/blocks/leave/index.d.ts +1 -1
  111. package/dist/blocks/ledger/index.d.ts +1 -1
  112. package/dist/blocks/legal-entities/index.d.ts +2 -2
  113. package/dist/blocks/lims/index.d.ts +2 -2
  114. package/dist/blocks/mail-sync/index.d.ts +3 -3
  115. package/dist/blocks/maintenance/index.d.ts +2 -2
  116. package/dist/blocks/manufacturing/index.d.ts +2 -2
  117. package/dist/blocks/medications/index.d.ts +1 -1
  118. package/dist/blocks/meetings/index.d.ts +3 -3
  119. package/dist/blocks/memberships/index.d.ts +2 -2
  120. package/dist/blocks/memory/index.d.ts +1 -1
  121. package/dist/blocks/messaging/index.d.ts +5 -5
  122. package/dist/blocks/metrics/index.d.ts +1 -1
  123. package/dist/blocks/mfa/index.d.ts +2 -2
  124. package/dist/blocks/moderation/index.d.ts +2 -2
  125. package/dist/blocks/notifications/index.d.ts +5 -5
  126. package/dist/blocks/numbering/index.d.ts +1 -1
  127. package/dist/blocks/oauth-server/index.d.ts +1 -1
  128. package/dist/blocks/observations/index.d.ts +2 -2
  129. package/dist/blocks/onboarding/index.d.ts +2 -2
  130. package/dist/blocks/option-sets/index.d.ts +2 -2
  131. package/dist/blocks/orders/index.d.ts +1 -1
  132. package/dist/blocks/orders/index.js +1 -1
  133. package/dist/blocks/organizations/index.d.ts +2 -2
  134. package/dist/blocks/outbox/index.d.ts +1 -1
  135. package/dist/blocks/passes/index.d.ts +2 -2
  136. package/dist/blocks/payroll-export/index.d.ts +2 -2
  137. package/dist/blocks/payroll-export/index.js +1 -1
  138. package/dist/blocks/people/index.d.ts +7 -7
  139. package/dist/blocks/people/index.js +1 -1
  140. package/dist/blocks/periods/index.d.ts +1 -1
  141. package/dist/blocks/permissions/index.d.ts +3 -3
  142. package/dist/blocks/pipelines/index.d.ts +1 -1
  143. package/dist/blocks/posts/index.d.ts +2 -2
  144. package/dist/blocks/procurement/index.d.ts +5 -5
  145. package/dist/blocks/procurement/index.js +2 -2
  146. package/dist/blocks/profiles/index.d.ts +1 -1
  147. package/dist/blocks/projects/index.d.ts +7 -7
  148. package/dist/blocks/projects/index.js +2 -2
  149. package/dist/blocks/promotions/index.d.ts +1 -1
  150. package/dist/blocks/prompts/index.d.ts +1 -1
  151. package/dist/blocks/push/index.d.ts +2 -2
  152. package/dist/blocks/qualifications/index.d.ts +2 -2
  153. package/dist/blocks/queue/index.d.ts +2 -2
  154. package/dist/blocks/quotes/index.d.ts +1 -1
  155. package/dist/blocks/quotes/index.js +2 -2
  156. package/dist/blocks/rank/index.d.ts +1 -1
  157. package/dist/blocks/reactions/index.d.ts +4 -4
  158. package/dist/blocks/recruiting/index.d.ts +4 -4
  159. package/dist/blocks/referrals/index.d.ts +1 -1
  160. package/dist/blocks/relations/index.d.ts +1 -1
  161. package/dist/blocks/reminders/index.d.ts +1 -1
  162. package/dist/blocks/reviews/index.d.ts +1 -1
  163. package/dist/blocks/rfqs/index.d.ts +2 -2
  164. package/dist/blocks/risks/index.d.ts +2 -2
  165. package/dist/blocks/saas/index.d.ts +12 -12
  166. package/dist/blocks/sales/index.d.ts +1 -1
  167. package/dist/blocks/sales/index.js +1 -1
  168. package/dist/blocks/saved-views/index.d.ts +2 -2
  169. package/dist/blocks/scheduling/index.d.ts +4 -4
  170. package/dist/blocks/scores/index.d.ts +2 -2
  171. package/dist/blocks/search/index.d.ts +3 -3
  172. package/dist/blocks/security-events/index.d.ts +1 -1
  173. package/dist/blocks/segments/index.d.ts +2 -2
  174. package/dist/blocks/sequences/index.d.ts +3 -3
  175. package/dist/blocks/service/index.d.ts +7 -7
  176. package/dist/blocks/service/index.js +1 -1
  177. package/dist/blocks/service-accounts/index.d.ts +1 -1
  178. package/dist/blocks/sessions/index.d.ts +2 -2
  179. package/dist/blocks/settings/index.d.ts +2 -2
  180. package/dist/blocks/share-links/index.d.ts +1 -1
  181. package/dist/blocks/shifts/index.d.ts +2 -2
  182. package/dist/blocks/shipments/index.d.ts +2 -2
  183. package/dist/blocks/signatures/index.d.ts +2 -2
  184. package/dist/blocks/signing-keys/index.d.ts +1 -1
  185. package/dist/blocks/sla/index.d.ts +1 -1
  186. package/dist/blocks/sso/index.d.ts +1 -1
  187. package/dist/blocks/state-machine/index.d.ts +1 -1
  188. package/dist/blocks/subjects/index.d.ts +2 -2
  189. package/dist/blocks/support/index.d.ts +5 -5
  190. package/dist/blocks/support/index.js +1 -1
  191. package/dist/blocks/tags/index.d.ts +2 -2
  192. package/dist/blocks/tasks/index.d.ts +2 -2
  193. package/dist/blocks/tasks/index.js +1 -1
  194. package/dist/blocks/tax/index.d.ts +2 -2
  195. package/dist/blocks/teams/index.d.ts +1 -1
  196. package/dist/blocks/templates/index.d.ts +11 -1
  197. package/dist/blocks/templates/index.js +6 -1
  198. package/dist/blocks/tills/index.d.ts +1 -1
  199. package/dist/blocks/time-tracking/index.d.ts +2 -2
  200. package/dist/blocks/timeline/index.d.ts +1 -1
  201. package/dist/blocks/trash/index.d.ts +1 -1
  202. package/dist/blocks/undo/index.d.ts +2 -2
  203. package/dist/blocks/updated-at/index.d.ts +2 -2
  204. package/dist/blocks/usage/index.d.ts +2 -2
  205. package/dist/blocks/vercel-marketplace/index.d.ts +1 -1
  206. package/dist/blocks/versions/index.d.ts +1 -1
  207. package/dist/blocks/waitlist/index.d.ts +1 -1
  208. package/dist/blocks/warehouse/index.d.ts +1 -1
  209. package/dist/blocks/webhooks/index.d.ts +1 -1
  210. package/dist/blocks/workflow-editor/index.d.ts +4 -4
  211. package/dist/blocks/workflows/index.d.ts +4 -4
  212. package/dist/{blocks-LZklPzC5.d.ts → blocks-DvWEz8mQ.d.ts} +56 -21
  213. package/dist/claims/index.d.ts +3 -3
  214. package/dist/cli/{add-BQZbFEAP.js → add--O_HFhs0.js} +2 -2
  215. package/dist/cli/add-CUAchifS.js +1 -0
  216. package/dist/cli/{add-DK38-F2F.js → add-DT2QsJB0.js} +12 -12
  217. package/dist/cli/{app-table-files-C5Sx2Qao.js → app-table-files-BjMDa_7_.js} +3 -3
  218. package/dist/cli/{app-tables-ChZE8Z_L.js → app-tables-D34g1ASz.js} +2 -2
  219. package/dist/cli/{backfill-COnv2tOL.js → backfill-DWD5chCd.js} +3 -3
  220. package/dist/cli/bin.js +1 -1
  221. package/dist/cli/{blocks-Dea_Z5Ps.js → blocks-BduQcXFb.js} +1 -1
  222. package/dist/cli/{blocks-Csu6lLqC.js → blocks-DKs7Qj8R.js} +1 -1
  223. package/dist/cli/{cache-C1nAFZNW.js → cache-EFwNdKib.js} +1 -1
  224. package/dist/cli/{codemod-DHULUpez.js → codemod-CuaWRwst.js} +1 -1
  225. package/dist/cli/{config-FN5Cp861.js → config-DdkxiGjH.js} +7 -0
  226. package/dist/cli/{config-U32Vo0h6.js → config-DmjFp8jY.js} +1 -1
  227. package/dist/cli/{content-mapper-QVJJto5U.js → content-mapper-BlOMmIM2.js} +2 -2
  228. package/dist/cli/{db-T8u160uM.js → db-B54TQ_iX.js} +2 -2
  229. package/dist/cli/{doctor-Du2zwLUG.js → doctor-JdxWuscJ.js} +17 -17
  230. package/dist/cli/{gen-CQ2ubqjB.js → gen-n6l6AMLo.js} +14 -14
  231. package/dist/cli/index.d.ts +1 -1
  232. package/dist/cli/index.js +7 -7
  233. package/dist/cli/{init-CTt0aQn1.js → init-BLMHN_2A.js} +10 -10
  234. package/dist/cli/{live-DMNuAml9.js → live-C4uCg3ME.js} +2 -2
  235. package/dist/cli/{mcp-C63ulwyU.js → mcp-CFLvzFKH.js} +2 -2
  236. package/dist/cli/{metadata-CylES-9Y.js → metadata-CRp8JQTE.js} +3 -3
  237. package/dist/cli/{migrate-BezKva56.js → migrate-BjDf0moD.js} +1 -1
  238. package/dist/cli/{migration-safety-DQtpMu-g.js → migration-safety-D-QnV2BW.js} +2 -2
  239. package/dist/cli/{migrations-DGJJ1rHt.js → migrations-8dDFF8SW.js} +2 -2
  240. package/dist/cli/{module-migration-CxbEDfSF.js → module-migration-DuwIX8MO.js} +2 -2
  241. package/dist/cli/powersync-ByqoHJwp.js +1 -0
  242. package/dist/cli/{powersync-FUYFuZSw.js → powersync-CHVlZIqs.js} +3 -3
  243. package/dist/cli/{print-DAwLAC-7.js → print-orgMiDzp.js} +2 -2
  244. package/dist/cli/{providers-hrxX3YKU.js → providers-DWZVnoDw.js} +1 -1
  245. package/dist/cli/{prune-workflows-DLhKu_UJ.js → prune-workflows-DelKs-zD.js} +3 -3
  246. package/dist/cli/{remove-DSC6Fvwo.js → remove-BH6Zwjhs.js} +6 -6
  247. package/dist/cli/{render-647qdnrX.js → render-DyWVslCM.js} +4 -4
  248. package/dist/cli/{run--qaDaqfL.js → run-BYX5n5rt.js} +9 -9
  249. package/dist/cli/{run-BcI6KXV3.js → run-GcSBgXCH.js} +35 -35
  250. package/dist/cli/seed-BxjjQ3OO.js +1 -0
  251. package/dist/cli/{seed-BgpovbwF.js → seed-kCLEYSOH.js} +2 -2
  252. package/dist/cli/{shared-D_DZ9MfG.js → shared-BoVOOrpJ.js} +1 -1
  253. package/dist/cli/{snapshot-B-1tPbV4.js → snapshot-BZGZ9pB-.js} +3 -3
  254. package/dist/cli/{source-BgFNrRcl.js → source-Buw7eODS.js} +1 -1
  255. package/dist/cli/{source-args-DC8snM7e.js → source-args-C3_mMci3.js} +1 -1
  256. package/dist/cli/{spec-CV0FdW18.js → spec-CUWMpL3f.js} +2 -2
  257. package/dist/cli/{spec-C88dtkj4.js → spec-CnRC9FcX.js} +1 -1
  258. package/dist/cli/{sql-layout-byUur5FC.js → sql-layout-BZ-NhhTI.js} +2 -2
  259. package/dist/cli/{sync-BtM7o-sI.js → sync-CFzA4xdr.js} +4 -4
  260. package/dist/cli/{upgrade-CKDeHkyy.js → upgrade-D1szGysi.js} +5 -5
  261. package/dist/cli/{upgrade-B_HEJvRX.js → upgrade-ukOP0GXf.js} +2 -2
  262. package/dist/cli/{version-DWDoiP5_.js → version-D1sJX6_6.js} +1 -1
  263. package/dist/client/index.d.ts +6 -6
  264. package/dist/client/native/index.d.ts +4 -4
  265. package/dist/config/index.d.ts +4 -4
  266. package/dist/config/index.js +4 -4
  267. package/dist/{config-LOwFAFpo.js → config-Bx3UYp8b.js} +3 -3
  268. package/dist/{config-ekflaCnS.js → config-CAjlOSQY.js} +1 -1
  269. package/dist/{context-iduX3Fsn.d.ts → context-BIBqUjVz.d.ts} +47 -4
  270. package/dist/contract/index.d.ts +3 -3
  271. package/dist/{contributions-DPjEWWpE.js → contributions-olp7tVYC.js} +11 -0
  272. package/dist/{controller-DFGNChQL.d.ts → controller-DBD6WWDa.d.ts} +1 -1
  273. package/dist/{conversion-DTBB0Zgt.d.ts → conversion-DLkof9_y.d.ts} +1 -1
  274. package/dist/create/index.d.ts +4 -4
  275. package/dist/create/index.js +3 -3
  276. package/dist/create/lite/index.d.ts +3 -3
  277. package/dist/create/lite/index.js +2 -2
  278. package/dist/{data-engine-BKO5EAzN.d.ts → data-engine-0uVsKWaB.d.ts} +7 -3
  279. package/dist/deadlines-values-vmaCCdGl.js +92 -0
  280. package/dist/{define-block-By-LUpM_.d.ts → define-block-zK3QnPyG.d.ts} +1 -1
  281. package/dist/{drive-CuNG4qB8.d.ts → drive-Keqe8dIg.d.ts} +1 -1
  282. package/dist/{entitlements-Go8BHqhr.d.ts → entitlements-QwMag409.d.ts} +1 -1
  283. package/dist/{extract-DQKHxiiq.d.ts → extract-CJWS6MMG.d.ts} +1 -1
  284. package/dist/{field-errors-B4SMTk2e.d.ts → field-errors-BlyD3if3.d.ts} +6 -6
  285. package/dist/{index-DQVQYEhP.d.ts → index-0AVn1Dcr.d.ts} +1 -1
  286. package/dist/{index-20EPlFXG.d.ts → index-9rajR8Ti.d.ts} +1 -1
  287. package/dist/{index-DlXgoerO.d.ts → index-B5rQ9MEl.d.ts} +1 -1
  288. package/dist/{index-DkNMN5uU.d.ts → index-B7_Mq8Qm.d.ts} +1 -1
  289. package/dist/{index-DkJtM-9e.d.ts → index-BGqvP9dE.d.ts} +9 -9
  290. package/dist/{index-szXZSILq.d.ts → index-BIClMq6S.d.ts} +7 -7
  291. package/dist/{index-YZ-_hzdR.d.ts → index-BOI3eLz0.d.ts} +1 -1
  292. package/dist/{index-B8axasMg.d.ts → index-BSdDLEA-.d.ts} +1 -1
  293. package/dist/{index-ROumUag2.d.ts → index-BTC40rxx.d.ts} +1 -1
  294. package/dist/{index-C1kImKZg.d.ts → index-BxdldeGx.d.ts} +1 -1
  295. package/dist/{index-DXoS8BnK.d.ts → index-C7tmYYB5.d.ts} +3 -3
  296. package/dist/{index-BoKvWo8t.d.ts → index-CJB2uCFk.d.ts} +1 -1
  297. package/dist/{index-DkNLdcX_.d.ts → index-COLMIEk0.d.ts} +1 -1
  298. package/dist/{index-BmKtYKwN.d.ts → index-CPRQdNHc.d.ts} +2 -2
  299. package/dist/{index-NqLuAXG3.d.ts → index-CSdjm0Kn.d.ts} +2 -2
  300. package/dist/{index-D4ke5U0m.d.ts → index-CT0OjCk1.d.ts} +1 -1
  301. package/dist/{index-D7FXhn2i.d.ts → index-CocISf2h.d.ts} +1 -1
  302. package/dist/{index-9zNFFq6E.d.ts → index-Cvd24Ybb.d.ts} +1 -1
  303. package/dist/{index-CTHuTJtf.d.ts → index-DASeimpy.d.ts} +1 -1
  304. package/dist/{index-Dg35ugqv.d.ts → index-DBqRH5cj.d.ts} +4 -4
  305. package/dist/{index-abVPYQE3.d.ts → index-DCeA3cFQ.d.ts} +1 -1
  306. package/dist/{index-bJVAgXxw.d.ts → index-DD3Ldome.d.ts} +2 -2
  307. package/dist/{index-DJyt9j86.d.ts → index-DEDIPDaW.d.ts} +2 -2
  308. package/dist/{index-D9Sb8Ju5.d.ts → index-DNitLhgU.d.ts} +3 -3
  309. package/dist/{index-BKWnyAWN.d.ts → index-D_OEwOaE.d.ts} +2 -2
  310. package/dist/{index-DzjugbCf.d.ts → index-D_g2loq-.d.ts} +2 -2
  311. package/dist/{index-DfJFbsVp.d.ts → index-DaTxv1aA.d.ts} +1 -1
  312. package/dist/{index-D337YzjX.d.ts → index-DcihkEQo.d.ts} +1 -1
  313. package/dist/{index-DeE-Xuv7.d.ts → index-Do6ZAvXT.d.ts} +1 -1
  314. package/dist/{index-DgRK-iM3.d.ts → index-DpwRuDBy.d.ts} +4 -4
  315. package/dist/{index-pRdO2XnG.d.ts → index-HANt6RDT.d.ts} +1 -1
  316. package/dist/{index-Bsd8P1iQ.d.ts → index-QpKsKUbn.d.ts} +2 -2
  317. package/dist/{index-DFdqVxv6.d.ts → index-WXVYfOHr.d.ts} +4 -4
  318. package/dist/{index-BkBNirhK.d.ts → index-XjhYgGhk.d.ts} +2 -2
  319. package/dist/{index-BvwlIGwY.d.ts → index-_rOaXPbx.d.ts} +1 -1
  320. package/dist/{index-BXRyr3ey.d.ts → index-n-7IwvYP.d.ts} +2 -2
  321. package/dist/{index-D-bMFoGs.d.ts → index-urOSlPMc.d.ts} +2 -2
  322. package/dist/{instances-DJxWRqXk.js → instances-z6DJn2Gr.js} +52 -8
  323. package/dist/{inventory-reads-BNDSYnuG.js → inventory-reads-DEw2Kbff.js} +2 -1
  324. package/dist/{manifest-DjAdsSs4.d.ts → manifest-B4SF4ieN.d.ts} +1 -1
  325. package/dist/{manifest-BeW5LlW1.d.ts → manifest-B9D-PHpo.d.ts} +1 -1
  326. package/dist/{manifest-H6lz9xQm.d.ts → manifest-BBIs-5xy.d.ts} +1 -1
  327. package/dist/{manifest-BfIYKrNe.d.ts → manifest-BE6JGlFP.d.ts} +1 -1
  328. package/dist/{manifest-BCOBkYvY.d.ts → manifest-BExilPWu.d.ts} +2 -2
  329. package/dist/{manifest-uL5fzXsx.d.ts → manifest-BNhdYakH.d.ts} +1 -1
  330. package/dist/{manifest-DZLr6Cbr.js → manifest-BV1YxozT.js} +1 -1
  331. package/dist/{manifest-DweZMH-F.d.ts → manifest-BVkjX2t-.d.ts} +1 -1
  332. package/dist/{manifest-RUmJ5H6p.d.ts → manifest-BVnfLMPU.d.ts} +2 -2
  333. package/dist/{manifest-BxuSAdYu.d.ts → manifest-BX7vyeYr.d.ts} +1 -1
  334. package/dist/{manifest-DBmuiJ91.d.ts → manifest-BYxKYFcH.d.ts} +1 -1
  335. package/dist/{manifest-BRFen7mE.js → manifest-Bb8S2tcs.js} +1 -1
  336. package/dist/{manifest-CfQ0nD_7.d.ts → manifest-Bcx4GSo0.d.ts} +1 -1
  337. package/dist/{manifest-fviCqeHj.d.ts → manifest-BeupHUUC.d.ts} +1 -1
  338. package/dist/{manifest-BAgvJODg.d.ts → manifest-BmI85ooO.d.ts} +1 -1
  339. package/dist/{manifest-Dh4AJeLl.d.ts → manifest-BoKnFQJK.d.ts} +1 -1
  340. package/dist/{manifest-DxPMUjhY.js → manifest-BvcIe5z_.js} +1 -1
  341. package/dist/{manifest-DWQaegX6.d.ts → manifest-BwwWlxof.d.ts} +1 -1
  342. package/dist/{manifest-BGD8cD6S.d.ts → manifest-Bx62hgMv.d.ts} +1 -1
  343. package/dist/{manifest-o-S9bj6i.d.ts → manifest-C1plIFth.d.ts} +1 -1
  344. package/dist/{manifest-upfKO7JJ.d.ts → manifest-C8-zVlM4.d.ts} +1 -1
  345. package/dist/{manifest-BCyCm0Z3.d.ts → manifest-CANbbLyM.d.ts} +1 -1
  346. package/dist/{manifest-DdxfAXvG.d.ts → manifest-CCQYjt7L.d.ts} +1 -1
  347. package/dist/{manifest-CAPSAozN.d.ts → manifest-CDIvE9Po.d.ts} +1 -1
  348. package/dist/{manifest-CDcaLpwB.d.ts → manifest-CJEzfFKP.d.ts} +1 -1
  349. package/dist/{manifest-BgVQ8xd3.d.ts → manifest-CLSlmLnn.d.ts} +1 -1
  350. package/dist/{manifest-KHudP5T5.d.ts → manifest-CV-9uzTU.d.ts} +1 -1
  351. package/dist/{manifest-Dc1eHEJV.d.ts → manifest-CYDtm5Yz.d.ts} +1 -1
  352. package/dist/{manifest-CcDqfRee.d.ts → manifest-Cb0BCYmS.d.ts} +1 -1
  353. package/dist/{manifest-BJs6pHI0.d.ts → manifest-Cc1r_IME.d.ts} +1 -1
  354. package/dist/{manifest-DGgFeLwd.d.ts → manifest-CeFiTTOx.d.ts} +1 -1
  355. package/dist/{manifest-CszjCxVJ.d.ts → manifest-Ch8G8wad.d.ts} +1 -1
  356. package/dist/{manifest-qs_U2rx3.d.ts → manifest-Ciu7htmT.d.ts} +1 -1
  357. package/dist/{manifest-H65OlXiB.js → manifest-CqJkmxrA.js} +1 -1
  358. package/dist/{manifest-xRlf8RQk.d.ts → manifest-CtvRTQoq.d.ts} +1 -1
  359. package/dist/{manifest-B24Ymu8p.d.ts → manifest-CxJtO760.d.ts} +1 -1
  360. package/dist/{manifest-BSkYvne3.d.ts → manifest-D2mvuqCe.d.ts} +1 -1
  361. package/dist/{manifest-B6EkxzC0.d.ts → manifest-D8o7ivPa.d.ts} +1 -1
  362. package/dist/{manifest-Cko_ySTe.d.ts → manifest-DAQAHnHf.d.ts} +1 -1
  363. package/dist/{manifest-2jLTjnVh.d.ts → manifest-DBUE3KbP.d.ts} +1 -1
  364. package/dist/{manifest-DCPKfwsh.d.ts → manifest-DElW3hfs.d.ts} +1 -1
  365. package/dist/{manifest-BrOXXz7k.d.ts → manifest-DFGW17h3.d.ts} +1 -1
  366. package/dist/{manifest-CL5QEu5B.d.ts → manifest-DGXOQgh3.d.ts} +1 -1
  367. package/dist/{manifest-BqBVKNjy.d.ts → manifest-DHV0zxVj.d.ts} +1 -1
  368. package/dist/{manifest-BHZEsuzC.d.ts → manifest-DKCc24tm.d.ts} +1 -1
  369. package/dist/{manifest-BxujRhsY.d.ts → manifest-DKk12W7u.d.ts} +1 -1
  370. package/dist/{manifest-BbC83cJB.d.ts → manifest-DOUGC7xP.d.ts} +1 -1
  371. package/dist/{manifest-BmLU5HtO.d.ts → manifest-DPQpIRCO.d.ts} +1 -1
  372. package/dist/{manifest-Csw2tVut.d.ts → manifest-DPXd-wZG.d.ts} +1 -1
  373. package/dist/{manifest-Ct6mHhg4.d.ts → manifest-D_tuEFvt.d.ts} +1 -1
  374. package/dist/{manifest-BtlEwVU4.d.ts → manifest-DbzB7NQP.d.ts} +1 -1
  375. package/dist/{manifest-Bg5Znp_u.d.ts → manifest-Dd0bmqd-.d.ts} +1 -1
  376. package/dist/{manifest-jSOZl7qT.d.ts → manifest-DebHyEiN.d.ts} +1 -1
  377. package/dist/{manifest-vG5iHhA5.d.ts → manifest-Doxj-elq.d.ts} +1 -1
  378. package/dist/{manifest-Oo7PegXK.d.ts → manifest-DujUV7Cu.d.ts} +1 -1
  379. package/dist/{manifest-DnGgZ9_F.d.ts → manifest-Duj_AN2H.d.ts} +1 -1
  380. package/dist/{manifest-CeoUoZDs.d.ts → manifest-DzN5YdbZ.d.ts} +1 -1
  381. package/dist/{manifest-Da1QZDY4.d.ts → manifest-P2Pzb1Jo.d.ts} +1 -1
  382. package/dist/{manifest-DPGJ2otk.d.ts → manifest-SEhx1LFs.d.ts} +1 -1
  383. package/dist/{manifest-DpF5bliV.d.ts → manifest-Se6qEw03.d.ts} +1 -1
  384. package/dist/{manifest-8JvRt8LB.d.ts → manifest-UHESrKBI.d.ts} +1 -1
  385. package/dist/{manifest-dXPq0ubY.d.ts → manifest-Ul7Uq35H.d.ts} +1 -1
  386. package/dist/{manifest-CH7g3uI3.d.ts → manifest-XpSrCsAV.d.ts} +1 -1
  387. package/dist/{manifest-2ZgzNTbP.d.ts → manifest-iRX3gQ3g.d.ts} +10 -1
  388. package/dist/{manifest-BUktyXMR.js → manifest-ok1ge1bM.js} +1 -1
  389. package/dist/{manifest-BHlKJbN2.d.ts → manifest-uRsVzPOJ.d.ts} +1 -1
  390. package/dist/{manifest-DevURQJj.js → manifest-vBvsSefP.js} +5 -1
  391. package/dist/{manifest-Bj5hfBA_.d.ts → manifest-x50nYF_4.d.ts} +1 -1
  392. package/dist/mapper/bin.js +6 -6
  393. package/dist/mcp/index.d.ts +1 -1
  394. package/dist/next/index.d.ts +7 -7
  395. package/dist/{operations-IzVAIMvs.d.ts → operations-Ce53BGJ0.d.ts} +1 -1
  396. package/dist/{options-CGQC7Wue.js → options-C1N8cOQU.js} +2 -1
  397. package/dist/{options-BTuDJ2RC.js → options-Cu6IqZ_n.js} +3 -1
  398. package/dist/{options-wBw_6uhd.js → options-Oo46IzNk.js} +2 -1
  399. package/dist/{orders-reads-Yo9GGjdv.js → orders-reads-2ozdZx1l.js} +108 -13
  400. package/dist/otel/index.js +4 -4
  401. package/dist/{payroll-export-T754eWz8.js → payroll-export-ChZY6W3w.js} +1 -1
  402. package/dist/{permissions-DxXor_NY.d.ts → permissions-Bi4WvjnM.d.ts} +1 -1
  403. package/dist/{ports-C5BEHQi6.d.ts → ports-TvLRuWgJ.d.ts} +1 -1
  404. package/dist/powersync/index.d.ts +3 -3
  405. package/dist/powersync/index.js +11 -3
  406. package/dist/preset/index.d.ts +4 -4
  407. package/dist/preset/index.js +3 -3
  408. package/dist/{preset-8Xh21Uyw.js → preset-CPUA9haY.js} +9 -3
  409. package/dist/{preview-B-mtB1ka.d.ts → preview-DvpfbcDY.d.ts} +2 -2
  410. package/dist/{project-C6JAWCnH.js → project-CkGGYXKd.js} +5 -5
  411. package/dist/{push-token-TWXWra8i.d.ts → push-token-GJUUE_6j.d.ts} +1 -1
  412. package/dist/query/index.d.ts +1 -1
  413. package/dist/react/index.d.ts +6 -6
  414. package/dist/react/native/index.d.ts +1 -1
  415. package/dist/react/server.d.ts +5 -5
  416. package/dist/realtime/index.d.ts +3 -3
  417. package/dist/{record-form-B9-7RhYz.d.ts → record-form-DhpdYw5e.d.ts} +1 -1
  418. package/dist/records/index.d.ts +7 -7
  419. package/dist/{sales-CLHrvNDm.js → sales-BhOckhix.js} +3 -3
  420. package/dist/server/index.d.ts +3 -3
  421. package/dist/solid/index.d.ts +5 -5
  422. package/dist/sql/index.d.ts +6 -6
  423. package/dist/sql/index.js +3 -3
  424. package/dist/{sql-Bam07JIf.js → sql-CFsIpR4t.js} +2515 -474
  425. package/dist/sqlite/index.d.ts +1 -1
  426. package/dist/ssr/index.d.ts +1 -1
  427. package/dist/svelte/index.d.ts +5 -5
  428. package/dist/tanstack-db/index.d.ts +1 -1
  429. package/dist/{tenant-BpJ2F2b_.d.ts → tenant-BTxVWIN6.d.ts} +1 -1
  430. package/dist/testing/index.d.ts +6 -6
  431. package/dist/testing/index.js +1 -1
  432. package/dist/{timeline-LHtdAJnM.d.ts → timeline-9r4mx0A2.d.ts} +2 -2
  433. package/dist/{topic-4KYLvvTB.d.ts → topic-_7QKu4b5.d.ts} +1 -1
  434. package/dist/{types-Dfa7b0KI.d.ts → types-C2qXUXjK.d.ts} +2 -2
  435. package/dist/vue/index.d.ts +5 -5
  436. package/dist/{watch-topic-C9DIO476.d.ts → watch-topic-Do0x41n3.d.ts} +1 -1
  437. package/dist/webmcp/index.d.ts +1 -1
  438. package/dist/yjs/index.d.ts +1 -1
  439. package/package.json +1 -1
  440. package/schemas/config-v1.json +64 -1
  441. package/skills/better-supabase-api/references/powersync.md +1 -0
  442. package/dist/cli/add-3L9NVEA3.js +0 -1
  443. package/dist/cli/powersync-COHj6FT8.js +0 -1
  444. package/dist/cli/seed-CRD1tYPA.js +0 -1
  445. package/dist/deadlines-values-B7ArpVJU.js +0 -127
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { c as BlockOf } from "./define-block-By-LUpM_.js";
2
+ import { c as BlockOf } from "./define-block-zK3QnPyG.js";
3
3
  import { C as BillingEventData, Dt as Events, O as BlockEventType, o as EventHub } from "./events-DN9PAcjq.js";
4
4
  import { n as BlockHooks } from "./block-hooks-FM9t7ol_.js";
5
5
  import { t as BlockTransport } from "./block-transport-CP4wAHU-.js";
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { c as BlockOf } from "./define-block-By-LUpM_.js";
2
+ import { c as BlockOf } from "./define-block-zK3QnPyG.js";
3
3
  import { Dt as Events, M as CommerceSubjectEventData, j as CommerceEventData } from "./events-DN9PAcjq.js";
4
4
  import { n as Money } from "./money-BgpAd7d3.js";
5
5
  import { t as StockDetail } from "./stock-detail-BRIt7CjU.js";
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { E as RecordBinding, M as RecordBindingWrite, c as BlockOf } from "./define-block-By-LUpM_.js";
2
+ import { E as RecordBinding, M as RecordBindingWrite, c as BlockOf } from "./define-block-zK3QnPyG.js";
3
3
  import { A as CollaborationEventData, Dt as Events } from "./events-DN9PAcjq.js";
4
4
  import { n as BlockHooks } from "./block-hooks-FM9t7ol_.js";
5
5
  import { t as BlockTransport } from "./block-transport-CP4wAHU-.js";
@@ -1,4 +1,4 @@
1
- import { c as BlockOf } from "./define-block-By-LUpM_.js";
1
+ import { c as BlockOf } from "./define-block-zK3QnPyG.js";
2
2
  import { A as CollaborationEventData, Dt as Events } from "./events-DN9PAcjq.js";
3
3
  import { b as createApprovals } from "./approvals-DnabEGo2.js";
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { c as BlockOf } from "./define-block-By-LUpM_.js";
2
+ import { c as BlockOf } from "./define-block-zK3QnPyG.js";
3
3
  import { Dt as Events } from "./events-DN9PAcjq.js";
4
4
  import { n as Money } from "./money-BgpAd7d3.js";
5
5
  import { n as BlockHooks } from "./block-hooks-FM9t7ol_.js";
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { E as RecordBinding, G as EntitySchema, L as RecordRowInput, M as RecordBindingWrite, c as BlockOf } from "./define-block-By-LUpM_.js";
2
+ import { E as RecordBinding, G as EntitySchema, L as RecordRowInput, M as RecordBindingWrite, c as BlockOf } from "./define-block-zK3QnPyG.js";
3
3
  import { A as CollaborationEventData, Dt as Events } from "./events-DN9PAcjq.js";
4
4
  import { n as ExtraFields, r as FieldsOf } from "./block-fields-Cq2MlJJD.js";
5
5
  import { n as BlockHooks } from "./block-hooks-FM9t7ol_.js";
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { _n as FormDefinition, bn as FormJson, c as BlockOf, xn as FormJsonSchema } from "./define-block-By-LUpM_.js";
2
+ import { _n as FormDefinition, bn as FormJson, c as BlockOf, xn as FormJsonSchema } from "./define-block-zK3QnPyG.js";
3
3
  import { Dt as Events, H as FormSubmissionEventData, V as FormEventData } from "./events-DN9PAcjq.js";
4
4
  import { r as FieldsOf } from "./block-fields-Cq2MlJJD.js";
5
5
  import { n as BlockHooks } from "./block-hooks-FM9t7ol_.js";
@@ -1,4 +1,4 @@
1
- import { c as BlockOf } from "./define-block-By-LUpM_.js";
1
+ import { c as BlockOf } from "./define-block-zK3QnPyG.js";
2
2
  import { n as BlockHooks } from "./block-hooks-FM9t7ol_.js";
3
3
  import { n as Logger } from "./logger-0LfhvwE4.js";
4
4
  import { t as AsyncResult } from "./result-CMqlHv82.js";
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { c as BlockOf } from "./define-block-By-LUpM_.js";
2
+ import { c as BlockOf } from "./define-block-zK3QnPyG.js";
3
3
  import { Dt as Events } from "./events-DN9PAcjq.js";
4
4
  import { n as BlockHooks } from "./block-hooks-FM9t7ol_.js";
5
5
  import { n as Logger } from "./logger-0LfhvwE4.js";
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { c as BlockOf } from "./define-block-By-LUpM_.js";
2
+ import { c as BlockOf } from "./define-block-zK3QnPyG.js";
3
3
  import { A as CollaborationEventData, Dt as Events } from "./events-DN9PAcjq.js";
4
4
  import { n as ExtraFields, r as FieldsOf } from "./block-fields-Cq2MlJJD.js";
5
5
  import { n as BlockHooks } from "./block-hooks-FM9t7ol_.js";
@@ -1,4 +1,4 @@
1
- import { c as BlockOf } from "./define-block-By-LUpM_.js";
1
+ import { c as BlockOf } from "./define-block-zK3QnPyG.js";
2
2
  import { Dt as Events, tt as SaasEventData } from "./events-DN9PAcjq.js";
3
3
  import { n as ExtraFields, r as FieldsOf } from "./block-fields-Cq2MlJJD.js";
4
4
  import { n as BlockHooks } from "./block-hooks-FM9t7ol_.js";
@@ -1,4 +1,4 @@
1
- import { c as BlockOf } from "./define-block-By-LUpM_.js";
1
+ import { c as BlockOf } from "./define-block-zK3QnPyG.js";
2
2
  import { y as createKnowledge } from "./knowledge-vrO4Poa5.js";
3
3
  /** The `knowledge` block's manifest (ADR 0029). */
4
4
  declare const knowledgeBlock: BlockOf<"knowledge", typeof createKnowledge, Record<never, never>, {
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { c as BlockOf } from "./define-block-By-LUpM_.js";
2
+ import { c as BlockOf } from "./define-block-zK3QnPyG.js";
3
3
  import { p as EnrichmentEventData } from "./block-events-records-BhqpDl-4.js";
4
4
  import { Dt as Events } from "./events-DN9PAcjq.js";
5
5
  import { n as BlockHooks } from "./block-hooks-FM9t7ol_.js";
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { c as BlockOf, ft as Notifier } from "./define-block-By-LUpM_.js";
2
+ import { c as BlockOf, ft as Notifier } from "./define-block-zK3QnPyG.js";
3
3
  import { Dt as Events, nt as SaasSubjectEventData } from "./events-DN9PAcjq.js";
4
4
  import { i as RowFields, r as FieldsOf } from "./block-fields-Cq2MlJJD.js";
5
5
  import { n as BlockHooks } from "./block-hooks-FM9t7ol_.js";
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { E as RecordBinding, G as EntitySchema, L as RecordRowInput, M as RecordBindingWrite, c as BlockOf } from "./define-block-By-LUpM_.js";
2
+ import { E as RecordBinding, G as EntitySchema, L as RecordRowInput, M as RecordBindingWrite, c as BlockOf } from "./define-block-zK3QnPyG.js";
3
3
  import { Dt as Events } from "./events-DN9PAcjq.js";
4
4
  import { n as BlockHooks } from "./block-hooks-FM9t7ol_.js";
5
5
  import { r as BlockTemporalOptions, s as BlockTenantOptions } from "./block-helpers-rTsuHt6v.js";
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { E as RecordBinding, Gt as CustomFields, c as BlockOf } from "./define-block-By-LUpM_.js";
2
+ import { E as RecordBinding, Gt as CustomFields, c as BlockOf } from "./define-block-zK3QnPyG.js";
3
3
  import { k as WorkItemEventData } from "./block-events-records-BhqpDl-4.js";
4
4
  import { Dt as Events } from "./events-DN9PAcjq.js";
5
5
  import { n as Money } from "./money-BgpAd7d3.js";
@@ -236,6 +236,15 @@ interface Tasks<F extends object = Record<never, never>> {
236
236
  assigneeIds?: readonly string[] | undefined;
237
237
  custom?: Readonly<Record<string, string>> | undefined;
238
238
  }): AsyncResult<WorkItem<F>>;
239
+ /**
240
+ * Copies a task and its assignees, checklist and child tasks. `overrides`
241
+ * replace the fields the caller edited. A template becomes a live task unless
242
+ * `overrides.templateId` is set.
243
+ */
244
+ clone(input: {
245
+ sourceId: string;
246
+ overrides?: Readonly<Record<string, unknown>> | undefined;
247
+ }): AsyncResult<WorkItem<F>>;
239
248
  /** Extra column changes are validated with the `fields` schema first. */
240
249
  update(input: {
241
250
  changes: readonly WorkItemChange<F>[];
@@ -9,7 +9,7 @@ import { B as textOf, C as optionalInstant, N as recordsOf, P as requiredInstant
9
9
  import { n as isRecord } from "./guards-CsRa6v57.js";
10
10
  import { n as compact } from "./sales-shared-Daic23zQ.js";
11
11
  import { t as decodeRead } from "./read-type-DV9TEXw8.js";
12
- import { i as inventorySqlOptions, t as INVENTORY_OVERVIEW_RESULT } from "./inventory-reads-BNDSYnuG.js";
12
+ import { i as inventorySqlOptions, t as INVENTORY_OVERVIEW_RESULT } from "./inventory-reads-DEw2Kbff.js";
13
13
  import { d as money } from "./money-hWAOR9jq.js";
14
14
  // src/blocks/inventory/events.ts
15
15
  /** The `inventory` block's event types, for its manifest and `onBlockEvent`. */
@@ -1,4 +1,4 @@
1
- import { c as BlockOf } from "./define-block-By-LUpM_.js";
1
+ import { c as BlockOf } from "./define-block-zK3QnPyG.js";
2
2
  import { Dt as Events, rt as SchedulingEventData } from "./events-DN9PAcjq.js";
3
3
  import { g as createBookings } from "./bookings-CBRjx_ZD.js";
4
4
  /** The events of the `bookings` block: type to data. */
@@ -4,7 +4,7 @@ import { a as ok, r as err, t as AsyncResult } from "./result-DrBaeIVt.js";
4
4
  import { n as narrowClients, t as defineConversionAction } from "./conversion-BLa2VnqI.js";
5
5
  import { n as entitySchema } from "./entity-schema-DEIz0I8i.js";
6
6
  import { n as event, t as defineEvents } from "./event-map-DLajpFiJ.js";
7
- import { t as tasksSqlOptions } from "./options-wBw_6uhd.js";
7
+ import { t as tasksSqlOptions } from "./options-Oo46IzNk.js";
8
8
  import { t as defineRecordBinding } from "./record-bindings-jTZw-GVe.js";
9
9
  import { t as expandRule } from "./recurrence-dskDvlcP.js";
10
10
  import { t as temporal } from "./temporal-required-DK3ImZW6.js";
@@ -557,6 +557,10 @@ function createTasks(options) {
557
557
  return ok(created);
558
558
  });
559
559
  },
560
+ clone: ({ sourceId, overrides }) => call("clone_task", {
561
+ source: sourceId,
562
+ overrides: overrides ?? null
563
+ }, itemOf).andThen(fields.row),
560
564
  update: ({ changes, ...updateOptions }) => AsyncResult.from(async () => {
561
565
  for (const change of changes) {
562
566
  if (BUILT_IN.has(change.field)) continue;
@@ -1,4 +1,4 @@
1
- import { c as BlockOf } from "./define-block-By-LUpM_.js";
1
+ import { c as BlockOf } from "./define-block-zK3QnPyG.js";
2
2
  import { r as FieldsOf } from "./block-fields-Cq2MlJJD.js";
3
3
  import { n as BlockHooks } from "./block-hooks-FM9t7ol_.js";
4
4
  import { t as BlockTransport } from "./block-transport-CP4wAHU-.js";
@@ -1,10 +1,10 @@
1
- import { t as loadSnapshot } from "../cli/snapshot-B-1tPbV4.js";
2
- import { i as discoverConfig, s as loadConfig } from "../cli/config-FN5Cp861.js";
3
- import { s as schemaStampPath } from "../cli/content-mapper-QVJJto5U.js";
1
+ import { t as loadSnapshot } from "../cli/snapshot-BZGZ9pB-.js";
2
+ import { i as discoverConfig, s as loadConfig } from "../cli/config-DdkxiGjH.js";
3
+ import { s as schemaStampPath } from "../cli/content-mapper-BlOMmIM2.js";
4
4
  import { i as parseEnv, n as configEnvironment } from "../cli/env-BLwQ6srP.js";
5
- import { i as renderTypesModule, t as mapperFilePath } from "../cli/render-647qdnrX.js";
6
- import { a as lastTypesModule, c as writeAtomic, s as typesModuleKey } from "../cli/cache-C1nAFZNW.js";
7
- import { t as VERSION } from "../cli/version-DWDoiP5_.js";
5
+ import { i as renderTypesModule, t as mapperFilePath } from "../cli/render-DyWVslCM.js";
6
+ import { a as lastTypesModule, c as writeAtomic, s as typesModuleKey } from "../cli/cache-EFwNdKib.js";
7
+ import { t as VERSION } from "../cli/version-D1sJX6_6.js";
8
8
  import { existsSync, realpathSync } from "node:fs";
9
9
  import { basename, dirname, join, resolve } from "node:path";
10
10
  import { createHash } from "node:crypto";
@@ -1,4 +1,4 @@
1
1
  import { r as GuardOptions } from "../respond-OjgB7zlB.js";
2
2
  import { l as ResourceRouteOptions } from "../resource-types-BmZx8q4a.js";
3
- import { _ as ToolResult, a as ToolDecision, c as ToolResourceOptions, d as defineTool, f as MCP_PROTOCOL_VERSION, g as ToolInfo, h as ToolAnnotations, i as ToolContext, l as ToolResources, m as ServerDescription, n as McpOptions, o as ToolDefinition, p as ProtocolServer, r as McpTool, s as ToolRef, t as BetterMcp, u as createMcp, v as answerLine, y as answerMessage } from "../index-D7FXhn2i.js";
3
+ import { _ as ToolResult, a as ToolDecision, c as ToolResourceOptions, d as defineTool, f as MCP_PROTOCOL_VERSION, g as ToolInfo, h as ToolAnnotations, i as ToolContext, l as ToolResources, m as ServerDescription, n as McpOptions, o as ToolDefinition, p as ProtocolServer, r as McpTool, s as ToolRef, t as BetterMcp, u as createMcp, v as answerLine, y as answerMessage } from "../index-CocISf2h.js";
4
4
  export { type BetterMcp, type GuardOptions, MCP_PROTOCOL_VERSION, type McpOptions, type McpTool, type ProtocolServer, type ResourceRouteOptions, type ServerDescription, type ToolAnnotations, type ToolContext, type ToolDecision, type ToolDefinition, type ToolInfo, type ToolRef, type ToolResourceOptions, type ToolResources, type ToolResult, answerLine, answerMessage, createMcp, defineTool };
@@ -6,24 +6,24 @@ import { c as Impersonator, n as AuthSession, o as toSession } from "../view-CVX
6
6
  import { n as BlockDataOf, r as BlockMethodName, t as BlockArgsOf } from "../block-method-BgPAdisB.js";
7
7
  import { b as DbError, f as Result } from "../result-CMqlHv82.js";
8
8
  import { i as tagFor, t as TagOptions } from "../tags-BahXc6bW.js";
9
- import { r as LiveCountSeed, t as CountRunner } from "../index-D9Sb8Ju5.js";
10
- import { t as tenantOf } from "../tenant-BpJ2F2b_.js";
11
- import { r as permissionsOf, t as PermissionsOfOptions } from "../permissions-DxXor_NY.js";
12
- import { M as BindingName, N as BindingOf, S as RecordWriteInput, _ as RecordTypeBlocks, b as RecordTypeWriteInput, d as BindingWritesOf, f as Plain, g as RecordType, h as RecordCan, m as PlainBindings, x as RecordTypeWriteOutput } from "../index-DzjugbCf.js";
9
+ import { r as LiveCountSeed, t as CountRunner } from "../index-DNitLhgU.js";
10
+ import { t as tenantOf } from "../tenant-BTxVWIN6.js";
11
+ import { r as permissionsOf, t as PermissionsOfOptions } from "../permissions-Bi4WvjnM.js";
12
+ import { M as BindingName, N as BindingOf, S as RecordWriteInput, _ as RecordTypeBlocks, b as RecordTypeWriteInput, d as BindingWritesOf, f as Plain, g as RecordType, h as RecordCan, m as PlainBindings, x as RecordTypeWriteOutput } from "../index-D_g2loq-.js";
13
13
  import { M as BootstrapCallOptions, d as SharedServer, i as ContextOptions, j as Bootstrap, k as Access, r as BetterServer, s as ServerContext, t as AdminDb, u as ServerOptions } from "../server-types-Cf4eX4kr.js";
14
14
  import { t as AuthOutageHook } from "../session-CfOsLGD_.js";
15
15
  import { a as AuthorizedContext, c as ResourceLoaderContext, i as AuthorizeOptions, l as Unwrapped, n as ActionParsed, r as ActionResult, t as ActionInput } from "../kit-EFsCynmb.js";
16
16
  import { t as ResourceMap } from "../resources-Dz9pCv6I.js";
17
17
  import { n as AuthKind, r as GuardOptions } from "../respond-OjgB7zlB.js";
18
18
  import { a as SupportOptions, c as SupportStartRequest, l as supportSessions, o as SupportPolicy, s as SupportSessions, t as ActiveSupport } from "../support-DYNFoAZ8.js";
19
- import { Z as BlockClientSource, k as RecordBindingOptions } from "../define-block-By-LUpM_.js";
19
+ import { Z as BlockClientSource, k as RecordBindingOptions } from "../define-block-zK3QnPyG.js";
20
20
  import { c as ListParseOptions, m as ListSearchParams } from "../list-query-B4qI5eE8.js";
21
- import { c as RecordListCells, n as Timeline, o as RecordList, u as RecordListPage } from "../timeline-LHtdAJnM.js";
21
+ import { c as RecordListCells, n as Timeline, o as RecordList, u as RecordListPage } from "../timeline-9r4mx0A2.js";
22
22
  import { n as AmrEntry, t as Aal } from "../mfa-BbzlzjEV.js";
23
23
  import { i as ResourceContext, l as ResourceRouteOptions, o as ResourceHooks, r as ResourceAction, t as ActionArgs } from "../resource-types-BmZx8q4a.js";
24
24
  import { t as defineAction } from "../resource-execute-BVQQHOLb.js";
25
25
  import { n as supportOf, t as SupportView } from "../support-view-Dn_YTGV4.js";
26
- import { r as MembershipClaim } from "../entitlements-Go8BHqhr.js";
26
+ import { r as MembershipClaim } from "../entitlements-QwMag409.js";
27
27
  import { t as Validated } from "../shared-DsBcvj6q.js";
28
28
  import { AnyEntry, Contributions } from "@supabase/middleware";
29
29
  import { UserClaims } from "@supabase/server";
@@ -1,4 +1,4 @@
1
- import { r as AuthorizationOperation } from "./authorization-Bk6cLL5f.js";
1
+ import { r as AuthorizationOperation } from "./authorization-Hh9xUm0r.js";
2
2
  /** Operations by name, as `authorization.operations` or a module's own defaults. */
3
3
  type OperationTable = Readonly<Record<string, AuthorizationOperation>>;
4
4
  export { OperationTable as t };
@@ -2,6 +2,7 @@ import { n as blockOptions, r as option } from "./options-Z-bd_H1E.js";
2
2
  // src/blocks/templates/options.ts
3
3
  const templatesSqlOptions = blockOptions({
4
4
  brand: option.unknown(),
5
- extraColumns: option.extraColumns()
5
+ extraColumns: option.extraColumns(),
6
+ types: option.unknown()
6
7
  });
7
8
  export { templatesSqlOptions as t };
@@ -23,6 +23,8 @@ const invoicesSqlOptions = blockOptions({
23
23
  purchaseCreditPrefix: option.string({ default: "BCN-" }),
24
24
  matchTolerance: option.unknown(),
25
25
  discountMatrix: option.boolean({ default: false }),
26
- searchColumn: option.boolean({ default: false })
26
+ searchColumn: option.boolean({ default: false }),
27
+ templates: option.boolean({ default: false }),
28
+ requireParty: option.boolean({ default: false })
27
29
  });
28
30
  export { invoicesSqlOptions as t };
@@ -7,6 +7,7 @@ const tasksSqlOptions = blockOptions({
7
7
  authorCanDelete: option.boolean({ default: true }),
8
8
  notify: option.boolean({ default: true }),
9
9
  actionPath: option.string(),
10
- searchColumn: option.boolean({ default: false })
10
+ searchColumn: option.boolean({ default: false }),
11
+ templates: option.boolean({ default: false })
11
12
  });
12
13
  export { tasksSqlOptions as t };
@@ -1,8 +1,8 @@
1
1
  import { n as isRecord } from "./guards-CsRa6v57.js";
2
2
  import { a as sqlString, i as sqlIdent } from "./template-1e2akYYK.js";
3
- import { $ as updateExtraColumns, S as extraFieldsArg, T as insertExtraColumns, h as columnsObject, m as columnRef, r as NOTHING, tt as userGrant, w as fail } from "./shared-DwShIqeQ.js";
3
+ import { $ as updateExtraColumns, S as extraFieldsArg, T as insertExtraColumns, Y as splitTable, h as columnsObject, m as columnRef, r as NOTHING, tt as userGrant, w as fail } from "./shared-DwShIqeQ.js";
4
4
  import { n as blockOptions, r as option } from "./options-Z-bd_H1E.js";
5
- import { l as tenantColumnOf, t as uniqueContributions } from "./contributions-DPjEWWpE.js";
5
+ import { l as tenantColumnOf, o as registeredSubjects, t as uniqueContributions } from "./contributions-olp7tVYC.js";
6
6
  import { t as RANK_ALPHABET } from "./rank-keys-CEBzd9Xa.js";
7
7
  import { t as declareRead } from "./reads-CWVqw2JB.js";
8
8
  import { c as stockHistory } from "./inventory-stock-DadU4mb2.js";
@@ -11,7 +11,8 @@ const ordersSqlOptions = blockOptions({
11
11
  paymentWindowMinutes: option.number({ default: 30 }),
12
12
  extraColumns: option.extraColumns(),
13
13
  kitchen: option.boolean({ default: false }),
14
- discountMatrix: option.boolean({ default: false })
14
+ discountMatrix: option.boolean({ default: false }),
15
+ templates: option.boolean({ default: false })
15
16
  });
16
17
  // src/sql/rank-sql.ts
17
18
  /** The `~` pattern a rank key matches, the same as `isRankKey`. */
@@ -69,6 +70,81 @@ function rankSql(type) {
69
70
  pattern: RANK_KEY_PATTERN
70
71
  };
71
72
  }
73
+ // src/sql/template-rows-sql.ts
74
+ /**
75
+ * The template column of a subject, when the table holds template rows. A
76
+ * string is the column; an object also names the child tables a clone copies.
77
+ */
78
+ function templateRowsOf(config) {
79
+ const value = config.template;
80
+ if (value === void 0) return;
81
+ if (typeof value === "string") return {
82
+ column: value,
83
+ children: []
84
+ };
85
+ return {
86
+ column: value.column,
87
+ children: value.children ?? []
88
+ };
89
+ }
90
+ /** `alias.column is null`: the row is a live record, not a template. */
91
+ function isLiveRow(alias, column) {
92
+ return `${alias}.${sqlIdent(column)} is null`;
93
+ }
94
+ /**
95
+ * An early return for a template row, or "" when the subject has no template
96
+ * column. The block ends in a newline so the next statement keeps its indent.
97
+ */
98
+ function templateTriggerReturn(column, value) {
99
+ return column === void 0 ? "" : ` if new.${sqlIdent(column)} is not null then
100
+ return ${value};
101
+ end if;
102
+ `;
103
+ }
104
+ /** ` and alias.template is null` when the subject holds template rows. */
105
+ function excludeTemplates(config, alias) {
106
+ const column = templateRowsOf(config)?.column;
107
+ return column === void 0 ? "" : ` and ${isLiveRow(alias, column)}`;
108
+ }
109
+ /**
110
+ * The `template` column: a uuid that points at the templates table. Unique on
111
+ * the root table of a type, so one template owns one root row; bundle members
112
+ * share the id and are not unique.
113
+ */
114
+ function templateColumnSql(column, templates, unique) {
115
+ return `${sqlIdent(column)} uuid${unique ? " unique" : ""} references ${templates} (id) on delete cascade`;
116
+ }
117
+ /** The column that records which template a live row was made from. */
118
+ function sourceTemplateColumnSql(column, templates) {
119
+ return `${sqlIdent(column)} uuid references ${templates} (id) on delete set null`;
120
+ }
121
+ /**
122
+ * A before-update trigger that refuses a change of the template column, so a
123
+ * row never switches between a template and a live record.
124
+ */
125
+ function templateGuardSql(options) {
126
+ const column = sqlIdent(options.column);
127
+ return `create or replace function ${options.fn}()
128
+ returns trigger
129
+ language plpgsql
130
+ as $$
131
+ begin
132
+ if tg_op = 'UPDATE' and new.${column} is distinct from old.${column} then
133
+ ${fail(options.hint, "A row cannot change between a template and a live record", "23514")}
134
+ end if;
135
+ return new;
136
+ end;
137
+ $$;
138
+
139
+ drop trigger if exists ${options.trigger} on ${options.table};
140
+ create trigger ${options.trigger}
141
+ before update of ${column} on ${options.table}
142
+ for each row execute function ${options.fn}();`;
143
+ }
144
+ /** A partial index over the live rows, the ones lists read by default. */
145
+ function liveRowsIndex(name, table, columns, template) {
146
+ return `create index if not exists ${sqlIdent(name)} on ${table} (${columns}) where ${sqlIdent(template)} is null;`;
147
+ }
72
148
  // src/sql/modules/numbering-entities.ts
73
149
  const ENTITY = /^[a-z][a-z0-9_]*$/;
74
150
  const PREDICATE = /^[A-Za-z0-9_.'"=<>!(), \t-]+$/;
@@ -289,11 +365,12 @@ function assignNumberSql(ctx, entity, tenant, target, fallback, at = "now()", op
289
365
  const sequence = sequenceFormatOf(ctx, entity, tenant);
290
366
  const scope = options.scope ?? "''";
291
367
  const scoped = scope !== "''";
368
+ const gate = (body) => options.when === void 0 ? body : `if ${options.when} then\n ${body.replaceAll("\n", "\n ")}\nend if;`;
292
369
  if (sequence !== void 0) {
293
370
  const next = ctx.of("numbering").fn("next_number");
294
371
  const issued = sequence.assigns ? `
295
372
  perform set_config('better_supabase.issued_number', ${sqlString(entity)} || chr(31) || ${target.seq}::text || chr(31) || ${target.identifier}, true);` : "";
296
- return withFixedNumber(ctx, entity, tenant, {
373
+ return gate(withFixedNumber(ctx, entity, tenant, {
297
374
  seq: target.seq,
298
375
  text: target.identifier
299
376
  }, `${target.seq} := ${next}(${tenant}, ${sqlString(entity)}, ${at}, ${scope});
@@ -303,9 +380,9 @@ function assignNumberSql(ctx, entity, tenant, target, fallback, at = "now()", op
303
380
  registered: true,
304
381
  ...options.fixed === void 0 ? {} : { fixed: options.fixed },
305
382
  after: issued
306
- });
383
+ }));
307
384
  }
308
- return withFixedNumber(ctx, entity, tenant, {
385
+ return gate(withFixedNumber(ctx, entity, tenant, {
309
386
  seq: target.seq,
310
387
  text: target.identifier
311
388
  }, `perform pg_catalog.pg_advisory_xact_lock(pg_catalog.hashtextextended(${tenant}::text || ${sqlString(`:${entity}`)}${scoped ? ` || ':' || ${scope}` : ""}, 0));
@@ -314,7 +391,7 @@ function assignNumberSql(ctx, entity, tenant, target, fallback, at = "now()", op
314
391
  at,
315
392
  scope,
316
393
  ...options.fixed === void 0 ? {} : { fixed: options.fixed }
317
- });
394
+ }));
318
395
  }
319
396
  /**
320
397
  * Wraps `normal`, the SQL that takes the next number, so an importer's fixed
@@ -340,6 +417,17 @@ function withFixedNumber(ctx, entity, tenant, target, normal, options) {
340
417
  ${normal}
341
418
  end if;`;
342
419
  }
420
+ /**
421
+ * `assignOn`, and a template row never takes a number when the numbered table
422
+ * is a subject with a template column.
423
+ */
424
+ function assignWhen(ctx, item) {
425
+ if (item.table === void 0) return item.assignOn;
426
+ const [schema, table] = splitTable(item.table);
427
+ const subject = registeredSubjects(ctx.subjects, ctx.naming).find((entry) => entry.schema === schema && entry.table === table);
428
+ const column = subject === void 0 ? void 0 : templateRowsOf(subject.config)?.column;
429
+ return column === void 0 ? item.assignOn : `(${item.assignOn}) and new.${sqlIdent(column)} is null`;
430
+ }
343
431
  // src/sql/column-defaults.ts
344
432
  const QUOTED_IDENT = /^"(.*)"$/s;
345
433
  const bareName = (ident) => QUOTED_IDENT.exec(ident)?.[1]?.replaceAll("\"\"", "\"") ?? ident;
@@ -1347,11 +1435,18 @@ function sequenceFormat(ctx, entity, tenant) {
1347
1435
  * one more than the tenant's highest under a transaction lock, as plain
1348
1436
  * digits.
1349
1437
  */
1350
- function assignNumber(ctx, entity, tenant, target) {
1438
+ /** Template rows are on for orders (ADR 0244). */
1439
+ function orderTemplatesOn(ctx) {
1440
+ if (!ctx.flag("templates", false)) return false;
1441
+ if (!ctx.installed("templates")) throw new TypeError("blocks.orders.options.templates needs the templates block");
1442
+ return ctx.has("orders", "template");
1443
+ }
1444
+ function assignNumber(ctx, entity, tenant, target, when) {
1351
1445
  const format = sequenceFormat(ctx, entity, tenant);
1446
+ const gate = (body) => when === void 0 ? body : `if ${when} then\n ${body.replaceAll("\n", "\n ")}\nend if;`;
1352
1447
  if (format !== void 0) {
1353
1448
  const next = ctx.of("numbering").fn("next_number");
1354
- return withFixedNumber(ctx, entity, tenant, {
1449
+ return gate(withFixedNumber(ctx, entity, tenant, {
1355
1450
  seq: target.seq,
1356
1451
  text: target.number
1357
1452
  }, `${target.seq} := ${next}(${tenant}, ${sqlString(entity)}, now());
@@ -1359,11 +1454,11 @@ function assignNumber(ctx, entity, tenant, target) {
1359
1454
  at: "now()",
1360
1455
  scope: "''",
1361
1456
  registered: true
1362
- });
1457
+ }));
1363
1458
  }
1364
1459
  const o = columns(ctx, "orders");
1365
1460
  const column = entity === "order" ? o("sequence") : o("invoiceSequence");
1366
- return withFixedNumber(ctx, entity, tenant, {
1461
+ return gate(withFixedNumber(ctx, entity, tenant, {
1367
1462
  seq: target.seq,
1368
1463
  text: target.number
1369
1464
  }, `perform pg_catalog.pg_advisory_xact_lock(pg_catalog.hashtextextended(${tenant}::text || ':commerce:${entity}', 0));
@@ -1371,7 +1466,7 @@ function assignNumber(ctx, entity, tenant, target) {
1371
1466
  ${target.number} := ${target.seq}::text;`, {
1372
1467
  at: "now()",
1373
1468
  scope: "''"
1374
- });
1469
+ }));
1375
1470
  }
1376
1471
  /**
1377
1472
  * `${fn("order_transition")}(order, to)`: moves an order's status along the
@@ -1534,4 +1629,4 @@ $$;
1534
1629
  ${userGrant(`${fn}(${ctx.idType}, integer)`)}
1535
1630
  `;
1536
1631
  }
1537
- export { scopeSql as A, variantExtras as C, withColumnDefault as D, uniqueViolationOn as E, RANK_KEY_PATTERN as F, rankAfter as I, rankBackfill as L, withFixedNumber as M, sequenceEntry as N, assignNumberSql as O, sequences as P, ordersSqlOptions as R, storefrontOption as S, columnDefaults as T, guard$1 as _, asService as a, productFunctions as b, guard as c, paymentWindow as d, serviceOnlyGuard as f, categoryExtras as g, amountOf$1 as h, amountOf as i, sequenceFormatOf as j, hasLegalEntityColumn as k, orderFields as l, SLUG as m, ORDER_STATUS_BOARD_RESULT as n, assignNumber as o, transitionFunction as p, orderReads as r, columns as s, ORDER_READS as t, orderPayload as u, optionFunctions as v, catalogRank as w, productSettingTypes as x, productExtras as y };
1632
+ export { assignWhen as A, templateColumnSql as B, storefrontOption as C, uniqueViolationOn as D, columnDefaults as E, sequenceEntry as F, rankAfter as G, templateRowsOf as H, sequences as I, rankBackfill as K, excludeTemplates as L, scopeSql as M, sequenceFormatOf as N, withColumnDefault as O, withFixedNumber as P, liveRowsIndex as R, productSettingTypes as S, catalogRank as T, templateTriggerReturn as U, templateGuardSql as V, RANK_KEY_PATTERN as W, categoryExtras as _, asService as a, productExtras as b, guard as c, orderTemplatesOn as d, paymentWindow as f, amountOf$1 as g, SLUG as h, amountOf as i, hasLegalEntityColumn as j, assignNumberSql as k, orderFields as l, transitionFunction as m, ORDER_STATUS_BOARD_RESULT as n, assignNumber as o, serviceOnlyGuard as p, ordersSqlOptions as q, orderReads as r, columns as s, ORDER_READS as t, orderPayload as u, guard$1 as v, variantExtras as w, productFunctions as x, optionFunctions as y, sourceTemplateColumnSql as z };
@@ -39,9 +39,9 @@ function systemOf(executor) {
39
39
  * ```
40
40
  */
41
41
  function otel(options = {}) {
42
- const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.54.0");
42
+ const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.56.0");
43
43
  let histogram;
44
- if (options.metrics !== false) histogram = (options.meter ?? metrics.getMeter("better-supabase", "0.54.0")).createHistogram("db.client.operation.duration", {
44
+ if (options.metrics !== false) histogram = (options.meter ?? metrics.getMeter("better-supabase", "0.56.0")).createHistogram("db.client.operation.duration", {
45
45
  unit: "s",
46
46
  description: "Duration of database client operations.",
47
47
  advice: { explicitBucketBoundaries: [
@@ -230,7 +230,7 @@ function otel(options = {}) {
230
230
  * `betterSupabase.events`. Returns a function that stops listening.
231
231
  */
232
232
  function traceAuth(betterSupabase, options = {}) {
233
- const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.54.0");
233
+ const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.56.0");
234
234
  const offAuth = betterSupabase.events.on("auth", (event) => {
235
235
  const span = tracer.startSpan("auth.resolve", {
236
236
  kind: SpanKind.INTERNAL,
@@ -269,7 +269,7 @@ function traceAuth(betterSupabase, options = {}) {
269
269
  * `*.denied`) set an error status. Returns a function that stops listening.
270
270
  */
271
271
  function traceBlockEvents(betterSupabase, options = {}) {
272
- const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.54.0");
272
+ const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.56.0");
273
273
  return betterSupabase.events.on("block", (event) => {
274
274
  const attributes = {
275
275
  ...options.attributes,
@@ -4,7 +4,7 @@ import { i as fillTemplate } from "./access-sql-DH2LbcQe.js";
4
4
  import { c as renderPolicy, i as policy } from "./policy-B9UWDXMF.js";
5
5
  import { C as extraFieldsJson, I as quotedTable, O as lockTable, S as extraFieldsArg, W as schemaPreamble, Y as splitTable, a as SCHEMA, m as columnRef, nt as withExtraFields, o as SERVICE_CALLER, q as sha256HexSql, rt as writeExtraColumns, tt as userGrant, u as addExtraColumns, w as fail } from "./shared-DwShIqeQ.js";
6
6
  import { n as blockOptions, r as option } from "./options-Z-bd_H1E.js";
7
- import { d as subjectPermissionKey, f as subjectPermissionOf, r as checkCall, t as uniqueContributions } from "./contributions-DPjEWWpE.js";
7
+ import { d as subjectPermissionKey, f as subjectPermissionOf, r as checkCall, t as uniqueContributions } from "./contributions-olp7tVYC.js";
8
8
  import { t as SUBJECT_TYPE_PATTERN } from "./subject-type-BarjdHZV.js";
9
9
  import { a as moduleOperations, n as OPERATIONS, r as accessModel } from "./permissions-model-Dh9-Zzfy.js";
10
10
  // src/sql/column-type.ts
@@ -1,4 +1,4 @@
1
- import { o as ClaimsRecord, s as ClaimsSource } from "./entitlements-Go8BHqhr.js";
1
+ import { o as ClaimsRecord, s as ClaimsSource } from "./entitlements-QwMag409.js";
2
2
  interface PermissionsOfOptions {
3
3
  /**
4
4
  * The claim holding `{ [tenantId]: string[] }`, as
@@ -1,4 +1,4 @@
1
- import { n as TopicPort } from "./watch-topic-C9DIO476.js";
1
+ import { n as TopicPort } from "./watch-topic-Do0x41n3.js";
2
2
  import { t as AsyncResult } from "./result-CMqlHv82.js";
3
3
  import { SupabaseClient } from "@supabase/supabase-js";
4
4
  /**
@@ -1,10 +1,10 @@
1
1
  import { C as quoteSqliteIdent, S as likeToGlob, _ as SqliteQuery, a as postgrestTimestamp, b as SqliteValue, c as sqliteCompiler, d as SqliteDecode, f as SqliteInsertPlan, g as SqlitePlan, h as SqliteNested, i as fromSqliteError, l as SqliteColumn, m as SqliteKeys, n as SqliteDatabaseLike, o as CheckSqliteOptions, p as SqliteKeyedPlan, r as SqliteExecutorOptions, s as checkSqlite, t as SqliteContextLike, u as SqliteCompilerOptions, v as SqliteReturning, w as sqliteValue, x as compileSqlite, y as SqliteSelectPlan } from "../executor-CewY2EQK.js";
2
2
  import { Vt as Executor } from "../types-BlBju7Wa.js";
3
- import { C as UploadRouteOptions, E as uploadRoute, S as UploadRoute, T as uploadOutcome, _ as UploadConnectorOptions, b as UploadOutcome, c as LocalTablesOption, d as CreateUploadRepository, f as CrudEntryLike, g as UploadConnector, h as RejectedStore, m as RejectedChange, n as DataEngine, p as CrudQueueLike, s as LiveEngineOptions, v as UploadErrorContext, w as createUploadConnector, x as UploadRepository, y as UploadFunction } from "../data-engine-BKO5EAzN.js";
4
- import { t as AuthSnapshot } from "../bind-DWElQa6I.js";
3
+ import { C as UploadRouteOptions, E as uploadRoute, S as UploadRoute, T as uploadOutcome, _ as UploadConnectorOptions, b as UploadOutcome, c as LocalTablesOption, d as CreateUploadRepository, f as CrudEntryLike, g as UploadConnector, h as RejectedStore, m as RejectedChange, n as DataEngine, p as CrudQueueLike, s as LiveEngineOptions, v as UploadErrorContext, w as createUploadConnector, x as UploadRepository, y as UploadFunction } from "../data-engine-0uVsKWaB.js";
4
+ import { t as AuthSnapshot } from "../bind-CC5-eBT-.js";
5
5
  import { t as BlockTransport } from "../block-transport-CP4wAHU-.js";
6
6
  import { b as DbError, f as Result } from "../result-CMqlHv82.js";
7
- import { n as TopicPort } from "../watch-topic-C9DIO476.js";
7
+ import { n as TopicPort } from "../watch-topic-Do0x41n3.js";
8
8
  import { o as EngagementSubject } from "../activities-DPq0U9Nb.js";
9
9
  import { a as MedicationAsNeededInput, r as MedicationAdministrationInput } from "../medications-0Uuwu3k2.js";
10
10
  import { d as ObservationInput, t as Observation } from "../observations-ilWeRQ20.js";
@@ -272,6 +272,14 @@ function sessionError(cause) {
272
272
  function unsupportedOp(entry, route) {
273
273
  return err(dbError("unsupported", `better-supabase: a ${route} upload route can't replay PowerSync op ${entry.op}`));
274
274
  }
275
+ /**
276
+ * A replay writes what the device recorded, including the columns the
277
+ * timestamps, actor and trash plugins fill: the local repository stamped them
278
+ * offline, so refusing them would refuse every queued insert. The plugins guard
279
+ * against mistakes in app code, not untrusted clients; a column the server must
280
+ * own needs its trigger (`bsb_updated_at`, `track_actor`).
281
+ */
282
+ const REPLAY = { override: true };
275
283
  function uploadRoute(repository, options = {}) {
276
284
  const put = options.put ?? "upsert";
277
285
  return async (entry) => {
@@ -283,11 +291,11 @@ function uploadRoute(repository, options = {}) {
283
291
  switch (entry.op) {
284
292
  case "PUT":
285
293
  if (put === "create" && "create" in repository) {
286
- const result = await repository.create(row);
294
+ const result = await repository.create(row, REPLAY);
287
295
  return !result.ok && result.error.kind === "conflict" ? ok(void 0) : result;
288
296
  }
289
- return "upsert" in repository ? repository.upsert(row) : unsupportedOp(entry, put);
290
- case "PATCH": return put === "upsert" && "update" in repository ? repository.update(id, entry.opData ?? {}) : unsupportedOp(entry, put);
297
+ return "upsert" in repository ? repository.upsert(row, REPLAY) : unsupportedOp(entry, put);
298
+ case "PATCH": return put === "upsert" && "update" in repository ? repository.update(id, entry.opData ?? {}, REPLAY) : unsupportedOp(entry, put);
291
299
  case "DELETE": return repository.delete(id);
292
300
  default: return err(dbError("unsupported", `better-supabase: unknown PowerSync op ${entry.op}`));
293
301
  }