better-supabase 0.17.0 → 0.18.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 (563) hide show
  1. package/dist/{access-sql-B-MkVARa.js → access-sql-CNIgUqWf.js} +2 -0
  2. package/dist/{adapter-Dyks1lX1.js → adapter-CfuBICuG.js} +3 -1
  3. package/dist/{ai-schedules-Dk9H3kAp.d.ts → ai-schedules-DzLh6BYI.d.ts} +1 -1
  4. package/dist/ai-sdk/agents/index.d.ts +2 -2
  5. package/dist/ai-sdk/memory/index.js +1 -1
  6. package/dist/{api-CpL3hm87.d.ts → api-B6zteBya.d.ts} +1 -1
  7. package/dist/{app-tables-Q0TYfeih.js → app-tables-DyswUg6J.js} +10 -2
  8. package/dist/{app-tables-dS02piE7.d.ts → app-tables-XwCviyhP.d.ts} +1 -1
  9. package/dist/astro/index.d.ts +3 -3
  10. package/dist/astro/index.js +5 -5
  11. package/dist/{attachments-aJYgdYtB.js → attachments-M-Dy79Ry.js} +9 -2
  12. package/dist/{authorization-CNsvnwle.d.ts → authorization-IiE__z2m.d.ts} +169 -87
  13. package/dist/{automations-CIwRq7zm.js → automations-B5P6vTvk.js} +2 -2
  14. package/dist/{automations-CD1XlL2W.js → automations-BKjJpktQ.js} +1 -1
  15. package/dist/{automations-Bc2ue55V.js → automations-FCnWy387.js} +2 -2
  16. package/dist/{bind-C801IaK-.d.ts → bind-pu5TLrla.d.ts} +3 -3
  17. package/dist/{block-env-BeG4DiiO.d.ts → block-env-CA65ulTD.d.ts} +4 -4
  18. package/dist/blocks/access-requests/index.d.ts +1 -1
  19. package/dist/blocks/access-requests/index.js +1 -1
  20. package/dist/blocks/activities/index.d.ts +1 -1
  21. package/dist/blocks/activities/index.js +1 -1
  22. package/dist/blocks/agents/index.d.ts +1 -1
  23. package/dist/blocks/agents/index.js +1 -1
  24. package/dist/blocks/ai-cache/index.d.ts +1 -1
  25. package/dist/blocks/ai-cache/index.js +1 -1
  26. package/dist/blocks/ai-chat/index.d.ts +4 -4
  27. package/dist/blocks/ai-chat/index.js +1 -1
  28. package/dist/blocks/ai-files/index.d.ts +1 -1
  29. package/dist/blocks/ai-files/index.js +1 -1
  30. package/dist/blocks/ai-keys/index.d.ts +1 -1
  31. package/dist/blocks/ai-keys/index.js +1 -1
  32. package/dist/blocks/ai-schedules/index.d.ts +2 -2
  33. package/dist/blocks/ai-schedules/index.js +1 -1
  34. package/dist/blocks/announcements/index.d.ts +4 -4
  35. package/dist/blocks/announcements/index.js +1 -1
  36. package/dist/blocks/api-keys/index.d.ts +2 -2
  37. package/dist/blocks/api-keys/index.js +1 -1
  38. package/dist/blocks/approvals/index.d.ts +1 -1
  39. package/dist/blocks/approvals/index.js +1 -1
  40. package/dist/blocks/assets/index.d.ts +1 -1
  41. package/dist/blocks/assets/index.js +1 -1
  42. package/dist/blocks/assignment/index.d.ts +1 -1
  43. package/dist/blocks/attachments/index.d.ts +40 -4
  44. package/dist/blocks/attachments/index.js +42 -4
  45. package/dist/blocks/audit/index.d.ts +3 -3
  46. package/dist/blocks/audit/index.js +2 -2
  47. package/dist/blocks/automations/index.d.ts +3 -3
  48. package/dist/blocks/automations/index.js +1 -1
  49. package/dist/blocks/billable-time/index.d.ts +1 -1
  50. package/dist/blocks/billing/index.d.ts +2 -2
  51. package/dist/blocks/billing/index.js +1 -1
  52. package/dist/blocks/bookings/index.d.ts +2 -2
  53. package/dist/blocks/bookings/index.js +1 -1
  54. package/dist/blocks/bulk/index.d.ts +1 -1
  55. package/dist/blocks/bulk/index.js +1 -1
  56. package/dist/blocks/calendar/index.d.ts +2 -2
  57. package/dist/blocks/calendar/index.js +1 -1
  58. package/dist/blocks/catalog/index.d.ts +1 -1
  59. package/dist/blocks/catalog/index.js +1 -1
  60. package/dist/blocks/channels/index.d.ts +1 -1
  61. package/dist/blocks/collections/index.d.ts +1 -1
  62. package/dist/blocks/collections/index.js +1 -1
  63. package/dist/blocks/comments/index.d.ts +5 -5
  64. package/dist/blocks/comments/index.js +1 -1
  65. package/dist/blocks/compliance/index.d.ts +1 -1
  66. package/dist/blocks/compliance/index.js +1 -1
  67. package/dist/blocks/connectors/index.d.ts +1 -1
  68. package/dist/blocks/connectors/index.js +1 -1
  69. package/dist/blocks/contacts/index.d.ts +1 -1
  70. package/dist/blocks/contacts/index.js +1 -1
  71. package/dist/blocks/content/index.d.ts +2 -2
  72. package/dist/blocks/content/index.js +1 -1
  73. package/dist/blocks/contracts/index.d.ts +1 -1
  74. package/dist/blocks/contracts/index.js +1 -1
  75. package/dist/blocks/courses/index.d.ts +2 -2
  76. package/dist/blocks/courses/index.js +1 -1
  77. package/dist/blocks/created-by/index.d.ts +1 -1
  78. package/dist/blocks/created-by/index.js +1 -1
  79. package/dist/blocks/custom-fields/index.d.ts +1 -1
  80. package/dist/blocks/custom-fields/index.js +1 -1
  81. package/dist/blocks/data-lifecycle/index.d.ts +1 -1
  82. package/dist/blocks/data-lifecycle/index.js +1 -1
  83. package/dist/blocks/deals/index.d.ts +1 -1
  84. package/dist/blocks/deals/index.js +1 -1
  85. package/dist/blocks/dispatch/index.d.ts +2 -2
  86. package/dist/blocks/dispatch/index.js +1 -1
  87. package/dist/blocks/documents/index.d.ts +1 -1
  88. package/dist/blocks/documents/index.js +1 -1
  89. package/dist/blocks/domains/index.d.ts +1 -1
  90. package/dist/blocks/domains/index.js +1 -1
  91. package/dist/blocks/donations/index.d.ts +1 -1
  92. package/dist/blocks/donations/index.js +1 -1
  93. package/dist/blocks/drive/index.d.ts +1 -1
  94. package/dist/blocks/drive/index.js +2 -2
  95. package/dist/blocks/employees/index.d.ts +2 -2
  96. package/dist/blocks/employees/index.js +1 -1
  97. package/dist/blocks/enrichment/index.d.ts +1 -1
  98. package/dist/blocks/enrollments/index.d.ts +1 -1
  99. package/dist/blocks/enrollments/index.js +1 -1
  100. package/dist/blocks/entitlements/index.d.ts +3 -3
  101. package/dist/blocks/expenses/index.d.ts +1 -1
  102. package/dist/blocks/expenses/index.js +1 -1
  103. package/dist/blocks/field-history/index.d.ts +1 -1
  104. package/dist/blocks/flags/index.d.ts +1 -1
  105. package/dist/blocks/flags/index.js +1 -1
  106. package/dist/blocks/forecasts/index.d.ts +1 -1
  107. package/dist/blocks/forms/index.d.ts +2 -2
  108. package/dist/blocks/forms/index.js +1 -1
  109. package/dist/blocks/goals/index.d.ts +1 -1
  110. package/dist/blocks/goals/index.js +1 -1
  111. package/dist/blocks/guests/index.d.ts +1 -1
  112. package/dist/blocks/hiring/index.d.ts +1 -1
  113. package/dist/blocks/hiring/index.js +1 -1
  114. package/dist/blocks/identities/index.d.ts +1 -1
  115. package/dist/blocks/identities/index.js +1 -1
  116. package/dist/blocks/imports/index.d.ts +1 -1
  117. package/dist/blocks/inbox/index.d.ts +5 -5
  118. package/dist/blocks/inbox/index.js +1 -1
  119. package/dist/blocks/incidents/index.d.ts +1 -1
  120. package/dist/blocks/incidents/index.js +1 -1
  121. package/dist/blocks/index.d.ts +4 -4
  122. package/dist/blocks/index.js +1 -1
  123. package/dist/blocks/inventory/index.d.ts +1 -1
  124. package/dist/blocks/inventory/index.js +1 -1
  125. package/dist/blocks/invoices/index.d.ts +1 -1
  126. package/dist/blocks/invoices/index.js +1 -1
  127. package/dist/blocks/knowledge/index.d.ts +1 -1
  128. package/dist/blocks/knowledge/index.js +1 -1
  129. package/dist/blocks/lead-scoring/index.d.ts +2 -2
  130. package/dist/blocks/lead-scoring/index.js +1 -1
  131. package/dist/blocks/leases/index.d.ts +1 -1
  132. package/dist/blocks/leases/index.js +1 -1
  133. package/dist/blocks/leave/index.d.ts +1 -1
  134. package/dist/blocks/leave/index.js +1 -1
  135. package/dist/blocks/ledger/index.d.ts +1 -1
  136. package/dist/blocks/mail-sync/index.d.ts +2 -2
  137. package/dist/blocks/mail-sync/index.js +1 -1
  138. package/dist/blocks/memberships/index.d.ts +3 -3
  139. package/dist/blocks/memberships/index.js +1 -1
  140. package/dist/blocks/memory/index.d.ts +1 -1
  141. package/dist/blocks/memory/index.js +1 -1
  142. package/dist/blocks/messaging/index.d.ts +5 -5
  143. package/dist/blocks/messaging/index.js +1 -1
  144. package/dist/blocks/metrics/index.d.ts +1 -1
  145. package/dist/blocks/metrics/index.js +1 -1
  146. package/dist/blocks/mfa/index.d.ts +2 -2
  147. package/dist/blocks/moderation/index.d.ts +1 -1
  148. package/dist/blocks/moderation/index.js +1 -1
  149. package/dist/blocks/notifications/index.d.ts +17 -6
  150. package/dist/blocks/notifications/index.js +110 -40
  151. package/dist/blocks/numbering/index.d.ts +1 -1
  152. package/dist/blocks/numbering/index.js +1 -1
  153. package/dist/blocks/oauth-server/index.d.ts +1 -1
  154. package/dist/blocks/oauth-server/index.js +1 -1
  155. package/dist/blocks/onboarding/index.d.ts +2 -2
  156. package/dist/blocks/onboarding/index.js +1 -1
  157. package/dist/blocks/orders/index.d.ts +2 -2
  158. package/dist/blocks/orders/index.js +1 -1
  159. package/dist/blocks/organizations/index.d.ts +38 -3
  160. package/dist/blocks/organizations/index.js +50 -5
  161. package/dist/blocks/outbox/index.d.ts +1 -1
  162. package/dist/blocks/outbox/index.js +1 -1
  163. package/dist/blocks/passes/index.d.ts +2 -2
  164. package/dist/blocks/passes/index.js +1 -1
  165. package/dist/blocks/permissions/index.d.ts +4 -4
  166. package/dist/blocks/permissions/index.js +2 -2
  167. package/dist/blocks/pipelines/index.d.ts +1 -1
  168. package/dist/blocks/pipelines/index.js +1 -1
  169. package/dist/blocks/posts/index.d.ts +2 -2
  170. package/dist/blocks/posts/index.js +1 -1
  171. package/dist/blocks/profiles/index.d.ts +1 -1
  172. package/dist/blocks/profiles/index.js +1 -1
  173. package/dist/blocks/promotions/index.d.ts +1 -1
  174. package/dist/blocks/promotions/index.js +1 -1
  175. package/dist/blocks/push/index.d.ts +76 -10
  176. package/dist/blocks/push/index.js +172 -43
  177. package/dist/blocks/queue/index.d.ts +1 -1
  178. package/dist/blocks/queue/index.js +1 -1
  179. package/dist/blocks/quotes/index.d.ts +1 -1
  180. package/dist/blocks/quotes/index.js +1 -1
  181. package/dist/blocks/rank/index.d.ts +1 -1
  182. package/dist/blocks/reactions/index.d.ts +4 -4
  183. package/dist/blocks/reactions/index.js +1 -1
  184. package/dist/blocks/relations/index.d.ts +1 -1
  185. package/dist/blocks/relations/index.js +1 -1
  186. package/dist/blocks/reminders/index.d.ts +1 -1
  187. package/dist/blocks/reminders/index.js +1 -1
  188. package/dist/blocks/reviews/index.d.ts +1 -1
  189. package/dist/blocks/reviews/index.js +1 -1
  190. package/dist/blocks/saved-views/index.d.ts +2 -2
  191. package/dist/blocks/saved-views/index.js +1 -1
  192. package/dist/blocks/scores/index.d.ts +1 -1
  193. package/dist/blocks/scores/index.js +1 -1
  194. package/dist/blocks/search/index.d.ts +3 -3
  195. package/dist/blocks/search/index.js +1 -1
  196. package/dist/blocks/security-events/index.d.ts +1 -1
  197. package/dist/blocks/security-events/index.js +1 -1
  198. package/dist/blocks/segments/index.d.ts +2 -2
  199. package/dist/blocks/segments/index.js +1 -1
  200. package/dist/blocks/sequences/index.d.ts +2 -2
  201. package/dist/blocks/sequences/index.js +1 -1
  202. package/dist/blocks/service-accounts/index.d.ts +1 -1
  203. package/dist/blocks/service-accounts/index.js +1 -1
  204. package/dist/blocks/sessions/index.d.ts +2 -2
  205. package/dist/blocks/sessions/index.js +1 -1
  206. package/dist/blocks/settings/index.d.ts +2 -2
  207. package/dist/blocks/settings/index.js +1 -1
  208. package/dist/blocks/share-links/index.d.ts +1 -1
  209. package/dist/blocks/share-links/index.js +1 -1
  210. package/dist/blocks/shipments/index.d.ts +2 -2
  211. package/dist/blocks/shipments/index.js +1 -1
  212. package/dist/blocks/signatures/index.d.ts +2 -2
  213. package/dist/blocks/signatures/index.js +1 -1
  214. package/dist/blocks/signing-keys/index.d.ts +1 -1
  215. package/dist/blocks/signing-keys/index.js +1 -1
  216. package/dist/blocks/sla/index.d.ts +1 -1
  217. package/dist/blocks/sla/index.js +1 -1
  218. package/dist/blocks/sso/index.d.ts +1 -1
  219. package/dist/blocks/sso/index.js +1 -1
  220. package/dist/blocks/state-machine/index.d.ts +1 -1
  221. package/dist/blocks/state-machine/index.js +1 -1
  222. package/dist/blocks/subjects/index.d.ts +2 -2
  223. package/dist/blocks/tags/index.d.ts +2 -2
  224. package/dist/blocks/tags/index.js +1 -1
  225. package/dist/blocks/tasks/index.d.ts +2 -2
  226. package/dist/blocks/tasks/index.js +1 -1
  227. package/dist/blocks/teams/index.d.ts +1 -1
  228. package/dist/blocks/teams/index.js +1 -1
  229. package/dist/blocks/templates/index.d.ts +2 -2
  230. package/dist/blocks/templates/index.js +1 -1
  231. package/dist/blocks/time-tracking/index.d.ts +1 -1
  232. package/dist/blocks/time-tracking/index.js +1 -1
  233. package/dist/blocks/timeline/index.d.ts +1 -1
  234. package/dist/blocks/trash/index.d.ts +1 -1
  235. package/dist/blocks/trash/index.js +1 -1
  236. package/dist/blocks/undo/index.d.ts +2 -2
  237. package/dist/blocks/updated-at/index.d.ts +1 -1
  238. package/dist/blocks/updated-at/index.js +1 -1
  239. package/dist/blocks/usage/index.d.ts +2 -2
  240. package/dist/blocks/usage/index.js +1 -1
  241. package/dist/blocks/vercel-marketplace/index.d.ts +1 -1
  242. package/dist/blocks/vercel-marketplace/index.js +1 -1
  243. package/dist/blocks/versions/index.d.ts +1 -1
  244. package/dist/blocks/versions/index.js +1 -1
  245. package/dist/blocks/waitlist/index.d.ts +1 -1
  246. package/dist/blocks/waitlist/index.js +1 -1
  247. package/dist/blocks/webhooks/index.d.ts +1 -1
  248. package/dist/blocks/webhooks/index.js +1 -1
  249. package/dist/blocks/workflow-editor/index.d.ts +4 -4
  250. package/dist/blocks/workflow-editor/index.js +1 -1
  251. package/dist/blocks/workflows/index.d.ts +4 -4
  252. package/dist/{channel-BjvGO39m.d.ts → channel-JcMd5lNP.d.ts} +30 -2
  253. package/dist/cli/{add-DMcrsWjC.js → add-B1S3yK4L.js} +18 -13
  254. package/dist/cli/add-BQPJnapO.js +1 -0
  255. package/dist/cli/{add-BinNYhFD.js → add-D7YIXslp.js} +2 -2
  256. package/dist/cli/{backfill-DxBB62Zr.js → backfill-BwkyNhlC.js} +4 -4
  257. package/dist/cli/bin.js +1 -1
  258. package/dist/cli/{blocks-rxOS-Mzz.js → blocks-CBqENu3C.js} +1 -1
  259. package/dist/cli/{blocks-DSgTifw0.js → blocks-DDm1Zc2S.js} +2 -2
  260. package/dist/cli/{cache-oU0yHKf0.js → cache-DE2IH1-C.js} +1 -1
  261. package/dist/cli/{codemod-Dsrv_3gQ.js → codemod-OHKhVV-v.js} +4 -4
  262. package/dist/cli/{command-CQ61x6gN.js → command-BWEEXmtz.js} +20 -0
  263. package/dist/cli/{completion-Dlu5AdUW.js → completion-8EDK21xj.js} +1 -1
  264. package/dist/cli/{completion-BwI0_Ap5.js → completion-BfnKI4QZ.js} +2 -2
  265. package/dist/cli/{completion-2Y3D_eNu.js → completion-Bt7LMypX.js} +2 -2
  266. package/dist/cli/{config-2rwFHbwj.js → config-BJSqMi04.js} +17 -5
  267. package/dist/cli/{config-C6XylzKz.js → config-BlfVh0IP.js} +1 -1
  268. package/dist/cli/{config-CPux9Wa7.js → config-WKDixoGK.js} +1 -1
  269. package/dist/cli/{content-mapper-DLbXilBz.js → content-mapper-CaygHH_k.js} +2 -2
  270. package/dist/cli/{db-Bwrr3GHM.js → db-DYU5hUcd.js} +3 -3
  271. package/dist/cli/{doctor-CKt5Yyl4.js → doctor-D_nrsd9E.js} +17 -16
  272. package/dist/cli/{env-BBl5L8Bf.js → env-BCgVZkcb.js} +1 -1
  273. package/dist/cli/env-xhwXk5Ri.js +1 -0
  274. package/dist/cli/{gen-CeG6lbka.js → gen-D7gMEwvg.js} +22 -15
  275. package/dist/cli/index.d.ts +2 -2
  276. package/dist/cli/index.js +8 -8
  277. package/dist/cli/{init-DrQlf9RL.js → init-ch-HWJyp.js} +7 -7
  278. package/dist/cli/{keys-DGEpMbeB.js → keys-CbaL0lnw.js} +1 -1
  279. package/dist/cli/{live-BvWGM4c3.js → live-B38ePuRS.js} +2 -2
  280. package/dist/cli/{mcp-BrOnGB15.js → mcp-P9RP2SJ3.js} +3 -3
  281. package/dist/cli/{metadata-BNSdPuKp.js → metadata-BTihErEc.js} +3 -3
  282. package/dist/cli/{migration-safety-NtB3dsRU.js → migration-safety-DYo1vVWC.js} +2 -2
  283. package/dist/cli/{module-migration-mKhX88V_.js → migrations-BoIyGczt.js} +3 -113
  284. package/dist/cli/module-migration-DXvo0EqU.js +119 -0
  285. package/dist/cli/{moved-CsfDQcyk.js → moved-DVwgE8lV.js} +1 -1
  286. package/dist/cli/{parse-B9Iv_-Pf.js → parse-B079x40m.js} +1 -1
  287. package/dist/cli/powersync-D-0yV_L_.js +283 -0
  288. package/dist/cli/powersync-DXVsKkAu.js +1 -0
  289. package/dist/cli/{print-Dh8iuPK3.js → print-CRon4lXf.js} +2 -1
  290. package/dist/cli/{remove-DfFXVBRr.js → remove-D89s99ha.js} +6 -6
  291. package/dist/cli/{render-ChIwdIOJ.js → render-BJF9ytUi.js} +8 -5
  292. package/dist/cli/{run-BXx6D1aR.js → run-DmOTMa44.js} +2 -2
  293. package/dist/cli/{run-CLSHSVYo.js → run-jeplMBOK.js} +29 -10
  294. package/dist/cli/{run-D48ZEU58.js → run-x9ZY4Tm0.js} +38 -37
  295. package/dist/cli/{seed-CG-pA-5N.js → seed-D9mt8bnW.js} +3 -3
  296. package/dist/cli/seed-EPO6AvLG.js +1 -0
  297. package/dist/cli/{shared-D0XBFSlz.js → shared-B38Chjgd.js} +1 -1
  298. package/dist/cli/{skills-toUan_OV.js → skills-FXAVPLzp.js} +1 -1
  299. package/dist/cli/{snapshot-C6vh_n3t.js → snapshot-BXmU3IXN.js} +3 -3
  300. package/dist/cli/{source-args-MTLYpifA.js → source-args-DlckPVje.js} +1 -1
  301. package/dist/cli/{source-BZbEK5if.js → source-irttnsEb.js} +1 -1
  302. package/dist/cli/{spec-B4LhpI6t.js → spec-CDxfokey.js} +3 -3
  303. package/dist/cli/{spec-C-dhdKwa.js → spec-DzD5wMVF.js} +1 -1
  304. package/dist/cli/{sql-layout-26LSoifK.js → sql-layout-D8QrNvt4.js} +2 -2
  305. package/dist/cli/{stack-CWEHdO0b.js → stack-DgASZP0K.js} +1 -1
  306. package/dist/cli/{sync-CHGMZCJ5.js → sync-s1iKFIos.js} +3 -2
  307. package/dist/cli/{upgrade-C0dVsqNX.js → upgrade-B4FPlK-_.js} +4 -3
  308. package/dist/cli/{upgrade-GB9rqUGT.js → upgrade-CluxP3JJ.js} +3 -3
  309. package/dist/cli/{version-T507a49w.js → version-TgFM8sOd.js} +1 -1
  310. package/dist/client/index.d.ts +5 -5
  311. package/dist/client/native/index.d.ts +4 -4
  312. package/dist/{composite-B7f1MMgr.d.ts → composite-C-8A8qzi.d.ts} +2 -2
  313. package/dist/{composite-B3TIjId4.js → composite-D24L5RIY.js} +2 -2
  314. package/dist/config/index.d.ts +3 -3
  315. package/dist/config/index.js +4 -4
  316. package/dist/{config-CIBc79_8.js → config-CD2OGfCG.js} +2 -1
  317. package/dist/{config-BVNNJwGC.js → config-mbVyJwSc.js} +3 -3
  318. package/dist/{context-CKCgjEDF.d.ts → context-D24k1Cpc.d.ts} +29 -4
  319. package/dist/{controller-CJUXhshv.d.ts → controller-BR7CZ1R9.d.ts} +1 -1
  320. package/dist/{conversion-DgHdDlTK.d.ts → conversion-BgtOfTaS.d.ts} +1 -1
  321. package/dist/create/index.d.ts +2 -2
  322. package/dist/create/index.js +5 -5
  323. package/dist/{define-block-Xxw8Hroe.d.ts → define-block-CJWiDWa5.d.ts} +10 -3
  324. package/dist/edge/index.d.ts +5 -5
  325. package/dist/edge/index.js +7 -7
  326. package/dist/elysia/index.d.ts +1 -1
  327. package/dist/elysia/index.js +1 -1
  328. package/dist/{email-tt2QqiSc.d.ts → email-B3YxEzwC.d.ts} +1 -1
  329. package/dist/{entitlements-B0jmjNLD.d.ts → entitlements-DHcNt1aF.d.ts} +1 -1
  330. package/dist/{events-SqJLbb8q.js → events-DuLhzjP6.js} +2 -0
  331. package/dist/expo/index.d.ts +1 -1
  332. package/dist/expo/index.js +3 -3
  333. package/dist/{field-errors-DqlebtTE.d.ts → field-errors-DucQdLl7.d.ts} +5 -5
  334. package/dist/{framework-BozTXRzt.js → framework-CNhTg0th.js} +1 -1
  335. package/dist/{framework-CF6zFU7a.d.ts → framework-x9Y4uB1q.d.ts} +4 -4
  336. package/dist/h3/index.d.ts +1 -1
  337. package/dist/h3/index.js +1 -1
  338. package/dist/h3/v1/index.d.ts +1 -1
  339. package/dist/h3/v1/index.js +1 -1
  340. package/dist/hono/index.d.ts +4 -4
  341. package/dist/hono/index.js +7 -6
  342. package/dist/{index-Dbb7BQdi.d.ts → index-4WT_uRRL.d.ts} +14 -3
  343. package/dist/{index-BCeTYhFk.d.ts → index-BAcQz5DS.d.ts} +1 -1
  344. package/dist/{index-lB-8iPmY.d.ts → index-BH3NYExp.d.ts} +2 -2
  345. package/dist/{index-B8YjrfVl.d.ts → index-C0t-vNIt.d.ts} +1 -1
  346. package/dist/{index-DUxXdQN_.d.ts → index-C6ruLtyx.d.ts} +2 -2
  347. package/dist/{index-ClMN0f98.d.ts → index-XAyzdLns.d.ts} +8 -8
  348. package/dist/{index-BxYOB1Oc.d.ts → index-iRkFvJ7J.d.ts} +1 -1
  349. package/dist/index.d.ts +1 -1
  350. package/dist/index.js +1 -1
  351. package/dist/{instances-QOzIz9-q.js → instances-DDt7NdVl.js} +1 -1
  352. package/dist/{kit-DOwKpSkA.d.ts → kit-CVgQCIBO.d.ts} +1 -1
  353. package/dist/{kit-5l-o8RxL.js → kit-DhlB-vv_.js} +1 -1
  354. package/dist/mapper/bin.js +7 -6
  355. package/dist/mcp/index.d.ts +9 -3
  356. package/dist/mcp/index.js +6 -6
  357. package/dist/mcp/sdk/index.d.ts +1 -1
  358. package/dist/mcp/sdk/index.js +2 -2
  359. package/dist/{methods-B3o7BFOW.js → methods-Cund9ZBe.js} +1 -1
  360. package/dist/nestjs/index.d.ts +2 -2
  361. package/dist/nestjs/index.js +1 -1
  362. package/dist/next/index.d.ts +12 -12
  363. package/dist/next/index.js +6 -6
  364. package/dist/node/index.d.ts +2 -2
  365. package/dist/node/index.js +1 -1
  366. package/dist/{operations-Dc07aV_H.d.ts → operations-CAjMgNr9.d.ts} +1 -1
  367. package/dist/{options-CK5WiFwG.js → options-3OYOU56e.js} +1 -1
  368. package/dist/{options-xD4_FRUq.js → options-56zYYXxc.js} +1 -1
  369. package/dist/{options-_F-enoBs.d.ts → options-5WvWOkAm.d.ts} +1 -1
  370. package/dist/{options-SViK_2x2.js → options-62woPFn3.js} +1 -1
  371. package/dist/{options-1GgseJq5.js → options-7ixoOoap.js} +1 -1
  372. package/dist/{options-BZsoPJGX.js → options-9dSU5RML.js} +2 -2
  373. package/dist/{options-y_-AkVCs.d.ts → options-B0YZtAkb.d.ts} +1 -1
  374. package/dist/{options-HLwOuF2H.js → options-B2Kz_tCx.js} +2 -2
  375. package/dist/{options-CEMawFrr.js → options-B685YSzQ.js} +1 -1
  376. package/dist/{options-DWbA9buW.js → options-B692WoK6.js} +2 -2
  377. package/dist/options-BHU1wc74.js +5 -0
  378. package/dist/{options-CPK2nQER.js → options-BHy0Z5Zd.js} +2 -2
  379. package/dist/{options-Fz6xqu-b.js → options-BKDxrPvE.js} +2 -2
  380. package/dist/{options-BVg58avP.js → options-BLfymS4s.js} +2 -2
  381. package/dist/{options-CYV4iZiQ.js → options-BOCRbzh3.js} +1 -1
  382. package/dist/{options-tSsUF0-7.js → options-BQWJqwHO.js} +1 -1
  383. package/dist/{options-Cl9Ag2Pt.js → options-BQunK6_Y.js} +2 -2
  384. package/dist/{options-CljDnQt2.js → options-BQyrZjwM.js} +4 -1
  385. package/dist/options-BR9xTHZW.js +5 -0
  386. package/dist/{options-D40CQzji.js → options-BRUdd5jY.js} +1 -1
  387. package/dist/{options-CsGl5BLH.d.ts → options-BTmaRzx2.d.ts} +13 -5
  388. package/dist/{options-Li1Dyu88.d.ts → options-BUCQYAeJ.d.ts} +2 -2
  389. package/dist/{options-B5BU2Yg7.js → options-BawzwlmC.js} +2 -2
  390. package/dist/{options-BlzSfWxC.d.ts → options-BbLDAp7G.d.ts} +2 -2
  391. package/dist/{options-DTDxFT6J.js → options-Bc4xz5jQ.js} +2 -2
  392. package/dist/options-BfFC4iFE.js +8 -0
  393. package/dist/{options-Br1Xi2Hw.js → options-BfPsL7E2.js} +1 -1
  394. package/dist/{options-DYBQ973I.js → options-Bfmwwc78.js} +1 -1
  395. package/dist/{options-c5WCsky5.js → options-BhsdveDk.js} +2 -2
  396. package/dist/{options-B5woz53h.js → options-BomoTH-8.js} +2 -2
  397. package/dist/{options-DeNejBtq.js → options-BtjkzIVh.js} +1 -1
  398. package/dist/options-Bvi9bl4H.js +5 -0
  399. package/dist/{options-IHPg8ZoA.js → options-BwKNmaJo.js} +2 -2
  400. package/dist/{options-CtUUU71w.js → options-BxpLtyk-.js} +4 -6
  401. package/dist/{options-D_bBVCXg.js → options-BzB2QxL3.js} +1 -1
  402. package/dist/{options-CmraJhd9.js → options-C078wBP0.js} +1 -1
  403. package/dist/options-C1-pwEqm.js +5 -0
  404. package/dist/{options-BZOliZvb.js → options-C3AdsFJ6.js} +2 -2
  405. package/dist/options-C7C5OhmL.d.ts +8 -0
  406. package/dist/{options-CCUaRLgd.js → options-C87u6eSa.js} +1 -1
  407. package/dist/{options-CVSWgZpY.js → options-CBAEGxwS.js} +1 -1
  408. package/dist/{options-9gvPo1BC.js → options-CDUr8zzX.js} +1 -1
  409. package/dist/{options-DMR68VAC.js → options-CFjGxfa8.js} +2 -2
  410. package/dist/{options-Bf96aVk5.js → options-CI6P0xhV.js} +1 -1
  411. package/dist/{options-B5VUf4IT.js → options-CJFMK9A_.js} +1 -1
  412. package/dist/{options-CRz8Ht_4.js → options-CLpgx7en.js} +3 -2
  413. package/dist/{options-BesyRBnM.js → options-CTXHj9zr.js} +2 -2
  414. package/dist/{options-D2d1fFuw.js → options-CTl8T88w.js} +1 -1
  415. package/dist/{options-C3RgtOLo.js → options-CTv-xmbA.js} +2 -2
  416. package/dist/{options-Bpl-WFPk.js → options-CUIOOv4z.js} +1 -1
  417. package/dist/{options-o2kfYU2x.js → options-CZDmtsbV.js} +2 -2
  418. package/dist/{options-CF7nRWXS.js → options-CZTscdPB.js} +1 -1
  419. package/dist/{options-BlncUmIc.js → options-CZdKndeo.js} +2 -2
  420. package/dist/{options-DplE18Ko.d.ts → options-C_7g9TTq.d.ts} +1 -1
  421. package/dist/{options-C_pb1Nd3.js → options-Cb2FOFj5.js} +1 -1
  422. package/dist/{options-t_O5ldT6.js → options-CbOstLa7.js} +2 -2
  423. package/dist/{options-Bt0bYMLl.js → options-CcXgWlvm.js} +2 -2
  424. package/dist/{options-BMjcVuaI.js → options-CfVPctAw.js} +7 -0
  425. package/dist/{options-DWpz3V3F.js → options-ChiL-4ZS.js} +2 -2
  426. package/dist/{options-E7KcmHQv.js → options-Cjgaf8ub.js} +2 -2
  427. package/dist/{options-DrSkIBCD.js → options-CoSPgWKy.js} +1 -1
  428. package/dist/{options-Bp7sgKvl.js → options-CpZ2HlSU.js} +5 -3
  429. package/dist/{options-CN7PHkhU.js → options-CsSe8Nba.js} +1 -1
  430. package/dist/{options-B9q8CROT.js → options-CsvJR-r2.js} +1 -1
  431. package/dist/{options-oeAq4Ho5.js → options-Cucv6sWP.js} +2 -2
  432. package/dist/{options-BOOEzor9.js → options-CyjL9lTf.js} +2 -2
  433. package/dist/{options-pOVWwbAK.d.ts → options-D-OOO9V2.d.ts} +1 -1
  434. package/dist/{options-nFzfgtA6.js → options-D0Y6ZMe8.js} +1 -1
  435. package/dist/{options-BnZS7IK-.js → options-D0sj5abR.js} +2 -2
  436. package/dist/{options-0qvUckqt.js → options-D2s7fT1s.js} +2 -2
  437. package/dist/{options-BjtrC7o6.js → options-D32-YxnO.js} +1 -1
  438. package/dist/{options-B0EJULm5.js → options-D610Fa6T.js} +2 -2
  439. package/dist/{options-BvtnxHfK.js → options-D96dScev.js} +1 -1
  440. package/dist/{options-DgQo80Xh.js → options-DFpyP1bg.js} +2 -2
  441. package/dist/{options-BYOtaF7w.js → options-DJEcS4DX.js} +1 -1
  442. package/dist/{options-DPgdAXO5.js → options-DJbN3bi9.js} +2 -2
  443. package/dist/{options-EsUh744F.js → options-DKoQoRCy.js} +2 -2
  444. package/dist/{options-CvD9vNvx.js → options-DM1qaMMQ.js} +1 -1
  445. package/dist/{options-eBPsk4WI.js → options-DNgSwhsm.js} +2 -2
  446. package/dist/{options-2EMA_x6_.js → options-DOIwzRXL.js} +2 -2
  447. package/dist/{options-D6as77gU.d.ts → options-DRIgHh4O.d.ts} +2 -2
  448. package/dist/{options-DDzggjN7.js → options-DRrZmJyI.js} +2 -2
  449. package/dist/{options-DJ-aYPVN.js → options-DUMUsvml.js} +2 -2
  450. package/dist/{options-Cp0HyUEk.js → options-DWwL5Kaz.js} +1 -1
  451. package/dist/{options-BCrqe3HH.js → options-DZHZYlpD.js} +1 -1
  452. package/dist/{options-BQIYfx9F.js → options-DZLkeqWn.js} +2 -2
  453. package/dist/{options-RKYdmIdV.js → options-DZRpXKQE.js} +1 -1
  454. package/dist/{options-D0G06Zm9.js → options-D_9Vxx7f.js} +2 -2
  455. package/dist/{options-BMGClqoa.js → options-DcHl59RC.js} +1 -1
  456. package/dist/{options-CW9wTqOk.js → options-Dcaql09y.js} +1 -1
  457. package/dist/{options-CXFz0xxS.js → options-DcnBNYmV.js} +1 -1
  458. package/dist/{options-21s0dpnX.js → options-DdpM-fiP.js} +2 -2
  459. package/dist/{options-BbnPv6p7.js → options-DhdazgTZ.js} +2 -2
  460. package/dist/{options-C239TLRF.js → options-Dpy-Ruo-.js} +1 -1
  461. package/dist/{options-DWVYM8P0.d.ts → options-DsVuVRH3.d.ts} +1 -1
  462. package/dist/{options-BlOPivzq.js → options-DtAJxfHS.js} +1 -1
  463. package/dist/{options-DXnBN2E7.js → options-Dz9Yo52Z.js} +2 -2
  464. package/dist/{options-DcOx8_3X.d.ts → options-HnfETSHr.d.ts} +1 -1
  465. package/dist/{options-CoX6VKGb.js → options-LqUXTpML.js} +1 -1
  466. package/dist/options-MsloEAIB.js +5 -0
  467. package/dist/{options-DCduTMST.js → options-P2FxqYpd.js} +2 -2
  468. package/dist/options-_1gAIMq7.d.ts +60 -0
  469. package/dist/{options-B0FcEKtH.js → options-aT89JqlB.js} +1 -1
  470. package/dist/{options-Cyu0hgmN.js → options-cVKZu9b0.js} +2 -2
  471. package/dist/options-fMxhtuVR.js +5 -0
  472. package/dist/{options-BxcFLL1G.js → options-fkShrmGQ.js} +2 -2
  473. package/dist/{options-Ctac2R0Q.js → options-gUvfr3no.js} +2 -2
  474. package/dist/{options-DNKyN5uq.js → options-hynwKWuf.js} +2 -2
  475. package/dist/{options-CkScQRJR.js → options-lsxJYfYx.js} +2 -2
  476. package/dist/{options-CyAhRKKm.d.ts → options-o5wCw8H7.d.ts} +2 -2
  477. package/dist/{options-DARkpk2P.js → options-p49DFg3H.js} +2 -2
  478. package/dist/{options-zkyhM3qi.js → options-pYNpXKcg.js} +1 -1
  479. package/dist/{options-Cqq2jUww.js → options-qtETCHzW.js} +2 -2
  480. package/dist/options-rnKlqYEr.js +5 -0
  481. package/dist/{options-KV84gAxl.js → options-sU_zGkiV.js} +2 -2
  482. package/dist/{options-BfLmA375.js → options-xq4MXG1M.js} +2 -2
  483. package/dist/{options-BA6jV6py.js → options-zzlznRA7.js} +2 -2
  484. package/dist/orpc/index.d.ts +19 -8
  485. package/dist/orpc/index.js +60 -31
  486. package/dist/otel/index.d.ts +1 -1
  487. package/dist/otel/index.js +5 -5
  488. package/dist/{ports-DnpAuTvB.d.ts → ports-g0H1Kzwr.d.ts} +1 -1
  489. package/dist/powersync/index.d.ts +135 -2
  490. package/dist/powersync/index.js +333 -1
  491. package/dist/preset/index.d.ts +3 -3
  492. package/dist/preset/index.js +3 -3
  493. package/dist/{preset-BIANzB5p.js → preset-B3CukUhu.js} +4 -4
  494. package/dist/{push-token-C_mFkYfq.d.ts → push-token-Cl2EihRc.d.ts} +1 -1
  495. package/dist/query/index.d.ts +1 -1
  496. package/dist/react/index.d.ts +5 -5
  497. package/dist/react/native/index.d.ts +1 -1
  498. package/dist/react/server.d.ts +5 -5
  499. package/dist/react-router/index.d.ts +3 -3
  500. package/dist/react-router/index.js +5 -5
  501. package/dist/realtime/index.d.ts +3 -3
  502. package/dist/realtime/index.js +1 -1
  503. package/dist/{record-form-xWvVcb86.d.ts → record-form-zMwz0Ayt.d.ts} +1 -1
  504. package/dist/records/index.d.ts +7 -7
  505. package/dist/{refusal-ByBZcm0V.js → refusal-D48CMqpQ.js} +2 -2
  506. package/dist/{refusal-CSntB_x8.d.ts → refusal-OrlI3g4H.d.ts} +1 -1
  507. package/dist/{resource-DV2GC2dB.js → resource-R3KToNze.js} +1 -1
  508. package/dist/{resource-execute-DqWfEc56.d.ts → resource-execute-CKBtGL8-.d.ts} +1 -1
  509. package/dist/{resource-types-BIoz_ElD.d.ts → resource-types-8Q5Klkpa.d.ts} +1 -1
  510. package/dist/{resources-C02l_YBJ.js → resources-DqIwoQsP.js} +1 -1
  511. package/dist/{resources-Bt2PDKE7.d.ts → resources-DxpqenZA.d.ts} +1 -1
  512. package/dist/{respond-C3CcOZlA.js → respond-3RKp6VgU.js} +8 -1
  513. package/dist/{respond-Dn1_YhC1.d.ts → respond-oZeJ342J.d.ts} +6 -0
  514. package/dist/server/index.d.ts +6 -6
  515. package/dist/server/index.js +6 -6
  516. package/dist/{session-C1OuXbtN.d.ts → session-Fcft5A39.d.ts} +1 -1
  517. package/dist/{sign-in-B64114O4.js → sign-in-BLkRU3lc.js} +1 -1
  518. package/dist/solid/index.d.ts +5 -5
  519. package/dist/solid-start/index.d.ts +3 -3
  520. package/dist/solid-start/index.js +5 -5
  521. package/dist/spec/index.d.ts +2 -2
  522. package/dist/spec/index.js +1 -1
  523. package/dist/{spec-pins-DIx95afw.d.ts → spec-pins-BZkKfwY8.d.ts} +2 -0
  524. package/dist/{spec-pins-C1Vm8OBl.js → spec-pins-D3zDek-u.js} +1 -0
  525. package/dist/sql/index.d.ts +5 -5
  526. package/dist/sql/index.js +5 -5
  527. package/dist/{sql-ClTmzHs8.js → sql-fHTjZGqR.js} +2608 -1415
  528. package/dist/sql-type-iUSZpaUu.js +34 -0
  529. package/dist/ssr/index.d.ts +1 -1
  530. package/dist/{statuses-DMMDwXpZ.js → statuses-Alll5Ip6.js} +2 -2
  531. package/dist/storage/index.js +1 -1
  532. package/dist/svelte/index.d.ts +5 -5
  533. package/dist/sveltekit/index.d.ts +3 -3
  534. package/dist/sveltekit/index.js +5 -5
  535. package/dist/tanstack-start/index.d.ts +3 -3
  536. package/dist/tanstack-start/index.js +5 -5
  537. package/dist/{tenant-DVvjw9H-.d.ts → tenant-DyoVYFfC.d.ts} +1 -1
  538. package/dist/testing/index.d.ts +7 -7
  539. package/dist/testing/index.js +6 -3
  540. package/dist/{timeline-BBfKuMVL.d.ts → timeline-CMmo0R7g.d.ts} +2 -2
  541. package/dist/{topic-ikV_pLTX.js → topic-J9I3yu6f.js} +1 -1
  542. package/dist/{topic-BtLz-qTI.d.ts → topic-nQYxoTaU.d.ts} +1 -1
  543. package/dist/vue/index.d.ts +5 -5
  544. package/dist/{watch-topic-tnfOTa3-.d.ts → watch-topic-UGSEWAqR.d.ts} +1 -1
  545. package/dist/workflow-sdk/world/index.js +1 -1
  546. package/dist/{workflow-sdk-Bw6_u0ar.js → workflow-sdk-DELaQEp3.js} +2 -0
  547. package/dist/yjs/index.d.ts +1 -1
  548. package/dist/yjs/index.js +1 -1
  549. package/package.json +1 -1
  550. package/schemas/config-v1.json +449 -69
  551. package/dist/cli/add-z-3pXI6C.js +0 -1
  552. package/dist/cli/env-CAU1nknN.js +0 -1
  553. package/dist/cli/seed-CUxW5Dks.js +0 -1
  554. package/dist/options-63AKQNv0.js +0 -5
  555. package/dist/options-B-cxGmRA.js +0 -5
  556. package/dist/options-BPDiwSa-.js +0 -5
  557. package/dist/options-C6rEL6U5.js +0 -8
  558. package/dist/options-CE93HOYi.d.ts +0 -7
  559. package/dist/options-CTZNpb2n.js +0 -5
  560. package/dist/options-CrC78Tee.js +0 -5
  561. package/dist/options-DINdgVih.d.ts +0 -9
  562. package/dist/options-DWML05Cp.js +0 -5
  563. package/dist/options-Q1Bzgqpr.js +0 -5
@@ -341,4 +341,336 @@ function createUploadConnector(options) {
341
341
  };
342
342
  }
343
343
  //#endregion
344
- export { checkSqlite, compileSqlite, createUploadConnector, fromSqliteError, likeToGlob, postgrestTimestamp, powersyncEngine, powersyncExecutor, quoteSqliteIdent, sqliteCompiler, sqliteValue, syncWithAuth, uploadOutcome, uploadRoute };
344
+ //#region src/powersync/attachments.ts
345
+ /** The columns an attachment insert accepts, besides `id`. */
346
+ const WRITABLE = [
347
+ "organization_id",
348
+ "bucket",
349
+ "subject_type",
350
+ "subject_id",
351
+ "name",
352
+ "mime_type",
353
+ "size",
354
+ "metadata",
355
+ "width",
356
+ "height",
357
+ "pages"
358
+ ];
359
+ const DEFAULT_PATH = "{organization_id}/attachments/{id}";
360
+ const PLACEHOLDER = /\{([a-z_]+)\}/g;
361
+ function placeholder(row, key) {
362
+ switch (key) {
363
+ case "id": return row.id;
364
+ case "organization_id": return row.organization_id ?? "-";
365
+ case "subject_type": return row.subject_type ?? "-";
366
+ case "subject_id": return row.subject_id ?? "-";
367
+ case "ext": return /\.([a-z0-9]{1,10})$/.exec((row.name ?? "").toLowerCase())?.[1] ?? "";
368
+ default: throw new TypeError(`better-supabase: {${key}} is not an attachments path placeholder`);
369
+ }
370
+ }
371
+ function attachmentQueueRoute(repository, options = {}) {
372
+ const template = options.path ?? DEFAULT_PATH;
373
+ const columns = [...WRITABLE, ...options.extraColumns ?? []];
374
+ const route = async (entry) => {
375
+ switch (entry.op) {
376
+ case "PUT": {
377
+ const data = entry.opData ?? {};
378
+ const row = { id: entry.id };
379
+ for (const column of columns) if (data[column] !== void 0) row[column] = data[column];
380
+ const result = await repository.create(row);
381
+ return !result.ok && result.error.kind === "conflict" ? ok(void 0) : result;
382
+ }
383
+ case "DELETE": {
384
+ const result = await repository.delete(entry.id);
385
+ return !result.ok && result.error.kind === "not_found" ? ok(void 0) : result;
386
+ }
387
+ default: return err(dbError("unsupported", `better-supabase: attachmentQueueRoute can't replay PowerSync op ${entry.op}; attachments are written once`));
388
+ }
389
+ };
390
+ return Object.assign(route, { path: (row) => {
391
+ const base = template.replaceAll(PLACEHOLDER, (_, key) => placeholder(row, key));
392
+ return (row.version ?? 1) > 1 ? `${base}-v${String(row.version)}` : base;
393
+ } });
394
+ }
395
+ //#endregion
396
+ //#region src/powersync/notifications.ts
397
+ const FUNCTIONS = [
398
+ "get_notification",
399
+ "list_notifications",
400
+ "notification_page",
401
+ "notification_counts",
402
+ "mark_notifications_read",
403
+ "mark_notifications_unread",
404
+ "dismiss_notifications"
405
+ ];
406
+ /** Event columns the item reads by name; any other column becomes a field. */
407
+ const EVENT_COLUMNS = /* @__PURE__ */ new Set([
408
+ "id",
409
+ "type",
410
+ "data",
411
+ "actor_id",
412
+ "subject_type",
413
+ "subject_id",
414
+ "subject_label",
415
+ "summary",
416
+ "action_path",
417
+ "actions",
418
+ "priority",
419
+ "created_at",
420
+ "updated_at"
421
+ ]);
422
+ /**
423
+ * A block transport for the notifications module on PowerSync: the feed, its
424
+ * counts and marking read, unread or dismissed run on the synced tables, so the
425
+ * inbox works offline. Writes go into PowerSync's upload queue, which
426
+ * `notificationRecipientsRoute` replays on the server. Every other function
427
+ * (sending, preferences, resolving) goes to `server`.
428
+ *
429
+ * ```ts
430
+ * const notifications = createNotifications({
431
+ * transport: powersyncNotificationsTransport(powersync, {
432
+ * server: rpcTransport(supabase),
433
+ * }),
434
+ * });
435
+ * ```
436
+ *
437
+ * The synced rows are the signed-in user's only (the `powersync streams` query
438
+ * filters by `auth.user_id()`), so the local reads add no user filter.
439
+ */
440
+ function powersyncNotificationsTransport(database, options) {
441
+ const recipients = quoteSqliteIdent(options.tables?.recipients ?? "notification_recipients");
442
+ const events = quoteSqliteIdent(options.tables?.events ?? "notification_events");
443
+ const tenant = options.tenantColumn ?? "organization_id";
444
+ const tenantColumn = quoteSqliteIdent(tenant);
445
+ const byName = new Map(FUNCTIONS.map((fn) => [options.functions?.[fn] ?? fn, fn]));
446
+ const toItem = (recipient, event) => {
447
+ const fields = {};
448
+ for (const [key, value] of Object.entries(event)) if (!EVENT_COLUMNS.has(key) && key !== tenant) fields[key] = value;
449
+ return {
450
+ id: recipient["id"],
451
+ event_id: event["id"],
452
+ type: event["type"],
453
+ data: json(event["data"]) ?? {},
454
+ created_at: timestamp(recipient["created_at"]),
455
+ read_at: timestamp(recipient["read_at"]),
456
+ tenant: event[tenant] ?? null,
457
+ actor_id: event["actor_id"] ?? null,
458
+ subject_type: event["subject_type"] ?? null,
459
+ subject_id: event["subject_id"] ?? null,
460
+ subject_label: event["subject_label"] ?? null,
461
+ summary: event["summary"] ?? null,
462
+ action_path: event["action_path"] ?? null,
463
+ actions: json(event["actions"]) ?? [],
464
+ priority: event["priority"] ?? null,
465
+ resolved_at: timestamp(recipient["resolved_at"]),
466
+ resolution: json(recipient["resolution"]) ?? null,
467
+ ...Object.keys(fields).length === 0 ? {} : { fields }
468
+ };
469
+ };
470
+ /** Recipients with their events, newest first. */
471
+ const items = async (context, where, parameters) => {
472
+ const rows = await context.getAll(`SELECT rc.* FROM ${recipients} rc JOIN ${events} ev ON ev.id = rc.event_id WHERE ${where}`, parameters);
473
+ const ids = [...new Set(rows.map((row) => String(row["event_id"])))];
474
+ const found = ids.length === 0 ? [] : await context.getAll(`SELECT * FROM ${events} WHERE id IN (${marks(ids)})`, ids);
475
+ const eventsById = new Map(found.map((row) => [String(row["id"]), row]));
476
+ return rows.flatMap((row) => {
477
+ const event = eventsById.get(String(row["event_id"]));
478
+ return event === void 0 ? [] : [toItem(row, event)];
479
+ }).toSorted(newestFirst);
480
+ };
481
+ const filters = (args, clauses, parameters) => {
482
+ const add = (clause, ...values) => {
483
+ clauses.push(clause);
484
+ parameters.push(...values);
485
+ };
486
+ if (typeof args["tenant"] === "string") add(`rc.${tenantColumn} = ?`, args["tenant"]);
487
+ const dismissed = args["status"] === "settled" ? null : args["dismissed"] ?? false;
488
+ if (dismissed !== null) clauses.push(dismissed === true ? "rc.dismissed_at IS NOT NULL" : "rc.dismissed_at IS NULL");
489
+ switch (args["status"]) {
490
+ case "unread":
491
+ clauses.push("rc.read_at IS NULL");
492
+ break;
493
+ case "read":
494
+ clauses.push("rc.read_at IS NOT NULL");
495
+ break;
496
+ case "unresolved":
497
+ clauses.push("rc.resolved_at IS NULL");
498
+ break;
499
+ case "settled": clauses.push("(rc.resolved_at IS NOT NULL OR rc.dismissed_at IS NOT NULL)");
500
+ }
501
+ if (typeof args["read"] === "boolean") clauses.push(args["read"] ? "rc.read_at IS NOT NULL" : "rc.read_at IS NULL");
502
+ if (typeof args["resolved"] === "boolean") clauses.push(args["resolved"] ? "rc.resolved_at IS NOT NULL" : "rc.resolved_at IS NULL");
503
+ for (const [key, column] of [["types", "ev.type"], ["subject_types", "ev.subject_type"]]) {
504
+ const values = arrayOf(args[key]);
505
+ if (values !== void 0) add(values.length === 0 ? "0" : `${column} IN (${marks(values)})`, ...values);
506
+ }
507
+ if (typeof args["search"] === "string" && args["search"] !== "") add("(coalesce(ev.summary, '') || ' ' || coalesce(ev.subject_label, '') || ' ' || ev.type) LIKE ? ESCAPE '\\'", `%${args["search"].replaceAll(/[\\%_]/gu, (match) => `\\${match}`)}%`);
508
+ };
509
+ const list = async (args) => {
510
+ const clauses = [];
511
+ const parameters = [];
512
+ filters(args, clauses, parameters);
513
+ const all = await items(database, joined(clauses), parameters);
514
+ const before = typeof args["before"] === "string" ? args["before"] : null;
515
+ const beforeId = typeof args["before_id"] === "string" ? args["before_id"] : null;
516
+ return before === null ? all : all.filter((item) => {
517
+ const at = time(item["created_at"]);
518
+ const cursor = Date.parse(postgrestTimestamp(before));
519
+ return at < cursor || at === cursor && beforeId !== null && String(item["id"]) < beforeId;
520
+ });
521
+ };
522
+ const mark = async (set, stamps, where, args) => database.writeTransaction(async (tx) => {
523
+ const clauses = [where];
524
+ const parameters = [];
525
+ const ids = arrayOf(args["ids"]);
526
+ if (ids !== void 0) {
527
+ clauses.push(ids.length === 0 ? "0" : `rc.id IN (${marks(ids)})`);
528
+ parameters.push(...ids);
529
+ }
530
+ if (typeof args["tenant"] === "string") {
531
+ clauses.push(`rc.${tenantColumn} = ?`);
532
+ parameters.push(args["tenant"]);
533
+ }
534
+ const changed = (await tx.getAll(`SELECT rc.id FROM ${recipients} rc WHERE ${clauses.join(" AND ")}`, parameters)).map((row) => row.id);
535
+ if (changed.length === 0) return {
536
+ count: 0,
537
+ items: []
538
+ };
539
+ const now = (/* @__PURE__ */ new Date()).toISOString();
540
+ await tx.execute(`UPDATE ${recipients} SET ${set} WHERE id IN (${marks(changed)})`, [...Array.from({ length: stamps }, () => now), ...changed]);
541
+ const updated = await items(tx, `rc.id IN (${marks(changed)})`, changed);
542
+ return {
543
+ count: updated.length,
544
+ items: updated
545
+ };
546
+ });
547
+ const local = async (fn, args) => {
548
+ switch (fn) {
549
+ case "get_notification": {
550
+ const [item] = await items(database, "rc.id = ?", [args["id"]]);
551
+ return item ?? null;
552
+ }
553
+ case "list_notifications": return (await list(args)).slice(0, limit(args["max_items"], 0));
554
+ case "notification_page": {
555
+ const all = await list(args);
556
+ const skip = Math.max(Number(args["skip"] ?? 0), 0);
557
+ return {
558
+ items: all.slice(skip, skip + limit(args["max_items"], 1)),
559
+ total: all.length
560
+ };
561
+ }
562
+ case "notification_counts": return counts(await list({ tenant: args["tenant"] }), args);
563
+ case "mark_notifications_read": return mark("read_at = ?", 1, "rc.read_at IS NULL AND rc.dismissed_at IS NULL", args);
564
+ case "mark_notifications_unread": return mark("read_at = NULL", 0, "rc.read_at IS NOT NULL AND rc.dismissed_at IS NULL", args);
565
+ case "dismiss_notifications": return mark("dismissed_at = ?, read_at = coalesce(read_at, ?)", 2, "rc.dismissed_at IS NULL", { ids: args["ids"] });
566
+ default: throw new TypeError(`Unhandled notification function ${String(fn)}`);
567
+ }
568
+ };
569
+ return { call(schema, fn, args) {
570
+ const handled = byName.get(fn);
571
+ return handled === void 0 ? options.server.call(schema, fn, args) : local(handled, args);
572
+ } };
573
+ }
574
+ function counts(all, args) {
575
+ const actionable = new Set(Array.isArray(args["actionable"]) ? args["actionable"].map(String) : []);
576
+ const open = all.filter((item) => item["resolved_at"] === null && actionable.has(String(item["type"])));
577
+ const subjects = new Set(open.map((item) => item["subject_id"] === null ? `recipient:${String(item["id"])}` : JSON.stringify([
578
+ item["tenant"],
579
+ item["subject_type"],
580
+ item["subject_id"]
581
+ ])));
582
+ return {
583
+ unread: all.filter((item) => item["read_at"] === null).length,
584
+ actionable: open.length,
585
+ actionable_subjects: subjects.size
586
+ };
587
+ }
588
+ /**
589
+ * The upload route for `notification_recipients`: replays a local mark read,
590
+ * unread or dismiss through the server's functions, which check the caller owns
591
+ * the row. Pass a notifications client on `rpcTransport(supabase)`; one on
592
+ * `powersyncNotificationsTransport` would write the change locally again.
593
+ *
594
+ * ```ts
595
+ * createUploadConnector({
596
+ * routes: {
597
+ * notification_recipients: notificationRecipientsRoute(
598
+ * serverNotifications,
599
+ * ),
600
+ * },
601
+ * });
602
+ * ```
603
+ */
604
+ function notificationRecipientsRoute(notifications) {
605
+ return async (entry) => {
606
+ const data = entry.opData ?? {};
607
+ const ids = [entry.id];
608
+ if (entry.op !== "PATCH") return err(dbError("unsupported", `notification_recipients takes updates only, not ${entry.op}`));
609
+ if (data["dismissed_at"] !== void 0 && data["dismissed_at"] !== null) return notifications.dismiss(ids);
610
+ if (data["read_at"] === void 0) return ok(null);
611
+ return data["read_at"] === null ? notifications.markUnread({ ids }) : notifications.markRead({ ids });
612
+ };
613
+ }
614
+ /**
615
+ * A topic port for the notifications feed on PowerSync: the feed reads again
616
+ * when the synced notification tables change, from a sync or a local write,
617
+ * instead of on a Realtime broadcast.
618
+ *
619
+ * ```ts
620
+ * createNotificationsController({
621
+ * ports: { topic: powersyncTopicPort(powersync) },
622
+ * });
623
+ * ```
624
+ */
625
+ function powersyncTopicPort(database, tables = ["notification_recipients", "notification_events"]) {
626
+ return (_topic, watch) => {
627
+ const unsubscribe = database.onChange?.({ onChange: (event) => {
628
+ if (event.changedTables.some((table) => tables.includes(table))) watch.onMessage("change", { tables: event.changedTables });
629
+ } }, { tables: [...tables] });
630
+ watch.onStatus("subscribed");
631
+ let left = false;
632
+ return {
633
+ leave: () => {
634
+ if (!left) {
635
+ left = true;
636
+ unsubscribe?.();
637
+ }
638
+ },
639
+ send: () => void 0
640
+ };
641
+ };
642
+ }
643
+ function arrayOf(value) {
644
+ return Array.isArray(value) ? value.map((item) => item) : void 0;
645
+ }
646
+ function marks(values) {
647
+ return values.map(() => "?").join(", ");
648
+ }
649
+ function joined(clauses) {
650
+ return clauses.length === 0 ? "1" : clauses.join(" AND ");
651
+ }
652
+ function limit(value, least) {
653
+ const parsed = Number(value ?? 50);
654
+ return Math.min(Math.max(Number.isFinite(parsed) ? parsed : 50, least), 200);
655
+ }
656
+ function json(value) {
657
+ if (typeof value !== "string") return value ?? void 0;
658
+ try {
659
+ return JSON.parse(value);
660
+ } catch {
661
+ return value;
662
+ }
663
+ }
664
+ function timestamp(value) {
665
+ return typeof value === "string" ? postgrestTimestamp(value) : null;
666
+ }
667
+ function time(value) {
668
+ return typeof value === "string" ? Date.parse(value) : 0;
669
+ }
670
+ function newestFirst(left, right) {
671
+ const order = time(right["created_at"]) - time(left["created_at"]);
672
+ if (order !== 0) return order;
673
+ return String(right["id"]).localeCompare(String(left["id"]));
674
+ }
675
+ //#endregion
676
+ export { attachmentQueueRoute, checkSqlite, compileSqlite, createUploadConnector, fromSqliteError, likeToGlob, notificationRecipientsRoute, postgrestTimestamp, powersyncEngine, powersyncExecutor, powersyncNotificationsTransport, powersyncTopicPort, quoteSqliteIdent, sqliteCompiler, sqliteValue, syncWithAuth, uploadOutcome, uploadRoute };
@@ -1,4 +1,4 @@
1
- import { Bn as PRESETS, Ct as ResolvedPresetBlock, Et as resolvePreset, Fn as presetFromSpec, Gn as defaultPreset, Hn as PRESET_NAMES, In as presetOfSpec, Kn as isPresetName, Ln as presetSpec, Pn as PresetSpec, Rn as DEFAULT_PRESET_NAME, St as ResolvedPreset, Tt as presetBlockConflict, Un as PresetGroup, Vn as PRESET_GROUPS, Wn as PresetName, _i as PresetValueInfo, _t as expandPreset, ai as DEFAULT_CONVENTIONS, bi as presetValueLabel, bt as PresetConflict, ci as Preset, di as PresetField, ei as PresetCatalog, er as APP_COLUMN_FORMATS, fi as PresetFieldKey, gi as PresetScope, gt as conventionConfig, hi as PresetPlatforms, ht as PresetInput, ii as CONVENTION_FIELDS, li as PresetAccess, mi as PresetFramework, mt as ExpandedConfig, ni as PresetCatalogManifest, oi as PRESET_FRAMEWORKS, pi as PresetFieldValue, pt as ConfigConventions, qn as namedPreset, ri as PresetGlueItem, si as PRESET_TENANT_NAMES, sr as AppColumnFormat, ti as PresetCatalogBlock, ui as PresetConventions, vi as integrationsForFramework, vt as presetConfig, wt as listNames, xt as PresetIntegration, yi as presetField, yt as presetOf, zn as NamedPreset } from "../context-CKCgjEDF.js";
2
- import { A as presetAndDesignOf, C as designFileSource, D as encodeDesign, E as designSchema, F as safeDesignFileSource, I as safeParseDesign, L as appDefaultError, M as presetConfigSource, N as presetInstallCommand, O as isDesignCode, P as readDesignFile, R as isAppDefault, S as designConfig, T as designOf, _ as DesignParseResult, a as DesignChange, b as createUrl, c as diffAppTables, d as DESIGN_FILE, f as DESIGN_FORMAT, g as DesignParseIssue, h as DesignParseError, i as presetGlue, j as presetApplyCommand, k as parseDesign, l as diffDesigns, m as DesignFile, n as glueCommand, o as DesignChangeKind, p as DesignErrorCode, r as presetBlocksSource, s as DiffOptions, t as PROVIDER_COMMENT, u as CreateDesign, v as DesignTooLongError, w as designFormat, x as decodeDesign, y as MAX_DESIGN_CODE_LENGTH, z as PRESET_CATALOG } from "../index-BCeTYhFk.js";
3
- import { i as appReservedColumns, n as appIdentifierError, r as appNameLengthError, t as APP_NAME_MAX } from "../app-tables-dS02piE7.js";
1
+ import { Bn as PRESETS, Ct as ResolvedPresetBlock, Et as resolvePreset, Fn as presetFromSpec, Gn as defaultPreset, Hn as PRESET_NAMES, In as presetOfSpec, Kn as isPresetName, Ln as presetSpec, Pn as PresetSpec, Rn as DEFAULT_PRESET_NAME, St as ResolvedPreset, Tt as presetBlockConflict, Un as PresetGroup, Vn as PRESET_GROUPS, Wn as PresetName, _i as PresetValueInfo, _t as expandPreset, ai as DEFAULT_CONVENTIONS, bi as presetValueLabel, bt as PresetConflict, ci as Preset, di as PresetField, ei as PresetCatalog, er as APP_COLUMN_FORMATS, fi as PresetFieldKey, gi as PresetScope, gt as conventionConfig, hi as PresetPlatforms, ht as PresetInput, ii as CONVENTION_FIELDS, li as PresetAccess, mi as PresetFramework, mt as ExpandedConfig, ni as PresetCatalogManifest, oi as PRESET_FRAMEWORKS, pi as PresetFieldValue, pt as ConfigConventions, qn as namedPreset, ri as PresetGlueItem, si as PRESET_TENANT_NAMES, sr as AppColumnFormat, ti as PresetCatalogBlock, ui as PresetConventions, vi as integrationsForFramework, vt as presetConfig, wt as listNames, xt as PresetIntegration, yi as presetField, yt as presetOf, zn as NamedPreset } from "../context-D24k1Cpc.js";
2
+ import { A as presetAndDesignOf, C as designFileSource, D as encodeDesign, E as designSchema, F as safeDesignFileSource, I as safeParseDesign, L as appDefaultError, M as presetConfigSource, N as presetInstallCommand, O as isDesignCode, P as readDesignFile, R as isAppDefault, S as designConfig, T as designOf, _ as DesignParseResult, a as DesignChange, b as createUrl, c as diffAppTables, d as DESIGN_FILE, f as DESIGN_FORMAT, g as DesignParseIssue, h as DesignParseError, i as presetGlue, j as presetApplyCommand, k as parseDesign, l as diffDesigns, m as DesignFile, n as glueCommand, o as DesignChangeKind, p as DesignErrorCode, r as presetBlocksSource, s as DiffOptions, t as PROVIDER_COMMENT, u as CreateDesign, v as DesignTooLongError, w as designFormat, x as decodeDesign, y as MAX_DESIGN_CODE_LENGTH, z as PRESET_CATALOG } from "../index-BAcQz5DS.js";
3
+ import { i as appReservedColumns, n as appIdentifierError, r as appNameLengthError, t as APP_NAME_MAX } from "../app-tables-XwCviyhP.js";
4
4
  export { APP_COLUMN_FORMATS, APP_NAME_MAX, type AppColumnFormat, CONVENTION_FIELDS, type ConfigConventions, type CreateDesign, DEFAULT_CONVENTIONS, DEFAULT_PRESET_NAME, DESIGN_FILE, DESIGN_FORMAT, type DesignChange, type DesignChangeKind, type DesignErrorCode, type DesignFile, DesignParseError, type DesignParseIssue, type DesignParseResult, DesignTooLongError, type DiffOptions, type ExpandedConfig, MAX_DESIGN_CODE_LENGTH, type NamedPreset, PRESETS, PRESET_CATALOG, PRESET_FRAMEWORKS, PRESET_GROUPS, PRESET_NAMES, PRESET_TENANT_NAMES, PROVIDER_COMMENT, type Preset, type PresetAccess, type PresetCatalog, type PresetCatalogBlock, type PresetCatalogManifest, type PresetConflict, type PresetConventions, type PresetField, type PresetFieldKey, type PresetFieldValue, type PresetFramework, type PresetGlueItem, type PresetGroup, type PresetInput, type PresetIntegration, type PresetName, type PresetPlatforms, type PresetScope, type PresetSpec, type PresetValueInfo, type ResolvedPreset, type ResolvedPresetBlock, appDefaultError, appIdentifierError, appNameLengthError, appReservedColumns, conventionConfig, createUrl, decodeDesign, defaultPreset, designConfig, designFileSource, designFormat, designOf, designSchema, diffAppTables, diffDesigns, encodeDesign, expandPreset, glueCommand, integrationsForFramework, isAppDefault, isDesignCode, isPresetName, listNames, namedPreset, parseDesign, presetAndDesignOf, presetApplyCommand, presetBlockConflict, presetBlocksSource, presetConfig, presetConfigSource, presetField, presetFromSpec, presetGlue, presetInstallCommand, presetOf, presetOfSpec, presetSpec, presetValueLabel, readDesignFile, resolvePreset, safeDesignFileSource, safeParseDesign };
@@ -1,4 +1,4 @@
1
- import { C as integrationsForFramework, S as PRESET_TENANT_NAMES, T as presetValueLabel, _ as isPresetName, a as presetOf, b as DEFAULT_CONVENTIONS, c as presetSpec, d as resolvePreset, f as DEFAULT_PRESET_NAME, g as defaultPreset, h as PRESET_NAMES, i as presetConfig, l as listNames, m as PRESET_GROUPS, o as presetFromSpec, p as PRESETS, r as expandPreset, s as presetOfSpec, t as conventionConfig, u as presetBlockConflict, v as namedPreset, w as presetField, x as PRESET_FRAMEWORKS, y as CONVENTION_FIELDS } from "../config-CIBc79_8.js";
2
- import { E as PRESET_CATALOG, a as appIdentifierError, m as isAppDefault, n as APP_NAME_MAX, o as appNameLengthError, p as appDefaultError, s as appReservedColumns, x as APP_COLUMN_FORMATS } from "../app-tables-Q0TYfeih.js";
3
- import { C as readDesignFile, D as glueCommand, E as PROVIDER_COMMENT, O as presetBlocksSource, S as presetInstallCommand, T as safeParseDesign, a as DesignParseError, b as presetApplyCommand, c as createUrl, d as designFileSource, f as designFormat, g as isDesignCode, h as encodeDesign, i as DESIGN_FORMAT, k as presetGlue, l as decodeDesign, m as designSchema, n as diffDesigns, o as DesignTooLongError, p as designOf, r as DESIGN_FILE, s as MAX_DESIGN_CODE_LENGTH, t as diffAppTables, u as designConfig, v as parseDesign, w as safeDesignFileSource, x as presetConfigSource, y as presetAndDesignOf } from "../preset-BIANzB5p.js";
1
+ import { C as integrationsForFramework, S as PRESET_TENANT_NAMES, T as presetValueLabel, _ as isPresetName, a as presetOf, b as DEFAULT_CONVENTIONS, c as presetSpec, d as resolvePreset, f as DEFAULT_PRESET_NAME, g as defaultPreset, h as PRESET_NAMES, i as presetConfig, l as listNames, m as PRESET_GROUPS, o as presetFromSpec, p as PRESETS, r as expandPreset, s as presetOfSpec, t as conventionConfig, u as presetBlockConflict, v as namedPreset, w as presetField, x as PRESET_FRAMEWORKS, y as CONVENTION_FIELDS } from "../config-CD2OGfCG.js";
2
+ import { E as PRESET_CATALOG, a as appIdentifierError, m as isAppDefault, n as APP_NAME_MAX, o as appNameLengthError, p as appDefaultError, s as appReservedColumns, x as APP_COLUMN_FORMATS } from "../app-tables-DyswUg6J.js";
3
+ import { C as readDesignFile, D as glueCommand, E as PROVIDER_COMMENT, O as presetBlocksSource, S as presetInstallCommand, T as safeParseDesign, a as DesignParseError, b as presetApplyCommand, c as createUrl, d as designFileSource, f as designFormat, g as isDesignCode, h as encodeDesign, i as DESIGN_FORMAT, k as presetGlue, l as decodeDesign, m as designSchema, n as diffDesigns, o as DesignTooLongError, p as designOf, r as DESIGN_FILE, s as MAX_DESIGN_CODE_LENGTH, t as diffAppTables, u as designConfig, v as parseDesign, w as safeDesignFileSource, x as presetConfigSource, y as presetAndDesignOf } from "../preset-B3CukUhu.js";
4
4
  export { APP_COLUMN_FORMATS, APP_NAME_MAX, CONVENTION_FIELDS, DEFAULT_CONVENTIONS, DEFAULT_PRESET_NAME, DESIGN_FILE, DESIGN_FORMAT, DesignParseError, DesignTooLongError, MAX_DESIGN_CODE_LENGTH, PRESETS, PRESET_CATALOG, PRESET_FRAMEWORKS, PRESET_GROUPS, PRESET_NAMES, PRESET_TENANT_NAMES, PROVIDER_COMMENT, appDefaultError, appIdentifierError, appNameLengthError, appReservedColumns, conventionConfig, createUrl, decodeDesign, defaultPreset, designConfig, designFileSource, designFormat, designOf, designSchema, diffAppTables, diffDesigns, encodeDesign, expandPreset, glueCommand, integrationsForFramework, isAppDefault, isDesignCode, isPresetName, listNames, namedPreset, parseDesign, presetAndDesignOf, presetApplyCommand, presetBlockConflict, presetBlocksSource, presetConfig, presetConfigSource, presetField, presetFromSpec, presetGlue, presetInstallCommand, presetOf, presetOfSpec, presetSpec, presetValueLabel, readDesignFile, resolvePreset, safeDesignFileSource, safeParseDesign };
@@ -1,6 +1,7 @@
1
- import { M as groupEntries, a as presetOf, c as presetSpec, g as defaultPreset, i as presetConfig, s as presetOfSpec } from "./config-CIBc79_8.js";
2
- import { E as PRESET_CATALOG, d as appTablesOf, k as asBlocksConfig } from "./app-tables-Q0TYfeih.js";
1
+ import { M as groupEntries, a as presetOf, c as presetSpec, g as defaultPreset, i as presetConfig, s as presetOfSpec } from "./config-CD2OGfCG.js";
2
+ import { E as PRESET_CATALOG, d as appTablesOf, k as asBlocksConfig } from "./app-tables-DyswUg6J.js";
3
3
  import { r as FIELD_FORMATS } from "./field-formats-C6QKA3UR.js";
4
+ import { t as isSqlType } from "./sql-type-iUSZpaUu.js";
4
5
  //#region src/preset/render.ts
5
6
  /** The comment a config with the provider access model gets above `blocks`. */
6
7
  const PROVIDER_COMMENT = [" // The provider access model reads roles from your authorization", " // library: set `auth.authorization` to its adapter."];
@@ -214,7 +215,6 @@ const MAX_POSITIONS = 1e3;
214
215
  const MAX_COORDINATE = 1e6;
215
216
  const DESIGN_CODE = /^0[A-Za-z0-9_-]+$/;
216
217
  const COLUMN = /^[a-z_][a-z0-9_]{0,62}$/;
217
- const SQL_TYPE = /^[a-z][a-z0-9_ (),.'[\]-]*$/i;
218
218
  const QUALIFIED = /^[a-z_][a-z0-9_]{0,62}\.[a-z_][a-z0-9_]{0,62}$/;
219
219
  const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
220
220
  /** Whether `value` has the shape of a design code. It may still fail to decode. */
@@ -235,7 +235,7 @@ function extraColumnsOf(value, catalog) {
235
235
  const checked = {};
236
236
  for (const [name, type] of entries) {
237
237
  if (!COLUMN.test(name)) throw new DesignParseError("invalid_name", jsonPointer("extraColumns", module, name), `${at}: "${name}" is not a valid column name`);
238
- if (typeof type !== "string" || !SQL_TYPE.test(type) || type.includes("--")) throw new DesignParseError("invalid_type", jsonPointer("extraColumns", module, name), `${at}.${name} must be a SQL type such as "text not null default ''"`);
238
+ if (typeof type !== "string" || !isSqlType(type)) throw new DesignParseError("invalid_type", jsonPointer("extraColumns", module, name), `${at}.${name} must be a SQL type such as "text not null default ''"`);
239
239
  checked[name] = type;
240
240
  }
241
241
  return [module, checked];
@@ -1,4 +1,4 @@
1
- import { s as PushTokenPort } from "./ports-DnpAuTvB.js";
1
+ import { s as PushTokenPort } from "./ports-g0H1Kzwr.js";
2
2
  //#region src/client/native/push-token.d.ts
3
3
  /** The part of `expo-notifications` the push token port uses. */
4
4
  interface ExpoNotificationsLike {
@@ -1,4 +1,4 @@
1
1
  import { t as escapeLike } from "../escape-like-PReMbEEU.js";
2
2
  import { n as invalidateTables, t as BetterQueryMeta } from "../invalidate-DMp4eqfF.js";
3
- import { $ as invalidateOnBlockEvents, G as BLOCK_READ_PREFIXES, J as BlockInvalidation, K as BlockClientQueries, Q as blockQueries, X as BlockQueries, Y as BlockMethodQuery, Z as BlockVariablesOf, a as RecordBindingQueries, at as InfiniteOptionsOf, c as RecordWriteMutations, ct as QueryHelpers, dt as TableQueries, et as queryEngine, ft as createQueries, i as optimistic, it as InfiniteExtras, l as invalidateOnRecordEvents, lt as QueryKeyOf, mt as queryCache, n as OptimisticSnapshot, nt as clearOnUserChange, o as RecordQueries, ot as MutationOptionsOf, pt as invalidateOnMutation, q as BlockClients, r as OptimisticTarget, rt as BetterQueries, s as RecordQueriesOptions, st as QueriesOptions, t as OptimisticHandlers, tt as UserChangeSource, u as recordQueries, ut as QueryOptionsOf } from "../index-B8YjrfVl.js";
3
+ import { $ as invalidateOnBlockEvents, G as BLOCK_READ_PREFIXES, J as BlockInvalidation, K as BlockClientQueries, Q as blockQueries, X as BlockQueries, Y as BlockMethodQuery, Z as BlockVariablesOf, a as RecordBindingQueries, at as InfiniteOptionsOf, c as RecordWriteMutations, ct as QueryHelpers, dt as TableQueries, et as queryEngine, ft as createQueries, i as optimistic, it as InfiniteExtras, l as invalidateOnRecordEvents, lt as QueryKeyOf, mt as queryCache, n as OptimisticSnapshot, nt as clearOnUserChange, o as RecordQueries, ot as MutationOptionsOf, pt as invalidateOnMutation, q as BlockClients, r as OptimisticTarget, rt as BetterQueries, s as RecordQueriesOptions, st as QueriesOptions, t as OptimisticHandlers, tt as UserChangeSource, u as recordQueries, ut as QueryOptionsOf } from "../index-C0t-vNIt.js";
4
4
  export { BLOCK_READ_PREFIXES, type BetterQueries, type BetterQueryMeta, type BlockClientQueries, type BlockClients, type BlockInvalidation, type BlockMethodQuery, type BlockQueries, type BlockVariablesOf, type InfiniteExtras, type InfiniteOptionsOf, type MutationOptionsOf, type OptimisticHandlers, type OptimisticSnapshot, type OptimisticTarget, type QueriesOptions, type QueryHelpers, type QueryKeyOf, type QueryOptionsOf, type RecordBindingQueries, type RecordQueries, type RecordQueriesOptions, type RecordWriteMutations, type TableQueries, type UserChangeSource, blockQueries, clearOnUserChange, createQueries, escapeLike, invalidateOnBlockEvents, invalidateOnMutation, invalidateOnRecordEvents, invalidateTables, optimistic, queryCache, queryEngine, recordQueries };
@@ -1,13 +1,13 @@
1
1
  import { t as escapeLike } from "../escape-like-PReMbEEU.js";
2
2
  import { n as Impersonator } from "../impersonation-YTa9dZUv.js";
3
3
  import { i as DataEntry, m as RejectedChange, n as DataEngine, o as DataSyncState } from "../data-engine-BWoz9lED.js";
4
- import { t as tenantOf } from "../tenant-DVvjw9H-.js";
4
+ import { t as tenantOf } from "../tenant-DyoVYFfC.js";
5
5
  import { t as AuthSession } from "../view-DyFdMCqg.js";
6
- import { r as LiveCountSeed } from "../index-lB-8iPmY.js";
7
- import { r as MembershipClaim } from "../entitlements-B0jmjNLD.js";
8
- import { D as ProfileOf, O as UseActionOptions, S as LiveCountHookOptions, _ as ActionResultOf, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, h as BlockRefetchOn, l as BlockEventSource, m as BlockQueryState, o as DataSource, p as BlockQueryOptions, s as DataState, t as fieldErrorsOf, u as BlockMutationActions, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-DqlebtTE.js";
6
+ import { r as LiveCountSeed } from "../index-BH3NYExp.js";
7
+ import { r as MembershipClaim } from "../entitlements-DHcNt1aF.js";
8
+ import { D as ProfileOf, O as UseActionOptions, S as LiveCountHookOptions, _ as ActionResultOf, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, h as BlockRefetchOn, l as BlockEventSource, m as BlockQueryState, o as DataSource, p as BlockQueryOptions, s as DataState, t as fieldErrorsOf, u as BlockMutationActions, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-DucQdLl7.js";
9
9
  import { n as supportOf, t as SupportView } from "../support-view-BYOgwXsJ.js";
10
- import { $ as UseActionFormOptions, A as useController, B as RecordListUrl, C as useConflicts, D as defineDataHooks, E as DataView, F as RecordFormState, G as RecordInitial, H as useRecordListState, I as UseRecordFormOptions, J as RecordState, K as RecordProviderKit, L as useRecordForm, M as useBlockEvent, N as useBlockMutation, O as useBlockEnv, P as useBlockQuery, Q as ActionHandle, R as RecordListQueryStates, S as Conflicts, T as DataHooks, U as RecordActionsOf, V as RecordListUrlState, W as RecordContextValue, X as createRecordProvider, Y as RecordWriteHandlers, Z as ActionForm, _ as useRealtimeRelay, a as Upload, at as LiveCount, b as PresenceTopic, c as UseImageOptions, ct as useBroadcast, d as useSignedUrl, dt as useSupabase, et as useAction, f as useUpload, g as UseRealtimeRelayOptions, h as useDebouncedSearch, i as StorageImage, it as BetterSupabaseProviderProps, j as useLatest, k as useBlockTenant, l as UseUploadOptions, lt as useLiveCount, m as DebouncedSearchOptions, n as SignedUrl, nt as BetterHooks, o as UploadStatus, ot as createHooks, p as DebouncedSearch, q as RecordProviderProps, r as SignedUrlSource, rt as BetterSupabaseProvider, s as UploadTarget, st as useAuth, t as ImageSource, tt as useActionForm, u as useImage, ut as useLiveQuery, v as Presence, w as useSyncStatus, x as usePresence, y as PresenceHookOptions, z as RecordListState } from "../index-ClMN0f98.js";
10
+ import { $ as UseActionFormOptions, A as useController, B as RecordListUrl, C as useConflicts, D as defineDataHooks, E as DataView, F as RecordFormState, G as RecordInitial, H as useRecordListState, I as UseRecordFormOptions, J as RecordState, K as RecordProviderKit, L as useRecordForm, M as useBlockEvent, N as useBlockMutation, O as useBlockEnv, P as useBlockQuery, Q as ActionHandle, R as RecordListQueryStates, S as Conflicts, T as DataHooks, U as RecordActionsOf, V as RecordListUrlState, W as RecordContextValue, X as createRecordProvider, Y as RecordWriteHandlers, Z as ActionForm, _ as useRealtimeRelay, a as Upload, at as LiveCount, b as PresenceTopic, c as UseImageOptions, ct as useBroadcast, d as useSignedUrl, dt as useSupabase, et as useAction, f as useUpload, g as UseRealtimeRelayOptions, h as useDebouncedSearch, i as StorageImage, it as BetterSupabaseProviderProps, j as useLatest, k as useBlockTenant, l as UseUploadOptions, lt as useLiveCount, m as DebouncedSearchOptions, n as SignedUrl, nt as BetterHooks, o as UploadStatus, ot as createHooks, p as DebouncedSearch, q as RecordProviderProps, r as SignedUrlSource, rt as BetterSupabaseProvider, s as UploadTarget, st as useAuth, t as ImageSource, tt as useActionForm, u as useImage, ut as useLiveQuery, v as Presence, w as useSyncStatus, x as usePresence, y as PresenceHookOptions, z as RecordListState } from "../index-XAyzdLns.js";
11
11
  import { SessionProvider, SessionProviderProps, useSession, useSupportSession } from "./session.js";
12
12
  import { a as useSignIn, i as SignOut, n as PendingState, o as useSignOut, r as SignIn, t as AuthHookOptions } from "../sign-in-D54FLMQy.js";
13
13
  export { type ActionForm, type ActionHandle, type ActionInputOf, type ActionResultOf, type AuthHookOptions, type AuthSession, type BetterHooks, BetterSupabaseProvider, type BetterSupabaseProviderProps, type BlockEventSource, type BlockMutationActions, type BlockMutationState, type BlockQueryActions, type BlockQueryOptions, type BlockQueryState, type BlockRefetchOn, type BroadcastOptions, type ClaimsOf, type ClientLike, type Conflicts, type DataEngine, type DataEntry, type DataHooks, type DataSource, type DataState, type DataSyncState, type DataView, type DataWrites, type DebouncedSearch, type DebouncedSearchOptions, type ImageSource, type Impersonator, type LiveCount, type LiveCountHookOptions, type LiveCountSeed, type LiveQueryHookOptions, type MembershipClaim, type PendingState, type Presence, type PresenceHookOptions, type PresenceTopic, type ProfileOf, type RecordActionsOf, type RecordContextValue, type RecordFormState, type RecordInitial, type RecordListQueryStates, type RecordListState, type RecordListUrl, type RecordListUrlState, type RecordProviderKit, type RecordProviderProps, type RecordState, type RecordWriteHandlers, type RejectedChange, SessionProvider, type SessionProviderProps, type SignIn, type SignOut, type SignedUrl, type SignedUrlSource, type StorageImage, type SupportView, type Upload, type UploadStatus, type UploadTarget, type UseActionFormOptions, type UseActionOptions, type UseImageOptions, type UseRealtimeRelayOptions, type UseRecordFormOptions, type UseUploadOptions, createHooks, createRecordProvider, defineDataHooks, escapeLike, fieldErrorsOf, supportOf, tenantOf, useAction, useActionForm, useAuth, useBlockEnv, useBlockEvent, useBlockMutation, useBlockQuery, useBlockTenant, useBroadcast, useConflicts, useController, useDebouncedSearch, useImage, useLatest, useLiveCount, useLiveQuery, usePresence, useRealtimeRelay, useRecordForm, useRecordListState, useSession, useSignIn, useSignOut, useSignedUrl, useSupabase, useSupportSession, useSyncStatus, useUpload };
@@ -1,4 +1,4 @@
1
- import { t as AuthSnapshot } from "../../bind-C801IaK-.js";
1
+ import { t as AuthSnapshot } from "../../bind-pu5TLrla.js";
2
2
  import { a as OAuthSignInOptions, i as OAuthClient, n as AuthLinkClient, o as WebBrowserLike, r as AuthLinkResult, t as AuthFailure } from "../../auth-link-B4NL84XU.js";
3
3
  import { n as PendingState } from "../../sign-in-D54FLMQy.js";
4
4
  import { Provider } from "@supabase/supabase-js";
@@ -1,13 +1,13 @@
1
1
  import { t as escapeLike } from "../escape-like-PReMbEEU.js";
2
2
  import { pt as QuerySpec } from "../define-Cgru0_kF.js";
3
3
  import { n as Impersonator } from "../impersonation-YTa9dZUv.js";
4
- import { t as tenantOf } from "../tenant-DVvjw9H-.js";
4
+ import { t as tenantOf } from "../tenant-DyoVYFfC.js";
5
5
  import { t as AuthSession } from "../view-DyFdMCqg.js";
6
- import { r as LiveCountSeed } from "../index-lB-8iPmY.js";
7
- import { r as MembershipClaim } from "../entitlements-B0jmjNLD.js";
8
- import { D as ProfileOf, O as UseActionOptions, S as LiveCountHookOptions, _ as ActionResultOf, b as ClaimsOf, g as ActionInputOf, t as fieldErrorsOf, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-DqlebtTE.js";
6
+ import { r as LiveCountSeed } from "../index-BH3NYExp.js";
7
+ import { r as MembershipClaim } from "../entitlements-DHcNt1aF.js";
8
+ import { D as ProfileOf, O as UseActionOptions, S as LiveCountHookOptions, _ as ActionResultOf, b as ClaimsOf, g as ActionInputOf, t as fieldErrorsOf, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-DucQdLl7.js";
9
9
  import { n as supportOf, t as SupportView } from "../support-view-BYOgwXsJ.js";
10
- import { $ as UseActionFormOptions, A as useController$1, B as RecordListUrl, C as useConflicts$1, D as defineDataHooks$1, F as RecordFormState, G as RecordInitial, H as useRecordListState$1, I as UseRecordFormOptions, J as RecordState, K as RecordProviderKit, L as useRecordForm$1, M as useBlockEvent$1, N as useBlockMutation$1, O as useBlockEnv$1, P as useBlockQuery$1, Q as ActionHandle, R as RecordListQueryStates, U as RecordActionsOf, V as RecordListUrlState, W as RecordContextValue, X as createRecordProvider$1, Y as RecordWriteHandlers, Z as ActionForm, _ as useRealtimeRelay$1, a as Upload, at as LiveCount, b as PresenceTopic, c as UseImageOptions, ct as useBroadcast, d as useSignedUrl$1, dt as useSupabase, f as useUpload$1, g as UseRealtimeRelayOptions, h as useDebouncedSearch$1, i as StorageImage, it as BetterSupabaseProviderProps, j as useLatest$1, k as useBlockTenant$1, l as UseUploadOptions, m as DebouncedSearchOptions, n as SignedUrl, nt as BetterHooks, o as UploadStatus, p as DebouncedSearch, q as RecordProviderProps, r as SignedUrlSource, rt as BetterSupabaseProvider, s as UploadTarget, st as useAuth, t as ImageSource, u as useImage$1, ut as useLiveQuery, v as Presence, w as useSyncStatus$1, x as usePresence$1, y as PresenceHookOptions, z as RecordListState } from "../index-ClMN0f98.js";
10
+ import { $ as UseActionFormOptions, A as useController$1, B as RecordListUrl, C as useConflicts$1, D as defineDataHooks$1, F as RecordFormState, G as RecordInitial, H as useRecordListState$1, I as UseRecordFormOptions, J as RecordState, K as RecordProviderKit, L as useRecordForm$1, M as useBlockEvent$1, N as useBlockMutation$1, O as useBlockEnv$1, P as useBlockQuery$1, Q as ActionHandle, R as RecordListQueryStates, U as RecordActionsOf, V as RecordListUrlState, W as RecordContextValue, X as createRecordProvider$1, Y as RecordWriteHandlers, Z as ActionForm, _ as useRealtimeRelay$1, a as Upload, at as LiveCount, b as PresenceTopic, c as UseImageOptions, ct as useBroadcast, d as useSignedUrl$1, dt as useSupabase, f as useUpload$1, g as UseRealtimeRelayOptions, h as useDebouncedSearch$1, i as StorageImage, it as BetterSupabaseProviderProps, j as useLatest$1, k as useBlockTenant$1, l as UseUploadOptions, m as DebouncedSearchOptions, n as SignedUrl, nt as BetterHooks, o as UploadStatus, p as DebouncedSearch, q as RecordProviderProps, r as SignedUrlSource, rt as BetterSupabaseProvider, s as UploadTarget, st as useAuth, t as ImageSource, u as useImage$1, ut as useLiveQuery, v as Presence, w as useSyncStatus$1, x as usePresence$1, y as PresenceHookOptions, z as RecordListState } from "../index-XAyzdLns.js";
11
11
  import { SessionProvider, SessionProviderProps } from "./session.js";
12
12
  import { a as useSignIn$1, i as SignOut, n as PendingState, o as useSignOut$1, r as SignIn, t as AuthHookOptions } from "../sign-in-D54FLMQy.js";
13
13
  //#region src/react/server.d.ts
@@ -2,9 +2,9 @@ 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
3
  import { t as BetterSupabase } from "../define-Cgru0_kF.js";
4
4
  import { n as BetterServer } from "../server-types-gR4Q1aM0.js";
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-DOwKpSkA.js";
6
- import { t as RefusalRedirects } from "../refusal-CSntB_x8.js";
7
- import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-CF6zFU7a.js";
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
+ import { t as RefusalRedirects } from "../refusal-OrlI3g4H.js";
7
+ import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-x9Y4uB1q.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,10 +1,10 @@
1
1
  import { o as problemResponse } from "../problem-Bf0cJ7tk.js";
2
- import { c as extendServer, o as withFlush, s as createServer } from "../adapter-Dyks1lX1.js";
3
- import { o as settle, t as defaultExpose } from "../respond-C3CcOZlA.js";
4
- import { i as requireCaller, o as runAction } from "../kit-5l-o8RxL.js";
2
+ import { c as extendServer, o as withFlush, s as createServer } from "../adapter-CfuBICuG.js";
3
+ import { n as defaultExpose, s as settle } from "../respond-3RKp6VgU.js";
4
+ import { i as requireCaller, o as runAction } from "../kit-DhlB-vv_.js";
5
5
  import { n as bufferInPlace, t as around } from "../shared-Bf-I13Ht.js";
6
- import { i as localsOf, n as actionInput, r as frameworkEntry } from "../framework-BozTXRzt.js";
7
- import { r as refusalResponse } from "../refusal-ByBZcm0V.js";
6
+ import { i as localsOf, n as actionInput, r as frameworkEntry } from "../framework-CNhTg0th.js";
7
+ import { r as refusalResponse } from "../refusal-D48CMqpQ.js";
8
8
  //#region src/bridges/react-router.ts
9
9
  /**
10
10
  * Runs an entry array as React Router server middleware. The contributions are
@@ -1,8 +1,8 @@
1
1
  import { D as AccessTopicPolicy, E as AccessPolicySql } from "../types-DFdg_4yN.js";
2
2
  import { et as TemplateParams, tt as TemplateValues } from "../bucket-vc-QRrva.js";
3
3
  import { t as RealtimeStatus } from "../realtime-status-BhNkb-Ow.js";
4
- import { A as TriggerTopic, C as TopicSubscription, D as TriggerLookup, E as TopicTriggerValue, F as FanOutResult, I as TopicFanOutOptions, M as defineTopic, N as rowChange, O as TriggerOptions, P as rowKeys, S as TopicSubscribeOptions, T as TopicTriggerOptions, _ as TopicMessage, a as PresenceOutput, b as TopicPermission, c as RealtimeClient, d as SubscribeOptions, f as Subscription, g as TopicHandlers, h as TopicEvent, i as PresenceOptions, j as TriggerValue, k as TriggerPayloadMode, l as RowChange, m as Topic, n as PresenceInput, o as PresenceSchema, p as SubscriptionStatus, r as PresenceMember, s as PresenceSubscription, t as EventSchemas, u as RowKeys, v as TopicOptions, w as TopicTriggerLookup, x as TopicSqlOptions, y as TopicPayload } from "../topic-BtLz-qTI.js";
5
- import { a as watchTopic, i as topicPort, n as TopicPort, r as TopicWatch, t as TopicHandle } from "../watch-topic-tnfOTa3-.js";
6
- import { S as relayTopicPort, _ as subjectPresenceValues, a as LiveSource, b as RelayEventSourceConstructor, c as liveCount, d as realtimeChanges, f as SUBJECT_PRESENCE_TEMPLATE, g as subjectPresenceTopic, h as subjectPresence, i as LiveQueryOptions, l as liveQuery, m as SubjectPresenceValues, n as LiveCountOptions, o as LiveSubscription, p as SubjectPresenceTopic, r as LiveCountSeed, s as RealtimeChangesOptions, t as CountRunner, u as liveTopic, v as RelayClientOptions, x as relayRealtimeClient, y as RelayEventSource } from "../index-lB-8iPmY.js";
4
+ import { A as TriggerTopic, C as TopicSubscription, D as TriggerLookup, E as TopicTriggerValue, F as FanOutResult, I as TopicFanOutOptions, M as defineTopic, N as rowChange, O as TriggerOptions, P as rowKeys, S as TopicSubscribeOptions, T as TopicTriggerOptions, _ as TopicMessage, a as PresenceOutput, b as TopicPermission, c as RealtimeClient, d as SubscribeOptions, f as Subscription, g as TopicHandlers, h as TopicEvent, i as PresenceOptions, j as TriggerValue, k as TriggerPayloadMode, l as RowChange, m as Topic, n as PresenceInput, o as PresenceSchema, p as SubscriptionStatus, r as PresenceMember, s as PresenceSubscription, t as EventSchemas, u as RowKeys, v as TopicOptions, w as TopicTriggerLookup, x as TopicSqlOptions, y as TopicPayload } from "../topic-nQYxoTaU.js";
5
+ import { a as watchTopic, i as topicPort, n as TopicPort, r as TopicWatch, t as TopicHandle } from "../watch-topic-UGSEWAqR.js";
6
+ import { S as relayTopicPort, _ as subjectPresenceValues, a as LiveSource, b as RelayEventSourceConstructor, c as liveCount, d as realtimeChanges, f as SUBJECT_PRESENCE_TEMPLATE, g as subjectPresenceTopic, h as subjectPresence, i as LiveQueryOptions, l as liveQuery, m as SubjectPresenceValues, n as LiveCountOptions, o as LiveSubscription, p as SubjectPresenceTopic, r as LiveCountSeed, s as RealtimeChangesOptions, t as CountRunner, u as liveTopic, v as RelayClientOptions, x as relayRealtimeClient, y as RelayEventSource } from "../index-BH3NYExp.js";
7
7
  import { n as subjectReaders, t as SubjectReadersOptions } from "../subject-readers-8GySC9Z8.js";
8
8
  export { type AccessPolicySql, type AccessTopicPolicy, type CountRunner, type EventSchemas, type FanOutResult, type LiveCountOptions, type LiveCountSeed, type LiveQueryOptions, type LiveSource, type LiveSubscription, type PresenceInput, type PresenceMember, type PresenceOptions, type PresenceOutput, type PresenceSchema, type PresenceSubscription, type RealtimeChangesOptions, type RealtimeClient, type RealtimeStatus, type RelayClientOptions, type RelayEventSource, type RelayEventSourceConstructor, type RowChange, type RowKeys, SUBJECT_PRESENCE_TEMPLATE, type SubjectPresenceTopic, type SubjectPresenceValues, type SubjectReadersOptions, type SubscribeOptions, type Subscription, type SubscriptionStatus, type TemplateParams, type TemplateValues, type Topic, type TopicEvent, type TopicFanOutOptions, type TopicHandle, type TopicHandlers, type TopicMessage, type TopicOptions, type TopicPayload, type TopicPermission, type TopicPort, type TopicSqlOptions, type TopicSubscribeOptions, type TopicSubscription, type TopicTriggerLookup, type TopicTriggerOptions, type TopicTriggerValue, type TopicWatch, type TriggerLookup, type TriggerOptions, type TriggerPayloadMode, type TriggerTopic, type TriggerValue, defineTopic, liveCount, liveQuery, liveTopic, realtimeChanges, relayRealtimeClient, relayTopicPort, rowChange, rowKeys, subjectPresence, subjectPresenceTopic, subjectPresenceValues, subjectReaders, topicPort, watchTopic };
@@ -2,7 +2,7 @@ import { i as realtimeChanges, n as liveQuery, r as liveTopic, t as liveCount }
2
2
  import { n as watchTopic, t as topicPort } from "../watch-topic-CuaWfCuv.js";
3
3
  import { n as relayTopicPort, t as relayRealtimeClient } from "../relay-gKvKJ3xf.js";
4
4
  import { t as subjectReaders } from "../subject-readers-B-pQ9Mmo.js";
5
- import { n as rowChange, r as rowKeys, t as defineTopic } from "../topic-ikV_pLTX.js";
5
+ import { n as rowChange, r as rowKeys, t as defineTopic } from "../topic-J9I3yu6f.js";
6
6
  //#region src/realtime/subject-presence.ts
7
7
  /** The presence topic template; the subjects module's policies authorize it. */
8
8
  const SUBJECT_PRESENCE_TEMPLATE = "presence:{subjectType}:{subjectId}";
@@ -1,4 +1,4 @@
1
- import { Sn as EntitySchema } from "./define-block-Xxw8Hroe.js";
1
+ import { Sn as EntitySchema } from "./define-block-CJWiDWa5.js";
2
2
  import { s as FormFieldType } from "./form-definition-BjEtH8BT.js";
3
3
  //#region src/records/record-form.d.ts
4
4
  /** The input a field renders: a forms block field type, or a date and time. */
@@ -1,13 +1,13 @@
1
1
  import { b as DbError, t as AsyncResult } from "../result-DZeA5KS6.js";
2
2
  import { $ as RecordRef } from "../types-DFdg_4yN.js";
3
- import { _n as recordBindingWrite, an as RecordBindingDefinition, cn as RecordBindingResult, dn as RecordBindingWriteName, fn as RecordBindingWriteOutput, gn as defineRecordBinding, hn as TimelineItem, in as RecordBindingData, ln as RecordBindingWrite, mn as RecordRowInput, nn as AnyRecordBindingWrite, on as RecordBindingOptions, pn as RecordBindingWrites, rn as RecordBinding, sn as RecordBindingPermissions, tn as AnyRecordBinding, un as RecordBindingWriteInput, vn as recordEventMatches, yn as recordRowInput } from "../define-block-Xxw8Hroe.js";
4
- import { A as BindingBlocks, B as PermissionFlags, C as defineRecordType, D as recordPermissionKeys, E as recordCan, F as LoadBindingsOptions, H as can, I as LoadedBindings, L as bindingCan, M as BindingName, N as BindingOf, O as recordSubject, P as BindingSource, R as countBinding, S as RecordWriteInput, T as plainData, U as permissionFlags, V as PermissionSet, _ as RecordTypeBlocks, b as RecordTypeWriteInput, d as BindingWritesOf, f as Plain, g as RecordType, h as RecordCan, j as BindingCheck, k as recordWriteInput, m as PlainBindings, p as PlainBinding, v as RecordTypePermissions, w as findBindingWrite, x as RecordTypeWriteOutput, y as RecordTypeSpec, z as loadBindings } from "../index-B8YjrfVl.js";
5
- import { p as SubscriptionStatus } from "../topic-BtLz-qTI.js";
6
- import { n as TopicPort } from "../watch-topic-tnfOTa3-.js";
7
- import { n as Controller, t as AuthPort } from "../controller-CJUXhshv.js";
3
+ import { _n as recordBindingWrite, an as RecordBindingDefinition, cn as RecordBindingResult, dn as RecordBindingWriteName, fn as RecordBindingWriteOutput, gn as defineRecordBinding, hn as TimelineItem, in as RecordBindingData, ln as RecordBindingWrite, mn as RecordRowInput, nn as AnyRecordBindingWrite, on as RecordBindingOptions, pn as RecordBindingWrites, rn as RecordBinding, sn as RecordBindingPermissions, tn as AnyRecordBinding, un as RecordBindingWriteInput, vn as recordEventMatches, yn as recordRowInput } from "../define-block-CJWiDWa5.js";
4
+ import { A as BindingBlocks, B as PermissionFlags, C as defineRecordType, D as recordPermissionKeys, E as recordCan, F as LoadBindingsOptions, H as can, I as LoadedBindings, L as bindingCan, M as BindingName, N as BindingOf, O as recordSubject, P as BindingSource, R as countBinding, S as RecordWriteInput, T as plainData, U as permissionFlags, V as PermissionSet, _ as RecordTypeBlocks, b as RecordTypeWriteInput, d as BindingWritesOf, f as Plain, g as RecordType, h as RecordCan, j as BindingCheck, k as recordWriteInput, m as PlainBindings, p as PlainBinding, v as RecordTypePermissions, w as findBindingWrite, x as RecordTypeWriteOutput, y as RecordTypeSpec, z as loadBindings } from "../index-C0t-vNIt.js";
5
+ import { p as SubscriptionStatus } from "../topic-nQYxoTaU.js";
6
+ import { n as TopicPort } from "../watch-topic-UGSEWAqR.js";
7
+ import { n as Controller, t as AuthPort } from "../controller-BR7CZ1R9.js";
8
8
  import { a as RecordSummaryOptions, c as Subjects, f as MyWorkKind, i as RecordSummary, n as MyWorkItem, r as MyWorkOptions } from "../subjects-BpIEN1MS.js";
9
- import { a as timelineBindings, c as RecordListCells, d as RecordListQuery, f as RecordListRow, h as defineRecordList, i as loadTimeline, l as RecordListColumn, m as RecordListSpec, n as Timeline, o as RecordList, p as RecordListSource, r as TimelineEntry, s as RecordListCell, t as LoadTimelineOptions, u as RecordListPage } from "../timeline-BBfKuMVL.js";
10
- import { a as RecordFormOptions, c as recordForm, i as RecordFormInput, n as RecordFormCustomField, o as RecordFormResult, r as RecordFormField, s as RecordFormValues, t as RecordForm } from "../record-form-xWvVcb86.js";
9
+ import { a as timelineBindings, c as RecordListCells, d as RecordListQuery, f as RecordListRow, h as defineRecordList, i as loadTimeline, l as RecordListColumn, m as RecordListSpec, n as Timeline, o as RecordList, p as RecordListSource, r as TimelineEntry, s as RecordListCell, t as LoadTimelineOptions, u as RecordListPage } from "../timeline-CMmo0R7g.js";
10
+ import { a as RecordFormOptions, c as recordForm, i as RecordFormInput, n as RecordFormCustomField, o as RecordFormResult, r as RecordFormField, s as RecordFormValues, t as RecordForm } from "../record-form-zMwz0Ayt.js";
11
11
  //#region src/records/controller.d.ts
12
12
  interface RecordControllerOptions<B extends BindingBlocks, N extends BindingName<B>> extends LoadBindingsOptions<B, N> {
13
13
  readonly source: BindingSource<B>;
@@ -1,7 +1,7 @@
1
1
  import { r as dbErrorOf } from "./errors-BVFgt8BZ.js";
2
2
  import { o as problemResponse } from "./problem-Bf0cJ7tk.js";
3
- import { t as defaultExpose } from "./respond-C3CcOZlA.js";
4
- import { i as requireCaller } from "./kit-5l-o8RxL.js";
3
+ import { n as defaultExpose } from "./respond-3RKp6VgU.js";
4
+ import { i as requireCaller } from "./kit-DhlB-vv_.js";
5
5
  //#region src/server/refusal.ts
6
6
  function isAalRefusal(error) {
7
7
  return error.kind === "forbidden" && "required" in error && error.required === "aal2";
@@ -1,6 +1,6 @@
1
1
  import { r as AuthState } from "./resolve-CXX6DHv3.js";
2
2
  import { t as AnyAuthorizer } from "./authorizer-B6X09otb.js";
3
- import { c as ResourceLoaderContext, s as BlockRequireOptions } from "./kit-DOwKpSkA.js";
3
+ import { c as ResourceLoaderContext, s as BlockRequireOptions } from "./kit-CVgQCIBO.js";
4
4
  //#region src/server/refusal.d.ts
5
5
  /** Where refused callers go instead of a Problem Details response. */
6
6
  interface RefusalRedirects {
@@ -4,7 +4,7 @@ import { a as ok, r as err, s as toDbError } from "./result-ntFBW2p2.js";
4
4
  import { n as validate } from "./standard-BA3mLh6w.js";
5
5
  import { a as methodNotAllowed } from "./problem-Bf0cJ7tk.js";
6
6
  import { n as checkEach, r as checkPermission } from "./authorizer-BGhXaDmo.js";
7
- import { a as respond, i as isResult } from "./respond-C3CcOZlA.js";
7
+ import { a as isResult, o as respond } from "./respond-3RKp6VgU.js";
8
8
  import { n as matchAction, r as planResource, t as TABLE_VERBS } from "./resource-DvgXqZB_.js";
9
9
  //#region src/server/resource-execute.ts
10
10
  async function settled(value) {
@@ -1,5 +1,5 @@
1
1
  import { n as ResourceActionSpec } from "./resource-D8pzB5Qf.js";
2
- import { i as ResourceContext, n as Parsed, r as ResourceAction, t as ActionArgs } from "./resource-types-BIoz_ElD.js";
2
+ import { i as ResourceContext, n as Parsed, r as ResourceAction, t as ActionArgs } from "./resource-types-8Q5Klkpa.js";
3
3
  import { StandardSchemaV1 } from "@standard-schema/spec";
4
4
  //#region src/server/resource-execute.d.ts
5
5
  /**