better-supabase 0.20.0 → 0.21.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 (488) hide show
  1. package/dist/{adapter-CfuBICuG.js → adapter-DZJZTY6g.js} +2 -2
  2. package/dist/{ai-cache-BuNbWEFI.js → ai-cache-BFRKxgZ4.js} +2 -2
  3. package/dist/{ai-files-DeMWQfzs.js → ai-files-m_2z3rH1.js} +3 -3
  4. package/dist/{ai-schedules-Bp-U0cZG.d.ts → ai-schedules-7uQNMXve.d.ts} +1 -1
  5. package/dist/ai-sdk/agents/index.d.ts +2 -2
  6. package/dist/ai-sdk/batches/index.js +3 -3
  7. package/dist/ai-sdk/cache/index.js +1 -1
  8. package/dist/ai-sdk/chat/index.js +1 -1
  9. package/dist/ai-sdk/files/index.js +2 -2
  10. package/dist/ai-sdk/index.js +3 -3
  11. package/dist/ai-sdk/mcp/index.js +2 -2
  12. package/dist/ai-sdk/workflow/index.js +2 -2
  13. package/dist/{api-BIw5g_4V.d.ts → api-Cj4W_pqT.d.ts} +1 -1
  14. package/dist/{app-tables-oYkgtcRM.d.ts → app-tables-C5HjXs2k.d.ts} +1 -1
  15. package/dist/astro/index.d.ts +3 -3
  16. package/dist/astro/index.js +2 -2
  17. package/dist/{attachments-BTIwCuwm.js → attachments-BXbLnNxm.js} +5 -5
  18. package/dist/{authorization-08F77H2w.d.ts → authorization-DhoA7dsD.d.ts} +22 -8
  19. package/dist/{automations-jIIaT9EJ.js → automations-BMuqwZZn.js} +5 -5
  20. package/dist/better-result/index.d.ts +2 -2
  21. package/dist/{bind-BwQGUqdQ.d.ts → bind-CFsctoFJ.d.ts} +4 -4
  22. package/dist/{block-authors-D9hyCizs.js → block-authors-Bw3zdzgl.js} +1 -1
  23. package/dist/{block-env-Dh0Fe-fK.d.ts → block-env-BrUNeuJ_.d.ts} +4 -4
  24. package/dist/{block-events-pBXPzwnW.js → block-events-IWAyafO3.js} +1 -1
  25. package/dist/{block-fields-DE_FgpOU.js → block-fields-BjXgX_5c.js} +4 -3
  26. package/dist/{block-helpers-DnCtsKtv.js → block-helpers-B0f0ZVb5.js} +169 -4
  27. package/dist/{block-hooks-DbIpkq7a.js → block-hooks-DKtz0HRh.js} +1 -1
  28. package/dist/{block-subjects-BRJO0IqO.js → block-subjects-DFSuFY1a.js} +1 -1
  29. package/dist/blocks/access-requests/index.d.ts +1 -1
  30. package/dist/blocks/access-requests/index.js +4 -5
  31. package/dist/blocks/activities/index.d.ts +1 -1
  32. package/dist/blocks/activities/index.js +4 -5
  33. package/dist/blocks/agents/index.d.ts +1 -1
  34. package/dist/blocks/agents/index.js +3 -4
  35. package/dist/blocks/ai-cache/index.d.ts +1 -1
  36. package/dist/blocks/ai-cache/index.js +2 -2
  37. package/dist/blocks/ai-chat/index.d.ts +4 -4
  38. package/dist/blocks/ai-chat/index.js +3 -4
  39. package/dist/blocks/ai-files/index.d.ts +1 -1
  40. package/dist/blocks/ai-files/index.js +2 -2
  41. package/dist/blocks/ai-keys/index.d.ts +1 -1
  42. package/dist/blocks/ai-keys/index.js +2 -3
  43. package/dist/blocks/ai-schedules/index.d.ts +2 -2
  44. package/dist/blocks/ai-schedules/index.js +5 -6
  45. package/dist/blocks/announcements/index.d.ts +4 -4
  46. package/dist/blocks/announcements/index.js +3 -4
  47. package/dist/blocks/api-keys/index.d.ts +2 -2
  48. package/dist/blocks/api-keys/index.js +4 -5
  49. package/dist/blocks/approvals/index.d.ts +1 -1
  50. package/dist/blocks/approvals/index.js +4 -5
  51. package/dist/blocks/assets/index.d.ts +1 -1
  52. package/dist/blocks/assets/index.js +3 -4
  53. package/dist/blocks/assignment/index.d.ts +1 -1
  54. package/dist/blocks/assignment/index.js +4 -5
  55. package/dist/blocks/attachments/index.d.ts +2 -2
  56. package/dist/blocks/attachments/index.js +4 -5
  57. package/dist/blocks/audit/index.d.ts +5 -5
  58. package/dist/blocks/audit/index.js +7 -8
  59. package/dist/blocks/automations/index.d.ts +3 -3
  60. package/dist/blocks/automations/index.js +5 -5
  61. package/dist/blocks/billable-time/index.d.ts +1 -1
  62. package/dist/blocks/billable-time/index.js +6 -7
  63. package/dist/blocks/billing/index.d.ts +3 -3
  64. package/dist/blocks/billing/index.js +5 -6
  65. package/dist/blocks/bookings/index.d.ts +3 -3
  66. package/dist/blocks/bookings/index.js +6 -6
  67. package/dist/blocks/bulk/index.d.ts +4 -3
  68. package/dist/blocks/bulk/index.js +4 -4
  69. package/dist/blocks/calendar/index.d.ts +2 -2
  70. package/dist/blocks/calendar/index.js +6 -6
  71. package/dist/blocks/catalog/index.d.ts +1 -1
  72. package/dist/blocks/catalog/index.js +5 -6
  73. package/dist/blocks/channels/index.d.ts +1 -1
  74. package/dist/blocks/channels/index.js +3 -4
  75. package/dist/blocks/collections/index.d.ts +1 -1
  76. package/dist/blocks/collections/index.js +3 -4
  77. package/dist/blocks/comments/index.d.ts +5 -5
  78. package/dist/blocks/comments/index.js +8 -9
  79. package/dist/blocks/compliance/index.d.ts +1 -1
  80. package/dist/blocks/compliance/index.js +5 -6
  81. package/dist/blocks/connectors/index.d.ts +1 -1
  82. package/dist/blocks/connectors/index.js +3 -4
  83. package/dist/blocks/contacts/index.d.ts +1 -1
  84. package/dist/blocks/contacts/index.js +4 -5
  85. package/dist/blocks/content/index.d.ts +1 -1
  86. package/dist/blocks/content/index.js +3 -4
  87. package/dist/blocks/contracts/index.d.ts +1 -1
  88. package/dist/blocks/contracts/index.js +8 -9
  89. package/dist/blocks/courses/index.d.ts +1 -1
  90. package/dist/blocks/courses/index.js +5 -6
  91. package/dist/blocks/created-by/index.d.ts +1 -1
  92. package/dist/blocks/custom-fields/index.d.ts +1 -1
  93. package/dist/blocks/custom-fields/index.js +2 -2
  94. package/dist/blocks/data-lifecycle/index.d.ts +1 -1
  95. package/dist/blocks/data-lifecycle/index.js +2 -3
  96. package/dist/blocks/deals/index.d.ts +1 -1
  97. package/dist/blocks/deals/index.js +9 -10
  98. package/dist/blocks/dispatch/index.d.ts +1 -1
  99. package/dist/blocks/dispatch/index.js +7 -8
  100. package/dist/blocks/documents/index.d.ts +1 -1
  101. package/dist/blocks/documents/index.js +2 -3
  102. package/dist/blocks/domains/index.d.ts +1 -1
  103. package/dist/blocks/domains/index.js +3 -4
  104. package/dist/blocks/donations/index.d.ts +1 -1
  105. package/dist/blocks/donations/index.js +7 -8
  106. package/dist/blocks/drive/index.d.ts +5 -1
  107. package/dist/blocks/drive/index.js +6 -7
  108. package/dist/blocks/employees/index.d.ts +2 -2
  109. package/dist/blocks/employees/index.js +7 -8
  110. package/dist/blocks/enrichment/index.d.ts +1 -1
  111. package/dist/blocks/enrichment/index.js +2 -3
  112. package/dist/blocks/enrollments/index.d.ts +1 -1
  113. package/dist/blocks/enrollments/index.js +3 -4
  114. package/dist/blocks/entitlements/index.d.ts +3 -3
  115. package/dist/blocks/entitlements/index.js +2 -2
  116. package/dist/blocks/expenses/index.d.ts +1 -1
  117. package/dist/blocks/expenses/index.js +6 -7
  118. package/dist/blocks/field-history/index.d.ts +1 -1
  119. package/dist/blocks/field-history/index.js +2 -3
  120. package/dist/blocks/flags/index.d.ts +1 -1
  121. package/dist/blocks/flags/index.js +4 -5
  122. package/dist/blocks/forecasts/index.d.ts +1 -1
  123. package/dist/blocks/forecasts/index.js +5 -6
  124. package/dist/blocks/forms/index.d.ts +2 -2
  125. package/dist/blocks/forms/index.js +3 -4
  126. package/dist/blocks/goals/index.d.ts +1 -1
  127. package/dist/blocks/goals/index.js +4 -5
  128. package/dist/blocks/guests/index.d.ts +1 -1
  129. package/dist/blocks/guests/index.js +4 -5
  130. package/dist/blocks/hiring/index.d.ts +1 -1
  131. package/dist/blocks/hiring/index.js +4 -5
  132. package/dist/blocks/identities/index.d.ts +1 -1
  133. package/dist/blocks/identities/index.js +2 -3
  134. package/dist/blocks/imports/index.d.ts +1 -1
  135. package/dist/blocks/imports/index.js +2 -2
  136. package/dist/blocks/inbox/index.d.ts +5 -5
  137. package/dist/blocks/inbox/index.js +3 -4
  138. package/dist/blocks/incidents/index.d.ts +1 -1
  139. package/dist/blocks/incidents/index.js +5 -6
  140. package/dist/blocks/index.d.ts +2 -2
  141. package/dist/blocks/index.js +6 -6
  142. package/dist/blocks/inventory/index.d.ts +1 -1
  143. package/dist/blocks/inventory/index.js +3 -4
  144. package/dist/blocks/invoices/index.d.ts +1 -1
  145. package/dist/blocks/invoices/index.js +6 -7
  146. package/dist/blocks/knowledge/index.d.ts +1 -1
  147. package/dist/blocks/knowledge/index.js +2 -2
  148. package/dist/blocks/lead-scoring/index.d.ts +1 -1
  149. package/dist/blocks/lead-scoring/index.js +4 -5
  150. package/dist/blocks/leases/index.d.ts +1 -1
  151. package/dist/blocks/leases/index.js +7 -8
  152. package/dist/blocks/leave/index.d.ts +1 -1
  153. package/dist/blocks/leave/index.js +4 -5
  154. package/dist/blocks/ledger/index.d.ts +1 -1
  155. package/dist/blocks/ledger/index.js +3 -4
  156. package/dist/blocks/mail-sync/index.d.ts +1 -1
  157. package/dist/blocks/mail-sync/index.js +4 -5
  158. package/dist/blocks/memberships/index.d.ts +1 -1
  159. package/dist/blocks/memory/index.d.ts +1 -1
  160. package/dist/blocks/memory/index.js +3 -4
  161. package/dist/blocks/messaging/index.d.ts +5 -5
  162. package/dist/blocks/messaging/index.js +5 -6
  163. package/dist/blocks/metrics/index.d.ts +1 -1
  164. package/dist/blocks/metrics/index.js +4 -5
  165. package/dist/blocks/mfa/index.d.ts +2 -2
  166. package/dist/blocks/moderation/index.d.ts +1 -1
  167. package/dist/blocks/moderation/index.js +3 -4
  168. package/dist/blocks/notifications/index.d.ts +4 -4
  169. package/dist/blocks/notifications/index.js +7 -8
  170. package/dist/blocks/numbering/index.d.ts +1 -1
  171. package/dist/blocks/numbering/index.js +2 -2
  172. package/dist/blocks/oauth-server/index.d.ts +1 -1
  173. package/dist/blocks/oauth-server/index.js +3 -4
  174. package/dist/blocks/onboarding/index.d.ts +2 -2
  175. package/dist/blocks/onboarding/index.js +2 -3
  176. package/dist/blocks/orders/index.d.ts +9 -2
  177. package/dist/blocks/orders/index.js +7 -8
  178. package/dist/blocks/organizations/index.d.ts +3 -3
  179. package/dist/blocks/organizations/index.js +5 -6
  180. package/dist/blocks/outbox/index.d.ts +1 -1
  181. package/dist/blocks/outbox/index.js +3 -4
  182. package/dist/blocks/passes/index.d.ts +2 -2
  183. package/dist/blocks/passes/index.js +7 -8
  184. package/dist/blocks/permissions/index.d.ts +3 -3
  185. package/dist/blocks/permissions/index.js +2 -3
  186. package/dist/blocks/pipelines/index.d.ts +1 -1
  187. package/dist/blocks/pipelines/index.js +4 -5
  188. package/dist/blocks/posts/index.d.ts +1 -1
  189. package/dist/blocks/posts/index.js +4 -5
  190. package/dist/blocks/profiles/index.d.ts +1 -1
  191. package/dist/blocks/profiles/index.js +3 -4
  192. package/dist/blocks/promotions/index.d.ts +1 -1
  193. package/dist/blocks/promotions/index.js +4 -5
  194. package/dist/blocks/push/index.d.ts +2 -2
  195. package/dist/blocks/push/index.js +4 -5
  196. package/dist/blocks/queue/index.d.ts +1 -1
  197. package/dist/blocks/queue/index.js +7 -8
  198. package/dist/blocks/quotes/index.d.ts +1 -1
  199. package/dist/blocks/quotes/index.js +6 -7
  200. package/dist/blocks/rank/index.d.ts +1 -1
  201. package/dist/blocks/rank/index.js +2 -2
  202. package/dist/blocks/reactions/index.d.ts +4 -4
  203. package/dist/blocks/reactions/index.js +3 -4
  204. package/dist/blocks/relations/index.d.ts +3 -2
  205. package/dist/blocks/relations/index.js +8 -8
  206. package/dist/blocks/reminders/index.d.ts +10 -6
  207. package/dist/blocks/reminders/index.js +13 -12
  208. package/dist/blocks/reviews/index.d.ts +1 -1
  209. package/dist/blocks/reviews/index.js +3 -4
  210. package/dist/blocks/saved-views/index.d.ts +3 -3
  211. package/dist/blocks/saved-views/index.js +3 -3
  212. package/dist/blocks/scores/index.d.ts +1 -1
  213. package/dist/blocks/scores/index.js +4 -4
  214. package/dist/blocks/search/index.d.ts +3 -3
  215. package/dist/blocks/search/index.js +2 -3
  216. package/dist/blocks/security-events/index.d.ts +1 -1
  217. package/dist/blocks/security-events/index.js +2 -3
  218. package/dist/blocks/segments/index.d.ts +1 -1
  219. package/dist/blocks/segments/index.js +4 -5
  220. package/dist/blocks/sequences/index.d.ts +1 -1
  221. package/dist/blocks/sequences/index.js +3 -4
  222. package/dist/blocks/service-accounts/index.d.ts +1 -1
  223. package/dist/blocks/service-accounts/index.js +3 -4
  224. package/dist/blocks/sessions/index.d.ts +2 -2
  225. package/dist/blocks/sessions/index.js +1 -1
  226. package/dist/blocks/settings/index.d.ts +2 -2
  227. package/dist/blocks/settings/index.js +2 -3
  228. package/dist/blocks/share-links/index.d.ts +1 -1
  229. package/dist/blocks/share-links/index.js +6 -6
  230. package/dist/blocks/shipments/index.d.ts +1 -1
  231. package/dist/blocks/shipments/index.js +9 -10
  232. package/dist/blocks/signatures/index.d.ts +1 -1
  233. package/dist/blocks/signatures/index.js +3 -4
  234. package/dist/blocks/signing-keys/index.d.ts +1 -1
  235. package/dist/blocks/signing-keys/index.js +2 -2
  236. package/dist/blocks/sla/index.d.ts +1 -1
  237. package/dist/blocks/sla/index.js +7 -8
  238. package/dist/blocks/sso/index.d.ts +1 -1
  239. package/dist/blocks/sso/index.js +2 -3
  240. package/dist/blocks/state-machine/index.d.ts +1 -1
  241. package/dist/blocks/state-machine/index.js +3 -3
  242. package/dist/blocks/subjects/index.d.ts +2 -2
  243. package/dist/blocks/subjects/index.js +3 -4
  244. package/dist/blocks/tags/index.d.ts +2 -2
  245. package/dist/blocks/tags/index.js +5 -5
  246. package/dist/blocks/tasks/index.d.ts +2 -2
  247. package/dist/blocks/tasks/index.js +7 -8
  248. package/dist/blocks/teams/index.d.ts +1 -1
  249. package/dist/blocks/teams/index.js +3 -3
  250. package/dist/blocks/templates/index.d.ts +3 -3
  251. package/dist/blocks/templates/index.js +3 -4
  252. package/dist/blocks/time-tracking/index.d.ts +8 -1
  253. package/dist/blocks/time-tracking/index.js +9 -10
  254. package/dist/blocks/timeline/index.d.ts +3 -3
  255. package/dist/blocks/timeline/index.js +4 -5
  256. package/dist/blocks/trash/index.d.ts +1 -1
  257. package/dist/blocks/trash/index.js +3 -4
  258. package/dist/blocks/undo/index.d.ts +2 -2
  259. package/dist/blocks/undo/index.js +2 -2
  260. package/dist/blocks/updated-at/index.d.ts +1 -1
  261. package/dist/blocks/usage/index.d.ts +2 -2
  262. package/dist/blocks/usage/index.js +2 -3
  263. package/dist/blocks/vercel-marketplace/index.d.ts +1 -1
  264. package/dist/blocks/vercel-marketplace/index.js +3 -4
  265. package/dist/blocks/versions/index.d.ts +1 -1
  266. package/dist/blocks/versions/index.js +6 -7
  267. package/dist/blocks/waitlist/index.d.ts +1 -1
  268. package/dist/blocks/waitlist/index.js +4 -5
  269. package/dist/blocks/webhooks/index.d.ts +3 -3
  270. package/dist/blocks/webhooks/index.js +11 -12
  271. package/dist/blocks/workflow-editor/index.d.ts +6 -6
  272. package/dist/blocks/workflow-editor/index.js +9 -10
  273. package/dist/blocks/workflows/index.d.ts +4 -4
  274. package/dist/blocks/workflows/index.js +4 -5
  275. package/dist/{bookings-Dox2rced.d.ts → bookings-BpCNphYp.d.ts} +1 -2
  276. package/dist/{build-D9lWi5bk.js → build-CM8PJqwW.js} +1 -1
  277. package/dist/{build-BFC8nFiL.js → build-DbIRFcHQ.js} +3 -65
  278. package/dist/chat-sdk/index.js +2 -3
  279. package/dist/cli/{add-CtLjnwds.js → add-BTDPjVGC.js} +9 -9
  280. package/dist/cli/{add-CH7dC6UR.js → add-C0w-mVTQ.js} +2 -2
  281. package/dist/cli/add-CspY9jKT.js +1 -0
  282. package/dist/cli/{backfill-DBJIMzcy.js → backfill-BDdBs6Ne.js} +1 -1
  283. package/dist/cli/bin.js +1 -1
  284. package/dist/cli/{blocks-i1w0EEvs.js → blocks-Bs-lA-U_.js} +1 -1
  285. package/dist/cli/{blocks-CS58-xnw.js → blocks-CQLME-HQ.js} +1 -1
  286. package/dist/cli/{cache-Cn3crN0v.js → cache-DDKao2Va.js} +1 -1
  287. package/dist/cli/{codemod-D6wifOAH.js → codemod-Bjl998Do.js} +1 -1
  288. package/dist/cli/{content-mapper-Q9We297z.js → content-mapper-DgSTl-DL.js} +2 -2
  289. package/dist/cli/{doctor-DmfdE5Ct.js → doctor-CMLWbt44.js} +57 -55
  290. package/dist/cli/{gen-D68A0uN8.js → gen-D3VX8WdV.js} +11 -11
  291. package/dist/cli/index.d.ts +1 -1
  292. package/dist/cli/index.js +6 -6
  293. package/dist/cli/{init-N7pkBbJn.js → init-D6D6eWze.js} +5 -5
  294. package/dist/cli/{live-0xAAlTK_.js → live-C_xgTOfD.js} +2 -2
  295. package/dist/cli/{mcp-CbN3ulRF.js → mcp-B0Irjbes.js} +2 -2
  296. package/dist/cli/{metadata-417ldpf4.js → metadata-cLXra-XB.js} +3 -3
  297. package/dist/cli/{migration-safety-BC_UI4jC.js → migration-safety-OUK-Afbb.js} +1 -1
  298. package/dist/cli/{migrations-DdBKwrvG.js → migrations-CHenMvl_.js} +1 -1
  299. package/dist/cli/{module-migration-DdxPdqMC.js → module-migration-6V7vXWUK.js} +2 -2
  300. package/dist/cli/{powersync-CJTEz-uY.js → powersync-D83yAFbl.js} +2 -2
  301. package/dist/cli/powersync-DwhCH0gs.js +1 -0
  302. package/dist/cli/{print-DyFm91R-.js → print-C0OmQyTu.js} +2 -2
  303. package/dist/cli/{remove-CPY0xsVm.js → remove-BWlOngNT.js} +5 -5
  304. package/dist/cli/{render-DE3O1OFq.js → render-9m70qveo.js} +22 -5
  305. package/dist/cli/{run-CcrNGX9C.js → run-He3M-ZRq.js} +21 -21
  306. package/dist/cli/{run-WtIEFGvP.js → run-gE4eAazR.js} +8 -8
  307. package/dist/cli/{shared-SlukBuKn.js → shared-Cx2WFVWq.js} +1 -1
  308. package/dist/cli/{snapshot-pyIsJjUV.js → snapshot-CZb3uVKE.js} +2 -2
  309. package/dist/cli/{source-Bclt9D0Y.js → source-CrYSCdPZ.js} +1 -1
  310. package/dist/cli/{spec-D7zsEVj_.js → spec-Cn5RhuQc.js} +2 -2
  311. package/dist/cli/{spec-BsdLx7tZ.js → spec-D4b9ePuQ.js} +1 -1
  312. package/dist/cli/{sql-layout-C6baAM5t.js → sql-layout-CLJ67h3L.js} +2 -2
  313. package/dist/cli/{sync-Cse8VXAU.js → sync-B8VGiaHk.js} +3 -3
  314. package/dist/cli/{upgrade-Cwc1RiAE.js → upgrade-BvBWK3Fo.js} +4 -4
  315. package/dist/cli/{upgrade-28ENjIJU.js → upgrade-DMiYx1C8.js} +2 -2
  316. package/dist/cli/{version-yWIaLG04.js → version-BVg2Z6yv.js} +1 -1
  317. package/dist/client/index.d.ts +5 -5
  318. package/dist/client/index.js +1 -1
  319. package/dist/client/native/index.d.ts +4 -4
  320. package/dist/client/native/index.js +1 -1
  321. package/dist/{codecs-BfmQSbM6.js → codecs-CSUFGrdP.js} +3 -3
  322. package/dist/commerce/index.js +3 -3
  323. package/dist/{composite-DbRuu6Jb.d.ts → composite-ChzHhSB0.d.ts} +3 -3
  324. package/dist/{composite-D24L5RIY.js → composite-Dw5ofSF_.js} +1 -1
  325. package/dist/config/index.d.ts +2 -2
  326. package/dist/config/index.js +2 -2
  327. package/dist/{config-D74JT0qL.js → config-BOt5T6Vs.js} +1 -1
  328. package/dist/{context-CjHXhCck.d.ts → context-sgrUjA3U.d.ts} +4 -4
  329. package/dist/{controller-BeqcjERs.d.ts → controller-B6vWdKSa.d.ts} +1 -1
  330. package/dist/{controller-BNZKd6bJ.js → controller-qG-B1eDn.js} +1 -1
  331. package/dist/{conversion-BqDvi8ty.d.ts → conversion-DBgMck5U.d.ts} +1 -1
  332. package/dist/create/index.d.ts +2 -2
  333. package/dist/create/index.js +2 -2
  334. package/dist/{create-blocks-0pWKQ6x4.js → create-blocks-CUS28FfS.js} +13 -9
  335. package/dist/credentials/index.js +2 -3
  336. package/dist/{cron-CgHTKwYG.js → cron-DdT4ti8a.js} +1 -1
  337. package/dist/{cron-route-UU9i5i9J.js → cron-route-FjKgRvTY.js} +1 -1
  338. package/dist/{deal-forecast-DikouYGj.js → deal-forecast-CKBnRodz.js} +2 -2
  339. package/dist/{define-Djgn3HQQ.js → define-D-dLADd5.js} +16 -19
  340. package/dist/{define-BqaUwrIC.d.ts → define-Lf6rI2QN.d.ts} +14 -8
  341. package/dist/{define-block-CRwHsxZO.d.ts → define-block-DCAiOrNX.d.ts} +12 -3
  342. package/dist/edge/index.d.ts +5 -5
  343. package/dist/edge/index.js +3 -3
  344. package/dist/{entitlements-mDz7GfA_.d.ts → entitlements-BPaPd3MD.d.ts} +1 -1
  345. package/dist/{entitlements-DBir2qwB.js → entitlements-tGL6-69B.js} +2 -2
  346. package/dist/{entity-schema-BDv6w-OQ.js → entity-schema-B1YmMtP8.js} +1 -1
  347. package/dist/events/index.js +2 -2
  348. package/dist/{executor-3qcMhg6R.js → executor-C2Ne-Scm.js} +3 -2
  349. package/dist/{executor-Bi056Cnj.d.ts → executor-DNK401lZ.d.ts} +1 -1
  350. package/dist/{executor-D3gB-9si.js → executor-DqIci3Jb.js} +3 -3
  351. package/dist/{executor-BQ7dYw4E.js → executor-WolvKszH.js} +3 -3
  352. package/dist/{executor-_O-CqCPl.d.ts → executor-aFV7nEBs.d.ts} +2 -2
  353. package/dist/expo/index.d.ts +2 -2
  354. package/dist/expo/index.js +2 -2
  355. package/dist/{field-errors-Cfvcg-C3.d.ts → field-errors-DBgDCITw.d.ts} +6 -6
  356. package/dist/{fields--5a88KJe.js → fields-BBm49w-E.js} +1 -1
  357. package/dist/{filter-evaluate-w1XOIUOL.js → filter-evaluate-lCToXzZI.js} +2 -2
  358. package/dist/{filter-query-DMoKo82_.js → filter-query-CQ6d5GnQ.js} +1 -1
  359. package/dist/{flags-ClOQY-p5.js → flags-DF_SCqp5.js} +1 -1
  360. package/dist/flags-sdk/index.js +2 -2
  361. package/dist/{framework-B-1Ka0GW.d.ts → framework-DKA3fTHl.d.ts} +3 -3
  362. package/dist/{framework-CNhTg0th.js → framework-DXM1vNcV.js} +1 -1
  363. package/dist/hono/index.d.ts +4 -4
  364. package/dist/hono/index.js +2 -2
  365. package/dist/{index-CjnDGAJr.d.ts → index-5JSxY1MG.d.ts} +1 -1
  366. package/dist/{index-CYzckGOz.d.ts → index-Bt7_mxn0.d.ts} +9 -5
  367. package/dist/{index-BzW1T3oI.d.ts → index-ByF22_C6.d.ts} +3 -3
  368. package/dist/{index-BdzfjFnd.d.ts → index-C4sjewrr.d.ts} +9 -9
  369. package/dist/{index-DfgP-9eC.d.ts → index-CdMZQCYR.d.ts} +3 -3
  370. package/dist/{index-EieRHooI.d.ts → index-ClvuSZEz.d.ts} +2 -2
  371. package/dist/index.d.ts +2 -2
  372. package/dist/index.js +8 -7
  373. package/dist/{json-schema-Ca6gYbEP.js → json-schema-DHJxiizN.js} +1 -1
  374. package/dist/{knowledge-CV6OSirC.js → knowledge-tCrrU99q.js} +2 -2
  375. package/dist/list/index.d.ts +1 -1
  376. package/dist/list/index.js +3 -3
  377. package/dist/{list-query-BKy2zBaT.js → list-query-BnpA2BDg.js} +1 -1
  378. package/dist/{list-query-6vTI1VN6.d.ts → list-query-XYfUZb0j.d.ts} +1 -1
  379. package/dist/mapper/bin.js +5 -5
  380. package/dist/mcp/index.d.ts +4 -4
  381. package/dist/mcp/index.js +2 -2
  382. package/dist/mcp/sdk/index.d.ts +2 -2
  383. package/dist/mcp/sdk/index.js +1 -1
  384. package/dist/{messages-D4XWuRTj.js → messages-ecPW_nOv.js} +1 -1
  385. package/dist/{model-messages-CKG0zwdF.js → model-messages-CkZSDDHP.js} +1 -1
  386. package/dist/{money-codec-uV5WbT60.js → money-codec-BJuS2zEW.js} +1 -1
  387. package/dist/next/index.d.ts +14 -14
  388. package/dist/next/index.js +4 -4
  389. package/dist/{operations-DbNAgo7E.d.ts → operations-DC3wU3Sy.d.ts} +1 -1
  390. package/dist/orpc/index.d.ts +4 -4
  391. package/dist/orpc/index.js +1 -1
  392. package/dist/otel/index.js +5 -5
  393. package/dist/{ports-DO3tgLTo.d.ts → ports-BbBJVyS0.d.ts} +1 -1
  394. package/dist/{ports-CaVRXjxq.js → ports-DvpNseap.js} +1 -1
  395. package/dist/postgres/index.js +5 -4
  396. package/dist/{postgrest-executor-BFW4oWte.js → postgrest-executor-B_Uezhrm.js} +7 -3
  397. package/dist/powersync/index.d.ts +3 -3
  398. package/dist/powersync/index.js +1 -1
  399. package/dist/preset/index.d.ts +3 -3
  400. package/dist/{push-token-IFGi8jvd.d.ts → push-token-CPJfPFa2.d.ts} +1 -1
  401. package/dist/query/index.d.ts +1 -1
  402. package/dist/query/index.js +1 -1
  403. package/dist/{rate-limit-BPuUWz4U.js → rate-limit-fZ_d8gSE.js} +4 -5
  404. package/dist/react/index.d.ts +5 -5
  405. package/dist/react/index.js +1 -1
  406. package/dist/react/native/index.d.ts +1 -1
  407. package/dist/react/server.d.ts +6 -6
  408. package/dist/react/server.js +1 -1
  409. package/dist/{react-D-p70_wL.js → react-_D_CeZMk.js} +3 -3
  410. package/dist/react-router/index.d.ts +3 -3
  411. package/dist/react-router/index.js +2 -2
  412. package/dist/{read-set-BnKnofIj.js → read-set-B1sDib5O.js} +1 -1
  413. package/dist/realtime/index.d.ts +3 -3
  414. package/dist/realtime/index.js +2 -2
  415. package/dist/{record-bindings-DkBJpC5A.js → record-bindings-Z51mGfhB.js} +1 -1
  416. package/dist/{record-form-yMVvkPiQ.d.ts → record-form-BbZpwsEi.d.ts} +1 -1
  417. package/dist/records/index.d.ts +7 -7
  418. package/dist/records/index.js +3 -3
  419. package/dist/{resource-execute-LR71zWej.d.ts → resource-execute-CUG6xUuh.d.ts} +1 -1
  420. package/dist/{resource-types-eXuFxVt7.d.ts → resource-types-DjZ91WKA.d.ts} +1 -1
  421. package/dist/{resources-Dpz3h8Fe.d.ts → resources-6Ncdt9XT.d.ts} +1 -1
  422. package/dist/{rows-EGAbu7MG.js → rows-BdqXmiB-.js} +2 -2
  423. package/dist/{rows-Bh9QemqN.js → rows-jijHLVE_.js} +1 -1
  424. package/dist/{rrule-79K2c3Nr.js → rrule-C9Ot6ax8.js} +1 -1
  425. package/dist/{sales-lines-CP4Z_LyE.js → sales-lines-DO7oRu1o.js} +3 -3
  426. package/dist/{sales-shared-BKXXA5qV.js → sales-shared-BuTA8JK7.js} +2 -2
  427. package/dist/{schemas-BSTNfGsQ.js → schemas-CLOTvdsC.js} +1 -1
  428. package/dist/{scores-CsgM-dw7.js → scores-bY2Is0kx.js} +2 -2
  429. package/dist/server/index.d.ts +7 -7
  430. package/dist/server/index.js +5 -5
  431. package/dist/{server-types-BTBzrzOH.d.ts → server-types-BH6AjDBN.d.ts} +1 -1
  432. package/dist/{session-BgYGk_FS.d.ts → session-Y5SSYO2C.d.ts} +1 -1
  433. package/dist/{shared-C47zAh2A.js → shared-BeHTi8Fu.js} +1 -1
  434. package/dist/{sign-in-BTaRWS-L.js → sign-in-1FJiXXyG.js} +5 -5
  435. package/dist/{signatures-CNcoq392.js → signatures-CX1b4WHa.js} +2 -2
  436. package/dist/{signers-BAEzvTJ0.d.ts → signers-BKgmVh6A.d.ts} +2 -2
  437. package/dist/{signing-keys-DqI-gB_C.js → signing-keys-CWtpMask.js} +3 -3
  438. package/dist/solid/index.d.ts +6 -6
  439. package/dist/solid-start/index.d.ts +3 -3
  440. package/dist/solid-start/index.js +2 -2
  441. package/dist/spec/index.d.ts +1 -1
  442. package/dist/spec/index.js +1 -1
  443. package/dist/{spec-DTWkHzYZ.js → spec-BMvCCNnd.js} +1 -1
  444. package/dist/sql/index.d.ts +4 -4
  445. package/dist/sql/index.js +1 -1
  446. package/dist/{sql-B0wb7XA5.js → sql-BjjgwJKg.js} +9668 -6251
  447. package/dist/{sql-BPbbPzRJ.js → sql-CYt7EhH0.js} +2 -2
  448. package/dist/sqlite/index.d.ts +1 -1
  449. package/dist/sqlite/index.js +1 -1
  450. package/dist/{sso-Co2TbnEy.js → sso-DdDpJQzw.js} +2 -2
  451. package/dist/ssr/index.d.ts +1 -1
  452. package/dist/storage/index.js +3 -3
  453. package/dist/streams/index.js +1 -2
  454. package/dist/{subject-readers-F1xvRY-d.js → subject-readers-CeeJJOQ4.js} +1 -1
  455. package/dist/svelte/index.d.ts +6 -6
  456. package/dist/sveltekit/index.d.ts +4 -4
  457. package/dist/sveltekit/index.js +2 -2
  458. package/dist/{table-schema-CD8cJz_M.js → table-schema-C80xItaV.js} +1 -1
  459. package/dist/{tags-CXeJu332.d.ts → tags-Cjtcp5cN.d.ts} +1 -1
  460. package/dist/tanstack-db/index.d.ts +1 -1
  461. package/dist/tanstack-start/index.d.ts +3 -3
  462. package/dist/tanstack-start/index.js +2 -2
  463. package/dist/{temporal-DLZlWbOi.js → temporal-Dbo0fLzc.js} +12 -2
  464. package/dist/{temporal-required-Dy0GGD8E.js → temporal-required-DcLhnDhQ.js} +1 -1
  465. package/dist/{tenant-DzymQ9sv.d.ts → tenant-BHvMFNXl.d.ts} +1 -1
  466. package/dist/testing/index.d.ts +9 -9
  467. package/dist/testing/index.js +8 -8
  468. package/dist/{timeline-BMVOKokJ.d.ts → timeline-CEzj9v1z.d.ts} +3 -3
  469. package/dist/{topic-0uK4db_2.d.ts → topic-gTVjLGTk.d.ts} +2 -2
  470. package/dist/{types-DsRfiQ0v.d.ts → types-yj8VF4oY.d.ts} +5 -0
  471. package/dist/{undo-B3FQvuAd.js → undo-BbftL9-4.js} +2 -2
  472. package/dist/vercel-connect/index.js +1 -1
  473. package/dist/{verify-ZLFUdlqE.js → verify-7EucfCnv.js} +3 -3
  474. package/dist/{verify-DexkIx4t.d.ts → verify-B0KLBb3j.d.ts} +1 -1
  475. package/dist/vue/index.d.ts +6 -6
  476. package/dist/{watch-topic-CG3kOX-D.d.ts → watch-topic-C6HhbnVz.d.ts} +1 -1
  477. package/dist/wire-ChYn1g21.js +91 -0
  478. package/dist/workflow-sdk/builder/index.d.ts +2 -2
  479. package/dist/workflow-sdk/builder/index.js +1 -1
  480. package/dist/workflow-sdk/world/index.js +1 -1
  481. package/dist/yjs/index.d.ts +1 -1
  482. package/dist/yjs/index.js +1 -1
  483. package/package.json +1 -1
  484. package/skills/better-supabase/references/ui-recipes.md +1 -1
  485. package/dist/block-transport-PNea4lfQ.js +0 -84
  486. package/dist/cli/add-DyCrVejx.js +0 -1
  487. package/dist/cli/powersync-CYQ4Ljcz.js +0 -1
  488. package/dist/{topic-DXbA-jwr.js → topic-J9I3yu6f.js} +1 -1
@@ -1,8 +1,8 @@
1
1
  import { t as MAX_AFFECTED_MARKER } from "./errors-BVFgt8BZ.js";
2
- import { n as invalidRequest } from "./build-BFC8nFiL.js";
2
+ import { n as invalidRequest } from "./build-DbIRFcHQ.js";
3
3
  import { t as lookupOf } from "./lookup-BaP5bI27.js";
4
4
  import { n as simplifyOrFalse } from "./simplify-DDO0j0LI.js";
5
- import { n as whereClause, t as integer } from "./shared-C47zAh2A.js";
5
+ import { n as whereClause, t as integer } from "./shared-BeHTi8Fu.js";
6
6
  //#region src/compile/sql.ts
7
7
  /** Supabase's default `max_rows`, which PostgREST uses for `count=estimated`. */
8
8
  const DEFAULT_ESTIMATED_COUNT_THRESHOLD = 1e3;
@@ -1,6 +1,6 @@
1
1
  import { Bt as Executor } from "../types-DFdg_4yN.js";
2
2
  import { c as LocalTablesOption, n as DataEngine, s as LiveEngineOptions } from "../data-engine-BWoz9lED.js";
3
- import { i as fromSqliteError, n as SqliteDatabaseLike, o as CheckSqliteOptions, r as SqliteExecutorOptions, s as checkSqlite, t as SqliteContextLike } from "../executor-_O-CqCPl.js";
3
+ import { i as fromSqliteError, n as SqliteDatabaseLike, o as CheckSqliteOptions, r as SqliteExecutorOptions, s as checkSqlite, t as SqliteContextLike } from "../executor-aFV7nEBs.js";
4
4
  //#region src/sqlite/engine.d.ts
5
5
  /** A SQLite database that may report which tables changed. */
6
6
  interface ChangingSqliteDatabase extends SqliteDatabaseLike {
@@ -1,5 +1,5 @@
1
1
  import { i as localEngine } from "../data-engine-D1BkmBoR.js";
2
- import { i as checkSqlite, r as sqliteExecutor, t as fromSqliteError } from "../executor-BQ7dYw4E.js";
2
+ import { i as checkSqlite, r as sqliteExecutor, t as fromSqliteError } from "../executor-WolvKszH.js";
3
3
  //#region src/sqlite/engine.ts
4
4
  /**
5
5
  * A UUID v4 from SQLite's `randomblob`, for runtimes without
@@ -1,8 +1,8 @@
1
1
  import { n as dbError } from "./errors-BVFgt8BZ.js";
2
2
  import { n as isRecord } from "./guards-6F2bCtQR.js";
3
3
  import { a as ok, r as err, t as AsyncResult } from "./result-ntFBW2p2.js";
4
- import { C as optionalText, D as recordOf, F as stringsOf, I as textOf, R as toInstant, S as optionalInstant, f as errorText, k as recordsOf, n as applyTemporal, o as blockCall } from "./block-helpers-DnCtsKtv.js";
5
- import { r as withBlockHooks } from "./block-hooks-DbIpkq7a.js";
4
+ import { A as recordsOf, C as optionalInstant, I as stringsOf, L as textOf, O as recordOf, f as errorText, n as applyTemporal, o as blockCall, w as optionalText, z as toInstant } from "./block-helpers-B0f0ZVb5.js";
5
+ import { r as withBlockHooks } from "./block-hooks-DKtz0HRh.js";
6
6
  //#region src/blocks/sso/sso.ts
7
7
  function recordOfDomain(value) {
8
8
  const row = recordOf(value, "organization_domains.record");
@@ -1,6 +1,6 @@
1
1
  import { C as readSession, D as writeSession, E as sessionEncoding, S as pruneSessionChunks, T as sessionCookieName, _ as StoredSession, a as ResolveAuthOptions, b as clearSessionAtScopes, d as CookieOptions, f as CookieRecord, g as SessionEncoding, h as DEFAULT_SESSION_ENCODING, l as resolveAuth, m as CookieWrite, n as AuthResolver, p as CookieScope, r as AuthState, t as AuthResolution, u as AUTH_CACHE_HEADERS, v as WriteSessionOptions, w as serializeCookie, x as parseCookies, y as applyCookieWrites } from "../resolve-CXX6DHv3.js";
2
2
  import { n as toSession, t as AuthSession } from "../view-DyFdMCqg.js";
3
- import { r as MembershipClaim } from "../entitlements-mDz7GfA_.js";
3
+ import { r as MembershipClaim } from "../entitlements-BPaPd3MD.js";
4
4
  import { n as RefreshOutcome, r as refreshSession, t as RefreshOptions } from "../refresh-DT_ICaK-.js";
5
5
  import { a as sessionStatus, i as clearSessionCookies, n as SessionStatus, o as authContext, r as SessionStatusOptions, t as ClearSessionCookiesOptions } from "../ended-gUsMZVNg.js";
6
6
  export { AUTH_CACHE_HEADERS, type AuthResolution, type AuthResolver, type AuthSession, type AuthState, type ClearSessionCookiesOptions, type CookieOptions, type CookieRecord, type CookieScope, type CookieWrite, DEFAULT_SESSION_ENCODING, type MembershipClaim, type RefreshOptions, type RefreshOutcome, type ResolveAuthOptions, type SessionEncoding, type SessionStatus, type SessionStatusOptions, type StoredSession, type WriteSessionOptions, applyCookieWrites, authContext, clearSessionAtScopes, clearSessionCookies, parseCookies, pruneSessionChunks, readSession, refreshSession, resolveAuth, serializeCookie, sessionCookieName, sessionEncoding, sessionStatus, toSession, writeSession };
@@ -1,13 +1,13 @@
1
1
  import { t as DbException } from "../db-exception-Lngc1W49.js";
2
2
  import { n as dbError } from "../errors-BVFgt8BZ.js";
3
- import { c as optionalTemporal, n as isInstant } from "../temporal-DLZlWbOi.js";
4
- import { n as temporalMissing } from "../temporal-required-Dy0GGD8E.js";
3
+ import { c as optionalTemporal, n as isInstant } from "../temporal-Dbo0fLzc.js";
4
+ import { n as temporalMissing } from "../temporal-required-DcLhnDhQ.js";
5
5
  import { n as storageApiOf } from "../storage-api-Dg78Wqsg.js";
6
6
  import { a as ok, r as err, s as toDbError, t as AsyncResult } from "../result-ntFBW2p2.js";
7
- import { a as sqlString, i as sqlIdent, n as parseTemplate, r as slug, t as claimSql } from "../template-Drgg3v2J.js";
8
7
  import { a as spansAllTenants } from "../plugin-AKwwe2gF.js";
9
8
  import { n as decodeJwtPayload } from "../base64-B9Wlsdj7.js";
10
9
  import { a as tenantClaimPaths, o as tenantFrom, s as tenantPathsFor } from "../claims-Bp9My7XP.js";
10
+ import { a as sqlString, i as sqlIdent, n as parseTemplate, r as slug, t as claimSql } from "../template-Drgg3v2J.js";
11
11
  import { r as accessCheck } from "../access-sql-CNIgUqWf.js";
12
12
  import { t as fromStorageError } from "../errors-CyxMxzlu.js";
13
13
  import { a as ttlSeconds, i as TTL, r as transformFor, t as checkVariants } from "../variants-Cy--Ub-a.js";
@@ -1,6 +1,5 @@
1
1
  import { n as isRecord } from "../guards-6F2bCtQR.js";
2
- import { i as sqlTransport, r as rpcTransport, t as dbTransport } from "../block-transport-PNea4lfQ.js";
3
- import { D as recordOf, F as stringsOf, M as seconds, o as blockCall } from "../block-helpers-DnCtsKtv.js";
2
+ import { I as stringsOf, N as seconds, O as recordOf, U as rpcTransport, V as dbTransport, W as sqlTransport, o as blockCall } from "../block-helpers-B0f0ZVb5.js";
4
3
  import { n as teeToStore, r as writeToStore, t as resumeFromStore } from "../tee-V97_v1ZS.js";
5
4
  import { t as pollingRead } from "../store-McN-2esd.js";
6
5
  //#region src/streams/postgres.ts
@@ -1,4 +1,4 @@
1
- import "./block-helpers-DnCtsKtv.js";
1
+ import "./block-helpers-B0f0ZVb5.js";
2
2
  //#region src/core/subject-readers.ts
3
3
  /**
4
4
  * A registered subject's type and id, from `subjects/<type>/<id>` or
@@ -1,13 +1,13 @@
1
1
  import { b as DbError } from "../result-DZeA5KS6.js";
2
2
  import { Ct as Events, D as BlockEventPattern, T as BlockEvent, bt as EventMap, k as BlockEventsMatching } from "../events-vcqenSYU.js";
3
- import { pt as QuerySpec } from "../define-BqaUwrIC.js";
3
+ import { mt as QuerySpec } from "../define-Lf6rI2QN.js";
4
4
  import { tt as TemplateValues } from "../bucket-vc-QRrva.js";
5
- import { g as TopicHandlers, m as Topic, p as SubscriptionStatus, r as PresenceMember, t as EventSchemas } from "../topic-0uK4db_2.js";
6
- import { t as AuthSnapshot } from "../bind-BwQGUqdQ.js";
5
+ import { g as TopicHandlers, m as Topic, p as SubscriptionStatus, r as PresenceMember, t as EventSchemas } from "../topic-gTVjLGTk.js";
6
+ import { t as AuthSnapshot } from "../bind-CFsctoFJ.js";
7
7
  import { t as AuthSession } from "../view-DyFdMCqg.js";
8
- import { n as Controller } from "../controller-BeqcjERs.js";
9
- import { C as LiveCountSource, D as ProfileOf, E as PresenceTopic, O as UseActionOptions, S as LiveCountHookOptions, T as PresenceHookOptions, _ as ActionResultOf, a as DataRows, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, h as BlockRefetchOn, i as DataRow, l as BlockEventSource, m as BlockQueryState, n as DataId, o as DataSource, p as BlockQueryOptions, r as DataListArgs, s as DataState, t as fieldErrorsOf, u as BlockMutationActions, v as ActionState, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-Cfvcg-C3.js";
10
- import { n as BlockOptions } from "../block-env-Dh0Fe-fK.js";
8
+ import { n as Controller } from "../controller-B6vWdKSa.js";
9
+ import { C as LiveCountSource, D as ProfileOf, E as PresenceTopic, O as UseActionOptions, S as LiveCountHookOptions, T as PresenceHookOptions, _ as ActionResultOf, a as DataRows, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, h as BlockRefetchOn, i as DataRow, l as BlockEventSource, m as BlockQueryState, n as DataId, o as DataSource, p as BlockQueryOptions, r as DataListArgs, s as DataState, t as fieldErrorsOf, u as BlockMutationActions, v as ActionState, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-DBgDCITw.js";
10
+ import { n as BlockOptions } from "../block-env-BrUNeuJ_.js";
11
11
  import { n as BlockDataOf, r as BlockMethodName, t as BlockArgsOf } from "../block-method-CiVa2G-J.js";
12
12
  import { SupabaseClient } from "@supabase/supabase-js";
13
13
  import { QueryClient } from "@tanstack/query-core";
@@ -1,12 +1,12 @@
1
1
  import { O as AnyFunctions, k as AnyModels } from "../types-DFdg_4yN.js";
2
2
  import { l as PermissionRef, t as AnyAuthorizer } from "../authorizer-B6X09otb.js";
3
- import { t as BetterSupabase } from "../define-BqaUwrIC.js";
4
- import { n as BetterServer } from "../server-types-BTBzrzOH.js";
3
+ import { t as BetterSupabase } from "../define-Lf6rI2QN.js";
4
+ import { n as BetterServer } from "../server-types-BH6AjDBN.js";
5
5
  import { a as AuthorizedContext, c as ResourceLoaderContext, i as AuthorizeOptions, l as Unwrapped, n as ActionParsed, o as BlockActionOptions, r as ActionResult, s as BlockRequireOptions } from "../kit-CVgQCIBO.js";
6
6
  import { t as RefusalRedirects } from "../refusal-OrlI3g4H.js";
7
- import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-B-1Ka0GW.js";
7
+ import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-DKA3fTHl.js";
8
8
  import { t as Validated } from "../shared-CRRfQAKG.js";
9
- import { i as tagFor } from "../tags-CXeJu332.js";
9
+ import { i as tagFor } from "../tags-Cjtcp5cN.js";
10
10
  import { AnyEntry, Contributions } from "@supabase/middleware";
11
11
  import { StandardSchemaV1 } from "@standard-schema/spec";
12
12
  //#region src/bridges/sveltekit.d.ts
@@ -1,12 +1,12 @@
1
1
  import { t as DbException } from "../db-exception-Lngc1W49.js";
2
2
  import { r as dbErrorOf } from "../errors-BVFgt8BZ.js";
3
3
  import { c as toProblem } from "../problem-Bf0cJ7tk.js";
4
- import { c as extendServer, o as withFlush, s as createServer } from "../adapter-CfuBICuG.js";
4
+ import { c as extendServer, o as withFlush, s as createServer } from "../adapter-DZJZTY6g.js";
5
5
  import { n as defaultExpose } from "../respond-3RKp6VgU.js";
6
6
  import { r as tagFor } from "../tags-CIZTqtlY.js";
7
7
  import { i as requireCaller, o as runAction } from "../kit-DhlB-vv_.js";
8
8
  import { n as bufferInPlace, t as around } from "../shared-Bf-I13Ht.js";
9
- import { a as platformWaitUntil, i as localsOf, n as actionInput, r as frameworkEntry } from "../framework-CNhTg0th.js";
9
+ import { a as platformWaitUntil, i as localsOf, n as actionInput, r as frameworkEntry } from "../framework-DXM1vNcV.js";
10
10
  import { i as refusalTarget } from "../refusal-D48CMqpQ.js";
11
11
  //#region src/bridges/sveltekit.ts
12
12
  /**
@@ -1,5 +1,5 @@
1
1
  import { n as isRecord, t as isList } from "./guards-6F2bCtQR.js";
2
- import { i as isPlainDateTime, n as isInstant, r as isPlainDate } from "./temporal-DLZlWbOi.js";
2
+ import { i as isPlainDateTime, n as isInstant, r as isPlainDate } from "./temporal-Dbo0fLzc.js";
3
3
  //#region src/core/table-json-schema.ts
4
4
  /** JSON Schema for one scalar. Codec values are described by their wire form. */
5
5
  function scalarJsonSchema(kind) {
@@ -1,4 +1,4 @@
1
- import { Qt as CacheTarget, Zt as CacheAdapter } from "./define-BqaUwrIC.js";
1
+ import { $t as CacheTarget, Qt as CacheAdapter } from "./define-Lf6rI2QN.js";
2
2
  //#region src/core/tags.d.ts
3
3
  interface TagOptions {
4
4
  /** The tenant the read is scoped to; `"*"` is every tenant's reads. */
@@ -1,5 +1,5 @@
1
1
  import { O as AnyFunctions, k as AnyModels, ut as TableKey } from "../types-DFdg_4yN.js";
2
- import { t as BetterSupabase, v as Db } from "../define-BqaUwrIC.js";
2
+ import { t as BetterSupabase, y as Db } from "../define-Lf6rI2QN.js";
3
3
  import { n as DataEngine } from "../data-engine-BWoz9lED.js";
4
4
  import { t as BetterQueryMeta } from "../invalidate-DMp4eqfF.js";
5
5
  import { QueryClient, SkipToken } from "@tanstack/query-core";
@@ -1,10 +1,10 @@
1
1
  import { O as AnyFunctions, k as AnyModels } from "../types-DFdg_4yN.js";
2
2
  import { l as PermissionRef, t as AnyAuthorizer } from "../authorizer-B6X09otb.js";
3
- import { t as BetterSupabase } from "../define-BqaUwrIC.js";
4
- import { n as BetterServer } from "../server-types-BTBzrzOH.js";
3
+ import { t as BetterSupabase } from "../define-Lf6rI2QN.js";
4
+ import { n as BetterServer } from "../server-types-BH6AjDBN.js";
5
5
  import { a as AuthorizedContext, c as ResourceLoaderContext, i as AuthorizeOptions, l as Unwrapped, n as ActionParsed, o as BlockActionOptions, r as ActionResult, s as BlockRequireOptions } from "../kit-CVgQCIBO.js";
6
6
  import { t as RefusalRedirects } from "../refusal-OrlI3g4H.js";
7
- import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-B-1Ka0GW.js";
7
+ import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-DKA3fTHl.js";
8
8
  import { t as Validated } from "../shared-CRRfQAKG.js";
9
9
  import { AnyEntry, Contributions } from "@supabase/middleware";
10
10
  import { StandardSchemaV1 } from "@standard-schema/spec";
@@ -1,8 +1,8 @@
1
- import { c as extendServer, o as withFlush, s as createServer } from "../adapter-CfuBICuG.js";
1
+ import { c as extendServer, o as withFlush, s as createServer } from "../adapter-DZJZTY6g.js";
2
2
  import { n as defaultExpose } from "../respond-3RKp6VgU.js";
3
3
  import { i as requireCaller, o as runAction } from "../kit-DhlB-vv_.js";
4
4
  import { n as bufferInPlace, t as around } from "../shared-Bf-I13Ht.js";
5
- import { i as localsOf, r as frameworkEntry } from "../framework-CNhTg0th.js";
5
+ import { i as localsOf, r as frameworkEntry } from "../framework-DXM1vNcV.js";
6
6
  import { r as refusalResponse } from "../refusal-D48CMqpQ.js";
7
7
  //#region src/bridges/tanstack-start.ts
8
8
  /**
@@ -34,7 +34,9 @@ const ISO_TAGS = /* @__PURE__ */ new Set([
34
34
  "Temporal.Instant",
35
35
  "Temporal.PlainDateTime",
36
36
  "Temporal.PlainDate",
37
- "Temporal.PlainTime"
37
+ "Temporal.PlainTime",
38
+ "Temporal.PlainYearMonth",
39
+ "Temporal.PlainMonthDay"
38
40
  ]);
39
41
  function tagOf(value) {
40
42
  if (typeof value !== "object" || value === null) return;
@@ -44,7 +46,9 @@ function tagOf(value) {
44
46
  /**
45
47
  * The text Postgres reads back for a Temporal value: ISO 8601, with a
46
48
  * `ZonedDateTime` sent as its instant because Postgres rejects the
47
- * `[Region/City]` annotation. `undefined` for anything else.
49
+ * `[Region/City]` annotation, and a negative `Duration` with the sign on each
50
+ * field, the only negative form `interval` accepts. `undefined` for anything
51
+ * else.
48
52
  *
49
53
  * Values are recognized by `Symbol.toStringTag`, not `instanceof`, so values
50
54
  * from another realm or a second copy of the polyfill still encode.
@@ -53,8 +57,14 @@ function temporalText(value) {
53
57
  const tag = tagOf(value);
54
58
  if (tag === void 0) return;
55
59
  if (ISO_TAGS.has(tag)) return String(value);
60
+ if (tag === "Temporal.Duration") return durationText(String(value));
56
61
  return tag === "Temporal.ZonedDateTime" && typeof value === "object" && value !== null && isZoned(value) ? String(value.toInstant()) : void 0;
57
62
  }
63
+ const DURATION_FIELD = /(\d+(?:\.\d+)?)([YMWDHS])/g;
64
+ /** `-P1DT2H` as `P-1DT-2H`: Postgres reads a sign per field, not one in front. */
65
+ function durationText(text) {
66
+ return text.startsWith("-") ? text.slice(1).replaceAll(DURATION_FIELD, "-$1$2") : text;
67
+ }
58
68
  function isZoned(value) {
59
69
  return "toInstant" in value && typeof value.toInstant === "function";
60
70
  }
@@ -1,6 +1,6 @@
1
1
  import { t as DbException } from "./db-exception-Lngc1W49.js";
2
2
  import { n as dbError } from "./errors-BVFgt8BZ.js";
3
- import { c as optionalTemporal, t as TEMPORAL_MISSING } from "./temporal-DLZlWbOi.js";
3
+ import { c as optionalTemporal, t as TEMPORAL_MISSING } from "./temporal-Dbo0fLzc.js";
4
4
  //#region src/core/temporal-required.ts
5
5
  /** The error for a runtime without Temporal, naming the polyfill to load. */
6
6
  function temporalMissing() {
@@ -1,4 +1,4 @@
1
- import { t as AuthSnapshot } from "./bind-BwQGUqdQ.js";
1
+ import { t as AuthSnapshot } from "./bind-CFsctoFJ.js";
2
2
  import { t as AuthSession } from "./view-DyFdMCqg.js";
3
3
  //#region src/auth/tenant.d.ts
4
4
  /**
@@ -9,14 +9,14 @@ import { a as BlockTransportMiddleware } from "../block-hooks-DZN2w69m.js";
9
9
  import { a as SessionActor, o as SessionDelegation } from "../actor-CoveJgya.js";
10
10
  import { P as QueueProvider } from "../types-Czq9Xtpa.js";
11
11
  import { n as Embedder } from "../knowledge-F1IhRI4Q.js";
12
- import { a as AuthorizationProvider } from "../authorization-08F77H2w.js";
12
+ import { a as AuthorizationProvider } from "../authorization-DhoA7dsD.js";
13
13
  import { o as StreamStore } from "../store-CpheI-lN.js";
14
14
  import { o as Authorizer } from "../authorizer-B6X09otb.js";
15
- import { J as DbStats, Zt as CacheAdapter, t as BetterSupabase, v as Db } from "../define-BqaUwrIC.js";
15
+ import { Qt as CacheAdapter, Y as DbStats, t as BetterSupabase, y as Db } from "../define-Lf6rI2QN.js";
16
16
  import { Q as StoragePath } from "../bucket-vc-QRrva.js";
17
- import { a as ServerContext, c as ServerOptions } from "../server-types-BTBzrzOH.js";
17
+ import { a as ServerContext, c as ServerOptions } from "../server-types-BH6AjDBN.js";
18
18
  import { n as Impersonator } from "../impersonation-YTa9dZUv.js";
19
- import { tn as AnyRecordBinding } from "../define-block-CRwHsxZO.js";
19
+ import { tn as AnyRecordBinding } from "../define-block-DCAiOrNX.js";
20
20
  import { n as Money } from "../money-BNRdJQzA.js";
21
21
  import { i as EventSink, t as CloudEvent } from "../cloud-event-CzZTJkXv.js";
22
22
  import { i as AuthorizationHooks } from "../authorization-hooks-D_pwXlBs.js";
@@ -24,17 +24,17 @@ import { s as SqlClaims, t as BetterPostgres } from "../pool-CrtT4dg-.js";
24
24
  import { C as SupportSessionStore } from "../support-B4ZBVxt3.js";
25
25
  import { r as GuardOptions } from "../respond-oZeJ342J.js";
26
26
  import { l as Transcriber, s as NoteTaker, u as TranscriberInput } from "../recordings-BBSJt_YV.js";
27
- import { n as Controller } from "../controller-BeqcjERs.js";
28
- import { c as AiTaskRunner, o as AiTaskRun, r as AiTask } from "../ai-schedules-Bp-U0cZG.js";
29
- import { Ht as GeneratorModel, Qt as ResolvedConfig, jt as Generator, zt as GeneratorInput } from "../context-CjHXhCck.js";
27
+ import { n as Controller } from "../controller-B6vWdKSa.js";
28
+ import { c as AiTaskRunner, o as AiTaskRun, r as AiTask } from "../ai-schedules-7uQNMXve.js";
29
+ import { Ht as GeneratorModel, Qt as ResolvedConfig, jt as Generator, zt as GeneratorInput } from "../context-sgrUjA3U.js";
30
30
  import { r as WebhookInput } from "../signatures-Dkx9OE8j.js";
31
31
  import { n as Payment, o as PaymentProvider } from "../payments-BYcN34Fp.js";
32
32
  import { t as NotificationChannel } from "../channel-JcMd5lNP.js";
33
33
  import { a as DeliveryTransport } from "../delivery-n6lZGuGx.js";
34
34
  import { l as TaxProvider, r as TaxAddress } from "../tax-DPShHual.js";
35
35
  import { p as ShippingProvider, s as ShipmentAddress } from "../carrier-KzeYXVrW.js";
36
- import { L as WorkflowGraph, c as GraphCompiler, i as BuilderStarter, r as BuilderStartCall } from "../types-DsRfiQ0v.js";
37
- import { O as IncomingDestination, f as WebhookSecretStore, o as WebhookSigner, v as WebhookTransport } from "../signers-BAEzvTJ0.js";
36
+ import { L as WorkflowGraph, c as GraphCompiler, i as BuilderStarter, r as BuilderStartCall } from "../types-yj8VF4oY.js";
37
+ import { O as IncomingDestination, f as WebhookSecretStore, o as WebhookSigner, v as WebhookTransport } from "../signers-BKgmVh6A.js";
38
38
  import { t as ApiModel } from "../model-hwpvole9.js";
39
39
  import { t as EveDocumentBackend } from "../eve-B7jxYPCw.js";
40
40
  import { l as VersionOf, t as AnyDocumentFormat } from "../format-u-65igKI.js";
@@ -1,25 +1,25 @@
1
1
  import { t as DbException } from "../db-exception-Lngc1W49.js";
2
2
  import { n as dbError } from "../errors-BVFgt8BZ.js";
3
3
  import { t as isList } from "../guards-6F2bCtQR.js";
4
- import { d as temporalText } from "../temporal-DLZlWbOi.js";
5
- import { t as temporal } from "../temporal-required-Dy0GGD8E.js";
4
+ import { d as temporalText } from "../temporal-Dbo0fLzc.js";
5
+ import { t as temporal } from "../temporal-required-DcLhnDhQ.js";
6
6
  import { a as ok } from "../result-ntFBW2p2.js";
7
- import { t as BetterSupabase } from "../define-Djgn3HQQ.js";
8
- import { n as rawError } from "../block-transport-PNea4lfQ.js";
7
+ import { t as BetterSupabase } from "../define-D-dLADd5.js";
9
8
  import { a as toBase64Url, r as fromBase64, t as base64ToText } from "../base64-B9Wlsdj7.js";
10
- import { c as resolveConfig } from "../config-D74JT0qL.js";
9
+ import { c as resolveConfig } from "../config-BOt5T6Vs.js";
11
10
  import { a as isScopeName, c as templateFunctions, l as templatePlaceholders, n as TEMPLATE_PLACEHOLDERS, s as scopeProblems, u as templateProblems } from "../access-sql-CNIgUqWf.js";
12
11
  import { r as TRACKING_STATUSES, t as LABEL_FORMATS } from "../statuses-zRcc2TeZ.js";
13
12
  import { i as seedLite, n as loadLite, r as migrateLite, t as LITE_INSTALL } from "../runtime-CoKxZibd.js";
14
13
  import { ENV_VARIABLES } from "../env/index.js";
15
14
  import { t as defineController } from "../controller-BEliOBOv.js";
16
15
  import { t as onBlockEvent } from "../block-event-listener-Bu6G0TFH.js";
16
+ import { H as rawError } from "../block-helpers-B0f0ZVb5.js";
17
17
  import "../replicas-Dyoh3CEg.js";
18
18
  import { i as defineAuthorizer, r as checkPermission, s as requestOf } from "../authorizer-BGhXaDmo.js";
19
19
  import { a as tenantCredentialRef } from "../provider-B6g7rBZX.js";
20
- import { t as postgresExecutor } from "../executor-3qcMhg6R.js";
20
+ import { t as postgresExecutor } from "../executor-C2Ne-Scm.js";
21
21
  import { n as parseDbStats } from "../timing-dypS0nxW.js";
22
- import { r as subjectKey } from "../block-subjects-BRJO0IqO.js";
22
+ import { r as subjectKey } from "../block-subjects-DFSuFY1a.js";
23
23
  import { t as organizationsEvents } from "../events-DuLhzjP6.js";
24
24
  import { t as mailHeaders } from "../delivery-Bm0jxmzI.js";
25
25
  import { toCloudEvents } from "../events/index.js";
@@ -29,7 +29,7 @@ import { t as trashExtension } from "../extension-DzCc0IOd.js";
29
29
  import { t as membershipsExtension } from "../extension-DeAd_MqI.js";
30
30
  import { t as createdByExtension } from "../extension-DTaHjwdc.js";
31
31
  import { t as updatedAtExtension } from "../extension-mGylYROs.js";
32
- import { t as buildApiModel } from "../build-D9lWi5bk.js";
32
+ import { t as buildApiModel } from "../build-CM8PJqwW.js";
33
33
  import { createClient } from "@supabase/supabase-js";
34
34
  import { existsSync } from "node:fs";
35
35
  import { readFile } from "node:fs/promises";
@@ -1,9 +1,9 @@
1
1
  import { D as ValidationIssue, t as AsyncResult } from "./result-DZeA5KS6.js";
2
2
  import { $ as RecordRef } from "./types-DFdg_4yN.js";
3
3
  import { o as FilterField } from "./filter-query-BXLs72G9.js";
4
- import { cn as RecordBindingResult, hn as TimelineItem, in as RecordBindingData } from "./define-block-CRwHsxZO.js";
5
- import { A as BindingBlocks, F as LoadBindingsOptions, M as BindingName, N as BindingOf, P as BindingSource, V as PermissionSet, _ as RecordTypeBlocks, g as RecordType, h as RecordCan } from "./index-EieRHooI.js";
6
- import { c as ListParseOptions, m as ListSearchParams } from "./list-query-6vTI1VN6.js";
4
+ import { cn as RecordBindingResult, hn as TimelineItem, in as RecordBindingData } from "./define-block-DCAiOrNX.js";
5
+ import { A as BindingBlocks, F as LoadBindingsOptions, M as BindingName, N as BindingOf, P as BindingSource, V as PermissionSet, _ as RecordTypeBlocks, g as RecordType, h as RecordCan } from "./index-ClvuSZEz.js";
6
+ import { c as ListParseOptions, m as ListSearchParams } from "./list-query-XYfUZb0j.js";
7
7
  //#region src/records/list.d.ts
8
8
  /**
9
9
  * How a binding fills a list column: `count` is how many rows it has (the
@@ -1,7 +1,7 @@
1
1
  import { D as ValidationIssue, b as DbError, t as AsyncResult } from "./result-DZeA5KS6.js";
2
2
  import { D as AccessTopicPolicy, O as AnyFunctions, it as Row, k as AnyModels, ut as TableKey } from "./types-DFdg_4yN.js";
3
- import { t as AuthorizationFunctions } from "./authorization-08F77H2w.js";
4
- import { t as BetterSupabase } from "./define-BqaUwrIC.js";
3
+ import { t as AuthorizationFunctions } from "./authorization-DhoA7dsD.js";
4
+ import { t as BetterSupabase } from "./define-Lf6rI2QN.js";
5
5
  import { et as TemplateParams, tt as TemplateValues } from "./bucket-vc-QRrva.js";
6
6
  import { g as SubscriberPolicy, h as SubscriberEvent, i as AuthorizationHooks, m as Subscriber } from "./authorization-hooks-D_pwXlBs.js";
7
7
  import { t as RealtimeStatus } from "./realtime-status-BhNkb-Ow.js";
@@ -381,6 +381,11 @@ interface BuilderOptions<S extends StandardSchemaV1 | undefined = undefined> ext
381
381
  * organization-owned version) capped to the stored permissions.
382
382
  */
383
383
  readonly authorization?: Pick<AuthorizationHooks, "automation">;
384
+ /**
385
+ * The claim the default `runAs` claims carry the tenant in, the app's
386
+ * `claims.tenant`. Default `tenant_id`.
387
+ */
388
+ readonly tenantClaim?: string;
384
389
  /**
385
390
  * The `workflows` port: the workflows block, which `schedules.sync` writes a
386
391
  * schedule trigger's schedule to. Build it with a transport that may create
@@ -1,8 +1,8 @@
1
1
  import { n as dbError } from "./errors-BVFgt8BZ.js";
2
2
  import { n as isRecord } from "./guards-6F2bCtQR.js";
3
3
  import { a as ok, t as AsyncResult } from "./result-ntFBW2p2.js";
4
- import { o as blockCall } from "./block-helpers-DnCtsKtv.js";
5
- import { r as withBlockHooks } from "./block-hooks-DbIpkq7a.js";
4
+ import { o as blockCall } from "./block-helpers-B0f0ZVb5.js";
5
+ import { r as withBlockHooks } from "./block-hooks-DKtz0HRh.js";
6
6
  //#region src/blocks/undo/undo.ts
7
7
  /** The functions an undo token may call: the inverses the blocks return. */
8
8
  const UNDO_FUNCTIONS = [
@@ -1,6 +1,6 @@
1
1
  import { n as dbError } from "../errors-BVFgt8BZ.js";
2
2
  import { n as isRecord } from "../guards-6F2bCtQR.js";
3
- import { c as optionalTemporal } from "../temporal-DLZlWbOi.js";
3
+ import { c as optionalTemporal } from "../temporal-Dbo0fLzc.js";
4
4
  import { a as ok, r as err, t as AsyncResult } from "../result-ntFBW2p2.js";
5
5
  import { t as importOptionalPeer } from "../optional-peer-C1NbBRJm.js";
6
6
  //#region src/vercel-connect/vercel-connect.ts
@@ -1,10 +1,10 @@
1
1
  import { n as dbError } from "./errors-BVFgt8BZ.js";
2
- import { c as optionalTemporal, s as nowInstant } from "./temporal-DLZlWbOi.js";
3
- import { n as temporalMissing } from "./temporal-required-Dy0GGD8E.js";
2
+ import { c as optionalTemporal, s as nowInstant } from "./temporal-Dbo0fLzc.js";
3
+ import { n as temporalMissing } from "./temporal-required-DcLhnDhQ.js";
4
4
  import { a as ok, r as err } from "./result-ntFBW2p2.js";
5
5
  import { t as toApp } from "./casing-DdFWEtqr.js";
6
6
  import { n as hmacHex, r as timingSafeEqual } from "./hmac-B3CTTlfv.js";
7
- import { a as unauthorized, n as header, r as replayed, s as verifyWebhook } from "./signatures-CNcoq392.js";
7
+ import { a as unauthorized, n as header, r as replayed, s as verifyWebhook } from "./signatures-CX1b4WHa.js";
8
8
  //#region src/blocks/webhooks/verify.ts
9
9
  /** Stripe signs with the endpoint secret's UTF-8 bytes, not its base64 decoding. */
10
10
  const stripeSignature = hmacHex;
@@ -1,7 +1,7 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { f as Result } from "./result-DZeA5KS6.js";
3
3
  import { O as AnyFunctions, it as Row, k as AnyModels, ut as TableKey } from "./types-DFdg_4yN.js";
4
- import { t as BetterSupabase } from "./define-BqaUwrIC.js";
4
+ import { t as BetterSupabase } from "./define-Lf6rI2QN.js";
5
5
  import { n as VerifyOptions, r as WebhookInput, t as VerifiedWebhook } from "./signatures-Dkx9OE8j.js";
6
6
  //#region src/blocks/webhooks/verify.d.ts
7
7
  /** The `Stripe-Signature` header for `body`, for tests and local replays. */
@@ -1,13 +1,13 @@
1
1
  import { b as DbError } from "../result-DZeA5KS6.js";
2
2
  import { Ct as Events, D as BlockEventPattern, T as BlockEvent, bt as EventMap, k as BlockEventsMatching } from "../events-vcqenSYU.js";
3
- import { pt as QuerySpec } from "../define-BqaUwrIC.js";
3
+ import { mt as QuerySpec } from "../define-Lf6rI2QN.js";
4
4
  import { tt as TemplateValues } from "../bucket-vc-QRrva.js";
5
- import { g as TopicHandlers, m as Topic, p as SubscriptionStatus, r as PresenceMember, t as EventSchemas } from "../topic-0uK4db_2.js";
6
- import { t as AuthSnapshot } from "../bind-BwQGUqdQ.js";
5
+ import { g as TopicHandlers, m as Topic, p as SubscriptionStatus, r as PresenceMember, t as EventSchemas } from "../topic-gTVjLGTk.js";
6
+ import { t as AuthSnapshot } from "../bind-CFsctoFJ.js";
7
7
  import { t as AuthSession } from "../view-DyFdMCqg.js";
8
- import { n as Controller } from "../controller-BeqcjERs.js";
9
- import { C as LiveCountSource, D as ProfileOf, E as PresenceTopic, O as UseActionOptions, S as LiveCountHookOptions, T as PresenceHookOptions, _ as ActionResultOf, a as DataRows, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, h as BlockRefetchOn, i as DataRow, l as BlockEventSource, m as BlockQueryState, n as DataId, o as DataSource, p as BlockQueryOptions, r as DataListArgs, s as DataState, t as fieldErrorsOf, u as BlockMutationActions, v as ActionState, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-Cfvcg-C3.js";
10
- import { n as BlockOptions } from "../block-env-Dh0Fe-fK.js";
8
+ import { n as Controller } from "../controller-B6vWdKSa.js";
9
+ import { C as LiveCountSource, D as ProfileOf, E as PresenceTopic, O as UseActionOptions, S as LiveCountHookOptions, T as PresenceHookOptions, _ as ActionResultOf, a as DataRows, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, h as BlockRefetchOn, i as DataRow, l as BlockEventSource, m as BlockQueryState, n as DataId, o as DataSource, p as BlockQueryOptions, r as DataListArgs, s as DataState, t as fieldErrorsOf, u as BlockMutationActions, v as ActionState, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-DBgDCITw.js";
10
+ import { n as BlockOptions } from "../block-env-BrUNeuJ_.js";
11
11
  import { n as BlockDataOf, r as BlockMethodName, t as BlockArgsOf } from "../block-method-CiVa2G-J.js";
12
12
  import { t as SupportView } from "../support-view-BYOgwXsJ.js";
13
13
  import { SupabaseClient } from "@supabase/supabase-js";
@@ -1,4 +1,4 @@
1
- import { c as RealtimeClient, p as SubscriptionStatus } from "./topic-0uK4db_2.js";
1
+ import { c as RealtimeClient, p as SubscriptionStatus } from "./topic-gTVjLGTk.js";
2
2
  //#region src/realtime/watch-topic.d.ts
3
3
  interface TopicWatch {
4
4
  readonly onMessage: (event: string, payload: unknown) => void;
@@ -0,0 +1,91 @@
1
+ import { r as isPlainObject } from "./clone-CkG0-hlI.js";
2
+ import { t as DbException } from "./db-exception-Lngc1W49.js";
3
+ import { n as dbError } from "./errors-BVFgt8BZ.js";
4
+ import { d as temporalText } from "./temporal-Dbo0fLzc.js";
5
+ import { t as temporal } from "./temporal-required-DcLhnDhQ.js";
6
+ //#region src/ir/wire.ts
7
+ /** ISO text of a `Date`; an invalid date has none. */
8
+ function dateText(value) {
9
+ if (Number.isNaN(value.getTime())) throw new DbException(dbError("invalid_value", "The Date is invalid"));
10
+ return value.toISOString();
11
+ }
12
+ /**
13
+ * Wire form of an app value: Temporal values and `Date` to ISO text, `bigint`
14
+ * to decimal text.
15
+ */
16
+ function encodeValue(value) {
17
+ if (typeof value !== "object" || value === null) return typeof value === "bigint" ? value.toString() : value;
18
+ if (value instanceof Date) return dateText(value);
19
+ const text = temporalText(value);
20
+ if (text !== void 0) return text;
21
+ if (Array.isArray(value)) return value.map(encodeValue);
22
+ return value;
23
+ }
24
+ /**
25
+ * Wire form of a function argument or query parameter: `encodeValue`, also
26
+ * inside plain objects, so a json or jsonb argument carries ISO text and
27
+ * decimal `bigint` text at any depth. Other objects (`Uint8Array`, class
28
+ * instances) pass through.
29
+ */
30
+ function encodeArgument(value) {
31
+ if (Array.isArray(value)) return value.map(encodeArgument);
32
+ if (isPlainObject(value)) {
33
+ const out = {};
34
+ for (const [key, item] of Object.entries(value)) out[key] = encodeArgument(item);
35
+ return out;
36
+ }
37
+ return encodeValue(value);
38
+ }
39
+ /**
40
+ * The arguments of a function call in wire form, without the ones left
41
+ * `undefined` so the function's defaults apply.
42
+ */
43
+ function encodeArguments(args) {
44
+ const out = {};
45
+ for (const [key, value] of Object.entries(args)) if (value !== void 0) out[key] = encodeArgument(value);
46
+ return out;
47
+ }
48
+ /** Postgres timestamps can be `infinity`; Temporal has no such value. */
49
+ function finite(value, type) {
50
+ const text = String(value);
51
+ if (text === "infinity" || text === "-infinity") throw new DbException(dbError("invalid_value", `${text} can't be held by a Temporal.${type}`));
52
+ return text;
53
+ }
54
+ const TIMESTAMPTZ = /^(\d{4,})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)$/;
55
+ /**
56
+ * `timestamptz` text in UTC as ISO 8601 with a `Z`, from either PostgREST's
57
+ * form (`2026-10-21T07:10:00.123456+00:00`) or Postgres text (`2026-10-21
58
+ * 07:10:00.123456+02`). The fraction keeps every digit it had, so no
59
+ * microsecond is lost; `infinity` and `-infinity` pass through.
60
+ */
61
+ function utcText(value) {
62
+ const text = String(value);
63
+ if (text === "infinity" || text === "-infinity") return text;
64
+ const match = TIMESTAMPTZ.exec(text);
65
+ if (!match) throw new DbException(dbError("invalid_value", `${text} is not a timestamptz`));
66
+ const [, year, month, day, hour, minute, second, fraction, zulu, sign] = match;
67
+ const offset = zulu ? 0 : (sign === "-" ? -1 : 1) * (Number(match[10]) * 3600 + Number(match[11] ?? 0) * 60 + Number(match[12] ?? 0));
68
+ const utc = /* @__PURE__ */ new Date(0);
69
+ utc.setUTCFullYear(Number(year), Number(month) - 1, Number(day));
70
+ utc.setUTCHours(Number(hour), Number(minute), Number(second) - offset, 0);
71
+ if (Number.isNaN(utc.getTime())) throw new DbException(dbError("invalid_value", `${text} is not a timestamptz`));
72
+ return `${utc.toISOString().slice(0, -5)}${fraction ? `.${fraction}` : ""}Z`;
73
+ }
74
+ /** App form of one wire scalar for a column with `codec`. */
75
+ function decodeScalar(codec, value) {
76
+ if (value === null || value === void 0) return value;
77
+ switch (codec) {
78
+ case "instant": return temporal().Instant.from(finite(value, "Instant"));
79
+ case "plainDateTime": return temporal().PlainDateTime.from(finite(value, "PlainDateTime"));
80
+ case "bigint": return BigInt(value);
81
+ case "string": return String(value);
82
+ case "utcString": return utcText(value);
83
+ default: return codec;
84
+ }
85
+ }
86
+ /** App form of a wire value for a column with `codec`. */
87
+ function decodeValue(codec, value) {
88
+ return Array.isArray(value) ? value.map((item) => decodeScalar(codec, item)) : decodeScalar(codec, value);
89
+ }
90
+ //#endregion
91
+ export { encodeArguments as a, encodeArgument as i, decodeScalar as n, encodeValue as o, decodeValue as r, dateText as t };
@@ -1,5 +1,5 @@
1
- import { L as WorkflowGraph, i as BuilderStarter, l as NodeRunRecord } from "../../types-DsRfiQ0v.js";
2
- import { a as GraphSubject, i as GraphStepCall, o as approvalToken, r as GraphRuntime, s as executeGraph, t as GraphApprovalCall } from "../../executor-Bi056Cnj.js";
1
+ import { L as WorkflowGraph, i as BuilderStarter, l as NodeRunRecord } from "../../types-yj8VF4oY.js";
2
+ import { a as GraphSubject, i as GraphStepCall, o as approvalToken, r as GraphRuntime, s as executeGraph, t as GraphApprovalCall } from "../../executor-DNK401lZ.js";
3
3
  import { s as WorkflowFn } from "../../workflow-sdk-B3Ss55Fy.js";
4
4
  import { World } from "@workflow/world";
5
5
  //#region src/workflow-sdk/builder/builder.d.ts
@@ -1,5 +1,5 @@
1
1
  import { n as subjectAttribute, t as WORKFLOW_ATTRIBUTES } from "../../attributes-Bzf51_nc.js";
2
- import { d as isGraphRecord, i as startNodeOf, m as validateGraph, n as executeGraph, p as topologicalOrder, s as durationMs, t as approvalToken } from "../../executor-D3gB-9si.js";
2
+ import { d as isGraphRecord, i as startNodeOf, m as validateGraph, n as executeGraph, p as topologicalOrder, s as durationMs, t as approvalToken } from "../../executor-DqIci3Jb.js";
3
3
  import { o as runForKey, r as contextAttributes } from "../../workflow-sdk-Cf0LAOFF.js";
4
4
  import { start } from "workflow/api";
5
5
  import { getStepMetadata, getWorkflowMetadata } from "workflow";
@@ -1,6 +1,6 @@
1
1
  import { n as dbError } from "../../errors-BVFgt8BZ.js";
2
- import { i as sqlIdent } from "../../template-Drgg3v2J.js";
3
2
  import { o as problemResponse } from "../../problem-Bf0cJ7tk.js";
3
+ import { i as sqlIdent } from "../../template-Drgg3v2J.js";
4
4
  import { i as WORLD_POSTGRES_VERSION, r as WORKFLOW_VAULT_SECRETS } from "../../workflow-sdk-DELaQEp3.js";
5
5
  import { n as hmacHex, r as timingSafeEqual } from "../../hmac-B3CTTlfv.js";
6
6
  import { t as watchPoolErrors } from "../../pool-errors-JUBcGrre.js";
@@ -1,5 +1,5 @@
1
1
  import { t as AsyncResult } from "../result-DZeA5KS6.js";
2
- import { c as RealtimeClient, r as PresenceMember } from "../topic-0uK4db_2.js";
2
+ import { c as RealtimeClient, r as PresenceMember } from "../topic-gTVjLGTk.js";
3
3
  import { a as DocumentSuggestion, d as OpenedDocument, l as Documents, r as DocumentRef, t as DecidedSuggestion } from "../documents-Cup1rpjF.js";
4
4
  //#region src/yjs/yjs.d.ts
5
5
  type PresenceState = Readonly<Record<string, unknown>>;
package/dist/yjs/index.js CHANGED
@@ -2,7 +2,7 @@ import { n as isRecord } from "../guards-6F2bCtQR.js";
2
2
  import { a as ok, r as err, t as AsyncResult } from "../result-ntFBW2p2.js";
3
3
  import { i as toBase64, r as fromBase64 } from "../base64-B9Wlsdj7.js";
4
4
  import { t as importOptionalPeer } from "../optional-peer-C1NbBRJm.js";
5
- import { t as defineTopic } from "../topic-DXbA-jwr.js";
5
+ import { t as defineTopic } from "../topic-J9I3yu6f.js";
6
6
  //#region src/yjs/yjs.ts
7
7
  function isYjs(value) {
8
8
  return isRecord(value) && typeof value["applyUpdate"] === "function" && typeof value["mergeUpdates"] === "function";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "better-supabase",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "description": "Strongly typed Supabase: generated schema, typed repositories, plugins, auth glue, framework integrations and the better-supabase CLI.",
5
5
  "keywords": [
6
6
  "cli",