better-supabase 0.21.0 → 0.23.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 (306) hide show
  1. package/dist/{access-sql-CNIgUqWf.js → access-sql-bjWFUWlk.js} +11 -0
  2. package/dist/{adapter-DZJZTY6g.js → adapter-D4aNBxhm.js} +2 -2
  3. package/dist/ai-sdk/agents/index.d.ts +2 -2
  4. package/dist/api-3C0AWFeP.js +696 -0
  5. package/dist/{api-Cj4W_pqT.d.ts → api-CHObZL7m.d.ts} +1 -1
  6. package/dist/{app-tables-C5HjXs2k.d.ts → app-tables-CJO6pWwy.d.ts} +1 -1
  7. package/dist/astro/index.js +5 -5
  8. package/dist/{authorization-DhoA7dsD.d.ts → authorization-Dtwpjeuz.d.ts} +91 -13
  9. package/dist/{bind-CFsctoFJ.d.ts → bind-DaoTunvE.d.ts} +1 -1
  10. package/dist/{block-env-BrUNeuJ_.d.ts → block-env-DUyo2I5O.d.ts} +3 -3
  11. package/dist/blocks/access-requests/index.js +1 -1
  12. package/dist/blocks/activities/index.js +1 -1
  13. package/dist/blocks/agents/index.js +1 -1
  14. package/dist/blocks/ai-chat/index.d.ts +3 -3
  15. package/dist/blocks/ai-chat/index.js +1 -1
  16. package/dist/blocks/ai-keys/index.js +1 -1
  17. package/dist/blocks/announcements/index.d.ts +3 -3
  18. package/dist/blocks/announcements/index.js +1 -1
  19. package/dist/blocks/api-keys/index.d.ts +1 -1
  20. package/dist/blocks/api-keys/index.js +1 -1
  21. package/dist/blocks/approvals/index.js +1 -1
  22. package/dist/blocks/assets/index.js +1 -1
  23. package/dist/blocks/assignment/index.js +1 -1
  24. package/dist/blocks/attachments/index.d.ts +1 -1
  25. package/dist/blocks/attachments/index.js +1 -1
  26. package/dist/blocks/audit/index.d.ts +2 -2
  27. package/dist/blocks/audit/index.js +1 -1
  28. package/dist/blocks/automations/index.d.ts +1 -1
  29. package/dist/blocks/automations/index.js +1 -1
  30. package/dist/blocks/billable-time/index.js +1 -1
  31. package/dist/blocks/billing/index.d.ts +1 -1
  32. package/dist/blocks/billing/index.js +2 -2
  33. package/dist/blocks/bookings/index.d.ts +1 -1
  34. package/dist/blocks/bookings/index.js +1 -1
  35. package/dist/blocks/bulk/index.js +1 -1
  36. package/dist/blocks/calendar/index.d.ts +5 -1
  37. package/dist/blocks/calendar/index.js +7 -4
  38. package/dist/blocks/catalog/index.js +1 -1
  39. package/dist/blocks/channels/index.js +1 -1
  40. package/dist/blocks/collections/index.js +1 -1
  41. package/dist/blocks/comments/index.d.ts +4 -4
  42. package/dist/blocks/compliance/index.js +1 -1
  43. package/dist/blocks/connectors/index.js +1 -1
  44. package/dist/blocks/contacts/index.js +1 -1
  45. package/dist/blocks/content/index.js +1 -1
  46. package/dist/blocks/contracts/index.js +1 -1
  47. package/dist/blocks/courses/index.js +1 -1
  48. package/dist/blocks/custom-fields/index.d.ts +43 -1
  49. package/dist/blocks/custom-fields/index.js +41 -2
  50. package/dist/blocks/data-lifecycle/index.js +1 -1
  51. package/dist/blocks/deals/index.js +1 -1
  52. package/dist/blocks/dispatch/index.js +1 -1
  53. package/dist/blocks/documents/index.js +1 -1
  54. package/dist/blocks/domains/index.js +1 -1
  55. package/dist/blocks/donations/index.js +1 -1
  56. package/dist/blocks/drive/index.d.ts +1 -1
  57. package/dist/blocks/drive/index.js +1 -1
  58. package/dist/blocks/employees/index.d.ts +4 -0
  59. package/dist/blocks/employees/index.js +2 -2
  60. package/dist/blocks/enrichment/index.js +1 -1
  61. package/dist/blocks/enrollments/index.js +1 -1
  62. package/dist/blocks/entitlements/index.d.ts +2 -2
  63. package/dist/blocks/expenses/index.js +1 -1
  64. package/dist/blocks/flags/index.js +1 -1
  65. package/dist/blocks/forecasts/index.js +1 -1
  66. package/dist/blocks/forms/index.d.ts +1 -1
  67. package/dist/blocks/forms/index.js +1 -1
  68. package/dist/blocks/guests/index.js +1 -1
  69. package/dist/blocks/hiring/index.js +1 -1
  70. package/dist/blocks/imports/index.js +1 -1
  71. package/dist/blocks/inbox/index.d.ts +4 -4
  72. package/dist/blocks/inbox/index.js +1 -1
  73. package/dist/blocks/incidents/index.js +1 -1
  74. package/dist/blocks/index.d.ts +1 -1
  75. package/dist/blocks/index.js +2 -2
  76. package/dist/blocks/inventory/index.js +1 -1
  77. package/dist/blocks/invoices/index.js +1 -1
  78. package/dist/blocks/leases/index.js +1 -1
  79. package/dist/blocks/leave/index.js +1 -1
  80. package/dist/blocks/ledger/index.js +1 -1
  81. package/dist/blocks/mail-sync/index.js +1 -1
  82. package/dist/blocks/messaging/index.d.ts +4 -4
  83. package/dist/blocks/messaging/index.js +1 -1
  84. package/dist/blocks/metrics/index.js +1 -1
  85. package/dist/blocks/mfa/index.d.ts +1 -1
  86. package/dist/blocks/moderation/index.js +1 -1
  87. package/dist/blocks/notifications/index.d.ts +3 -3
  88. package/dist/blocks/notifications/index.js +3 -3
  89. package/dist/blocks/numbering/index.js +1 -1
  90. package/dist/blocks/oauth-server/index.js +1 -1
  91. package/dist/blocks/onboarding/index.d.ts +1 -1
  92. package/dist/blocks/orders/index.js +1 -1
  93. package/dist/blocks/organizations/index.d.ts +2 -2
  94. package/dist/blocks/organizations/index.js +1 -1
  95. package/dist/blocks/outbox/index.js +1 -1
  96. package/dist/blocks/passes/index.js +1 -1
  97. package/dist/blocks/permissions/index.d.ts +1 -1
  98. package/dist/blocks/pipelines/index.js +1 -1
  99. package/dist/blocks/posts/index.js +1 -1
  100. package/dist/blocks/promotions/index.js +1 -1
  101. package/dist/blocks/push/index.d.ts +1 -1
  102. package/dist/blocks/push/index.js +1 -1
  103. package/dist/blocks/quotes/index.js +1 -1
  104. package/dist/blocks/reactions/index.d.ts +3 -3
  105. package/dist/blocks/reactions/index.js +1 -1
  106. package/dist/blocks/relations/index.js +1 -1
  107. package/dist/blocks/reminders/index.js +1 -1
  108. package/dist/blocks/reviews/index.js +1 -1
  109. package/dist/blocks/saved-views/index.d.ts +1 -1
  110. package/dist/blocks/saved-views/index.js +1 -1
  111. package/dist/blocks/scores/index.js +1 -1
  112. package/dist/blocks/search/index.d.ts +4 -2
  113. package/dist/blocks/search/index.js +3 -1
  114. package/dist/blocks/security-events/index.js +1 -1
  115. package/dist/blocks/segments/index.js +1 -1
  116. package/dist/blocks/sequences/index.js +1 -1
  117. package/dist/blocks/service-accounts/index.js +1 -1
  118. package/dist/blocks/sessions/index.d.ts +1 -1
  119. package/dist/blocks/settings/index.d.ts +1 -1
  120. package/dist/blocks/settings/index.js +1 -1
  121. package/dist/blocks/share-links/index.d.ts +28 -3
  122. package/dist/blocks/share-links/index.js +59 -23
  123. package/dist/blocks/shipments/index.js +1 -1
  124. package/dist/blocks/signatures/index.js +1 -1
  125. package/dist/blocks/signing-keys/index.js +1 -1
  126. package/dist/blocks/sla/index.js +1 -1
  127. package/dist/blocks/sso/index.js +1 -1
  128. package/dist/blocks/state-machine/index.js +1 -1
  129. package/dist/blocks/subjects/index.d.ts +1 -1
  130. package/dist/blocks/tags/index.d.ts +18 -3
  131. package/dist/blocks/tags/index.js +16 -3
  132. package/dist/blocks/tasks/index.js +2 -2
  133. package/dist/blocks/teams/index.d.ts +26 -4
  134. package/dist/blocks/teams/index.js +11 -4
  135. package/dist/blocks/templates/index.js +1 -1
  136. package/dist/blocks/time-tracking/index.d.ts +18 -0
  137. package/dist/blocks/time-tracking/index.js +13 -4
  138. package/dist/blocks/timeline/index.js +1 -1
  139. package/dist/blocks/trash/index.js +1 -1
  140. package/dist/blocks/undo/index.d.ts +1 -1
  141. package/dist/blocks/usage/index.d.ts +1 -1
  142. package/dist/blocks/vercel-marketplace/index.js +1 -1
  143. package/dist/blocks/versions/index.js +1 -1
  144. package/dist/blocks/waitlist/index.js +1 -1
  145. package/dist/blocks/webhooks/index.js +4 -4
  146. package/dist/blocks/workflow-editor/index.d.ts +3 -3
  147. package/dist/blocks/workflow-editor/index.js +1 -1
  148. package/dist/blocks/workflows/index.d.ts +3 -3
  149. package/dist/blocks/workflows/index.js +1 -1
  150. package/dist/cli/{add-BTDPjVGC.js → add-C7lKQNBL.js} +11 -11
  151. package/dist/cli/{add-C0w-mVTQ.js → add-DVHniZOO.js} +2 -2
  152. package/dist/cli/add-vZRn-uH0.js +1 -0
  153. package/dist/cli/{backfill-BDdBs6Ne.js → backfill-Lrn-Qp5X.js} +3 -3
  154. package/dist/cli/bin.js +1 -1
  155. package/dist/cli/{blocks-Bs-lA-U_.js → blocks-2Yw9t-_U.js} +1 -1
  156. package/dist/cli/{blocks-CQLME-HQ.js → blocks-BKNd886C.js} +1 -1
  157. package/dist/cli/{cache-DDKao2Va.js → cache-ByhPVMo-.js} +1 -1
  158. package/dist/cli/{codemod-Bjl998Do.js → codemod-C0eXpzFu.js} +1 -1
  159. package/dist/cli/{config-BH0goim0.js → config-BVfeG3A5.js} +37 -5
  160. package/dist/cli/{config-CTRzkX0H.js → config-CeaQMrvS.js} +1 -1
  161. package/dist/cli/{content-mapper-DgSTl-DL.js → content-mapper-qH-_YQ8H.js} +2 -2
  162. package/dist/cli/{db-DCeyHS1y.js → db-DwjyUbAh.js} +2 -2
  163. package/dist/cli/{doctor-CMLWbt44.js → doctor-BnxkqXGA.js} +21 -19
  164. package/dist/cli/{gen-D3VX8WdV.js → gen-aERmP3Sw.js} +14 -14
  165. package/dist/cli/index.d.ts +1 -1
  166. package/dist/cli/index.js +7 -7
  167. package/dist/cli/{init-D6D6eWze.js → init-DWUqVSVW.js} +6 -6
  168. package/dist/cli/{live-C_xgTOfD.js → live-KcdTBUij.js} +2 -2
  169. package/dist/cli/{mcp-B0Irjbes.js → mcp-Dsjjo-LT.js} +2 -2
  170. package/dist/cli/{metadata-cLXra-XB.js → metadata-DWQSIZ59.js} +3 -3
  171. package/dist/cli/{migration-safety-OUK-Afbb.js → migration-safety-Cy7xlU4G.js} +2 -2
  172. package/dist/cli/{migrations-CHenMvl_.js → migrations-CUjNXokR.js} +1 -1
  173. package/dist/cli/{module-migration-6V7vXWUK.js → module-migration-C6NLY9iZ.js} +2 -2
  174. package/dist/cli/powersync-BOhjVQCb.js +1 -0
  175. package/dist/cli/{powersync-D83yAFbl.js → powersync-CE_hQdgc.js} +2 -2
  176. package/dist/cli/{print-C0OmQyTu.js → print-Cy_ram9N.js} +2 -2
  177. package/dist/cli/{remove-BWlOngNT.js → remove-DmwjzqaW.js} +5 -5
  178. package/dist/cli/{render-9m70qveo.js → render-CF09FCra.js} +7 -4
  179. package/dist/cli/{run-He3M-ZRq.js → run-BYpZ8FjF.js} +25 -25
  180. package/dist/cli/{run-gE4eAazR.js → run-lh-chAJW.js} +8 -8
  181. package/dist/cli/{seed-CdSxunFT.js → seed-BMynpMPy.js} +2 -2
  182. package/dist/cli/seed-CO3j_bly.js +1 -0
  183. package/dist/cli/{shared-Cx2WFVWq.js → shared-D05A6t1e.js} +1 -1
  184. package/dist/cli/{snapshot-CZb3uVKE.js → snapshot-BITNbA5V.js} +3 -3
  185. package/dist/cli/{source-CrYSCdPZ.js → source-GGJHuzpH.js} +1 -1
  186. package/dist/cli/{source-args-z-jkabmO.js → source-args-CDmmFmFG.js} +1 -1
  187. package/dist/cli/{spec-Cn5RhuQc.js → spec-BGcRdlhN.js} +2 -2
  188. package/dist/cli/{spec-D4b9ePuQ.js → spec-BjxXWaNQ.js} +1 -1
  189. package/dist/cli/{sql-layout-CLJ67h3L.js → sql-layout-BoD5ynN9.js} +2 -2
  190. package/dist/cli/{sync-B8VGiaHk.js → sync-_QlsTmqu.js} +3 -3
  191. package/dist/cli/{upgrade-BvBWK3Fo.js → upgrade-Cwhb1M7O.js} +4 -4
  192. package/dist/cli/{upgrade-DMiYx1C8.js → upgrade-n9ar1kc4.js} +2 -2
  193. package/dist/cli/{version-BVg2Z6yv.js → version-RSpJIWDd.js} +1 -1
  194. package/dist/client/index.d.ts +5 -5
  195. package/dist/client/native/index.d.ts +4 -4
  196. package/dist/{composite-Dw5ofSF_.js → composite-CBRbvn5j.js} +2 -2
  197. package/dist/config/index.d.ts +4 -4
  198. package/dist/config/index.js +4 -4
  199. package/dist/{config-BOt5T6Vs.js → config-RwpFcPq8.js} +3 -3
  200. package/dist/{config-CD2OGfCG.js → config-vHLJ8SKf.js} +1 -1
  201. package/dist/{context-sgrUjA3U.d.ts → context-CMf4OKpN.d.ts} +72 -16
  202. package/dist/{controller-B6vWdKSa.d.ts → controller-BGto_kYM.d.ts} +1 -1
  203. package/dist/create/index.d.ts +72 -451
  204. package/dist/create/index.js +15 -1687
  205. package/dist/create/lite/index.d.ts +250 -13
  206. package/dist/create/lite/index.js +1007 -24
  207. package/dist/credentials/index.js +1 -1
  208. package/dist/edge/index.js +7 -7
  209. package/dist/elysia/index.js +1 -1
  210. package/dist/{entitlements-BPaPd3MD.d.ts → entitlements-CIhVQ-0u.d.ts} +1 -1
  211. package/dist/events/index.js +1 -1
  212. package/dist/expo/index.js +3 -3
  213. package/dist/{field-errors-DBgDCITw.d.ts → field-errors-BDhPaO0a.d.ts} +4 -4
  214. package/dist/{framework-DXM1vNcV.js → framework-DYEUraqt.js} +1 -1
  215. package/dist/h3/index.js +1 -1
  216. package/dist/h3/v1/index.js +1 -1
  217. package/dist/hono/index.js +6 -6
  218. package/dist/{index-ByF22_C6.d.ts → index--OhYKouV.d.ts} +2 -2
  219. package/dist/{index-Bt7_mxn0.d.ts → index-4MStWaeF.d.ts} +185 -7
  220. package/dist/{index-5JSxY1MG.d.ts → index-CFWlHuVY.d.ts} +77 -2
  221. package/dist/{index-CdMZQCYR.d.ts → index-lV43eM34.d.ts} +2 -2
  222. package/dist/{index-C4sjewrr.d.ts → index-ujNqgZ6B.d.ts} +6 -6
  223. package/dist/{app-tables-DyswUg6J.js → instances-BPJSESPx.js} +176 -11
  224. package/dist/{kit-DhlB-vv_.js → kit-Bcd9wYCV.js} +1 -1
  225. package/dist/mapper/bin.js +6 -6
  226. package/dist/mcp/index.d.ts +1 -1
  227. package/dist/mcp/index.js +6 -6
  228. package/dist/mcp/sdk/index.js +2 -2
  229. package/dist/nestjs/index.js +1 -1
  230. package/dist/next/index.d.ts +3 -3
  231. package/dist/next/index.js +7 -7
  232. package/dist/node/index.js +1 -1
  233. package/dist/{operations-DC3wU3Sy.d.ts → operations-qSBBV5vl.d.ts} +1 -1
  234. package/dist/{options-fMxhtuVR.js → options-BJtdsK7b.js} +4 -1
  235. package/dist/{options-DhdazgTZ.js → options-BPp2zzsz.js} +3 -1
  236. package/dist/options-BSsYXjhC.js +9 -0
  237. package/dist/{options-ChiL-4ZS.js → options-D4ADKTKo.js} +3 -1
  238. package/dist/{options-C1-pwEqm.js → options-DztCKw_f.js} +4 -1
  239. package/dist/{options-BfFC4iFE.js → options-jsOCvLUz.js} +3 -1
  240. package/dist/orpc/index.d.ts +1 -1
  241. package/dist/orpc/index.js +5 -5
  242. package/dist/otel/index.js +4 -4
  243. package/dist/{ports-BbBJVyS0.d.ts → ports-DbHiNSAa.d.ts} +1 -1
  244. package/dist/powersync/index.d.ts +2 -2
  245. package/dist/preset/index.d.ts +4 -4
  246. package/dist/preset/index.js +4 -4
  247. package/dist/{preset-B3CukUhu.js → preset-B1xXOJ0T.js} +179 -7
  248. package/dist/project-BM6QMtzV.js +1760 -0
  249. package/dist/{push-token-CPJfPFa2.d.ts → push-token-BwF1fyjA.d.ts} +1 -1
  250. package/dist/react/index.d.ts +5 -5
  251. package/dist/react/index.js +2 -2
  252. package/dist/react/native/index.d.ts +1 -1
  253. package/dist/react/server.d.ts +5 -5
  254. package/dist/react/server.js +2 -2
  255. package/dist/{react-_D_CeZMk.js → react-CcrQQl0_.js} +2 -2
  256. package/dist/react-router/index.js +5 -5
  257. package/dist/realtime/index.d.ts +3 -3
  258. package/dist/realtime/index.js +1 -1
  259. package/dist/records/index.d.ts +3 -3
  260. package/dist/{refusal-D48CMqpQ.js → refusal-DDlInPff.js} +2 -2
  261. package/dist/{instances-DDt7NdVl.js → resolved-names-WzRYhUez.js} +2 -146
  262. package/dist/{resource-R3KToNze.js → resource-BUJcZKiW.js} +2 -2
  263. package/dist/{resources-DqIwoQsP.js → resources-jb3R6rEa.js} +1 -1
  264. package/dist/server/index.d.ts +1 -1
  265. package/dist/server/index.js +7 -7
  266. package/dist/{sign-in-1FJiXXyG.js → sign-in-NO7LWlw4.js} +2 -2
  267. package/dist/solid/index.d.ts +5 -5
  268. package/dist/solid/index.js +1 -1
  269. package/dist/solid-start/index.js +5 -5
  270. package/dist/spec/index.d.ts +2 -2
  271. package/dist/spec/index.js +2 -693
  272. package/dist/sql/index.d.ts +5 -5
  273. package/dist/sql/index.js +5 -5
  274. package/dist/{sql-BjjgwJKg.js → sql-CNH8kjLS.js} +2727 -955
  275. package/dist/ssr/index.d.ts +1 -1
  276. package/dist/storage/index.js +1 -1
  277. package/dist/subjects-NomQg6Eg.d.ts +131 -0
  278. package/dist/svelte/index.d.ts +5 -5
  279. package/dist/svelte/index.js +1 -1
  280. package/dist/sveltekit/index.js +5 -5
  281. package/dist/tanstack-start/index.js +5 -5
  282. package/dist/{tenant-BHvMFNXl.d.ts → tenant-D4BA7XQ-.d.ts} +1 -1
  283. package/dist/testing/index.d.ts +4 -4
  284. package/dist/testing/index.js +5 -5
  285. package/dist/{topic-J9I3yu6f.js → topic-F0FKzJyQ.js} +2 -2
  286. package/dist/{topic-gTVjLGTk.d.ts → topic-utZqhw96.d.ts} +1 -1
  287. package/dist/types-DLnBJ3ST.d.ts +461 -0
  288. package/dist/vue/index.d.ts +5 -5
  289. package/dist/vue/index.js +1 -1
  290. package/dist/{watch-topic-C6HhbnVz.d.ts → watch-topic-B1UCoQfz.d.ts} +1 -1
  291. package/dist/workflow-sdk/world/index.js +1 -1
  292. package/dist/{workflow-sdk-DELaQEp3.js → workflow-sdk-CE8sEK57.js} +38 -1
  293. package/dist/yjs/index.d.ts +1 -1
  294. package/dist/yjs/index.js +1 -1
  295. package/package.json +1 -1
  296. package/schemas/config-v1.json +166 -2
  297. package/dist/cli/add-CspY9jKT.js +0 -1
  298. package/dist/cli/powersync-DwhCH0gs.js +0 -1
  299. package/dist/cli/seed-CXJvTU5D.js +0 -1
  300. package/dist/options-CTv-xmbA.js +0 -5
  301. package/dist/subjects-DvmQeF_F.d.ts +0 -79
  302. package/dist/types-DGHfTW8_.d.ts +0 -9
  303. package/dist/{build-CM8PJqwW.js → build-CH2N3Yf0.js} +3 -3
  304. package/dist/{create-blocks-CUS28FfS.js → create-blocks-BfrDUSM6.js} +1 -1
  305. package/dist/{data-hooks-tgF1Ct0F.js → data-hooks-CdcZfVS1.js} +1 -1
  306. package/dist/{respond-3RKp6VgU.js → respond-CZMWbUs3.js} +1 -1
@@ -1,9 +1,9 @@
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
- import { D as OwnTablePolicies, E as NamedInstance, I as TablesOf, L as BlockNameRegistry, O as ResolvedBlock, 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-DhoA7dsD.js";
3
+ import { D as OwnTablePolicies, E as NamedInstance, I as TablesOf, L as BlockNameRegistry, O as ResolvedBlock, 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-Dtwpjeuz.js";
4
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-DCAiOrNX.js";
5
5
  import { a as ScalarKind, i as FieldSpec } from "./table-schema-BlF6k62Q.js";
6
- import { n as SubjectsConfig } from "./subjects-DvmQeF_F.js";
6
+ import { i as SubjectsConfig } from "./subjects-NomQg6Eg.js";
7
7
  import { i as FIELD_FORMAT_NAMES, s as FieldFormatName } from "./field-formats-CAFNkKSN.js";
8
8
  import { t as GuestAction } from "./guest-actions-1T1DeS5Y.js";
9
9
  //#region src/config/names.d.ts
@@ -404,6 +404,11 @@ interface PresetCatalog {
404
404
  }
405
405
  //#endregion
406
406
  //#region src/config/instances.d.ts
407
+ /**
408
+ * Blocks that install once: they hold the app's identity, tenancy, access and
409
+ * plumbing, so a second copy would split what every other block reads.
410
+ */
411
+ declare const CORE_BLOCKS: ReadonlySet<string>;
407
412
  /** One named install of a block. */
408
413
  interface ResolvedInstance {
409
414
  /** The key in `blocks`. */
@@ -421,6 +426,12 @@ interface ResolvedInstance {
421
426
  /** Its config, without `block`. */
422
427
  readonly config: BlockConfig;
423
428
  }
429
+ declare const INSTANCE_NAME: RegExp;
430
+ /**
431
+ * The prefix an instance gives the names its block's renames leave unchanged:
432
+ * `hiring-pipelines` and `hiringPipelines` both give `hiring_pipelines`.
433
+ */
434
+ declare function instancePrefix(name: string): string;
424
435
  //#endregion
425
436
  //#region src/sql/contributions.d.ts
426
437
  /**
@@ -1779,8 +1790,9 @@ interface LegacyBlockKeys {
1779
1790
  type BlockInput<T extends LegacyBlockKeys> = Omit<T, keyof LegacyBlockKeys> & {
1780
1791
  /**
1781
1792
  * Who owns the block's tables: `managed` (better-supabase writes them, the
1782
- * default), `adopt` (your tables, mapped through `tables` and `columns`) or
1783
- * `custom` (your functions behind the block's contract).
1793
+ * default) or `custom` (your functions behind the block's contract). A block
1794
+ * leaves alone every table your schema already has, mapped through `tables`
1795
+ * and `columns`.
1784
1796
  */
1785
1797
  readonly ownership?: T["mode"];
1786
1798
  /**
@@ -3727,6 +3739,53 @@ interface BlockSqlScope {
3727
3739
  guestParty(tenant: string, type: string, id: string): string;
3728
3740
  }
3729
3741
  //#endregion
3742
+ //#region src/sql/value-maps.d.ts
3743
+ /** The `BlockSqlContext` methods that cast and map a typed column's values. */
3744
+ interface BlockSqlValueMethods {
3745
+ /**
3746
+ * `value`, a text expression, as the type of a logical column the table spec
3747
+ * lists in `typed`. On a table the app has, the column may be an enum or
3748
+ * another type with a text input, so the value goes through
3749
+ * `better_supabase.as_column_type`; on the module's own table it stays as it
3750
+ * is. With `invalid: "null"`, a value the type rejects, such as a label the
3751
+ * enum lacks, becomes null through `better_supabase.try_column_type` instead
3752
+ * of raising.
3753
+ */
3754
+ cast(table: string, column: string, value: string, invalid?: "raise" | "null"): string;
3755
+ /**
3756
+ * The label `label` of a typed logical column as the SQL literal the app's
3757
+ * column stores, through `blocks.<name>.values`: the first mapped value, or a
3758
+ * call that raises `VALUE_UNSUPPORTED` for a label mapped to `null`. The
3759
+ * label itself without a map.
3760
+ */
3761
+ value(table: string, column: string, label: string): string;
3762
+ /**
3763
+ * Whether the column expression `value` holds one of `labels`, comparing
3764
+ * against every app value each label maps to: `value = 'label'` for one
3765
+ * label, `value in (...)` for several, `false` when none is supported.
3766
+ */
3767
+ is(table: string, column: string, value: string, labels: readonly string[], negate?: boolean): string;
3768
+ /**
3769
+ * The app values a label of a typed logical column reads from: `[label]`
3770
+ * without a map, `[]` for a label mapped to `null`.
3771
+ */
3772
+ appValues(table: string, column: string, label: string): readonly string[];
3773
+ /**
3774
+ * The column expression `value` of a typed logical column as the block's
3775
+ * label (mapped app values read back as their label), as text. `value` itself
3776
+ * without a map.
3777
+ */
3778
+ label(table: string, column: string, value: string): string;
3779
+ /**
3780
+ * ` || jsonb_build_object(...)` that replaces each mapped typed column of
3781
+ * `to_jsonb(alias)` with its label, keyed by the column's name; empty when no
3782
+ * column of `table` maps values.
3783
+ */
3784
+ labelsJson(table: string, alias: string): string;
3785
+ /** Whether `blocks.<name>.values` maps any label of a typed logical column. */
3786
+ mapsValues(table: string, column: string): boolean;
3787
+ }
3788
+ //#endregion
3730
3789
  //#region src/sql/context.d.ts
3731
3790
  /** The scope id types SQL modules render. */
3732
3791
  declare const MODULE_ID_TYPES: readonly ["uuid", "text", "bigint", "integer"];
@@ -3762,6 +3821,13 @@ interface BlockSqlTableSpec {
3762
3821
  * enum: the module writes and compares them through `ctx.cast`.
3763
3822
  */
3764
3823
  readonly typed?: readonly string[];
3824
+ /**
3825
+ * Text columns that take `blocks.<name>.values` like `typed` ones, but are
3826
+ * written through `ctx.cast` only when the app gives them a values entry (an
3827
+ * empty one casts without renaming labels), so a config without one renders
3828
+ * as before.
3829
+ */
3830
+ readonly mappable?: readonly string[];
3765
3831
  readonly yieldsToExtra?: readonly string[];
3766
3832
  }
3767
3833
  interface BlockSqlTableLifecycle {
@@ -3942,7 +4008,7 @@ interface BlockSqlContractFunction {
3942
4008
  readonly returns: string;
3943
4009
  }
3944
4010
  /** What a module's `build` reads: resolved names for one layout. */
3945
- interface BlockSqlContext {
4011
+ interface BlockSqlContext extends BlockSqlValueMethods {
3946
4012
  readonly module: string;
3947
4013
  /**
3948
4014
  * The instance being rendered: the module's name, or the `blocks` key of an
@@ -4020,16 +4086,6 @@ interface BlockSqlContext {
4020
4086
  colName(table: string, column: string): string;
4021
4087
  /** Whether a logical column exists (adopted tables can map it to `null`). */
4022
4088
  has(table: string, column: string): boolean;
4023
- /**
4024
- * `value`, a text expression, as the type of a logical column the table spec
4025
- * lists in `typed`. On a table the app has, the column may be an enum or
4026
- * another type with a text input, so the value goes through
4027
- * `better_supabase.as_column_type`; on the module's own table it stays as it
4028
- * is. With `invalid: "null"`, a value the type rejects, such as a label the
4029
- * enum lacks, becomes null through `better_supabase.try_column_type` instead
4030
- * of raising.
4031
- */
4032
- cast(table: string, column: string, value: string, invalid?: "raise" | "null"): string;
4033
4089
  /** Whether an optional logical table exists (it can be mapped to `null`). */
4034
4090
  hasTable(table: string): boolean;
4035
4091
  /** Whether the module renders its managed SQL (not adopt or custom mode). */
@@ -4185,4 +4241,4 @@ interface ExtraColumn {
4185
4241
  /** The contract's argument list with `{id}` resolved, as Postgres prints it. */
4186
4242
  declare function contractSignature(fn: BlockSqlContractFunction, idType: string): string;
4187
4243
  //#endregion
4188
- export { blockEntrySource as $, APP_COLUMN_ACCESS as $n, RpcTypeReference as $r, ResolvedExtensions as $t, ValibotGeneratorOptions as A, SkillsAgent 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, IntegrationInfo 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, SKILLS_AGENTS as Ii, 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, GEN_TASKS as Mi, Privilege as Mn, CatalogTable as Mr, GeneratorBlock as Mt, standardSchema as N, INTEGRATION_INFO 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, INTEGRATION_NAMES 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, SkillsConfig as ji, ExposeRole as jn, CatalogPolicy as jr, Generator as jt, zod as k, PowerSyncGenConfig 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 };
4244
+ export { blockEntrySource as $, APP_COLUMN_ACCESS as $n, RpcTypeReference as $r, ResolvedExtensions as $t, ValibotGeneratorOptions as A, MigrationSafetyConfig 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, presetValueLabel as Ci, TopicTriggerPayloadValueConfig as Cn, CatalogColumn as Cr, ResolvedPresetBlock as Ct, ZodFlavor as D, GenTask as Di, VectorSearchConfig as Dn, CatalogFunction as Dr, resolveJsonSchema as Dt, TableGrant as E, GenConfig as Ei, VectorDistance as En, CatalogForeignKey as Er, resolvePreset as Et, nuqs as F, GEN_TASKS 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, INTEGRATION_INFO as Ii, 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, INTEGRATION_NAMES as Li, presetSpec as Ln, ExtrasHook as Lr, GeneratorFunction as Lt, StandardSchemaGeneratorOptions as M, PowerSyncGenConfig as Mi, Privilege as Mn, CatalogTable as Mr, GeneratorBlock as Mt, standardSchema as N, SkillsAgent as Ni, ResolvedExpose as Nn, CatalogTrigger as Nr, GeneratorBlockEntity as Nt, ZodGeneratorOptions as O, IntegrationName as Oi, ColumnPrivilege as On, CatalogFunctionArg as Or, ClaimsConfig as Ot, NuqsGeneratorOptions as P, SkillsConfig 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, IntegrationInfo as Ri, DEFAULT_PRESET_NAME as Rn, ExtrasHookFunction as Rr, GeneratorFunctionArg as Rt, BlockSqlUpgrade as S, presetField as Si, TopicTriggerLookupConfig as Sn, CatalogCheck as Sr, ResolvedPreset as St, notNullCheckName as T, EnvFileConfig 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 _, PresetFramework as _i, ResolvedSqlConfig as _n, AppTableEvents as _r, expandPreset as _t, BlockSqlContext as a, PresetCatalogManifest as ai, BlockInput as an, AppColumnAccess as ar, defineConfig as at, BlockSqlLayout as b, PresetValueInfo as bi, SqlWorkflow as bn, AppTablesConfig as br, PresetConflict as bt, BlockSqlIdType as c, DEFAULT_CONVENTIONS as ci, EnvironmentConfig as cn, AppColumnType as cr, BlockTableReference as ct, MODULE_ID_TYPES as d, Preset as di, SqlInput as dn, AppReference as dr, RoleNames as dt, CORE_BLOCKS as ei, ApiConfig as en, APP_COLUMN_FORMATS as er, flattenConfig as et, contractSignature as f, PresetAccess as fi, ToolingConfig as fn, AppReferenceTarget as fr, TypedReference as ft, BlockSqlAccessProvider as g, PresetFieldValue as gi, RealtimeConfig as gn, AppTableEventKind as gr, conventionConfig as gt, BlockSql as h, PresetFieldKey as hi, BucketConfig as hn, AppTableConfig as hr, PresetInput as ht, BlockSqlAudit as i, PresetCatalogBlock as ii, BetterSupabaseConfig as in, APP_TABLE_EVENT_KINDS as ir, CONFIG_SCHEMA_URL as it, valibot as j, OpenApiConfig as ji, ExposeRole as jn, CatalogPolicy as jr, Generator as jt, zod as k, KeysConfig as ki, ExposeConfig as kn, CatalogGrant as kr, CodecsConfig as kt, BlockSqlNames as l, PRESET_FRAMEWORKS as li, GenGroupConfig as ln, AppLookupConfig as lr, BucketName as lt, moduleIdType as m, PresetField as mi, EntitlementsConfig as mn, AppRollupConfig as mr, ExpandedConfig as mt, AuditCategory as n, instancePrefix as ni, AppTablesInput as nn, APP_ON_DELETE_ACTIONS as nr, groupEntries as nt, BlockSqlContractFunction as o, PresetGlueItem as oi, BlocksInput as on, AppColumnConfig as or, resolveConfig as ot, isBlockSqlIdType as p, PresetConventions 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, PresetCatalog as ri, AuthConfig as rn, APP_ROLLUP_AGGREGATES as rr, hasFlatTables as rt, BlockSqlEmit as s, CONVENTION_FIELDS as si, DatabaseConfig as sn, AppColumnFormat as sr, AppTableNames as st, AUDIT_CATEGORIES as t, INSTANCE_NAME as ti, AppTableInput as tn, APP_COLUMN_TYPES as tr, groupConfig as tt, BlockSqlTableSpec as u, PRESET_TENANT_NAMES as ui, OrganizationConfig as un, AppOnDeleteAction as ur, ConfigReferences as ut, BlockSqlEntitlementsProvider as v, PresetPlatforms as vi, SeedConfig as vn, AppTableSubject as vr, presetConfig as vt, blockSqlVersion as w, DoctorConfig as wi, TopicTriggerTopicConfig as wn, CatalogColumnGrant as wr, listNames as wt, BlockSqlTestFile as x, integrationsForFramework as xi, TopicTriggerConfig as xn, Catalog as xr, PresetIntegration as xt, BlockSqlFile as y, PresetScope as yi, SqlConfig as yn, AppTableVersions as yr, presetOf as yt, buildJsonSchema as z, SKILLS_AGENTS as zi, NamedPreset as zn, ExtrasTable as zr, GeneratorInput as zt };
@@ -1,4 +1,4 @@
1
- import { a as ClientAuth } from "./bind-CFsctoFJ.js";
1
+ import { a as ClientAuth } from "./bind-DaoTunvE.js";
2
2
  //#region src/blocks/controller.d.ts
3
3
  /**
4
4
  * A block's client state, framework-agnostic. `subscribe` and `getSnapshot`