better-supabase 0.15.0 → 0.16.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 (328) hide show
  1. package/dist/{adapter-B0b6MXYS.js → adapter-Dyks1lX1.js} +1 -1
  2. package/dist/{agents-5n8DWRfP.d.ts → agents-CMIB3802.d.ts} +1 -1
  3. package/dist/{ai-cache-DyHohbFP.d.ts → ai-cache-2LGgaT7F.d.ts} +1 -1
  4. package/dist/{ai-chat-D1GuRnke.d.ts → ai-chat-BCaKsvLW.d.ts} +1 -1
  5. package/dist/{ai-schedules-CAquecT_.d.ts → ai-schedules-BmkARmQ9.d.ts} +2 -2
  6. package/dist/ai-sdk/agents/index.d.ts +4 -4
  7. package/dist/ai-sdk/batches/index.d.ts +1 -1
  8. package/dist/ai-sdk/cache/index.d.ts +1 -1
  9. package/dist/ai-sdk/chat/index.d.ts +1 -1
  10. package/dist/ai-sdk/embeddings/index.d.ts +2 -2
  11. package/dist/ai-sdk/index.d.ts +4 -4
  12. package/dist/ai-sdk/memory/index.d.ts +3 -3
  13. package/dist/ai-sdk/workflow/index.d.ts +3 -3
  14. package/dist/{api-DxAPqMrE.d.ts → api-hHwieEfz.d.ts} +1 -1
  15. package/dist/{app-tables-CF2DD-Mu.d.ts → app-tables-yMQ4ubyY.d.ts} +1 -1
  16. package/dist/{approvals-Crutd4-o.d.ts → approvals-Dh9dUXrN.d.ts} +1 -1
  17. package/dist/{assistant-CD_h8Vxx.d.ts → assistant-ndGdOBax.d.ts} +2 -2
  18. package/dist/astro/index.d.ts +4 -4
  19. package/dist/astro/index.js +2 -2
  20. package/dist/{auth-module-BEFESDC4.js → auth-module-BbmX-N4L.js} +12 -4
  21. package/dist/{authorization-hooks-Cs1vP_ej.d.ts → authorization-hooks-D_pwXlBs.d.ts} +4 -0
  22. package/dist/better-result/index.d.ts +2 -2
  23. package/dist/{bind-CrMBwrPN.d.ts → bind-JGCPGUJh.d.ts} +4 -4
  24. package/dist/{block-env-B_uEM2xz.d.ts → block-env-y65GF_px.d.ts} +4 -4
  25. package/dist/blocks/access-requests/index.d.ts +1 -1
  26. package/dist/blocks/activities/index.d.ts +2 -2
  27. package/dist/blocks/agents/index.d.ts +2 -2
  28. package/dist/blocks/ai-cache/index.d.ts +2 -2
  29. package/dist/blocks/ai-chat/index.d.ts +5 -5
  30. package/dist/blocks/ai-files/index.d.ts +1 -1
  31. package/dist/blocks/ai-keys/index.d.ts +1 -1
  32. package/dist/blocks/ai-schedules/index.d.ts +2 -2
  33. package/dist/blocks/announcements/index.d.ts +4 -4
  34. package/dist/blocks/api-keys/index.d.ts +2 -2
  35. package/dist/blocks/approvals/index.d.ts +2 -2
  36. package/dist/blocks/assets/index.d.ts +1 -1
  37. package/dist/blocks/assignment/index.d.ts +1 -1
  38. package/dist/blocks/attachments/index.d.ts +2 -2
  39. package/dist/blocks/audit/index.d.ts +5 -5
  40. package/dist/blocks/automations/index.d.ts +4 -4
  41. package/dist/blocks/billable-time/index.d.ts +1 -1
  42. package/dist/blocks/billing/index.d.ts +3 -3
  43. package/dist/blocks/bookings/index.d.ts +3 -3
  44. package/dist/blocks/bulk/index.d.ts +1 -1
  45. package/dist/blocks/calendar/index.d.ts +2 -2
  46. package/dist/blocks/catalog/index.d.ts +1 -1
  47. package/dist/blocks/channels/index.d.ts +1 -1
  48. package/dist/blocks/collections/index.d.ts +1 -1
  49. package/dist/blocks/comments/index.d.ts +4 -4
  50. package/dist/blocks/compliance/index.d.ts +1 -1
  51. package/dist/blocks/connectors/index.d.ts +1 -1
  52. package/dist/blocks/contacts/index.d.ts +1 -1
  53. package/dist/blocks/content/index.d.ts +1 -1
  54. package/dist/blocks/contracts/index.d.ts +1 -1
  55. package/dist/blocks/courses/index.d.ts +1 -1
  56. package/dist/blocks/created-by/index.d.ts +1 -1
  57. package/dist/blocks/custom-fields/index.d.ts +1 -1
  58. package/dist/blocks/data-lifecycle/index.d.ts +2 -2
  59. package/dist/blocks/deals/index.d.ts +1 -1
  60. package/dist/blocks/dispatch/index.d.ts +1 -1
  61. package/dist/blocks/documents/index.d.ts +1 -1
  62. package/dist/blocks/domains/index.d.ts +1 -1
  63. package/dist/blocks/donations/index.d.ts +1 -1
  64. package/dist/blocks/drive/index.d.ts +2 -2
  65. package/dist/blocks/employees/index.d.ts +2 -2
  66. package/dist/blocks/enrichment/index.d.ts +1 -1
  67. package/dist/blocks/enrollments/index.d.ts +1 -1
  68. package/dist/blocks/entitlements/index.d.ts +3 -3
  69. package/dist/blocks/expenses/index.d.ts +1 -1
  70. package/dist/blocks/field-history/index.d.ts +1 -1
  71. package/dist/blocks/flags/index.d.ts +1 -1
  72. package/dist/blocks/forecasts/index.d.ts +1 -1
  73. package/dist/blocks/forms/index.d.ts +2 -2
  74. package/dist/blocks/goals/index.d.ts +1 -1
  75. package/dist/blocks/guests/index.d.ts +1 -1
  76. package/dist/blocks/hiring/index.d.ts +1 -1
  77. package/dist/blocks/identities/index.d.ts +2 -2
  78. package/dist/blocks/imports/index.d.ts +1 -1
  79. package/dist/blocks/inbox/index.d.ts +5 -5
  80. package/dist/blocks/incidents/index.d.ts +1 -1
  81. package/dist/blocks/index.d.ts +2 -2
  82. package/dist/blocks/inventory/index.d.ts +2 -2
  83. package/dist/blocks/invoices/index.d.ts +1 -1
  84. package/dist/blocks/knowledge/index.d.ts +2 -2
  85. package/dist/blocks/lead-scoring/index.d.ts +1 -1
  86. package/dist/blocks/leases/index.d.ts +1 -1
  87. package/dist/blocks/leave/index.d.ts +1 -1
  88. package/dist/blocks/ledger/index.d.ts +1 -1
  89. package/dist/blocks/mail-sync/index.d.ts +1 -1
  90. package/dist/blocks/memberships/index.d.ts +1 -1
  91. package/dist/blocks/memory/index.d.ts +3 -3
  92. package/dist/blocks/messaging/index.d.ts +4 -4
  93. package/dist/blocks/metrics/index.d.ts +2 -2
  94. package/dist/blocks/mfa/index.d.ts +2 -2
  95. package/dist/blocks/moderation/index.d.ts +1 -1
  96. package/dist/blocks/notifications/index.d.ts +5 -5
  97. package/dist/blocks/numbering/index.d.ts +1 -1
  98. package/dist/blocks/oauth-server/index.d.ts +1 -1
  99. package/dist/blocks/onboarding/index.d.ts +2 -2
  100. package/dist/blocks/orders/index.d.ts +3 -3
  101. package/dist/blocks/organizations/index.d.ts +2 -2
  102. package/dist/blocks/outbox/index.d.ts +2 -2
  103. package/dist/blocks/passes/index.d.ts +2 -2
  104. package/dist/blocks/permissions/index.d.ts +3 -3
  105. package/dist/blocks/pipelines/index.d.ts +1 -1
  106. package/dist/blocks/posts/index.d.ts +1 -1
  107. package/dist/blocks/profiles/index.d.ts +1 -1
  108. package/dist/blocks/promotions/index.d.ts +1 -1
  109. package/dist/blocks/push/index.d.ts +2 -2
  110. package/dist/blocks/queue/index.d.ts +30 -3
  111. package/dist/blocks/queue/index.js +2 -2
  112. package/dist/blocks/quotes/index.d.ts +1 -1
  113. package/dist/blocks/rank/index.d.ts +2 -2
  114. package/dist/blocks/reactions/index.d.ts +4 -4
  115. package/dist/blocks/relations/index.d.ts +1 -1
  116. package/dist/blocks/reminders/index.d.ts +3 -3
  117. package/dist/blocks/reviews/index.d.ts +1 -1
  118. package/dist/blocks/saved-views/index.d.ts +3 -3
  119. package/dist/blocks/scores/index.d.ts +1 -1
  120. package/dist/blocks/search/index.d.ts +3 -3
  121. package/dist/blocks/security-events/index.d.ts +1 -1
  122. package/dist/blocks/segments/index.d.ts +1 -1
  123. package/dist/blocks/sequences/index.d.ts +1 -1
  124. package/dist/blocks/service-accounts/index.d.ts +1 -1
  125. package/dist/blocks/sessions/index.d.ts +2 -2
  126. package/dist/blocks/settings/index.d.ts +2 -2
  127. package/dist/blocks/share-links/index.d.ts +1 -1
  128. package/dist/blocks/shipments/index.d.ts +1 -1
  129. package/dist/blocks/signatures/index.d.ts +1 -1
  130. package/dist/blocks/signing-keys/index.d.ts +1 -1
  131. package/dist/blocks/sla/index.d.ts +1 -1
  132. package/dist/blocks/sso/index.d.ts +1 -1
  133. package/dist/blocks/state-machine/index.d.ts +1 -1
  134. package/dist/blocks/subjects/index.d.ts +2 -2
  135. package/dist/blocks/tags/index.d.ts +2 -2
  136. package/dist/blocks/tasks/index.d.ts +2 -2
  137. package/dist/blocks/teams/index.d.ts +1 -1
  138. package/dist/blocks/templates/index.d.ts +3 -3
  139. package/dist/blocks/time-tracking/index.d.ts +1 -1
  140. package/dist/blocks/timeline/index.d.ts +3 -3
  141. package/dist/blocks/trash/index.d.ts +1 -1
  142. package/dist/blocks/undo/index.d.ts +2 -2
  143. package/dist/blocks/updated-at/index.d.ts +1 -1
  144. package/dist/blocks/usage/index.d.ts +3 -3
  145. package/dist/blocks/vercel-marketplace/index.d.ts +1 -1
  146. package/dist/blocks/versions/index.d.ts +1 -1
  147. package/dist/blocks/waitlist/index.d.ts +1 -1
  148. package/dist/blocks/webhooks/index.d.ts +4 -4
  149. package/dist/blocks/webhooks/index.js +1 -1
  150. package/dist/blocks/workflow-editor/index.d.ts +6 -6
  151. package/dist/blocks/workflow-editor/index.js +12 -1
  152. package/dist/blocks/workflows/index.d.ts +4 -4
  153. package/dist/{bookings-D4dvGXiR.d.ts → bookings-Dox2rced.d.ts} +1 -1
  154. package/dist/{bucket-CiNi8sIw.d.ts → bucket-vc-QRrva.d.ts} +40 -1
  155. package/dist/chat-sdk/index.d.ts +1 -1
  156. package/dist/cli/add-Bfb_ISrO.js +1 -0
  157. package/dist/cli/{add-BgsUjCan.js → add-D7TkPdco.js} +17 -12
  158. package/dist/cli/{add-DCI5JKjA.js → add-I8OW-qJH.js} +2 -2
  159. package/dist/cli/{backfill-nxPbcsns.js → backfill-DIz5DnlQ.js} +1 -1
  160. package/dist/cli/bin.js +1 -1
  161. package/dist/cli/{blocks-Cr4HGePW.js → blocks-Bp5RPoft.js} +1 -1
  162. package/dist/cli/{blocks-BZHI8mRC.js → blocks-xk-SE8gS.js} +1 -1
  163. package/dist/cli/{cache-CXgR_Ahi.js → cache-AznIssjI.js} +1 -1
  164. package/dist/cli/{codemod-DSN7iAdg.js → codemod-Aewxza6i.js} +95 -3
  165. package/dist/cli/{content-mapper-DNs7lTu7.js → content-mapper-DCrz6OIv.js} +2 -2
  166. package/dist/cli/{doctor-DDrEM6S1.js → doctor-DkOSLPEQ.js} +29 -14
  167. package/dist/cli/{gen-MtijJQ9r.js → gen-CFkYUnWq.js} +10 -10
  168. package/dist/cli/index.d.ts +1 -1
  169. package/dist/cli/index.js +6 -6
  170. package/dist/cli/{init-D-aDv9r5.js → init-CHj9ad4S.js} +5 -5
  171. package/dist/cli/legacy-prefix-DkTA3Rhx.js +141 -0
  172. package/dist/cli/{live-iEeH15ck.js → live-DGdLR41j.js} +2 -2
  173. package/dist/cli/{mcp-BAPyaQ62.js → mcp-BZno503V.js} +2 -2
  174. package/dist/cli/{metadata-DVx9Zgbj.js → metadata-BfgHMe4q.js} +3 -3
  175. package/dist/cli/{migration-safety-D7PhzFxm.js → migration-safety-BnnXPAro.js} +1 -1
  176. package/dist/cli/{module-migration-aPCckev6.js → module-migration-O_IxewFs.js} +5 -216
  177. package/dist/cli/{print-BeWO7OJY.js → print-DosQIFSy.js} +1 -1
  178. package/dist/cli/{remove-B46Dmd2M.js → remove-DK2G_KHm.js} +5 -4
  179. package/dist/cli/{render-ucJmUyuM.js → render-5y5a1QZr.js} +3 -3
  180. package/dist/cli/{run-CvYVAztY.js → run-Bs4OKdDI.js} +20 -7
  181. package/dist/cli/{run-DYhLBcFW.js → run-MRET30vh.js} +20 -20
  182. package/dist/cli/{shared-LZroULBe.js → shared-BLqbvY2x.js} +1 -1
  183. package/dist/cli/{snapshot-C8MVPyO8.js → snapshot-uTUlEzY2.js} +2 -2
  184. package/dist/cli/{source-DANaJJVc.js → source-D2gJHKwC.js} +1 -1
  185. package/dist/cli/{spec-DGVNMSSB.js → spec-Cm2einTO.js} +2 -2
  186. package/dist/cli/{spec-g8_G5K7o.js → spec-DUjOtciN.js} +1 -1
  187. package/dist/cli/sql-layout-lUWenjJw.js +247 -0
  188. package/dist/cli/{sync-btj01bcM.js → sync-CZMRB3aU.js} +2 -1
  189. package/dist/cli/{upgrade-B596d4t8.js → upgrade-BFEIMC7U.js} +4 -137
  190. package/dist/cli/{upgrade-Dw3TMQzn.js → upgrade-fVsJniXm.js} +2 -2
  191. package/dist/cli/{version-Du4CgONY.js → version-B2Dr6VmJ.js} +1 -1
  192. package/dist/client/index.d.ts +5 -5
  193. package/dist/client/index.js +1 -1
  194. package/dist/client/native/index.d.ts +5 -5
  195. package/dist/client/native/index.js +1 -1
  196. package/dist/{client-BAEbEA7t.js → client-C_mlji5R.js} +6 -5
  197. package/dist/{composite-BARuBEDE.js → composite-B3TIjId4.js} +1 -1
  198. package/dist/{composite-Dsxj7T5K.d.ts → composite-CfYyU3vs.d.ts} +4 -3
  199. package/dist/config/index.d.ts +1 -1
  200. package/dist/{context-CEuTKrkz.d.ts → context-8kb8m5uO.d.ts} +24 -2
  201. package/dist/{controller-BrP0gn47.d.ts → controller-BW-5Opig.d.ts} +1 -1
  202. package/dist/{conversion-BAbucuXq.d.ts → conversion-3iv2r7YC.d.ts} +1 -1
  203. package/dist/create/index.d.ts +2 -2
  204. package/dist/create/index.js +1 -1
  205. package/dist/{define-DFBnQyYg.d.ts → define-C5AcEkEJ.d.ts} +1 -1
  206. package/dist/{define-block-BVcLQ3DF.d.ts → define-block-C1RHXz7L.d.ts} +3 -3
  207. package/dist/delegation-C7eWP2r8.d.ts +14 -0
  208. package/dist/{delegation--93jRsVO.js → delegation-DGOIiT8k.js} +12 -5
  209. package/dist/edge/index.d.ts +5 -5
  210. package/dist/edge/index.js +3 -3
  211. package/dist/{embeddings-kFbRvuic.d.ts → embeddings-D_RsS6ow.d.ts} +1 -1
  212. package/dist/{entitlements-CJpYQXeE.d.ts → entitlements-sO977DO-.d.ts} +1 -1
  213. package/dist/{envelope-Bzu0JnY2.js → envelope-DEI2iX-d.js} +1 -1
  214. package/dist/eve/index.d.ts +2 -2
  215. package/dist/{eve-BFSwTu1z.d.ts → eve-B7jxYPCw.d.ts} +2 -2
  216. package/dist/{executor-CVIn6JHa.d.ts → executor-BcNWcD-4.d.ts} +2 -2
  217. package/dist/{executor-_2ekNofh.d.ts → executor-Bi056Cnj.d.ts} +1 -1
  218. package/dist/expo/index.d.ts +2 -2
  219. package/dist/expo/index.js +2 -2
  220. package/dist/{field-errors-fsbFktYF.d.ts → field-errors-Dt86dCKk.d.ts} +12 -12
  221. package/dist/{framework-BKyTeS-j.d.ts → framework-BGdZVyPL.d.ts} +3 -3
  222. package/dist/{framework-DDdkR7FX.js → framework-BozTXRzt.js} +1 -1
  223. package/dist/{gateway-TD1pRfTP.d.ts → gateway-DzI687yd.d.ts} +3 -3
  224. package/dist/hono/index.d.ts +4 -4
  225. package/dist/hono/index.js +2 -2
  226. package/dist/{index-C-qpk8EQ.d.ts → index-CENWq3zb.d.ts} +1 -1
  227. package/dist/{index-Do2ChN_y.d.ts → index-CQhPHHDF.d.ts} +20 -2
  228. package/dist/{index-B938YqY-.d.ts → index-CTu-3fJB.d.ts} +51 -3
  229. package/dist/{index-CguFm716.d.ts → index-Cc4mIQS8.d.ts} +32 -4
  230. package/dist/{index-DLq69k3F.d.ts → index-CcAmFNVi.d.ts} +2 -2
  231. package/dist/{index-BnH4Gomw.d.ts → index-Craf712U.d.ts} +44 -12
  232. package/dist/{index-BUuVq1co.d.ts → index-DZKCc2WM.d.ts} +3 -3
  233. package/dist/index.d.ts +2 -2
  234. package/dist/{knowledge-CtL-Vfgy.d.ts → knowledge-F1IhRI4Q.d.ts} +1 -1
  235. package/dist/list/index.d.ts +1 -1
  236. package/dist/{list-query-BDVutLFr.d.ts → list-query-DYhgRTd5.d.ts} +1 -1
  237. package/dist/mapper/bin.js +5 -5
  238. package/dist/mcp/index.d.ts +3 -3
  239. package/dist/mcp/index.js +1 -1
  240. package/dist/mcp/sdk/index.d.ts +2 -2
  241. package/dist/mcp/sdk/index.js +1 -1
  242. package/dist/next/client/index.d.ts +81 -1
  243. package/dist/next/client/index.js +178 -2
  244. package/dist/next/index.d.ts +15 -14
  245. package/dist/next/index.js +2 -2
  246. package/dist/orpc/index.d.ts +4 -4
  247. package/dist/orpc/index.js +1 -1
  248. package/dist/otel/index.js +4 -4
  249. package/dist/{outbox-HvGAJuBe.d.ts → outbox-HxjZTfF6.d.ts} +1 -1
  250. package/dist/{ports-DOhtuw3c.js → ports-CaVRXjxq.js} +1 -1
  251. package/dist/{ports-sx226JUL.d.ts → ports-mObLgH1z.d.ts} +1 -1
  252. package/dist/powersync/index.d.ts +2 -2
  253. package/dist/preset/index.d.ts +3 -3
  254. package/dist/{push-token-D3Vcf0Pf.d.ts → push-token-BSSvsWXZ.d.ts} +1 -1
  255. package/dist/query/index.d.ts +1 -1
  256. package/dist/{rate-limit-o44SYkVY.js → rate-limit-Dt9vAY4E.js} +53 -0
  257. package/dist/react/index.d.ts +6 -6
  258. package/dist/react/index.js +3 -3
  259. package/dist/react/native/index.d.ts +1 -1
  260. package/dist/react/native/index.js +1 -1
  261. package/dist/react/server.d.ts +12 -7
  262. package/dist/react/server.js +8 -3
  263. package/dist/react/session.d.ts +5 -0
  264. package/dist/react/session.js +9 -1
  265. package/dist/{react-BuDYI62C.js → react-CZUZYn9E.js} +41 -4
  266. package/dist/react-router/index.d.ts +3 -3
  267. package/dist/react-router/index.js +2 -2
  268. package/dist/realtime/index.d.ts +6 -6
  269. package/dist/realtime/index.js +2 -1
  270. package/dist/{record-form-BYs9xv_N.d.ts → record-form-D9ILuVtA.d.ts} +1 -1
  271. package/dist/records/index.d.ts +7 -7
  272. package/dist/relay-gKvKJ3xf.js +208 -0
  273. package/dist/{resource-execute-CzHuDsil.d.ts → resource-execute-Cpnob1Vj.d.ts} +1 -1
  274. package/dist/{resource-types-DnKiH4G2.d.ts → resource-types-pMeLs68X.d.ts} +1 -1
  275. package/dist/{resources-B9cQxhjw.d.ts → resources-7iq2-5_A.d.ts} +1 -1
  276. package/dist/server/index.d.ts +150 -11
  277. package/dist/server/index.js +400 -4
  278. package/dist/{server-types-CFtehAsr.d.ts → server-types-CK8mUIUT.d.ts} +5 -354
  279. package/dist/{session-CH0SKgIz.d.ts → session-DWmFv3vB.d.ts} +2 -1
  280. package/dist/session-status-qQLm7jzh.d.ts +82 -0
  281. package/dist/{sign-in-DNCdrk05.js → sign-in-B64114O4.js} +1 -1
  282. package/dist/{sign-in-BsIaNx2C.js → sign-in-CmPK1AgM.js} +20 -10
  283. package/dist/solid/index.d.ts +7 -7
  284. package/dist/solid/index.js +1 -1
  285. package/dist/solid-start/index.d.ts +3 -3
  286. package/dist/solid-start/index.js +2 -2
  287. package/dist/spec/index.d.ts +1 -1
  288. package/dist/sql/index.d.ts +4 -4
  289. package/dist/sql/index.js +2 -2
  290. package/dist/{sql-ClHIdgKS.js → sql-Dl3Alk43.js} +402 -13
  291. package/dist/sqlite/index.d.ts +1 -1
  292. package/dist/ssr/index.d.ts +1 -1
  293. package/dist/storage/index.d.ts +3 -3
  294. package/dist/storage/index.js +54 -1
  295. package/dist/{subject-readers-BNSzkqw_.d.ts → subject-readers-8GySC9Z8.d.ts} +1 -1
  296. package/dist/support-B4ZBVxt3.d.ts +357 -0
  297. package/dist/svelte/index.d.ts +7 -7
  298. package/dist/svelte/index.js +1 -1
  299. package/dist/sveltekit/index.d.ts +4 -4
  300. package/dist/sveltekit/index.js +2 -2
  301. package/dist/{tags-BjHflcHF.d.ts → tags-qvVk79pp.d.ts} +1 -1
  302. package/dist/tanstack-db/index.d.ts +1 -1
  303. package/dist/tanstack-start/index.d.ts +3 -3
  304. package/dist/tanstack-start/index.js +2 -2
  305. package/dist/{tenant-yYg0E2-n.d.ts → tenant-DOKIJI62.d.ts} +1 -1
  306. package/dist/testing/index.d.ts +13 -12
  307. package/dist/{timeline-CtG0sehj.d.ts → timeline-CvTuXYvn.d.ts} +3 -3
  308. package/dist/{topic-CJrQZQaa.d.ts → topic-CZXHhZye.d.ts} +3 -3
  309. package/dist/{types-CAQBmpDx.d.ts → types-A4yyKEsg.d.ts} +1 -1
  310. package/dist/{types-SFRomQF7.d.ts → types-Czq9Xtpa.d.ts} +1 -7
  311. package/dist/{types-BBQLbui9.d.ts → types-DsRfiQ0v.d.ts} +1 -1
  312. package/dist/{usage-D7QkrwzV.d.ts → usage-Dp45V42p.d.ts} +1 -1
  313. package/dist/{verify-CMou8dWZ.d.ts → verify-CjvNLY7N.d.ts} +1 -1
  314. package/dist/vue/index.d.ts +7 -7
  315. package/dist/vue/index.js +1 -1
  316. package/dist/{watch-topic-BcGfvZOE.d.ts → watch-topic-BAxoPKZx.d.ts} +1 -1
  317. package/dist/workflow-sdk/builder/index.d.ts +3 -3
  318. package/dist/workflow-sdk/builder/index.js +1 -1
  319. package/dist/workflow-sdk/index.d.ts +1 -1
  320. package/dist/workflow-sdk/index.js +1 -1
  321. package/dist/{workflow-sdk-BFHu4sci.d.ts → workflow-sdk-B3Ss55Fy.d.ts} +1 -1
  322. package/dist/{workflow-sdk-BVlFEB5Q.js → workflow-sdk-Cf0LAOFF.js} +2 -2
  323. package/dist/yjs/index.d.ts +1 -1
  324. package/package.json +1 -1
  325. package/schemas/doctor-report-v1.json +1 -0
  326. package/skills/better-supabase-api/SKILL.md +3 -1
  327. package/skills/better-supabase-auth/SKILL.md +7 -0
  328. package/dist/cli/add-DWjlVwvP.js +0 -1
@@ -1,9 +1,9 @@
1
1
  import { t as AsyncResult } from "../../result-DZeA5KS6.js";
2
- import { C as UploadOptions, S as UploadBody } from "../../bucket-CiNi8sIw.js";
3
- import { n as TopicPort, r as TopicWatch, t as TopicHandle } from "../../watch-topic-BcGfvZOE.js";
4
- import { a as PickFilesOptions, c as Shortcut, d as UploadPort, f as memoryStorage, i as KeyboardPort, l as StoragePort, n as DeepLinkPort, o as PickedFile, p as storageUpload, r as FilePickerPort, s as PushTokenPort, t as ClientPorts, u as UploadDestination } from "../../ports-sx226JUL.js";
5
- import { a as ClientAuth, i as BindClientOptions, n as AuthUser, o as bindClient, r as BetterClient, t as AuthSnapshot } from "../../bind-CrMBwrPN.js";
6
- import { n as ExpoPushTokenOptions, r as expoPushToken, t as ExpoNotificationsLike } from "../../push-token-D3Vcf0Pf.js";
2
+ import { T as UploadOptions, w as UploadBody } from "../../bucket-vc-QRrva.js";
3
+ import { n as TopicPort, r as TopicWatch, t as TopicHandle } from "../../watch-topic-BAxoPKZx.js";
4
+ import { a as PickFilesOptions, c as Shortcut, d as UploadPort, f as memoryStorage, i as KeyboardPort, l as StoragePort, n as DeepLinkPort, o as PickedFile, p as storageUpload, r as FilePickerPort, s as PushTokenPort, t as ClientPorts, u as UploadDestination } from "../../ports-mObLgH1z.js";
5
+ import { a as ClientAuth, i as BindClientOptions, n as AuthUser, o as bindClient, r as BetterClient, t as AuthSnapshot } from "../../bind-JGCPGUJh.js";
6
+ import { n as ExpoPushTokenOptions, r as expoPushToken, t as ExpoNotificationsLike } from "../../push-token-BSSvsWXZ.js";
7
7
  import { a as OAuthSignInOptions, c as linkParams, i as OAuthClient, l as signInWithOAuthBrowser, n as AuthLinkClient, o as WebBrowserLike, r as AuthLinkResult, s as handleAuthDeepLink, t as AuthFailure } from "../../auth-link-B4NL84XU.js";
8
8
  import { SupabaseClient } from "@supabase/supabase-js";
9
9
  //#region src/client/native/auto-refresh.d.ts
@@ -1,7 +1,7 @@
1
1
  import { n as dbError } from "../../errors-BVFgt8BZ.js";
2
2
  import { r as err, s as toDbError, t as AsyncResult } from "../../result-ntFBW2p2.js";
3
3
  import { i as toBase64, r as fromBase64 } from "../../base64-B9Wlsdj7.js";
4
- import { n as storageUpload, r as bindClient, t as memoryStorage } from "../../ports-DOhtuw3c.js";
4
+ import { n as storageUpload, r as bindClient, t as memoryStorage } from "../../ports-CaVRXjxq.js";
5
5
  import { n as linkParams, r as signInWithOAuthBrowser, t as handleAuthDeepLink } from "../../auth-link-D3-bU6yz.js";
6
6
  import { t as expoPushToken } from "../../push-token-D6REHMMw.js";
7
7
  //#region src/client/native/auto-refresh.ts
@@ -1,5 +1,5 @@
1
1
  import { n as dbError } from "./errors-BVFgt8BZ.js";
2
- import { i as specKey, n as claimedTenant, r as sessionUserId, t as hasAuthModule } from "./auth-module-BEFESDC4.js";
2
+ import { a as specKey, i as sessionUserId, r as claimedTenant, t as authModuleOf } from "./auth-module-BbmX-N4L.js";
3
3
  import { r as invalidateTables } from "./user-change-DgWC6RRC.js";
4
4
  import { n as liveQuery, t as liveCount } from "./live-C21DgbsD.js";
5
5
  //#region src/bindings/client.ts
@@ -22,14 +22,15 @@ function plainCaller(supabase) {
22
22
  return {
23
23
  current: () => caller,
24
24
  subscribe: (listener) => {
25
- if (!hasAuthModule(supabase)) {
25
+ const authModule = authModuleOf(supabase);
26
+ if (!authModule) {
26
27
  caller = {
27
28
  status: "signed-out",
28
29
  userId: null
29
30
  };
30
31
  return () => void 0;
31
32
  }
32
- const { data } = supabase.auth.onAuthStateChange((_event, session) => {
33
+ const { data } = authModule.onAuthStateChange((_event, session) => {
33
34
  caller = {
34
35
  status: session ? "signed-in" : "signed-out",
35
36
  userId: session ? sessionUserId(session) : null
@@ -93,7 +94,7 @@ function startLiveQuery(run) {
93
94
  const { client, queryClient, options } = run;
94
95
  const tenant = options.tenant ?? claimedTenant(run.auth, client.betterSupabase.meta);
95
96
  const userId = run.auth.user?.id ?? null;
96
- const live = liveQuery(client.betterSupabase, client.supabase, run.spec, {
97
+ const live = liveQuery(client.betterSupabase, run.realtime ?? client.supabase, run.spec, {
97
98
  onChange: (tables) => void invalidateTables(queryClient, tables),
98
99
  onStatus: run.onStatus,
99
100
  ...tenant === void 0 ? {} : { tenant },
@@ -126,7 +127,7 @@ function startLiveCount(run) {
126
127
  const { client, key, options } = run;
127
128
  const tenant = options.tenant ?? claimedTenant(run.auth, client.betterSupabase.meta);
128
129
  const userId = run.auth.user?.id ?? null;
129
- const live = liveCount(client.betterSupabase, client.supabase, client.db, run.spec, {
130
+ const live = liveCount(client.betterSupabase, run.realtime ?? client.supabase, client.db, run.spec, {
130
131
  immediate: run.immediate,
131
132
  ...run.since === void 0 ? {} : { since: run.since },
132
133
  onCount: (count) => {
@@ -1,5 +1,5 @@
1
1
  import { o as problemResponse } from "./problem-Bf0cJ7tk.js";
2
- import { T as serverCore, _ as withSupport, g as withTenant, s as createServer, w as withServerContext, y as withSession } from "./adapter-B0b6MXYS.js";
2
+ import { T as serverCore, _ as withSupport, g as withTenant, s as createServer, w as withServerContext, y as withSession } from "./adapter-Dyks1lX1.js";
3
3
  import { s as withPrimaryPin } from "./replicas-Dyoh3CEg.js";
4
4
  import { r as guard, t as defaultExpose } from "./respond-C3CcOZlA.js";
5
5
  import { a as withAuthMode, i as withAuth, o as withJwtClaims, s as withUserClaims } from "./claims-DTy6R6my.js";
@@ -1,8 +1,9 @@
1
1
  import { O as AnyFunctions, k as AnyModels } from "./types-DFdg_4yN.js";
2
2
  import { r as AuthState } from "./resolve-CXX6DHv3.js";
3
- import { t as BetterSupabase, v as Db } from "./define-DFBnQyYg.js";
4
- import { K as ReplicaState, a as ServerContext, c as ServerOptions, n as BetterServer, v as ActiveSupport } from "./server-types-CFtehAsr.js";
5
- import { n as SessionEntryConfig } from "./session-CH0SKgIz.js";
3
+ import { t as BetterSupabase, v as Db } from "./define-C5AcEkEJ.js";
4
+ import { a as ServerContext, b as ReplicaState, c as ServerOptions, n as BetterServer } from "./server-types-CK8mUIUT.js";
5
+ import { t as ActiveSupport } from "./support-B4ZBVxt3.js";
6
+ import { n as SessionEntryConfig } from "./session-DWmFv3vB.js";
6
7
  import { r as GuardOptions } from "./respond-Dn1_YhC1.js";
7
8
  import { SupabaseClient } from "@supabase/supabase-js";
8
9
  import { Entry, SingleKeyEntry } from "@supabase/middleware";
@@ -1,6 +1,6 @@
1
1
  import { M as Casing } from "../types-DFdg_4yN.js";
2
2
  import { C as EntityConfig, S as EntitiesConfig, a as AuthorizationProvider, b as DEFAULT_ACTIVE_TENANT, c as AuthorizationScope, d as AccessBlockConfig, f as ActiveTenantSource, g as BlockMode, i as AuthorizationPermission, k as tenantNameOf, l as AuthorizationTokenHook, m as BlockConfig, n as AuthorizationMembership, o as AuthorizationRequirement, p as AnyBlocksConfig, r as AuthorizationOperation, s as AuthorizationRoleSource, t as AuthorizationFunctions, u as providerApiProblem, v as BlockScope, x as DisabledRow, y as BlocksConfig } from "../authorization-HZdJCaVm.js";
3
- import { $ as flattenConfig, $n as APP_COLUMN_FORMATS, $t as ApiConfig, A as valibot, Ai as GEN_TASKS, An as ExposeRole, Ar as CatalogPolicy, At as Generator, B as JsonSchemaTarget, Br as Snapshot, Bt as GeneratorJsonSchema, Ci as GenTask, Cn as TopicTriggerTopicConfig, Cr as CatalogColumnGrant, D as ZodGeneratorOptions, Di as OpenApiConfig, Dn as ColumnPrivilege, Dr as CatalogFunctionArg, Dt as ClaimsConfig, E as ZodFlavor, Ei as MigrationSafetyConfig, En as VectorSearchConfig, Er as CatalogFunction, Et as resolveJsonSchema, F as FactoriesGeneratorOptions, Fr as ExtrasFunction, Ft as GeneratorField, G as BlockEntity, Gr as PostgresFunction, Gt as JsonTypeConfig, H as DEFAULT_CLAIMS, Hr as SnapshotExtras, Ht as GeneratorNoun, I as factories, Ir as ExtrasHook, It as GeneratorFunction, J as blockSubjectTypes, Jr as RpcFunctionArg, Jt as TableConfig, K as blockEntities, Kr as PostgresFunctionArg, Kt as RelationsConfig, L as JsonSchemaGeneratorOptions, Lr as ExtrasHookFunction, Lt as GeneratorFunctionArg, M as standardSchema, Mi as INTEGRATION_NAMES, Mn as ResolvedExpose, Mr as CatalogTrigger, Mt as GeneratorBlockEntity, N as NuqsGeneratorOptions, Ni as IntegrationInfo, Nr as CatalogUnique, Nt as GeneratorColumn, O as zod, Oi as SkillsAgent, On as ExposeConfig, Or as CatalogGrant, Ot as CodecsConfig, P as nuqs, Pi as SKILLS_AGENTS, Pr as ExtrasDomain, Pt as GeneratorEntitySchemas, Q as blockEntrySource, Qn as APP_COLUMN_ACCESS, Qr as RpcTypeReference, Qt as ResolvedExtensions, R as buildJsonSchema, Rr as ExtrasTable, Rt as GeneratorInput, Si as GenConfig, Sn as TopicTriggerPayloadValueConfig, Sr as CatalogColumn, Ti as KeysConfig, Tn as VectorDistance, Tr as CatalogForeignKey, U as claimPaths, Ur as GeneratorMetadata, Ut as GeneratorTable, V as ClaimPaths, Vr as SnapshotBucket, Vt as GeneratorModel, W as tenantClaimPaths, Wr as PostgresColumn, Wt as JsonSchemaSource, X as RENAMED_BLOCK_KEYS, Xr as RpcFunctionReturns, Xt as FlatConfig, Y as CONFIG_GROUPS, Yr as RpcFunctionOverload, Yt as DataHooksFramework, Z as RENAMED_CONFIG_KEYS, Zr as RpcReturnColumn, Zt as ResolvedConfig, _n as SeedConfig, _r as AppTableSubject, an as BlocksInput, ar as AppColumnConfig, at as resolveConfig, bi as DoctorConfig, bn as TopicTriggerConfig, br as Catalog, cn as GenGroupConfig, cr as AppLookupConfig, ct as BucketName, dn as ToolingConfig, dr as AppReferenceTarget, dt as TypedReference, en as AppTableInput, er as APP_COLUMN_TYPES, et as groupConfig, fn as EntitlementPlansSource, fr as AppRollupAggregate, gn as ResolvedSqlConfig, gr as AppTableEvents, hn as RealtimeConfig, hr as AppTableEventKind, in as BlockInput, ir as AppColumnAccess, it as defineConfig, j as StandardSchemaGeneratorOptions, ji as INTEGRATION_INFO, jn as Privilege, jr as CatalogTable, jt as GeneratorBlock, k as ValibotGeneratorOptions, ki as SkillsConfig, kn as ExposePrivilege, kr as CatalogIndex, kt as GeneratedFile, ln as OrganizationConfig, lr as AppOnDeleteAction, lt as ConfigReferences, mn as BucketConfig, mr as AppTableConfig, nn as AuthConfig, nr as APP_ROLLUP_AGGREGATES, nt as hasFlatTables, on as DatabaseConfig, or as AppColumnFormat, ot as AppTableNames, pn as EntitlementsConfig, pr as AppRollupConfig, pt as ExpandedConfig, q as blockEntityRenames, qn as CONFIG_DEFAULTS, qr as RpcFunction, qt as SourceConfig, rn as BetterSupabaseConfig, rr as APP_TABLE_EVENT_KINDS, rt as CONFIG_SCHEMA_URL, sn as EnvironmentConfig, sr as AppColumnType, st as BlockTableReference, tn as AppTablesInput, tr as APP_ON_DELETE_ACTIONS, tt as groupEntries, un as SqlInput, ur as AppReference, ut as RoleNames, vn as SqlConfig, vr as AppTableVersions, wi as IntegrationName, wn as TopicTriggerValueConfig, wr as CatalogEnum, xi as EnvFileConfig, xn as TopicTriggerLookupConfig, xr as CatalogCheck, yn as SqlWorkflow, yr as AppTablesConfig, z as jsonSchema, zr as ForeignKeyAction, zt as GeneratorInputSchema } from "../context-CEuTKrkz.js";
3
+ import { $ as blockEntrySource, $n as APP_COLUMN_ACCESS, $r as RpcTypeReference, $t as ResolvedExtensions, A as ValibotGeneratorOptions, Ai as SkillsConfig, An as ExposePrivilege, Ar as CatalogIndex, At as GeneratedFile, B as jsonSchema, Br as ForeignKeyAction, Bt as GeneratorInputSchema, Ci as GenConfig, Cn as TopicTriggerPayloadValueConfig, Cr as CatalogColumn, D as ZodFlavor, Di as MigrationSafetyConfig, Dn as VectorSearchConfig, Dr as CatalogFunction, Dt as resolveJsonSchema, Ei as KeysConfig, En as VectorDistance, Er as CatalogForeignKey, F as nuqs, Fi as SKILLS_AGENTS, Fr as ExtrasDomain, Ft as GeneratorEntitySchemas, G as tenantClaimPaths, Gr as PostgresColumn, Gt as JsonSchemaSource, H as ClaimPaths, Hr as SnapshotBucket, Ht as GeneratorModel, I as FactoriesGeneratorOptions, Ir as ExtrasFunction, It as GeneratorField, J as blockEntityRenames, Jn as CONFIG_DEFAULTS, Jr as RpcFunction, Jt as SourceConfig, K as BlockEntity, Kr as PostgresFunction, Kt as JsonTypeConfig, L as factories, Lr as ExtrasHook, Lt as GeneratorFunction, M as StandardSchemaGeneratorOptions, Mi as INTEGRATION_INFO, Mn as Privilege, Mr as CatalogTable, Mt as GeneratorBlock, N as standardSchema, Ni as INTEGRATION_NAMES, Nn as ResolvedExpose, Nr as CatalogTrigger, Nt as GeneratorBlockEntity, O as ZodGeneratorOptions, Oi as OpenApiConfig, On as ColumnPrivilege, Or as CatalogFunctionArg, Ot as ClaimsConfig, P as NuqsGeneratorOptions, Pi as IntegrationInfo, Pr as CatalogUnique, Pt as GeneratorColumn, Q as RENAMED_CONFIG_KEYS, Qr as RpcReturnColumn, Qt as ResolvedConfig, R as JsonSchemaGeneratorOptions, Rr as ExtrasHookFunction, Rt as GeneratorFunctionArg, Si as EnvFileConfig, Sn as TopicTriggerLookupConfig, Sr as CatalogCheck, Ti as IntegrationName, Tn as TopicTriggerValueConfig, Tr as CatalogEnum, U as DEFAULT_CLAIMS, Ur as SnapshotExtras, Ut as GeneratorNoun, V as JsonSchemaTarget, Vr as Snapshot, Vt as GeneratorJsonSchema, W as claimPaths, Wr as GeneratorMetadata, Wt as GeneratorTable, X as CONFIG_GROUPS, Xr as RpcFunctionOverload, Xt as DataHooksFramework, Y as blockSubjectTypes, Yr as RpcFunctionArg, Yt as TableConfig, Z as RENAMED_BLOCK_KEYS, Zr as RpcFunctionReturns, Zt as FlatConfig, _n as ResolvedSqlConfig, _r as AppTableEvents, an as BlockInput, ar as AppColumnAccess, at as defineConfig, bn as SqlWorkflow, br as AppTablesConfig, cn as EnvironmentConfig, cr as AppColumnType, ct as BlockTableReference, dn as SqlInput, dr as AppReference, dt as RoleNames, en as ApiConfig, er as APP_COLUMN_FORMATS, et as flattenConfig, fn as ToolingConfig, fr as AppReferenceTarget, ft as TypedReference, gn as RealtimeConfig, gr as AppTableEventKind, hn as BucketConfig, hr as AppTableConfig, in as BetterSupabaseConfig, ir as APP_TABLE_EVENT_KINDS, it as CONFIG_SCHEMA_URL, j as valibot, ji as GEN_TASKS, jn as ExposeRole, jr as CatalogPolicy, jt as Generator, k as zod, ki as SkillsAgent, kn as ExposeConfig, kr as CatalogGrant, kt as CodecsConfig, ln as GenGroupConfig, lr as AppLookupConfig, lt as BucketName, mn as EntitlementsConfig, mr as AppRollupConfig, mt as ExpandedConfig, nn as AppTablesInput, nr as APP_ON_DELETE_ACTIONS, nt as groupEntries, on as BlocksInput, or as AppColumnConfig, ot as resolveConfig, pn as EntitlementPlansSource, pr as AppRollupAggregate, q as blockEntities, qr as PostgresFunctionArg, qt as RelationsConfig, rn as AuthConfig, rr as APP_ROLLUP_AGGREGATES, rt as hasFlatTables, sn as DatabaseConfig, sr as AppColumnFormat, st as AppTableNames, tn as AppTableInput, tr as APP_COLUMN_TYPES, tt as groupConfig, un as OrganizationConfig, ur as AppOnDeleteAction, ut as ConfigReferences, vn as SeedConfig, vr as AppTableSubject, wi as GenTask, wn as TopicTriggerTopicConfig, wr as CatalogColumnGrant, xi as DoctorConfig, xn as TopicTriggerConfig, xr as Catalog, yn as SqlConfig, yr as AppTableVersions, z as buildJsonSchema, zr as ExtrasTable, zt as GeneratorInput } from "../context-8kb8m5uO.js";
4
4
  import { n as SubjectsConfig, t as SubjectConfig } from "../subjects-DvmQeF_F.js";
5
5
  import { a as FieldFormat, o as FieldFormatInput, r as FIELD_FORMATS } from "../field-formats-CAFNkKSN.js";
6
6
  export { APP_COLUMN_ACCESS, APP_COLUMN_FORMATS, APP_COLUMN_TYPES, APP_ON_DELETE_ACTIONS, APP_ROLLUP_AGGREGATES, APP_TABLE_EVENT_KINDS, type AccessBlockConfig, type ActiveTenantSource, type AnyBlocksConfig, type ApiConfig, type AppColumnAccess, type AppColumnConfig, type AppColumnFormat, type AppColumnType, type AppLookupConfig, type AppOnDeleteAction, type AppReference, type AppReferenceTarget, type AppRollupAggregate, type AppRollupConfig, type AppTableConfig, type AppTableEventKind, type AppTableEvents, type AppTableInput, type AppTableNames, type AppTableSubject, type AppTableVersions, type AppTablesConfig, type AppTablesInput, type AuthConfig, type AuthorizationFunctions, type AuthorizationMembership, type AuthorizationOperation, type AuthorizationPermission, type AuthorizationProvider, type AuthorizationRequirement, type AuthorizationRoleSource, type AuthorizationScope, type AuthorizationTokenHook, type BetterSupabaseConfig, type BlockConfig, type BlockEntity, type BlockInput, type BlockMode, type BlockScope, type BlockTableReference, type BlocksConfig, type BlocksInput, type BucketConfig, type BucketName, CONFIG_DEFAULTS, CONFIG_GROUPS, CONFIG_SCHEMA_URL, type Casing, type Catalog, type CatalogCheck, type CatalogColumn, type CatalogColumnGrant, type CatalogEnum, type CatalogForeignKey, type CatalogFunction, type CatalogFunctionArg, type CatalogGrant, type CatalogIndex, type CatalogPolicy, type CatalogTable, type CatalogTrigger, type CatalogUnique, type ClaimPaths, type ClaimsConfig, type CodecsConfig, type ColumnPrivilege, type ConfigReferences, DEFAULT_ACTIVE_TENANT, DEFAULT_CLAIMS, type DataHooksFramework, type DatabaseConfig, type DisabledRow, type DoctorConfig, type EntitiesConfig, type EntitlementPlansSource, type EntitlementsConfig, type EntityConfig, type EnvFileConfig, type EnvironmentConfig, type ExpandedConfig, type ExposeConfig, type ExposePrivilege, type ExposeRole, type ExtrasDomain, type ExtrasFunction, type ExtrasHook, type ExtrasHookFunction, type ExtrasTable, FIELD_FORMATS, type FactoriesGeneratorOptions, type FieldFormat, type FieldFormatInput, type FlatConfig, type ForeignKeyAction, GEN_TASKS, type GenConfig, type GenGroupConfig, type GenTask, type GeneratedFile, type Generator, type GeneratorBlock, type GeneratorBlockEntity, type GeneratorColumn, type GeneratorEntitySchemas, type GeneratorField, type GeneratorFunction, type GeneratorFunctionArg, type GeneratorInput, type GeneratorInputSchema, type GeneratorJsonSchema, type GeneratorMetadata, type GeneratorModel, type GeneratorNoun, type GeneratorTable, INTEGRATION_INFO, INTEGRATION_NAMES, type IntegrationInfo, type IntegrationName, type JsonSchemaGeneratorOptions, type JsonSchemaSource, type JsonSchemaTarget, type JsonTypeConfig, type KeysConfig, type MigrationSafetyConfig, type NuqsGeneratorOptions, type OpenApiConfig, type OrganizationConfig, type PostgresColumn, type PostgresFunction, type PostgresFunctionArg, type Privilege, RENAMED_BLOCK_KEYS, RENAMED_CONFIG_KEYS, type RealtimeConfig, type RelationsConfig, type ResolvedConfig, type ResolvedExpose, type ResolvedExtensions, type ResolvedSqlConfig, type RoleNames, type RpcFunction, type RpcFunctionArg, type RpcFunctionOverload, type RpcFunctionReturns, type RpcReturnColumn, type RpcTypeReference, SKILLS_AGENTS, type SeedConfig, type SkillsAgent, type SkillsConfig, type Snapshot, type SnapshotBucket, type SnapshotExtras, type SourceConfig, type SqlConfig, type SqlInput, type SqlWorkflow, type StandardSchemaGeneratorOptions, type SubjectConfig, type SubjectsConfig, type TableConfig, type ToolingConfig, type TopicTriggerConfig, type TopicTriggerLookupConfig, type TopicTriggerPayloadValueConfig, type TopicTriggerTopicConfig, type TopicTriggerValueConfig, type TypedReference, type ValibotGeneratorOptions, type VectorDistance, type VectorSearchConfig, type ZodFlavor, type ZodGeneratorOptions, blockEntities, blockEntityRenames, blockEntrySource, blockSubjectTypes, buildJsonSchema, claimPaths, defineConfig, factories, flattenConfig, groupConfig, groupEntries, hasFlatTables, jsonSchema, nuqs, providerApiProblem, resolveConfig, resolveJsonSchema, standardSchema, tenantClaimPaths, tenantNameOf, valibot, zod };
@@ -1,7 +1,7 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { M as Casing, P as ClaimsMeta, T as AccessBucketPolicy, _t as BucketLifecycle, j as BucketPolicyName, ot as SchemaMeta } from "./types-DFdg_4yN.js";
3
3
  import { D as ResolvedBlock, E as NamedInstance, F as BlockNameRegistry, P as TablesOf, T as InstanceOn, _ as BlockName, a as AuthorizationProvider, d as AccessBlockConfig, g as BlockMode, h as BlockConfigOf, m as BlockConfig, n as AuthorizationMembership, p as AnyBlocksConfig, r as AuthorizationOperation, s as AuthorizationRoleSource, t as AuthorizationFunctions, v as BlockScope, w as InstanceKeys, x as DisabledRow, y as BlocksConfig } from "./authorization-HZdJCaVm.js";
4
- import { Mn as EntityNames, Nn as EntityNoun, Pn as EntityRename, R as PortName, Ut as ActionDescriptor, Xt as BlockSchedule, Zt as DefaultAutomation, _ as BlockProvider, g as BlockEnvKey, i as BlockCategory, y as BlockWorker } from "./define-block-BVcLQ3DF.js";
4
+ import { Mn as EntityNames, Nn as EntityNoun, Pn as EntityRename, R as PortName, Ut as ActionDescriptor, Xt as BlockSchedule, Zt as DefaultAutomation, _ as BlockProvider, g as BlockEnvKey, i as BlockCategory, y as BlockWorker } from "./define-block-C1RHXz7L.js";
5
5
  import { a as ScalarKind, i as FieldSpec } from "./table-schema-BlF6k62Q.js";
6
6
  import { n as SubjectsConfig } from "./subjects-DvmQeF_F.js";
7
7
  import { i as FIELD_FORMAT_NAMES, s as FieldFormatName } from "./field-formats-CAFNkKSN.js";
@@ -3364,6 +3364,17 @@ interface BlockSqlAppTable {
3364
3364
  * when secrets live in Vault. They are neither required nor checked.
3365
3365
  */
3366
3366
  readonly unused?: (ctx: BlockSqlContext) => readonly string[];
3367
+ /**
3368
+ * Whether the block's TypeScript API inserts, updates or deletes rows of the
3369
+ * table. Defaults to `true`. Doctor (BS349) reports such a table mapped to a
3370
+ * view Postgres can't write through.
3371
+ */
3372
+ readonly writes?: boolean;
3373
+ }
3374
+ /** A view of the app's at a block table's name. */
3375
+ interface OwnView {
3376
+ /** Whether `insert`, `update` and `delete` reach the table under the view. */
3377
+ readonly updatable: boolean;
3367
3378
  }
3368
3379
  /**
3369
3380
  * A table of the app's outside `names.tables` that a module writes columns of,
@@ -3458,6 +3469,12 @@ interface BlockSqlLayout {
3458
3469
  readonly ownTables?: Readonly<Record<string, string>>;
3459
3470
  /** The columns of the tables in `ownTables`, where they are known. */
3460
3471
  readonly ownColumns?: Readonly<Record<string, readonly string[]>>;
3472
+ /**
3473
+ * The entries of `ownTables` that are views or materialized views, by
3474
+ * `schema.view`, and whether Postgres can write through each one. A block
3475
+ * writes no DDL over a view, only the functions that read it.
3476
+ */
3477
+ readonly ownViews?: Readonly<Record<string, OwnView>>;
3461
3478
  /**
3462
3479
  * The trigger that already keeps `updated_at` current on a table in
3463
3480
  * `ownTables`, by `schema.table`. A block adds no `updated_at` trigger
@@ -3984,6 +4001,11 @@ interface BlockSqlContext {
3984
4001
  owns(table: string): boolean;
3985
4002
  /** The logical tables the app has; the module only adds their columns. */
3986
4003
  readonly appOwned: readonly string[];
4004
+ /**
4005
+ * The entries of `appOwned` that are views: the module writes no DDL on them,
4006
+ * only the functions that read them.
4007
+ */
4008
+ readonly appViews: readonly string[];
3987
4009
  readonly names: BlockSqlNames;
3988
4010
  readonly installedModules: readonly string[];
3989
4011
  /** The permission key for a module action, as a SQL literal. */
@@ -4126,4 +4148,4 @@ interface ExtraColumn {
4126
4148
  /** The contract's argument list with `{id}` resolved, as Postgres prints it. */
4127
4149
  declare function contractSignature(fn: BlockSqlContractFunction, idType: string): string;
4128
4150
  //#endregion
4129
- export { flattenConfig as $, APP_COLUMN_FORMATS as $n, PresetCatalog as $r, ApiConfig as $t, valibot as A, GEN_TASKS as Ai, ExposeRole as An, CatalogPolicy as Ar, Generator as At, JsonSchemaTarget as B, PRESET_GROUPS as Bn, Snapshot as Br, GeneratorJsonSchema as Bt, blockSqlVersion as C, GenTask as Ci, TopicTriggerTopicConfig as Cn, CatalogColumnGrant as Cr, listNames as Ct, ZodGeneratorOptions as D, OpenApiConfig as Di, ColumnPrivilege as Dn, CatalogFunctionArg as Dr, ClaimsConfig as Dt, ZodFlavor as E, MigrationSafetyConfig as Ei, VectorSearchConfig as En, CatalogFunction as Er, resolveJsonSchema as Et, FactoriesGeneratorOptions as F, presetOfSpec as Fn, ExtrasFunction as Fr, GeneratorField as Ft, BlockEntity as G, isPresetName as Gn, PostgresFunction as Gr, JsonTypeConfig as Gt, DEFAULT_CLAIMS as H, PresetGroup as Hn, SnapshotExtras as Hr, GeneratorNoun as Ht, factories as I, presetSpec as In, ExtrasHook as Ir, GeneratorFunction as It, blockSubjectTypes as J, DeclaredForeignKey as Jn, RpcFunctionArg as Jr, TableConfig as Jt, blockEntities as K, namedPreset as Kn, PostgresFunctionArg as Kr, RelationsConfig as Kt, JsonSchemaGeneratorOptions as L, DEFAULT_PRESET_NAME as Ln, ExtrasHookFunction as Lr, GeneratorFunctionArg as Lt, standardSchema as M, INTEGRATION_NAMES as Mi, ResolvedExpose as Mn, CatalogTrigger as Mr, GeneratorBlockEntity as Mt, NuqsGeneratorOptions as N, IntegrationInfo as Ni, PresetSpec as Nn, CatalogUnique as Nr, GeneratorColumn as Nt, zod as O, SkillsAgent as Oi, ExposeConfig as On, CatalogGrant as Or, CodecsConfig as Ot, nuqs as P, SKILLS_AGENTS as Pi, presetFromSpec as Pn, ExtrasDomain as Pr, GeneratorEntitySchemas as Pt, blockEntrySource as Q, APP_COLUMN_ACCESS as Qn, RpcTypeReference as Qr, ResolvedExtensions as Qt, buildJsonSchema as R, NamedPreset as Rn, ExtrasTable as Rr, GeneratorInput as Rt, BlockSqlUpgrade as S, GenConfig as Si, TopicTriggerPayloadValueConfig as Sn, CatalogColumn as Sr, ResolvedPresetBlock as St, TableGrant as T, KeysConfig as Ti, VectorDistance as Tn, CatalogForeignKey as Tr, resolvePreset as Tt, claimPaths as U, PresetName as Un, GeneratorMetadata as Ur, GeneratorTable as Ut, ClaimPaths as V, PRESET_NAMES as Vn, SnapshotBucket as Vr, GeneratorModel as Vt, tenantClaimPaths as W, defaultPreset as Wn, PostgresColumn as Wr, JsonSchemaSource as Wt, RENAMED_BLOCK_KEYS as X, AuditedTable as Xn, RpcFunctionReturns as Xr, FlatConfig as Xt, CONFIG_GROUPS as Y, sameTenantLayout as Yn, RpcFunctionOverload as Yr, DataHooksFramework as Yt, RENAMED_CONFIG_KEYS as Z, auditRegistrations as Zn, RpcReturnColumn as Zr, ResolvedConfig as Zt, BlockSqlDeprecation as _, integrationsForFramework as _i, SeedConfig as _n, AppTableSubject as _r, presetConfig as _t, BlockSqlContext as a, PRESET_FRAMEWORKS as ai, BlocksInput as an, AppColumnConfig as ar, resolveConfig as at, BlockSqlLayout as b, DoctorConfig as bi, TopicTriggerConfig as bn, Catalog as br, PresetIntegration as bt, BlockSqlIdType as c, PresetAccess as ci, GenGroupConfig as cn, AppLookupConfig as cr, BucketName as ct, MODULE_ID_TYPES as d, PresetFieldKey as di, ToolingConfig as dn, AppReferenceTarget as dr, TypedReference as dt, PresetCatalogBlock as ei, AppTableInput as en, APP_COLUMN_TYPES as er, groupConfig as et, contractSignature as f, PresetFieldValue as fi, EntitlementPlansSource as fn, AppRollupAggregate as fr, ConfigConventions as ft, BlockSqlAccessProvider as g, PresetValueInfo as gi, ResolvedSqlConfig as gn, AppTableEvents as gr, expandPreset as gt, BlockSql as h, PresetScope as hi, RealtimeConfig as hn, AppTableEventKind as hr, conventionConfig as ht, BlockSqlAudit as i, DEFAULT_CONVENTIONS as ii, BlockInput as in, AppColumnAccess as ir, defineConfig as it, StandardSchemaGeneratorOptions as j, INTEGRATION_INFO as ji, Privilege as jn, CatalogTable as jr, GeneratorBlock as jt, ValibotGeneratorOptions as k, SkillsConfig as ki, ExposePrivilege as kn, CatalogIndex as kr, GeneratedFile as kt, BlockSqlNames as l, PresetConventions as li, OrganizationConfig as ln, AppOnDeleteAction as lr, ConfigReferences as lt, moduleIdType as m, PresetPlatforms as mi, BucketConfig as mn, AppTableConfig as mr, PresetInput as mt, AuditCategory as n, PresetGlueItem as ni, AuthConfig as nn, APP_ROLLUP_AGGREGATES as nr, hasFlatTables as nt, BlockSqlContractFunction as o, PRESET_TENANT_NAMES as oi, DatabaseConfig as on, AppColumnFormat as or, AppTableNames as ot, isBlockSqlIdType as p, PresetFramework as pi, EntitlementsConfig as pn, AppRollupConfig as pr, ExpandedConfig as pt, blockEntityRenames as q, CONFIG_DEFAULTS as qn, RpcFunction as qr, SourceConfig as qt, BlockSqlAction as r, CONVENTION_FIELDS as ri, BetterSupabaseConfig as rn, APP_TABLE_EVENT_KINDS as rr, CONFIG_SCHEMA_URL as rt, BlockSqlEmit as s, Preset as si, EnvironmentConfig as sn, AppColumnType as sr, BlockTableReference as st, AUDIT_CATEGORIES as t, PresetCatalogManifest as ti, AppTablesInput as tn, APP_ON_DELETE_ACTIONS as tr, groupEntries as tt, BlockSqlTableSpec as u, PresetField as ui, SqlInput as un, AppReference as ur, RoleNames as ut, BlockSqlEntitlementsProvider as v, presetField as vi, SqlConfig as vn, AppTableVersions as vr, presetOf as vt, notNullCheckName as w, IntegrationName as wi, TopicTriggerValueConfig as wn, CatalogEnum as wr, presetBlockConflict as wt, BlockSqlTestFile as x, EnvFileConfig as xi, TopicTriggerLookupConfig as xn, CatalogCheck as xr, ResolvedPreset as xt, BlockSqlFile as y, presetValueLabel as yi, SqlWorkflow as yn, AppTablesConfig as yr, PresetConflict as yt, jsonSchema as z, PRESETS as zn, ForeignKeyAction as zr, GeneratorInputSchema as zt };
4151
+ export { blockEntrySource as $, APP_COLUMN_ACCESS as $n, RpcTypeReference as $r, ResolvedExtensions as $t, ValibotGeneratorOptions as A, SkillsConfig as Ai, ExposePrivilege as An, CatalogIndex as Ar, GeneratedFile as At, jsonSchema as B, PRESETS as Bn, ForeignKeyAction as Br, GeneratorInputSchema as Bt, OwnView as C, GenConfig as Ci, TopicTriggerPayloadValueConfig as Cn, CatalogColumn as Cr, ResolvedPresetBlock as Ct, ZodFlavor as D, MigrationSafetyConfig as Di, VectorSearchConfig as Dn, CatalogFunction as Dr, resolveJsonSchema as Dt, TableGrant as E, KeysConfig as Ei, VectorDistance as En, CatalogForeignKey as Er, resolvePreset as Et, nuqs as F, SKILLS_AGENTS as Fi, presetFromSpec as Fn, ExtrasDomain as Fr, GeneratorEntitySchemas as Ft, tenantClaimPaths as G, defaultPreset as Gn, PostgresColumn as Gr, JsonSchemaSource as Gt, ClaimPaths as H, PRESET_NAMES as Hn, SnapshotBucket as Hr, GeneratorModel as Ht, FactoriesGeneratorOptions as I, presetOfSpec as In, ExtrasFunction as Ir, GeneratorField as It, blockEntityRenames as J, CONFIG_DEFAULTS as Jn, RpcFunction as Jr, SourceConfig as Jt, BlockEntity as K, isPresetName as Kn, PostgresFunction as Kr, JsonTypeConfig as Kt, factories as L, presetSpec as Ln, ExtrasHook as Lr, GeneratorFunction as Lt, StandardSchemaGeneratorOptions as M, INTEGRATION_INFO as Mi, Privilege as Mn, CatalogTable as Mr, GeneratorBlock as Mt, standardSchema as N, INTEGRATION_NAMES as Ni, ResolvedExpose as Nn, CatalogTrigger as Nr, GeneratorBlockEntity as Nt, ZodGeneratorOptions as O, OpenApiConfig as Oi, ColumnPrivilege as On, CatalogFunctionArg as Or, ClaimsConfig as Ot, NuqsGeneratorOptions as P, IntegrationInfo as Pi, PresetSpec as Pn, CatalogUnique as Pr, GeneratorColumn as Pt, RENAMED_CONFIG_KEYS as Q, auditRegistrations as Qn, RpcReturnColumn as Qr, ResolvedConfig as Qt, JsonSchemaGeneratorOptions as R, DEFAULT_PRESET_NAME as Rn, ExtrasHookFunction as Rr, GeneratorFunctionArg as Rt, BlockSqlUpgrade as S, EnvFileConfig as Si, TopicTriggerLookupConfig as Sn, CatalogCheck as Sr, ResolvedPreset as St, notNullCheckName as T, IntegrationName as Ti, TopicTriggerValueConfig as Tn, CatalogEnum as Tr, presetBlockConflict as Tt, DEFAULT_CLAIMS as U, PresetGroup as Un, SnapshotExtras as Ur, GeneratorNoun as Ut, JsonSchemaTarget as V, PRESET_GROUPS as Vn, Snapshot as Vr, GeneratorJsonSchema as Vt, claimPaths as W, PresetName as Wn, GeneratorMetadata as Wr, GeneratorTable as Wt, CONFIG_GROUPS as X, sameTenantLayout as Xn, RpcFunctionOverload as Xr, DataHooksFramework as Xt, blockSubjectTypes as Y, DeclaredForeignKey as Yn, RpcFunctionArg as Yr, TableConfig as Yt, RENAMED_BLOCK_KEYS as Z, AuditedTable as Zn, RpcFunctionReturns as Zr, FlatConfig as Zt, BlockSqlDeprecation as _, PresetValueInfo as _i, ResolvedSqlConfig as _n, AppTableEvents as _r, expandPreset as _t, BlockSqlContext as a, DEFAULT_CONVENTIONS as ai, BlockInput as an, AppColumnAccess as ar, defineConfig as at, BlockSqlLayout as b, presetValueLabel as bi, SqlWorkflow as bn, AppTablesConfig as br, PresetConflict as bt, BlockSqlIdType as c, Preset as ci, EnvironmentConfig as cn, AppColumnType as cr, BlockTableReference as ct, MODULE_ID_TYPES as d, PresetField as di, SqlInput as dn, AppReference as dr, RoleNames as dt, PresetCatalog as ei, ApiConfig as en, APP_COLUMN_FORMATS as er, flattenConfig as et, contractSignature as f, PresetFieldKey as fi, ToolingConfig as fn, AppReferenceTarget as fr, TypedReference as ft, BlockSqlAccessProvider as g, PresetScope as gi, RealtimeConfig as gn, AppTableEventKind as gr, conventionConfig as gt, BlockSql as h, PresetPlatforms as hi, BucketConfig as hn, AppTableConfig as hr, PresetInput as ht, BlockSqlAudit as i, CONVENTION_FIELDS as ii, BetterSupabaseConfig as in, APP_TABLE_EVENT_KINDS as ir, CONFIG_SCHEMA_URL as it, valibot as j, GEN_TASKS as ji, ExposeRole as jn, CatalogPolicy as jr, Generator as jt, zod as k, SkillsAgent as ki, ExposeConfig as kn, CatalogGrant as kr, CodecsConfig as kt, BlockSqlNames as l, PresetAccess as li, GenGroupConfig as ln, AppLookupConfig as lr, BucketName as lt, moduleIdType as m, PresetFramework as mi, EntitlementsConfig as mn, AppRollupConfig as mr, ExpandedConfig as mt, AuditCategory as n, PresetCatalogManifest as ni, AppTablesInput as nn, APP_ON_DELETE_ACTIONS as nr, groupEntries as nt, BlockSqlContractFunction as o, PRESET_FRAMEWORKS as oi, BlocksInput as on, AppColumnConfig as or, resolveConfig as ot, isBlockSqlIdType as p, PresetFieldValue as pi, EntitlementPlansSource as pn, AppRollupAggregate as pr, ConfigConventions as pt, blockEntities as q, namedPreset as qn, PostgresFunctionArg as qr, RelationsConfig as qt, BlockSqlAction as r, PresetGlueItem as ri, AuthConfig as rn, APP_ROLLUP_AGGREGATES as rr, hasFlatTables as rt, BlockSqlEmit as s, PRESET_TENANT_NAMES as si, DatabaseConfig as sn, AppColumnFormat as sr, AppTableNames as st, AUDIT_CATEGORIES as t, PresetCatalogBlock as ti, AppTableInput as tn, APP_COLUMN_TYPES as tr, groupConfig as tt, BlockSqlTableSpec as u, PresetConventions as ui, OrganizationConfig as un, AppOnDeleteAction as ur, ConfigReferences as ut, BlockSqlEntitlementsProvider as v, integrationsForFramework as vi, SeedConfig as vn, AppTableSubject as vr, presetConfig as vt, blockSqlVersion as w, GenTask as wi, TopicTriggerTopicConfig as wn, CatalogColumnGrant as wr, listNames as wt, BlockSqlTestFile as x, DoctorConfig as xi, TopicTriggerConfig as xn, Catalog as xr, PresetIntegration as xt, BlockSqlFile as y, presetField as yi, SqlConfig as yn, AppTableVersions as yr, presetOf as yt, buildJsonSchema as z, NamedPreset as zn, ExtrasTable as zr, GeneratorInput as zt };
@@ -1,4 +1,4 @@
1
- import { a as ClientAuth } from "./bind-CrMBwrPN.js";
1
+ import { a as ClientAuth } from "./bind-JGCPGUJh.js";
2
2
  //#region src/blocks/controller.d.ts
3
3
  /**
4
4
  * A block's client state, framework-agnostic. `subscribe` and `getSnapshot`
@@ -1,5 +1,5 @@
1
1
  import { f as Result } from "./result-DZeA5KS6.js";
2
- import { Bt as Action, Ht as ActionContext, Vt as ActionCall } from "./define-block-BVcLQ3DF.js";
2
+ import { Bt as Action, Ht as ActionContext, Vt as ActionCall } from "./define-block-C1RHXz7L.js";
3
3
  import { StandardSchemaV1 } from "@standard-schema/spec";
4
4
  //#region src/blocks/automations/conversion.d.ts
5
5
  /** A record a conversion reads from or creates: its subject type and id. */
@@ -1,6 +1,6 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { Nn as PresetSpec, Un as PresetName, g as BlockSqlAccessProvider, ir as AppColumnAccess, lr as AppOnDeleteAction, mt as PresetInput, or as AppColumnFormat, si as Preset, sr as AppColumnType, tr as APP_ON_DELETE_ACTIONS, vr as AppTableVersions } from "../context-CEuTKrkz.js";
3
- import { a as DesignChange, p as DesignErrorCode, u as CreateDesign } from "../index-C-qpk8EQ.js";
2
+ import { Pn as PresetSpec, Wn as PresetName, ar as AppColumnAccess, ci as Preset, cr as AppColumnType, g as BlockSqlAccessProvider, ht as PresetInput, nr as APP_ON_DELETE_ACTIONS, sr as AppColumnFormat, ur as AppOnDeleteAction, yr as AppTableVersions } from "../context-8kb8m5uO.js";
3
+ import { a as DesignChange, p as DesignErrorCode, u as CreateDesign } from "../index-CENWq3zb.js";
4
4
  import { a as SupabaseLint, o as SupabaseOrganization, s as SupabaseProject } from "../management-wtecfrNf.js";
5
5
  import { t as PresetMigrationFile } from "../types-DGHfTW8_.js";
6
6
  //#region src/create/design-computed.d.ts
@@ -2,7 +2,7 @@ import { a as presetOf, d as resolvePreset } from "../config-CcehOvbz.js";
2
2
  import { C as APP_ON_DELETE_ACTIONS, E as PRESET_CATALOG, a as appIdentifierError, m as isAppDefault, o as appNameLengthError, p as appDefaultError, s as appReservedColumns } from "../app-tables-D29Rahtg.js";
3
3
  import { c as resolveConfig } from "../config-DWGgUQCh.js";
4
4
  import { _ as jsonPointer, a as DesignParseError, h as encodeDesign, n as diffDesigns, o as DesignTooLongError, p as designOf, u as designConfig, v as parseDesign } from "../preset-CsHnIBJF.js";
5
- import { F as SQL_MODULES, h as renderBlocks, i as moduleLayout } from "../sql-ClHIdgKS.js";
5
+ import { I as SQL_MODULES, g as renderBlocks, i as moduleLayout } from "../sql-Dl3Alk43.js";
6
6
  //#region src/create/column-keys.ts
7
7
  /** The most options a select takes, and the longest option. */
8
8
  const MAX_OPTIONS = 100;
@@ -4,7 +4,7 @@ import { t as StandardSchemaV1 } from "./standard-DBV730sF.js";
4
4
  import { Bt as Executor, Ct as ApplyExtension, Ft as RequestContext, It as WithExtension, K as Insert, O as AnyFunctions, St as AnyPlugin, Tt as ExtensionOf, Z as PrimaryKeyValue, a as CountMode, at as Schema, dt as TableMeta, ht as Update, it as Row, k as AnyModels, m as Operation, mt as UniqueWhere, nt as Relations, ot as SchemaMeta, pt as UniqueKeyName, st as Simplify, tt as RelationTypes, ut as TableKey } from "./types-DFdg_4yN.js";
5
5
  import { a as EventHandler, c as MutationNotice, d as RpcNotice, o as EventHub, s as EventName } from "./events-vcqenSYU.js";
6
6
  import { n as Logger } from "./logger-DWVYUmwi.js";
7
- import { k as StorageApi, n as Bucket, r as BucketClient } from "./bucket-CiNi8sIw.js";
7
+ import { j as StorageApi, n as Bucket, r as BucketClient } from "./bucket-vc-QRrva.js";
8
8
  import { h as FilterQuery } from "./filter-query-BXLs72G9.js";
9
9
  import { a as PostgrestPlan, i as PostgrestCompileOptions } from "./postgrest-z-T0l23T.js";
10
10
  import { SupabaseClient } from "@supabase/supabase-js";
@@ -10,11 +10,11 @@ import { a as BlockTenantOptions, n as BlockOptions, r as BlockTemporalOptions }
10
10
  import { r as DbTransportSource, t as BlockTransport } from "./block-transport-DWZSJrwN.js";
11
11
  import { a as BlockTransportMiddleware, n as BlockHooks } from "./block-hooks-DZN2w69m.js";
12
12
  import { f as AiFiles, y as UploadClaimStorage } from "./types-Dr9wZgNy.js";
13
- import { g as JobHandler } from "./types-SFRomQF7.js";
13
+ import { g as JobHandler } from "./types-Czq9Xtpa.js";
14
14
  import { t as BlockOptionsSchema } from "./options-CsGl5BLH.js";
15
15
  import { t as Author } from "./block-authors-DzXLUiIq.js";
16
- import { u as BlockInstanceSurface } from "./define-DFBnQyYg.js";
17
- import { O as TtlPreset, l as ImageTransform, x as TransformOptions } from "./bucket-CiNi8sIw.js";
16
+ import { u as BlockInstanceSurface } from "./define-C5AcEkEJ.js";
17
+ import { A as TtlPreset, C as TransformOptions, l as ImageTransform } from "./bucket-vc-QRrva.js";
18
18
  import { i as FieldSpec, n as TableSchema, o as TableSchemaSpec } from "./table-schema-BlF6k62Q.js";
19
19
  import { i as EventSink } from "./cloud-event-CzZTJkXv.js";
20
20
  import { g as Workflows } from "./workflows-B0ZPAQu0.js";
@@ -0,0 +1,14 @@
1
+ //#region src/auth/delegation.d.ts
2
+ /** One RFC 9396 `authorization_details` entry. */
3
+ interface AuthorizationDetail {
4
+ readonly type: string;
5
+ readonly [field: string]: unknown;
6
+ }
7
+ /**
8
+ * The claim `forContext({ permissions })` sets: the permission keys the work
9
+ * may use. `better_supabase.cap_allows` refuses every other key, and a job
10
+ * queued under a cap keeps it.
11
+ */
12
+ declare const PERMISSION_CAP_CLAIM = "bsb_permission_cap";
13
+ //#endregion
14
+ export { PERMISSION_CAP_CLAIM as n, AuthorizationDetail as t };
@@ -9,6 +9,11 @@ import { n as impersonatorClaim, t as actClaim } from "./impersonation-DM3oWNoD.
9
9
  */
10
10
  const PERMISSION_CAP_CLAIM = "bsb_permission_cap";
11
11
  /**
12
+ * The permission cap claim's 0.14 name. Through 0.15 the access functions and
13
+ * `permissionCapOf` read it when `bsb_permission_cap` is missing.
14
+ */
15
+ const LEGACY_PERMISSION_CAP_CLAIM = "bs_permission_cap";
16
+ /**
12
17
  * The claims a delegated token adds; `contextClaims` never takes them from
13
18
  * `claimsFor`.
14
19
  */
@@ -17,7 +22,8 @@ const DELEGATION_CLAIMS = [
17
22
  "client_id",
18
23
  "scope",
19
24
  "authorization_details",
20
- PERMISSION_CAP_CLAIM
25
+ PERMISSION_CAP_CLAIM,
26
+ LEGACY_PERMISSION_CAP_CLAIM
21
27
  ];
22
28
  /**
23
29
  * `*` grants every key and `prefix.*` every key under prefix, as
@@ -27,11 +33,12 @@ function permissionMatches(granted, wanted) {
27
33
  return granted === "*" || granted === wanted || granted.endsWith(".*") && wanted.startsWith(granted.slice(0, -1));
28
34
  }
29
35
  /**
30
- * The permission cap in `claims`: `undefined` without one, `false` for a cap
31
- * that is not a list of strings.
36
+ * The permission cap in `claims`, from `bsb_permission_cap` or else its 0.14
37
+ * name: `undefined` without one, `false` for a cap that is not a list of
38
+ * strings.
32
39
  */
33
40
  function permissionCapOf(claims) {
34
- const cap = claims[PERMISSION_CAP_CLAIM];
41
+ const cap = claims["bsb_permission_cap"] ?? claims["bs_permission_cap"];
35
42
  if (cap === void 0) return;
36
43
  return Array.isArray(cap) && cap.every((key) => typeof key === "string") ? cap : false;
37
44
  }
@@ -143,4 +150,4 @@ function contextClaims(context, options = {}) {
143
150
  };
144
151
  }
145
152
  //#endregion
146
- export { narrowCap as a, delegatedClaims as i, PERMISSION_CAP_CLAIM as n, permissionCapOf as o, contextClaims as r, DELEGATION_CLAIMS as t };
153
+ export { delegatedClaims as a, contextClaims as i, LEGACY_PERMISSION_CAP_CLAIM as n, narrowCap as o, PERMISSION_CAP_CLAIM as r, permissionCapOf as s, DELEGATION_CLAIMS as t };
@@ -2,17 +2,17 @@ import { f as Result } from "../result-DZeA5KS6.js";
2
2
  import { t as StandardSchemaV1 } from "../standard-DBV730sF.js";
3
3
  import { O as AnyFunctions, k as AnyModels } from "../types-DFdg_4yN.js";
4
4
  import { l as PermissionRef, t as AnyAuthorizer } from "../authorizer-B6X09otb.js";
5
- import { t as BetterSupabase } from "../define-DFBnQyYg.js";
6
- import { a as ServerContext, c as ServerOptions, n as BetterServer } from "../server-types-CFtehAsr.js";
5
+ import { t as BetterSupabase } from "../define-C5AcEkEJ.js";
6
+ import { a as ServerContext, c as ServerOptions, n as BetterServer } from "../server-types-CK8mUIUT.js";
7
7
  import { t as AuthSession } from "../view-DyFdMCqg.js";
8
8
  import { i as MiddlewareOptions, r as GuardOptions } from "../respond-Dn1_YhC1.js";
9
9
  import { c as ResourceLoaderContext, s as BlockRequireOptions } from "../kit-DOwKpSkA.js";
10
10
  import { n as FunctionContract, t as DescribedFunction } from "../function-contract-DxFNOmsm.js";
11
11
  import { t as Validated } from "../shared-CRRfQAKG.js";
12
12
  import { n as SUPABASE_CORS_HEADERS, r as corsConfig, t as CorsOptions } from "../cors-kLq6VM06.js";
13
- import { i as ResourceContext, l as ResourceRouteOptions, o as ResourceHooks, r as ResourceAction, t as ActionArgs } from "../resource-types-DnKiH4G2.js";
14
- import { t as ResourceMap } from "../resources-B9cQxhjw.js";
15
- import { t as defineAction } from "../resource-execute-CzHuDsil.js";
13
+ import { i as ResourceContext, l as ResourceRouteOptions, o as ResourceHooks, r as ResourceAction, t as ActionArgs } from "../resource-types-pMeLs68X.js";
14
+ import { t as ResourceMap } from "../resources-7iq2-5_A.js";
15
+ import { t as defineAction } from "../resource-execute-Cpnob1Vj.js";
16
16
  import { AnyEntry, Contributions } from "@supabase/middleware";
17
17
  //#region src/bridges/edge.d.ts
18
18
  /** The platform context Workers pass as the third `fetch` argument. */
@@ -2,15 +2,15 @@ import { n as dbError } from "../errors-BVFgt8BZ.js";
2
2
  import { a as ok, r as err } from "../result-ntFBW2p2.js";
3
3
  import { n as validate } from "../standard-BA3mLh6w.js";
4
4
  import { o as problemResponse } from "../problem-Bf0cJ7tk.js";
5
- import { a as unexpectedResponse, c as extendServer, o as withFlush, s as createServer } from "../adapter-B0b6MXYS.js";
5
+ import { a as unexpectedResponse, c as extendServer, o as withFlush, s as createServer } from "../adapter-Dyks1lX1.js";
6
6
  import { a as respond, o as settle, t as defaultExpose } from "../respond-C3CcOZlA.js";
7
- import { t as withBetterSupabase } from "../composite-BARuBEDE.js";
7
+ import { t as withBetterSupabase } from "../composite-B3TIjId4.js";
8
8
  import { i as defineAction } from "../resource-DV2GC2dB.js";
9
9
  import { i as requireCaller } from "../kit-5l-o8RxL.js";
10
10
  import { t as withExtra } from "../extra-CGQ2_q3S.js";
11
11
  import { n as resourceRouter } from "../resources-C02l_YBJ.js";
12
12
  import { n as corsConfig, t as SUPABASE_CORS_HEADERS } from "../cors-h_v7TPxl.js";
13
- import { t as EVERY_CALLER } from "../framework-DDdkR7FX.js";
13
+ import { t as EVERY_CALLER } from "../framework-BozTXRzt.js";
14
14
  import { t as FUNCTION_DESCRIPTOR } from "../function-contract-pEmsaUIf.js";
15
15
  import { bufferRequest, pipeline, seedContext } from "@supabase/middleware";
16
16
  import { withCors } from "@supabase/middleware/cors";
@@ -1,4 +1,4 @@
1
- import { d as KnowledgeSearchOptions, n as Embedder, o as KnowledgeHit, r as Knowledge } from "./knowledge-CtL-Vfgy.js";
1
+ import { d as KnowledgeSearchOptions, n as Embedder, o as KnowledgeHit, r as Knowledge } from "./knowledge-F1IhRI4Q.js";
2
2
  import { EmbeddingModel, RerankingModel, SourceDocumentUIPart, Tool, embedMany } from "ai";
3
3
  //#region src/ai-sdk/embeddings/embeddings.d.ts
4
4
  type ProviderOptions = Parameters<typeof embedMany>[0]["providerOptions"];
@@ -1,4 +1,4 @@
1
- import { t as AuthSnapshot } from "./bind-CrMBwrPN.js";
1
+ import { t as AuthSnapshot } from "./bind-JGCPGUJh.js";
2
2
  import { t as AuthSession } from "./view-DyFdMCqg.js";
3
3
  //#region src/auth/entitlements.d.ts
4
4
  /**
@@ -3,7 +3,7 @@ import { n as isRecord } from "./guards-6F2bCtQR.js";
3
3
  import { a as ok, r as err } from "./result-ntFBW2p2.js";
4
4
  import { o as tenantFrom, s as tenantPathsFor } from "./claims-Bp9My7XP.js";
5
5
  import { n as impersonatorClaim, r as impersonatorOf } from "./impersonation-DM3oWNoD.js";
6
- import { i as delegatedClaims, n as PERMISSION_CAP_CLAIM, o as permissionCapOf, t as DELEGATION_CLAIMS } from "./delegation--93jRsVO.js";
6
+ import { a as delegatedClaims, r as PERMISSION_CAP_CLAIM, s as permissionCapOf, t as DELEGATION_CLAIMS } from "./delegation-DGOIiT8k.js";
7
7
  //#region src/blocks/queue/envelope.ts
8
8
  /** Marks a payload that carries a job context; pgmq stores it as the payload. */
9
9
  const ENVELOPE = "$bs";
@@ -1,8 +1,8 @@
1
1
  import { a as ResolveAuthOptions, r as AuthState } from "../resolve-CXX6DHv3.js";
2
2
  import { i as CredentialRef, r as CredentialProvider } from "../provider-CqwEOLCA.js";
3
- import { i as AiChat } from "../ai-chat-D1GuRnke.js";
3
+ import { i as AiChat } from "../ai-chat-BCaKsvLW.js";
4
4
  import { a as Inbox } from "../inbox-NDKwSk_H.js";
5
- import { a as EveMemoryToolsContext, c as MemoryDocumentConflictError, d as supabaseDocumentBackend, f as supabaseMemory, i as EveMemoryTool, l as SupabaseDocumentBackendOptions, m as EveSessionContext, n as EveMemoryContext, o as EveRecallMessage, p as EveSessionAuth, r as EveMemoryProvider, s as EveRecallResult, t as EveDocumentBackend, u as SupabaseMemoryOptions } from "../eve-BFSwTu1z.js";
5
+ import { a as EveMemoryToolsContext, c as MemoryDocumentConflictError, d as supabaseDocumentBackend, f as supabaseMemory, i as EveMemoryTool, l as SupabaseDocumentBackendOptions, m as EveSessionContext, n as EveMemoryContext, o as EveRecallMessage, p as EveSessionAuth, r as EveMemoryProvider, s as EveRecallResult, t as EveDocumentBackend, u as SupabaseMemoryOptions } from "../eve-B7jxYPCw.js";
6
6
  //#region src/eve/auth.d.ts
7
7
  /**
8
8
  * Thrown by `supabaseAuth` so eve answers with `response` instead of
@@ -1,5 +1,5 @@
1
- import { d as KnowledgeSearchOptions, r as Knowledge } from "./knowledge-CtL-Vfgy.js";
2
- import { t as Memory } from "./types-CAQBmpDx.js";
1
+ import { d as KnowledgeSearchOptions, r as Knowledge } from "./knowledge-F1IhRI4Q.js";
2
+ import { t as Memory } from "./types-A4yyKEsg.js";
3
3
  //#region src/eve/types.d.ts
4
4
  /**
5
5
  * Eve's `SessionAuthContext`, typed structurally so this entry never imports
@@ -1,7 +1,7 @@
1
1
  import { E as RawDbError, b as DbError, f as Result } from "./result-DZeA5KS6.js";
2
2
  import { Bt as Executor, O as AnyFunctions, dt as TableMeta, k as AnyModels, m as Operation, ut as TableKey } from "./types-DFdg_4yN.js";
3
- import { pt as QuerySpec, t as BetterSupabase } from "./define-DFBnQyYg.js";
4
- import { i as ListDefinition } from "./list-query-BDVutLFr.js";
3
+ import { pt as QuerySpec, t as BetterSupabase } from "./define-C5AcEkEJ.js";
4
+ import { i as ListDefinition } from "./list-query-DYhgRTd5.js";
5
5
  import { t as Compiler } from "./compiler-D3UmE7ao.js";
6
6
  //#region src/compile/sqlite.d.ts
7
7
  /** A value SQLite binds: booleans become `0`/`1`, objects JSON text. */
@@ -1,4 +1,4 @@
1
- import { L as WorkflowGraph } from "./types-BBQLbui9.js";
1
+ import { L as WorkflowGraph } from "./types-DsRfiQ0v.js";
2
2
  //#region src/blocks/workflow-editor/executor.d.ts
3
3
  /** The record a run belongs to. */
4
4
  interface GraphSubject {
@@ -1,6 +1,6 @@
1
1
  import { O as AnyFunctions, k as AnyModels } from "../types-DFdg_4yN.js";
2
- import { t as BetterSupabase } from "../define-DFBnQyYg.js";
3
- import { a as ServerContext, c as ServerOptions, n as BetterServer, r as ContextOptions } from "../server-types-CFtehAsr.js";
2
+ import { t as BetterSupabase } from "../define-C5AcEkEJ.js";
3
+ import { a as ServerContext, c as ServerOptions, n as BetterServer, r as ContextOptions } from "../server-types-CK8mUIUT.js";
4
4
  import { i as MiddlewareOptions, r as GuardOptions } from "../respond-Dn1_YhC1.js";
5
5
  import { t as Validated } from "../shared-CRRfQAKG.js";
6
6
  import { AnyEntry, Contributions } from "@supabase/middleware";
@@ -1,9 +1,9 @@
1
1
  import { t as DbException } from "../db-exception-Lngc1W49.js";
2
2
  import { c as toProblem } from "../problem-Bf0cJ7tk.js";
3
- import { a as unexpectedResponse, b as isPrefetch, c as extendServer, s as createServer, x as refreshFor } from "../adapter-B0b6MXYS.js";
3
+ import { a as unexpectedResponse, b as isPrefetch, c as extendServer, s as createServer, x as refreshFor } from "../adapter-Dyks1lX1.js";
4
4
  import { h as serializeCookie } from "../resolve-B0mW2m7f.js";
5
5
  import { a as respond, r as guard, t as defaultExpose } from "../respond-C3CcOZlA.js";
6
- import { t as withBetterSupabase } from "../composite-BARuBEDE.js";
6
+ import { t as withBetterSupabase } from "../composite-B3TIjId4.js";
7
7
  import { r as handoffOf } from "../shared-Bf-I13Ht.js";
8
8
  import { bufferRequest, pipeline, seedContext } from "@supabase/middleware";
9
9
  import { StatusError, setResponseHeaders } from "expo-server";
@@ -1,14 +1,14 @@
1
1
  import { b as DbError, f as Result } from "./result-DZeA5KS6.js";
2
2
  import { o as EventHub } from "./events-vcqenSYU.js";
3
3
  import { o as BlockTenant } from "./block-helpers-CRpAHrp_.js";
4
- import { pt as QuerySpec } from "./define-DFBnQyYg.js";
5
- import { $ as TemplateValues } from "./bucket-CiNi8sIw.js";
4
+ import { pt as QuerySpec } from "./define-C5AcEkEJ.js";
5
+ import { tt as TemplateValues } from "./bucket-vc-QRrva.js";
6
6
  import { n as DataEngine } from "./data-engine-BWoz9lED.js";
7
- import { Dn as GeneratedBlocks } from "./define-block-BVcLQ3DF.js";
8
- import { _ as TopicMessage, c as RealtimeClient, d as SubscribeOptions, i as PresenceOptions, s as PresenceSubscription } from "./topic-CJrQZQaa.js";
9
- import { t as ClientPorts } from "./ports-sx226JUL.js";
10
- import { a as ClientAuth } from "./bind-CrMBwrPN.js";
11
- import { a as LiveSource, r as LiveCountSeed } from "./index-B938YqY-.js";
7
+ import { Dn as GeneratedBlocks } from "./define-block-C1RHXz7L.js";
8
+ import { _ as TopicMessage, c as RealtimeClient, d as SubscribeOptions, i as PresenceOptions, s as PresenceSubscription } from "./topic-CZXHhZye.js";
9
+ import { t as ClientPorts } from "./ports-mObLgH1z.js";
10
+ import { a as ClientAuth } from "./bind-JGCPGUJh.js";
11
+ import { a as LiveSource, r as LiveCountSeed } from "./index-CTu-3fJB.js";
12
12
  import { SupabaseClient } from "@supabase/supabase-js";
13
13
  import { QueryClient } from "@tanstack/query-core";
14
14
  import { StandardSchemaV1 } from "@standard-schema/spec";
@@ -50,11 +50,11 @@ interface UseActionOptions<I, T> {
50
50
  }
51
51
  interface BroadcastOptions extends Omit<SubscribeOptions, "onStatus"> {
52
52
  /**
53
- * A supabase-js client to subscribe with, for apps without the provider. It
54
- * resubscribes when the client's user changes. Defaults to the provider's
55
- * client.
53
+ * A supabase-js client to subscribe with, for apps without the provider, or a
54
+ * `relayRealtimeClient(url)`. It resubscribes when the client's user changes.
55
+ * Defaults to the provider's `realtime`, then its client.
56
56
  */
57
- readonly client?: SupabaseClient;
57
+ readonly client?: RealtimeClient;
58
58
  /** The query client `invalidate` refetches with. Defaults to the provider's. */
59
59
  readonly queryClient?: QueryClient;
60
60
  /**
@@ -84,7 +84,7 @@ interface PresenceHookOptions<I> {
84
84
  */
85
85
  readonly state?: I | null;
86
86
  /** A supabase-js client for apps without the provider. */
87
- readonly client?: SupabaseClient;
87
+ readonly client?: RealtimeClient;
88
88
  }
89
89
  /** The parts of a `defineTopic(..., { presence })` topic the bindings use. */
90
90
  interface PresenceTopic<P extends string, I, O> {
@@ -1,8 +1,8 @@
1
1
  import { O as AnyFunctions, k as AnyModels } from "./types-DFdg_4yN.js";
2
- import { c as ServerOptions, et as SessionSnapshot } from "./server-types-CFtehAsr.js";
2
+ import { O as SessionSnapshot, c as ServerOptions } from "./server-types-CK8mUIUT.js";
3
3
  import { t as AuthSession } from "./view-DyFdMCqg.js";
4
- import { n as SessionEntryConfig } from "./session-CH0SKgIz.js";
5
- import { n as BetterSupabaseContributions } from "./composite-Dsxj7T5K.js";
4
+ import { n as SessionEntryConfig } from "./session-DWmFv3vB.js";
5
+ import { n as BetterSupabaseContributions } from "./composite-CfYyU3vs.js";
6
6
  import { c as ResourceLoaderContext } from "./kit-DOwKpSkA.js";
7
7
  import { t as RefusalRedirects } from "./refusal-CSntB_x8.js";
8
8
  //#region src/server/framework.d.ts
@@ -1,5 +1,5 @@
1
1
  import { l as snapshotOf, n as toSession } from "./view-C8Ve14ja.js";
2
- import { t as withBetterSupabase } from "./composite-BARuBEDE.js";
2
+ import { t as withBetterSupabase } from "./composite-B3TIjId4.js";
3
3
  //#region src/server/framework.ts
4
4
  /**
5
5
  * Every caller: the framework factories guard per loader, action or route
@@ -1,8 +1,8 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { b as DbError } from "./result-DZeA5KS6.js";
3
- import { g as JobHandler } from "./types-SFRomQF7.js";
4
- import { g as AiModelInput, i as AiChat } from "./ai-chat-D1GuRnke.js";
5
- import { a as Usage, c as UsageEntry, h as UsageStatus } from "./usage-D7QkrwzV.js";
3
+ import { g as JobHandler } from "./types-Czq9Xtpa.js";
4
+ import { g as AiModelInput, i as AiChat } from "./ai-chat-BCaKsvLW.js";
5
+ import { a as Usage, c as UsageEntry, h as UsageStatus } from "./usage-Dp45V42p.js";
6
6
  import { LanguageModelUsage } from "ai";
7
7
  //#region src/ai-sdk/gateway.d.ts
8
8
  /** Token counts and the gateway's cost of one generation. */
@@ -1,14 +1,14 @@
1
1
  import { O as AnyFunctions, k as AnyModels, ut as TableKey } from "../types-DFdg_4yN.js";
2
2
  import { r as AuthState } from "../resolve-CXX6DHv3.js";
3
3
  import { l as PermissionRef, t as AnyAuthorizer } from "../authorizer-B6X09otb.js";
4
- import { t as BetterSupabase } from "../define-DFBnQyYg.js";
5
- import { a as ServerContext, c as ServerOptions, et as SessionSnapshot, l as SharedServer, n as BetterServer } from "../server-types-CFtehAsr.js";
4
+ import { t as BetterSupabase } from "../define-C5AcEkEJ.js";
5
+ import { O as SessionSnapshot, a as ServerContext, c as ServerOptions, l as SharedServer, n as BetterServer } from "../server-types-CK8mUIUT.js";
6
6
  import { t as AuthSession } from "../view-DyFdMCqg.js";
7
7
  import { i as MiddlewareOptions, r as GuardOptions } from "../respond-Dn1_YhC1.js";
8
8
  import { c as ResourceLoaderContext, s as BlockRequireOptions } from "../kit-DOwKpSkA.js";
9
9
  import { t as CorsOptions } from "../cors-kLq6VM06.js";
10
- import { i as ResourceContext, l as ResourceRouteOptions, o as ResourceHooks, r as ResourceAction, t as ActionArgs } from "../resource-types-DnKiH4G2.js";
11
- import { t as defineAction } from "../resource-execute-CzHuDsil.js";
10
+ import { i as ResourceContext, l as ResourceRouteOptions, o as ResourceHooks, r as ResourceAction, t as ActionArgs } from "../resource-types-pMeLs68X.js";
11
+ import { t as defineAction } from "../resource-execute-Cpnob1Vj.js";
12
12
  import { i as RouteRateLimitRule, n as RateLimitVerdict, r as RateLimiter, t as RateLimitRouteOptions } from "../rate-limit-Bztf32cl.js";
13
13
  import { AnyEntry, Contributions, ValidateEntries } from "@supabase/middleware";
14
14
  import { Context, ErrorHandler, Hono, MiddlewareHandler } from "hono";