better-supabase 0.30.0 → 0.32.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 (1688) hide show
  1. package/dist/access-sql-Dao1C0fz.js +383 -0
  2. package/dist/actor-B5b0i1Fs.js +149 -0
  3. package/dist/actor-DseNR02I.d.ts +104 -0
  4. package/dist/adapter-CPPN80mx.js +2231 -0
  5. package/dist/agents-BEiBtYmh.d.ts +115 -0
  6. package/dist/ai-cache-D9D36eh4.js +86 -0
  7. package/dist/ai-cache-FMYzw7lW.d.ts +80 -0
  8. package/dist/ai-chat-B_P--Ie2.d.ts +532 -0
  9. package/dist/ai-files-DCMVGSds.js +337 -0
  10. package/dist/ai-message-cnroprVB.js +13 -0
  11. package/dist/ai-schedules-D_q1iclL.d.ts +164 -0
  12. package/dist/ai-sdk/agents/index.d.ts +8 -12
  13. package/dist/ai-sdk/agents/index.js +10 -12
  14. package/dist/ai-sdk/batches/index.d.ts +12 -7
  15. package/dist/ai-sdk/batches/index.js +16 -9
  16. package/dist/ai-sdk/cache/index.d.ts +2 -4
  17. package/dist/ai-sdk/cache/index.js +3 -4
  18. package/dist/ai-sdk/chat/index.d.ts +77 -2
  19. package/dist/ai-sdk/chat/index.js +179 -28
  20. package/dist/ai-sdk/embeddings/index.d.ts +2 -2
  21. package/dist/ai-sdk/embeddings/index.js +1 -1
  22. package/dist/ai-sdk/files/index.d.ts +3 -5
  23. package/dist/ai-sdk/files/index.js +5 -6
  24. package/dist/ai-sdk/index.d.ts +75 -21
  25. package/dist/ai-sdk/index.js +112 -66
  26. package/dist/ai-sdk/mcp/index.d.ts +28 -13
  27. package/dist/ai-sdk/mcp/index.js +56 -17
  28. package/dist/ai-sdk/memory/index.d.ts +3 -5
  29. package/dist/ai-sdk/memory/index.js +3 -4
  30. package/dist/ai-sdk/react/index.d.ts +2 -2
  31. package/dist/ai-sdk/react/index.js +3 -1
  32. package/dist/ai-sdk/react/server.d.ts +7 -4
  33. package/dist/ai-sdk/react/server.js +10 -3
  34. package/dist/ai-sdk/workflow/index.d.ts +12 -13
  35. package/dist/ai-sdk/workflow/index.js +17 -17
  36. package/dist/ai-sdk/workflow/react/index.d.ts +1 -3
  37. package/dist/ai-sdk/workflow/react/index.js +3 -3
  38. package/dist/ai-sdk/workflow/react/server.d.ts +1 -3
  39. package/dist/ai-sdk/workflow/react/server.js +1 -2
  40. package/dist/anchors-sCLvYj-8.d.ts +36 -0
  41. package/dist/api-CwzVbbw4.d.ts +483 -0
  42. package/dist/api-keys-u2sXB-CZ.d.ts +211 -0
  43. package/dist/api-wwix_K5c.js +691 -0
  44. package/dist/app-tables-DomvYx5b.d.ts +26 -0
  45. package/dist/approvals-Da4uAANx.js +166 -0
  46. package/dist/approvals-idpuhILk.d.ts +127 -0
  47. package/dist/assistant-CMKsaeJd.d.ts +209 -0
  48. package/dist/astro/index.d.ts +8 -10
  49. package/dist/astro/index.js +8 -9
  50. package/dist/attachments-BWtUQgsL.js +375 -0
  51. package/dist/attributes-BZNkR2z2.js +51 -0
  52. package/dist/auth-link-BmJsQG4a.js +117 -0
  53. package/dist/auth-link-DRjtI1Ky.d.ts +102 -0
  54. package/dist/auth-module-CVo86UKh.js +50 -0
  55. package/dist/auth-reply-BMPJQssh.d.ts +9 -0
  56. package/dist/auth-reply-Cnwn3I_q.js +30 -0
  57. package/dist/auth-wFlGgwTZ.js +19 -0
  58. package/dist/authorization-CYu_UKX4.d.ts +3723 -0
  59. package/dist/authorization-hooks-CldgvzBZ.d.ts +219 -0
  60. package/dist/authorizer-AswD5q6g.d.ts +116 -0
  61. package/dist/authorizer-D6po_XZA.js +171 -0
  62. package/dist/automation-acq3iK9y.js +74 -0
  63. package/dist/automations-BfH8GJqv.js +27 -0
  64. package/dist/automations-Bw5cX7oj.js +29 -0
  65. package/dist/automations-CCc5RUw-.js +31 -0
  66. package/dist/automations-Dou1t3lt.js +313 -0
  67. package/dist/availability-CebEOfMN.d.ts +236 -0
  68. package/dist/base64-CVyKHBBw.js +41 -0
  69. package/dist/batch-limit-DqQ3d6op.js +4 -0
  70. package/dist/before-route-Ra3OhI2x.js +29 -0
  71. package/dist/better-result/index.d.ts +4 -6
  72. package/dist/better-result/index.js +2 -3
  73. package/dist/bind-8LYVJE5W.d.ts +102 -0
  74. package/dist/block-authors-C5z3tGVu.d.ts +10 -0
  75. package/dist/block-authors-DCQ4zl8e.js +13 -0
  76. package/dist/block-env-BsLgZL2l.d.ts +30 -0
  77. package/dist/block-event-listener-DCi7c89M.js +15 -0
  78. package/dist/block-events-Bp6GPIBN.js +82 -0
  79. package/dist/block-fields-Bjcv6_zc.js +139 -0
  80. package/dist/block-fields-Puv5m5D3.d.ts +56 -0
  81. package/dist/block-helpers-I7UzjNEf.js +435 -0
  82. package/dist/block-helpers-JxiD1iw4.d.ts +56 -0
  83. package/dist/block-hooks-CJP5kGEa.d.ts +115 -0
  84. package/dist/block-hooks-CadxQ9-_.js +129 -0
  85. package/dist/block-method-DIbWG4Mj.js +20 -0
  86. package/dist/block-method-QSaPsL2P.d.ts +12 -0
  87. package/dist/block-subjects-SyJwfgrX.d.ts +4 -0
  88. package/dist/block-subjects-cRlVtKDO.js +54 -0
  89. package/dist/block-tenant-Bun03JuO.js +13 -0
  90. package/dist/block-transport-Bbf1ZZre.d.ts +67 -0
  91. package/dist/blocks/access-requests/index.d.ts +9 -15
  92. package/dist/blocks/access-requests/index.js +11 -14
  93. package/dist/blocks/activities/index.d.ts +13 -21
  94. package/dist/blocks/activities/index.js +16 -21
  95. package/dist/blocks/agents/index.d.ts +4 -8
  96. package/dist/blocks/agents/index.js +11 -14
  97. package/dist/blocks/ai-cache/index.d.ts +3 -5
  98. package/dist/blocks/ai-cache/index.js +5 -6
  99. package/dist/blocks/ai-chat/index.d.ts +10 -19
  100. package/dist/blocks/ai-chat/index.js +20 -28
  101. package/dist/blocks/ai-files/index.d.ts +5 -9
  102. package/dist/blocks/ai-files/index.js +5 -6
  103. package/dist/blocks/ai-keys/index.d.ts +4 -10
  104. package/dist/blocks/ai-keys/index.js +14 -18
  105. package/dist/blocks/ai-schedules/index.d.ts +3 -5
  106. package/dist/blocks/ai-schedules/index.js +14 -16
  107. package/dist/blocks/announcements/index.d.ts +12 -20
  108. package/dist/blocks/announcements/index.js +12 -16
  109. package/dist/blocks/api-keys/index.d.ts +8 -16
  110. package/dist/blocks/api-keys/index.js +17 -22
  111. package/dist/blocks/approvals/index.d.ts +4 -8
  112. package/dist/blocks/approvals/index.js +7 -173
  113. package/dist/blocks/assets/index.d.ts +9 -17
  114. package/dist/blocks/assets/index.js +13 -17
  115. package/dist/blocks/assignment/index.d.ts +9 -17
  116. package/dist/blocks/assignment/index.js +10 -14
  117. package/dist/blocks/attachments/index.d.ts +6 -18
  118. package/dist/blocks/attachments/index.js +19 -24
  119. package/dist/blocks/audit/index.d.ts +15 -31
  120. package/dist/blocks/audit/index.js +27 -35
  121. package/dist/blocks/automations/index.d.ts +14 -26
  122. package/dist/blocks/automations/index.js +18 -23
  123. package/dist/blocks/billable-time/index.d.ts +9 -19
  124. package/dist/blocks/billable-time/index.js +15 -20
  125. package/dist/blocks/billing/index.d.ts +12 -22
  126. package/dist/blocks/billing/index.js +19 -24
  127. package/dist/blocks/bookings/index.d.ts +8 -18
  128. package/dist/blocks/bookings/index.js +17 -23
  129. package/dist/blocks/bulk/index.d.ts +6 -12
  130. package/dist/blocks/bulk/index.js +10 -13
  131. package/dist/blocks/calendar/index.d.ts +18 -24
  132. package/dist/blocks/calendar/index.js +39 -32
  133. package/dist/blocks/catalog/index.d.ts +12 -20
  134. package/dist/blocks/catalog/index.js +17 -21
  135. package/dist/blocks/channels/index.d.ts +9 -17
  136. package/dist/blocks/channels/index.js +11 -15
  137. package/dist/blocks/collections/index.d.ts +11 -17
  138. package/dist/blocks/collections/index.js +13 -16
  139. package/dist/blocks/comments/index.d.ts +16 -26
  140. package/dist/blocks/comments/index.js +21 -26
  141. package/dist/blocks/compliance/index.d.ts +9 -17
  142. package/dist/blocks/compliance/index.js +13 -17
  143. package/dist/blocks/connectors/index.d.ts +4 -8
  144. package/dist/blocks/connectors/index.js +13 -16
  145. package/dist/blocks/contacts/index.d.ts +10 -18
  146. package/dist/blocks/contacts/index.js +12 -16
  147. package/dist/blocks/content/index.d.ts +8 -16
  148. package/dist/blocks/content/index.js +13 -17
  149. package/dist/blocks/contracts/index.d.ts +11 -21
  150. package/dist/blocks/contracts/index.js +17 -22
  151. package/dist/blocks/courses/index.d.ts +11 -21
  152. package/dist/blocks/courses/index.js +17 -22
  153. package/dist/blocks/created-by/index.d.ts +3 -7
  154. package/dist/blocks/created-by/index.js +4 -5
  155. package/dist/blocks/custom-fields/index.d.ts +10 -16
  156. package/dist/blocks/custom-fields/index.js +13 -16
  157. package/dist/blocks/data-lifecycle/index.d.ts +10 -26
  158. package/dist/blocks/data-lifecycle/index.js +17 -23
  159. package/dist/blocks/deals/index.d.ts +12 -20
  160. package/dist/blocks/deals/index.js +18 -22
  161. package/dist/blocks/dispatch/index.d.ts +11 -23
  162. package/dist/blocks/dispatch/index.js +19 -24
  163. package/dist/blocks/documents/index.d.ts +4 -8
  164. package/dist/blocks/documents/index.js +9 -12
  165. package/dist/blocks/domains/index.d.ts +8 -14
  166. package/dist/blocks/domains/index.js +12 -15
  167. package/dist/blocks/donations/index.d.ts +13 -23
  168. package/dist/blocks/donations/index.js +21 -26
  169. package/dist/blocks/drive/index.d.ts +116 -20
  170. package/dist/blocks/drive/index.js +138 -26
  171. package/dist/blocks/employees/index.d.ts +13 -23
  172. package/dist/blocks/employees/index.js +19 -27
  173. package/dist/blocks/enrichment/index.d.ts +8 -16
  174. package/dist/blocks/enrichment/index.js +11 -15
  175. package/dist/blocks/enrollments/index.d.ts +9 -17
  176. package/dist/blocks/enrollments/index.js +13 -17
  177. package/dist/blocks/entitlements/index.d.ts +8 -14
  178. package/dist/blocks/entitlements/index.js +8 -11
  179. package/dist/blocks/expenses/index.d.ts +22 -19
  180. package/dist/blocks/expenses/index.js +25 -23
  181. package/dist/blocks/field-history/index.d.ts +6 -10
  182. package/dist/blocks/field-history/index.js +5 -7
  183. package/dist/blocks/flags/index.d.ts +49 -20
  184. package/dist/blocks/flags/index.js +65 -19
  185. package/dist/blocks/forecasts/index.d.ts +10 -16
  186. package/dist/blocks/forecasts/index.js +11 -14
  187. package/dist/blocks/forms/index.d.ts +11 -25
  188. package/dist/blocks/forms/index.js +17 -24
  189. package/dist/blocks/goals/index.d.ts +8 -12
  190. package/dist/blocks/goals/index.js +9 -11
  191. package/dist/blocks/guests/index.d.ts +9 -19
  192. package/dist/blocks/guests/index.js +14 -19
  193. package/dist/blocks/hiring/index.d.ts +10 -18
  194. package/dist/blocks/hiring/index.js +12 -15
  195. package/dist/blocks/identities/index.d.ts +7 -11
  196. package/dist/blocks/identities/index.js +7 -9
  197. package/dist/blocks/imports/index.d.ts +8 -18
  198. package/dist/blocks/imports/index.js +11 -16
  199. package/dist/blocks/inbox/index.d.ts +11 -21
  200. package/dist/blocks/inbox/index.js +26 -23
  201. package/dist/blocks/incidents/index.d.ts +9 -17
  202. package/dist/blocks/incidents/index.js +14 -18
  203. package/dist/blocks/index.d.ts +14 -20
  204. package/dist/blocks/index.js +17 -20
  205. package/dist/blocks/inventory/index.d.ts +11 -17
  206. package/dist/blocks/inventory/index.js +12 -15
  207. package/dist/blocks/invoices/index.d.ts +34 -21
  208. package/dist/blocks/invoices/index.js +31 -18
  209. package/dist/blocks/knowledge/index.d.ts +3 -5
  210. package/dist/blocks/knowledge/index.js +5 -6
  211. package/dist/blocks/lead-scoring/index.d.ts +10 -14
  212. package/dist/blocks/lead-scoring/index.js +11 -13
  213. package/dist/blocks/leases/index.d.ts +11 -21
  214. package/dist/blocks/leases/index.js +20 -25
  215. package/dist/blocks/leave/index.d.ts +50 -17
  216. package/dist/blocks/leave/index.js +35 -14
  217. package/dist/blocks/ledger/index.d.ts +9 -17
  218. package/dist/blocks/ledger/index.js +13 -17
  219. package/dist/blocks/mail-sync/index.d.ts +6 -12
  220. package/dist/blocks/mail-sync/index.js +26 -25
  221. package/dist/blocks/memberships/index.d.ts +5 -9
  222. package/dist/blocks/memberships/index.js +4 -5
  223. package/dist/blocks/memory/index.d.ts +4 -8
  224. package/dist/blocks/memory/index.js +12 -15
  225. package/dist/blocks/messaging/index.d.ts +14 -24
  226. package/dist/blocks/messaging/index.js +19 -24
  227. package/dist/blocks/metrics/index.d.ts +9 -17
  228. package/dist/blocks/metrics/index.js +14 -18
  229. package/dist/blocks/mfa/index.d.ts +5 -9
  230. package/dist/blocks/mfa/index.js +7 -9
  231. package/dist/blocks/moderation/index.d.ts +9 -17
  232. package/dist/blocks/moderation/index.js +13 -17
  233. package/dist/blocks/notifications/index.d.ts +18 -34
  234. package/dist/blocks/notifications/index.js +36 -84
  235. package/dist/blocks/numbering/index.d.ts +6 -12
  236. package/dist/blocks/numbering/index.js +8 -11
  237. package/dist/blocks/oauth-server/index.d.ts +7 -13
  238. package/dist/blocks/oauth-server/index.js +12 -15
  239. package/dist/blocks/onboarding/index.d.ts +7 -13
  240. package/dist/blocks/onboarding/index.js +8 -11
  241. package/dist/blocks/orders/index.d.ts +17 -29
  242. package/dist/blocks/orders/index.js +22 -28
  243. package/dist/blocks/organizations/index.d.ts +43 -40
  244. package/dist/blocks/organizations/index.js +21 -20
  245. package/dist/blocks/outbox/index.d.ts +4 -6
  246. package/dist/blocks/outbox/index.js +11 -13
  247. package/dist/blocks/passes/index.d.ts +12 -22
  248. package/dist/blocks/passes/index.js +20 -25
  249. package/dist/blocks/permissions/index.d.ts +74 -15
  250. package/dist/blocks/permissions/index.js +119 -18
  251. package/dist/blocks/pipelines/index.d.ts +12 -18
  252. package/dist/blocks/pipelines/index.js +12 -15
  253. package/dist/blocks/posts/index.d.ts +10 -18
  254. package/dist/blocks/posts/index.js +15 -19
  255. package/dist/blocks/profiles/index.d.ts +8 -12
  256. package/dist/blocks/profiles/index.js +9 -11
  257. package/dist/blocks/promotions/index.d.ts +11 -17
  258. package/dist/blocks/promotions/index.js +13 -16
  259. package/dist/blocks/push/index.d.ts +19 -17
  260. package/dist/blocks/push/index.js +33 -20
  261. package/dist/blocks/queue/index.d.ts +187 -39
  262. package/dist/blocks/queue/index.js +226 -60
  263. package/dist/blocks/quotes/index.d.ts +13 -21
  264. package/dist/blocks/quotes/index.js +14 -17
  265. package/dist/blocks/rank/index.d.ts +7 -13
  266. package/dist/blocks/rank/index.js +8 -10
  267. package/dist/blocks/reactions/index.d.ts +11 -19
  268. package/dist/blocks/reactions/index.js +13 -17
  269. package/dist/blocks/relations/index.d.ts +11 -21
  270. package/dist/blocks/relations/index.js +18 -23
  271. package/dist/blocks/reminders/index.d.ts +12 -22
  272. package/dist/blocks/reminders/index.js +21 -25
  273. package/dist/blocks/reviews/index.d.ts +9 -15
  274. package/dist/blocks/reviews/index.js +11 -14
  275. package/dist/blocks/saved-views/index.d.ts +11 -21
  276. package/dist/blocks/saved-views/index.js +16 -21
  277. package/dist/blocks/scores/index.d.ts +6 -12
  278. package/dist/blocks/scores/index.js +10 -13
  279. package/dist/blocks/search/index.d.ts +9 -19
  280. package/dist/blocks/search/index.js +15 -19
  281. package/dist/blocks/security-events/index.d.ts +10 -24
  282. package/dist/blocks/security-events/index.js +17 -23
  283. package/dist/blocks/segments/index.d.ts +10 -18
  284. package/dist/blocks/segments/index.js +11 -15
  285. package/dist/blocks/sequences/index.d.ts +9 -17
  286. package/dist/blocks/sequences/index.js +15 -19
  287. package/dist/blocks/service-accounts/index.d.ts +9 -15
  288. package/dist/blocks/service-accounts/index.js +11 -14
  289. package/dist/blocks/sessions/index.d.ts +4 -8
  290. package/dist/blocks/sessions/index.js +9 -11
  291. package/dist/blocks/settings/index.d.ts +8 -16
  292. package/dist/blocks/settings/index.js +14 -18
  293. package/dist/blocks/share-links/index.d.ts +9 -17
  294. package/dist/blocks/share-links/index.js +16 -20
  295. package/dist/blocks/shipments/index.d.ts +14 -24
  296. package/dist/blocks/shipments/index.js +25 -31
  297. package/dist/blocks/signatures/index.d.ts +10 -16
  298. package/dist/blocks/signatures/index.js +10 -13
  299. package/dist/blocks/signing-keys/index.d.ts +5 -9
  300. package/dist/blocks/signing-keys/index.js +8 -10
  301. package/dist/blocks/sla/index.d.ts +11 -19
  302. package/dist/blocks/sla/index.js +17 -21
  303. package/dist/blocks/sso/index.d.ts +7 -19
  304. package/dist/blocks/sso/index.js +14 -21
  305. package/dist/blocks/state-machine/index.d.ts +7 -13
  306. package/dist/blocks/state-machine/index.js +9 -12
  307. package/dist/blocks/subjects/index.d.ts +7 -11
  308. package/dist/blocks/subjects/index.js +12 -14
  309. package/dist/blocks/tags/index.d.ts +11 -21
  310. package/dist/blocks/tags/index.js +20 -25
  311. package/dist/blocks/tasks/index.d.ts +13 -27
  312. package/dist/blocks/tasks/index.js +22 -29
  313. package/dist/blocks/teams/index.d.ts +15 -15
  314. package/dist/blocks/teams/index.js +17 -19
  315. package/dist/blocks/templates/index.d.ts +12 -22
  316. package/dist/blocks/templates/index.js +16 -21
  317. package/dist/blocks/time-tracking/index.d.ts +31 -25
  318. package/dist/blocks/time-tracking/index.js +29 -29
  319. package/dist/blocks/timeline/index.d.ts +10 -14
  320. package/dist/blocks/timeline/index.js +11 -13
  321. package/dist/blocks/trash/index.d.ts +10 -18
  322. package/dist/blocks/trash/index.js +11 -14
  323. package/dist/blocks/undo/index.d.ts +4 -8
  324. package/dist/blocks/undo/index.js +6 -8
  325. package/dist/blocks/updated-at/index.d.ts +3 -7
  326. package/dist/blocks/updated-at/index.js +4 -5
  327. package/dist/blocks/usage/index.d.ts +6 -10
  328. package/dist/blocks/usage/index.js +10 -13
  329. package/dist/blocks/vercel-marketplace/index.d.ts +9 -17
  330. package/dist/blocks/vercel-marketplace/index.js +17 -21
  331. package/dist/blocks/versions/index.d.ts +10 -20
  332. package/dist/blocks/versions/index.js +17 -22
  333. package/dist/blocks/waitlist/index.d.ts +10 -16
  334. package/dist/blocks/waitlist/index.js +11 -14
  335. package/dist/blocks/webhooks/index.d.ts +16 -34
  336. package/dist/blocks/webhooks/index.js +33 -44
  337. package/dist/blocks/workflow-editor/index.d.ts +13 -21
  338. package/dist/blocks/workflow-editor/index.js +21 -27
  339. package/dist/blocks/workflows/index.d.ts +8 -14
  340. package/dist/blocks/workflows/index.js +14 -18
  341. package/dist/bookings-DG443336.d.ts +285 -0
  342. package/dist/bucket-Clq5xINQ.d.ts +693 -0
  343. package/dist/build-Ckxct2EX.js +2065 -0
  344. package/dist/build-D1-V9dd8.js +732 -0
  345. package/dist/carrier-D2b_028L.d.ts +165 -0
  346. package/dist/casing-DQzG9ANZ.js +15 -0
  347. package/dist/channel-B_kufDZy.d.ts +101 -0
  348. package/dist/channels-BxeTTtCY.js +113 -0
  349. package/dist/chat-sdk/index.d.ts +174 -41
  350. package/dist/chat-sdk/index.js +425 -83
  351. package/dist/claims-DRmafYVK.js +90 -0
  352. package/dist/claims-DouHL7ZL.js +62 -0
  353. package/dist/cli/_format-Ba0DoWjl.js +99 -0
  354. package/dist/cli/add-ChoHyBhz.js +1222 -0
  355. package/dist/cli/add-DlYL-1mF.js +1 -0
  356. package/dist/cli/add-fzRPyIED.js +98 -0
  357. package/dist/cli/agent-59XWXsRi.js +184 -0
  358. package/dist/cli/app-table-files-C0OtdUVu.js +343 -0
  359. package/dist/cli/arazzo-1.0-D3OaSeZw.js +531 -0
  360. package/dist/cli/arazzo-1.1-DaT2KAkP.js +704 -0
  361. package/dist/cli/args-_ZVgRBkx.js +26 -0
  362. package/dist/cli/asyncapi-3.0.0-Ca-UwtUW.js +5592 -0
  363. package/dist/cli/asyncapi-3.1.0-DUxf5zNu.js +5832 -0
  364. package/dist/cli/backfill-Dq2XMXf9.js +292 -0
  365. package/dist/cli/bin.js +5 -5
  366. package/dist/cli/blocks-CCzp0eAH.js +155 -0
  367. package/dist/cli/blocks-DVhJOzFj.js +1 -0
  368. package/dist/cli/cache-CoC-1i1O.js +643 -0
  369. package/dist/cli/codemod-block-renames-Dt3X1Wvg.js +238 -0
  370. package/dist/cli/codemod-pyf6HmS9.js +2883 -0
  371. package/dist/cli/command-BpZ4AuhR.js +1021 -0
  372. package/dist/cli/compare-yl4sSwVn.js +8 -0
  373. package/dist/cli/completion-B08Q0xB3.js +29 -0
  374. package/dist/cli/completion-CwL7e93t.js +210 -0
  375. package/dist/cli/completion-DHTT6rjI.js +1 -0
  376. package/dist/cli/config-D-Upz3jV.js +46 -0
  377. package/dist/cli/config-D0m2rQqk.js +1 -0
  378. package/dist/cli/config-Dyl3iX3u.js +2029 -0
  379. package/dist/cli/config-edit-C6sQ1MqT.js +619 -0
  380. package/dist/cli/config-group-D4JWh4kG.js +388 -0
  381. package/dist/cli/content-mapper-ChSVT9Tq.js +181 -0
  382. package/dist/cli/db-B8zfxjl2.js +77 -0
  383. package/dist/cli/db-dFzhcozO.js +246 -0
  384. package/dist/cli/detect-BcUDaO8I.js +83 -0
  385. package/dist/cli/dist-CYnD1kyT.js +128 -0
  386. package/dist/cli/dist-MKwjiW2w.js +1114 -0
  387. package/dist/cli/doctor-BKZsztFV.js +4647 -0
  388. package/dist/cli/env-BAJn6wCA.js +142 -0
  389. package/dist/cli/env-BCuUsWOh.js +1109 -0
  390. package/dist/cli/env-D70ihdbB.js +1 -0
  391. package/dist/cli/env-UN6PJFX6.js +1 -0
  392. package/dist/cli/errors-DcJ_PayO.js +97 -0
  393. package/dist/cli/exec-CXBufciC.js +461 -0
  394. package/dist/cli/fastest-levenshtein-B_QF6At5.js +119 -0
  395. package/dist/cli/files-DQayErI8.js +999 -0
  396. package/dist/cli/fresh-import-CdO2oQaQ.js +39 -0
  397. package/dist/cli/gen-BN_eh6rE.js +390 -0
  398. package/dist/cli/guards-DxwRG0Uv.js +7 -0
  399. package/dist/cli/in-stack-diff-huI7fGMX.js +185 -0
  400. package/dist/cli/index.d.ts +1 -53
  401. package/dist/cli/index.js +10 -11
  402. package/dist/cli/init-CaDDt8F6.js +556 -0
  403. package/dist/cli/io-CQzy8PEZ.js +36 -0
  404. package/dist/cli/json5-DhsZB2va.js +784 -0
  405. package/dist/cli/jsonc-DU9Clnrz.js +1 -0
  406. package/dist/cli/jsonc-u_UiXFxs.js +43 -0
  407. package/dist/cli/keys-CxajkV_7.js +105 -0
  408. package/dist/cli/legacy-prefix-D8Jfku6I.js +153 -0
  409. package/dist/cli/live-KU41LMGE.js +339 -0
  410. package/dist/cli/mcp-C_m-TpLJ.js +240 -0
  411. package/dist/cli/metadata-Bq4ra7zo.js +149 -0
  412. package/dist/cli/migrate-DHG2Qz_K.js +45 -0
  413. package/dist/cli/migration-safety-STVbiKhz.js +925 -0
  414. package/dist/cli/migrations-O1QZoMiH.js +116 -0
  415. package/dist/cli/module-migration-DB9ntWM-.js +118 -0
  416. package/dist/cli/moved-BAFPdJz_.js +253 -0
  417. package/dist/cli/ohash-imLR_J5Y.js +276 -0
  418. package/dist/cli/openapi-3.0-BJiTNq_x.js +927 -0
  419. package/dist/cli/openapi-3.1-BcWCoii2.js +869 -0
  420. package/dist/cli/openapi-3.2-MXPkeoTk.js +1030 -0
  421. package/dist/cli/orphans-CPcR85QN.js +27 -0
  422. package/dist/cli/parse-BueItuNJ.js +181 -0
  423. package/dist/cli/powersync-CN3QPF2K.js +375 -0
  424. package/dist/cli/powersync-DfeGl5N1.js +1 -0
  425. package/dist/cli/preset-BQnjDCSR.js +100 -0
  426. package/dist/cli/print-DG7TRCi8.js +66 -0
  427. package/dist/cli/prompts-D9b6uf21.js +1133 -0
  428. package/dist/cli/providers-DpfoF3VC.js +298 -0
  429. package/dist/cli/prune-workflows-DcNJUS1m.js +153 -0
  430. package/dist/cli/redact--zOGdWzo.js +37 -0
  431. package/dist/cli/remove-BpfYqP45.js +237 -0
  432. package/dist/cli/render-Q7jnLn_C.js +2213 -0
  433. package/dist/cli/rolldown-runtime-DegdyBIC.js +25 -0
  434. package/dist/cli/run-9NfabanB.js +703 -0
  435. package/dist/cli/run-D6K-qQIX.js +1450 -0
  436. package/dist/cli/run-dY9uOC3W.js +62 -0
  437. package/dist/cli/seed-B4H0Lco9.js +187 -0
  438. package/dist/cli/seed-BIB6-WPa.js +1 -0
  439. package/dist/cli/shared-PrvYREVy.js +150 -0
  440. package/dist/cli/shell-C1U618XA.js +9 -0
  441. package/dist/cli/skills-jZThjL3B.js +120 -0
  442. package/dist/cli/snapshot-UfJsqfys.js +728 -0
  443. package/dist/cli/source-F3YTVvFo.js +317 -0
  444. package/dist/cli/source-args-DJMrW_jW.js +58 -0
  445. package/dist/cli/spec-DsLQuJKp.js +7449 -0
  446. package/dist/cli/spec-HQOBVbEO.js +1 -0
  447. package/dist/cli/sql-layout-CZ66pY8j.js +260 -0
  448. package/dist/cli/stack-147NqctC.js +134 -0
  449. package/dist/cli/stack-env-BQhbUFa7.js +92 -0
  450. package/dist/cli/stack-status-Mxgqb3I4.js +45 -0
  451. package/dist/cli/stacks-C5YL6Un9.js +230 -0
  452. package/dist/cli/style-B5-nByxb.js +34 -0
  453. package/dist/cli/supabase-toml-B6-eEV5p.js +1155 -0
  454. package/dist/cli/sync-B12wbtFd.js +318 -0
  455. package/dist/cli/table-D9FbJS8h.js +88 -0
  456. package/dist/cli/toml-VX0BsvYq.js +422 -0
  457. package/dist/cli/topics-Cdg0V7Tt.js +29 -0
  458. package/dist/cli/trace-D3TNqWBg.js +6 -0
  459. package/dist/cli/upgrade-AgUXFDo6.js +270 -0
  460. package/dist/cli/upgrade-C20z49De.js +40 -0
  461. package/dist/cli/validate-C_WTnX1U.js +7426 -0
  462. package/dist/cli/version-DEUWW8cv.js +3 -0
  463. package/dist/cli/yaml-JsusTbcC.js +2250 -0
  464. package/dist/client/index.d.ts +7 -7
  465. package/dist/client/index.js +9 -12
  466. package/dist/client/native/index.d.ts +7 -23
  467. package/dist/client/native/index.js +15 -22
  468. package/dist/client-BLor58Je.js +290 -0
  469. package/dist/clone-H_gCsL29.js +32 -0
  470. package/dist/cloud-event-CLvsaPqH.js +62 -0
  471. package/dist/cloud-event-bcaMqEbN.d.ts +62 -0
  472. package/dist/codecs-B1VO2BGL.d.ts +220 -0
  473. package/dist/codecs-B9v5Y5HH.js +357 -0
  474. package/dist/commerce/index.d.ts +5 -13
  475. package/dist/commerce/index.js +13 -16
  476. package/dist/compiler-CWishtY2.d.ts +12 -0
  477. package/dist/compose-BRBlPSEY.js +52 -0
  478. package/dist/composite-BZMkWNOQ.js +125 -0
  479. package/dist/composite-ClLWZIwX.d.ts +79 -0
  480. package/dist/config/index.d.ts +6 -6
  481. package/dist/config/index.js +7 -7
  482. package/dist/config-BhExAhNK.js +1102 -0
  483. package/dist/config-MDRA2sre.js +1672 -0
  484. package/dist/connectors-BImAu75R.d.ts +145 -0
  485. package/dist/context-DSevnLrT.js +40 -0
  486. package/dist/context-DcxfrCml.d.ts +4267 -0
  487. package/dist/controller-BJmh7gFm.js +78 -0
  488. package/dist/controller-D_UJBaEU.d.ts +50 -0
  489. package/dist/controller-y1kSMuCU.js +72 -0
  490. package/dist/conversion-7U1WeLxK.d.ts +84 -0
  491. package/dist/conversion-Bj9j3KnG.js +76 -0
  492. package/dist/cookie-DDkqvqe4.d.ts +3 -0
  493. package/dist/cookie-DJI6xXJ9.js +4 -0
  494. package/dist/cors-9SDsndtb.d.ts +13 -0
  495. package/dist/cors-DrDFLMNn.js +23 -0
  496. package/dist/create/index.d.ts +4 -28
  497. package/dist/create/index.js +9 -15
  498. package/dist/create/lite/index.d.ts +5 -25
  499. package/dist/create/lite/index.js +14 -24
  500. package/dist/create/oauth/index.d.ts +1 -1
  501. package/dist/create/oauth/index.js +1 -2
  502. package/dist/create/supabase/index.d.ts +2 -4
  503. package/dist/create/supabase/index.js +3 -6
  504. package/dist/create-blocks-D7q1boXV.js +367 -0
  505. package/dist/credentials/index.d.ts +6 -10
  506. package/dist/credentials/index.js +11 -12
  507. package/dist/cron-BD8VrQQl.js +147 -0
  508. package/dist/cron-route-DSITg1yC.js +23 -0
  509. package/dist/csv-Bwn9insJ.js +88 -0
  510. package/dist/csv-Dd1iKsk-.d.ts +26 -0
  511. package/dist/data-engine-B-D6bdyx.d.ts +269 -0
  512. package/dist/data-engine-BbqQwso_.js +174 -0
  513. package/dist/data-hooks-BToeAcQ_.js +277 -0
  514. package/dist/db-exception-Dv18UZ-I.js +30 -0
  515. package/dist/deal-forecast-CN_BEy9s.d.ts +21 -0
  516. package/dist/deal-forecast-DsVFoMkJ.js +38 -0
  517. package/dist/define-3RbqoF1S.d.ts +1242 -0
  518. package/dist/define-B6D55cO0.js +2073 -0
  519. package/dist/define-block-22Jv4U_-.js +63 -0
  520. package/dist/define-block-B_i9VPcc.d.ts +1669 -0
  521. package/dist/delegation-BRHHXERz.js +152 -0
  522. package/dist/delivery-CWcbh87x.d.ts +69 -0
  523. package/dist/delivery-SmPHu2_H.js +28 -0
  524. package/dist/delivery-events-0mAEuscm.js +52 -0
  525. package/dist/documents-6ov2gWh3.d.ts +150 -0
  526. package/dist/edge/index.d.ts +17 -23
  527. package/dist/edge/index.js +18 -22
  528. package/dist/elysia/index.d.ts +2 -6
  529. package/dist/elysia/index.js +4 -6
  530. package/dist/email-BRm6wMWQ.d.ts +40 -0
  531. package/dist/embeddings--v4BJdUL.js +127 -0
  532. package/dist/embeddings-K0lH--nt.d.ts +76 -0
  533. package/dist/ended-CCoE7XXY.d.ts +22 -0
  534. package/dist/entitlements-XwpuBbKN.d.ts +52 -0
  535. package/dist/entitlements-sLoj3M6Y.js +44 -0
  536. package/dist/entity-naming-BES3pkQI.js +130 -0
  537. package/dist/entity-schema-DEIz0I8i.js +38 -0
  538. package/dist/env/index.d.ts +1 -1
  539. package/dist/env/index.js +1 -2
  540. package/dist/envelope-DAtaFJue.js +89 -0
  541. package/dist/errors-B7tCfCvX.js +327 -0
  542. package/dist/errors-BdjHv5SV.js +43 -0
  543. package/dist/errors-D3-4c-XF.js +102 -0
  544. package/dist/escape-like-CK6L7gkj.d.ts +26 -0
  545. package/dist/escape-like-gxNXs145.js +6 -0
  546. package/dist/eve/index.d.ts +247 -16
  547. package/dist/eve/index.js +334 -26
  548. package/dist/eve-Cf-QRGij.d.ts +213 -0
  549. package/dist/event-calendar-DUtFyRrv.d.ts +63 -0
  550. package/dist/event-map-DxfsFgQT.js +18 -0
  551. package/dist/events/index.d.ts +3 -3
  552. package/dist/events/index.js +7 -8
  553. package/dist/events-BRKIxVQD.js +25 -0
  554. package/dist/events-CfDdOwqg.d.ts +850 -0
  555. package/dist/events-Da482tiF.js +81 -0
  556. package/dist/executor-BDMqPbVU.js +482 -0
  557. package/dist/executor-C0_TT717.js +840 -0
  558. package/dist/executor-CAhykadW.d.ts +168 -0
  559. package/dist/executor-CbDX34I9.d.ts +99 -0
  560. package/dist/executor-Dc4Pl44u.js +207 -0
  561. package/dist/executor-ynEwaUZy.d.ts +35 -0
  562. package/dist/expo/index.d.ts +5 -9
  563. package/dist/expo/index.js +10 -11
  564. package/dist/extension-DQ9-oOVC.js +58 -0
  565. package/dist/extension-LgaDPMJs.js +120 -0
  566. package/dist/extension-WdHd5uqI.js +102 -0
  567. package/dist/extension-rdpYvpyN.js +52 -0
  568. package/dist/extension-shared-DJb_PfD4.js +59 -0
  569. package/dist/extra-Dz9n5y1s.js +9 -0
  570. package/dist/field-errors-tQr-anYL.d.ts +208 -0
  571. package/dist/field-formats-Cap-V7UP.js +101 -0
  572. package/dist/field-formats-DVukMbRa.d.ts +36 -0
  573. package/dist/fields-AKKMirg_.d.ts +76 -0
  574. package/dist/fields-BBcdKD-S.js +107 -0
  575. package/dist/filter-evaluate-Bhq99aEN.d.ts +35 -0
  576. package/dist/filter-evaluate-D_LLfdtE.js +216 -0
  577. package/dist/filter-query-B7A4l2xn.d.ts +131 -0
  578. package/dist/filter-query-Ds7Z6lgZ.js +565 -0
  579. package/dist/flags-B5B4mkZV.d.ts +315 -0
  580. package/dist/flags-D0npSE-5.js +361 -0
  581. package/dist/flags-sdk/index.d.ts +217 -28
  582. package/dist/flags-sdk/index.js +255 -35
  583. package/dist/form-definition-8cCCt5zj.js +362 -0
  584. package/dist/form-definition-BN8shngm.d.ts +117 -0
  585. package/dist/format-BT0Z3V54.d.ts +77 -0
  586. package/dist/framework-B1h-uquj.js +57 -0
  587. package/dist/framework-CyDn_SXR.d.ts +45 -0
  588. package/dist/function-contract-Bf6llTkE.js +7 -0
  589. package/dist/function-contract-DgDBYbXu.d.ts +25 -0
  590. package/dist/gateway-Cg_MgGen.d.ts +120 -0
  591. package/dist/gateway-options-DQGQzdkD.js +26 -0
  592. package/dist/gateway-options-Mut8jih_.d.ts +27 -0
  593. package/dist/guards-CsRa6v57.js +11 -0
  594. package/dist/guest-actions-CEwttioE.js +8 -0
  595. package/dist/guest-actions-DfHHp98H.d.ts +3 -0
  596. package/dist/h3/index.d.ts +2 -6
  597. package/dist/h3/index.js +4 -6
  598. package/dist/h3/v1/index.d.ts +3 -5
  599. package/dist/h3/v1/index.js +4 -5
  600. package/dist/history-6KiVNWdH.js +269 -0
  601. package/dist/hmac-DNcfpmI9.js +22 -0
  602. package/dist/hono/index.d.ts +14 -19
  603. package/dist/hono/index.js +14 -16
  604. package/dist/http-BDC1IvBX.js +27 -0
  605. package/dist/http-BRUI3qim.js +140 -0
  606. package/dist/http-D4lH1xqY.js +39 -0
  607. package/dist/image-url-bsGeybeg.js +83 -0
  608. package/dist/impersonation-BOCJcsmS.d.ts +26 -0
  609. package/dist/impersonation-D-quM36V.js +61 -0
  610. package/dist/inbox-BmSA9K01.d.ts +326 -0
  611. package/dist/index-8w4OB5En.d.ts +102 -0
  612. package/dist/index-B2871MHr.d.ts +234 -0
  613. package/dist/index-B5_J-MaK.d.ts +152 -0
  614. package/dist/index-BWR29Vvw.d.ts +76 -0
  615. package/dist/index-CRrBZtKm.d.ts +326 -0
  616. package/dist/index-CTpEQvIv.d.ts +291 -0
  617. package/dist/index-D2BGCjIz.d.ts +570 -0
  618. package/dist/index-D66_dYVi.d.ts +667 -0
  619. package/dist/index-Dj4VKpYZ.d.ts +49 -0
  620. package/dist/index-DzBFdI9I.d.ts +145 -0
  621. package/dist/index-lazpPVr0.d.ts +402 -0
  622. package/dist/index-xCpjvDVm.d.ts +637 -0
  623. package/dist/index.d.ts +13 -41
  624. package/dist/index.js +29 -34
  625. package/dist/instance-property-BlH7QSDl.js +6 -0
  626. package/dist/instances-D31jrmKh.js +16636 -0
  627. package/dist/invalidate-DAB9CaPm.d.ts +19 -0
  628. package/dist/iso4217-oKsif_hW.js +175 -0
  629. package/dist/json-O5vFw243.js +21 -0
  630. package/dist/json-schema-D9eVL_xi.js +884 -0
  631. package/dist/jwks-cache-IZaiICAV.js +48 -0
  632. package/dist/jws-B8p0ppgh.js +204 -0
  633. package/dist/jws-CxgTsbgG.d.ts +64 -0
  634. package/dist/kit-CJKo0soh.d.ts +92 -0
  635. package/dist/kit-CVZDd1X9.js +132 -0
  636. package/dist/knowledge-BUwbpS8I.d.ts +215 -0
  637. package/dist/knowledge-DdZzUTQ-.js +299 -0
  638. package/dist/lint/index.d.ts +1 -5
  639. package/dist/lint/index.js +8 -10
  640. package/dist/list/index.d.ts +3 -3
  641. package/dist/list/index.js +3 -3
  642. package/dist/list-query-CZ-K5aHX.d.ts +220 -0
  643. package/dist/list-query-D-tgs1eY.js +558 -0
  644. package/dist/live-BVi3q4bX.js +277 -0
  645. package/dist/logger-0LfhvwE4.d.ts +16 -0
  646. package/dist/logger-BkF8ukXV.js +20 -0
  647. package/dist/lookup-upE-e1zw.js +17 -0
  648. package/dist/management-DtX4ic1F.d.ts +55 -0
  649. package/dist/mapper/bin.js +13 -17
  650. package/dist/mcp/index.d.ts +8 -18
  651. package/dist/mcp/index.js +24 -29
  652. package/dist/mcp/sdk/index.d.ts +7 -11
  653. package/dist/mcp/sdk/index.js +12 -14
  654. package/dist/message-Cc4bkdNw.d.ts +97 -0
  655. package/dist/messages-CRk1g6oe.js +512 -0
  656. package/dist/messaging-DMhtGxVv.d.ts +295 -0
  657. package/dist/methods-BjfDv4Gy.js +9 -0
  658. package/dist/metric-definition-2KQYeUZ1.d.ts +67 -0
  659. package/dist/metric-definition-D4H6IQT7.js +116 -0
  660. package/dist/mfa-CM5r904M.d.ts +34 -0
  661. package/dist/model-Lxa_mOzB.d.ts +338 -0
  662. package/dist/model-messages-BcrkjsPE.js +205 -0
  663. package/dist/model-messages-CGSUU450.d.ts +32 -0
  664. package/dist/money-BgpAd7d3.d.ts +89 -0
  665. package/dist/money-DH--bbYr.js +196 -0
  666. package/dist/money-codec-SKPm8FPw.js +40 -0
  667. package/dist/my-work-kinds-DNPq3ccL.js +10 -0
  668. package/dist/nestjs/index.d.ts +3 -5
  669. package/dist/nestjs/index.js +5 -6
  670. package/dist/next/client/index.d.ts +1 -5
  671. package/dist/next/client/index.js +2 -4
  672. package/dist/next/image/index.d.ts +1 -3
  673. package/dist/next/image/index.js +2 -3
  674. package/dist/next/index.d.ts +149 -92
  675. package/dist/next/index.js +167 -114
  676. package/dist/node/index.d.ts +3 -3
  677. package/dist/node/index.js +6 -7
  678. package/dist/node-headers-C3FExlg9.js +54 -0
  679. package/dist/node-headers-TnS4T7V_.d.ts +25 -0
  680. package/dist/nuxt/index.d.ts +0 -2
  681. package/dist/nuxt/index.js +1 -2
  682. package/dist/operations-BNFbWv1t.js +28 -0
  683. package/dist/operations-D51ONRvR.d.ts +4 -0
  684. package/dist/optional-peer-5SOYr3lL.js +31 -0
  685. package/dist/options--rohtkkC.js +4 -0
  686. package/dist/options-1iHDmlZ5.js +8 -0
  687. package/dist/options-2QJXZPPS.js +4 -0
  688. package/dist/options-B-JqrC61.d.ts +8 -0
  689. package/dist/options-B3xH2JvJ.js +8 -0
  690. package/dist/options-B4sTqDrt.js +4 -0
  691. package/dist/options-B56njigZ.js +19 -0
  692. package/dist/options-B5A3UmKY.d.ts +17 -0
  693. package/dist/options-B6m9gYRH.d.ts +11 -0
  694. package/dist/options-B7Pl708M.js +8 -0
  695. package/dist/options-B7YrdiUc.js +11 -0
  696. package/dist/options-B8c2_hIB.js +9 -0
  697. package/dist/options-B9w_Y08G.d.ts +6 -0
  698. package/dist/options-BDF60ouf.js +4 -0
  699. package/dist/options-BDMPjyrI.js +4 -0
  700. package/dist/options-BHdHuY5r.js +14 -0
  701. package/dist/options-BLMeCbtT.js +31 -0
  702. package/dist/options-BLQePOPy.d.ts +8 -0
  703. package/dist/options-BLn1PFyu.js +4 -0
  704. package/dist/options-BMO-FnOT.js +7 -0
  705. package/dist/options-BNRvoEkj.js +4 -0
  706. package/dist/options-BPQOiVx2.js +7 -0
  707. package/dist/options-BSTJmfX4.js +10 -0
  708. package/dist/options-BTRH26MJ.js +9 -0
  709. package/dist/options-BTaQszYn.js +9 -0
  710. package/dist/options-BYo7hMHK.js +10 -0
  711. package/dist/options-B_bxCZYM.js +7 -0
  712. package/dist/options-BaBaVWS-.js +10 -0
  713. package/dist/options-BamaRO-q.d.ts +12 -0
  714. package/dist/options-BcBdiPSZ.js +7 -0
  715. package/dist/options-BfY4pyQE.js +23 -0
  716. package/dist/options-BgCS5ODi.js +9 -0
  717. package/dist/options-Bi96Lzuf.js +9 -0
  718. package/dist/options-BjEsSoFp.js +17 -0
  719. package/dist/options-Bkx8vwip.js +4 -0
  720. package/dist/options-BmFSI07A.js +4 -0
  721. package/dist/options-BmwDdKwE.js +7 -0
  722. package/dist/options-Bn3NjXfn.js +7 -0
  723. package/dist/options-BqK4xV67.js +13 -0
  724. package/dist/options-Bs2dC-at.js +11 -0
  725. package/dist/options-BvttpM1M.js +4 -0
  726. package/dist/options-Bwrwb8do.d.ts +10 -0
  727. package/dist/options-BxdqA2Ex.js +19 -0
  728. package/dist/options-BzxR82Tu.js +9 -0
  729. package/dist/options-C-NFS6e3.js +13 -0
  730. package/dist/options-C13-dVMH.js +7 -0
  731. package/dist/options-C1RIyAe1.js +7 -0
  732. package/dist/options-C1kZ3qLd.js +8 -0
  733. package/dist/options-C2RjdunU.js +27 -0
  734. package/dist/options-C4kpi6HE.js +8 -0
  735. package/dist/options-C5MfwOAO.js +8 -0
  736. package/dist/options-C5fKQ3EJ.d.ts +10 -0
  737. package/dist/options-CJR59q8s.js +17 -0
  738. package/dist/options-CJVYQue3.d.ts +10 -0
  739. package/dist/options-CLy7CcMn.js +8 -0
  740. package/dist/options-COfEYic3.js +8 -0
  741. package/dist/options-CRwTY_q2.d.ts +58 -0
  742. package/dist/options-CcW7h8mv.js +9 -0
  743. package/dist/options-Ceu2j1vv.js +7 -0
  744. package/dist/options-CgBKgmI8.js +7 -0
  745. package/dist/options-CgMiQGOF.js +9 -0
  746. package/dist/options-CptvcSmF.js +11 -0
  747. package/dist/options-CsLUAt04.js +8 -0
  748. package/dist/options-CtyjhSGk.js +15 -0
  749. package/dist/options-CuPWezcV.js +7 -0
  750. package/dist/options-CyDOOWlk.js +7 -0
  751. package/dist/options-CyYZvdSy.js +10 -0
  752. package/dist/options-CzIPn0fF.js +4 -0
  753. package/dist/options-CzWjw2HY.js +10 -0
  754. package/dist/options-CztbWdz9.js +4 -0
  755. package/dist/options-D4LuPM8a.js +4 -0
  756. package/dist/options-D4dxMGHF.js +7 -0
  757. package/dist/options-D5a9CHgP.js +7 -0
  758. package/dist/options-D6tpMRvp.d.ts +13 -0
  759. package/dist/options-D848Os4l.js +10 -0
  760. package/dist/options-DCZPW5gR.d.ts +15 -0
  761. package/dist/options-DFSHZFLN.js +4 -0
  762. package/dist/options-DFemc2im.js +9 -0
  763. package/dist/options-DFgHHwzD.js +12 -0
  764. package/dist/options-DNZ9r_Vo.d.ts +8 -0
  765. package/dist/options-DP7NwQPZ.js +4 -0
  766. package/dist/options-DPQaafyc.js +7 -0
  767. package/dist/options-DQkhhBLy.js +4 -0
  768. package/dist/options-DTTz33na.js +9 -0
  769. package/dist/options-DToWdVqW.js +4 -0
  770. package/dist/options-DUNUGuhM.js +4 -0
  771. package/dist/options-DWgpi5ns.js +7 -0
  772. package/dist/options-DeamnVOY.d.ts +12 -0
  773. package/dist/options-Dg7eK-_J.d.ts +8 -0
  774. package/dist/options-DiIlMZpc.js +8 -0
  775. package/dist/options-DjFbIRgV.js +16 -0
  776. package/dist/options-DjtCYRWb.js +4 -0
  777. package/dist/options-Dk6D88Zx.d.ts +6 -0
  778. package/dist/options-DpwRG4tO.js +8 -0
  779. package/dist/options-DvgKdZ2K.js +9 -0
  780. package/dist/options-DwIoRvic.js +4 -0
  781. package/dist/options-GwwLsKf5.js +8 -0
  782. package/dist/options-I1ZHfDP0.d.ts +58 -0
  783. package/dist/options-Itq7QYoW.js +20 -0
  784. package/dist/options-JnPEVbBJ.js +17 -0
  785. package/dist/options-Jwux4JDX.js +7 -0
  786. package/dist/options-Lg76d-cV.js +7 -0
  787. package/dist/options-Lh6uxepF.d.ts +24 -0
  788. package/dist/options-Oki2W_c3.js +4 -0
  789. package/dist/options-PM7IaIFP.js +10 -0
  790. package/dist/options-PTLBl6QT.js +7 -0
  791. package/dist/options-PheFo4JY.js +10 -0
  792. package/dist/options-SlC_jZ7y.js +4 -0
  793. package/dist/options-Sq4bYbf5.js +13 -0
  794. package/dist/options-XiD_Y3oK.js +14 -0
  795. package/dist/options-Z-bd_H1E.js +88 -0
  796. package/dist/options-ax_ssX_m.js +4 -0
  797. package/dist/options-bNB8_nlW.js +23 -0
  798. package/dist/options-eIEk0vqV.js +4 -0
  799. package/dist/options-eLIedotm.js +7 -0
  800. package/dist/options-jg0FMHA5.js +4 -0
  801. package/dist/options-mypVYaqR.js +9 -0
  802. package/dist/options-ompJjxkV.js +4 -0
  803. package/dist/options-pbc4H8_A.js +7 -0
  804. package/dist/options-uUGi0Phf.d.ts +14 -0
  805. package/dist/options-yRwYr4up.js +4 -0
  806. package/dist/options-z2Zhi97E.js +9 -0
  807. package/dist/options-zYV6M0vr.js +8 -0
  808. package/dist/orpc/index.d.ts +13 -19
  809. package/dist/orpc/index.js +20 -22
  810. package/dist/otel/index.d.ts +4 -6
  811. package/dist/otel/index.js +8 -10
  812. package/dist/outbox-C44Aa94K.d.ts +197 -0
  813. package/dist/payments-B4JchZuJ.js +15 -0
  814. package/dist/payments-BBGSGRQ7.d.ts +112 -0
  815. package/dist/permissions-B9aZZ9LR.js +43 -0
  816. package/dist/permissions-controller-B4uI5IPH.js +33 -0
  817. package/dist/pg-error-D92B6jlF.js +25 -0
  818. package/dist/plugin-Ca2qBiFZ.js +47 -0
  819. package/dist/pool-Bji4lnQM.d.ts +121 -0
  820. package/dist/pool-errors-JrZie6u3.js +26 -0
  821. package/dist/ports-C-hdygkZ.js +150 -0
  822. package/dist/ports-zFqRNXVJ.d.ts +87 -0
  823. package/dist/postgres/index.d.ts +5 -11
  824. package/dist/postgres/index.js +7 -9
  825. package/dist/postgrest-2WjRrtmX.d.ts +51 -0
  826. package/dist/postgrest-executor-lf8Mt4J0.js +1064 -0
  827. package/dist/powersync/index.d.ts +203 -21
  828. package/dist/powersync/index.js +369 -22
  829. package/dist/preset/index.d.ts +3 -3
  830. package/dist/preset/index.js +3 -3
  831. package/dist/preset-om2rbdYw.js +1038 -0
  832. package/dist/problem-C0SVHhd3.js +161 -0
  833. package/dist/problem-NGBjN-TO.d.ts +77 -0
  834. package/dist/project-oNHntJ6T.js +1749 -0
  835. package/dist/provider-B6qpleR9.js +56 -0
  836. package/dist/provider-CH8McX3b.d.ts +142 -0
  837. package/dist/providers-C9sBIBYE.js +62 -0
  838. package/dist/push-token-CO28k46S.js +15 -0
  839. package/dist/push-token-a3Ev1U3L.d.ts +22 -0
  840. package/dist/queries-BLrxg_GL.js +238 -0
  841. package/dist/query/index.d.ts +3 -3
  842. package/dist/query/index.js +11 -15
  843. package/dist/range-BN3kpJAE.d.ts +6 -0
  844. package/dist/range-Nrh_qtb_.js +6 -0
  845. package/dist/rank-keys-CEBzd9Xa.js +59 -0
  846. package/dist/rank-result-B_xLQCBV.d.ts +12 -0
  847. package/dist/rank-result-DzaTKKhH.js +17 -0
  848. package/dist/rate-limit-C89Yzwd9.d.ts +48 -0
  849. package/dist/rate-limit-CRhlLFhP.js +380 -0
  850. package/dist/rate-limit-DXJbLVg0.js +48 -0
  851. package/dist/ratelimit-headers-CpB-cDD6.js +61 -0
  852. package/dist/react/index.d.ts +11 -11
  853. package/dist/react/index.js +6 -6
  854. package/dist/react/native/index.d.ts +3 -5
  855. package/dist/react/native/index.js +5 -5
  856. package/dist/react/server.d.ts +13 -15
  857. package/dist/react/server.js +9 -10
  858. package/dist/react/session.d.ts +4 -6
  859. package/dist/react/session.js +2 -3
  860. package/dist/react-C40oomj7.js +1006 -0
  861. package/dist/react-CqOVutZj.js +80 -0
  862. package/dist/react-router/index.d.ts +8 -12
  863. package/dist/react-router/index.js +9 -11
  864. package/dist/read-set-DEDoIHMM.js +198 -0
  865. package/dist/realtime/index.d.ts +7 -7
  866. package/dist/realtime/index.js +6 -7
  867. package/dist/realtime-status-CocmAOPv.js +10 -0
  868. package/dist/realtime-status-D3oUx3o4.d.ts +6 -0
  869. package/dist/record-bindings-jTZw-GVe.js +25 -0
  870. package/dist/record-form-DCIui2Ol.d.ts +80 -0
  871. package/dist/record-type-oQxekQTX.js +219 -0
  872. package/dist/recordings-Dlpq8jUG.d.ts +117 -0
  873. package/dist/records/index.d.ts +10 -14
  874. package/dist/records/index.js +13 -16
  875. package/dist/refresh-B8t_KE3s.js +142 -0
  876. package/dist/refresh-BK9epzeC.d.ts +52 -0
  877. package/dist/refusal-DEuFVi4s.d.ts +30 -0
  878. package/dist/refusal-DhX7Xpfp.js +63 -0
  879. package/dist/relay-CllqA-lV.js +248 -0
  880. package/dist/resolve-DVOtYTAc.d.ts +287 -0
  881. package/dist/resolve-FW8oeXvh.js +927 -0
  882. package/dist/resolved-names-DYYyh35i.js +130 -0
  883. package/dist/resource-BfsTJnxZ.d.ts +119 -0
  884. package/dist/resource-Cn6Bn-_o.js +517 -0
  885. package/dist/resource-DQ4kIBpa.js +104 -0
  886. package/dist/resource-execute-DQRS7PFt.d.ts +13 -0
  887. package/dist/resource-schemas-Bq0g2RCQ.js +81 -0
  888. package/dist/resource-types-DF6KDAZM.d.ts +155 -0
  889. package/dist/resources-B0Vy7_wv.js +63 -0
  890. package/dist/resources-CeY53FiJ.d.ts +5 -0
  891. package/dist/respond-C2qvP1wv.js +106 -0
  892. package/dist/respond-CkwkvFdZ.d.ts +108 -0
  893. package/dist/result-8xza7w5W.js +145 -0
  894. package/dist/result-DTOQRyGY.d.ts +347 -0
  895. package/dist/rows-Ce8dsmfM.js +79 -0
  896. package/dist/rows-D-RqIsRz.js +38 -0
  897. package/dist/rrule-BLpe2449.js +289 -0
  898. package/dist/run-keys-BnzqxtYc.d.ts +59 -0
  899. package/dist/run-state-D0Tbl-nM.d.ts +11 -0
  900. package/dist/run-state-DGiyDQxH.js +12 -0
  901. package/dist/run-watch-DJk4Q603.js +52 -0
  902. package/dist/runtime-qslVrC9l.js +43 -0
  903. package/dist/sales-lines-Bde9cV5F.d.ts +36 -0
  904. package/dist/sales-lines-axwWhnLk.js +44 -0
  905. package/dist/sales-shared-CY3s_wBx.js +21 -0
  906. package/dist/sandboxes-DDWuD9fh.d.ts +85 -0
  907. package/dist/schemas-CpoEiAeT.js +213 -0
  908. package/dist/scope-dD_OAgRU.js +89 -0
  909. package/dist/scores-Bql-ABl0.d.ts +172 -0
  910. package/dist/scores-Bvk_JgXL.js +176 -0
  911. package/dist/search-DtbkD0h0.js +8 -0
  912. package/dist/server/index.d.ts +35 -69
  913. package/dist/server/index.js +51 -59
  914. package/dist/server-types-C3p3jUqr.d.ts +583 -0
  915. package/dist/session-BOch2y2z.d.ts +96 -0
  916. package/dist/session-status-DRBRnZHx.d.ts +80 -0
  917. package/dist/shared-Bmcnxwie.js +16 -0
  918. package/dist/shared-Ci1g9nl4.js +90 -0
  919. package/dist/shared-DsBcvj6q.d.ts +9 -0
  920. package/dist/sign-in-BmigClRh.js +730 -0
  921. package/dist/sign-in-C9pZE1kM.d.ts +53 -0
  922. package/dist/sign-in-CXOg2Dwb.js +399 -0
  923. package/dist/sign-in-Dxyi4aKu.d.ts +83 -0
  924. package/dist/signatures-CBn7w4VR.js +144 -0
  925. package/dist/signatures-jPr9JXyw.d.ts +41 -0
  926. package/dist/signers-Cz5ZhTHH.d.ts +380 -0
  927. package/dist/signing-keys-BC5_hJN5.js +163 -0
  928. package/dist/signing-keys-DS-rIVzz.d.ts +117 -0
  929. package/dist/simplify-BzThKn5b.js +82 -0
  930. package/dist/solid/index.d.ts +12 -22
  931. package/dist/solid/index.js +10 -16
  932. package/dist/solid-start/index.d.ts +7 -9
  933. package/dist/solid-start/index.js +8 -9
  934. package/dist/spec/index.d.ts +6 -48
  935. package/dist/spec/index.js +23 -39
  936. package/dist/spec-6Vr7sc0Z.js +123 -0
  937. package/dist/spec-pins-CuQ2anBw.d.ts +125 -0
  938. package/dist/spec-pins-FKUzgF6K.js +61 -0
  939. package/dist/sql/index.d.ts +4 -4
  940. package/dist/sql/index.js +4 -4
  941. package/dist/sql-BPV51R3A.js +140626 -0
  942. package/dist/sql-C1K5JALb.js +420 -0
  943. package/dist/sql-type-XWMeZRAl.js +33 -0
  944. package/dist/sqlite/index.d.ts +3 -9
  945. package/dist/sqlite/index.js +5 -8
  946. package/dist/sso-BEvNf1oW.d.ts +159 -0
  947. package/dist/sso-CRnaFJh0.js +216 -0
  948. package/dist/ssr/index.d.ts +5 -5
  949. package/dist/ssr/index.js +3 -3
  950. package/dist/standard-BD2aOUsf.js +24 -0
  951. package/dist/standard-DRX6Ch1j.d.ts +5 -0
  952. package/dist/stats-BTJgRMEp.js +82 -0
  953. package/dist/statuses-BTrQ5H4S.js +27 -0
  954. package/dist/statuses-Bv-0XoYC.js +27 -0
  955. package/dist/storage/index.d.ts +3 -3
  956. package/dist/storage/index.js +27 -40
  957. package/dist/storage-api-COQr77e8.js +9 -0
  958. package/dist/store-CKKzmsWB.js +68 -0
  959. package/dist/store-c7QxUHX-.d.ts +81 -0
  960. package/dist/streams/index.d.ts +3 -7
  961. package/dist/streams/index.js +5 -6
  962. package/dist/streams/redis/index.d.ts +1 -3
  963. package/dist/streams/redis/index.js +6 -7
  964. package/dist/stripe/index.d.ts +1 -3
  965. package/dist/stripe/index.js +3 -4
  966. package/dist/stripe-Bl-sjnl6.d.ts +154 -0
  967. package/dist/stripe-DKRwRWew.js +31 -0
  968. package/dist/subject-readers-BARV5rNp.js +48 -0
  969. package/dist/subject-readers-DWkVSbFr.d.ts +19 -0
  970. package/dist/subject-type-BarjdHZV.js +7 -0
  971. package/dist/subjects-BGwLJ3IB.d.ts +148 -0
  972. package/dist/subjects-vci6Wufh.d.ts +86 -0
  973. package/dist/subscribers-C57054Pc.js +32 -0
  974. package/dist/summaries-CUemsYwV.d.ts +67 -0
  975. package/dist/supabase-mcp-DY32eoax.d.ts +44 -0
  976. package/dist/supabase-mcp-QvebHckf.js +27 -0
  977. package/dist/support-rZbdU35s.d.ts +351 -0
  978. package/dist/support-view-CvDEgyGY.js +17 -0
  979. package/dist/support-view-WY4Y-A40.d.ts +15 -0
  980. package/dist/svelte/index.d.ts +11 -21
  981. package/dist/svelte/index.js +9 -15
  982. package/dist/sveltekit/index.d.ts +10 -14
  983. package/dist/sveltekit/index.js +12 -14
  984. package/dist/table-schema-CwXg7oBz.d.ts +77 -0
  985. package/dist/table-schema-D-ss9ozY.js +291 -0
  986. package/dist/tables-BSiVuKKx.js +72 -0
  987. package/dist/tags-BVLELhOf.d.ts +28 -0
  988. package/dist/tags-CW-KvjdL.js +38 -0
  989. package/dist/tanstack-db/index.d.ts +4 -8
  990. package/dist/tanstack-db/index.js +4 -6
  991. package/dist/tanstack-start/index.d.ts +8 -12
  992. package/dist/tanstack-start/index.js +8 -10
  993. package/dist/tax-BD9dN1rx.d.ts +168 -0
  994. package/dist/tax-BwckP5dv.js +139 -0
  995. package/dist/tee-CVOMhEX-.js +100 -0
  996. package/dist/template-CNq9xcfx.js +125 -0
  997. package/dist/temporal-DKTdGK9i.js +94 -0
  998. package/dist/temporal-required-w_2u4EDp.js +19 -0
  999. package/dist/tenant-BR7fvPj7.js +26 -0
  1000. package/dist/tenant-RKvGBB-U.d.ts +15 -0
  1001. package/dist/tenant-source-46lMuMEn.js +7 -0
  1002. package/dist/testing/index.d.ts +87 -124
  1003. package/dist/testing/index.js +158 -128
  1004. package/dist/timeline-Bs-FGMIJ.js +49 -0
  1005. package/dist/timeline-Ck8OFuAN.d.ts +147 -0
  1006. package/dist/timing-B6yHayKA.js +94 -0
  1007. package/dist/topic-BBBCVLyS.js +640 -0
  1008. package/dist/topic-Dr8VYE4D.d.ts +411 -0
  1009. package/dist/transport-CS4cVH4S.js +30 -0
  1010. package/dist/ttl-cache-C5S0L2wx.js +31 -0
  1011. package/dist/types-BiedVwz_.d.ts +192 -0
  1012. package/dist/types-CCmW3MqI.d.ts +449 -0
  1013. package/dist/types-CL-z0A4K.d.ts +660 -0
  1014. package/dist/types-CvlJNzX4.d.ts +215 -0
  1015. package/dist/types-D9FY9qSJ.d.ts +247 -0
  1016. package/dist/types-DWZubmwk.d.ts +648 -0
  1017. package/dist/types-DnrJ_crV.js +28 -0
  1018. package/dist/types-Pv5WPfIC.d.ts +175 -0
  1019. package/dist/types-WZUVlTXs.d.ts +907 -0
  1020. package/dist/undo-BdoEJ6Ot.d.ts +44 -0
  1021. package/dist/undo-Dki6Ujak.js +43 -0
  1022. package/dist/upload-claim-Bo2mpBz4.js +32 -0
  1023. package/dist/usage-D27Uw426.d.ts +230 -0
  1024. package/dist/user-change-Ngy8z1fZ.js +133 -0
  1025. package/dist/variants-BaMleC56.js +51 -0
  1026. package/dist/vault-Dx0LaNMX.d.ts +60 -0
  1027. package/dist/vercel-connect/index.d.ts +194 -20
  1028. package/dist/vercel-connect/index.js +265 -33
  1029. package/dist/vercel-sandbox/index.d.ts +166 -0
  1030. package/dist/vercel-sandbox/index.js +171 -0
  1031. package/dist/verify-DY_j4GPZ.js +129 -0
  1032. package/dist/verify-DnL0Fgu0.d.ts +144 -0
  1033. package/dist/view-DmEZA1fL.d.ts +95 -0
  1034. package/dist/view-YnesSUEa.js +244 -0
  1035. package/dist/vue/index.d.ts +12 -22
  1036. package/dist/vue/index.js +10 -16
  1037. package/dist/watch-topic-BB7T05sc.d.ts +29 -0
  1038. package/dist/watch-topic-C2KxpeaB.js +56 -0
  1039. package/dist/wire-DIoLA8VL.js +90 -0
  1040. package/dist/wiring-DJBSLdyF.js +12 -0
  1041. package/dist/workflow-sdk/builder/index.d.ts +12 -14
  1042. package/dist/workflow-sdk/builder/index.js +12 -11
  1043. package/dist/workflow-sdk/index.d.ts +62 -6
  1044. package/dist/workflow-sdk/index.js +75 -10
  1045. package/dist/workflow-sdk/world/index.d.ts +13 -20
  1046. package/dist/workflow-sdk/world/index.js +115 -26
  1047. package/dist/workflow-sdk-BL3wzkdp.js +2749 -0
  1048. package/dist/workflow-sdk-D5zRSwxh.js +302 -0
  1049. package/dist/workflow-sdk-DMpVSMB7.d.ts +171 -0
  1050. package/dist/workflows-DKTw2PZo.d.ts +256 -0
  1051. package/dist/yjs/index.d.ts +3 -5
  1052. package/dist/yjs/index.js +6 -7
  1053. package/package.json +45 -31
  1054. package/schemas/config-v1.json +66 -4
  1055. package/schemas/doctor-report-v1.json +1 -0
  1056. package/schemas/snapshot-v2.json +7 -0
  1057. package/skills/better-supabase/SKILL.md +4 -4
  1058. package/skills/better-supabase/references/block-extensions.md +2 -2
  1059. package/skills/better-supabase/references/troubleshooting.md +1 -1
  1060. package/skills/better-supabase/references/ui-recipes.md +591 -325
  1061. package/skills/better-supabase-api/SKILL.md +1 -1
  1062. package/skills/better-supabase-api/references/adapters.md +3 -3
  1063. package/skills/better-supabase-api/references/ai.md +8 -0
  1064. package/skills/better-supabase-api/references/powersync.md +16 -0
  1065. package/skills/better-supabase-auth/SKILL.md +22 -19
  1066. package/skills/better-supabase-auth/references/authorization-providers.md +1 -1
  1067. package/dist/access-sql-CTDNuxRv.js +0 -385
  1068. package/dist/actor-CoveJgya.d.ts +0 -106
  1069. package/dist/actor-go7p9-CJ.js +0 -150
  1070. package/dist/adapter-D4aNBxhm.js +0 -2301
  1071. package/dist/agents-CM_cCtcr.d.ts +0 -117
  1072. package/dist/ai-cache-BFRKxgZ4.js +0 -87
  1073. package/dist/ai-cache-BTGqckta.d.ts +0 -82
  1074. package/dist/ai-chat-B7_vQvxU.d.ts +0 -619
  1075. package/dist/ai-files-m_2z3rH1.js +0 -339
  1076. package/dist/ai-message-DfaP8sis.js +0 -14
  1077. package/dist/ai-schedules-CZEfo-_M.d.ts +0 -166
  1078. package/dist/anchors-7F34QyHa.d.ts +0 -40
  1079. package/dist/api-3C0AWFeP.js +0 -696
  1080. package/dist/api-59rv5hL6.d.ts +0 -495
  1081. package/dist/api-keys-JE-aykZE.d.ts +0 -213
  1082. package/dist/app-tables-yyVncXEt.d.ts +0 -28
  1083. package/dist/approvals-BfEafAzt.d.ts +0 -129
  1084. package/dist/assistant-B49qATbj.d.ts +0 -157
  1085. package/dist/attachments-BXbLnNxm.js +0 -376
  1086. package/dist/attributes-Bzf51_nc.js +0 -47
  1087. package/dist/auth-DyF_LRxd.js +0 -20
  1088. package/dist/auth-link-B4NL84XU.d.ts +0 -104
  1089. package/dist/auth-link-D3-bU6yz.js +0 -118
  1090. package/dist/auth-module-BbmX-N4L.js +0 -52
  1091. package/dist/auth-reply-Dj124sbX.d.ts +0 -11
  1092. package/dist/auth-reply-tlXB2FQ9.js +0 -31
  1093. package/dist/authorization-CDU9tYA_.d.ts +0 -3860
  1094. package/dist/authorization-hooks-BWhkMZfH.d.ts +0 -221
  1095. package/dist/authorizer-B6X09otb.d.ts +0 -118
  1096. package/dist/authorizer-BGhXaDmo.js +0 -172
  1097. package/dist/automation-D41DXyvT.js +0 -75
  1098. package/dist/automations-8L3NEuoq.js +0 -29
  1099. package/dist/automations-BKjJpktQ.js +0 -33
  1100. package/dist/automations-BMuqwZZn.js +0 -314
  1101. package/dist/automations-EzXteupo.js +0 -31
  1102. package/dist/availability-BdeKCHpl.d.ts +0 -236
  1103. package/dist/base64-B9Wlsdj7.js +0 -42
  1104. package/dist/batch-limit-DKVQDz4o.js +0 -5
  1105. package/dist/before-route-B23K2zYU.js +0 -30
  1106. package/dist/bind-p7asfI6H.d.ts +0 -104
  1107. package/dist/block-authors-Bw3zdzgl.js +0 -14
  1108. package/dist/block-authors-DzXLUiIq.d.ts +0 -12
  1109. package/dist/block-env-B8wG3xeh.d.ts +0 -32
  1110. package/dist/block-event-listener-Bu6G0TFH.js +0 -16
  1111. package/dist/block-events-IWAyafO3.js +0 -83
  1112. package/dist/block-fields-BE7pInWZ.d.ts +0 -58
  1113. package/dist/block-fields-BjXgX_5c.js +0 -140
  1114. package/dist/block-helpers-B0f0ZVb5.js +0 -437
  1115. package/dist/block-helpers-D5emQ2O6.d.ts +0 -62
  1116. package/dist/block-hooks-B8itxzEE.d.ts +0 -117
  1117. package/dist/block-hooks-DKtz0HRh.js +0 -130
  1118. package/dist/block-method-C9hWdHom.js +0 -21
  1119. package/dist/block-method-CiVa2G-J.d.ts +0 -14
  1120. package/dist/block-subjects-C1_9DkSA.d.ts +0 -6
  1121. package/dist/block-subjects-DFSuFY1a.js +0 -55
  1122. package/dist/block-tenant-DHp7subc.js +0 -14
  1123. package/dist/block-transport-9EUA3q_I.d.ts +0 -69
  1124. package/dist/bookings-xsmM2TA_.d.ts +0 -289
  1125. package/dist/bucket-SvRQwYS4.d.ts +0 -705
  1126. package/dist/build-CH2N3Yf0.js +0 -2073
  1127. package/dist/build-DbIRFcHQ.js +0 -735
  1128. package/dist/carrier-KzeYXVrW.d.ts +0 -169
  1129. package/dist/casing-DdFWEtqr.js +0 -16
  1130. package/dist/channel-JcMd5lNP.d.ts +0 -105
  1131. package/dist/channels-CfcFPuo_.js +0 -114
  1132. package/dist/claims-Bp9My7XP.js +0 -88
  1133. package/dist/claims-DTy6R6my.js +0 -63
  1134. package/dist/cli/_format-Cax5EsM9.js +0 -101
  1135. package/dist/cli/add-BdhGOwkB.js +0 -1
  1136. package/dist/cli/add-D4w-Axib.js +0 -1231
  1137. package/dist/cli/add-Dggyehsy.js +0 -99
  1138. package/dist/cli/agent-CbuPvI2x.js +0 -185
  1139. package/dist/cli/app-table-files-CiGuwLkO.js +0 -346
  1140. package/dist/cli/arazzo-1.0-BalU61-_.js +0 -532
  1141. package/dist/cli/arazzo-1.1-Bnfasbun.js +0 -705
  1142. package/dist/cli/args-UEwg0l-N.js +0 -27
  1143. package/dist/cli/asyncapi-3.0.0-C78dBjR6.js +0 -5593
  1144. package/dist/cli/asyncapi-3.1.0-g-7aIfV1.js +0 -5833
  1145. package/dist/cli/backfill-DjVjXW_P.js +0 -293
  1146. package/dist/cli/blocks-Bbmb6W_F.js +0 -1
  1147. package/dist/cli/blocks-jRL9K1R8.js +0 -156
  1148. package/dist/cli/cache-BuoIFlUJ.js +0 -607
  1149. package/dist/cli/codemod-DRavXBCb.js +0 -2435
  1150. package/dist/cli/codemod-block-renames-BuSaTE_G.js +0 -239
  1151. package/dist/cli/command-DIPmo0wh.js +0 -997
  1152. package/dist/cli/compare-BmIWVEui.js +0 -9
  1153. package/dist/cli/completion-DxPxMtyP.js +0 -211
  1154. package/dist/cli/completion-DyLMSjOD.js +0 -1
  1155. package/dist/cli/completion-FUgqm2-N.js +0 -30
  1156. package/dist/cli/config-BfapErxs.js +0 -47
  1157. package/dist/cli/config-Cskysxp-.js +0 -2000
  1158. package/dist/cli/config-Df5cXWNN.js +0 -1
  1159. package/dist/cli/config-edit-CrWfk8s3.js +0 -621
  1160. package/dist/cli/config-group-CP-B9uRt.js +0 -390
  1161. package/dist/cli/content-mapper-BCtyfKXl.js +0 -182
  1162. package/dist/cli/db-CQCLx7cx.js +0 -78
  1163. package/dist/cli/db-CWvH1_46.js +0 -247
  1164. package/dist/cli/detect-D9JaAX20.js +0 -84
  1165. package/dist/cli/dist-D_VbPAMR.js +0 -129
  1166. package/dist/cli/dist-DuiMMRbJ.js +0 -1112
  1167. package/dist/cli/doctor-Di2ZekfN.js +0 -4659
  1168. package/dist/cli/env-B2CbnbzD.js +0 -143
  1169. package/dist/cli/env-BK0xKMeU.js +0 -1113
  1170. package/dist/cli/env-Bat6ogep.js +0 -1
  1171. package/dist/cli/env-CynGCICL.js +0 -1
  1172. package/dist/cli/errors-BTe6A15O.js +0 -98
  1173. package/dist/cli/exec-Ca5s-ygi.js +0 -463
  1174. package/dist/cli/fastest-levenshtein-dhRRvrM2.js +0 -120
  1175. package/dist/cli/files-CX71yBm8.js +0 -1010
  1176. package/dist/cli/fresh-import-DzgsGHkX.js +0 -40
  1177. package/dist/cli/gen-STKC9vkK.js +0 -394
  1178. package/dist/cli/guards-CUlDNYZs.js +0 -8
  1179. package/dist/cli/in-stack-diff-Cp-tVPj2.js +0 -186
  1180. package/dist/cli/init-DW6_nIwj.js +0 -559
  1181. package/dist/cli/io-DH1kcmmP.js +0 -37
  1182. package/dist/cli/json5-ChRycquj.js +0 -787
  1183. package/dist/cli/jsonc-C8M0EhHB.js +0 -1
  1184. package/dist/cli/jsonc-D5Fu67jw.js +0 -45
  1185. package/dist/cli/keys-V-HcO-21.js +0 -106
  1186. package/dist/cli/legacy-prefix-R7UChFFl.js +0 -154
  1187. package/dist/cli/live-0G4Plw3K.js +0 -341
  1188. package/dist/cli/mcp-flKS8iU5.js +0 -241
  1189. package/dist/cli/metadata-VARUbXEe.js +0 -150
  1190. package/dist/cli/migrate-Bkq07XcT.js +0 -46
  1191. package/dist/cli/migration-safety-BfVeza5j.js +0 -928
  1192. package/dist/cli/migrations-BCq7Zs2E.js +0 -117
  1193. package/dist/cli/module-migration-lbeUrsYv.js +0 -119
  1194. package/dist/cli/moved-DNOtp9LA.js +0 -254
  1195. package/dist/cli/ohash-BjQY1cBb.js +0 -277
  1196. package/dist/cli/openapi-3.0-t7xwkuRH.js +0 -928
  1197. package/dist/cli/openapi-3.1-CVze7tBS.js +0 -870
  1198. package/dist/cli/openapi-3.2-CFoMYM01.js +0 -1031
  1199. package/dist/cli/orphans-BAboqyVM.js +0 -28
  1200. package/dist/cli/parse-BPf3kGnc.js +0 -182
  1201. package/dist/cli/powersync-B15CfH5Y.js +0 -284
  1202. package/dist/cli/powersync-DnBsDchT.js +0 -1
  1203. package/dist/cli/preset-BwmIfFnh.js +0 -101
  1204. package/dist/cli/print-DjxpBRnv.js +0 -68
  1205. package/dist/cli/prompts-jqnr94b9.js +0 -1140
  1206. package/dist/cli/providers-dyxcHQY3.js +0 -301
  1207. package/dist/cli/redact-KGAk2Ul9.js +0 -38
  1208. package/dist/cli/remove-BLq5gbal.js +0 -239
  1209. package/dist/cli/render-CizUf3RW.js +0 -2225
  1210. package/dist/cli/rolldown-runtime-kJ_i4yPo.js +0 -26
  1211. package/dist/cli/run-ChEjR7yw.js +0 -63
  1212. package/dist/cli/run-ChOY6s4o.js +0 -1459
  1213. package/dist/cli/run-MwM__teL.js +0 -705
  1214. package/dist/cli/seed-BOun22-k.js +0 -1
  1215. package/dist/cli/seed-CDnL4Tnc.js +0 -188
  1216. package/dist/cli/shared-DV5wIv-7.js +0 -151
  1217. package/dist/cli/shell-Btv_4Yhe.js +0 -10
  1218. package/dist/cli/skills-DM3oeIxY.js +0 -121
  1219. package/dist/cli/snapshot-B5LXkVMC.js +0 -729
  1220. package/dist/cli/source-BoLNG_2A.js +0 -320
  1221. package/dist/cli/source-args-v8ljFDfc.js +0 -59
  1222. package/dist/cli/spec-D6QeE2Zx.js +0 -1
  1223. package/dist/cli/spec-Dz-PGCaM.js +0 -7530
  1224. package/dist/cli/sql-layout-zo02f3Dm.js +0 -261
  1225. package/dist/cli/stack-ClESAZYf.js +0 -135
  1226. package/dist/cli/stack-env-3ziggrU3.js +0 -93
  1227. package/dist/cli/stack-status-BkkYRlXG.js +0 -46
  1228. package/dist/cli/stacks-CiDBH1dB.js +0 -232
  1229. package/dist/cli/style-Bm2X5JrN.js +0 -35
  1230. package/dist/cli/supabase-toml-CncmQbO0.js +0 -1164
  1231. package/dist/cli/sync-m-oZ_SyI.js +0 -322
  1232. package/dist/cli/table-dyKddjwo.js +0 -89
  1233. package/dist/cli/toml-DB-MNnFs.js +0 -424
  1234. package/dist/cli/topics-BpdnYmWb.js +0 -30
  1235. package/dist/cli/trace-VbdO6bcN.js +0 -7
  1236. package/dist/cli/upgrade-C9sgVZ5z.js +0 -272
  1237. package/dist/cli/upgrade-WwEJaX3i.js +0 -41
  1238. package/dist/cli/validate-B3lF3-jB.js +0 -7522
  1239. package/dist/cli/version-D2BQuqta.js +0 -4
  1240. package/dist/cli/yaml-CYCbJ6et.js +0 -2252
  1241. package/dist/client-C_mlji5R.js +0 -288
  1242. package/dist/clone-CkG0-hlI.js +0 -33
  1243. package/dist/cloud-event-0pQ9vFNS.d.ts +0 -64
  1244. package/dist/cloud-event-XsM53POL.js +0 -63
  1245. package/dist/codecs-CMWlhHZ0.d.ts +0 -222
  1246. package/dist/codecs-CSUFGrdP.js +0 -358
  1247. package/dist/compiler-BEeVWXPS.d.ts +0 -14
  1248. package/dist/compose-DKW0Tr3e.js +0 -53
  1249. package/dist/composite-BJ9s-IJJ.d.ts +0 -83
  1250. package/dist/composite-CBRbvn5j.js +0 -130
  1251. package/dist/config-bqKaPjst.js +0 -1679
  1252. package/dist/config-r7njjNgh.js +0 -1111
  1253. package/dist/connectors-uC5baoFV.d.ts +0 -147
  1254. package/dist/context-DBicfUNz.js +0 -41
  1255. package/dist/context-nbYYjv7U.d.ts +0 -4344
  1256. package/dist/controller-BEliOBOv.js +0 -79
  1257. package/dist/controller-TRocodqG.d.ts +0 -52
  1258. package/dist/controller-qG-B1eDn.js +0 -73
  1259. package/dist/conversion-Dq1S7xzE.js +0 -77
  1260. package/dist/conversion-g8HzH9My.d.ts +0 -86
  1261. package/dist/cors-h_v7TPxl.js +0 -24
  1262. package/dist/cors-kLq6VM06.d.ts +0 -15
  1263. package/dist/create-blocks-BfrDUSM6.js +0 -370
  1264. package/dist/cron-DdT4ti8a.js +0 -148
  1265. package/dist/cron-route-FjKgRvTY.js +0 -24
  1266. package/dist/csv-2rXGPNtP.js +0 -89
  1267. package/dist/csv-DhHQS2x_.d.ts +0 -28
  1268. package/dist/data-engine-D1BkmBoR.js +0 -173
  1269. package/dist/data-engine-rvbR2C4F.d.ts +0 -273
  1270. package/dist/data-hooks-CdcZfVS1.js +0 -280
  1271. package/dist/db-exception-Lngc1W49.js +0 -31
  1272. package/dist/deal-forecast-CKBnRodz.js +0 -39
  1273. package/dist/deal-forecast-LwO-Z4_C.d.ts +0 -23
  1274. package/dist/define-D-dLADd5.js +0 -2084
  1275. package/dist/define-D8_9X5fZ.d.ts +0 -1263
  1276. package/dist/define-block-BGqOO8B3.js +0 -64
  1277. package/dist/define-block-DWVZSZv1.d.ts +0 -1687
  1278. package/dist/delegation-C7eWP2r8.d.ts +0 -14
  1279. package/dist/delegation-DGOIiT8k.js +0 -153
  1280. package/dist/delivery-Bm0jxmzI.js +0 -29
  1281. package/dist/delivery-n6lZGuGx.d.ts +0 -71
  1282. package/dist/documents-BbwYyynk.d.ts +0 -152
  1283. package/dist/email-B3YxEzwC.d.ts +0 -42
  1284. package/dist/embeddings-I3s5sTDt.d.ts +0 -78
  1285. package/dist/embeddings-vVzseUw0.js +0 -128
  1286. package/dist/ended-EZzN9QTM.d.ts +0 -26
  1287. package/dist/entitlements-B1i1-wfe.d.ts +0 -54
  1288. package/dist/entitlements-tGL6-69B.js +0 -45
  1289. package/dist/entity-naming-Dtyq5sKE.js +0 -131
  1290. package/dist/entity-schema-B1YmMtP8.js +0 -39
  1291. package/dist/envelope-DEI2iX-d.js +0 -90
  1292. package/dist/errors-BVFgt8BZ.js +0 -328
  1293. package/dist/errors-CyxMxzlu.js +0 -44
  1294. package/dist/escape-like-DHfx6jRr.js +0 -7
  1295. package/dist/escape-like-PReMbEEU.d.ts +0 -30
  1296. package/dist/eve-BfhVFV33.d.ts +0 -157
  1297. package/dist/event-calendar-DVLs2wUO.d.ts +0 -65
  1298. package/dist/event-map-CtPFhcOp.js +0 -19
  1299. package/dist/events-B2qbZps6.d.ts +0 -854
  1300. package/dist/events-D6IZ5CE8.js +0 -82
  1301. package/dist/events-DuLhzjP6.js +0 -26
  1302. package/dist/executor-BfirBzOr.d.ts +0 -174
  1303. package/dist/executor-BlS0kCrN.d.ts +0 -104
  1304. package/dist/executor-C2Ne-Scm.js +0 -208
  1305. package/dist/executor-DXQIx4sW.d.ts +0 -37
  1306. package/dist/executor-DqIci3Jb.js +0 -486
  1307. package/dist/executor-WolvKszH.js +0 -843
  1308. package/dist/extension-DTaHjwdc.js +0 -59
  1309. package/dist/extension-DeAd_MqI.js +0 -121
  1310. package/dist/extension-DzCc0IOd.js +0 -103
  1311. package/dist/extension-mGylYROs.js +0 -53
  1312. package/dist/extension-shared-Djm8mGHD.js +0 -60
  1313. package/dist/extra-CGQ2_q3S.js +0 -10
  1314. package/dist/field-errors-tJvehEFc.d.ts +0 -216
  1315. package/dist/field-formats-C6QKA3UR.js +0 -102
  1316. package/dist/field-formats-CAFNkKSN.d.ts +0 -38
  1317. package/dist/fields-BBm49w-E.js +0 -108
  1318. package/dist/fields-snbaZ14h.d.ts +0 -78
  1319. package/dist/filter-evaluate-BRpNiNPG.d.ts +0 -37
  1320. package/dist/filter-evaluate-lCToXzZI.js +0 -217
  1321. package/dist/filter-query-CQ6d5GnQ.js +0 -566
  1322. package/dist/filter-query-DBt7OKuH.d.ts +0 -133
  1323. package/dist/flags-DDKTThrO.d.ts +0 -246
  1324. package/dist/flags-DF_SCqp5.js +0 -279
  1325. package/dist/form-definition-BTpM_tz1.js +0 -363
  1326. package/dist/form-definition-BjEtH8BT.d.ts +0 -119
  1327. package/dist/format-u-65igKI.d.ts +0 -79
  1328. package/dist/framework-DVYTtQXA.d.ts +0 -47
  1329. package/dist/framework-DYEUraqt.js +0 -58
  1330. package/dist/function-contract-DxFNOmsm.d.ts +0 -27
  1331. package/dist/function-contract-pEmsaUIf.js +0 -8
  1332. package/dist/gateway-Ve7cByEr.d.ts +0 -115
  1333. package/dist/gateway-options-BlVCqgb8.d.ts +0 -29
  1334. package/dist/gateway-options-Cl74B7k6.js +0 -27
  1335. package/dist/guards-6F2bCtQR.js +0 -12
  1336. package/dist/guest-actions-1T1DeS5Y.d.ts +0 -5
  1337. package/dist/guest-actions-B7zdhfnh.js +0 -9
  1338. package/dist/history-GH1HJWQV.js +0 -271
  1339. package/dist/hmac-B3CTTlfv.js +0 -23
  1340. package/dist/http-7-UvHjQe.js +0 -28
  1341. package/dist/http-BjjojWg3.js +0 -40
  1342. package/dist/http-DzbloBR-.js +0 -141
  1343. package/dist/image-url-_d7xYsXK.js +0 -84
  1344. package/dist/impersonation-DM3oWNoD.js +0 -62
  1345. package/dist/impersonation-YTa9dZUv.d.ts +0 -28
  1346. package/dist/inbox-c8B86Trp.d.ts +0 -321
  1347. package/dist/index-8US7qlvW.d.ts +0 -158
  1348. package/dist/index-B4wttiLh.d.ts +0 -407
  1349. package/dist/index-BKrxynq9.d.ts +0 -240
  1350. package/dist/index-BM6NmKSc.d.ts +0 -588
  1351. package/dist/index-BkzXwuIN.d.ts +0 -338
  1352. package/dist/index-CWAQRWY8.d.ts +0 -729
  1353. package/dist/index-Cxsnd-OL.d.ts +0 -305
  1354. package/dist/index-DbyDZZlc.d.ts +0 -53
  1355. package/dist/index-NRMMhhEi.d.ts +0 -104
  1356. package/dist/index-X2fkPUwb.d.ts +0 -51
  1357. package/dist/index-pZn6S_iq.d.ts +0 -149
  1358. package/dist/index-zsgNmE8m.d.ts +0 -665
  1359. package/dist/instance-property-hRh88y_s.js +0 -7
  1360. package/dist/instances-C7qUTjhJ.js +0 -16603
  1361. package/dist/invalidate-DMp4eqfF.d.ts +0 -21
  1362. package/dist/iso4217-B-durg_y.js +0 -176
  1363. package/dist/json-DaByVJpw.js +0 -22
  1364. package/dist/json-schema-DHJxiizN.js +0 -888
  1365. package/dist/jwks-cache-DEsKI0hJ.js +0 -49
  1366. package/dist/jws-D0toeQlA.d.ts +0 -66
  1367. package/dist/jws-DOgHJKHb.js +0 -205
  1368. package/dist/kit-B8yWCRN7.d.ts +0 -94
  1369. package/dist/kit-Bcd9wYCV.js +0 -133
  1370. package/dist/knowledge-CsLPACGJ.d.ts +0 -217
  1371. package/dist/knowledge-tCrrU99q.js +0 -300
  1372. package/dist/list-query-BcU8NnNL.d.ts +0 -222
  1373. package/dist/list-query-BnpA2BDg.js +0 -559
  1374. package/dist/live-C21DgbsD.js +0 -275
  1375. package/dist/logger-DWVYUmwi.d.ts +0 -18
  1376. package/dist/logger-glM28NVN.js +0 -21
  1377. package/dist/lookup-BaP5bI27.js +0 -18
  1378. package/dist/management-wtecfrNf.d.ts +0 -57
  1379. package/dist/message-Bg4TKA12.d.ts +0 -99
  1380. package/dist/messages-ecPW_nOv.js +0 -492
  1381. package/dist/messaging-DQP09JsY.d.ts +0 -297
  1382. package/dist/methods-Cund9ZBe.js +0 -11
  1383. package/dist/metric-definition-BjxVn4R5.js +0 -117
  1384. package/dist/metric-definition-EAYI1r2n.d.ts +0 -69
  1385. package/dist/mfa-oIOYTpvc.d.ts +0 -36
  1386. package/dist/model-hwpvole9.d.ts +0 -340
  1387. package/dist/model-messages-CkZSDDHP.js +0 -206
  1388. package/dist/model-messages-DrR4lZ_c.d.ts +0 -34
  1389. package/dist/money-BNRdJQzA.d.ts +0 -91
  1390. package/dist/money-BZl985O-.js +0 -197
  1391. package/dist/money-codec-BJuS2zEW.js +0 -41
  1392. package/dist/my-work-kinds-BU3SlA-6.js +0 -11
  1393. package/dist/node-headers-BPtMP4_V.d.ts +0 -27
  1394. package/dist/node-headers-C71zNQHe.js +0 -55
  1395. package/dist/operations-CB9atU2e.d.ts +0 -6
  1396. package/dist/operations-DVHRHvv6.js +0 -29
  1397. package/dist/optional-peer-C1NbBRJm.js +0 -32
  1398. package/dist/options-3OYOU56e.js +0 -11
  1399. package/dist/options-56zYYXxc.js +0 -10
  1400. package/dist/options-5WvWOkAm.d.ts +0 -26
  1401. package/dist/options-62woPFn3.js +0 -12
  1402. package/dist/options-7ixoOoap.js +0 -10
  1403. package/dist/options-9dSU5RML.js +0 -5
  1404. package/dist/options-B0YZtAkb.d.ts +0 -15
  1405. package/dist/options-B2Kz_tCx.js +0 -10
  1406. package/dist/options-B5E2MGIz.js +0 -15
  1407. package/dist/options-B685YSzQ.js +0 -5
  1408. package/dist/options-B692WoK6.js +0 -9
  1409. package/dist/options-BHU1wc74.js +0 -5
  1410. package/dist/options-BHy0Z5Zd.js +0 -5
  1411. package/dist/options-BJtdsK7b.js +0 -8
  1412. package/dist/options-BKBy5wM_.js +0 -16
  1413. package/dist/options-BKDxrPvE.js +0 -5
  1414. package/dist/options-BLfymS4s.js +0 -5
  1415. package/dist/options-BOCRbzh3.js +0 -5
  1416. package/dist/options-BOqfYsM1.js +0 -13
  1417. package/dist/options-BQWJqwHO.js +0 -9
  1418. package/dist/options-BQunK6_Y.js +0 -8
  1419. package/dist/options-BQyrZjwM.js +0 -28
  1420. package/dist/options-BR9xTHZW.js +0 -5
  1421. package/dist/options-BRUdd5jY.js +0 -8
  1422. package/dist/options-BSsYXjhC.js +0 -9
  1423. package/dist/options-BTmaRzx2.d.ts +0 -60
  1424. package/dist/options-BUCQYAeJ.d.ts +0 -10
  1425. package/dist/options-B_NrjVDt.d.ts +0 -12
  1426. package/dist/options-BawzwlmC.js +0 -11
  1427. package/dist/options-BbLDAp7G.d.ts +0 -10
  1428. package/dist/options-BfPsL7E2.js +0 -9
  1429. package/dist/options-Bfmwwc78.js +0 -8
  1430. package/dist/options-BhsdveDk.js +0 -21
  1431. package/dist/options-BomoTH-8.js +0 -5
  1432. package/dist/options-BtjkzIVh.js +0 -8
  1433. package/dist/options-Bvi9bl4H.js +0 -5
  1434. package/dist/options-BwKNmaJo.js +0 -5
  1435. package/dist/options-BxpLtyk-.js +0 -18
  1436. package/dist/options-BzB2QxL3.js +0 -5
  1437. package/dist/options-C078wBP0.js +0 -5
  1438. package/dist/options-C3AdsFJ6.js +0 -9
  1439. package/dist/options-C7C5OhmL.d.ts +0 -8
  1440. package/dist/options-C87u6eSa.js +0 -10
  1441. package/dist/options-CBAEGxwS.js +0 -8
  1442. package/dist/options-CDSCkYxu.d.ts +0 -14
  1443. package/dist/options-CDUr8zzX.js +0 -8
  1444. package/dist/options-CFjGxfa8.js +0 -5
  1445. package/dist/options-CI6P0xhV.js +0 -10
  1446. package/dist/options-CJFMK9A_.js +0 -8
  1447. package/dist/options-CLpgx7en.js +0 -10
  1448. package/dist/options-COo7_3MX.js +0 -10
  1449. package/dist/options-CSCXNYJO.d.ts +0 -8
  1450. package/dist/options-CTXHj9zr.js +0 -16
  1451. package/dist/options-CTl8T88w.js +0 -11
  1452. package/dist/options-CUIOOv4z.js +0 -15
  1453. package/dist/options-CZDmtsbV.js +0 -8
  1454. package/dist/options-CZTscdPB.js +0 -5
  1455. package/dist/options-CZdKndeo.js +0 -9
  1456. package/dist/options-C_7g9TTq.d.ts +0 -12
  1457. package/dist/options-Cb2FOFj5.js +0 -5
  1458. package/dist/options-CbOstLa7.js +0 -5
  1459. package/dist/options-CcXgWlvm.js +0 -24
  1460. package/dist/options-CfVPctAw.js +0 -89
  1461. package/dist/options-Cjgaf8ub.js +0 -8
  1462. package/dist/options-CoSPgWKy.js +0 -9
  1463. package/dist/options-CpZ2HlSU.js +0 -32
  1464. package/dist/options-CsSe8Nba.js +0 -8
  1465. package/dist/options-CsvJR-r2.js +0 -9
  1466. package/dist/options-Cucv6sWP.js +0 -12
  1467. package/dist/options-CyjL9lTf.js +0 -5
  1468. package/dist/options-D-OOO9V2.d.ts +0 -10
  1469. package/dist/options-D0Y6ZMe8.js +0 -5
  1470. package/dist/options-D0bzZx9a.d.ts +0 -10
  1471. package/dist/options-D0sj5abR.js +0 -9
  1472. package/dist/options-D1hSuf50.d.ts +0 -12
  1473. package/dist/options-D610Fa6T.js +0 -5
  1474. package/dist/options-D96dScev.js +0 -24
  1475. package/dist/options-DFpyP1bg.js +0 -5
  1476. package/dist/options-DJEcS4DX.js +0 -5
  1477. package/dist/options-DJbN3bi9.js +0 -11
  1478. package/dist/options-DKoQoRCy.js +0 -13
  1479. package/dist/options-DM1qaMMQ.js +0 -9
  1480. package/dist/options-DNgSwhsm.js +0 -11
  1481. package/dist/options-DOIwzRXL.js +0 -16
  1482. package/dist/options-DRIgHh4O.d.ts +0 -16
  1483. package/dist/options-DRrZmJyI.js +0 -8
  1484. package/dist/options-DUMUsvml.js +0 -5
  1485. package/dist/options-DWwL5Kaz.js +0 -9
  1486. package/dist/options-DZHZYlpD.js +0 -10
  1487. package/dist/options-DZLkeqWn.js +0 -9
  1488. package/dist/options-DZRpXKQE.js +0 -5
  1489. package/dist/options-DZen3UiC.js +0 -14
  1490. package/dist/options-D_9Vxx7f.js +0 -8
  1491. package/dist/options-DcHl59RC.js +0 -11
  1492. package/dist/options-Dcaql09y.js +0 -11
  1493. package/dist/options-DcnBNYmV.js +0 -8
  1494. package/dist/options-DdpM-fiP.js +0 -9
  1495. package/dist/options-DhoLMknl.js +0 -10
  1496. package/dist/options-DlohRAYd.d.ts +0 -13
  1497. package/dist/options-Dpy-Ruo-.js +0 -14
  1498. package/dist/options-DsVuVRH3.d.ts +0 -17
  1499. package/dist/options-DtAJxfHS.js +0 -8
  1500. package/dist/options-Dz9Yo52Z.js +0 -8
  1501. package/dist/options-HnfETSHr.d.ts +0 -19
  1502. package/dist/options-LqUXTpML.js +0 -8
  1503. package/dist/options-MsloEAIB.js +0 -5
  1504. package/dist/options-P2FxqYpd.js +0 -17
  1505. package/dist/options-_1gAIMq7.d.ts +0 -60
  1506. package/dist/options-aT89JqlB.js +0 -5
  1507. package/dist/options-cVKZu9b0.js +0 -9
  1508. package/dist/options-eTepQ1rZ.js +0 -15
  1509. package/dist/options-fkShrmGQ.js +0 -8
  1510. package/dist/options-gUvfr3no.js +0 -11
  1511. package/dist/options-hynwKWuf.js +0 -20
  1512. package/dist/options-jsOCvLUz.js +0 -10
  1513. package/dist/options-o5wCw8H7.d.ts +0 -14
  1514. package/dist/options-p49DFg3H.js +0 -8
  1515. package/dist/options-pYNpXKcg.js +0 -8
  1516. package/dist/options-qtETCHzW.js +0 -10
  1517. package/dist/options-rnKlqYEr.js +0 -5
  1518. package/dist/options-sU_zGkiV.js +0 -10
  1519. package/dist/options-xq4MXG1M.js +0 -5
  1520. package/dist/options-zzlznRA7.js +0 -10
  1521. package/dist/outbox-BZ712Z3X.d.ts +0 -199
  1522. package/dist/payments-BXvabJOw.js +0 -16
  1523. package/dist/payments-BYcN34Fp.d.ts +0 -114
  1524. package/dist/permissions-controller-BMsqIE5T.js +0 -34
  1525. package/dist/pg-error-B5QLDcbG.js +0 -26
  1526. package/dist/plugin-AKwwe2gF.js +0 -48
  1527. package/dist/pool-DDR1ndk7.d.ts +0 -123
  1528. package/dist/pool-errors-JUBcGrre.js +0 -27
  1529. package/dist/ports-DvpNseap.js +0 -152
  1530. package/dist/ports-hpbyMySO.d.ts +0 -89
  1531. package/dist/postgrest-AJc8hnJU.d.ts +0 -53
  1532. package/dist/postgrest-executor-B_Uezhrm.js +0 -1068
  1533. package/dist/preset-DCdEnJj9.js +0 -1042
  1534. package/dist/problem-Bf0cJ7tk.js +0 -162
  1535. package/dist/problem-DNwN8iGz.d.ts +0 -79
  1536. package/dist/project-B32wb5J6.js +0 -1760
  1537. package/dist/provider-B6g7rBZX.js +0 -57
  1538. package/dist/provider-CWjzAIX9.d.ts +0 -112
  1539. package/dist/push-token-D6REHMMw.js +0 -16
  1540. package/dist/push-token-DQ1ycFPU.d.ts +0 -24
  1541. package/dist/queries-BWYYS9um.js +0 -239
  1542. package/dist/range-DwpWe8e7.js +0 -7
  1543. package/dist/range-p5V4rBhZ.d.ts +0 -8
  1544. package/dist/rank-keys-DcPMt_Jk.js +0 -60
  1545. package/dist/rank-result-BBJIK-k_.js +0 -18
  1546. package/dist/rank-result-Bwe7igy-.d.ts +0 -14
  1547. package/dist/rate-limit-BWKGlhTM.js +0 -49
  1548. package/dist/rate-limit-Bztf32cl.d.ts +0 -50
  1549. package/dist/rate-limit-fZ_d8gSE.js +0 -380
  1550. package/dist/ratelimit-headers-kEcXyO3H.js +0 -62
  1551. package/dist/react-BKCnIuZs.js +0 -79
  1552. package/dist/react-CcrQQl0_.js +0 -1016
  1553. package/dist/read-set-B1sDib5O.js +0 -199
  1554. package/dist/realtime-status-BhNkb-Ow.d.ts +0 -8
  1555. package/dist/realtime-status-asHvhiOh.js +0 -11
  1556. package/dist/record-bindings-Z51mGfhB.js +0 -26
  1557. package/dist/record-form-CubgBrtI.d.ts +0 -82
  1558. package/dist/record-type-DRbnlj5q.js +0 -221
  1559. package/dist/recordings-DeZYx-Kv.d.ts +0 -119
  1560. package/dist/refresh-D02Pbf5B.d.ts +0 -54
  1561. package/dist/refusal-B0VmlAxF.d.ts +0 -32
  1562. package/dist/refusal-DDlInPff.js +0 -64
  1563. package/dist/relay-CIKcAVjf.js +0 -248
  1564. package/dist/replicas-Dyoh3CEg.js +0 -94
  1565. package/dist/resolve-B0mW2m7f.js +0 -932
  1566. package/dist/resolve-CtX6T0c0.d.ts +0 -288
  1567. package/dist/resolved-names-iLBOUaib.js +0 -133
  1568. package/dist/resource-BUJcZKiW.js +0 -520
  1569. package/dist/resource-DvgXqZB_.js +0 -105
  1570. package/dist/resource-WxN0IsvB.d.ts +0 -123
  1571. package/dist/resource-execute-BzqR8DdD.d.ts +0 -15
  1572. package/dist/resource-schemas-up6bKOUi.js +0 -82
  1573. package/dist/resource-types-BVbHgTPg.d.ts +0 -157
  1574. package/dist/resources-BSbRa0Ab.d.ts +0 -7
  1575. package/dist/resources-jb3R6rEa.js +0 -64
  1576. package/dist/respond-CZMWbUs3.js +0 -107
  1577. package/dist/respond-Dzu_-EPH.d.ts +0 -112
  1578. package/dist/result-DZeA5KS6.d.ts +0 -351
  1579. package/dist/result-ntFBW2p2.js +0 -146
  1580. package/dist/rows-BdqXmiB-.js +0 -80
  1581. package/dist/rows-jijHLVE_.js +0 -39
  1582. package/dist/rrule-C9Ot6ax8.js +0 -290
  1583. package/dist/run-state-BMCD_1Lt.d.ts +0 -13
  1584. package/dist/run-state-CgBKzYMW.js +0 -13
  1585. package/dist/run-watch-B-LoK5m1.js +0 -53
  1586. package/dist/runtime-CoKxZibd.js +0 -45
  1587. package/dist/sales-lines-BsmrNHe9.d.ts +0 -38
  1588. package/dist/sales-lines-DO7oRu1o.js +0 -45
  1589. package/dist/sales-shared-BuTA8JK7.js +0 -22
  1590. package/dist/schemas-CLOTvdsC.js +0 -216
  1591. package/dist/scope-DgWjuXUw.js +0 -90
  1592. package/dist/scores-Y8TvyJi1.d.ts +0 -174
  1593. package/dist/scores-bY2Is0kx.js +0 -177
  1594. package/dist/search-Cn_DGluL.js +0 -9
  1595. package/dist/server-types-BkTIxW_H.d.ts +0 -597
  1596. package/dist/session-BOzx2qHC.d.ts +0 -100
  1597. package/dist/session-status-BP8eYVnA.d.ts +0 -82
  1598. package/dist/shared-BeHTi8Fu.js +0 -17
  1599. package/dist/shared-Bf-I13Ht.js +0 -91
  1600. package/dist/shared-CRRfQAKG.d.ts +0 -11
  1601. package/dist/sign-in-BzihC_8k.d.ts +0 -50
  1602. package/dist/sign-in-CmPK1AgM.js +0 -402
  1603. package/dist/sign-in-Cyj3ZlFX.js +0 -703
  1604. package/dist/sign-in-D54FLMQy.d.ts +0 -55
  1605. package/dist/signatures-CX1b4WHa.js +0 -145
  1606. package/dist/signatures-Dkx9OE8j.d.ts +0 -43
  1607. package/dist/signers-ZmxO1I05.d.ts +0 -390
  1608. package/dist/signing-keys-CWtpMask.js +0 -164
  1609. package/dist/signing-keys-udgP7Aod.d.ts +0 -119
  1610. package/dist/simplify-DDO0j0LI.js +0 -83
  1611. package/dist/spec-BMvCCNnd.js +0 -124
  1612. package/dist/spec-pins-BZkKfwY8.d.ts +0 -127
  1613. package/dist/spec-pins-D3zDek-u.js +0 -62
  1614. package/dist/sql-CYt7EhH0.js +0 -421
  1615. package/dist/sql-CyeDg3Yh.js +0 -138146
  1616. package/dist/sql-type-iUSZpaUu.js +0 -34
  1617. package/dist/sso-CkU_4mtK.d.ts +0 -161
  1618. package/dist/sso-DdDpJQzw.js +0 -217
  1619. package/dist/standard-BA3mLh6w.js +0 -25
  1620. package/dist/standard-DBV730sF.d.ts +0 -7
  1621. package/dist/stats-BHl1-zj9.js +0 -83
  1622. package/dist/statuses-Alll5Ip6.js +0 -29
  1623. package/dist/statuses-zRcc2TeZ.js +0 -28
  1624. package/dist/storage-api-Dg78Wqsg.js +0 -10
  1625. package/dist/store-CpheI-lN.d.ts +0 -83
  1626. package/dist/store-McN-2esd.js +0 -69
  1627. package/dist/stripe-BJUfp5jM.js +0 -32
  1628. package/dist/stripe-X22LjuH-.d.ts +0 -156
  1629. package/dist/subject-readers-CB5Te02u.d.ts +0 -21
  1630. package/dist/subject-readers-VHcrWhmq.js +0 -49
  1631. package/dist/subject-type-BRnK7Av3.js +0 -8
  1632. package/dist/subjects-BYCL-6hA.d.ts +0 -145
  1633. package/dist/subjects-CiBNKy2y.d.ts +0 -90
  1634. package/dist/subscribers-BvZxcd63.js +0 -33
  1635. package/dist/summaries-8jQTELIX.d.ts +0 -69
  1636. package/dist/supabase-mcp-Dz9DgrKP.js +0 -28
  1637. package/dist/supabase-mcp-Z4vtsuoO.d.ts +0 -46
  1638. package/dist/support-BxyPOFk4.d.ts +0 -357
  1639. package/dist/support-view-g4YLBeqX.js +0 -18
  1640. package/dist/support-view-nqUWKHEs.d.ts +0 -17
  1641. package/dist/table-schema-BlF6k62Q.d.ts +0 -81
  1642. package/dist/table-schema-C80xItaV.js +0 -293
  1643. package/dist/tables-Cb-3_VWc.js +0 -73
  1644. package/dist/tags-CIZTqtlY.js +0 -39
  1645. package/dist/tags-Cm48BsOa.d.ts +0 -30
  1646. package/dist/tax-BkCNWWMc.js +0 -140
  1647. package/dist/tax-DPShHual.d.ts +0 -170
  1648. package/dist/tee-V97_v1ZS.js +0 -101
  1649. package/dist/template-Drgg3v2J.js +0 -126
  1650. package/dist/temporal-Dbo0fLzc.js +0 -95
  1651. package/dist/temporal-required-DcLhnDhQ.js +0 -20
  1652. package/dist/tenant-BgIiMQpo.js +0 -27
  1653. package/dist/tenant-C9YE_kqK.d.ts +0 -17
  1654. package/dist/tenant-source-bqWpSr86.js +0 -8
  1655. package/dist/timeline--VU3A1e4.js +0 -50
  1656. package/dist/timeline-DvXtXq5q.d.ts +0 -151
  1657. package/dist/timing-dypS0nxW.js +0 -95
  1658. package/dist/topic-DnsNG4Kj.js +0 -643
  1659. package/dist/topic-breZqx_4.d.ts +0 -415
  1660. package/dist/ttl-cache-Bhr9swjT.js +0 -32
  1661. package/dist/types-B-D6fYx2.d.ts +0 -194
  1662. package/dist/types-C3I7S51U.d.ts +0 -461
  1663. package/dist/types-CK2X2wCB.d.ts +0 -618
  1664. package/dist/types-CPl9uJ0G.d.ts +0 -912
  1665. package/dist/types-CwQgFo8c.d.ts +0 -177
  1666. package/dist/types-DMihLukJ.d.ts +0 -251
  1667. package/dist/types-R6syp1el.js +0 -29
  1668. package/dist/types-iCyZ3lMx.d.ts +0 -217
  1669. package/dist/types-nspa5I-a.d.ts +0 -664
  1670. package/dist/undo-0HkWXASn.d.ts +0 -46
  1671. package/dist/undo-BbftL9-4.js +0 -44
  1672. package/dist/upload-claim-B1ZU8ydB.js +0 -33
  1673. package/dist/usage-BkWAPkg2.d.ts +0 -232
  1674. package/dist/user-change-DgWC6RRC.js +0 -135
  1675. package/dist/variants-Cy--Ub-a.js +0 -53
  1676. package/dist/vault-BkdPmL7f.d.ts +0 -62
  1677. package/dist/verify-41mZmspj.d.ts +0 -146
  1678. package/dist/verify-7EucfCnv.js +0 -130
  1679. package/dist/view-C8Ve14ja.js +0 -247
  1680. package/dist/view-C8_xvD-j.d.ts +0 -97
  1681. package/dist/watch-topic-CuaWfCuv.js +0 -57
  1682. package/dist/watch-topic-ItO3dz8m.d.ts +0 -31
  1683. package/dist/wire-ChYn1g21.js +0 -91
  1684. package/dist/wiring-CDNuQoJJ.js +0 -13
  1685. package/dist/workflow-sdk-BWPsdzVK.js +0 -2534
  1686. package/dist/workflow-sdk-Cf0LAOFF.js +0 -242
  1687. package/dist/workflow-sdk-rg3IbCZC.d.ts +0 -163
  1688. package/dist/workflows-xL6t0TXx.d.ts +0 -258
@@ -0,0 +1,3723 @@
1
+ import { n as ExtraColumns, t as BlockOptionsSchema } from "./options-CRwTY_q2.js";
2
+ import { t as AssetsSqlOptions } from "./options-Bwrwb8do.js";
3
+ import { t as ContentSqlOptions } from "./options-Lh6uxepF.js";
4
+ import { t as CoursesSqlOptions } from "./options-Dg7eK-_J.js";
5
+ import { t as CreatedBySqlOptions } from "./options-DeamnVOY.js";
6
+ import { t as DispatchSqlOptions } from "./options-BamaRO-q.js";
7
+ import { t as EnrollmentsSqlOptions } from "./options-Dk6D88Zx.js";
8
+ import { t as LeadScoringSqlOptions } from "./options-DCZPW5gR.js";
9
+ import { t as MailSyncSqlOptions } from "./options-C5fKQ3EJ.js";
10
+ import { t as MembershipsSqlOptions } from "./options-I1ZHfDP0.js";
11
+ import { t as ModerationSqlOptions } from "./options-B6m9gYRH.js";
12
+ import { t as PassesSqlOptions } from "./options-B5A3UmKY.js";
13
+ import { t as PostsSqlOptions } from "./options-uUGi0Phf.js";
14
+ import { t as ScoresSqlOptions } from "./options-DNZ9r_Vo.js";
15
+ import { t as SegmentsSqlOptions } from "./options-BLQePOPy.js";
16
+ import { t as SequencesSqlOptions } from "./options-D6tpMRvp.js";
17
+ import { t as ShipmentsSqlOptions } from "./options-B-JqrC61.js";
18
+ import { t as SignaturesSqlOptions } from "./options-B9w_Y08G.js";
19
+ import { t as UpdatedAtSqlOptions } from "./options-CJVYQue3.js";
20
+ /** The names each module's `blocks.<name>` config keys accept. */
21
+ interface BlockNameRegistry {
22
+ readonly "access-requests": {
23
+ readonly tables: {
24
+ readonly "requests": "id" | "tenant" | "user" | "role" | "previousRole" | "reason" | "duration" | "approval" | "grantedAt" | "expiresAt" | "endedAt" | "createdAt";
25
+ };
26
+ readonly functions: "end_access" | "expire_access_grants" | "get_access_request" | "grant_access_request" | "list_access_requests" | "request_access";
27
+ readonly actions: "read" | "create" | "manage";
28
+ readonly hooks: "before_access_request" | "after_access_request" | "before_access_grant" | "after_access_grant";
29
+ readonly entities: {
30
+ readonly "request": "id" | "tenant_id" | "user_id" | "role" | "previous_role" | "reason" | "duration" | "approval_id" | "granted_at" | "expires_at" | "ended_at" | "created_at";
31
+ };
32
+ readonly primary: "request";
33
+ };
34
+ readonly "activities": {
35
+ readonly tables: {
36
+ readonly "engagements": "id" | "tenant" | "type" | "title" | "body" | "outcome" | "owner" | "dueAt" | "doneAt" | "durationSeconds" | "externalRef" | "createdBy" | "createdAt" | "updatedAt";
37
+ readonly "links": "tenant" | "engagement" | "subjectType" | "subjectId" | "position";
38
+ readonly "recordings": "id" | "tenant" | "engagement" | "file" | "filename" | "mediaType" | "status" | "language" | "durationSeconds" | "error" | "model" | "createdBy" | "createdAt" | "transcribedAt";
39
+ readonly "segments": "recording" | "tenant" | "position" | "speaker" | "speakerUser" | "startsMs" | "endsMs" | "text" | "confidence";
40
+ readonly "notes": "engagement" | "tenant" | "summary" | "actionItems" | "model" | "source" | "createdBy" | "createdAt" | "updatedAt";
41
+ };
42
+ readonly functions: "complete_engagement" | "delete_engagement" | "engagements_of" | "log_engagement" | "next_engagement" | "open_engagements" | "update_engagement";
43
+ readonly actions: "read" | "write" | "manage";
44
+ readonly hooks: "before_engagement_log" | "after_engagement_log";
45
+ readonly entities: {
46
+ readonly "engagement": "id" | "tenant_id" | "type" | "title" | "body" | "outcome" | "owner_user_id" | "due_at" | "done_at" | "duration_seconds" | "external_ref" | "created_by" | "created_at" | "updated_at";
47
+ };
48
+ readonly primary: "engagement";
49
+ };
50
+ readonly "agents": {
51
+ readonly tables: {
52
+ readonly "agents": "id" | "tenant" | "owner" | "slug" | "name" | "description" | "instructions" | "model" | "tools" | "connectors" | "knowledgeScope" | "starters" | "visibility" | "publishedAt" | "installCount" | "ratingCount" | "ratingSum" | "createdAt" | "updatedAt";
53
+ readonly "installs": "agent" | "user" | "tenant" | "installedAt";
54
+ readonly "ratings": "agent" | "user" | "rating" | "comment" | "createdAt";
55
+ readonly "skills": "id" | "agent" | "provider" | "reference" | "createdAt";
56
+ };
57
+ readonly functions: "delete_agent" | "get_agent" | "install_agent" | "list_agents" | "publish_agent" | "rate_agent" | "save_agent" | "set_agent_skills";
58
+ readonly actions: "read" | "create" | "publish" | "moderate";
59
+ readonly hooks: never;
60
+ readonly entities: {
61
+ readonly "agent": "id" | "organization_id" | "owner_id" | "slug" | "name" | "description" | "instructions" | "model" | "tools" | "connector_ids" | "knowledge_scope" | "starters" | "visibility" | "published_at" | "install_count" | "rating_count" | "rating_sum" | "created_at" | "updated_at";
62
+ };
63
+ readonly primary: "agent";
64
+ };
65
+ readonly "ai-cache": {
66
+ readonly tables: {
67
+ readonly "entries": "key" | "tenant" | "kind" | "model" | "value" | "hits" | "createdAt" | "lastHitAt" | "expiresAt";
68
+ };
69
+ readonly functions: "ai_cache_delete" | "ai_cache_get" | "ai_cache_set" | "purge_ai_cache";
70
+ readonly actions: never;
71
+ readonly hooks: never;
72
+ readonly entities: {};
73
+ readonly primary: never;
74
+ };
75
+ readonly "ai-chat": {
76
+ readonly tables: {
77
+ readonly "projects": "id" | "tenant" | "owner" | "name" | "instructions" | "model" | "pinned" | "archivedAt" | "createdAt" | "updatedAt";
78
+ readonly "chats": "id" | "tenant" | "owner" | "project" | "agent" | "title" | "model" | "visibility" | "pinned" | "archivedAt" | "temporary" | "expiresAt" | "leaf" | "activeStream" | "activeRun" | "lastMessageAt" | "createdAt" | "updatedAt" | "search";
79
+ readonly "messages": "chat" | "id" | "parent" | "owner" | "role" | "parts" | "format" | "native" | "metadata" | "model" | "status" | "seq" | "createdAt" | "search";
80
+ readonly "runs": "id" | "chat" | "owner" | "message" | "stream" | "engine" | "externalRun" | "model" | "status" | "generation" | "usage" | "cost" | "error" | "startedAt" | "endedAt";
81
+ readonly "approvals": "id" | "chat" | "owner" | "run" | "message" | "tool" | "toolCall" | "input" | "decision" | "reason" | "signature" | "decidedBy" | "decidedAt" | "createdAt";
82
+ readonly "policies": "tenant" | "tool" | "policy" | "updatedAt";
83
+ readonly "inputs": "id" | "chat" | "owner" | "run" | "toolCall" | "question" | "schema" | "answer" | "answeredAt" | "createdAt";
84
+ readonly "sources": "chat" | "message" | "source" | "kind" | "url" | "title" | "metadata";
85
+ readonly "feedback": "chat" | "message" | "user" | "rating" | "reason" | "comment" | "createdAt" | "updatedAt";
86
+ readonly "shares": "id" | "chat" | "tokenHash" | "leaf" | "createdBy" | "createdAt" | "revokedAt";
87
+ readonly "models": "id" | "provider" | "name" | "pricing" | "capabilities" | "plans" | "enabled" | "refreshedAt";
88
+ readonly "moderation": "id" | "tenant" | "chat" | "message" | "user" | "stage" | "category" | "score" | "action" | "createdAt";
89
+ readonly "steps": "id" | "run" | "chat" | "owner" | "key" | "label" | "status" | "detail" | "startedAt" | "endedAt";
90
+ readonly "sandboxes": "id" | "tenant" | "user" | "chat" | "harness" | "provider" | "sandbox" | "container" | "status" | "metadata" | "idleSeconds" | "error" | "lastUsedAt" | "expiresAt" | "stoppedAt" | "createdAt" | "updatedAt";
91
+ readonly "harness": "chat" | "harness" | "owner" | "resume" | "continue" | "status" | "holder" | "lockedUntil" | "lastActiveAt" | "createdAt" | "updatedAt";
92
+ };
93
+ readonly functions: "ai_chat_can_read" | "ai_chat_notify" | "ai_message_path" | "ai_message_path_of" | "ai_message_siblings" | "ai_sandbox_for" | "ai_tool_approval_approvable" | "ai_tool_policies_for" | "allowed_ai_models" | "answer_ai_pending_input" | "append_ai_user_message" | "apply_ai_tool_approval" | "attach_ai_run" | "claim_ai_chat_stream" | "create_ai_chat" | "decide_ai_tool_approval" | "delete_ai_chat" | "delete_ai_project" | "finish_ai_sandbox_stop" | "get_ai_chat" | "get_ai_run" | "get_ai_tool_approvals" | "get_shared_ai_chat" | "idle_ai_sandboxes" | "list_ai_chat_shares" | "list_ai_chats" | "list_ai_moderation_events" | "list_ai_projects" | "list_ai_run_steps" | "list_ai_runs" | "list_ai_sandboxes" | "list_pending_ai_tool_approvals" | "load_ai_harness_session" | "lock_ai_harness_session" | "open_ai_pending_input" | "purge_ai_chats" | "rate_ai_message" | "record_ai_moderation_event" | "record_ai_run_step" | "record_ai_tool_approval" | "register_ai_sandbox" | "release_ai_chat_stream" | "request_ai_chat_stop" | "revoke_ai_chat_share" | "save_ai_assistant_message" | "save_ai_harness_session" | "save_ai_project" | "set_ai_run_cost" | "set_ai_tool_policy" | "share_ai_chat" | "switch_ai_branch" | "touch_ai_sandbox" | "unlock_ai_harness_session" | "update_ai_chat" | "upsert_ai_models";
94
+ readonly actions: "read" | "create" | "share" | "moderate" | "admin";
95
+ readonly hooks: never;
96
+ readonly entities: {
97
+ readonly "chat": "id" | "organization_id" | "owner_id" | "project_id" | "agent_id" | "title" | "model" | "visibility" | "pinned" | "archived_at" | "is_temporary" | "expires_at" | "current_leaf_id" | "active_stream_id" | "active_run_id" | "last_message_at" | "created_at" | "updated_at" | "search_tsv";
98
+ readonly "project": "id" | "organization_id" | "owner_id" | "name" | "instructions" | "default_model" | "pinned" | "archived_at" | "created_at" | "updated_at";
99
+ };
100
+ readonly primary: "chat";
101
+ };
102
+ readonly "ai-files": {
103
+ readonly tables: {
104
+ readonly "files": "id" | "tenant" | "owner" | "chat" | "project" | "bucket" | "path" | "mediaType" | "filename" | "size" | "sha256" | "status" | "source" | "createdAt" | "uploadedAt" | "expiresAt";
105
+ readonly "providerFiles": "file" | "provider" | "reference" | "expiresAt" | "createdAt";
106
+ readonly "documents": "id" | "tenant" | "owner" | "chat" | "kind" | "title" | "version" | "createdAt" | "updatedAt";
107
+ readonly "versions": "document" | "version" | "content" | "storagePath" | "message" | "createdBy" | "createdAt";
108
+ readonly "suggestions": "id" | "document" | "version" | "original" | "suggested" | "description" | "createdBy" | "createdAt" | "resolvedAt" | "accepted";
109
+ };
110
+ readonly functions: "ai_file_object_allowed" | "confirm_ai_file" | "create_ai_document" | "delete_ai_document" | "delete_ai_file" | "expiring_ai_provider_files" | "get_ai_document" | "get_ai_file" | "get_ai_file_by_path" | "get_ai_provider_file" | "list_ai_document_versions" | "list_ai_files" | "list_ai_suggestions" | "purge_ai_files" | "reserve_ai_file" | "resolve_ai_suggestion" | "rollback_ai_document" | "set_ai_provider_file" | "store_ai_file" | "suggest_ai_document_edit" | "update_ai_document";
111
+ readonly actions: "upload" | "manage";
112
+ readonly hooks: never;
113
+ readonly entities: {
114
+ readonly "document": "id" | "organization_id" | "owner_id" | "chat_id" | "kind" | "title" | "current_version" | "created_at" | "updated_at";
115
+ };
116
+ readonly primary: "document";
117
+ };
118
+ readonly "ai-keys": {
119
+ readonly tables: {
120
+ readonly "keys": "id" | "tenant" | "provider" | "name" | "credentialRef" | "settings" | "enabled" | "createdBy" | "createdAt" | "updatedAt";
121
+ readonly "batches": "id" | "tenant" | "user" | "provider" | "reference" | "status" | "rawStatus" | "itemCount" | "counts" | "error" | "metadata" | "resultsSaved" | "polls" | "nextPollAt" | "expiresAt" | "completedAt" | "createdAt" | "updatedAt";
122
+ readonly "items": "batch" | "request" | "tenant" | "status" | "output" | "usage" | "error" | "createdAt";
123
+ };
124
+ readonly functions: "ai_provider_keys_for" | "delete_ai_provider_key" | "delete_ai_provider_keys" | "due_ai_batches" | "get_ai_batch" | "list_ai_batch_items" | "list_ai_batches" | "list_ai_provider_keys" | "record_ai_batch" | "save_ai_batch_items" | "save_ai_provider_key" | "update_ai_batch";
125
+ readonly actions: "use" | "manage";
126
+ readonly hooks: never;
127
+ readonly entities: {};
128
+ readonly primary: never;
129
+ };
130
+ readonly "ai-schedules": {
131
+ readonly tables: {
132
+ readonly "tasks": "id" | "tenant" | "user" | "chat" | "agent" | "title" | "prompt" | "cron" | "timezone" | "enabled" | "nextRunAt" | "lastRunAt" | "createdAt" | "updatedAt";
133
+ readonly "runs": "id" | "task" | "tenant" | "user" | "status" | "scheduledFor" | "chat" | "error" | "startedAt" | "finishedAt" | "createdAt";
134
+ };
135
+ readonly functions: "claim_due_ai_tasks" | "delete_ai_task" | "finish_ai_task_run" | "list_ai_task_runs" | "list_ai_tasks" | "save_ai_task" | "schedule_ai_tasks" | "start_ai_task_run";
136
+ readonly actions: "create" | "manage";
137
+ readonly hooks: never;
138
+ readonly entities: {
139
+ readonly "task": "id" | "organization_id" | "user_id" | "chat_id" | "agent_id" | "title" | "prompt" | "cron" | "timezone" | "enabled" | "next_run_at" | "last_run_at" | "created_at" | "updated_at";
140
+ };
141
+ readonly primary: "task";
142
+ };
143
+ readonly "announcements": {
144
+ readonly tables: {
145
+ readonly "announcements": "id" | "title" | "body" | "severity" | "href" | "audience" | "targets" | "startsAt" | "endsAt" | "dismissible" | "createdBy" | "createdAt" | "updatedAt";
146
+ readonly "dismissals": "announcement" | "user" | "dismissedAt";
147
+ };
148
+ readonly functions: "active_announcements" | "broadcast_announcement" | "delete_announcement" | "dismiss_announcement" | "list_announcements" | "save_announcement";
149
+ readonly actions: "manage";
150
+ readonly hooks: never;
151
+ readonly entities: {
152
+ readonly "announcement": "id" | "title" | "body" | "severity" | "href" | "audience" | "targets" | "starts_at" | "ends_at" | "dismissible" | "created_by" | "created_at" | "updated_at";
153
+ };
154
+ readonly primary: "announcement";
155
+ };
156
+ readonly "api-keys": {
157
+ readonly tables: {
158
+ readonly "keys": "id" | "tenant" | "user" | "name" | "prefix" | "publicId" | "secretHash" | "scopes" | "kind" | "rateLimit" | "windowStart" | "windowHits" | "expiresAt" | "lastUsedAt" | "revokedAt" | "rotatedFrom" | "createdBy" | "createdAt";
159
+ };
160
+ readonly functions: "api_key_tenant" | "create_api_key" | "has_scope" | "list_api_keys" | "revoke_api_key" | "rotate_api_key" | "verify_api_key";
161
+ readonly actions: "manage" | "own";
162
+ readonly hooks: never;
163
+ readonly entities: {
164
+ readonly "key": "id" | "organization_id" | "user_id" | "name" | "prefix" | "public_id" | "secret_hash" | "scopes" | "kind" | "rate_limit" | "window_start" | "window_hits" | "expires_at" | "last_used_at" | "revoked_at" | "rotated_from" | "created_by" | "created_at";
165
+ };
166
+ readonly primary: "key";
167
+ };
168
+ readonly "approvals": {
169
+ readonly tables: {
170
+ readonly "requests": "id" | "tenant" | "subjectType" | "subjectId" | "action" | "policy" | "step" | "status" | "requestedBy" | "reason" | "payload" | "expiresAt" | "remindedAt" | "decidedAt" | "createdAt";
171
+ readonly "decisions": "id" | "request" | "tenant" | "step" | "approver" | "decision" | "delegateTo" | "comment" | "createdAt";
172
+ };
173
+ readonly functions: "approval_eligible" | "approval_finalize" | "approval_notify" | "approval_policy" | "cancel_approval" | "decide_approval" | "delegate_approval" | "expire_approvals" | "get_approval" | "is_approved" | "list_approvals" | "open_approval" | "remind_approvals" | "request_approval";
174
+ readonly actions: "read" | "request" | "manage";
175
+ readonly hooks: "before_approval_request" | "after_approval_request" | "before_approval_decide" | "after_approval_decide";
176
+ readonly entities: {
177
+ readonly "approval": "id" | "tenant_id" | "subject_type" | "subject_id" | "action" | "policy" | "step" | "status" | "requested_by" | "reason" | "payload" | "expires_at" | "reminded_at" | "decided_at" | "created_at";
178
+ };
179
+ readonly primary: "approval";
180
+ };
181
+ readonly "assets": {
182
+ readonly tables: {
183
+ readonly "locations": "id" | "tenant" | "parent" | "kind" | "name" | "code" | "address" | "latitude" | "longitude" | "metadata" | "archivedAt" | "createdAt" | "updatedAt";
184
+ readonly "assets": "id" | "tenant" | "location" | "kind" | "name" | "tag" | "serial" | "status" | "assigneeType" | "assigneeId" | "latitude" | "longitude" | "metadata" | "retiredAt" | "createdBy" | "createdAt" | "updatedAt";
185
+ readonly "assignments": "id" | "tenant" | "asset" | "assigneeType" | "assigneeId" | "note" | "assignedBy" | "assignedAt" | "releasedAt";
186
+ };
187
+ readonly functions: "archive_asset_location" | "asset_assignment_history" | "asset_location_check_parent" | "asset_locations_at" | "assets_near" | "assign_asset" | "create_asset" | "create_asset_location" | "get_asset" | "get_asset_location" | "list_asset_locations" | "list_assets" | "release_asset" | "set_asset_link" | "update_asset" | "update_asset_location";
188
+ readonly actions: "read" | "manage" | "assign";
189
+ readonly hooks: "before_asset_assign" | "after_asset_assign";
190
+ readonly entities: {
191
+ readonly "asset": "id" | "tenant_id" | "location_id" | "kind" | "name" | "tag" | "serial_number" | "status" | "assignee_type" | "assignee_id" | "latitude" | "longitude" | "metadata" | "retired_at" | "created_by" | "created_at" | "updated_at";
192
+ readonly "asset_location": "id" | "tenant_id" | "parent_id" | "kind" | "name" | "code" | "address" | "latitude" | "longitude" | "metadata" | "archived_at" | "created_at" | "updated_at";
193
+ };
194
+ readonly primary: "asset";
195
+ };
196
+ readonly "assignment": {
197
+ readonly tables: {
198
+ readonly "queues": "id" | "tenant" | "name" | "subjectType" | "strategy" | "conditions" | "rank" | "enabled" | "createdAt" | "updatedAt";
199
+ readonly "members": "queue" | "tenant" | "user" | "weight" | "active" | "credit" | "assignedCount" | "lastAssignedAt";
200
+ readonly "log": "id" | "tenant" | "queue" | "subjectType" | "subjectId" | "user" | "assignedAt";
201
+ };
202
+ readonly functions: "assign_subject" | "assignment_history" | "list_assignment_queues" | "remove_assignment_queue" | "save_assignment_queue" | "set_assignment_members";
203
+ readonly actions: "read" | "manage" | "assign";
204
+ readonly hooks: never;
205
+ readonly entities: {
206
+ readonly "assignment_queue": "id" | "tenant_id" | "name" | "subject_type" | "strategy" | "conditions" | "rank" | "enabled" | "created_at" | "updated_at";
207
+ };
208
+ readonly primary: "assignment_queue";
209
+ };
210
+ readonly "attachments": {
211
+ readonly tables: {
212
+ readonly "attachments": "id" | "tenant" | "subjectType" | "subjectId" | "bucket" | "path" | "name" | "mimeType" | "size" | "status" | "detail" | "uploadedBy" | "createdAt" | "uploadedAt" | "scannedAt" | "metadata" | "version" | "width" | "height" | "pages";
213
+ readonly "versions": "id" | "tenant" | "attachment" | "version" | "bucket" | "path" | "name" | "mimeType" | "size" | "width" | "height" | "pages" | "status" | "detail" | "uploadedBy" | "uploadedAt" | "scannedAt" | "archivedAt";
214
+ readonly "scans": "bucket" | "path" | "status" | "detail" | "createdAt" | "scannedAt";
215
+ readonly "cleanup": "bucket" | "path" | "queuedBy" | "queuedAt" | "attempts";
216
+ };
217
+ readonly functions: "attachment_object_allowed" | "attachment_object_visible" | "attachment_subject_readable" | "confirm_attachment" | "create_attachment" | "delete_attachment" | "get_attachment" | "list_attachment_versions" | "list_attachments" | "object_clean" | "object_scan" | "replace_attachment" | "restore_attachment_version" | "set_attachment_status" | "set_object_scan";
218
+ readonly actions: "read" | "upload" | "manage";
219
+ readonly hooks: never;
220
+ readonly entities: {
221
+ readonly "attachment": "id" | "organization_id" | "subject_type" | "subject_id" | "bucket" | "object_path" | "name" | "mime_type" | "size" | "status" | "scan_detail" | "uploaded_by" | "created_at" | "uploaded_at" | "scanned_at" | "metadata" | "version" | "width" | "height" | "pages";
222
+ };
223
+ readonly primary: "attachment";
224
+ };
225
+ readonly "audit": {
226
+ readonly tables: {
227
+ readonly "log": "id" | "table" | "record" | "op" | "old" | "new" | "changed" | "actor" | "actorRole" | "tenant" | "occurredAt" | "impersonatedBy" | "impersonationReason" | "supportSession" | "eventType" | "category" | "outcome" | "source" | "targetType" | "metadata" | "idempotencyKey" | "actorKind" | "actorLabel" | "tenantLabel" | "targetLabel" | "summary" | "requestId" | "correlationId" | "scope";
228
+ readonly "restricted": "entry" | "old" | "new" | "ip" | "userAgent" | "metadata" | "sessionId" | "changedValues";
229
+ readonly "registry": "target" | "ignore" | "keyColumns" | "redact" | "category" | "eventPrefix" | "targetType" | "tenantColumn" | "labelColumn";
230
+ };
231
+ readonly functions: "audit" | "audit_event" | "audit_event_many" | "audit_read_tenants" | "audit_reads_all" | "count_audit_events" | "list_audit_events" | "purge_audit_log";
232
+ readonly actions: "view" | "viewAll" | "revert" | "reveal";
233
+ readonly hooks: "audit_retention";
234
+ readonly entities: {};
235
+ readonly primary: never;
236
+ };
237
+ readonly "automations": {
238
+ readonly tables: {
239
+ readonly "rules": "id" | "tenant" | "subjectType" | "trigger" | "name" | "description" | "conditions" | "actions" | "enabled" | "stopProcessing" | "rank" | "version" | "createdBy" | "updatedBy" | "createdAt" | "updatedAt" | "defaultKey";
240
+ readonly "defaults": "key" | "block" | "subjectType" | "trigger" | "name" | "description" | "conditions" | "actions" | "enabled" | "updatedAt";
241
+ readonly "versions": "rule" | "version" | "tenant" | "name" | "conditions" | "actions" | "savedBy" | "savedAt";
242
+ readonly "evaluations": "id" | "tenant" | "rule" | "version" | "subjectType" | "subjectId" | "trigger" | "matched" | "results" | "mode" | "evaluatedBy" | "evaluatedAt";
243
+ readonly "fields": "subjectType" | "id" | "label" | "description" | "type" | "path" | "columnType" | "nullable" | "options" | "operators" | "position" | "updatedAt";
244
+ };
245
+ readonly functions: "install_default_rules" | "matching_rules" | "rank_rule" | "record_rule_evaluation" | "remove_rule" | "reset_default_rule" | "rule_boolean" | "rule_bounds" | "rule_check" | "rule_date" | "rule_equal" | "rule_evaluate" | "rule_evaluations_list" | "rule_field_map" | "rule_fields_list" | "rule_get" | "rule_list" | "rule_matches" | "rule_moment" | "rule_node" | "rule_numeric" | "rule_positive" | "rule_text" | "rule_versions_list" | "rules_list" | "run_rules" | "save_rule" | "set_rule_enabled" | "sync_rule_fields";
246
+ readonly actions: "read" | "edit" | "publish" | "admin";
247
+ readonly hooks: never;
248
+ readonly entities: {
249
+ readonly "rule": "id" | "organization_id" | "subject_type" | "trigger" | "name" | "description" | "conditions" | "actions" | "enabled" | "stop_processing" | "rank" | "version" | "created_by" | "updated_by" | "created_at" | "updated_at" | "default_key";
250
+ };
251
+ readonly primary: "rule";
252
+ };
253
+ readonly "billable-time": {
254
+ readonly tables: {
255
+ readonly "rates": "id" | "tenant" | "user" | "subjectType" | "subjectId" | "rate" | "currency" | "effectiveFrom" | "createdBy" | "createdAt";
256
+ readonly "billed": "entry" | "tenant" | "invoice" | "rate" | "currency" | "seconds" | "createdAt";
257
+ };
258
+ readonly functions: "billable_time_guard" | "billable_time_release" | "delete_time_rate" | "invoice_from_time" | "list_invoiced_time" | "list_time_rates" | "set_time_rate" | "time_rate" | "unbilled_time";
259
+ readonly actions: "read" | "manage" | "invoice";
260
+ readonly hooks: never;
261
+ readonly entities: {
262
+ readonly "time_rate": "id" | "tenant_id" | "user_id" | "subject_type" | "subject_id" | "rate" | "currency" | "effective_from" | "created_by" | "created_at";
263
+ };
264
+ readonly primary: "time_rate";
265
+ };
266
+ readonly "billing": {
267
+ readonly tables: {
268
+ readonly "customers": "tenant" | "customer" | "account" | "createdAt";
269
+ readonly "subscriptions": "tenant" | "subscription" | "status" | "price" | "plan" | "periodEnd" | "cancelAt" | "eventAt" | "updatedAt";
270
+ };
271
+ readonly functions: "billing_account" | "billing_all_customers" | "billing_all_invoices" | "billing_all_subscriptions" | "billing_customer" | "billing_customer_details" | "billing_customer_tenant" | "billing_invoices" | "billing_payment_methods" | "billing_plan_price" | "billing_platform_customers" | "billing_platform_invoices" | "billing_platform_subscriptions" | "billing_seat_count" | "billing_status" | "billing_stripe_rows" | "billing_subscription" | "billing_subscription_item" | "billing_tax_ids" | "billing_tenant_subscription" | "link_billing_account" | "link_billing_customer";
272
+ readonly actions: "read" | "manage" | "viewAll";
273
+ readonly hooks: never;
274
+ readonly entities: {};
275
+ readonly primary: never;
276
+ };
277
+ readonly "bookings": {
278
+ readonly tables: {
279
+ readonly "resources": "id" | "tenant" | "name" | "kind" | "capacity" | "tz" | "calendar" | "host" | "checkBusy" | "active" | "createdAt";
280
+ readonly "availability": "id" | "tenant" | "resource" | "weekday" | "startsAt" | "endsAt";
281
+ readonly "exceptions": "id" | "tenant" | "resource" | "during" | "available" | "reason";
282
+ readonly "services": "id" | "tenant" | "name" | "duration" | "bufferBefore" | "bufferAfter" | "resourceKinds" | "step" | "minNotice" | "holdFor" | "reminderOffsets" | "active" | "createdAt";
283
+ readonly "bookings": "id" | "tenant" | "resource" | "service" | "seat" | "during" | "blocked" | "status" | "holdExpiresAt" | "customerName" | "customerEmail" | "customerUser" | "notes" | "accessHash" | "calendarEvent" | "createdBy" | "createdAt" | "updatedAt" | "cancelledAt" | "cancelReason" | "series";
284
+ readonly "series": "id" | "tenant" | "service" | "resource" | "rule" | "startsAt" | "tz" | "customerName" | "customerEmail" | "customerUser" | "status" | "endsAt" | "createdBy" | "createdAt" | "updatedAt";
285
+ };
286
+ readonly functions: "add_booking_exception" | "available_slots" | "booking_slots" | "cancel_booking" | "change_booking" | "confirm_booking" | "delete_booking_exception" | "expire_booking_holds" | "expire_booking_holds_in" | "hold_booking" | "list_bookings" | "place_booking" | "save_booking_resource" | "save_booking_service" | "set_booking_availability";
287
+ readonly actions: "manage" | "create" | "read";
288
+ readonly hooks: "before_booking_reserve" | "after_booking_reserve" | "after_booking_confirm" | "after_booking_cancel";
289
+ readonly entities: {
290
+ readonly "booking": "id" | "tenant_id" | "resource_id" | "service_id" | "seat" | "during" | "blocked" | "status" | "hold_expires_at" | "customer_name" | "customer_email" | "customer_user_id" | "notes" | "access_hash" | "calendar_event_id" | "created_by" | "created_at" | "updated_at" | "cancelled_at" | "cancel_reason" | "series_id";
291
+ };
292
+ readonly primary: "booking";
293
+ };
294
+ readonly "bulk": {
295
+ readonly tables: {
296
+ readonly "runs": "id" | "tenant" | "subjectType" | "action" | "args" | "ids" | "position" | "succeeded" | "failed" | "results" | "status" | "createdBy" | "createdAt" | "finishedAt";
297
+ };
298
+ readonly functions: "bulk_apply" | "bulk_row" | "bulk_run" | "bulk_step" | "start_bulk";
299
+ readonly actions: "run";
300
+ readonly hooks: never;
301
+ readonly entities: {};
302
+ readonly primary: never;
303
+ };
304
+ readonly "calendar": {
305
+ readonly tables: {
306
+ readonly "calendars": "id" | "tenant" | "name" | "tz" | "color" | "ownerType" | "ownerId" | "createdAt" | "visibility" | "description" | "rank" | "isDefault";
307
+ readonly "events": "id" | "tenant" | "calendar" | "uid" | "title" | "description" | "location" | "startsAt" | "endsAt" | "allDay" | "tz" | "status" | "rrule" | "exdates" | "recurrence" | "originalStart" | "subjectType" | "subjectId" | "color" | "kind" | "transparency" | "autoDecline" | "createdBy" | "createdAt" | "updatedAt" | "visibility" | "owner" | "rdates";
308
+ readonly "attendees": "id" | "tenant" | "event" | "email" | "name" | "user" | "role" | "response" | "subjectType" | "subjectId" | "organizer" | "optional";
309
+ readonly "workingHours": "id" | "tenant" | "user" | "weekday" | "startsAt" | "endsAt" | "tz";
310
+ readonly "grants": "id" | "tenant" | "calendar" | "user" | "role" | "createdAt";
311
+ readonly "rules": "id" | "tenant" | "event" | "rrule" | "freq" | "interval" | "count" | "until" | "byDay" | "byMonthDay" | "byMonth" | "bySetPos";
312
+ readonly "recurrenceDates": "id" | "tenant" | "event" | "kind" | "at";
313
+ };
314
+ readonly functions: "calendar_attendee_auto_decline" | "calendar_block_auto_decline" | "calendar_busy_blocks" | "calendar_free_busy" | "calendar_rule_starts" | "cancel_calendar_occurrence" | "create_calendar" | "delete_calendar" | "delete_calendar_event" | "import_calendar_events" | "list_calendar_events" | "list_calendar_working_hours" | "list_calendars" | "remove_calendar_attendee" | "respond_calendar_event" | "save_calendar_event" | "set_calendar_attendee" | "set_calendar_working_hours" | "split_calendar_event";
315
+ readonly actions: "manage" | "write" | "read" | "create" | "update" | "delete";
316
+ readonly hooks: "before_calendar_event_save" | "after_calendar_event_save";
317
+ readonly entities: {
318
+ readonly "calendar_event": "id" | "tenant_id" | "calendar_id" | "uid" | "title" | "description" | "location" | "starts_at" | "ends_at" | "all_day" | "tz" | "status" | "rrule" | "exdates" | "recurrence_id" | "original_start" | "subject_type" | "subject_id" | "color" | "kind" | "transparency" | "auto_decline" | "created_by" | "created_at" | "updated_at" | "visibility" | "owner_id" | "rdates";
319
+ readonly "calendar": "id" | "tenant_id" | "name" | "tz" | "color" | "owner_type" | "owner_id" | "created_at" | "visibility" | "description" | "rank" | "is_default";
320
+ };
321
+ readonly primary: "calendar_event";
322
+ };
323
+ readonly "catalog": {
324
+ readonly tables: {
325
+ readonly "products": "id" | "tenant" | "slug" | "title" | "description" | "kind" | "status" | "createdAt" | "updatedAt" | "price" | "currency" | "trackInventory";
326
+ readonly "options": "id" | "tenant" | "product" | "name" | "rank";
327
+ readonly "optionValues": "id" | "tenant" | "option" | "value" | "rank";
328
+ readonly "variants": "id" | "tenant" | "product" | "sku" | "title" | "barcode" | "weight" | "trackInventory" | "allowBackorder" | "rank" | "createdAt" | "updatedAt" | "price";
329
+ readonly "variantValues": "tenant" | "variant" | "value";
330
+ readonly "priceLists": "id" | "tenant" | "name" | "customerGroup" | "createdAt";
331
+ readonly "prices": "id" | "tenant" | "variant" | "priceList" | "currency" | "amount" | "compareAt" | "validFrom" | "validUntil" | "createdAt" | "updatedAt";
332
+ readonly "categories": "id" | "tenant" | "parent" | "name" | "slug" | "description" | "rank" | "createdAt" | "updatedAt";
333
+ readonly "productCategories": "tenant" | "product" | "category";
334
+ readonly "collections": "id" | "tenant" | "title" | "slug" | "kind" | "rule" | "createdAt" | "updatedAt";
335
+ readonly "collectionProducts": "tenant" | "collection" | "product" | "rank";
336
+ readonly "storefronts": "tenant" | "publishedAt";
337
+ readonly "channels": "id" | "tenant" | "key" | "name" | "currency" | "priceList" | "active" | "createdAt" | "updatedAt";
338
+ readonly "channelProducts": "tenant" | "channel" | "product" | "listedAt";
339
+ readonly "productTranslations": "tenant" | "product" | "locale" | "title" | "description" | "updatedAt";
340
+ readonly "variantTranslations": "tenant" | "variant" | "locale" | "title" | "updatedAt";
341
+ readonly "media": "id" | "tenant" | "product" | "variant" | "attachment" | "position" | "alt" | "createdAt";
342
+ };
343
+ readonly functions: "add_to_collection" | "channel_price" | "channel_products" | "currency_minor_units" | "delete_catalog_channel" | "delete_category" | "delete_collection" | "delete_price" | "delete_price_list" | "delete_product" | "delete_product_option" | "delete_variant" | "move_category" | "product_text" | "publish_storefront" | "rank_variant" | "remove_from_collection" | "save_catalog_channel" | "save_category" | "save_collection" | "save_price_list" | "save_product" | "save_product_option" | "save_variant" | "set_channel_listing" | "set_price" | "set_product_categories" | "set_product_status" | "set_product_translation" | "set_variant_translation" | "storefront_products" | "storefront_tenants" | "variant_price";
344
+ readonly actions: "manage" | "read";
345
+ readonly hooks: "before_product_save" | "after_product_save" | "before_variant_save" | "after_variant_save" | "before_price_set" | "after_price_set";
346
+ readonly entities: {
347
+ readonly "product": "id" | "tenant_id" | "slug" | "title" | "description" | "kind" | "status" | "created_at" | "updated_at" | "price" | "currency" | "track_inventory";
348
+ readonly "product_variant": "id" | "tenant_id" | "product_id" | "sku" | "title" | "barcode" | "weight_grams" | "track_inventory" | "allow_backorder" | "rank" | "created_at" | "updated_at" | "price";
349
+ };
350
+ readonly primary: "product";
351
+ };
352
+ readonly "channels": {
353
+ readonly tables: {
354
+ readonly "channels": "id" | "tenant" | "name" | "visibility" | "topic" | "purpose" | "subjectType" | "subjectId" | "createdBy" | "createdAt" | "updatedAt";
355
+ };
356
+ readonly functions: "archive_channel" | "channels_for_record" | "create_channel" | "find_channel" | "get_channel" | "invite_to_channel" | "join_channel" | "leave_channel" | "list_channels" | "update_channel";
357
+ readonly actions: "read" | "create" | "manage";
358
+ readonly hooks: never;
359
+ readonly entities: {
360
+ readonly "channel": "id" | "tenant_id" | "name" | "visibility" | "topic" | "purpose" | "subject_type" | "subject_id" | "created_by" | "created_at" | "updated_at";
361
+ };
362
+ readonly primary: "channel";
363
+ };
364
+ readonly "chat-sdk-state": {
365
+ readonly tables: {
366
+ readonly "subscriptions": "prefix" | "thread" | "createdAt";
367
+ readonly "locks": "prefix" | "thread" | "token" | "expiresAt" | "updatedAt";
368
+ readonly "cache": "prefix" | "key" | "value" | "expiresAt" | "updatedAt";
369
+ readonly "lists": "id" | "prefix" | "key" | "value" | "expiresAt";
370
+ readonly "queues": "id" | "prefix" | "thread" | "value" | "expiresAt";
371
+ readonly "installations": "id" | "tenant" | "adapter" | "externalId" | "credentialRef" | "metadata" | "installedBy" | "installedAt" | "uninstalledAt";
372
+ };
373
+ readonly functions: "chat_install" | "chat_installation" | "chat_state_acquire_lock" | "chat_state_append_to_list" | "chat_state_delete" | "chat_state_dequeue" | "chat_state_enqueue" | "chat_state_extend_lock" | "chat_state_force_release_lock" | "chat_state_get" | "chat_state_get_list" | "chat_state_is_subscribed" | "chat_state_queue_depth" | "chat_state_release_lock" | "chat_state_set" | "chat_state_set_if_not_exists" | "chat_state_subscribe" | "chat_state_unsubscribe" | "chat_uninstall" | "list_chat_installations" | "purge_chat_state";
374
+ readonly actions: never;
375
+ readonly hooks: never;
376
+ readonly entities: {};
377
+ readonly primary: never;
378
+ };
379
+ readonly "collections": {
380
+ readonly tables: {
381
+ readonly "collections": "id" | "tenant" | "subjectType" | "scope" | "owner" | "team" | "name" | "description" | "archivedAt" | "createdBy" | "createdAt" | "updatedAt";
382
+ readonly "entries": "collection" | "tenant" | "subjectType" | "subjectId" | "rank" | "addedBy" | "addedAt";
383
+ readonly "favorites": "user" | "tenant" | "subjectType" | "subjectId" | "rank" | "createdAt";
384
+ readonly "savedItems": "id" | "user" | "tenant" | "subjectType" | "subjectId" | "note" | "remindAt" | "remindedAt" | "completedAt" | "createdAt";
385
+ };
386
+ readonly functions: "add_collection_entries" | "archive_collection" | "collection_entries" | "collection_subject_ids" | "collections_of" | "complete_saved_item" | "create_collection" | "list_collections" | "list_saved_items" | "rank_collection_entry" | "rank_star" | "remind_due_saved_items" | "remove_collection_entries" | "remove_saved_item" | "rename_collection" | "save_for_later" | "star_subject" | "starred_subjects" | "subject_collection_entries" | "unstar_subject";
387
+ readonly actions: "read" | "write" | "share";
388
+ readonly hooks: "before_collection_create" | "after_collection_create" | "before_collection_add" | "after_collection_add";
389
+ readonly entities: {
390
+ readonly "collection": "id" | "tenant_id" | "subject_type" | "scope" | "owner_id" | "team_id" | "name" | "description" | "archived_at" | "created_by" | "created_at" | "updated_at";
391
+ };
392
+ readonly primary: "collection";
393
+ };
394
+ readonly "comments": {
395
+ readonly tables: {
396
+ readonly "tasks": "message" | "tenant" | "task" | "createdBy" | "createdAt";
397
+ };
398
+ readonly functions: "comment_conversation" | "comment_counts" | "comment_message_readable" | "comments_json" | "copy_comments" | "create_comment" | "get_comment" | "list_comments" | "list_file_comments";
399
+ readonly actions: "read" | "create" | "moderate";
400
+ readonly hooks: never;
401
+ readonly entities: {};
402
+ readonly primary: never;
403
+ };
404
+ readonly "compliance": {
405
+ readonly tables: {
406
+ readonly "frameworks": "id" | "tenant" | "key" | "name" | "version" | "description" | "createdAt" | "updatedAt";
407
+ readonly "controls": "id" | "tenant" | "framework" | "code" | "title" | "description" | "owner" | "applicable" | "createdAt" | "updatedAt";
408
+ readonly "evidence": "id" | "tenant" | "control" | "task" | "attachment" | "note" | "collectedBy" | "collectedAt" | "validUntil";
409
+ readonly "tasks": "id" | "tenant" | "control" | "title" | "assignee" | "intervalDays" | "dueOn" | "lastCollectedAt" | "notifiedFor" | "active" | "createdAt" | "updatedAt";
410
+ readonly "policies": "id" | "tenant" | "key" | "title" | "owner" | "requiresAck" | "currentVersion" | "versionNumber" | "publishedAt" | "archivedAt" | "createdAt" | "updatedAt";
411
+ readonly "acknowledgements": "id" | "tenant" | "policy" | "version" | "user" | "acknowledgedAt";
412
+ };
413
+ readonly functions: "acknowledge_policy" | "add_control_evidence" | "archive_policy" | "control_posture" | "get_control" | "list_control_frameworks" | "list_controls" | "list_evidence_tasks" | "list_policies" | "notify_overdue_evidence_tasks" | "policy_acknowledgements" | "publish_policy" | "remove_control_evidence" | "save_control" | "save_control_framework" | "save_evidence_task" | "save_policy";
414
+ readonly actions: "read" | "manage" | "collect" | "acknowledge";
415
+ readonly hooks: never;
416
+ readonly entities: {
417
+ readonly "control": "id" | "tenant_id" | "framework_id" | "code" | "title" | "description" | "owner_id" | "applicable" | "created_at" | "updated_at";
418
+ readonly "control_framework": "id" | "tenant_id" | "key" | "name" | "version" | "description" | "created_at" | "updated_at";
419
+ readonly "evidence_task": "id" | "tenant_id" | "control_id" | "title" | "assignee_id" | "interval_days" | "due_on" | "last_collected_at" | "notified_for" | "active" | "created_at" | "updated_at";
420
+ readonly "policy": "id" | "tenant_id" | "key" | "title" | "owner_id" | "requires_acknowledgement" | "current_version_id" | "version_number" | "published_at" | "archived_at" | "created_at" | "updated_at";
421
+ };
422
+ readonly primary: "control";
423
+ };
424
+ readonly "connectors": {
425
+ readonly tables: {
426
+ readonly "servers": "id" | "tenant" | "name" | "url" | "transport" | "authType" | "credentialRef" | "scopes" | "clientMetadata" | "enabled" | "createdBy" | "createdAt" | "updatedAt";
427
+ readonly "grants": "id" | "user" | "server" | "tenant" | "credentialRef" | "scopes" | "expiresAt" | "grantedAt" | "revokedAt";
428
+ readonly "sessions": "server" | "user" | "chat" | "session" | "initializeResult" | "lastUsedAt" | "expiresAt";
429
+ readonly "fingerprints": "server" | "fingerprint" | "tools" | "status" | "approvedBy" | "approvedAt" | "createdAt";
430
+ };
431
+ readonly functions: "check_connector_fingerprint" | "decide_connector_fingerprint" | "delete_connector_server" | "expiring_connector_grants" | "get_connector" | "get_connector_session" | "list_connector_servers" | "purge_connector_sessions" | "record_connector_grant" | "renew_connector_grant" | "revoke_connector_grant" | "save_connector_server" | "save_connector_session";
432
+ readonly actions: "read" | "use" | "manage";
433
+ readonly hooks: never;
434
+ readonly entities: {
435
+ readonly "server": "id" | "organization_id" | "name" | "url" | "transport" | "auth_type" | "credential_ref" | "scopes" | "client_metadata" | "enabled" | "created_by" | "created_at" | "updated_at";
436
+ };
437
+ readonly primary: "server";
438
+ };
439
+ readonly "contacts": {
440
+ readonly tables: {
441
+ readonly "companies": "id" | "tenant" | "name" | "domain" | "website" | "vatId" | "lifecycle" | "owner" | "address" | "mergedInto" | "archivedAt" | "createdBy" | "createdAt" | "updatedAt";
442
+ readonly "people": "id" | "tenant" | "name" | "email" | "phone" | "title" | "lifecycle" | "owner" | "user" | "mergedInto" | "archivedAt" | "createdBy" | "createdAt" | "updatedAt";
443
+ readonly "links": "tenant" | "company" | "person" | "role" | "isPrimary" | "createdAt";
444
+ readonly "personContacts": "tenant" | "person" | "contact" | "createdAt";
445
+ };
446
+ readonly functions: "archive_company" | "archive_person" | "company_people_of" | "list_companies" | "list_people" | "merge_companies" | "merge_people" | "remove_company_person" | "save_company" | "save_person" | "set_company_person";
447
+ readonly actions: "read" | "write" | "manage";
448
+ readonly hooks: "before_company_save" | "after_company_save" | "before_person_save" | "after_person_save";
449
+ readonly entities: {
450
+ readonly "company": "id" | "tenant_id" | "name" | "domain" | "website" | "vat_id" | "lifecycle" | "owner_user_id" | "address" | "merged_into" | "archived_at" | "created_by" | "created_at" | "updated_at";
451
+ readonly "person": "id" | "tenant_id" | "name" | "email" | "phone" | "title" | "lifecycle" | "owner_user_id" | "user_id" | "merged_into" | "archived_at" | "created_by" | "created_at" | "updated_at";
452
+ };
453
+ readonly primary: never;
454
+ };
455
+ readonly "content": {
456
+ readonly tables: {
457
+ readonly "entries": "id" | "tenant" | "type" | "locale" | "slug" | "title" | "summary" | "body" | "status" | "publishAt" | "publishedAt" | "author" | "translationGroup" | "cover" | "approval" | "createdBy" | "createdAt" | "updatedAt";
458
+ };
459
+ readonly functions: "archive_content_entry" | "content_entry_approved" | "content_entry_go_live" | "create_content_entry" | "get_content_entry" | "list_content_entries" | "public_content_entries" | "public_content_entry" | "publish_content_entry" | "publish_due_content_entries" | "schedule_content_entry" | "update_content_entry";
460
+ readonly actions: "read" | "write" | "publish";
461
+ readonly hooks: "before_content_entry_publish" | "after_content_entry_publish";
462
+ readonly entities: {
463
+ readonly "content_entry": "id" | "tenant_id" | "type" | "locale" | "slug" | "title" | "summary" | "body" | "status" | "publish_at" | "published_at" | "author_id" | "translation_group_id" | "cover_attachment_id" | "approval_id" | "created_by" | "created_at" | "updated_at";
464
+ };
465
+ readonly primary: "content_entry";
466
+ };
467
+ readonly "contracts": {
468
+ readonly tables: {
469
+ readonly "contracts": "id" | "tenant" | "title" | "description" | "counterpartyType" | "counterpartyId" | "owner" | "status" | "value" | "currency" | "startsOn" | "endsOn" | "autoRenew" | "renewalMonths" | "noticeDays" | "renewedCount" | "signatureRequest" | "signedAt" | "terminatedAt" | "terminationReason" | "createdBy" | "createdAt" | "updatedAt";
470
+ readonly "obligations": "id" | "tenant" | "contract" | "title" | "description" | "dueOn" | "owner" | "status" | "completedAt" | "completedBy" | "createdAt" | "updatedAt";
471
+ };
472
+ readonly functions: "contract_apply_status" | "contract_schedule_renewal" | "contract_signature_settled" | "create_contract" | "delete_obligation" | "get_contract" | "list_contracts" | "list_obligations" | "run_contract_renewals" | "save_obligation" | "send_contract_for_signature" | "set_obligation_status" | "transition_contract" | "update_contract";
473
+ readonly actions: "read" | "write" | "manage";
474
+ readonly hooks: never;
475
+ readonly entities: {
476
+ readonly "contract": "id" | "tenant_id" | "title" | "description" | "counterparty_type" | "counterparty_id" | "owner_id" | "status" | "value" | "currency" | "starts_on" | "ends_on" | "auto_renew" | "renewal_months" | "notice_days" | "renewed_count" | "signature_request_id" | "signed_at" | "terminated_at" | "termination_reason" | "created_by" | "created_at" | "updated_at";
477
+ readonly "obligation": "id" | "tenant_id" | "contract_id" | "title" | "description" | "due_on" | "owner_id" | "status" | "completed_at" | "completed_by" | "created_at" | "updated_at";
478
+ };
479
+ readonly primary: "contract";
480
+ };
481
+ readonly "courses": {
482
+ readonly tables: {
483
+ readonly "courses": "id" | "tenant" | "key" | "title" | "summary" | "status" | "certificate" | "createdBy" | "createdAt" | "updatedAt";
484
+ readonly "modules": "id" | "tenant" | "course" | "title" | "rank" | "createdAt" | "updatedAt";
485
+ readonly "lessons": "id" | "tenant" | "course" | "module" | "title" | "kind" | "body" | "mediaUrl" | "form" | "required" | "minutes" | "rank" | "createdAt" | "updatedAt";
486
+ readonly "progress": "enrollment" | "lesson" | "tenant" | "course" | "user" | "startedAt" | "completedAt" | "attempts" | "submission" | "score" | "maxScore" | "passed" | "updatedAt";
487
+ readonly "certificates": "id" | "tenant" | "course" | "enrollment" | "user" | "code" | "issuedAt" | "revokedAt";
488
+ };
489
+ readonly functions: "complete_course_lesson" | "course_finish" | "course_json" | "course_learner_json" | "course_lesson" | "course_lesson_done" | "course_outline" | "course_progress" | "course_steps" | "course_sync" | "delete_course" | "delete_course_lesson" | "delete_course_module" | "enroll_in_course" | "enrollment_ensure" | "enrollment_mark" | "list_course_learners" | "list_courses" | "revoke_course_certificate" | "save_course" | "save_course_lesson" | "save_course_module" | "start_course_lesson" | "unenroll_from_course" | "verify_course_certificate";
490
+ readonly actions: "read" | "enroll" | "manage";
491
+ readonly hooks: never;
492
+ readonly entities: {
493
+ readonly "course": "id" | "tenant_id" | "key" | "title" | "summary" | "status" | "issues_certificate" | "created_by" | "created_at" | "updated_at";
494
+ readonly "course_module": "id" | "tenant_id" | "course_id" | "title" | "rank" | "created_at" | "updated_at";
495
+ readonly "course_lesson": "id" | "tenant_id" | "course_id" | "module_id" | "title" | "kind" | "body" | "media_url" | "form_id" | "required" | "duration_minutes" | "rank" | "created_at" | "updated_at";
496
+ readonly "course_certificate": "id" | "tenant_id" | "course_id" | "enrollment_id" | "user_id" | "code" | "issued_at" | "revoked_at";
497
+ };
498
+ readonly primary: "course";
499
+ };
500
+ readonly "created-by": {
501
+ readonly tables: {};
502
+ readonly functions: never;
503
+ readonly actions: never;
504
+ readonly hooks: never;
505
+ readonly entities: {};
506
+ readonly primary: never;
507
+ };
508
+ readonly "credentials": {
509
+ readonly tables: {
510
+ readonly "secrets": "provider" | "name" | "tenant" | "scope" | "vaultId" | "secret" | "updatedAt";
511
+ };
512
+ readonly functions: "credential_delete" | "credential_get" | "credential_set";
513
+ readonly actions: never;
514
+ readonly hooks: never;
515
+ readonly entities: {};
516
+ readonly primary: never;
517
+ };
518
+ readonly "custom-fields": {
519
+ readonly tables: {
520
+ readonly "definitions": "id" | "tenant" | "entity" | "key" | "label" | "type" | "required" | "sensitive" | "permission" | "rank" | "encrypted";
521
+ readonly "options": "id" | "definition" | "value" | "label" | "rank";
522
+ readonly "values": "id" | "tenant" | "definition" | "subjectType" | "subjectId" | "valueText" | "valueNumber" | "valueDate" | "valueBool" | "optionId" | "valueJson" | "valueUrl" | "valueEmail" | "key" | "label" | "type" | "rank" | "createdAt" | "updatedAt";
523
+ };
524
+ readonly functions: "delete_field_definition" | "list_field_definitions" | "rank_field_definition" | "read_field_values" | "save_field_definition" | "set_field_value";
525
+ readonly actions: "manage" | "read" | "sensitive";
526
+ readonly hooks: never;
527
+ readonly entities: {
528
+ readonly "field": "id" | "tenant_id" | "entity" | "key" | "label" | "type" | "required" | "sensitive" | "permission" | "rank" | "encrypted";
529
+ };
530
+ readonly primary: "field";
531
+ };
532
+ readonly "data-lifecycle": {
533
+ readonly tables: {
534
+ readonly "exports": "id" | "subject" | "user" | "tenant" | "status" | "bucket" | "files" | "error" | "requestedBy" | "requestedAt" | "completedAt" | "expiresAt";
535
+ readonly "deletions": "tenant" | "requestedBy" | "requestedAt" | "purgeAfter" | "cancelledAt" | "purgedAt" | "previouslyDisabled";
536
+ readonly "policies": "id" | "tenant" | "plan" | "kind" | "keep" | "updatedAt";
537
+ readonly "holds": "id" | "tenant" | "kind" | "reason" | "placedBy" | "placedAt" | "releasedBy" | "releasedAt";
538
+ };
539
+ readonly functions: "anonymize_due" | "cancel_organization_deletion" | "claim_data_export" | "complete_data_export" | "data_export_object_allowed" | "data_export_rows" | "data_lifecycle_credentials" | "data_lifecycle_tables" | "due_organization_deletions" | "expired_data_exports" | "fail_data_export" | "forget_data_exports" | "get_data_export" | "is_held" | "list_data_exports" | "list_legal_holds" | "list_retention_policies" | "organization_credential_refs" | "organization_deletion" | "place_legal_hold" | "purge_organization" | "release_legal_hold" | "remove_retention_policy" | "request_data_export" | "request_organization_deletion" | "retention_cutoff" | "retention_floor" | "retention_for" | "set_retention_policy";
540
+ readonly actions: "export" | "delete" | "cancelDelete" | "deletePlatform";
541
+ readonly hooks: "on_organization_purge";
542
+ readonly entities: {};
543
+ readonly primary: never;
544
+ };
545
+ readonly "deals": {
546
+ readonly tables: {
547
+ readonly "deals": "id" | "tenant" | "number" | "identifier" | "name" | "companyType" | "companyId" | "motion" | "priority" | "owner" | "product" | "seats" | "amount" | "existingAmount" | "currency" | "valuePeriod" | "amountSource" | "pipeline" | "stage" | "stageEnteredAt" | "outcome" | "probability" | "forecast" | "openedOn" | "closeOn" | "slippedFrom" | "pushCount" | "closedAt" | "nextStep" | "nextAt" | "nextKind" | "flags" | "source" | "note" | "lostReason" | "locked" | "rank" | "archivedAt" | "createdBy" | "createdAt" | "updatedAt" | "listTotal" | "discountTotal" | "subtotal" | "taxTotal" | "total";
548
+ readonly "contacts": "tenant" | "deal" | "contactType" | "contactId" | "role" | "isPrimary";
549
+ readonly "members": "tenant" | "deal" | "user" | "role";
550
+ readonly "lines": "id" | "tenant" | "parent" | "productType" | "productId" | "description" | "quantity" | "unitAmount" | "discountBps" | "taxRateBps" | "taxCode" | "position" | "createdAt";
551
+ };
552
+ readonly functions: "archive_deal" | "close_deal" | "create_deal" | "deal_forecast" | "deal_health" | "delete_deal" | "reopen_deal" | "set_deal_contacts" | "set_deal_lines" | "set_deal_lines_recount" | "set_deal_members" | "update_deals";
553
+ readonly actions: "read" | "write" | "manage";
554
+ readonly hooks: "before_deal_create" | "after_deal_create" | "before_deal_update" | "after_deal_update";
555
+ readonly entities: {
556
+ readonly "deal": "id" | "tenant_id" | "number" | "identifier" | "name" | "company_type" | "company_id" | "motion" | "priority" | "owner_user_id" | "product" | "seats" | "amount" | "existing_amount" | "currency" | "value_period" | "amount_source" | "pipeline_id" | "stage_id" | "stage_entered_at" | "outcome" | "probability" | "forecast_category" | "opened_on" | "expected_close_on" | "slipped_from" | "push_count" | "closed_at" | "next_step" | "next_at" | "next_kind" | "flags" | "source" | "note" | "lost_reason" | "locked" | "rank" | "archived_at" | "created_by" | "created_at" | "updated_at" | "list_total" | "discount_total" | "subtotal" | "tax_total" | "total";
557
+ };
558
+ readonly primary: "deal";
559
+ };
560
+ readonly "dispatch": {
561
+ readonly tables: {
562
+ readonly "workOrders": "id" | "tenant" | "title" | "description" | "priority" | "status" | "technician" | "startsAt" | "endsAt" | "location" | "asset" | "booking" | "subjectType" | "subjectId" | "address" | "enRouteAt" | "arrivedAt" | "completedAt" | "cancelledAt" | "cancelReason" | "completionNote" | "createdBy" | "createdAt" | "updatedAt";
563
+ readonly "routes": "id" | "tenant" | "technician" | "routeDate" | "plannedBy" | "createdAt" | "updatedAt";
564
+ readonly "stops": "id" | "tenant" | "route" | "workOrder" | "position";
565
+ readonly "parts": "id" | "tenant" | "workOrder" | "name" | "quantity" | "unit" | "asset" | "variant" | "location" | "recordedBy" | "createdAt";
566
+ };
567
+ readonly functions: "create_work_order" | "dispatch_board" | "get_work_order" | "list_work_order_parts" | "list_work_orders" | "plan_dispatch_route" | "record_work_order_part" | "remove_work_order_part" | "schedule_work_order" | "set_work_order_status" | "technician_day" | "unschedule_work_order" | "update_work_order";
568
+ readonly actions: "read" | "manage" | "work";
569
+ readonly hooks: never;
570
+ readonly entities: {
571
+ readonly "work_order": "id" | "tenant_id" | "title" | "description" | "priority" | "status" | "technician_id" | "starts_at" | "ends_at" | "location_id" | "asset_id" | "booking_id" | "subject_type" | "subject_id" | "address" | "en_route_at" | "arrived_at" | "completed_at" | "cancelled_at" | "cancel_reason" | "completion_note" | "created_by" | "created_at" | "updated_at";
572
+ readonly "dispatch_route": "id" | "tenant_id" | "technician_id" | "route_date" | "planned_by" | "created_at" | "updated_at";
573
+ readonly "work_order_part": "id" | "tenant_id" | "work_order_id" | "name" | "quantity" | "unit" | "asset_id" | "variant_id" | "location_id" | "recorded_by" | "created_at";
574
+ };
575
+ readonly primary: "work_order";
576
+ };
577
+ readonly "documents": {
578
+ readonly tables: {
579
+ readonly "documents": "id" | "tenant" | "subjectType" | "subjectId" | "name" | "createdBy" | "createdAt" | "updatedAt";
580
+ readonly "updates": "seq" | "document" | "tenant" | "update" | "actor" | "createdAt";
581
+ readonly "snapshots": "document" | "tenant" | "state" | "seq" | "createdAt";
582
+ readonly "suggestions": "id" | "document" | "tenant" | "update" | "summary" | "status" | "createdBy" | "createdAt" | "decidedBy" | "decidedAt" | "note";
583
+ };
584
+ readonly functions: "compact_document" | "decide_document_suggestion" | "document_access" | "document_topic_access" | "document_updates_after" | "documents_to_compact" | "list_document_suggestions" | "open_document" | "pull_document_updates" | "push_document_update" | "suggest_document_change";
585
+ readonly actions: "read" | "write" | "suggest" | "manage";
586
+ readonly hooks: "before_document_create" | "after_document_create";
587
+ readonly entities: {
588
+ readonly "document": "id" | "tenant_id" | "subject_type" | "subject_id" | "name" | "created_by" | "created_at" | "updated_at";
589
+ readonly "document_suggestion": "id" | "document_id" | "tenant_id" | "payload" | "summary" | "status" | "created_by" | "created_at" | "decided_by" | "decided_at" | "note";
590
+ };
591
+ readonly primary: "document";
592
+ };
593
+ readonly "domains": {
594
+ readonly tables: {
595
+ readonly "hostnames": "id" | "tenant" | "hostname" | "kind" | "token" | "verifiedAt" | "primary" | "createdBy" | "createdAt";
596
+ };
597
+ readonly functions: "add_hostname" | "hostname_by_id" | "list_hostnames" | "remove_hostname" | "resolve_hostname" | "set_primary_hostname" | "verify_hostname";
598
+ readonly actions: "read" | "manage";
599
+ readonly hooks: never;
600
+ readonly entities: {};
601
+ readonly primary: never;
602
+ };
603
+ readonly "donations": {
604
+ readonly tables: {
605
+ readonly "funds": "id" | "tenant" | "key" | "name" | "kind" | "goal" | "currency" | "startsOn" | "endsOn" | "archivedAt" | "createdAt" | "updatedAt";
606
+ readonly "pledges": "id" | "tenant" | "donorType" | "donorId" | "fund" | "amount" | "currency" | "frequency" | "startsOn" | "endsOn" | "status" | "provider" | "providerCustomer" | "note" | "createdBy" | "createdAt" | "updatedAt";
607
+ readonly "receipts": "id" | "tenant" | "donorType" | "donorId" | "sequence" | "number" | "kind" | "year" | "amount" | "currency" | "issuedAt" | "voidedAt" | "voidReason";
608
+ readonly "donations": "id" | "tenant" | "donorType" | "donorId" | "fund" | "pledge" | "periodStart" | "amount" | "currency" | "receivedOn" | "method" | "status" | "provider" | "paymentReference" | "transaction" | "refundTransaction" | "receipt" | "note" | "createdBy" | "createdAt" | "updatedAt";
609
+ };
610
+ readonly functions: "archive_donation_fund" | "create_pledge" | "donation_settle" | "due_pledge_installments" | "get_gift" | "issue_gift_receipt" | "issue_yearly_receipt" | "list_donation_funds" | "list_donation_receipts" | "list_gifts" | "list_pledges" | "open_gift" | "record_gift" | "record_gift_payment" | "save_donation_fund" | "update_pledge" | "void_donation_receipt" | "yearly_giving_summary";
611
+ readonly actions: "read" | "manage";
612
+ readonly hooks: never;
613
+ readonly entities: {
614
+ readonly "donation": "id" | "tenant_id" | "donor_type" | "donor_id" | "fund_id" | "pledge_id" | "period_start" | "amount" | "currency" | "received_on" | "method" | "status" | "provider" | "payment_reference" | "transaction_id" | "refund_transaction_id" | "receipt_id" | "note" | "created_by" | "created_at" | "updated_at";
615
+ readonly "pledge": "id" | "tenant_id" | "donor_type" | "donor_id" | "fund_id" | "amount" | "currency" | "frequency" | "starts_on" | "ends_on" | "status" | "provider" | "provider_customer" | "note" | "created_by" | "created_at" | "updated_at";
616
+ readonly "donation_fund": "id" | "tenant_id" | "key" | "name" | "kind" | "goal" | "currency" | "starts_on" | "ends_on" | "archived_at" | "created_at" | "updated_at";
617
+ readonly "donation_receipt": "id" | "tenant_id" | "donor_type" | "donor_id" | "sequence" | "number" | "kind" | "year" | "amount" | "currency" | "issued_at" | "voided_at" | "void_reason";
618
+ };
619
+ readonly primary: "donation";
620
+ };
621
+ readonly "drive": {
622
+ readonly tables: {
623
+ readonly "nodes": "id" | "tenant" | "drive" | "parent" | "kind" | "name" | "attachment" | "path" | "rank" | "deletedAt" | "source" | "externalId" | "externalMetadata" | "legalHoldUntil" | "createdBy" | "createdAt" | "updatedAt";
624
+ readonly "grants": "id" | "tenant" | "node" | "principalType" | "principalId" | "user" | "team" | "role" | "expiresAt" | "createdBy" | "createdAt";
625
+ readonly "drives": "id" | "tenant" | "name" | "kind" | "owner" | "connection" | "createdBy" | "createdAt" | "updatedAt";
626
+ readonly "driveGrants": "id" | "tenant" | "drive" | "principalType" | "principalId" | "role" | "expiresAt" | "createdBy" | "createdAt";
627
+ readonly "connections": "id" | "tenant" | "user" | "provider" | "name" | "status" | "syncCursor" | "syncClaimedAt" | "lastSyncedAt" | "lastSyncError" | "createdBy" | "createdAt" | "updatedAt";
628
+ };
629
+ readonly functions: "drive_ancestors" | "drive_can" | "drive_check_parent" | "drive_clean_name" | "drive_conflict" | "drive_create_folder" | "drive_delete" | "drive_free_name" | "drive_get" | "drive_grants" | "drive_hold" | "drive_insert_node" | "drive_list" | "drive_lock_siblings" | "drive_move" | "drive_node_held" | "drive_node_json" | "drive_node_moved" | "drive_node_path" | "drive_node_writable" | "drive_path" | "drive_readable_ids" | "drive_release_hold" | "drive_rename" | "drive_role" | "drive_share" | "drive_shared" | "drive_subtree" | "drive_unshare";
630
+ readonly actions: "read" | "create" | "manage";
631
+ readonly hooks: "before_drive_node_create" | "after_drive_node_create" | "before_drive_node_move" | "after_drive_node_move" | "before_drive_node_rename" | "after_drive_node_rename" | "before_drive_node_share" | "after_drive_node_share";
632
+ readonly entities: {
633
+ readonly "node": "id" | "tenant_id" | "drive_id" | "parent_id" | "kind" | "name" | "attachment_id" | "path" | "rank" | "deleted_at" | "source" | "external_id" | "external_metadata" | "legal_hold_until" | "created_by" | "created_at" | "updated_at";
634
+ };
635
+ readonly primary: "node";
636
+ };
637
+ readonly "drive-files": {
638
+ readonly tables: {};
639
+ readonly functions: never;
640
+ readonly actions: never;
641
+ readonly hooks: never;
642
+ readonly entities: {};
643
+ readonly primary: never;
644
+ };
645
+ readonly "employees": {
646
+ readonly tables: {
647
+ readonly "employees": "id" | "tenant" | "user" | "name" | "email" | "jobTitle" | "team" | "manager" | "employmentType" | "status" | "startDate" | "endDate" | "offboardReason" | "originType" | "originId" | "createdBy" | "createdAt" | "updatedAt" | "firstName" | "lastName";
648
+ readonly "privateDetails": "employee" | "tenant" | "user" | "nationalId" | "iban" | "birthDate" | "personalEmail" | "phone" | "address" | "emergencyContacts" | "offboardedAt" | "anonymizedAt" | "updatedAt" | "updatedBy" | "addressLine1" | "addressLine2" | "postalCode" | "city" | "region" | "country" | "emergencyName" | "emergencyPhone" | "emergencyRelation";
649
+ readonly "contracts": "id" | "tenant" | "employee" | "startsOn" | "endsOn" | "hoursPerWeek" | "salary" | "currency" | "salaryPeriod" | "note" | "createdBy" | "createdAt";
650
+ };
651
+ readonly functions: "add_employee_contract" | "create_employee" | "employee_contracts" | "employee_private_details" | "offboard_employee" | "org_chart" | "reports_of" | "save_employee_private_details" | "update_employees";
652
+ readonly actions: "read" | "write" | "viewSensitive" | "create" | "contractsRead" | "contractsWrite" | "privateDetailsWrite";
653
+ readonly hooks: "before_employee_create" | "after_employee_create" | "before_employee_update" | "after_employee_update" | "before_employee_offboard" | "after_employee_offboard";
654
+ readonly entities: {
655
+ readonly "employee": "id" | "tenant_id" | "user_id" | "name" | "email" | "job_title" | "team_id" | "manager_id" | "employment_type" | "status" | "start_date" | "end_date" | "offboard_reason" | "origin_type" | "origin_id" | "created_by" | "created_at" | "updated_at" | "first_name" | "last_name";
656
+ };
657
+ readonly primary: "employee";
658
+ };
659
+ readonly "enrichment": {
660
+ readonly tables: {
661
+ readonly "enrichments": "id" | "tenant" | "company" | "person" | "provider" | "status" | "data" | "filled" | "fetchedAt" | "requestedBy";
662
+ };
663
+ readonly functions: "enrichment_due" | "enrichment_target" | "enrichments_of" | "record_enrichment";
664
+ readonly actions: "read" | "run";
665
+ readonly hooks: never;
666
+ readonly entities: {
667
+ readonly "enrichment": "id" | "tenant_id" | "company_id" | "person_id" | "provider" | "status" | "data" | "filled" | "fetched_at" | "requested_by";
668
+ };
669
+ readonly primary: "enrichment";
670
+ };
671
+ readonly "enrollments": {
672
+ readonly tables: {
673
+ readonly "programs": "id" | "tenant" | "key" | "name" | "description" | "subjectTypes" | "steps" | "enabled" | "version" | "createdBy" | "createdAt" | "updatedAt";
674
+ readonly "enrollments": "id" | "tenant" | "program" | "programVersion" | "subjectType" | "subjectId" | "user" | "steps" | "completedSteps" | "status" | "enrolledBy" | "enrolledAt" | "completedAt" | "cancelledAt" | "updatedAt";
675
+ readonly "steps": "enrollment" | "tenant" | "step" | "completedBy" | "completedAt";
676
+ };
677
+ readonly functions: "cancel_enrollment" | "complete_enrollment_step" | "delete_enrollment_program" | "enroll" | "enrollment" | "enrollment_ensure" | "enrollment_json" | "enrollment_mark" | "enrollment_programs" | "enrollment_step" | "list_enrollments" | "reset_enrollment_step" | "save_enrollment_program";
678
+ readonly actions: "read" | "enroll" | "manage";
679
+ readonly hooks: never;
680
+ readonly entities: {
681
+ readonly "enrollment_program": "id" | "tenant_id" | "key" | "name" | "description" | "subject_types" | "steps" | "enabled" | "version" | "created_by" | "created_at" | "updated_at";
682
+ readonly "enrollment": "id" | "tenant_id" | "program" | "program_version" | "subject_type" | "subject_id" | "user_id" | "steps" | "completed_steps" | "status" | "enrolled_by" | "enrolled_at" | "completed_at" | "cancelled_at" | "updated_at";
683
+ };
684
+ readonly primary: "enrollment_program";
685
+ };
686
+ readonly "entitlements": {
687
+ readonly tables: {};
688
+ readonly functions: never;
689
+ readonly actions: never;
690
+ readonly hooks: never;
691
+ readonly entities: {};
692
+ readonly primary: never;
693
+ };
694
+ readonly "expenses": {
695
+ readonly tables: {
696
+ readonly "categories": "id" | "tenant" | "key" | "name" | "currency" | "limitAmount" | "receiptOver" | "archivedAt" | "createdAt" | "updatedAt";
697
+ readonly "reports": "id" | "tenant" | "user" | "title" | "currency" | "note" | "approval" | "submittedAt" | "approvedAt" | "approvalTransaction" | "reimbursedAt" | "reimbursement" | "cancelledAt" | "createdAt" | "updatedAt" | "rejectedAt" | "decidedBy" | "decisionNote";
698
+ readonly "lines": "id" | "tenant" | "report" | "category" | "spentOn" | "description" | "merchant" | "amount" | "createdAt" | "updatedAt";
699
+ };
700
+ readonly functions: "add_expense_line" | "approve_expense_report" | "archive_expense_category" | "cancel_expense_report" | "check_expense_report" | "create_expense_report" | "expense_report_violations" | "get_expense_report" | "list_expense_categories" | "list_expense_reports" | "reimburse_expense_report" | "remove_expense_line" | "save_expense_category" | "submit_expense_report" | "update_expense_line";
701
+ readonly actions: "read" | "submit" | "approve" | "manage";
702
+ readonly hooks: never;
703
+ readonly entities: {
704
+ readonly "expense_report": "id" | "tenant_id" | "user_id" | "title" | "currency" | "note" | "approval_id" | "submitted_at" | "approved_at" | "approval_transaction_id" | "reimbursed_at" | "reimbursement_transaction_id" | "cancelled_at" | "created_at" | "updated_at" | "rejected_at" | "decided_by" | "decision_note";
705
+ readonly "expense_line": "id" | "tenant_id" | "report_id" | "category_id" | "spent_on" | "description" | "merchant" | "amount" | "created_at" | "updated_at";
706
+ readonly "expense_category": "id" | "tenant_id" | "key" | "name" | "currency" | "limit_amount" | "receipt_over" | "archived_at" | "created_at" | "updated_at";
707
+ };
708
+ readonly primary: "expense_report";
709
+ };
710
+ readonly "field-encryption": {
711
+ readonly tables: {};
712
+ readonly functions: "drop_field_key" | "field_decrypt" | "field_encrypt" | "field_key" | "field_open" | "field_seal";
713
+ readonly actions: never;
714
+ readonly hooks: never;
715
+ readonly entities: {};
716
+ readonly primary: never;
717
+ };
718
+ readonly "field-history": {
719
+ readonly tables: {
720
+ readonly "changes": "id" | "tenant" | "subjectType" | "subjectId" | "field" | "before" | "after" | "changedBy" | "changedAt";
721
+ };
722
+ readonly functions: "field_history";
723
+ readonly actions: "read";
724
+ readonly hooks: never;
725
+ readonly entities: {};
726
+ readonly primary: never;
727
+ };
728
+ readonly "flags": {
729
+ readonly tables: {
730
+ readonly "flags": "key" | "type" | "description" | "variants" | "defaultVariant" | "enabled" | "archived" | "rules" | "rolloutPercentage" | "rolloutVariants" | "rolloutSchedule" | "createdAt" | "updatedAt";
731
+ readonly "revisions": "id" | "flag" | "revision" | "definition" | "message" | "changedBy" | "changedAt";
732
+ readonly "segments": "name" | "description" | "rules" | "updatedAt";
733
+ readonly "overrides": "id" | "flag" | "tenant" | "user" | "context" | "contextKey" | "variant" | "createdAt";
734
+ };
735
+ readonly functions: "delete_flag" | "delete_flag_segment" | "flag_bucket" | "flag_condition_matches" | "flag_definitions" | "flag_enabled" | "flag_evaluation" | "flag_history" | "flag_rollout_percentage" | "list_flag_segments" | "list_flags" | "restore_flag" | "save_flag" | "save_flag_segment" | "set_flag_override" | "tenant_ids_with_flag";
736
+ readonly actions: "manage";
737
+ readonly hooks: never;
738
+ readonly entities: {
739
+ readonly "flag": "key" | "type" | "description" | "variants" | "default_variant" | "enabled" | "archived" | "rules" | "rollout_percentage" | "rollout_variants" | "rollout_schedule" | "created_at" | "updated_at";
740
+ };
741
+ readonly primary: "flag";
742
+ };
743
+ readonly "forecasts": {
744
+ readonly tables: {
745
+ readonly "snapshots": "id" | "tenant" | "pipeline" | "since" | "until" | "currency" | "target" | "totals" | "dealCount" | "takenBy" | "takenAt";
746
+ readonly "deals": "snapshot" | "tenant" | "deal" | "name" | "owner" | "stage" | "forecast" | "outcome" | "amount" | "closeOn" | "closedAt";
747
+ };
748
+ readonly functions: "forecast_changes" | "forecast_snapshot" | "forecast_snapshots" | "take_forecast_snapshot";
749
+ readonly actions: "read" | "snapshot";
750
+ readonly hooks: never;
751
+ readonly entities: {
752
+ readonly "snapshot": "id" | "tenant_id" | "pipeline_id" | "period_start" | "period_end" | "currency" | "target" | "totals" | "deal_count" | "taken_by" | "taken_at";
753
+ };
754
+ readonly primary: "snapshot";
755
+ };
756
+ readonly "forms": {
757
+ readonly tables: {
758
+ readonly "forms": "id" | "tenant" | "key" | "title" | "description" | "status" | "currentVersion" | "createdBy" | "createdAt" | "updatedAt";
759
+ readonly "versions": "id" | "tenant" | "form" | "number" | "definition" | "schema" | "createdBy" | "createdAt";
760
+ readonly "submissions": "id" | "tenant" | "form" | "version" | "subjectType" | "subjectId" | "respondent" | "answers" | "status" | "source" | "reviewedBy" | "reviewedAt" | "createdAt" | "submittedAt" | "updatedAt" | "score" | "maxScore" | "passed";
761
+ readonly "answerKeys": "version" | "tenant" | "answers" | "createdAt";
762
+ };
763
+ readonly functions: "create_form" | "delete_form_submission" | "form_answer_matches" | "form_answer_merge" | "form_answer_split" | "form_condition_holds" | "form_condition_schema" | "form_correct_fits" | "form_field_schema" | "form_nps" | "form_resolve" | "form_schema" | "form_score" | "form_submission_save" | "get_form" | "get_form_submission" | "get_form_version" | "list_form_submissions" | "list_forms" | "publish_form_version" | "review_form_submission" | "submit_form" | "update_form";
764
+ readonly actions: "read" | "manage" | "submit" | "review";
765
+ readonly hooks: "before_form_publish" | "after_form_publish" | "before_form_submission" | "after_form_submission" | "before_public_form_submission";
766
+ readonly entities: {
767
+ readonly "form": "id" | "tenant_id" | "key" | "title" | "description" | "status" | "current_version_id" | "created_by" | "created_at" | "updated_at";
768
+ };
769
+ readonly primary: "form";
770
+ };
771
+ readonly "goals": {
772
+ readonly tables: {
773
+ readonly "targets": "id" | "tenant" | "name" | "metric" | "owner" | "team" | "periodStart" | "periodEnd" | "currency" | "goal" | "actual" | "archivedAt" | "createdAt" | "updatedAt";
774
+ };
775
+ readonly functions: "save_target" | "target_progress";
776
+ readonly actions: "read" | "manage";
777
+ readonly hooks: never;
778
+ readonly entities: {
779
+ readonly "target": "id" | "tenant_id" | "name" | "metric" | "owner_user_id" | "team_id" | "period_start" | "period_end" | "currency" | "goal" | "actual" | "archived_at" | "created_at" | "updated_at";
780
+ };
781
+ readonly primary: "target";
782
+ };
783
+ readonly "grants": {
784
+ readonly tables: {};
785
+ readonly functions: never;
786
+ readonly actions: never;
787
+ readonly hooks: never;
788
+ readonly entities: {};
789
+ readonly primary: never;
790
+ };
791
+ readonly "guests": {
792
+ readonly tables: {
793
+ readonly "guests": "id" | "tenant" | "email" | "name" | "user" | "partyType" | "partyId" | "status" | "tokenHash" | "invitedBy" | "expiresAt" | "acceptedAt" | "revokedAt" | "createdAt" | "updatedAt";
794
+ readonly "grants": "id" | "tenant" | "guest" | "subjectType" | "subjectId" | "actions" | "grantedBy" | "expiresAt" | "createdAt" | "updatedAt";
795
+ };
796
+ readonly functions: "accept_guest_invite" | "grant_guest_access" | "guest_can" | "invite_guest" | "list_guest_grants" | "list_guests" | "my_guest_access" | "revoke_guest" | "revoke_guest_access";
797
+ readonly actions: "read" | "manage";
798
+ readonly hooks: never;
799
+ readonly entities: {
800
+ readonly "guest": "id" | "tenant_id" | "email" | "name" | "user_id" | "party_type" | "party_id" | "status" | "token_hash" | "invited_by" | "expires_at" | "accepted_at" | "revoked_at" | "created_at" | "updated_at";
801
+ readonly "guest_grant": "id" | "tenant_id" | "guest_id" | "subject_type" | "subject_id" | "actions" | "granted_by" | "expires_at" | "created_at" | "updated_at";
802
+ };
803
+ readonly primary: "guest";
804
+ };
805
+ readonly "hiring": {
806
+ readonly tables: {
807
+ readonly "jobs": "id" | "tenant" | "title" | "team" | "location" | "employmentType" | "description" | "hiringManager" | "status" | "openedAt" | "closedAt" | "createdAt" | "updatedAt";
808
+ readonly "applications": "id" | "tenant" | "job" | "candidateType" | "candidateId" | "source" | "owner" | "pipeline" | "stage" | "stageEnteredAt" | "state" | "rejectionReason" | "hiredAt" | "rank" | "createdAt" | "updatedAt";
809
+ readonly "scorecards": "id" | "tenant" | "application" | "stage" | "reviewer" | "rating" | "recommendation" | "notes" | "submittedAt";
810
+ readonly "interviews": "id" | "tenant" | "application" | "kind" | "startsAt" | "endsAt" | "location" | "interviewers" | "createdBy" | "createdAt";
811
+ readonly "interviewers": "tenant" | "interview" | "user";
812
+ readonly "scorecardScores": "tenant" | "scorecard" | "criterion" | "score" | "notes";
813
+ };
814
+ readonly functions: "application_detail" | "apply_to_job" | "close_application" | "save_job" | "schedule_interview" | "submit_scorecard";
815
+ readonly actions: "read" | "write" | "manage" | "create" | "jobsCreate" | "jobsUpdate" | "score";
816
+ readonly hooks: "before_application_hire" | "after_application_hire";
817
+ readonly entities: {
818
+ readonly "job": "id" | "tenant_id" | "title" | "team_id" | "location" | "employment_type" | "description" | "hiring_manager_user_id" | "status" | "opened_at" | "closed_at" | "created_at" | "updated_at";
819
+ readonly "application": "id" | "tenant_id" | "job_id" | "candidate_type" | "candidate_id" | "source" | "owner_user_id" | "pipeline_id" | "stage_id" | "stage_entered_at" | "state" | "rejection_reason" | "hired_at" | "rank" | "created_at" | "updated_at";
820
+ readonly "interview": "id" | "tenant_id" | "application_id" | "kind" | "starts_at" | "ends_at" | "location" | "interviewer_user_ids" | "created_by" | "created_at";
821
+ };
822
+ readonly primary: "job";
823
+ };
824
+ readonly "idempotency": {
825
+ readonly tables: {
826
+ readonly "keys": "scope" | "key" | "requestHash" | "status" | "statusCode" | "response" | "lockedUntil" | "createdAt" | "expiresAt" | "holder";
827
+ readonly "leases": "scope" | "key" | "holder" | "expiresAt";
828
+ };
829
+ readonly functions: never;
830
+ readonly actions: never;
831
+ readonly hooks: never;
832
+ readonly entities: {};
833
+ readonly primary: never;
834
+ };
835
+ readonly "identities": {
836
+ readonly tables: {
837
+ readonly "links": "id" | "kind" | "provider" | "value" | "workspace" | "user" | "contact" | "source" | "createdAt";
838
+ readonly "codes": "id" | "user" | "kind" | "provider" | "codeHash" | "expiresAt" | "usedAt" | "createdAt";
839
+ };
840
+ readonly functions: "backfill_verified_emails" | "begin_identity_link" | "link_verified_email" | "my_identities" | "on_auth_user_email" | "principal_by_identity" | "redeem_identity_link" | "unlink_identity";
841
+ readonly actions: never;
842
+ readonly hooks: never;
843
+ readonly entities: {};
844
+ readonly primary: never;
845
+ };
846
+ readonly "impersonation": {
847
+ readonly tables: {
848
+ readonly "sessions": "id" | "admin" | "target" | "reason" | "tenant" | "readOnly" | "startedAt" | "expiresAt" | "endedAt" | "endedBy" | "metadata";
849
+ readonly "requests": "id" | "admin" | "target" | "reason" | "tenant" | "readOnly" | "metadata" | "requestedAt" | "expiresAt" | "approvedBy" | "approvedAt" | "session";
850
+ };
851
+ readonly functions: "active_support_session" | "apply_support_approval" | "approve_support_request" | "approved_support_request" | "end_support_session" | "expire_support_sessions" | "list_support_sessions" | "request_support_session" | "start_support_session" | "support_request" | "support_target_claims";
852
+ readonly actions: "start" | "view" | "revoke";
853
+ readonly hooks: "before_support_start" | "after_support_start" | "after_support_end";
854
+ readonly entities: {};
855
+ readonly primary: never;
856
+ };
857
+ readonly "imports": {
858
+ readonly tables: {
859
+ readonly "runs": "id" | "tenant" | "kind" | "status" | "mapping" | "counts" | "errors" | "createdBy" | "createdAt";
860
+ };
861
+ readonly functions: "finish_import" | "mark_import_running" | "start_import";
862
+ readonly actions: "manage";
863
+ readonly hooks: never;
864
+ readonly entities: {};
865
+ readonly primary: never;
866
+ };
867
+ readonly "inbox": {
868
+ readonly tables: {
869
+ readonly "inboxes": "id" | "tenant" | "name" | "channel" | "address" | "installation" | "botMode" | "settings" | "createdAt" | "updatedAt" | "archivedAt";
870
+ readonly "members": "inbox" | "user" | "role" | "createdAt";
871
+ readonly "teams": "id" | "tenant" | "name" | "createdAt";
872
+ readonly "teamMembers": "team" | "user" | "createdAt";
873
+ readonly "contacts": "id" | "tenant" | "user" | "name" | "email" | "phone" | "avatarUrl" | "metadata" | "createdAt" | "updatedAt";
874
+ readonly "identities": "id" | "tenant" | "contact" | "channel" | "externalId" | "createdAt";
875
+ readonly "conversations": "id" | "tenant" | "inbox" | "contact" | "subject" | "status" | "priority" | "assignee" | "team" | "botMode" | "thread" | "snoozedUntil" | "lastMessageAt" | "preview" | "firstResponseAt" | "resolvedAt" | "metadata" | "createdAt" | "updatedAt";
876
+ readonly "events": "id" | "tenant" | "conversation" | "type" | "actor" | "data" | "createdAt";
877
+ readonly "details": "message" | "tenant" | "conversation" | "direction" | "authorType" | "format" | "externalId" | "replyTo" | "metadata";
878
+ readonly "deliveries": "id" | "tenant" | "message" | "channel" | "status" | "externalId" | "error" | "attempts" | "createdAt" | "updatedAt";
879
+ readonly "inbound": "id" | "tenant" | "adapter" | "externalId" | "inbox" | "headers" | "body" | "status" | "error" | "attempts" | "receivedAt" | "processedAt";
880
+ readonly "templates": "id" | "tenant" | "inbox" | "name" | "channel" | "language" | "body" | "variables" | "externalId" | "createdAt" | "updatedAt";
881
+ readonly "scheduled": "id" | "tenant" | "conversation" | "author" | "input" | "scheduledFor" | "createdAt" | "updatedAt";
882
+ };
883
+ readonly functions: "assign_conversation" | "cancel_inbox_message" | "create_inbox" | "create_inbox_attachment" | "create_inbox_team" | "delete_message_template" | "edit_inbox_message" | "get_conversation" | "get_inbox_message" | "inbox_add_message" | "inbox_can_conversation" | "inbox_contact_ids" | "inbox_contact_read_at" | "inbox_conversation_allowed" | "inbox_conversation_broadcast" | "inbox_conversation_json" | "inbox_counts" | "inbox_delivery_broadcast" | "inbox_file_allowed" | "inbox_file_failed" | "inbox_message_broadcast" | "inbox_messages_json" | "inbox_note_readable" | "inbox_resolve_contact" | "list_conversation_events" | "list_inbox_conversations" | "list_inbox_messages" | "list_scheduled_inbox_messages" | "mark_conversation_read" | "pending_inbound_events" | "pending_inbox_files" | "publish_due_inbox_messages" | "purge_contact" | "purge_inbound_events" | "react_to_inbox_message" | "record_delivery" | "record_inbound" | "reschedule_inbox_message" | "schedule_inbox_message" | "send_inbox_message" | "set_bot_mode" | "set_conversation_status" | "set_delivery_status" | "set_inbound_event_status" | "set_inbox_member" | "set_inbox_team_member" | "start_conversation" | "store_inbound_event" | "update_inbox" | "upsert_contact" | "upsert_message_template" | "wake_snoozed_conversations";
884
+ readonly actions: "read" | "reply" | "assign" | "manage";
885
+ readonly hooks: never;
886
+ readonly entities: {
887
+ readonly "inbox": "id" | "tenant_id" | "name" | "channel" | "channel_address" | "installation_id" | "bot_mode" | "settings" | "created_at" | "updated_at" | "archived_at";
888
+ };
889
+ readonly primary: "inbox";
890
+ };
891
+ readonly "incidents": {
892
+ readonly tables: {
893
+ readonly "components": "id" | "tenant" | "name" | "description" | "group" | "public" | "status" | "position" | "createdAt" | "updatedAt";
894
+ readonly "history": "id" | "tenant" | "component" | "status" | "startedAt" | "endedAt";
895
+ readonly "incidents": "id" | "tenant" | "title" | "description" | "severity" | "status" | "public" | "commander" | "startedAt" | "resolvedAt" | "createdBy" | "createdAt" | "updatedAt";
896
+ readonly "updates": "id" | "tenant" | "incident" | "status" | "body" | "public" | "author" | "createdAt";
897
+ readonly "impacts": "tenant" | "incident" | "component" | "impact";
898
+ readonly "postmortems": "id" | "tenant" | "incident" | "summary" | "impact" | "rootCause" | "resolution" | "actionItems" | "status" | "publishedAt" | "author" | "createdAt" | "updatedAt";
899
+ readonly "pages": "id" | "tenant" | "slug" | "title" | "description" | "published" | "createdAt" | "updatedAt";
900
+ };
901
+ readonly functions: "delete_status_component" | "get_incident" | "get_status_page" | "incident_apply_impacts" | "incident_refresh_components" | "list_incidents" | "list_status_components" | "open_incident" | "post_incident_update" | "public_status_page" | "publish_postmortem" | "save_postmortem" | "save_status_component" | "save_status_page" | "set_incident_impacts" | "update_incident";
902
+ readonly actions: "read" | "write" | "manage";
903
+ readonly hooks: never;
904
+ readonly entities: {
905
+ readonly "incident": "id" | "tenant_id" | "title" | "description" | "severity" | "status" | "public" | "commander_id" | "started_at" | "resolved_at" | "created_by" | "created_at" | "updated_at";
906
+ readonly "status_component": "id" | "tenant_id" | "name" | "description" | "group_name" | "public" | "status" | "position" | "created_at" | "updated_at";
907
+ readonly "postmortem": "id" | "tenant_id" | "incident_id" | "summary" | "impact" | "root_cause" | "resolution" | "action_items" | "status" | "published_at" | "author_id" | "created_at" | "updated_at";
908
+ readonly "status_page": "id" | "tenant_id" | "slug" | "title" | "description" | "published" | "created_at" | "updated_at";
909
+ };
910
+ readonly primary: "incident";
911
+ };
912
+ readonly "inventory": {
913
+ readonly tables: {
914
+ readonly "locations": "id" | "tenant" | "code" | "name" | "kind" | "active" | "createdAt" | "updatedAt";
915
+ readonly "levels": "tenant" | "variant" | "location" | "onHand" | "reserved" | "incoming" | "available" | "reorderPoint" | "updatedAt";
916
+ readonly "reservations": "id" | "tenant" | "variant" | "location" | "quantity" | "status" | "referenceType" | "referenceId" | "expiresAt" | "createdAt" | "updatedAt";
917
+ readonly "transfers": "id" | "tenant" | "from" | "to" | "status" | "note" | "createdAt" | "shippedAt" | "receivedAt";
918
+ readonly "transferLines": "tenant" | "transfer" | "variant" | "quantity";
919
+ readonly "purchaseOrders": "id" | "tenant" | "location" | "supplierType" | "supplierId" | "status" | "currency" | "expectedAt" | "note" | "createdAt" | "updatedAt" | "placedAt";
920
+ readonly "purchaseOrderLines": "id" | "tenant" | "order" | "variant" | "quantity" | "received" | "unitCost";
921
+ };
922
+ readonly functions: "adjust_stock" | "cancel_purchase_order" | "cancel_transfer" | "commit_reservation" | "count_stock" | "create_transfer" | "delete_location" | "expire_reservations" | "move_stock" | "place_purchase_order" | "receive_purchase_order" | "receive_transfer" | "release_reservation" | "reserve_stock" | "save_location" | "save_purchase_order" | "set_location_active" | "set_reorder_point" | "ship_transfer";
923
+ readonly actions: "manage" | "read" | "reserve" | "purchase";
924
+ readonly hooks: "before_stock_adjust" | "after_stock_adjust" | "before_stock_reserve" | "after_stock_reserve";
925
+ readonly entities: {
926
+ readonly "location": "id" | "tenant_id" | "code" | "name" | "kind" | "active" | "created_at" | "updated_at";
927
+ readonly "purchase_order": "id" | "tenant_id" | "location_id" | "supplier_type" | "supplier_id" | "status" | "currency" | "expected_at" | "note" | "created_at" | "updated_at" | "placed_at";
928
+ };
929
+ readonly primary: "location";
930
+ };
931
+ readonly "invitations": {
932
+ readonly tables: {
933
+ readonly "invitations": "id" | "email" | "role" | "tokenHash" | "invitedBy" | "createdAt" | "updatedAt" | "expiresAt" | "acceptedAt" | "acceptedBy" | "declinedAt" | "revokedAt" | "tenant" | "prefill";
934
+ readonly "platformInvitations": "id" | "email" | "role" | "tokenHash" | "invitedBy" | "createdAt" | "updatedAt" | "expiresAt" | "acceptedAt" | "acceptedBy" | "declinedAt" | "revokedAt";
935
+ };
936
+ readonly functions: "accept_invitation" | "accept_invitation_by_id" | "create_invitation" | "decline_invitation" | "decline_invitation_by_id" | "invitation_extra" | "invitation_preview" | "invitation_tenant_ids" | "invite_member" | "my_invitations" | "resend_invitation" | "revoke_invitation" | "update_invitation";
937
+ readonly actions: "invite" | "revoke" | "view" | "invitePlatform";
938
+ readonly hooks: "before_invitation_create" | "after_invitation_accept" | "invitation_preview_extra";
939
+ readonly entities: {};
940
+ readonly primary: never;
941
+ };
942
+ readonly "invoices": {
943
+ readonly tables: {
944
+ readonly "invoices": "id" | "tenant" | "kind" | "number" | "identifier" | "original" | "title" | "companyType" | "companyId" | "contactType" | "contactId" | "currency" | "status" | "termsDays" | "issuedOn" | "dueOn" | "paidTotal" | "creditedTotal" | "paidAt" | "voidedAt" | "voidReason" | "note" | "originType" | "originId" | "depositBps" | "createdBy" | "createdAt" | "updatedAt" | "listTotal" | "discountTotal" | "subtotal" | "taxTotal" | "total";
945
+ readonly "lines": "id" | "tenant" | "parent" | "productType" | "productId" | "description" | "quantity" | "unitAmount" | "discountBps" | "taxRateBps" | "taxCode" | "position" | "createdAt";
946
+ readonly "charges": "id" | "tenant" | "invoice" | "amount" | "currency" | "description" | "createdBy" | "createdAt";
947
+ };
948
+ readonly functions: "add_invoice_charge" | "create_invoice" | "credit_invoice" | "invoice_aging" | "issue_invoice" | "record_invoice_payment" | "set_invoice_lines" | "set_invoice_lines_recount" | "void_invoice" | "write_off_invoice";
949
+ readonly actions: "read" | "write" | "manage";
950
+ readonly hooks: "before_invoice_issue" | "after_invoice_issue" | "before_invoice_payment" | "after_invoice_payment";
951
+ readonly entities: {
952
+ readonly "invoice": "id" | "tenant_id" | "kind" | "number" | "identifier" | "original_id" | "title" | "company_type" | "company_id" | "contact_type" | "contact_id" | "currency" | "status" | "terms_days" | "issued_on" | "due_on" | "paid_total" | "credited_total" | "paid_at" | "voided_at" | "void_reason" | "note" | "origin_type" | "origin_id" | "deposit_bps" | "created_by" | "created_at" | "updated_at" | "list_total" | "discount_total" | "subtotal" | "tax_total" | "total";
953
+ };
954
+ readonly primary: "invoice";
955
+ };
956
+ readonly "jsonb-schemas": {
957
+ readonly tables: {};
958
+ readonly functions: never;
959
+ readonly actions: never;
960
+ readonly hooks: never;
961
+ readonly entities: {};
962
+ readonly primary: never;
963
+ };
964
+ readonly "knowledge": {
965
+ readonly tables: {
966
+ readonly "documents": "id" | "tenant" | "owner" | "scope" | "scopeId" | "file" | "title" | "source" | "metadata" | "status" | "error" | "chunkCount" | "model" | "createdAt" | "updatedAt";
967
+ readonly "chunks": "document" | "index" | "content" | "tokens" | "embedding" | "hash" | "metadata" | "tsv";
968
+ };
969
+ readonly functions: "create_knowledge_document" | "delete_knowledge_document" | "fail_knowledge_document" | "get_knowledge_document" | "knowledge_search" | "list_knowledge_documents" | "pending_knowledge_chunks" | "pending_knowledge_documents" | "reembed_knowledge" | "set_knowledge_embeddings" | "write_knowledge_chunks";
970
+ readonly actions: "read" | "write" | "manage";
971
+ readonly hooks: never;
972
+ readonly entities: {
973
+ readonly "document": "id" | "organization_id" | "owner_id" | "scope" | "scope_id" | "file_id" | "title" | "source" | "metadata" | "status" | "error" | "chunk_count" | "embedding_model" | "created_at" | "updated_at";
974
+ };
975
+ readonly primary: "document";
976
+ };
977
+ readonly "lead-scoring": {
978
+ readonly tables: {
979
+ readonly "checks": "tenant" | "subjectType" | "subjectId" | "stale" | "checkedAt";
980
+ };
981
+ readonly functions: "lead_fields" | "lead_person_changed" | "score_lead" | "score_leads_due";
982
+ readonly actions: never;
983
+ readonly hooks: never;
984
+ readonly entities: {};
985
+ readonly primary: never;
986
+ };
987
+ readonly "leases": {
988
+ readonly tables: {
989
+ readonly "leases": "id" | "tenant" | "unit" | "partyType" | "partyId" | "title" | "status" | "startsOn" | "endsOn" | "rent" | "currency" | "frequency" | "deposit" | "depositHold" | "renewedAt" | "terminatedOn" | "terminationReason" | "metadata" | "createdBy" | "createdAt" | "updatedAt";
990
+ readonly "charges": "id" | "tenant" | "lease" | "periodStart" | "periodEnd" | "amount" | "currency" | "transaction" | "createdAt";
991
+ };
992
+ readonly functions: "activate_lease" | "create_lease" | "get_lease" | "list_lease_charges" | "list_leases" | "post_due_rent" | "record_rent_payment" | "renew_lease" | "terminate_lease";
993
+ readonly actions: "read" | "manage" | "maintain";
994
+ readonly hooks: never;
995
+ readonly entities: {
996
+ readonly "lease": "id" | "tenant_id" | "unit_id" | "party_type" | "party_id" | "title" | "status" | "starts_on" | "ends_on" | "rent" | "currency" | "frequency" | "deposit" | "deposit_hold_id" | "renewed_at" | "terminated_on" | "termination_reason" | "metadata" | "created_by" | "created_at" | "updated_at";
997
+ };
998
+ readonly primary: "lease";
999
+ };
1000
+ readonly "leave": {
1001
+ readonly tables: {
1002
+ readonly "types": "id" | "tenant" | "key" | "name" | "unit" | "paid" | "tracked" | "allowance" | "carryoverMax" | "color" | "archivedAt" | "createdAt" | "updatedAt";
1003
+ readonly "requests": "id" | "tenant" | "user" | "type" | "startsOn" | "endsOn" | "partial" | "amount" | "note" | "approval" | "approvedAt" | "cancelledAt" | "cancelledBy" | "createdAt" | "updatedAt" | "rejectedAt" | "decidedBy" | "decisionNote";
1004
+ };
1005
+ readonly functions: "accrue_leave" | "adjust_leave_balance" | "approve_leave_request" | "archive_leave_type" | "cancel_leave_request" | "close_leave_year" | "decide_leave_request" | "leave_available" | "leave_balances" | "leave_ledger_entries" | "leave_post" | "leave_posted" | "leave_working_days" | "list_leave_requests" | "list_leave_types" | "request_leave" | "save_leave_type";
1006
+ readonly actions: "request" | "read" | "approve" | "manage";
1007
+ readonly hooks: "before_leave_request" | "after_leave_request";
1008
+ readonly entities: {
1009
+ readonly "request": "id" | "tenant_id" | "user_id" | "type_id" | "starts_on" | "ends_on" | "partial" | "amount" | "note" | "approval_id" | "approved_at" | "cancelled_at" | "cancelled_by" | "created_at" | "updated_at" | "rejected_at" | "decided_by" | "decision_note";
1010
+ readonly "type": "id" | "tenant_id" | "key" | "name" | "unit" | "paid" | "tracked" | "allowance" | "carryover_max" | "color" | "archived_at" | "created_at" | "updated_at";
1011
+ };
1012
+ readonly primary: "request";
1013
+ };
1014
+ readonly "ledger": {
1015
+ readonly tables: {
1016
+ readonly "accounts": "id" | "tenant" | "kind" | "code" | "name" | "unit" | "scale" | "holderType" | "holderId" | "owner" | "allowNegative" | "readPermission" | "managedBy" | "metadata" | "closedAt" | "createdAt" | "updatedAt";
1017
+ readonly "transactions": "id" | "tenant" | "kind" | "referenceType" | "referenceId" | "memo" | "key" | "reverses" | "metadata" | "effectiveAt" | "actor" | "createdAt";
1018
+ readonly "entries": "id" | "tenant" | "transaction" | "account" | "amount" | "unit" | "createdAt";
1019
+ readonly "balances": "account" | "tenant" | "balance" | "held" | "available" | "updatedAt";
1020
+ readonly "holds": "id" | "tenant" | "account" | "amount" | "status" | "referenceType" | "referenceId" | "expiresAt" | "transaction" | "createdBy" | "createdAt" | "updatedAt";
1021
+ };
1022
+ readonly functions: "capture_ledger_hold" | "close_ledger_account" | "expire_ledger_holds" | "get_ledger_transaction" | "ledger_account_entries" | "ledger_account_for" | "ledger_append_only" | "ledger_apply_entry" | "ledger_capture" | "ledger_check_balanced" | "ledger_hold" | "ledger_post" | "ledger_read_grants" | "ledger_release" | "ledger_unhold" | "list_ledger_accounts" | "open_ledger_account" | "place_ledger_hold" | "post_ledger_transaction" | "release_ledger_hold" | "reverse_ledger_transaction";
1023
+ readonly actions: "read" | "manage" | "post";
1024
+ readonly hooks: "before_ledger_transaction_post" | "after_ledger_transaction_post";
1025
+ readonly entities: {
1026
+ readonly "ledger_account": "id" | "tenant_id" | "kind" | "code" | "name" | "unit" | "scale" | "holder_type" | "holder_id" | "owner_id" | "allow_negative" | "read_permission" | "managed_by" | "metadata" | "closed_at" | "created_at" | "updated_at";
1027
+ readonly "ledger_transaction": "id" | "tenant_id" | "kind" | "reference_type" | "reference_id" | "memo" | "idempotency_key" | "reverses" | "metadata" | "effective_at" | "actor_id" | "created_at";
1028
+ readonly "ledger_hold": "id" | "tenant_id" | "account_id" | "amount" | "status" | "reference_type" | "reference_id" | "expires_at" | "transaction_id" | "created_by" | "created_at" | "updated_at";
1029
+ };
1030
+ readonly primary: "ledger_account";
1031
+ };
1032
+ readonly "mail-sync": {
1033
+ readonly tables: {
1034
+ readonly "accounts": "id" | "tenant" | "user" | "provider" | "address" | "credentialRef" | "share" | "status" | "cursor" | "lastSyncedAt" | "lastError" | "createdAt" | "updatedAt";
1035
+ readonly "threads": "id" | "tenant" | "account" | "externalId" | "subject" | "snippet" | "lastMessageAt" | "messageCount" | "engagement" | "createdAt" | "updatedAt";
1036
+ readonly "messages": "id" | "tenant" | "account" | "thread" | "externalId" | "rfcId" | "direction" | "fromAddress" | "fromName" | "to" | "cc" | "subject" | "snippet" | "bodyText" | "bodyHtml" | "sentAt" | "templateVersion" | "trackingHash" | "openedAt" | "openCount" | "clickedAt" | "clickCount" | "createdAt";
1037
+ readonly "trackedLinks": "tenant" | "message" | "position" | "url" | "clickCount" | "createdAt";
1038
+ readonly "tracking": "id" | "tenant" | "message" | "kind" | "position" | "userAgent" | "occurredAt";
1039
+ readonly "links": "tenant" | "thread" | "subjectType" | "subjectId" | "source" | "createdAt";
1040
+ };
1041
+ readonly functions: "connect_mail_account" | "disconnect_mail_account" | "due_mail_accounts" | "get_mail_account" | "get_mail_thread" | "ingest_mail" | "link_mail_thread" | "list_mail_threads" | "mail_accounts_of" | "mail_template_stats" | "mail_thread_visible" | "mail_threads_of" | "record_sent_mail" | "set_mail_account_status" | "store_mail_message" | "track_mail" | "unlink_mail_thread" | "update_mail_account";
1042
+ readonly actions: "read" | "connect" | "send" | "manage";
1043
+ readonly hooks: never;
1044
+ readonly entities: {
1045
+ readonly "mail_thread": "id" | "tenant_id" | "account_id" | "external_id" | "subject" | "snippet" | "last_message_at" | "message_count" | "engagement_id" | "created_at" | "updated_at";
1046
+ readonly "mail_account": "id" | "tenant_id" | "user_id" | "provider" | "address" | "credential_ref" | "share" | "status" | "sync_cursor" | "last_synced_at" | "last_error" | "created_at" | "updated_at";
1047
+ readonly "mail_message": "id" | "tenant_id" | "account_id" | "thread_id" | "external_id" | "rfc_message_id" | "direction" | "from_address" | "from_name" | "to_addresses" | "cc_addresses" | "subject" | "snippet" | "body_text" | "body_html" | "sent_at" | "template_version_id" | "tracking_hash" | "opened_at" | "open_count" | "clicked_at" | "click_count" | "created_at";
1048
+ };
1049
+ readonly primary: "mail_thread";
1050
+ };
1051
+ readonly "memberships": {
1052
+ readonly tables: {
1053
+ readonly "memberships": "tenant" | "user" | "role" | "createdAt" | "updatedAt" | "lastUsedAt" | "disabledAt";
1054
+ };
1055
+ readonly functions: "current_tenant_id" | "has_organization_role" | "member_organization_ids" | "membership_claims" | "membership_role_from_roles" | "membership_roles_from_role" | "organization_member_role" | "organization_member_roles";
1056
+ readonly actions: never;
1057
+ readonly hooks: never;
1058
+ readonly entities: {
1059
+ readonly "organization": never;
1060
+ };
1061
+ readonly primary: never;
1062
+ };
1063
+ readonly "memory": {
1064
+ readonly tables: {
1065
+ readonly "memories": "id" | "tenant" | "owner" | "scope" | "agent" | "chat" | "project" | "kind" | "path" | "content" | "version" | "embedding" | "model" | "sourceMessage" | "supersededBy" | "tsv" | "createdAt" | "updatedAt";
1066
+ readonly "messageEmbeddings": "chat" | "message" | "user" | "tenant" | "embedding" | "model" | "createdAt";
1067
+ readonly "documents": "scopeKey" | "path" | "content" | "version" | "expiresAt" | "createdAt" | "updatedAt";
1068
+ };
1069
+ readonly functions: "memory_create" | "memory_delete" | "memory_document_read" | "memory_document_write" | "memory_forget" | "memory_insert" | "memory_list" | "memory_rename" | "memory_save" | "memory_search" | "memory_str_replace" | "memory_view" | "pending_memory_embeddings" | "purge_memory_documents" | "recall_ai_messages" | "set_ai_message_embedding" | "set_memory_embedding" | "set_memory_embeddings";
1070
+ readonly actions: "read" | "manage";
1071
+ readonly hooks: never;
1072
+ readonly entities: {
1073
+ readonly "memory": "id" | "organization_id" | "owner_id" | "scope" | "agent_id" | "chat_id" | "project_id" | "kind" | "path" | "content" | "version" | "embedding" | "embedding_model" | "source_message_id" | "superseded_by" | "tsv" | "created_at" | "updated_at";
1074
+ };
1075
+ readonly primary: "memory";
1076
+ };
1077
+ readonly "messaging": {
1078
+ readonly tables: {
1079
+ readonly "conversations": "id" | "tenant" | "kind" | "access" | "subjectType" | "subjectId" | "title" | "memberKey" | "createdBy" | "lastMessageAt" | "archivedAt" | "createdAt" | "updatedAt";
1080
+ readonly "members": "conversation" | "tenant" | "user" | "role" | "notify" | "lastReadAt" | "joinedAt";
1081
+ readonly "messages": "id" | "tenant" | "conversation" | "parent" | "thread" | "author" | "kind" | "body" | "document" | "anchor" | "mentions" | "mentionScope" | "broadcast" | "replyCount" | "lastReplyAt" | "replyUsers" | "pinnedAt" | "pinnedBy" | "resolvedAt" | "resolvedBy" | "scheduledFor" | "sentAt" | "editedAt" | "deletedAt" | "createdAt";
1082
+ readonly "edits": "id" | "tenant" | "message" | "body" | "document" | "editor" | "editedAt";
1083
+ readonly "reads": "tenant" | "user" | "conversation" | "thread" | "lastReadAt";
1084
+ readonly "recordMentions": "tenant" | "message" | "conversation" | "subjectType" | "subjectId" | "createdAt";
1085
+ readonly "summaries": "id" | "tenant" | "conversation" | "thread" | "summary" | "model" | "messageCount" | "throughAt" | "createdAt" | "updatedAt";
1086
+ };
1087
+ readonly functions: "add_conversation_members" | "archive_conversation" | "can_conversation" | "conversation_read_at" | "conversation_topic_allowed" | "delete_message" | "edit_message" | "get_message" | "index_record_mentions" | "is_conversation_member" | "list_conversations" | "list_file_anchors" | "list_message_edits" | "list_messages" | "list_pinned_messages" | "list_record_mentions" | "list_replies" | "mark_read" | "messaging_file_anchor_valid" | "messaging_message_broadcast" | "messaging_message_sent" | "messaging_message_written" | "messaging_messages_json" | "open_conversation" | "parse_mentions" | "pin_message" | "publish_due_messages" | "remove_conversation_member" | "resolve_message" | "save_thread_summary" | "send_message" | "set_conversation_notify" | "set_typing" | "thread_summary" | "unread_counts";
1088
+ readonly actions: "read" | "send" | "moderate";
1089
+ readonly hooks: "before_message_send" | "after_message_send" | "before_message_edit" | "after_message_edit";
1090
+ readonly entities: {
1091
+ readonly "message": "id" | "tenant_id" | "conversation_id" | "parent_id" | "thread_id" | "author_id" | "kind" | "body" | "document" | "anchor" | "mentions" | "mention_scope" | "broadcast" | "reply_count" | "last_reply_at" | "reply_user_ids" | "pinned_at" | "pinned_by" | "resolved_at" | "resolved_by" | "scheduled_for" | "sent_at" | "edited_at" | "deleted_at" | "created_at";
1092
+ readonly "conversation": "id" | "tenant_id" | "kind" | "access" | "subject_type" | "subject_id" | "title" | "member_key" | "created_by" | "last_message_at" | "archived_at" | "created_at" | "updated_at";
1093
+ };
1094
+ readonly primary: "message";
1095
+ };
1096
+ readonly "metrics": {
1097
+ readonly tables: {
1098
+ readonly "points": "tenant" | "metric" | "grain" | "bucketStart" | "dims" | "value" | "count" | "updatedAt";
1099
+ };
1100
+ readonly functions: "metric_definitions" | "metric_series" | "metric_value" | "metrics_rollup";
1101
+ readonly actions: "read" | "manage";
1102
+ readonly hooks: "before_metric_rollup" | "after_metric_rollup";
1103
+ readonly entities: {};
1104
+ readonly primary: never;
1105
+ };
1106
+ readonly "mfa": {
1107
+ readonly tables: {};
1108
+ readonly functions: never;
1109
+ readonly actions: never;
1110
+ readonly hooks: never;
1111
+ readonly entities: {};
1112
+ readonly primary: never;
1113
+ };
1114
+ readonly "moderation": {
1115
+ readonly tables: {
1116
+ readonly "items": "id" | "tenant" | "subjectType" | "subjectId" | "author" | "status" | "openReports" | "reason" | "decidedBy" | "decidedAt" | "createdAt" | "updatedAt";
1117
+ readonly "reports": "id" | "tenant" | "item" | "reporter" | "reason" | "note" | "status" | "resolvedBy" | "resolvedAt" | "createdAt";
1118
+ readonly "actions": "id" | "tenant" | "item" | "action" | "fromStatus" | "toStatus" | "reason" | "actor" | "createdAt";
1119
+ readonly "bans": "id" | "tenant" | "user" | "reason" | "bannedBy" | "expiresAt" | "liftedBy" | "liftedAt" | "createdAt";
1120
+ };
1121
+ readonly functions: "ban_user" | "list_bans" | "moderate" | "moderation_apply" | "moderation_banned" | "moderation_item" | "moderation_queue" | "moderation_statuses" | "moderation_track" | "report_content" | "unban_user";
1122
+ readonly actions: "read" | "report" | "manage" | "ban";
1123
+ readonly hooks: never;
1124
+ readonly entities: {
1125
+ readonly "moderation_item": "id" | "tenant_id" | "subject_type" | "subject_id" | "author_id" | "status" | "open_reports" | "reason" | "decided_by" | "decided_at" | "created_at" | "updated_at";
1126
+ };
1127
+ readonly primary: "moderation_item";
1128
+ };
1129
+ readonly "notifications": {
1130
+ readonly tables: {
1131
+ readonly "events": "id" | "tenant" | "type" | "actor" | "subjectType" | "subjectId" | "subjectLabel" | "summary" | "actionPath" | "actions" | "priority" | "data" | "key" | "createdBy" | "createdAt";
1132
+ readonly "recipients": "id" | "event" | "tenant" | "user" | "readAt" | "dismissedAt" | "resolvedAt" | "resolution" | "deliveredAt" | "createdAt";
1133
+ readonly "deliveries": "id" | "recipient" | "tenant" | "channel" | "status" | "provider" | "providerMessageId" | "error" | "attempts" | "attemptedAt" | "nextAttemptAt" | "deliveredAt" | "providerStatus" | "providerStatusAt" | "templateKey" | "createdAt";
1134
+ readonly "deliveryEvents": "id" | "delivery" | "tenant" | "kind" | "provider" | "providerEventId" | "occurredAt" | "detail" | "createdAt";
1135
+ readonly "subscriptions": "id" | "tenant" | "user" | "subjectType" | "subjectId" | "level" | "createdAt" | "updatedAt";
1136
+ readonly "preferences": "id" | "user" | "tenant" | "type" | "channel" | "enabled" | "createdAt" | "updatedAt";
1137
+ readonly "suppressions": "id" | "channel" | "address" | "user" | "reason" | "provider" | "providerEventId" | "detail" | "createdAt";
1138
+ };
1139
+ readonly functions: "broadcast_notification" | "claim_notification_deliveries" | "complete_notification_delivery" | "dismiss_notifications" | "get_notification" | "list_notification_preferences" | "list_notification_subscriptions" | "list_notification_suppressions" | "list_notifications" | "list_subject_deliveries" | "mark_notifications_read" | "mark_notifications_unread" | "notification_counts" | "notification_enabled" | "notification_page" | "notify" | "purge_notifications" | "record_delivery_event" | "resolve_notifications" | "send_notification" | "send_notifications" | "set_notification_preference" | "set_notification_subscription" | "suppress_notification_address" | "unsuppress_notification_address";
1140
+ readonly actions: "send" | "read";
1141
+ readonly hooks: "notification_audience" | "before_notification_send" | "after_notify";
1142
+ readonly entities: {};
1143
+ readonly primary: never;
1144
+ };
1145
+ readonly "numbering": {
1146
+ readonly tables: {
1147
+ readonly "sequences": "tenant" | "entity" | "period" | "lastNumber" | "createdAt" | "updatedAt";
1148
+ };
1149
+ readonly functions: "next_number" | "number_format" | "number_period" | "preview_number" | "sync_number_sequences";
1150
+ readonly actions: "assign";
1151
+ readonly hooks: "before_number_assign" | "after_number_assign";
1152
+ readonly entities: {};
1153
+ readonly primary: never;
1154
+ };
1155
+ readonly "oauth-server": {
1156
+ readonly tables: {
1157
+ readonly "clients": "id" | "clientId" | "secretHash" | "registrationTokenHash" | "name" | "redirectUris" | "grantTypes" | "authMethod" | "scope" | "metadata" | "createdBy" | "createdAt" | "updatedAt";
1158
+ readonly "grants": "id" | "userId" | "clientId" | "scopes" | "resource" | "createdAt" | "updatedAt" | "revokedAt";
1159
+ readonly "codes": "codeHash" | "clientId" | "userId" | "grantId" | "redirectUri" | "scope" | "resource" | "codeChallenge" | "nonce" | "expiresAt" | "consumedAt" | "createdAt";
1160
+ readonly "devices": "deviceCodeHash" | "userCode" | "clientId" | "scope" | "resource" | "status" | "userId" | "grantId" | "pollInterval" | "lastPolledAt" | "expiresAt" | "consumedAt" | "createdAt";
1161
+ readonly "revocations": "jti" | "grantId" | "expiresAt" | "createdAt";
1162
+ };
1163
+ readonly functions: "create_oauth_authorization_code" | "create_oauth_device_code" | "decide_oauth_device_code" | "delete_oauth_client" | "is_oauth_token_revoked" | "list_oauth_grants" | "my_oauth_grants" | "oauth_client" | "oauth_device_request" | "oauth_grant_for" | "poll_oauth_device_code" | "purge_oauth_server" | "redeem_oauth_authorization_code" | "register_oauth_client" | "revoke_my_oauth_grant" | "revoke_oauth_grant" | "revoke_oauth_token" | "rotate_oauth_client_secret" | "update_oauth_client" | "verify_oauth_client" | "verify_oauth_registration_token";
1164
+ readonly actions: never;
1165
+ readonly hooks: never;
1166
+ readonly entities: {};
1167
+ readonly primary: never;
1168
+ };
1169
+ readonly "onboarding": {
1170
+ readonly tables: {};
1171
+ readonly functions: "complete_onboarding_step" | "onboarding_progress" | "reset_onboarding_step";
1172
+ readonly actions: "read" | "complete";
1173
+ readonly hooks: never;
1174
+ readonly entities: {};
1175
+ readonly primary: never;
1176
+ };
1177
+ readonly "orders": {
1178
+ readonly tables: {
1179
+ readonly "carts": "id" | "tenant" | "user" | "currency" | "priceList" | "status" | "email" | "shippingAddress" | "billingAddress" | "shippingRate" | "createdAt" | "updatedAt" | "convertedAt";
1180
+ readonly "cartLines": "id" | "tenant" | "cart" | "variant" | "quantity" | "unitAmount" | "createdAt" | "updatedAt";
1181
+ readonly "shippingRates": "id" | "tenant" | "name" | "countries" | "currency" | "kind" | "amount" | "perKg" | "freeOver" | "active" | "createdAt" | "updatedAt";
1182
+ readonly "orders": "id" | "tenant" | "number" | "sequence" | "cart" | "customer" | "email" | "status" | "currency" | "subtotal" | "discountTotal" | "shippingTotal" | "taxTotal" | "total" | "paidTotal" | "refundedTotal" | "taxInclusive" | "shippingAddress" | "billingAddress" | "shipping" | "promotions" | "tax" | "taxTransaction" | "invoiceNumber" | "invoiceSequence" | "invoicedAt" | "placedAt" | "paidAt" | "fulfilledAt" | "completedAt" | "cancelledAt" | "cancelReason" | "updatedAt";
1183
+ readonly "orderLines": "id" | "tenant" | "order" | "position" | "variant" | "product" | "sku" | "title" | "quantity" | "unitAmount" | "subtotal" | "discount" | "tax" | "total" | "requiresShipping" | "location" | "reservation" | "fulfilled" | "returned" | "backordered";
1184
+ readonly "payments": "id" | "tenant" | "order" | "provider" | "reference" | "status" | "currency" | "amount" | "captured" | "refunded" | "createdAt" | "updatedAt";
1185
+ readonly "fulfillments": "id" | "tenant" | "order" | "location" | "status" | "carrier" | "trackingNumber" | "trackingUrl" | "createdAt" | "shippedAt" | "deliveredAt";
1186
+ readonly "fulfillmentLines": "tenant" | "fulfillment" | "line" | "quantity";
1187
+ readonly "returns": "id" | "tenant" | "order" | "status" | "reason" | "requestedBy" | "createdAt" | "receivedAt";
1188
+ readonly "returnLines": "tenant" | "return" | "line" | "quantity";
1189
+ readonly "refunds": "id" | "tenant" | "order" | "payment" | "return" | "amount" | "currency" | "status" | "reason" | "providerReference" | "createdAt" | "completedAt";
1190
+ readonly "kitchenStations": "id" | "tenant" | "key" | "name" | "position" | "isDefault" | "active" | "createdAt" | "updatedAt";
1191
+ readonly "kitchenRoutes": "product" | "tenant" | "station";
1192
+ readonly "preparations": "line" | "tenant" | "order" | "station" | "state" | "note" | "queuedAt" | "startedAt" | "readyAt" | "servedAt" | "updatedAt" | "updatedBy";
1193
+ };
1194
+ readonly functions: "add_to_cart" | "cancel_fulfillment" | "cancel_order" | "cart_totals" | "complete_refund" | "create_cart" | "create_fulfillment" | "create_refund" | "delete_shipping_rate" | "deliver_fulfillment" | "expire_orders" | "get_order" | "merge_carts" | "order_cancel" | "order_json" | "order_transition" | "place_order" | "price_cart" | "receive_return" | "record_payment" | "reject_return" | "request_return" | "save_shipping_rate" | "set_cart_details" | "set_cart_line" | "set_cart_shipping_rate" | "set_order_tax_transaction" | "ship_fulfillment" | "shipping_options";
1195
+ readonly actions: "manage" | "read" | "prepare";
1196
+ readonly hooks: "before_order_place" | "after_order_place" | "before_fulfillment_create" | "after_fulfillment_create" | "before_refund_create" | "after_refund_create";
1197
+ readonly entities: {
1198
+ readonly "order": "id" | "tenant_id" | "number" | "sequence" | "cart_id" | "customer_id" | "email" | "status" | "currency" | "subtotal" | "discount_total" | "shipping_total" | "tax_total" | "total" | "paid_total" | "refunded_total" | "tax_inclusive" | "shipping_address" | "billing_address" | "shipping" | "promotions" | "tax" | "tax_transaction" | "invoice_number" | "invoice_sequence" | "invoiced_at" | "placed_at" | "paid_at" | "fulfilled_at" | "completed_at" | "cancelled_at" | "cancel_reason" | "updated_at";
1199
+ readonly "cart": "id" | "tenant_id" | "user_id" | "currency" | "price_list_id" | "status" | "email" | "shipping_address" | "billing_address" | "shipping_rate_id" | "created_at" | "updated_at" | "converted_at";
1200
+ };
1201
+ readonly primary: "order";
1202
+ };
1203
+ readonly "organizations": {
1204
+ readonly tables: {
1205
+ readonly "organizations": "id" | "name" | "slug" | "createdBy" | "createdAt" | "updatedAt" | "disabledAt" | "deletedAt";
1206
+ };
1207
+ readonly functions: "add_member_role" | "create_organization" | "delete_organization" | "ensure_organization_owner" | "guard_membership" | "guard_membership_role" | "leave_organization" | "list_members" | "list_my_organizations" | "mark_used" | "organization_slug_problem" | "remove_member" | "remove_member_role" | "resume_member" | "suspend_member" | "switch_organization" | "transfer_ownership" | "update_member_role" | "update_organization";
1208
+ readonly actions: "update" | "delete" | "listMembers" | "removeMember" | "suspendMember" | "updateRole" | "transferOwnership" | "create" | "updatePlatform" | "deletePlatform" | "updateRolePlatform" | "removeMemberPlatform";
1209
+ readonly hooks: "before_organization_create" | "after_organization_create" | "before_organization_update" | "after_organization_update" | "after_member_change";
1210
+ readonly entities: {};
1211
+ readonly primary: never;
1212
+ };
1213
+ readonly "outbox": {
1214
+ readonly tables: {
1215
+ readonly "events": "id" | "position" | "type" | "source" | "subject" | "tenant" | "key" | "payload" | "actor" | "createdAt" | "xid";
1216
+ readonly "consumers": "name" | "cursorXid" | "cursor" | "types" | "leaseOwner" | "leaseUntil" | "attempts" | "lastError" | "retryAt" | "updatedAt";
1217
+ readonly "deadLetters": "consumer" | "position" | "eventId" | "type" | "event" | "attempts" | "error" | "deadAt";
1218
+ };
1219
+ readonly functions: "emit_event" | "outbox_ack" | "outbox_claim" | "outbox_dead_letters" | "outbox_fail" | "outbox_history" | "outbox_register" | "outbox_row_event" | "outbox_unregister" | "purge_outbox" | "track_events";
1220
+ readonly actions: never;
1221
+ readonly hooks: never;
1222
+ readonly entities: {};
1223
+ readonly primary: never;
1224
+ };
1225
+ readonly "passes": {
1226
+ readonly tables: {
1227
+ readonly "passes": "id" | "tenant" | "kind" | "holderUser" | "holderName" | "holderEmail" | "subjectType" | "subjectId" | "booking" | "resource" | "usesAllowed" | "uses" | "validFrom" | "validUntil" | "status" | "nonce" | "issuedBy" | "createdAt" | "updatedAt" | "revokedAt";
1228
+ readonly "checkIns": "id" | "tenant" | "pass" | "resource" | "booking" | "gate" | "method" | "admitted" | "reason" | "checkedInBy" | "createdAt";
1229
+ };
1230
+ readonly functions: "check_in_pass" | "get_pass" | "issue_pass" | "list_pass_check_ins" | "list_passes" | "my_passes" | "revoke_pass";
1231
+ readonly actions: "read" | "manage" | "checkIn";
1232
+ readonly hooks: never;
1233
+ readonly entities: {
1234
+ readonly "pass": "id" | "tenant_id" | "kind" | "holder_user_id" | "holder_name" | "holder_email" | "subject_type" | "subject_id" | "booking_id" | "resource_id" | "uses_allowed" | "uses" | "valid_from" | "valid_until" | "status" | "nonce" | "issued_by" | "created_at" | "updated_at" | "revoked_at";
1235
+ readonly "pass_check_in": "id" | "tenant_id" | "pass_id" | "resource_id" | "booking_id" | "gate" | "method" | "admitted" | "reason" | "checked_in_by" | "created_at";
1236
+ };
1237
+ readonly primary: "pass";
1238
+ };
1239
+ readonly "permissions": {
1240
+ readonly tables: {
1241
+ readonly "roles": "id" | "key" | "scope" | "tenant";
1242
+ readonly "permissions": "id" | "key";
1243
+ readonly "rolePermissions": "role" | "permission";
1244
+ readonly "overrides": "tenant" | "role" | "permission" | "granted";
1245
+ readonly "platformAssignments": "user" | "role";
1246
+ };
1247
+ readonly functions: "can" | "can_assign" | "can_assign_as" | "can_user" | "is_platform" | "list_roles" | "member_can" | "permission_claims" | "set_permission_override" | "tenant_ids_with";
1248
+ readonly actions: "listRoles" | "setOverride";
1249
+ readonly hooks: never;
1250
+ readonly entities: {};
1251
+ readonly primary: never;
1252
+ };
1253
+ readonly "pgtap": {
1254
+ readonly tables: {};
1255
+ readonly functions: never;
1256
+ readonly actions: never;
1257
+ readonly hooks: never;
1258
+ readonly entities: {};
1259
+ readonly primary: never;
1260
+ };
1261
+ readonly "pipelines": {
1262
+ readonly tables: {
1263
+ readonly "pipelines": "id" | "tenant" | "subjectType" | "scope" | "key" | "name" | "rank" | "isDefault" | "archivedAt" | "createdAt" | "updatedAt";
1264
+ readonly "stages": "id" | "tenant" | "pipeline" | "key" | "systemKey" | "name" | "color" | "rank" | "category" | "outcome" | "probability" | "rottingAfterDays" | "wipLimit" | "archivedAt" | "createdAt" | "updatedAt";
1265
+ readonly "transitions": "tenant" | "pipeline" | "from" | "to";
1266
+ readonly "history": "id" | "tenant" | "subjectType" | "subjectId" | "pipeline" | "fromStage" | "toStage" | "stageName" | "category" | "outcome" | "amount" | "currency" | "actor" | "enteredAt" | "exitedAt";
1267
+ };
1268
+ readonly functions: "archive_pipeline" | "archive_pipeline_stage" | "default_pipeline" | "list_pipelines" | "pipeline_board" | "pipeline_health" | "pipeline_stats" | "rank_pipeline_stage" | "save_pipeline" | "save_pipeline_stage" | "set_pipeline_transitions";
1269
+ readonly actions: "read" | "manage";
1270
+ readonly hooks: "before_pipeline_save" | "after_pipeline_save" | "before_pipeline_stage_save" | "after_pipeline_stage_save" | "before_pipeline_stage_change" | "after_pipeline_stage_change";
1271
+ readonly entities: {
1272
+ readonly "pipeline": "id" | "tenant_id" | "subject_type" | "scope_id" | "key" | "name" | "rank" | "is_default" | "archived_at" | "created_at" | "updated_at";
1273
+ };
1274
+ readonly primary: "pipeline";
1275
+ };
1276
+ readonly "posts": {
1277
+ readonly tables: {
1278
+ readonly "boards": "id" | "tenant" | "key" | "name" | "description" | "kind" | "archivedAt" | "createdBy" | "createdAt" | "updatedAt";
1279
+ readonly "posts": "id" | "tenant" | "board" | "author" | "title" | "body" | "status" | "moderation" | "pinnedAt" | "lockedAt" | "mergedInto" | "replyCount" | "lastActivityAt" | "createdAt" | "updatedAt";
1280
+ };
1281
+ readonly functions: "create_post" | "delete_post" | "get_post" | "list_post_boards" | "list_posts" | "merge_posts" | "posts_moderated" | "posts_removed" | "posts_replied" | "posts_reply_guard" | "save_post_board" | "set_post_state" | "update_post" | "vote_on_post";
1282
+ readonly actions: "read" | "write" | "moderate" | "manage";
1283
+ readonly hooks: never;
1284
+ readonly entities: {
1285
+ readonly "post_board": "id" | "tenant_id" | "key" | "name" | "description" | "kind" | "archived_at" | "created_by" | "created_at" | "updated_at";
1286
+ readonly "post": "id" | "tenant_id" | "board_id" | "author_id" | "title" | "body" | "status" | "moderation_status" | "pinned_at" | "locked_at" | "merged_into_id" | "reply_count" | "last_activity_at" | "created_at" | "updated_at";
1287
+ };
1288
+ readonly primary: "post";
1289
+ };
1290
+ readonly "profiles": {
1291
+ readonly tables: {
1292
+ readonly "profiles": "key" | "email" | "username" | "fullName" | "firstName" | "lastName" | "avatar" | "avatarPath" | "locale" | "activeTenant" | "activeTeam" | "onboarding" | "disabledAt" | "createdAt" | "updatedAt";
1293
+ };
1294
+ readonly functions: "allocate_username" | "backfill_profiles" | "guard_profile" | "mirror_profile_email" | "my_profile" | "on_auth_user_created" | "sync_profile" | "update_my_profile";
1295
+ readonly actions: never;
1296
+ readonly hooks: "after_profile_sync" | "before_profile_update" | "after_profile_update";
1297
+ readonly entities: {};
1298
+ readonly primary: never;
1299
+ };
1300
+ readonly "promotions": {
1301
+ readonly tables: {
1302
+ readonly "promotions": "id" | "tenant" | "name" | "description" | "kind" | "percent" | "currency" | "amount" | "minSubtotal" | "scope" | "targets" | "startsAt" | "endsAt" | "usageLimit" | "perCustomerLimit" | "redemptions" | "stackable" | "priority" | "automatic" | "active" | "createdAt" | "updatedAt";
1303
+ readonly "codes": "id" | "tenant" | "promotion" | "code" | "usageLimit" | "redemptions" | "createdAt";
1304
+ readonly "cartCodes": "tenant" | "cart" | "code" | "createdAt";
1305
+ readonly "redemptions": "id" | "tenant" | "promotion" | "code" | "order" | "customer" | "email" | "currency" | "amount" | "status" | "createdAt" | "releasedAt";
1306
+ };
1307
+ readonly functions: "apply_promotion_code" | "cart_discounts" | "create_promotion_codes" | "delete_promotion" | "delete_promotion_code" | "move_cart_codes" | "redeem_promotions" | "release_promotions" | "remove_promotion_code" | "round_half_even" | "save_promotion" | "set_promotion_active";
1308
+ readonly actions: "manage" | "read";
1309
+ readonly hooks: "before_promotion_save" | "after_promotion_save" | "before_promotion_activate";
1310
+ readonly entities: {
1311
+ readonly "promotion": "id" | "tenant_id" | "name" | "description" | "kind" | "percent" | "currency" | "amount" | "min_subtotal" | "scope" | "target_ids" | "starts_at" | "ends_at" | "usage_limit" | "per_customer_limit" | "redemptions" | "stackable" | "priority" | "automatic" | "active" | "created_at" | "updated_at";
1312
+ };
1313
+ readonly primary: "promotion";
1314
+ };
1315
+ readonly "push": {
1316
+ readonly tables: {
1317
+ readonly "devices": "id" | "user" | "token" | "platform" | "provider" | "deviceName" | "appVersion" | "createdAt" | "lastSeenAt";
1318
+ readonly "tickets": "id" | "delivery" | "token" | "ticket" | "status" | "error" | "createdAt" | "checkedAt";
1319
+ };
1320
+ readonly functions: "prune_push_tokens" | "push_tokens_for" | "register_push_device" | "unregister_push_device";
1321
+ readonly actions: never;
1322
+ readonly hooks: never;
1323
+ readonly entities: {};
1324
+ readonly primary: never;
1325
+ };
1326
+ readonly "queue": {
1327
+ readonly tables: {
1328
+ readonly "messages": "id" | "queue" | "message" | "attempts" | "enqueuedAt" | "visibleAt" | "archivedAt" | "dead" | "dedupeKey" | "maxAttempts";
1329
+ readonly "schedules": "jobName" | "schedule" | "timezone" | "queue" | "payload" | "nextRun" | "lastRun" | "lockedUntil" | "createdAt" | "tenant" | "firstAfter";
1330
+ };
1331
+ readonly functions: never;
1332
+ readonly actions: never;
1333
+ readonly hooks: never;
1334
+ readonly entities: {};
1335
+ readonly primary: never;
1336
+ };
1337
+ readonly "quotes": {
1338
+ readonly tables: {
1339
+ readonly "quotes": "id" | "tenant" | "number" | "identifier" | "revision" | "supersedes" | "title" | "companyType" | "companyId" | "contactType" | "contactId" | "owner" | "currency" | "status" | "validUntil" | "terms" | "note" | "originType" | "originId" | "tokenHash" | "sentAt" | "viewedAt" | "decidedAt" | "decidedBy" | "decisionNote" | "createdBy" | "createdAt" | "updatedAt" | "listTotal" | "discountTotal" | "subtotal" | "taxTotal" | "total";
1340
+ readonly "lines": "id" | "tenant" | "parent" | "productType" | "productId" | "description" | "quantity" | "unitAmount" | "discountBps" | "taxRateBps" | "taxCode" | "position" | "createdAt";
1341
+ };
1342
+ readonly functions: "create_quote" | "decide_quote" | "expire_quotes" | "public_quote" | "respond_to_quote" | "revise_quote" | "send_quote" | "set_quote_lines" | "set_quote_lines_recount" | "update_quote";
1343
+ readonly actions: "read" | "write" | "manage";
1344
+ readonly hooks: "before_quote_send" | "after_quote_send" | "before_quote_accept" | "after_quote_accept";
1345
+ readonly entities: {
1346
+ readonly "quote": "id" | "tenant_id" | "number" | "identifier" | "revision" | "supersedes_id" | "title" | "company_type" | "company_id" | "contact_type" | "contact_id" | "owner_user_id" | "currency" | "status" | "valid_until" | "terms" | "note" | "origin_type" | "origin_id" | "token_hash" | "sent_at" | "viewed_at" | "decided_at" | "decided_by" | "decision_note" | "created_by" | "created_at" | "updated_at" | "list_total" | "discount_total" | "subtotal" | "tax_total" | "total";
1347
+ };
1348
+ readonly primary: "quote";
1349
+ };
1350
+ readonly "rank": {
1351
+ readonly tables: {};
1352
+ readonly functions: "can_subject" | "move" | "rank_between" | "rank_key" | "rebalance_ranks";
1353
+ readonly actions: never;
1354
+ readonly hooks: never;
1355
+ readonly entities: {};
1356
+ readonly primary: never;
1357
+ };
1358
+ readonly "rate-limit": {
1359
+ readonly tables: {
1360
+ readonly "rules": "scope" | "maxRequests" | "period" | "keyClaim";
1361
+ readonly "counters": "scope" | "key" | "windowStart" | "hits" | "period";
1362
+ };
1363
+ readonly functions: never;
1364
+ readonly actions: never;
1365
+ readonly hooks: never;
1366
+ readonly entities: {};
1367
+ readonly primary: never;
1368
+ };
1369
+ readonly "reactions": {
1370
+ readonly tables: {
1371
+ readonly "reactions": "id" | "tenant" | "subjectType" | "subjectId" | "actor" | "user" | "kind" | "emoji" | "value" | "createdAt";
1372
+ readonly "scores": "tenant" | "subjectType" | "subjectId" | "score" | "up" | "down" | "updatedAt";
1373
+ readonly "emoji": "id" | "tenant" | "shortcode" | "attachment" | "url" | "createdBy" | "createdAt";
1374
+ };
1375
+ readonly functions: "delete_custom_emoji" | "list_custom_emoji" | "react" | "reaction_list" | "reaction_subject_visible" | "reaction_summary" | "reactions_changed" | "reactions_check" | "reactions_tally" | "save_custom_emoji" | "vote" | "vote_summary" | "vote_tally";
1376
+ readonly actions: "read" | "create" | "manage";
1377
+ readonly hooks: "before_react" | "after_react";
1378
+ readonly entities: {
1379
+ readonly "reaction": "id" | "tenant_id" | "subject_type" | "subject_id" | "actor" | "user_id" | "kind" | "emoji" | "value" | "created_at";
1380
+ };
1381
+ readonly primary: "reaction";
1382
+ };
1383
+ readonly "read-sets": {
1384
+ readonly tables: {};
1385
+ readonly functions: never;
1386
+ readonly actions: never;
1387
+ readonly hooks: never;
1388
+ readonly entities: {};
1389
+ readonly primary: never;
1390
+ };
1391
+ readonly "realtime-tables": {
1392
+ readonly tables: {};
1393
+ readonly functions: never;
1394
+ readonly actions: never;
1395
+ readonly hooks: never;
1396
+ readonly entities: {};
1397
+ readonly primary: never;
1398
+ };
1399
+ readonly "relations": {
1400
+ readonly tables: {
1401
+ readonly "relations": "id" | "tenant" | "kind" | "sourceType" | "sourceId" | "targetType" | "targetId" | "data" | "createdBy" | "createdAt";
1402
+ };
1403
+ readonly functions: "ancestors" | "converted_into" | "descendants" | "link" | "relation_rollup" | "relation_walk" | "relations_by_kind" | "relations_of" | "unlink";
1404
+ readonly actions: "read" | "manage";
1405
+ readonly hooks: "before_relation_link" | "after_relation_link";
1406
+ readonly entities: {
1407
+ readonly "relation": "id" | "tenant_id" | "kind" | "source_type" | "source_id" | "target_type" | "target_id" | "data" | "created_by" | "created_at";
1408
+ };
1409
+ readonly primary: "relation";
1410
+ };
1411
+ readonly "reminders": {
1412
+ readonly tables: {
1413
+ readonly "rules": "id" | "tenant" | "subjectType" | "subjectId" | "dtstart" | "tzid" | "rrule" | "frequency" | "intervalCount" | "weekDays" | "monthDay" | "monthWeekday" | "monthOrdinal";
1414
+ readonly "reminders": "id" | "tenant" | "subjectType" | "subjectId" | "user" | "method" | "offsetMinutes";
1415
+ readonly "deliveries": "id" | "reminder" | "occurrenceAt" | "sentAt";
1416
+ };
1417
+ readonly functions: "delete_reminder" | "list_my_reminders" | "list_reminder_schedule" | "mark_reminder_sent" | "save_reminder";
1418
+ readonly actions: "manage" | "read";
1419
+ readonly hooks: never;
1420
+ readonly entities: {
1421
+ readonly "reminder": "id" | "tenant_id" | "subject_type" | "subject_id" | "user_id" | "method" | "offset_minutes";
1422
+ };
1423
+ readonly primary: "reminder";
1424
+ };
1425
+ readonly "reserved-slugs": {
1426
+ readonly tables: {
1427
+ readonly "slugs": "slug" | "reason";
1428
+ };
1429
+ readonly functions: never;
1430
+ readonly actions: never;
1431
+ readonly hooks: never;
1432
+ readonly entities: {};
1433
+ readonly primary: never;
1434
+ };
1435
+ readonly "reviews": {
1436
+ readonly tables: {
1437
+ readonly "reviews": "id" | "tenant" | "subjectType" | "subjectId" | "author" | "authorName" | "rating" | "title" | "body" | "status" | "verified" | "rejectionReason" | "reply" | "repliedBy" | "repliedAt" | "publishedAt" | "createdAt" | "updatedAt";
1438
+ readonly "stats": "tenant" | "subjectType" | "subjectId" | "count" | "total" | "histogram" | "updatedAt";
1439
+ };
1440
+ readonly functions: "delete_review" | "list_reviews" | "my_review" | "publish_review" | "reject_review" | "reply_to_review" | "review_moderation_item" | "review_queue" | "review_stats_refresh" | "review_subject_readable" | "review_summary" | "reviews_changed" | "reviews_moderated" | "submit_review";
1441
+ readonly actions: "manage";
1442
+ readonly hooks: "before_review_submit" | "after_review_submit";
1443
+ readonly entities: {
1444
+ readonly "review": "id" | "tenant_id" | "subject_type" | "subject_id" | "author_id" | "author_name" | "rating" | "title" | "body" | "status" | "verified" | "rejection_reason" | "reply" | "replied_by" | "replied_at" | "published_at" | "created_at" | "updated_at";
1445
+ };
1446
+ readonly primary: "review";
1447
+ };
1448
+ readonly "rls-guard": {
1449
+ readonly tables: {};
1450
+ readonly functions: never;
1451
+ readonly actions: never;
1452
+ readonly hooks: never;
1453
+ readonly entities: {};
1454
+ readonly primary: never;
1455
+ };
1456
+ readonly "saved-views": {
1457
+ readonly tables: {
1458
+ readonly "views": "id" | "tenant" | "list" | "scope" | "owner" | "team" | "name" | "kind" | "state" | "rank" | "isDefault" | "createdAt" | "updatedAt";
1459
+ readonly "preferences": "view" | "user" | "tenant" | "isDefault" | "hidden" | "pinned" | "updatedAt";
1460
+ };
1461
+ readonly functions: "delete_view" | "duplicate_view" | "list_views" | "rank_view" | "save_view" | "set_default_view" | "set_view_preference";
1462
+ readonly actions: "read" | "share";
1463
+ readonly hooks: "before_view_save" | "after_view_save";
1464
+ readonly entities: {
1465
+ readonly "view": "id" | "tenant_id" | "list" | "scope" | "owner_id" | "team_id" | "name" | "kind" | "state" | "rank" | "is_default" | "created_at" | "updated_at";
1466
+ };
1467
+ readonly primary: "view";
1468
+ };
1469
+ readonly "scores": {
1470
+ readonly tables: {
1471
+ readonly "models": "id" | "tenant" | "key" | "name" | "description" | "subjectType" | "rules" | "metrics" | "bands" | "enabled" | "version" | "createdBy" | "createdAt" | "updatedAt";
1472
+ readonly "versions": "model" | "version" | "tenant" | "rules" | "metrics" | "bands" | "savedBy" | "savedAt";
1473
+ readonly "scores": "id" | "tenant" | "model" | "modelVersion" | "subjectType" | "subjectId" | "score" | "band" | "breakdown" | "current" | "computedAt";
1474
+ };
1475
+ readonly functions: "compute_score" | "delete_score_model" | "get_score_model" | "list_score_models" | "save_score_model" | "score_history" | "subject_scores" | "top_scores";
1476
+ readonly actions: "read" | "manage" | "compute";
1477
+ readonly hooks: never;
1478
+ readonly entities: {
1479
+ readonly "score_model": "id" | "tenant_id" | "key" | "name" | "description" | "subject_type" | "rules" | "metrics" | "bands" | "enabled" | "version" | "created_by" | "created_at" | "updated_at";
1480
+ };
1481
+ readonly primary: "score_model";
1482
+ };
1483
+ readonly "search": {
1484
+ readonly tables: {
1485
+ readonly "documents": "tenant" | "subjectType" | "subjectId" | "title" | "titleSearch" | "body" | "url" | "tsv" | "contentHash" | "embedding" | "updatedAt" | "description";
1486
+ };
1487
+ readonly functions: "search" | "search_favorites" | "search_index_row" | "search_normalize" | "search_recents" | "search_refresh" | "search_reindex" | "search_remove" | "search_star" | "search_touch" | "search_user_state";
1488
+ readonly actions: "read";
1489
+ readonly hooks: "before_search_document_index" | "after_search_document_index";
1490
+ readonly entities: {};
1491
+ readonly primary: never;
1492
+ };
1493
+ readonly "security-events": {
1494
+ readonly tables: {
1495
+ readonly "streams": "id" | "tenant" | "receiver" | "audience" | "description" | "eventsRequested" | "eventsDelivered" | "method" | "endpoint" | "status" | "reason" | "verifiedAt" | "createdAt" | "updatedAt";
1496
+ readonly "events": "stream" | "jti" | "token" | "createdAt";
1497
+ readonly "received": "issuer" | "jti" | "receivedAt";
1498
+ };
1499
+ readonly functions: "create_ssf_stream" | "delete_ssf_stream" | "forget_ssf_received" | "note_ssf_verification" | "poll_ssf_events" | "purge_shared_signals" | "queue_ssf_set" | "record_ssf_received" | "set_ssf_stream_status" | "ssf_stream" | "ssf_streams" | "ssf_streams_for_event" | "update_ssf_stream";
1500
+ readonly actions: never;
1501
+ readonly hooks: never;
1502
+ readonly entities: {};
1503
+ readonly primary: never;
1504
+ };
1505
+ readonly "segments": {
1506
+ readonly tables: {
1507
+ readonly "segments": "id" | "tenant" | "name" | "description" | "subjectType" | "conditions" | "memberCount" | "refreshedAt" | "createdBy" | "createdAt" | "updatedAt";
1508
+ readonly "members": "segment" | "tenant" | "subjectId" | "enteredAt";
1509
+ };
1510
+ readonly functions: "evaluate_segment" | "list_segment_members" | "refresh_due_segments" | "refresh_segment" | "remove_segment" | "save_segment" | "segment_get" | "segments_list" | "segments_of";
1511
+ readonly actions: "read" | "edit";
1512
+ readonly hooks: never;
1513
+ readonly entities: {
1514
+ readonly "segment": "id" | "tenant_id" | "name" | "description" | "subject_type" | "conditions" | "member_count" | "refreshed_at" | "created_by" | "created_at" | "updated_at";
1515
+ };
1516
+ readonly primary: "segment";
1517
+ };
1518
+ readonly "sequences": {
1519
+ readonly tables: {
1520
+ readonly "sequences": "id" | "tenant" | "key" | "name" | "description" | "status" | "exitOnReply" | "account" | "steps" | "version" | "createdBy" | "createdAt" | "updatedAt";
1521
+ readonly "members": "enrollment" | "tenant" | "sequence" | "subjectType" | "subjectId" | "address" | "name" | "account" | "thread" | "step" | "nextRunAt" | "status" | "exitReason" | "attempts" | "lastError" | "variables" | "enrolledBy" | "createdAt" | "updatedAt";
1522
+ };
1523
+ readonly functions: "change_sequence_enrollment" | "delete_sequence" | "enroll_in_sequence" | "enrollment_ensure" | "enrollment_mark" | "get_sequence" | "list_sequence_enrollments" | "list_sequences" | "run_due_sequences" | "save_sequence" | "sequence_exit" | "sequence_member_json" | "sequence_place" | "sequence_resync" | "sequence_step_done" | "sequence_step_failed" | "sequence_step_sent" | "sequence_steps_check";
1524
+ readonly actions: "read" | "enroll" | "manage";
1525
+ readonly hooks: never;
1526
+ readonly entities: {
1527
+ readonly "sequence": "id" | "tenant_id" | "key" | "name" | "description" | "status" | "exit_on_reply" | "mail_account_id" | "steps" | "version" | "created_by" | "created_at" | "updated_at";
1528
+ readonly "sequence_enrollment": "enrollment_id" | "tenant_id" | "sequence_id" | "subject_type" | "subject_id" | "address" | "name" | "mail_account_id" | "mail_thread_id" | "step" | "next_run_at" | "status" | "exit_reason" | "attempts" | "last_error" | "variables" | "enrolled_by" | "created_at" | "updated_at";
1529
+ };
1530
+ readonly primary: "sequence";
1531
+ };
1532
+ readonly "service-accounts": {
1533
+ readonly tables: {
1534
+ readonly "principals": "id" | "tenant" | "name" | "role" | "isDefault" | "createdBy" | "createdAt" | "disabledAt";
1535
+ };
1536
+ readonly functions: "default_service_principal" | "disable_service_principal" | "register_service_principal" | "service_principals_list" | "set_service_principal_role";
1537
+ readonly actions: "read" | "manage";
1538
+ readonly hooks: never;
1539
+ readonly entities: {};
1540
+ readonly primary: never;
1541
+ };
1542
+ readonly "sessions": {
1543
+ readonly tables: {};
1544
+ readonly functions: never;
1545
+ readonly actions: never;
1546
+ readonly hooks: never;
1547
+ readonly entities: {};
1548
+ readonly primary: never;
1549
+ };
1550
+ readonly "settings": {
1551
+ readonly tables: {
1552
+ readonly "user": "user" | "key" | "value" | "updatedBy" | "updatedAt";
1553
+ readonly "organization": "tenant" | "key" | "value" | "updatedBy" | "updatedAt";
1554
+ readonly "platform": "key" | "value" | "updatedBy" | "updatedAt";
1555
+ };
1556
+ readonly functions: "get_organization_settings" | "get_platform_settings" | "get_user_settings" | "record_organization_setting" | "record_platform_setting" | "reset_organization_setting" | "reset_platform_setting" | "reset_user_setting" | "set_organization_setting" | "set_platform_setting" | "set_user_setting";
1557
+ readonly actions: "read" | "update" | "platform";
1558
+ readonly hooks: never;
1559
+ readonly entities: {};
1560
+ readonly primary: never;
1561
+ };
1562
+ readonly "share-links": {
1563
+ readonly tables: {
1564
+ readonly "links": "id" | "tenant" | "subjectType" | "subjectId" | "tokenHash" | "role" | "version" | "expiresAt" | "revokedAt" | "maxUses" | "useCount" | "createdBy" | "leaf" | "versionId" | "createdAt" | "lastUsedAt";
1565
+ readonly "views": "id" | "tenant" | "subjectType" | "subjectId" | "version" | "viewerKind" | "viewer" | "firstViewedAt" | "lastViewedAt" | "viewCount";
1566
+ readonly "state": "subjectType" | "subjectId" | "user" | "starredAt" | "lastOpenedAt";
1567
+ };
1568
+ readonly functions: "create_share_link" | "list_share_links" | "record_view" | "resolve_share_link" | "revoke_share_link" | "set_user_state";
1569
+ readonly actions: "create" | "read";
1570
+ readonly hooks: never;
1571
+ readonly entities: {
1572
+ readonly "link": "id" | "tenant_id" | "subject_type" | "subject_id" | "token_hash" | "role" | "version" | "expires_at" | "revoked_at" | "max_uses" | "use_count" | "created_by" | "leaf_id" | "version_id" | "created_at" | "last_used_at";
1573
+ };
1574
+ readonly primary: "link";
1575
+ };
1576
+ readonly "shipments": {
1577
+ readonly tables: {
1578
+ readonly "shipments": "id" | "tenant" | "reference" | "status" | "fromAddress" | "toAddress" | "fromLocation" | "subjectType" | "subjectId" | "carrier" | "service" | "trackingNumber" | "trackingUrl" | "labelId" | "labelUrl" | "labelFormat" | "labelCost" | "currency" | "labeledAt" | "deliveredAt" | "cancelledAt" | "createdBy" | "createdAt" | "updatedAt";
1579
+ readonly "packages": "id" | "tenant" | "shipment" | "position" | "weight" | "length" | "width" | "height" | "reference";
1580
+ readonly "trackingEvents": "id" | "tenant" | "shipment" | "externalId" | "status" | "occurredAt" | "description" | "location" | "source" | "createdAt";
1581
+ };
1582
+ readonly functions: "cancel_shipment" | "create_shipment" | "get_shipment" | "ingest_tracking_events" | "list_shipments" | "list_tracking_events" | "record_tracking_events" | "set_shipment_label";
1583
+ readonly actions: "read" | "manage";
1584
+ readonly hooks: never;
1585
+ readonly entities: {
1586
+ readonly "shipment": "id" | "tenant_id" | "reference" | "status" | "from_address" | "to_address" | "from_location_id" | "subject_type" | "subject_id" | "carrier" | "service" | "tracking_number" | "tracking_url" | "label_id" | "label_url" | "label_format" | "label_cost" | "currency" | "labeled_at" | "delivered_at" | "cancelled_at" | "created_by" | "created_at" | "updated_at";
1587
+ readonly "shipment_package": "id" | "tenant_id" | "shipment_id" | "position" | "weight_grams" | "length_mm" | "width_mm" | "height_mm" | "reference";
1588
+ readonly "shipment_tracking_event": "id" | "tenant_id" | "shipment_id" | "external_id" | "status" | "occurred_at" | "description" | "location" | "source" | "created_at";
1589
+ };
1590
+ readonly primary: "shipment";
1591
+ };
1592
+ readonly "signatures": {
1593
+ readonly tables: {
1594
+ readonly "requests": "id" | "tenant" | "subjectType" | "subjectId" | "version" | "contentHash" | "signers" | "order" | "status" | "approval" | "message" | "requestedBy" | "createdAt" | "completedAt";
1595
+ readonly "signatures": "id" | "request" | "tenant" | "signer" | "method" | "typedName" | "image" | "signedHash" | "ip" | "userAgent" | "signedAt";
1596
+ };
1597
+ readonly functions: "cancel_signature_request" | "create_signature_request" | "decline_signature_request" | "get_signature_request" | "list_signature_requests" | "sign_signature" | "signature_verification";
1598
+ readonly actions: "read" | "request" | "manage";
1599
+ readonly hooks: "before_signature_request" | "after_signature_request" | "before_signature_sign" | "after_signature_sign";
1600
+ readonly entities: {
1601
+ readonly "request": "id" | "tenant_id" | "subject_type" | "subject_id" | "version_id" | "content_hash" | "signers" | "sign_order" | "status" | "approval_request_id" | "message" | "requested_by" | "created_at" | "completed_at";
1602
+ };
1603
+ readonly primary: "request";
1604
+ };
1605
+ readonly "signing-keys": {
1606
+ readonly tables: {
1607
+ readonly "keys": "id" | "ownerType" | "ownerId" | "kid" | "alg" | "publicJwk" | "vaultId" | "state" | "publishUntil" | "createdAt" | "retiredAt";
1608
+ };
1609
+ readonly functions: "add_signing_key" | "delete_signing_keys" | "drop_signing_key_vault_secret" | "note_signing_key_exp" | "purge_signing_keys" | "retire_signing_key" | "signing_jwks" | "signing_key";
1610
+ readonly actions: never;
1611
+ readonly hooks: never;
1612
+ readonly entities: {};
1613
+ readonly primary: never;
1614
+ };
1615
+ readonly "sla": {
1616
+ readonly tables: {
1617
+ readonly "policies": "id" | "tenant" | "subjectType" | "name" | "priority" | "firstResponse" | "nextResponse" | "resolution" | "warnPercent" | "businessHours" | "archivedAt" | "createdAt" | "updatedAt";
1618
+ readonly "clocks": "id" | "tenant" | "subjectType" | "subjectId" | "policy" | "metric" | "startedAt" | "dueAt" | "pausedAt" | "pausedSeconds" | "warnedAt" | "breachedAt" | "metAt" | "createdAt";
1619
+ };
1620
+ readonly functions: "check_sla_clocks" | "record_sla_event" | "save_sla_policy" | "sla_clocks_of" | "sla_due_at" | "start_sla_clocks";
1621
+ readonly actions: "read" | "manage";
1622
+ readonly hooks: never;
1623
+ readonly entities: {
1624
+ readonly "policy": "id" | "tenant_id" | "subject_type" | "name" | "priority" | "first_response_minutes" | "next_response_minutes" | "resolution_minutes" | "warn_at_percent" | "business_hours" | "archived_at" | "created_at" | "updated_at";
1625
+ };
1626
+ readonly primary: "policy";
1627
+ };
1628
+ readonly "sso": {
1629
+ readonly tables: {
1630
+ readonly "domains": "id" | "tenant" | "domain" | "token" | "verifiedAt" | "autoJoinRole" | "enforceSso" | "createdBy" | "createdAt";
1631
+ readonly "providers": "id" | "tenant" | "type" | "metadataUrl" | "domains" | "createdAt";
1632
+ readonly "scimUsers": "id" | "tenant" | "user" | "externalId" | "userName" | "displayName" | "givenName" | "familyName" | "email" | "emails" | "active" | "version" | "createdAt" | "updatedAt";
1633
+ readonly "scimGroups": "id" | "tenant" | "displayName" | "externalId" | "role" | "version" | "createdAt" | "updatedAt";
1634
+ readonly "scimMembers": "group" | "member";
1635
+ readonly "syncLog": "id" | "tenant" | "operation" | "resourceType" | "resourceId" | "status" | "error" | "requestId" | "createdAt";
1636
+ };
1637
+ readonly functions: "add_organization_domain" | "check_sso_provider" | "list_organization_domains" | "list_sso_providers" | "organization_domain" | "register_sso_provider" | "remove_organization_domain" | "scim_delete_group" | "scim_delete_user" | "scim_get_group" | "scim_get_user" | "scim_group_role" | "scim_list_groups" | "scim_list_users" | "scim_save_group" | "scim_save_user" | "scim_sync_member" | "sso_access_token_check" | "sso_domain_for" | "sso_on_auth_user" | "sso_provider" | "unregister_sso_provider" | "update_organization_domain" | "verify_organization_domain";
1638
+ readonly actions: "manage";
1639
+ readonly hooks: never;
1640
+ readonly entities: {};
1641
+ readonly primary: never;
1642
+ };
1643
+ readonly "state-machine": {
1644
+ readonly tables: {
1645
+ readonly "history": "id" | "tenant" | "subjectType" | "subjectId" | "fromStatus" | "toStatus" | "actor" | "reason" | "createdAt";
1646
+ readonly "stages": "id" | "tenant" | "subjectType" | "subjectId" | "label" | "outcome" | "display" | "clearedAt" | "createdAt";
1647
+ readonly "lifecycles": "id" | "tenant" | "subjectType" | "subjectId" | "version" | "flags" | "pausedAt" | "pausedUntil" | "pauseReason" | "pausedBy" | "createdAt" | "updatedAt";
1648
+ };
1649
+ readonly functions: "list_status_history" | "list_status_stages" | "pause_lifecycle" | "resume_lifecycle" | "set_lifecycle_flag" | "status_state" | "transition";
1650
+ readonly actions: never;
1651
+ readonly hooks: "before_status_transition" | "after_status_transition";
1652
+ readonly entities: {};
1653
+ readonly primary: never;
1654
+ };
1655
+ readonly "streams": {
1656
+ readonly tables: {
1657
+ readonly "streams": "id" | "tenant" | "owner" | "kind" | "wake" | "createdAt" | "closedAt" | "cancelRequestedAt" | "expiresAt";
1658
+ readonly "chunks": "stream" | "idx" | "data";
1659
+ };
1660
+ readonly functions: "purge_streams" | "stream_append" | "stream_cancel" | "stream_close" | "stream_open" | "stream_read" | "stream_status";
1661
+ readonly actions: never;
1662
+ readonly hooks: never;
1663
+ readonly entities: {};
1664
+ readonly primary: never;
1665
+ };
1666
+ readonly "subjects": {
1667
+ readonly tables: {};
1668
+ readonly functions: "can_subject" | "can_subject_for" | "my_work" | "record_summary" | "subject_presence_allowed" | "subject_title" | "subject_titles" | "subject_types" | "subject_url";
1669
+ readonly actions: never;
1670
+ readonly hooks: never;
1671
+ readonly entities: {};
1672
+ readonly primary: never;
1673
+ };
1674
+ readonly "tags": {
1675
+ readonly tables: {
1676
+ readonly "tags": "id" | "tenant" | "kind" | "name" | "slug" | "color" | "description" | "rank" | "createdAt" | "updatedAt";
1677
+ readonly "taggings": "tenant" | "tag" | "subjectType" | "subjectId" | "createdAt";
1678
+ };
1679
+ readonly functions: "create_tag" | "delete_tag" | "list_tags" | "rank_tag" | "subject_tags" | "tag" | "untag" | "update_tag";
1680
+ readonly actions: "manage" | "read" | "apply" | "create" | "update" | "delete";
1681
+ readonly hooks: "before_tag_apply" | "after_tag_apply";
1682
+ readonly entities: {
1683
+ readonly "tag": "id" | "tenant_id" | "kind" | "name" | "slug" | "color" | "description" | "rank" | "created_at" | "updated_at";
1684
+ };
1685
+ readonly primary: "tag";
1686
+ };
1687
+ readonly "tasks": {
1688
+ readonly tables: {
1689
+ readonly "items": "id" | "tenant" | "number" | "identifier" | "title" | "body" | "parent" | "team" | "project" | "iteration" | "priority" | "estimate" | "progress" | "startAt" | "endAt" | "dueAt" | "pipeline" | "stage" | "stageEnteredAt" | "state" | "closeReason" | "closedAt" | "locked" | "rank" | "archivedAt" | "recursFrom" | "createdBy" | "createdAt" | "updatedAt";
1690
+ readonly "checklist": "id" | "tenant" | "item" | "title" | "done" | "doneAt" | "doneBy" | "rank" | "createdBy" | "createdAt";
1691
+ readonly "assignees": "tenant" | "item" | "user" | "createdAt";
1692
+ readonly "projects": "id" | "tenant" | "key" | "name" | "owner" | "status" | "startOn" | "targetOn" | "archivedAt" | "createdAt" | "updatedAt";
1693
+ readonly "iterations": "id" | "tenant" | "team" | "name" | "startsOn" | "endsOn" | "createdAt";
1694
+ };
1695
+ readonly functions: "archive_work_item" | "create_work_item" | "delete_work_item" | "delete_work_item_checklist_item" | "get_work_item" | "list_work_item_checklist" | "list_work_items" | "save_iteration" | "save_project" | "save_work_item_checklist_item" | "set_work_item_assignees" | "update_work_items" | "work_item_tree";
1696
+ readonly actions: "read" | "write" | "manage" | "create" | "delete";
1697
+ readonly hooks: "before_work_item_create" | "after_work_item_create" | "before_work_item_update" | "after_work_item_update";
1698
+ readonly entities: {
1699
+ readonly "work_item": "id" | "tenant_id" | "number" | "identifier" | "title" | "body" | "parent_id" | "team_id" | "project_id" | "iteration_id" | "priority" | "estimate" | "progress" | "start_at" | "end_at" | "due_at" | "pipeline_id" | "stage_id" | "stage_entered_at" | "state" | "close_reason" | "closed_at" | "locked" | "rank" | "archived_at" | "recurs_from" | "created_by" | "created_at" | "updated_at";
1700
+ readonly "project": "id" | "tenant_id" | "key" | "name" | "owner_user_id" | "status" | "start_on" | "target_on" | "archived_at" | "created_at" | "updated_at";
1701
+ readonly "iteration": "id" | "tenant_id" | "team_id" | "name" | "starts_on" | "ends_on" | "created_at";
1702
+ readonly "checklist_item": "id" | "tenant_id" | "work_item_id" | "title" | "done" | "done_at" | "done_by" | "rank" | "created_by" | "created_at";
1703
+ };
1704
+ readonly primary: "work_item";
1705
+ };
1706
+ readonly "teams": {
1707
+ readonly tables: {
1708
+ readonly "teams": "id" | "tenant" | "name" | "slug" | "description" | "status" | "createdBy" | "createdAt" | "updatedAt";
1709
+ readonly "members": "team" | "user" | "tenant" | "createdAt";
1710
+ };
1711
+ readonly functions: "add_team_member" | "archive_team" | "create_team" | "delete_team" | "list_teams" | "remove_team_member" | "team_ids_of" | "update_team";
1712
+ readonly actions: "manage" | "read" | "create" | "update" | "delete" | "members";
1713
+ readonly hooks: "before_team_create" | "after_team_create";
1714
+ readonly entities: {
1715
+ readonly "team": "id" | "tenant_id" | "name" | "slug" | "description" | "status" | "created_by" | "created_at" | "updated_at";
1716
+ };
1717
+ readonly primary: "team";
1718
+ };
1719
+ readonly "templates": {
1720
+ readonly tables: {
1721
+ readonly "templates": "id" | "tenant" | "scope" | "key" | "type" | "name" | "language" | "isDefault" | "settings" | "forkedFrom" | "forkedFromVersion" | "createdBy" | "createdAt" | "updatedAt";
1722
+ readonly "versions": "id" | "template" | "version" | "body" | "hash" | "publishedAt" | "createdBy" | "createdAt";
1723
+ readonly "applications": "id" | "template" | "version" | "tenant" | "subjectType" | "subjectId" | "appliedBy" | "appliedAt";
1724
+ readonly "workflows": "id" | "template" | "definition" | "inputs" | "enabled" | "createdBy" | "createdAt";
1725
+ };
1726
+ readonly functions: "fork_template" | "publish_template_version" | "record_template_application" | "remove_template" | "save_template" | "save_template_draft" | "set_default_template" | "sync_templates" | "template_applications_list" | "template_apply_target" | "template_get" | "template_versions_list" | "templates_list";
1727
+ readonly actions: "read" | "apply" | "manage";
1728
+ readonly hooks: "before_template_save" | "after_template_save" | "before_template_apply" | "after_template_apply";
1729
+ readonly entities: {
1730
+ readonly "template": "id" | "tenant_id" | "scope" | "key" | "type" | "name" | "language" | "is_default" | "settings" | "forked_from" | "forked_from_version" | "created_by" | "created_at" | "updated_at";
1731
+ };
1732
+ readonly primary: "template";
1733
+ };
1734
+ readonly "time-tracking": {
1735
+ readonly tables: {
1736
+ readonly "entries": "id" | "tenant" | "user" | "subjectType" | "subjectId" | "startedAt" | "endedAt" | "billable" | "rate" | "rateCurrency" | "note" | "createdAt" | "updatedAt" | "seconds" | "runningSince" | "employee";
1737
+ readonly "timesheets": "id" | "tenant" | "user" | "week" | "approval" | "note" | "submittedAt" | "approvedAt" | "createdAt" | "status" | "decidedBy" | "decidedAt" | "decisionNote" | "employee";
1738
+ };
1739
+ readonly functions: "approve_timesheet" | "delete_time_entry" | "get_timesheet" | "list_time_entries" | "list_timesheets" | "log_time" | "reopen_timesheet" | "running_timer" | "running_timers" | "start_timer" | "stop_timer" | "submit_timesheet" | "time_entry_guard" | "time_week" | "time_week_locked" | "update_time_entry";
1740
+ readonly actions: "read" | "track" | "approve" | "manage";
1741
+ readonly hooks: "before_time_entry_save" | "after_time_entry_save" | "before_timesheet_submit" | "after_timesheet_submit";
1742
+ readonly entities: {
1743
+ readonly "entry": "id" | "tenant_id" | "user_id" | "subject_type" | "subject_id" | "started_at" | "ended_at" | "billable" | "rate" | "rate_currency" | "note" | "created_at" | "updated_at" | "seconds" | "running_since" | "employee_id";
1744
+ readonly "timesheet": "id" | "tenant_id" | "user_id" | "week" | "approval_id" | "note" | "submitted_at" | "approved_at" | "created_at" | "status" | "decided_by" | "decided_at" | "decision_note" | "employee_id";
1745
+ };
1746
+ readonly primary: "entry";
1747
+ };
1748
+ readonly "timeline": {
1749
+ readonly tables: {
1750
+ readonly "activity": "id" | "tenant" | "event" | "type" | "actor" | "subjectType" | "subjectId" | "summary" | "data" | "occurredAt";
1751
+ };
1752
+ readonly functions: "activity_subject_deliveries" | "activity_subject_readable" | "list_activity" | "record_activity";
1753
+ readonly actions: "read";
1754
+ readonly hooks: never;
1755
+ readonly entities: {
1756
+ readonly "entry": "id" | "organization_id" | "event_id" | "type" | "actor_id" | "subject_type" | "subject_id" | "summary" | "data" | "occurred_at";
1757
+ };
1758
+ readonly primary: "entry";
1759
+ };
1760
+ readonly "trash": {
1761
+ readonly tables: {
1762
+ readonly "items": "id" | "tenant" | "subjectType" | "subjectId" | "title" | "batch" | "depth" | "trashedBy" | "trashedAt" | "purgeAfter";
1763
+ };
1764
+ readonly functions: "is_trashed" | "list_trash" | "purge_expired_trash" | "purge_trash" | "restore_trash" | "trash" | "trash_cascade" | "trash_purge_batch" | "trash_restore_batch";
1765
+ readonly actions: "read" | "create" | "restore" | "manage";
1766
+ readonly hooks: "before_trash" | "after_trash" | "before_untrash" | "after_untrash";
1767
+ readonly entities: {};
1768
+ readonly primary: never;
1769
+ };
1770
+ readonly "updated-at": {
1771
+ readonly tables: {};
1772
+ readonly functions: never;
1773
+ readonly actions: never;
1774
+ readonly hooks: never;
1775
+ readonly entities: {};
1776
+ readonly primary: never;
1777
+ };
1778
+ readonly "usage": {
1779
+ readonly tables: {
1780
+ readonly "counters": "tenant" | "meter" | "day" | "value" | "reported" | "updatedAt";
1781
+ readonly "events": "tenant" | "meter" | "key" | "quantity" | "recordedAt";
1782
+ readonly "history": "id" | "tenant" | "meter" | "quantity" | "actor" | "source" | "metadata" | "recordedAt";
1783
+ readonly "distinct": "tenant" | "meter" | "periodStart" | "subject" | "firstSeen";
1784
+ readonly "quotas": "id" | "tenant" | "plan" | "meter" | "limit" | "period" | "createdAt";
1785
+ };
1786
+ readonly functions: "consume_quota" | "mark_usage_reported" | "purge_usage_events" | "purge_usage_history" | "record_usage" | "record_usage_batch" | "unreported_usage" | "usage_breakdown" | "usage_history" | "usage_meters" | "usage_overview" | "usage_quota" | "usage_status" | "usage_used" | "usage_window" | "usage_window_start" | "within_quota";
1787
+ readonly actions: "read" | "record";
1788
+ readonly hooks: "usage_billing_period";
1789
+ readonly entities: {};
1790
+ readonly primary: never;
1791
+ };
1792
+ readonly "vector-search": {
1793
+ readonly tables: {};
1794
+ readonly functions: never;
1795
+ readonly actions: never;
1796
+ readonly hooks: never;
1797
+ readonly entities: {};
1798
+ readonly primary: never;
1799
+ };
1800
+ readonly "vercel-marketplace": {
1801
+ readonly tables: {
1802
+ readonly "installations": "id" | "configurationId" | "teamId" | "userId" | "tenant" | "tenantCreated" | "accessTokenSecret" | "status" | "metadata" | "removedAt" | "createdAt" | "updatedAt";
1803
+ readonly "resources": "id" | "installation" | "externalId" | "name" | "plan" | "status" | "metadata" | "tenant" | "tenantCreated" | "secretRefs" | "createdAt" | "updatedAt";
1804
+ readonly "plans": "id" | "name" | "kind" | "details" | "createdAt" | "updatedAt";
1805
+ readonly "invoices": "id" | "installation" | "externalId" | "state" | "periodStart" | "periodEnd" | "total" | "currency" | "items" | "eventAt" | "createdAt" | "updatedAt";
1806
+ readonly "meterReports": "id" | "installation" | "resourceExternalId" | "meterId" | "periodStart" | "periodEnd" | "quantity" | "reportedQuantity" | "reportedAt" | "createdAt";
1807
+ };
1808
+ readonly functions: "delete_marketplace_resource" | "link_marketplace_tenant" | "mark_marketplace_meter_reported" | "mark_marketplace_meter_sent" | "marketplace_access_token" | "marketplace_installation" | "marketplace_resource" | "marketplace_resources" | "record_marketplace_invoice" | "record_marketplace_meter_report" | "remove_marketplace_installation" | "seal_marketplace_access_token" | "set_marketplace_resource_state" | "unreported_marketplace_meter_reports" | "upsert_marketplace_installation" | "upsert_marketplace_plan" | "upsert_marketplace_resource";
1809
+ readonly actions: never;
1810
+ readonly hooks: never;
1811
+ readonly entities: {};
1812
+ readonly primary: never;
1813
+ };
1814
+ readonly "versions": {
1815
+ readonly tables: {
1816
+ readonly "versions": "id" | "tenant" | "subjectType" | "subjectId" | "number" | "label" | "content" | "storagePath" | "contentHash" | "source" | "frozen" | "createdBy" | "createdAt";
1817
+ };
1818
+ readonly functions: "delete_version" | "get_version" | "label_version" | "list_versions" | "restore_version" | "snapshot_version" | "version_insert" | "versions_capture";
1819
+ readonly actions: "read" | "create" | "restore" | "manage";
1820
+ readonly hooks: "before_version_snapshot" | "after_version_snapshot" | "before_version_restore" | "after_version_restore";
1821
+ readonly entities: {
1822
+ readonly "version": "id" | "tenant_id" | "subject_type" | "subject_id" | "number" | "label" | "content" | "storage_path" | "content_hash" | "source" | "frozen" | "created_by" | "created_at";
1823
+ };
1824
+ readonly primary: "version";
1825
+ };
1826
+ readonly "waitlist": {
1827
+ readonly tables: {
1828
+ readonly "entries": "id" | "email" | "status" | "position" | "referrer" | "metadata" | "user" | "decidedBy" | "decidedAt" | "createdAt";
1829
+ readonly "codes": "id" | "hash" | "prefix" | "maxUses" | "uses" | "expiresAt" | "tenant" | "role" | "createdBy" | "createdAt" | "revokedAt";
1830
+ readonly "redemptions": "code" | "user" | "redeemedAt";
1831
+ };
1832
+ readonly functions: "create_invite_code" | "decide_waitlist_entry" | "join_waitlist" | "list_invite_codes" | "list_waitlist" | "redeem_for" | "redeem_invite_code" | "revoke_invite_code" | "waitlist_admit" | "waitlist_on_auth_user";
1833
+ readonly actions: "manage" | "invite";
1834
+ readonly hooks: never;
1835
+ readonly entities: {
1836
+ readonly "entry": "id" | "email" | "status" | "position" | "referrer" | "metadata" | "user_id" | "decided_by" | "decided_at" | "created_at";
1837
+ };
1838
+ readonly primary: "entry";
1839
+ };
1840
+ readonly "webhook-inbox": {
1841
+ readonly tables: {
1842
+ readonly "messages": "id" | "source" | "messageId" | "eventType" | "payload" | "headers" | "status" | "attempts" | "maxAttempts" | "availableAt" | "lockedBy" | "lockedUntil" | "lastError" | "receivedAt" | "processedAt" | "tenant" | "checkpoint";
1843
+ };
1844
+ readonly functions: never;
1845
+ readonly actions: never;
1846
+ readonly hooks: never;
1847
+ readonly entities: {};
1848
+ readonly primary: never;
1849
+ };
1850
+ readonly "webhooks-in": {
1851
+ readonly tables: {
1852
+ readonly "endpoints": "id" | "tenant" | "name" | "tokenHash" | "verify" | "secret" | "secretId" | "previousSecret" | "previousSecretId" | "previousSecretExpiresAt" | "signatureHeader" | "enabled" | "maxBodyBytes" | "receiveCount" | "lastReceivedAt" | "lastStatus" | "metadata" | "subjectType" | "subjectId" | "createdBy" | "createdAt" | "updatedAt";
1853
+ };
1854
+ readonly functions: "create_incoming_webhook" | "delete_incoming_webhook" | "drop_incoming_webhook_secret" | "incoming_webhook_by_token" | "incoming_webhook_subject_readable" | "incoming_webhook_tenant_ids" | "list_incoming_webhooks" | "record_incoming_webhook" | "rotate_incoming_webhook" | "rotate_incoming_webhook_secret" | "set_incoming_webhook_enabled" | "update_incoming_webhook";
1855
+ readonly actions: "create" | "update" | "delete" | "view";
1856
+ readonly hooks: never;
1857
+ readonly entities: {};
1858
+ readonly primary: never;
1859
+ };
1860
+ readonly "webhooks-out": {
1861
+ readonly tables: {
1862
+ readonly "endpoints": "id" | "tenant" | "name" | "url" | "enabled" | "eventTypes" | "permissions" | "batch" | "signing" | "format" | "credentialRef" | "failingSince" | "disabledAt" | "disabledReason" | "createdBy" | "createdAt" | "updatedAt";
1863
+ readonly "secrets": "id" | "endpoint" | "tenant" | "secret" | "vaultId" | "expiresAt" | "createdAt";
1864
+ readonly "deliveries": "id" | "tenant" | "endpoint" | "event" | "run" | "type" | "subject" | "payload" | "status" | "attempt" | "availableAt" | "leasedUntil" | "responseStatus" | "responseBody" | "durationMs" | "lastError" | "processedAt" | "createdAt" | "updatedAt";
1865
+ };
1866
+ readonly functions: "claim_webhook_deliveries" | "complete_webhook_delivery" | "dispatch_webhook" | "drop_webhook_vault_secret" | "publish_webhook_event" | "publish_webhook_events" | "purge_webhook_deliveries" | "redeliver_webhook" | "reset_webhook_endpoint" | "rotate_webhook_secret" | "webhook_secrets";
1867
+ readonly actions: "manage" | "view";
1868
+ readonly hooks: "after_webhook_delivery";
1869
+ readonly entities: {
1870
+ readonly "endpoint": "id" | "organization_id" | "name" | "url" | "enabled" | "event_types" | "permissions" | "batch" | "signing" | "format" | "credential_ref" | "failing_since" | "disabled_at" | "disabled_reason" | "created_by" | "created_at" | "updated_at";
1871
+ };
1872
+ readonly primary: "endpoint";
1873
+ };
1874
+ readonly "workflow-editor": {
1875
+ readonly tables: {
1876
+ readonly "definitions": "id" | "tenant" | "slug" | "name" | "description" | "subjectTypes" | "scope" | "forkedFrom" | "forkedFromVersion" | "restricted" | "createdBy" | "createdAt" | "updatedAt";
1877
+ readonly "optOuts": "tenant" | "definition" | "createdBy" | "createdAt";
1878
+ readonly "grants": "id" | "definition" | "principalKind" | "principalId" | "action" | "createdBy" | "createdAt";
1879
+ readonly "versions": "id" | "definition" | "version" | "graph" | "compiled" | "status" | "createdBy" | "createdAt" | "publishedAt" | "publishedBy" | "owner" | "permissions" | "inputSchema";
1880
+ readonly "triggers": "id" | "definition" | "kind" | "config" | "enabled" | "createdAt" | "updatedAt";
1881
+ readonly "webhookTokens": "tokenHash" | "trigger" | "createdAt";
1882
+ readonly "credentials": "id" | "tenant" | "kind" | "name" | "ref" | "scopes" | "createdBy" | "createdAt";
1883
+ readonly "steps": "name" | "title" | "description" | "inputSchema" | "outputSchema" | "credentialKind" | "operation" | "updatedAt";
1884
+ readonly "nodeRuns": "run" | "node" | "status" | "attempts" | "output" | "error" | "startedAt" | "endedAt";
1885
+ readonly "alerts": "id" | "definition" | "onEvent" | "threshold" | "channel" | "createdBy" | "createdAt";
1886
+ readonly "alertFires": "alert" | "run" | "firedAt";
1887
+ };
1888
+ readonly functions: "check_workflow_alerts" | "fork_workflow_definition" | "publish_workflow_version" | "record_workflow_node_run" | "remove_workflow_alert" | "remove_workflow_credential" | "remove_workflow_definition" | "remove_workflow_trigger" | "rotate_workflow_webhook_token" | "save_workflow_alert" | "save_workflow_credential" | "save_workflow_definition" | "save_workflow_draft" | "save_workflow_trigger" | "set_workflow_definition_grant" | "set_workflow_opt_out" | "start_test_run" | "sync_workflow_steps" | "validate_workflow_graph" | "workflow_alerts_list" | "workflow_credential_get" | "workflow_credentials_list" | "workflow_definition_get" | "workflow_definition_grants_list" | "workflow_definitions_list" | "workflow_graph_permissions" | "workflow_node_runs_list" | "workflow_run_principal" | "workflow_runs_alert" | "workflow_start_target" | "workflow_steps_list" | "workflow_subject_start_target" | "workflow_triggers_list" | "workflow_version_get" | "workflow_versions_list" | "workflow_webhook_target";
1889
+ readonly actions: "read" | "run" | "edit" | "publish" | "admin";
1890
+ readonly hooks: never;
1891
+ readonly entities: {
1892
+ readonly "definition": "id" | "tenant_id" | "slug" | "name" | "description" | "subject_types" | "scope" | "forked_from" | "forked_from_version" | "restricted" | "created_by" | "created_at" | "updated_at";
1893
+ };
1894
+ readonly primary: "definition";
1895
+ };
1896
+ readonly "workflow-sdk": {
1897
+ readonly tables: {};
1898
+ readonly functions: "dispatch_workflow_deliveries" | "workflow_claim_run_key" | "workflow_open_hooks" | "workflow_purge_runs" | "workflow_release_run_key" | "workflow_sdk_mirror_run" | "workflow_set_run_key";
1899
+ readonly actions: never;
1900
+ readonly hooks: never;
1901
+ readonly entities: {};
1902
+ readonly primary: never;
1903
+ };
1904
+ readonly "workflows": {
1905
+ readonly tables: {
1906
+ readonly "runs": "id" | "engine" | "externalId" | "definition" | "tenant" | "actor" | "status" | "attributes" | "error" | "createdAt" | "updatedAt" | "startedAt" | "completedAt" | "cancelRequestedAt" | "subjectType" | "subjectId" | "principalKind" | "principalId" | "mode" | "triggerNode";
1907
+ readonly "schedules": "id" | "tenant" | "name" | "workflow" | "input" | "cron" | "timezone" | "nextRunAt" | "lastRunAt" | "lockedUntil" | "paused" | "createdBy" | "createdAt";
1908
+ readonly "semaphores": "key" | "holder" | "acquiredAt" | "expiresAt";
1909
+ readonly "startRequests": "id" | "key" | "workflow" | "input" | "tenant" | "actor" | "concurrency" | "status" | "notBefore" | "claimedUntil" | "runId" | "createdAt" | "startedAt" | "subjectType" | "subjectId";
1910
+ };
1911
+ readonly functions: "acquire_workflow_semaphore" | "advance_workflow_schedule" | "claim_due_workflow_schedules" | "claim_workflow_start_requests" | "create_workflow_schedule" | "mark_workflow_start_request" | "pause_workflow_schedule" | "purge_workflow_runs" | "record_workflow_run" | "release_workflow_semaphore" | "remove_workflow_schedule" | "request_workflow_cancel" | "request_workflow_start" | "workflow_admission_active" | "workflow_run_get" | "workflow_runs_changed" | "workflow_runs_list" | "workflow_schedules_list";
1912
+ readonly actions: "read" | "run" | "admin";
1913
+ readonly hooks: never;
1914
+ readonly entities: {};
1915
+ readonly primary: never;
1916
+ };
1917
+ }
1918
+ /** The names one module's config keys accept. */
1919
+ interface BlockSqlNameSet {
1920
+ /** Logical table to its logical columns. */
1921
+ readonly tables: {
1922
+ readonly [table: string]: string;
1923
+ };
1924
+ readonly functions: string;
1925
+ readonly actions: string;
1926
+ readonly hooks: string;
1927
+ /** Entity to the default column names of its table. */
1928
+ readonly entities: {
1929
+ readonly [entity: string]: string;
1930
+ };
1931
+ readonly primary: string;
1932
+ }
1933
+ /** The names of a module the registry doesn't know: every name is a string. */
1934
+ type AnyModuleNames = BlockSqlNameSet;
1935
+ type NamesOf<M extends string> = M extends keyof BlockNameRegistry ? BlockNameRegistry[M] : AnyModuleNames;
1936
+ type TablesOf<M extends string> = keyof NamesOf<M>["tables"] & string;
1937
+ /** `blocks.access-requests.options`. */
1938
+ type AccessRequestsSqlOptions = {
1939
+ readonly roles?: unknown;
1940
+ readonly policy?: unknown;
1941
+ readonly maxDuration?: unknown;
1942
+ readonly join?: boolean;
1943
+ readonly extraColumns?: ExtraColumns;
1944
+ };
1945
+ /** `blocks.activities.options`. */
1946
+ type ActivitiesSqlOptions = {
1947
+ readonly types?: readonly string[];
1948
+ readonly extraColumns?: ExtraColumns;
1949
+ /**
1950
+ * Recordings of calls and meetings as ai-files files, their transcripts and
1951
+ * notes on each engagement. Needs the ai-files block. Default `false`.
1952
+ */
1953
+ readonly recordings?: boolean;
1954
+ /**
1955
+ * Log a `meeting` engagement for each confirmed booking, on the person with
1956
+ * the booker's email and their company. Needs the bookings block. Default:
1957
+ * false.
1958
+ */
1959
+ readonly bookings?: boolean;
1960
+ };
1961
+ /** `blocks.agents.options`. */
1962
+ type AgentsSqlOptions = {
1963
+ readonly maxInstructions?: number;
1964
+ readonly extraColumns?: ExtraColumns;
1965
+ };
1966
+ /** `blocks.ai-cache.options`. */
1967
+ type AiCacheSqlOptions = {
1968
+ readonly maxTtl?: number;
1969
+ readonly maxBytes?: number;
1970
+ };
1971
+ /** `blocks.ai-chat.options`. */
1972
+ type AiChatSqlOptions = {
1973
+ readonly topic?: string;
1974
+ readonly listTopic?: string;
1975
+ readonly temporaryTtl?: unknown;
1976
+ readonly staleAfter?: unknown;
1977
+ readonly sandboxIdleAfter?: number;
1978
+ readonly meterUsage?: boolean;
1979
+ readonly inputMeter?: string;
1980
+ readonly outputMeter?: string;
1981
+ readonly extraColumns?: ExtraColumns;
1982
+ };
1983
+ /** `blocks.ai-files.options`. */
1984
+ type AiFilesSqlOptions = {
1985
+ readonly bucket?: string;
1986
+ readonly maxSize?: number;
1987
+ readonly allowedMimeTypes?: readonly string[];
1988
+ readonly pendingTtl?: string;
1989
+ readonly extraColumns?: ExtraColumns;
1990
+ };
1991
+ /** `blocks["ai-keys"].options`. */
1992
+ type AiKeysSqlOptions = {
1993
+ readonly pollEvery?: number;
1994
+ };
1995
+ /** `blocks["ai-schedules"].options`. */
1996
+ type AiSchedulesSqlOptions = {
1997
+ readonly queue?: string;
1998
+ readonly staleAfter?: string;
1999
+ readonly maxPrompt?: number;
2000
+ readonly extraColumns?: ExtraColumns;
2001
+ };
2002
+ /** `blocks.announcements.options`. */
2003
+ type AnnouncementsSqlOptions = {
2004
+ readonly topic?: string;
2005
+ readonly event?: string;
2006
+ readonly extraColumns?: ExtraColumns;
2007
+ };
2008
+ /** `blocks.api-keys.options`. */
2009
+ type ApiKeysSqlOptions = {
2010
+ readonly scopes?: "catalog" | readonly string[];
2011
+ readonly kinds?: readonly string[];
2012
+ readonly touchInterval?: number;
2013
+ readonly prefix?: string;
2014
+ readonly extraColumns?: ExtraColumns;
2015
+ };
2016
+ /** `blocks.approvals.options`. */
2017
+ type ApprovalsSqlOptions = {
2018
+ readonly policies?: unknown;
2019
+ readonly extraColumns?: ExtraColumns;
2020
+ };
2021
+ /** `blocks.attachments.options`. */
2022
+ type AttachmentsSqlOptions = {
2023
+ readonly bucket?: string;
2024
+ readonly requireScan?: boolean;
2025
+ readonly maxSize?: number;
2026
+ readonly allowedMimeTypes?: readonly string[];
2027
+ readonly path?: string;
2028
+ readonly scanBuckets?: readonly string[];
2029
+ readonly publicBuckets?: readonly string[];
2030
+ readonly offline?: boolean;
2031
+ readonly extraColumns?: ExtraColumns;
2032
+ };
2033
+ /** `blocks.audit.options.ipHeader`. */
2034
+ interface AuditIpHeader {
2035
+ /** The request header that carries the client address. */
2036
+ readonly name: string;
2037
+ /** Which hop of a comma-separated list to take. Defaults to `"last"`. */
2038
+ readonly hop?: "first" | "last";
2039
+ }
2040
+ /** One entry of `blocks.audit.options.subjectColumns`. */
2041
+ interface AuditSubjectColumn {
2042
+ readonly type: "text" | "uuid" | "bigint";
2043
+ /**
2044
+ * The key in the row (or the event metadata) to read. Defaults to the column
2045
+ * name.
2046
+ */
2047
+ readonly from?: string;
2048
+ }
2049
+ /** `blocks.audit.options`. */
2050
+ type AuditSqlOptions = {
2051
+ readonly appendOnly?: boolean;
2052
+ readonly chain?: boolean;
2053
+ readonly correlationIdHeader?: string;
2054
+ readonly eventCategory?: string;
2055
+ readonly eventRoles?: readonly string[];
2056
+ readonly trustedRoles?: readonly string[];
2057
+ readonly eventSource?: string;
2058
+ readonly exempt?: unknown;
2059
+ readonly impersonators?: string;
2060
+ /**
2061
+ * The header `request_ip()` reads; defaults to the last `x-forwarded-for`
2062
+ * hop.
2063
+ */
2064
+ readonly ipHeader?: string | AuditIpHeader;
2065
+ readonly keepMappedMetadata?: boolean;
2066
+ readonly metadataColumns?: unknown;
2067
+ readonly partitioned?: boolean;
2068
+ readonly readPolicy?: boolean;
2069
+ readonly requestIdHeader?: string;
2070
+ readonly restricted?: boolean;
2071
+ /** A dotted JWT claim path; a caller that carries it is recorded as `staff`. */
2072
+ readonly staffClaim?: string;
2073
+ /** Indexed columns generated from a key of the row or event metadata. */
2074
+ readonly subjectColumns?: Readonly<Record<string, AuditSubjectColumn>>;
2075
+ readonly tenantColumn?: string;
2076
+ readonly tenantLabel?: unknown;
2077
+ readonly tenantLabelKey?: string;
2078
+ readonly values?: unknown;
2079
+ };
2080
+ /** `blocks.automations.options`. */
2081
+ type AutomationsSqlOptions = {
2082
+ /** The most conditions one rule may hold. */
2083
+ readonly maxConditions?: number;
2084
+ /** How deep groups may nest, the root group counting as 1. */
2085
+ readonly maxDepth?: number;
2086
+ /** The most actions one rule may run. */
2087
+ readonly maxActions?: number;
2088
+ /**
2089
+ * Keys of default automations the blocks ship turned off, such as
2090
+ * `quotes.quote_to_order`, to ship turned on.
2091
+ */
2092
+ readonly enable?: readonly string[];
2093
+ /** Keys of default automations to ship turned off. */
2094
+ readonly disable?: readonly string[];
2095
+ };
2096
+ /** `blocks.billing.options`. */
2097
+ type BillingSqlOptions = {
2098
+ readonly seatRoles?: readonly string[];
2099
+ readonly plans?: unknown;
2100
+ readonly tenantKey?: unknown;
2101
+ /** Where subscriptions are read from. Default `sync-engine`. */
2102
+ readonly subscriptions?: string;
2103
+ };
2104
+ /** `blocks.bookings.options`. */
2105
+ type BookingsSqlOptions = {
2106
+ readonly extraColumns?: ExtraColumns;
2107
+ /** Adds booking series: a recurrence rule that books every occurrence. */
2108
+ readonly recurring?: boolean;
2109
+ };
2110
+ /** `blocks['bulk'].options`. */
2111
+ type BulkSqlOptions = {
2112
+ readonly limit?: number;
2113
+ readonly actions?: unknown;
2114
+ };
2115
+ type ShareLinkFeedOptions = {
2116
+ readonly visibility?: "access" | "public";
2117
+ readonly pastDays?: number;
2118
+ readonly futureDays?: number;
2119
+ readonly limit?: number;
2120
+ readonly single?: boolean;
2121
+ };
2122
+ /**
2123
+ * How structured rule columns store BYDAY and BYMONTHDAY: weekday codes in
2124
+ * lower case, one month day per rule, and an ordinal weekday (`2TU`) in two
2125
+ * columns of the app's rules table.
2126
+ */
2127
+ type CalendarRuleDialect = {
2128
+ readonly weekdays?: "upper" | "lower";
2129
+ readonly monthDay?: "list" | "scalar";
2130
+ readonly ordinal?: {
2131
+ readonly weekday: string;
2132
+ readonly position: string;
2133
+ };
2134
+ };
2135
+ type CalendarReadOnly = {
2136
+ readonly column: string;
2137
+ readonly values: readonly string[];
2138
+ };
2139
+ /**
2140
+ * An app function `schema.name(calendar_id uuid, user_id uuid)`, or the
2141
+ * authorization provider's per-row grants of `key` on its resource `rows` (its
2142
+ * `rowsWithFor` template, answered for the user asked about).
2143
+ */
2144
+ type CalendarAccessHook = string | {
2145
+ readonly rows: string;
2146
+ readonly key: string;
2147
+ };
2148
+ type CalendarAccessFunctions = {
2149
+ readonly read?: CalendarAccessHook;
2150
+ readonly write?: CalendarAccessHook;
2151
+ readonly share?: CalendarAccessHook;
2152
+ };
2153
+ /** `blocks.calendar.options`. */
2154
+ type CalendarSqlOptions = {
2155
+ readonly extraColumns?: ExtraColumns;
2156
+ /**
2157
+ * Columns of the app's own on the calendars table, which `create_calendar`
2158
+ * takes as `fields` and `list_calendars` returns under `fields`.
2159
+ */
2160
+ readonly calendarExtraColumns?: ExtraColumns;
2161
+ readonly access?: boolean;
2162
+ readonly accessFunctions?: CalendarAccessFunctions;
2163
+ readonly userFeed?: boolean;
2164
+ readonly feed?: ShareLinkFeedOptions;
2165
+ readonly recurrence?: "inline" | "table";
2166
+ readonly rdates?: boolean;
2167
+ readonly attendeeKey?: "email" | "any";
2168
+ readonly calendarDetails?: boolean;
2169
+ readonly ruleDialect?: CalendarRuleDialect;
2170
+ readonly readOnly?: CalendarReadOnly;
2171
+ };
2172
+ /** `blocks.catalog.options`. */
2173
+ type CatalogSqlOptions = {
2174
+ readonly storefront?: string;
2175
+ readonly extraColumns?: ExtraColumns;
2176
+ /** Language tags the catalog translates into; the first is the default. */
2177
+ readonly locales?: readonly string[];
2178
+ /**
2179
+ * `"integer"` when the app's rank columns (options, option values, variants,
2180
+ * categories, collection products) are whole-number positions.
2181
+ */
2182
+ readonly rankType?: "text" | "integer";
2183
+ };
2184
+ /** `blocks.collections.options`. */
2185
+ type CollectionsSqlOptions = {
2186
+ readonly extraColumns?: ExtraColumns;
2187
+ };
2188
+ /**
2189
+ * `blocks.comments.options`. The body limit, documents and extra columns are
2190
+ * the messaging block's options, and the records come from `config.subjects`.
2191
+ */
2192
+ type CommentsSqlOptions = {
2193
+ readonly follow?: boolean;
2194
+ readonly mentionGroups?: unknown;
2195
+ /** `false` sends no `comment.posted` notification to the record's followers. */
2196
+ readonly notify?: boolean;
2197
+ };
2198
+ /** `blocks.compliance.options`. */
2199
+ type ComplianceSqlOptions = {
2200
+ readonly extraColumns?: ExtraColumns;
2201
+ };
2202
+ /** `blocks.connectors.options`. */
2203
+ type ConnectorsSqlOptions = {
2204
+ readonly allowHttp?: boolean;
2205
+ readonly trustFirstUse?: boolean;
2206
+ readonly sessionTtl?: string;
2207
+ readonly extraColumns?: ExtraColumns;
2208
+ };
2209
+ /** `blocks.contacts.options`. */
2210
+ type ContactsSqlOptions = {
2211
+ readonly companyLifecycles?: unknown;
2212
+ readonly personLifecycles?: unknown;
2213
+ readonly extraColumns?: ExtraColumns;
2214
+ };
2215
+ /** `blocks.contracts.options`. */
2216
+ type ContractsSqlOptions = {
2217
+ /** Days before the notice deadline the owner's renewal reminder fires. */
2218
+ readonly reminderDays?: number;
2219
+ readonly extraColumns?: ExtraColumns;
2220
+ };
2221
+ /** `blocks.credentials.options`. */
2222
+ type CredentialsSqlOptions = {
2223
+ readonly secretStorage?: string;
2224
+ };
2225
+ /** `blocks.custom-fields.options`. */
2226
+ type CustomFieldsSqlOptions = {
2227
+ readonly layout?: string;
2228
+ /**
2229
+ * Writes one `read` audit entry per `read_field_values` call that returns an
2230
+ * encrypted or sensitive value. Needs the audit block.
2231
+ */
2232
+ readonly auditReads?: boolean;
2233
+ /**
2234
+ * Keyed layout: the type of the `rank` column. `text` (the default) holds
2235
+ * fractional keys in `collate "C"` order; `integer` holds whole numbers, cast
2236
+ * to the type of the app's own rank column.
2237
+ */
2238
+ readonly rankType?: "text" | "integer";
2239
+ /**
2240
+ * Keyed layout: what `read_field_values` checks. `tenant` (the default) needs
2241
+ * `permissions.read` in the tenant; `record` needs only that the caller can
2242
+ * read the record, through `can_subject(type, id, 'read')`.
2243
+ */
2244
+ readonly readAccess?: "tenant" | "record";
2245
+ };
2246
+ /** `blocks.data-lifecycle.options`. */
2247
+ type DataLifecycleSqlOptions = {
2248
+ readonly bucket?: string;
2249
+ readonly grace?: string;
2250
+ readonly exportTtl?: string;
2251
+ readonly tables?: unknown;
2252
+ readonly autoTables?: unknown;
2253
+ readonly tenantRow?: unknown;
2254
+ readonly anonymize?: unknown;
2255
+ readonly omitPattern?: unknown;
2256
+ };
2257
+ /** `blocks.deals.options`. */
2258
+ type DealsSqlOptions = {
2259
+ readonly company?: string;
2260
+ readonly contact?: string;
2261
+ readonly motions?: unknown;
2262
+ readonly priorities?: unknown;
2263
+ readonly prefix?: string;
2264
+ readonly readAll?: boolean;
2265
+ readonly extraColumns?: ExtraColumns;
2266
+ readonly lineExtraColumns?: ExtraColumns;
2267
+ };
2268
+ /** `blocks.documents.options`. */
2269
+ type DocumentsSqlOptions = {
2270
+ readonly topic?: string;
2271
+ readonly maxUpdateBytes?: number;
2272
+ readonly compactAfter?: number;
2273
+ };
2274
+ /** `blocks.domains.options`. */
2275
+ type DomainsSqlOptions = {
2276
+ /**
2277
+ * The app's own domain: one label below it is a subdomain verified when
2278
+ * added.
2279
+ */
2280
+ readonly platformDomain?: string;
2281
+ /** The TXT record name's first label: `<txtPrefix>.<hostname>`. */
2282
+ readonly txtPrefix?: string;
2283
+ };
2284
+ /** `blocks.donations.options`. */
2285
+ type DonationsSqlOptions = {
2286
+ readonly extraColumns?: ExtraColumns;
2287
+ };
2288
+ /** `blocks.drive.options`. */
2289
+ type DriveSqlOptions = {
2290
+ readonly roles?: readonly string[];
2291
+ readonly writeRole?: unknown;
2292
+ readonly shareRole?: unknown;
2293
+ readonly memberRole?: unknown;
2294
+ readonly subjectType?: string;
2295
+ readonly conflict?: string;
2296
+ readonly drives?: boolean;
2297
+ readonly driveKinds?: readonly string[];
2298
+ readonly sources?: readonly string[];
2299
+ readonly extraColumns?: ExtraColumns;
2300
+ };
2301
+ /** `blocks.employees.options`. */
2302
+ type EmployeesSqlOptions = {
2303
+ readonly employmentTypes?: readonly string[];
2304
+ readonly extraColumns?: ExtraColumns;
2305
+ /**
2306
+ * Columns of the app's own on the private details table, which
2307
+ * `savePrivateDetails` takes under `fields`.
2308
+ */
2309
+ readonly privateDetailsExtraColumns?: ExtraColumns;
2310
+ /** Columns of the app's own on the contracts table, set from `fields`. */
2311
+ readonly contractExtraColumns?: ExtraColumns;
2312
+ readonly name?: "single" | "split";
2313
+ readonly privateDetails?: "json" | "flat";
2314
+ readonly contracts?: "append" | "editable";
2315
+ /** Whether the app's salary column holds minor or major units. */
2316
+ readonly salaryUnits?: "minor" | "major";
2317
+ /**
2318
+ * With editable contracts, `allow` adds a contract without the overlap check
2319
+ * and leaves the previous one as it is.
2320
+ */
2321
+ readonly contractOverlap?: "end" | "allow";
2322
+ };
2323
+ /** `blocks.expenses.options`. */
2324
+ type ExpensesSqlOptions = {
2325
+ readonly extraColumns?: ExtraColumns;
2326
+ /**
2327
+ * `false` runs expenses without the approvals block: a submitted report waits
2328
+ * until `decide_expense_report` approves or rejects it.
2329
+ */
2330
+ readonly approvals?: boolean;
2331
+ };
2332
+ /**
2333
+ * A custom context's source: the table and column that hold a tenant's value,
2334
+ * and the column with the tenant id (`id` by default).
2335
+ */
2336
+ interface FlagContextColumn {
2337
+ readonly table: string;
2338
+ readonly column: string;
2339
+ readonly tenant?: string;
2340
+ }
2341
+ /** `blocks['flags'].options`. */
2342
+ type FlagsSqlOptions = {
2343
+ /**
2344
+ * Custom contexts by name, e.g. `{ brand: { table: "public.organizations",
2345
+ * column: "brand_id" } }`.
2346
+ */
2347
+ readonly contexts?: Readonly<Record<string, FlagContextColumn>>;
2348
+ readonly extraColumns?: ExtraColumns;
2349
+ };
2350
+ /** `blocks.forms.options`. */
2351
+ type FormsSqlOptions = {
2352
+ readonly handlers?: unknown;
2353
+ readonly publicLimit?: unknown;
2354
+ readonly extraColumns?: ExtraColumns;
2355
+ };
2356
+ /** `blocks.goals.options`. */
2357
+ type GoalsSqlOptions = {
2358
+ readonly extraColumns?: ExtraColumns;
2359
+ };
2360
+ /** `blocks['grants'].options`. */
2361
+ type GrantsSqlOptions = {
2362
+ readonly fromPolicies?: unknown;
2363
+ };
2364
+ type HiringStageMarker = string | {
2365
+ readonly column: string;
2366
+ readonly value: string;
2367
+ };
2368
+ type HiringJobStages = {
2369
+ readonly table: string;
2370
+ readonly id?: string;
2371
+ readonly job: string;
2372
+ readonly rank: string;
2373
+ readonly archivedAt?: string;
2374
+ readonly hired?: HiringStageMarker;
2375
+ readonly rejected?: HiringStageMarker;
2376
+ readonly withdrawn?: HiringStageMarker;
2377
+ };
2378
+ /** `blocks.hiring.options`. */
2379
+ type HiringSqlOptions = {
2380
+ readonly candidate?: string;
2381
+ readonly extraColumns?: ExtraColumns;
2382
+ readonly stages?: "pipelines" | HiringJobStages;
2383
+ readonly scorecardKey?: "stage" | "application";
2384
+ readonly hiringManager?: "user" | "employee";
2385
+ };
2386
+ /** `blocks['identities'].options`. */
2387
+ type IdentitiesSqlOptions = {
2388
+ readonly codeMinutes?: number;
2389
+ readonly verifiedEmails?: boolean;
2390
+ };
2391
+ /** `blocks.impersonation.options`. */
2392
+ type ImpersonationSqlOptions = {
2393
+ readonly allowPlatformTargets?: unknown;
2394
+ readonly allowWrites?: unknown;
2395
+ readonly approval?: unknown;
2396
+ readonly approvalTtl?: unknown;
2397
+ readonly auditCategory?: unknown;
2398
+ readonly claimsHook?: unknown;
2399
+ readonly maxTtl?: unknown;
2400
+ readonly requireReason?: unknown;
2401
+ };
2402
+ /** `blocks.inbox.options`. */
2403
+ type InboxSqlOptions = {
2404
+ readonly topic?: string;
2405
+ readonly bucket?: string;
2406
+ readonly maxBodyLength?: number;
2407
+ readonly botQueue?: unknown;
2408
+ readonly outboundQueue?: unknown;
2409
+ readonly scheduleQueue?: unknown;
2410
+ readonly notify?: boolean;
2411
+ };
2412
+ /** `blocks.incidents.options`. */
2413
+ type IncidentsSqlOptions = {
2414
+ readonly extraColumns?: ExtraColumns;
2415
+ };
2416
+ /** `blocks.inventory.options`. */
2417
+ type InventorySqlOptions = {
2418
+ readonly extraColumns?: ExtraColumns;
2419
+ };
2420
+ /** `blocks.invoices.options`. */
2421
+ type InvoicesSqlOptions = {
2422
+ readonly company?: string;
2423
+ readonly contact?: string;
2424
+ readonly prefix?: string;
2425
+ readonly creditPrefix?: string;
2426
+ readonly termsDays?: number;
2427
+ readonly extraColumns?: ExtraColumns;
2428
+ readonly lineExtraColumns?: ExtraColumns;
2429
+ /**
2430
+ * `"app"` when the app keeps the totals columns itself, such as with VAT per
2431
+ * rate: the block never recounts or writes them and reads what they hold.
2432
+ */
2433
+ readonly totals?: "block" | "app";
2434
+ };
2435
+ /** `blocks.knowledge.options`. */
2436
+ type KnowledgeSqlOptions = {
2437
+ readonly dimensions?: number;
2438
+ readonly type?: string;
2439
+ readonly textSearch?: string;
2440
+ readonly embedQueue?: string;
2441
+ readonly ingestQueue?: string;
2442
+ };
2443
+ /** `blocks.leases.options`. */
2444
+ type LeasesSqlOptions = {
2445
+ readonly extraColumns?: ExtraColumns;
2446
+ };
2447
+ /** `blocks.leave.options`. */
2448
+ type LeaveSqlOptions = {
2449
+ readonly policy?: unknown;
2450
+ readonly workingDays?: readonly string[];
2451
+ readonly allowNegative?: boolean;
2452
+ readonly extraColumns?: ExtraColumns;
2453
+ readonly feed?: ShareLinkFeedOptions;
2454
+ /**
2455
+ * `false` runs leave without the approvals block: a request stays pending
2456
+ * until `decide_leave_request` approves or rejects it.
2457
+ */
2458
+ readonly approvals?: boolean;
2459
+ };
2460
+ /** `blocks.memory.options`. */
2461
+ type MemorySqlOptions = {
2462
+ readonly dimensions?: unknown;
2463
+ readonly type?: unknown;
2464
+ readonly textSearch?: unknown;
2465
+ readonly maxContent?: number;
2466
+ };
2467
+ /** `blocks.messaging.options`. */
2468
+ type MessagingSqlOptions = {
2469
+ /** The Realtime topic prefix: pings go to `<topic>:<conversation id>`. */
2470
+ readonly topic?: string;
2471
+ /** `1` keeps threads one level deep; `unlimited` nests replies. */
2472
+ readonly threadDepth?: 1 | "unlimited";
2473
+ readonly maxBodyLength?: number;
2474
+ /** Seconds an author may edit a message; `0` for always. */
2475
+ readonly editWindow?: number;
2476
+ /** The jobs queue that sends scheduled messages. */
2477
+ readonly scheduleQueue?: string;
2478
+ readonly extraColumns?: ExtraColumns;
2479
+ /**
2480
+ * `false` sends no `message.mentioned`, `message.direct` or `message.replied`
2481
+ * notification.
2482
+ */
2483
+ readonly notify?: boolean;
2484
+ };
2485
+ /** `blocks.metrics.options`. */
2486
+ type MetricsSqlOptions = {
2487
+ readonly metrics?: unknown;
2488
+ readonly window?: string;
2489
+ };
2490
+ /** `blocks.notifications.options`. */
2491
+ type NotificationsSqlOptions = {
2492
+ readonly channelDefaults?: unknown;
2493
+ readonly channels?: readonly string[];
2494
+ readonly createdEvent?: string;
2495
+ readonly maxRecipients?: number;
2496
+ readonly partitioned?: boolean;
2497
+ readonly priorities?: readonly string[];
2498
+ readonly realtime?: string;
2499
+ readonly topic?: string;
2500
+ readonly updatedEvent?: string;
2501
+ readonly extraColumns?: ExtraColumns;
2502
+ };
2503
+ /** One numbered entity of `blocks.numbering.options.entities`. */
2504
+ type NumberSequenceEntityOptions = {
2505
+ readonly period: "none" | "year" | "month" | "format" | {
2506
+ readonly fiscalYearStartMonth: number;
2507
+ };
2508
+ readonly format: string;
2509
+ /**
2510
+ * A tenant's own format: `column` is `schema.table.column`, `key` holds the
2511
+ * tenant id (default `id`).
2512
+ */
2513
+ readonly formatFrom?: {
2514
+ readonly column: string;
2515
+ readonly key?: string;
2516
+ };
2517
+ readonly periodFrom?: {
2518
+ readonly column: string;
2519
+ readonly key?: string;
2520
+ };
2521
+ readonly table?: string;
2522
+ readonly column?: string;
2523
+ readonly sequenceColumn?: string;
2524
+ readonly tenantColumn?: string;
2525
+ readonly periodColumn?: string;
2526
+ readonly assignOn?: string;
2527
+ readonly permission?: string;
2528
+ };
2529
+ /** `blocks.numbering.options`. */
2530
+ type NumberingSqlOptions = {
2531
+ readonly entities?: Readonly<Record<string, NumberSequenceEntityOptions>>;
2532
+ };
2533
+ /** `blocks.oauth-server.options`. */
2534
+ type OAuthServerSqlOptions = {
2535
+ /**
2536
+ * The pattern a client id must match: a regular expression, or `"slug"` for
2537
+ * lower-case slugs such as `acme-cli`. The default accepts the 22-character
2538
+ * ids `registerClient` generates and any `[A-Za-z0-9._~-]{8,128}` id.
2539
+ */
2540
+ readonly clientIdPattern?: string;
2541
+ };
2542
+ /** `blocks.onboarding.options`. */
2543
+ type OnboardingSqlOptions = {
2544
+ readonly checklists?: unknown;
2545
+ };
2546
+ /** `blocks.orders.options`. */
2547
+ type OrdersSqlOptions = {
2548
+ readonly paymentWindowMinutes?: number;
2549
+ readonly extraColumns?: ExtraColumns;
2550
+ /** Per-line preparation states and kitchen stations. Off by default. */
2551
+ readonly kitchen?: boolean;
2552
+ };
2553
+ /** `blocks.organizations.options`. */
2554
+ type OrganizationsSqlOptions = {
2555
+ readonly assignmentGuard?: string;
2556
+ readonly attributes?: readonly string[];
2557
+ readonly auditCategory?: unknown;
2558
+ readonly deleteMode?: string;
2559
+ readonly extraColumns?: ExtraColumns;
2560
+ readonly formerOwnerRole?: string;
2561
+ readonly ownerInvariant?: boolean;
2562
+ readonly ownerRole?: string;
2563
+ readonly reservedSlugs?: readonly string[];
2564
+ readonly slugCitext?: boolean;
2565
+ readonly slugMaxLength?: number;
2566
+ readonly slugMinLength?: number;
2567
+ readonly slugPattern?: string;
2568
+ };
2569
+ /**
2570
+ * `platformRoles`: the platform roles a provider keeps outside the tenant,
2571
+ * which an invitation can grant.
2572
+ */
2573
+ interface PlatformRolesOption {
2574
+ /** `schema.table` of the platform role grants. */
2575
+ readonly table: string;
2576
+ /** The user column. */
2577
+ readonly user: string;
2578
+ /** The role column. */
2579
+ readonly role: string;
2580
+ /** Where the role name lives when `role` holds an id. */
2581
+ readonly through?: {
2582
+ readonly table: string;
2583
+ readonly id: string;
2584
+ readonly column: string;
2585
+ /** A condition on the roles row `{row}`. */
2586
+ readonly where?: string;
2587
+ };
2588
+ /** A SQL template that holds when the caller may grant `{role}`. */
2589
+ readonly canAssign?: string;
2590
+ /** The same check for another user, `{user}`. */
2591
+ readonly canAssignFor?: string;
2592
+ }
2593
+ /** `blocks.invitations.options`. */
2594
+ type InvitationsSqlOptions = {
2595
+ readonly maxValidFor?: string;
2596
+ readonly platformRoles?: PlatformRolesOption;
2597
+ readonly prefill?: boolean;
2598
+ readonly previewColumns?: readonly string[];
2599
+ readonly requireConfirmedEmail?: boolean;
2600
+ readonly tokenBytes?: number;
2601
+ readonly tokenStorage?: string;
2602
+ readonly validFor?: string;
2603
+ readonly extraColumns?: ExtraColumns;
2604
+ /** The role `create_invitation` and `invite_member` use when none is named. */
2605
+ readonly defaultRole?: string;
2606
+ /** Extra roles and teams an invitation grants on accept. */
2607
+ readonly onAccept?: {
2608
+ readonly roles?: boolean;
2609
+ readonly teams?: boolean;
2610
+ };
2611
+ };
2612
+ /** `blocks.outbox.options`. */
2613
+ type OutboxSqlOptions = {
2614
+ readonly defaultSource?: string;
2615
+ readonly emitRoles?: readonly string[];
2616
+ readonly blockSource?: unknown;
2617
+ readonly partitioned?: boolean;
2618
+ readonly retention?: string;
2619
+ readonly settle?: string;
2620
+ };
2621
+ /** `blocks.permissions.options`. */
2622
+ type PermissionsSqlOptions = {
2623
+ readonly platformRoleScope?: string;
2624
+ readonly scope?: string;
2625
+ readonly tenantRoleScope?: string;
2626
+ };
2627
+ /** `blocks.pipelines.options`. */
2628
+ type PipelinesSqlOptions = {
2629
+ readonly extraColumns?: ExtraColumns;
2630
+ };
2631
+ /** `blocks.profiles.options`. */
2632
+ type ProfilesSqlOptions = {
2633
+ readonly columnGrants?: boolean;
2634
+ readonly extraColumns?: ExtraColumns;
2635
+ readonly metadata?: unknown;
2636
+ readonly mirrorEmail?: boolean;
2637
+ readonly readPolicy?: unknown;
2638
+ readonly reservedUsernames?: readonly string[];
2639
+ readonly serviceColumns?: readonly string[];
2640
+ readonly splitName?: boolean;
2641
+ readonly syncTrigger?: boolean;
2642
+ readonly updatable?: readonly string[];
2643
+ readonly username?: boolean;
2644
+ readonly usernameFrom?: unknown;
2645
+ readonly usernameMaxLength?: number;
2646
+ readonly usernameMinLength?: number;
2647
+ };
2648
+ /** `blocks.promotions.options`. */
2649
+ type PromotionsSqlOptions = {
2650
+ readonly extraColumns?: ExtraColumns;
2651
+ };
2652
+ /** `blocks.push.options`. */
2653
+ type PushSqlOptions = {
2654
+ readonly extraColumns?: ExtraColumns;
2655
+ };
2656
+ /** `blocks.queue.options`. */
2657
+ type QueueSqlOptions = {
2658
+ readonly backend?: string;
2659
+ readonly scheduler?: string;
2660
+ };
2661
+ /** `blocks.rate-limit.options`. */
2662
+ type RateLimitSqlOptions = {
2663
+ readonly preRequest?: boolean;
2664
+ };
2665
+ /** `blocks.webhook-inbox.options`. */
2666
+ type WebhookInboxSqlOptions = {
2667
+ readonly extraColumns?: ExtraColumns;
2668
+ };
2669
+ /** `blocks.quotes.options`. */
2670
+ type QuotesSqlOptions = {
2671
+ readonly company?: string;
2672
+ readonly contact?: string;
2673
+ readonly prefix?: string;
2674
+ readonly validDays?: number;
2675
+ readonly extraColumns?: ExtraColumns;
2676
+ readonly lineExtraColumns?: ExtraColumns;
2677
+ };
2678
+ /** `blocks.reactions.options`. */
2679
+ type ReactionsSqlOptions = {
2680
+ readonly topic?: string;
2681
+ };
2682
+ /** `blocks.relations.options`. */
2683
+ type RelationsSqlOptions = {
2684
+ readonly kinds?: unknown;
2685
+ readonly extraColumns?: ExtraColumns;
2686
+ };
2687
+ /** `blocks.reminders.options`. */
2688
+ type RemindersSqlOptions = {
2689
+ readonly ruleFormat?: string;
2690
+ readonly extraColumns?: ExtraColumns;
2691
+ };
2692
+ /** `blocks.reserved-slugs.options`. */
2693
+ type ReservedSlugsSqlOptions = {
2694
+ readonly maxLength?: number;
2695
+ readonly minLength?: number;
2696
+ readonly slugs?: readonly string[];
2697
+ };
2698
+ /** `blocks.reviews.options`. */
2699
+ type ReviewsSqlOptions = {
2700
+ readonly scale?: number;
2701
+ readonly maxBodyLength?: number;
2702
+ readonly moderation?: string;
2703
+ readonly requirePurchase?: boolean;
2704
+ readonly extraColumns?: ExtraColumns;
2705
+ };
2706
+ /** `blocks.saved-views.options`. */
2707
+ type SavedViewsSqlOptions = {
2708
+ readonly extraColumns?: ExtraColumns;
2709
+ };
2710
+ /** `blocks.search.options`. */
2711
+ type SearchSqlOptions = {
2712
+ readonly config?: string;
2713
+ readonly dimensions?: number;
2714
+ };
2715
+ /** `blocks["security-events"].options`. */
2716
+ type SecurityEventsSqlOptions = {
2717
+ readonly retention?: string;
2718
+ };
2719
+ /** `blocks["service-accounts"].options`. */
2720
+ type ServiceAccountsSqlOptions = {
2721
+ readonly extraColumns?: ExtraColumns;
2722
+ };
2723
+ /** `blocks['sessions'].options`. */
2724
+ type SessionsSqlOptions = {
2725
+ readonly exclude?: readonly string[];
2726
+ readonly policies?: boolean;
2727
+ };
2728
+ /** `blocks.settings.options`. */
2729
+ type SettingsSqlOptions = {
2730
+ readonly schemas?: unknown;
2731
+ readonly platform?: unknown;
2732
+ };
2733
+ /** `blocks.share-links.options`. */
2734
+ type ShareLinksSqlOptions = {
2735
+ readonly extraColumns?: ExtraColumns;
2736
+ /**
2737
+ * `create_share_link` takes a `token_hash` the caller made (sha256 hex), and
2738
+ * `find_share_link(token_hash)` looks a live link up by it without counting a
2739
+ * use.
2740
+ */
2741
+ readonly tokenHash?: boolean;
2742
+ /**
2743
+ * `list_share_links` returns each link's tenant, subject, creator and
2744
+ * creation time, and takes `include_revoked`.
2745
+ */
2746
+ readonly fullRows?: boolean;
2747
+ };
2748
+ /** `blocks.signing-keys.options`. */
2749
+ type SigningKeysSqlOptions = {
2750
+ readonly jwksGrace?: string;
2751
+ };
2752
+ /** `blocks.sla.options`. */
2753
+ type SlaSqlOptions = {
2754
+ readonly businessHours?: unknown;
2755
+ readonly extraColumns?: ExtraColumns;
2756
+ };
2757
+ /** `blocks.sso.options`. */
2758
+ type SsoSqlOptions = {
2759
+ readonly txtPrefix?: string;
2760
+ readonly defaultRole?: string;
2761
+ readonly roleOrder?: readonly string[];
2762
+ readonly groupRoles?: unknown;
2763
+ /** Adds `scim_sync_log` and its functions, for `sqlScimSyncLog`. */
2764
+ readonly syncLog?: boolean;
2765
+ };
2766
+ /** `blocks.state-machine.options`. */
2767
+ type StateMachineSqlOptions = {
2768
+ readonly machines?: unknown;
2769
+ };
2770
+ /** `blocks.streams.options`. */
2771
+ type StreamsSqlOptions = {
2772
+ readonly topic?: string;
2773
+ };
2774
+ /** `blocks.tags.options`. */
2775
+ type TagsSqlOptions = {
2776
+ readonly extraColumns?: ExtraColumns;
2777
+ /**
2778
+ * `create_tag` takes the caller's `slug`, and `update_tag` a `patch` that
2779
+ * sets `name`, `slug`, `color`, `description` and `kind` and can clear the
2780
+ * nullable ones.
2781
+ */
2782
+ readonly patch?: boolean;
2783
+ };
2784
+ /** `blocks.tasks.options`. */
2785
+ type TasksSqlOptions = {
2786
+ readonly prefix?: string;
2787
+ readonly maxAssignees?: number;
2788
+ readonly extraColumns?: ExtraColumns;
2789
+ /** Whether an item's author can delete it without the delete key. */
2790
+ readonly authorCanDelete?: boolean;
2791
+ readonly notify?: boolean;
2792
+ readonly actionPath?: string;
2793
+ };
2794
+ /** `blocks.teams.options`. */
2795
+ type TeamsSqlOptions = {
2796
+ /** The key type of teams. Default `uuid`; `inbox` needs `uuid`. */
2797
+ readonly teamIdType?: "uuid" | "bigint";
2798
+ readonly extraColumns?: ExtraColumns;
2799
+ /**
2800
+ * `create_team` takes the caller's `slug`, and `update_team` a `patch` that
2801
+ * sets `name`, `slug` and `description` and can clear the description.
2802
+ */
2803
+ readonly patch?: boolean;
2804
+ /** Writes `restore_team`, which makes an archived team active again. */
2805
+ readonly restore?: boolean;
2806
+ };
2807
+ /** `blocks.templates.options`. */
2808
+ type TemplatesSqlOptions = {
2809
+ readonly extraColumns?: ExtraColumns;
2810
+ };
2811
+ /** `blocks.time-tracking.options`. */
2812
+ type TimeTrackingSqlOptions = {
2813
+ readonly policy?: unknown;
2814
+ readonly timeZone?: string;
2815
+ readonly extraColumns?: ExtraColumns;
2816
+ /**
2817
+ * `false` keeps timesheets without the approvals block: a status column holds
2818
+ * open, submitted, approved or rejected, and members with
2819
+ * `time_tracking.approve` decide through `approve_timesheet` and
2820
+ * `reject_timesheet`. Default `true`.
2821
+ */
2822
+ readonly approvals?: boolean;
2823
+ /**
2824
+ * The column that holds each user's IANA time zone, as `{ column:
2825
+ * "schema.table.column", key? }` (`key` defaults to `id`). Weeks then start
2826
+ * in the user's own zone, and in `timeZone` for a user without one.
2827
+ */
2828
+ readonly userTimeZone?: {
2829
+ readonly column: string;
2830
+ readonly key?: string;
2831
+ };
2832
+ readonly owner?: "user" | "employee";
2833
+ /**
2834
+ * `"allow"` lets a member's entries overlap, such as a weekly grid that logs
2835
+ * every row's time from the same start. Default `"refuse"`.
2836
+ */
2837
+ readonly overlap?: "refuse" | "allow";
2838
+ /**
2839
+ * `"many"` runs several timers at once: `start_timer` leaves the others
2840
+ * running and `stop_timer` takes the entry. Needs `overlap: "allow"`.
2841
+ */
2842
+ readonly timers?: "one" | "many";
2843
+ };
2844
+ /** `blocks.trash.options`. */
2845
+ type TrashSqlOptions = {
2846
+ readonly retentionDays?: number;
2847
+ readonly extraColumns?: ExtraColumns;
2848
+ /**
2849
+ * The column that marks a trashed row on tables outside `on`;
2850
+ * `trashExtension` filters on it and sets it on delete.
2851
+ */
2852
+ readonly deletedAt?: string;
2853
+ };
2854
+ /** `blocks.usage.options`. */
2855
+ type UsageSqlOptions = {
2856
+ readonly meters?: unknown;
2857
+ readonly history?: boolean;
2858
+ readonly partitioned?: boolean;
2859
+ };
2860
+ /** `blocks.vector-search.options`. */
2861
+ type VectorSearchSqlOptions = {
2862
+ readonly schema?: unknown;
2863
+ };
2864
+ /** `blocks.vercel-marketplace.options`. */
2865
+ type VercelMarketplaceSqlOptions = {
2866
+ /**
2867
+ * The currency an invoice takes when the webhook names none (ISO 4217,
2868
+ * lowercase).
2869
+ */
2870
+ readonly currency?: string;
2871
+ };
2872
+ /** `blocks.versions.options`. */
2873
+ type VersionsSqlOptions = {
2874
+ readonly keep?: number;
2875
+ readonly debounce?: number;
2876
+ readonly extraColumns?: ExtraColumns;
2877
+ };
2878
+ /** `blocks.waitlist.options`. */
2879
+ type WaitlistSqlOptions = {
2880
+ readonly defaultRole?: string;
2881
+ readonly codeField?: string;
2882
+ readonly roles?: readonly string[];
2883
+ readonly extraColumns?: ExtraColumns;
2884
+ };
2885
+ /** `blocks.webhooks-out.options`. */
2886
+ type WebhooksOutSqlOptions = {
2887
+ readonly allowHttp?: boolean;
2888
+ readonly defaultFormat?: string;
2889
+ readonly disableAfter?: string;
2890
+ readonly eventIdType?: unknown;
2891
+ readonly partitioned?: boolean;
2892
+ readonly runIdType?: unknown;
2893
+ readonly secretStorage?: string;
2894
+ readonly statuses?: unknown;
2895
+ };
2896
+ /** `blocks.webhooks-in.options`. */
2897
+ type WebhooksInSqlOptions = {
2898
+ readonly maxBodyBytes?: number;
2899
+ readonly secretStorage?: string;
2900
+ };
2901
+ /** `blocks["workflow-editor"].options`. */
2902
+ type WorkflowEditorSqlOptions = {
2903
+ readonly extraColumns?: ExtraColumns;
2904
+ };
2905
+ /** `blocks["workflow-sdk"].options`. */
2906
+ type WorkflowSdkSqlOptions = {
2907
+ readonly delivery?: string;
2908
+ readonly queue?: string;
2909
+ readonly batch?: number;
2910
+ readonly timeout?: number;
2911
+ readonly schedule?: string;
2912
+ /** Purge ended runs older than this (`30 days`, `12 hours`) every hour. */
2913
+ readonly retention?: string;
2914
+ };
2915
+ type None = Record<never, never>;
2916
+ /**
2917
+ * The options of every SQL module, keyed by module name. `BlocksConfig` types
2918
+ * `blocks.<module>.options` from it, and `schemas/config-v1.json` is generated
2919
+ * from `BLOCK_OPTION_SCHEMAS`.
2920
+ */
2921
+ interface BlockOptionsRegistry {
2922
+ readonly "access-requests": AccessRequestsSqlOptions;
2923
+ readonly activities: ActivitiesSqlOptions;
2924
+ readonly agents: AgentsSqlOptions;
2925
+ readonly "ai-cache": AiCacheSqlOptions;
2926
+ readonly "ai-chat": AiChatSqlOptions;
2927
+ readonly "ai-files": AiFilesSqlOptions;
2928
+ readonly "ai-keys": AiKeysSqlOptions;
2929
+ readonly "ai-schedules": AiSchedulesSqlOptions;
2930
+ readonly announcements: AnnouncementsSqlOptions;
2931
+ readonly "api-keys": ApiKeysSqlOptions;
2932
+ readonly approvals: ApprovalsSqlOptions;
2933
+ readonly assets: AssetsSqlOptions;
2934
+ readonly assignment: None;
2935
+ readonly attachments: AttachmentsSqlOptions;
2936
+ readonly audit: AuditSqlOptions;
2937
+ readonly automations: AutomationsSqlOptions;
2938
+ readonly "billable-time": None;
2939
+ readonly billing: BillingSqlOptions;
2940
+ readonly bookings: BookingsSqlOptions;
2941
+ readonly bulk: BulkSqlOptions;
2942
+ readonly calendar: CalendarSqlOptions;
2943
+ readonly catalog: CatalogSqlOptions;
2944
+ readonly channels: None;
2945
+ readonly "chat-sdk-state": None;
2946
+ readonly collections: CollectionsSqlOptions;
2947
+ readonly comments: CommentsSqlOptions;
2948
+ readonly compliance: ComplianceSqlOptions;
2949
+ readonly connectors: ConnectorsSqlOptions;
2950
+ readonly contacts: ContactsSqlOptions;
2951
+ readonly contracts: ContractsSqlOptions;
2952
+ readonly courses: CoursesSqlOptions;
2953
+ readonly "created-by": CreatedBySqlOptions;
2954
+ readonly credentials: CredentialsSqlOptions;
2955
+ readonly "custom-fields": CustomFieldsSqlOptions;
2956
+ readonly flags: FlagsSqlOptions;
2957
+ readonly "data-lifecycle": DataLifecycleSqlOptions;
2958
+ readonly deals: DealsSqlOptions;
2959
+ readonly dispatch: DispatchSqlOptions;
2960
+ readonly documents: DocumentsSqlOptions;
2961
+ readonly domains: DomainsSqlOptions;
2962
+ readonly donations: DonationsSqlOptions;
2963
+ readonly drive: DriveSqlOptions;
2964
+ readonly "drive-files": None;
2965
+ readonly employees: EmployeesSqlOptions;
2966
+ readonly enrichment: None;
2967
+ readonly enrollments: EnrollmentsSqlOptions;
2968
+ readonly entitlements: None;
2969
+ readonly expenses: ExpensesSqlOptions;
2970
+ readonly "field-encryption": None;
2971
+ readonly "field-history": None;
2972
+ readonly forecasts: None;
2973
+ readonly forms: FormsSqlOptions;
2974
+ readonly goals: GoalsSqlOptions;
2975
+ readonly grants: GrantsSqlOptions;
2976
+ readonly guests: None;
2977
+ readonly hiring: HiringSqlOptions;
2978
+ readonly idempotency: None;
2979
+ readonly identities: IdentitiesSqlOptions;
2980
+ readonly impersonation: ImpersonationSqlOptions;
2981
+ readonly imports: None;
2982
+ readonly inbox: InboxSqlOptions;
2983
+ readonly incidents: IncidentsSqlOptions;
2984
+ readonly inventory: InventorySqlOptions;
2985
+ readonly invitations: InvitationsSqlOptions;
2986
+ readonly invoices: InvoicesSqlOptions;
2987
+ readonly "jsonb-schemas": None;
2988
+ readonly knowledge: KnowledgeSqlOptions;
2989
+ readonly "lead-scoring": LeadScoringSqlOptions;
2990
+ readonly leases: LeasesSqlOptions;
2991
+ readonly leave: LeaveSqlOptions;
2992
+ readonly ledger: None;
2993
+ readonly "mail-sync": MailSyncSqlOptions;
2994
+ readonly memberships: MembershipsSqlOptions;
2995
+ readonly memory: MemorySqlOptions;
2996
+ readonly messaging: MessagingSqlOptions;
2997
+ readonly metrics: MetricsSqlOptions;
2998
+ readonly mfa: None;
2999
+ readonly moderation: ModerationSqlOptions;
3000
+ readonly notifications: NotificationsSqlOptions;
3001
+ readonly numbering: NumberingSqlOptions;
3002
+ readonly "oauth-server": OAuthServerSqlOptions;
3003
+ readonly onboarding: OnboardingSqlOptions;
3004
+ readonly orders: OrdersSqlOptions;
3005
+ readonly organizations: OrganizationsSqlOptions;
3006
+ readonly outbox: OutboxSqlOptions;
3007
+ readonly passes: PassesSqlOptions;
3008
+ readonly permissions: PermissionsSqlOptions;
3009
+ readonly pgtap: None;
3010
+ readonly pipelines: PipelinesSqlOptions;
3011
+ readonly posts: PostsSqlOptions;
3012
+ readonly content: ContentSqlOptions;
3013
+ readonly profiles: ProfilesSqlOptions;
3014
+ readonly promotions: PromotionsSqlOptions;
3015
+ readonly push: PushSqlOptions;
3016
+ readonly queue: QueueSqlOptions;
3017
+ readonly quotes: QuotesSqlOptions;
3018
+ readonly rank: None;
3019
+ readonly "rate-limit": RateLimitSqlOptions;
3020
+ readonly reactions: ReactionsSqlOptions;
3021
+ readonly "read-sets": None;
3022
+ readonly "realtime-tables": None;
3023
+ readonly relations: RelationsSqlOptions;
3024
+ readonly reminders: RemindersSqlOptions;
3025
+ readonly "reserved-slugs": ReservedSlugsSqlOptions;
3026
+ readonly reviews: ReviewsSqlOptions;
3027
+ readonly "rls-guard": None;
3028
+ readonly "saved-views": SavedViewsSqlOptions;
3029
+ readonly scores: ScoresSqlOptions;
3030
+ readonly search: SearchSqlOptions;
3031
+ readonly "security-events": SecurityEventsSqlOptions;
3032
+ readonly segments: SegmentsSqlOptions;
3033
+ readonly sequences: SequencesSqlOptions;
3034
+ readonly "service-accounts": ServiceAccountsSqlOptions;
3035
+ readonly sessions: SessionsSqlOptions;
3036
+ readonly settings: SettingsSqlOptions;
3037
+ readonly "share-links": ShareLinksSqlOptions;
3038
+ readonly shipments: ShipmentsSqlOptions;
3039
+ readonly signatures: SignaturesSqlOptions;
3040
+ readonly "signing-keys": SigningKeysSqlOptions;
3041
+ readonly sla: SlaSqlOptions;
3042
+ readonly sso: SsoSqlOptions;
3043
+ readonly "state-machine": StateMachineSqlOptions;
3044
+ readonly streams: StreamsSqlOptions;
3045
+ readonly subjects: None;
3046
+ readonly tags: TagsSqlOptions;
3047
+ readonly tasks: TasksSqlOptions;
3048
+ readonly teams: TeamsSqlOptions;
3049
+ readonly templates: TemplatesSqlOptions;
3050
+ readonly "time-tracking": TimeTrackingSqlOptions;
3051
+ readonly timeline: None;
3052
+ readonly trash: TrashSqlOptions;
3053
+ readonly "updated-at": UpdatedAtSqlOptions;
3054
+ readonly usage: UsageSqlOptions;
3055
+ readonly "vector-search": VectorSearchSqlOptions;
3056
+ readonly "vercel-marketplace": VercelMarketplaceSqlOptions;
3057
+ readonly versions: VersionsSqlOptions;
3058
+ readonly waitlist: WaitlistSqlOptions;
3059
+ readonly "webhook-inbox": WebhookInboxSqlOptions;
3060
+ readonly "webhooks-in": WebhooksInSqlOptions;
3061
+ readonly "webhooks-out": WebhooksOutSqlOptions;
3062
+ readonly "workflow-editor": WorkflowEditorSqlOptions;
3063
+ readonly "workflow-sdk": WorkflowSdkSqlOptions;
3064
+ readonly workflows: None;
3065
+ }
3066
+ /** The options schema of every SQL module, keyed by module name. */
3067
+ declare const BLOCK_OPTION_SCHEMAS: { readonly [M in keyof BlockOptionsRegistry]: BlockOptionsSchema<BlockOptionsRegistry[M]>; };
3068
+ /**
3069
+ * `blocks` in `better-supabase.config.ts`: how each SQL module maps onto the
3070
+ * app's database. A module's contract (the functions other modules and the
3071
+ * TypeScript side call) stays the same in every mode; only the tables behind it
3072
+ * change.
3073
+ */
3074
+ /**
3075
+ * `managed`: the module writes its tables, functions and views, and leaves
3076
+ * alone every table the app's schema already has (`ownTables`), writing its
3077
+ * functions over that table instead. `custom`: the app implements the contract
3078
+ * functions itself; the module writes nothing and doctor checks the signatures
3079
+ * (BS307).
3080
+ */
3081
+ type BlockMode = "managed" | "custom";
3082
+ /**
3083
+ * Who a block's rows belong to. `tenant`: a tenant, checked through the access
3084
+ * contract (`can`, `tenant_ids_with`). `user`: the signed-in user, whose id the
3085
+ * scope column holds. `none`: one shared space every signed-in user reads and
3086
+ * writes. Blocks that need tenants run only in `tenant`.
3087
+ */
3088
+ type BlockScope = "tenant" | "user" | "none";
3089
+ /**
3090
+ * Whose policies govern the app's tables a block runs over. `block`: the block
3091
+ * adds its `bsb_` policies where none of the app's covers them. `app`: it adds
3092
+ * none, permissive or restrictive, and still writes its functions, triggers,
3093
+ * indexes and grants.
3094
+ */
3095
+ type OwnTablePolicies = "block" | "app";
3096
+ /**
3097
+ * A new name for one of a block's entities: its singular `name`, an irregular
3098
+ * plural and, for an entity the block registers as a subject, the URL of one
3099
+ * row with `{column}` placeholders.
3100
+ */
3101
+ interface EntityConfig<Columns extends string = string> {
3102
+ /** Defaults to the entity's own name. */
3103
+ readonly name?: string;
3104
+ /** Defaults to the English plural of `name`. */
3105
+ readonly plural?: string;
3106
+ /**
3107
+ * The page `subject_url` returns, with `{column}` placeholders from the
3108
+ * entity's logical columns: `/tasks/{id}`. A list page needs none.
3109
+ */
3110
+ readonly url?: `${string}{${Columns}}${string}` | (string & {});
3111
+ /** `false` keeps the entity out of `config.subjects`. */
3112
+ readonly subject?: false;
3113
+ }
3114
+ /**
3115
+ * `blocks.<name>.names`: entity to its new name, e.g. `{ work_item: "task" }`,
3116
+ * or the new name of the block's primary entity alone (`"task"`). The module's
3117
+ * tables, columns, functions, events, permission keys, hooks and TypeScript
3118
+ * names follow.
3119
+ */
3120
+ type EntitiesConfig<Names extends BlockSqlNameSet = AnyModuleNames> = ([Names["primary"]] extends [never] ? never : string) | ([keyof Names["entities"]] extends [never] ? never : { readonly [E in keyof Names["entities"]]?: string | EntityConfig<Names["entities"][E]>; });
3121
+ /**
3122
+ * `blocks.<instance>.on`: the record types an attachable block attaches to, as
3123
+ * a list of type names or keyed by type name with settings for each.
3124
+ */
3125
+ type InstanceOn = readonly string[] | Readonly<Record<string, Readonly<Record<string, unknown>>>>;
3126
+ /**
3127
+ * What makes a `blocks` entry an instance: the block it installs, the record
3128
+ * types it attaches to and the instances its dependencies resolve to.
3129
+ */
3130
+ interface InstanceKeys {
3131
+ /**
3132
+ * The block this entry installs. Defaults to the key, so `tags: {}` is the
3133
+ * `tags` block; `labels: { block: "tags" }` installs it a second time.
3134
+ */
3135
+ readonly block?: string;
3136
+ /** The record types it attaches to. Defaults to every record type. */
3137
+ readonly on?: InstanceOn;
3138
+ /**
3139
+ * Dependency block to the instance it uses, e.g. `{ pipelines:
3140
+ * "maintenanceStages" }`. Needed only when the dependency is installed more
3141
+ * than once.
3142
+ */
3143
+ readonly uses?: Readonly<Record<string, string>>;
3144
+ }
3145
+ /**
3146
+ * Options every module takes; `Options` types `options`
3147
+ * (`blocks.<module>.options`) and `Names` the names the other keys accept.
3148
+ */
3149
+ interface BlockConfig<Options extends object = Readonly<Record<string, unknown>>, Names extends BlockSqlNameSet = AnyModuleNames> extends InstanceKeys {
3150
+ readonly mode?: BlockMode;
3151
+ /**
3152
+ * Schema of the module's functions and managed tables. Defaults to
3153
+ * `sql.schema`, then `better_supabase`.
3154
+ */
3155
+ readonly schema?: string;
3156
+ /**
3157
+ * Logical table to `table` or `schema.table`, e.g. `{ memberships:
3158
+ * 'public.organization_users' }`. An unqualified name is in `schema`. `null`
3159
+ * marks an optional table the app doesn't have.
3160
+ */
3161
+ readonly tables?: { readonly [T in keyof Names["tables"]]?: string | null; };
3162
+ /**
3163
+ * Logical table to logical column to column name, e.g. `{ memberships: {
3164
+ * tenant: 'organization_id', role: 'role_id' } }`. `null` marks an optional
3165
+ * column the adopted table doesn't have.
3166
+ */
3167
+ readonly columns?: { readonly [T in keyof Names["tables"]]?: { readonly [C in Names["tables"][T]]?: string | null; }; };
3168
+ /**
3169
+ * Logical table to logical column to the values the app's column stores for
3170
+ * each label the block writes or compares, e.g. `{ events: { status: {
3171
+ * cancelled: 'canceled' } } }`. A list maps one label to several app values
3172
+ * (the first is written, each reads as the label); `null` marks a label the
3173
+ * app does not support, so a write of it fails with `VALUE_UNSUPPORTED`. Only
3174
+ * columns a block lists as typed take values; its docs page names them.
3175
+ */
3176
+ readonly values?: { readonly [T in keyof Names["tables"]]?: { readonly [C in Names["tables"][T]]?: Readonly<Record<string, string | readonly string[] | null>>; }; };
3177
+ /** Type of tenant ids: `uuid` (default), `text`, `bigint` or `integer`. */
3178
+ readonly idType?: string;
3179
+ /** Who the block's rows belong to. Defaults to `sql.scope`, then `tenant`. */
3180
+ readonly scope?: BlockScope;
3181
+ /**
3182
+ * Whose policies govern every table of the app's that the block runs over:
3183
+ * `block` adds the block's `bsb_` policies where none of the app's covers
3184
+ * them, `app` adds none, permissive or restrictive. Defaults to
3185
+ * `sql.ownTablePolicies`, then `block`.
3186
+ */
3187
+ readonly ownTablePolicies?: OwnTablePolicies;
3188
+ /**
3189
+ * Function name to the name the module writes it under, e.g. `{
3190
+ * create_organization: 'start_company' }`. Keys are the default names; an
3191
+ * unknown function is an error. `blocks.permissions.functions` is the custom
3192
+ * model's templates instead.
3193
+ */
3194
+ readonly functions?: { readonly [F in Names["functions"]]?: string; };
3195
+ /**
3196
+ * Module action to permission key, checked through the access contract, e.g.
3197
+ * `{ invite: 'organization.members.invite' }`.
3198
+ */
3199
+ readonly permissions?: { readonly [A in Names["actions"]]?: string; };
3200
+ /** New names for the block's entities. */
3201
+ readonly entities?: EntitiesConfig<Names>;
3202
+ /**
3203
+ * Module-specific options, typed from the block manifest's options schema;
3204
+ * each module's docs page lists them.
3205
+ */
3206
+ readonly options?: Options;
3207
+ /**
3208
+ * The app's optional `before_*` and `after_*` functions the module calls when
3209
+ * they exist, e.g. `after_organization_create(organization, user)`. They are
3210
+ * looked up in `schema` (default `public`); `functions` maps a hook name to
3211
+ * another function, e.g. `{ after_organization_create:
3212
+ * 'app.seed_organization' }`.
3213
+ */
3214
+ readonly hooks?: {
3215
+ readonly schema?: string;
3216
+ readonly functions?: { readonly [H in Names["hooks"]]?: string; };
3217
+ };
3218
+ /**
3219
+ * Whether the module writes its events to the outbox (`emit_event`) when the
3220
+ * `outbox` module is installed. Defaults to true.
3221
+ */
3222
+ readonly events?: boolean;
3223
+ /**
3224
+ * Whether the module writes its actions to the audit log (`audit_event`) when
3225
+ * the `audit` module is installed. Defaults to true.
3226
+ */
3227
+ readonly audit?: boolean;
3228
+ /**
3229
+ * A schema for the Data API, such as `api`: the module writes a `security
3230
+ * invoker` wrapper there for each of its functions that `anon` or
3231
+ * `authenticated` may execute (or only those in `functions`, plus the ones
3232
+ * the block's TypeScript client calls), so `rpcTransport(supabase, { schema:
3233
+ * "api" })` reaches them without exposing the module schema (doctor BS312).
3234
+ * Defaults to `sql.api`; `false` writes no wrappers even when `sql.api` is
3235
+ * set.
3236
+ */
3237
+ readonly api?: string | false | {
3238
+ readonly schema: string;
3239
+ readonly functions?: readonly string[];
3240
+ };
3241
+ }
3242
+ /**
3243
+ * Where the active tenant of a request comes from. Every source counts only
3244
+ * while the caller is a member, so a stale claim or setting grants nothing.
3245
+ */
3246
+ type ActiveTenantSource = "claim" | "resolver" | {
3247
+ readonly profileColumn: string;
3248
+ readonly key?: string;
3249
+ };
3250
+ /**
3251
+ * URL tenancy: the tenant comes from the request (a slug), not a stored
3252
+ * setting.
3253
+ */
3254
+ declare const DEFAULT_ACTIVE_TENANT: ActiveTenantSource;
3255
+ /**
3256
+ * The access contract every module checks permissions through: `can(scope, id,
3257
+ * permission)`, `tenant_ids_with(permission)`, `is_platform(permission)` and
3258
+ * `can_user(user, scope, id, permission)`.
3259
+ */
3260
+ /**
3261
+ * A table whose row says whether a tenant or a user is active. Needs
3262
+ * `disabledAt`, `status` with `active`, or both.
3263
+ */
3264
+ interface DisabledRow {
3265
+ /** `schema.table`. */
3266
+ readonly table: string;
3267
+ /** The column holding the tenant id or the user id. */
3268
+ readonly id: string;
3269
+ /** A nullable timestamp column; a row with a value is disabled. */
3270
+ readonly disabledAt?: string;
3271
+ /** A status column; only a row whose value is in `active` is active. */
3272
+ readonly status?: string;
3273
+ readonly active?: readonly string[];
3274
+ }
3275
+ interface AccessBlockConfig<Options extends object = Readonly<Record<string, unknown>>, Names extends BlockSqlNameSet = AnyModuleNames> extends Omit<BlockConfig<Options, Names>, "functions"> {
3276
+ /**
3277
+ * `roles`: a fixed role list from `roles` (the default without
3278
+ * `authorization`; with it, `provider` is the default). `catalog`: role,
3279
+ * permission and override tables (`tables.roles`, `permissions`,
3280
+ * `rolePermissions`, `overrides`, `platformAssignments`). `provider`: the
3281
+ * functions of the config's `authorization` provider. `custom`: expression
3282
+ * templates in `functions`.
3283
+ */
3284
+ readonly model?: "roles" | "catalog" | "provider" | "custom";
3285
+ /**
3286
+ * `roles` model: role name to permission keys. `*` grants everything and
3287
+ * `prefix.*` a prefix. Defaults to owner, admin, member and viewer.
3288
+ */
3289
+ readonly roles?: Readonly<Record<string, readonly string[]>>;
3290
+ /**
3291
+ * `custom` model: SQL expressions with `{scope}`, `{id}`, `{permission}` and
3292
+ * `{user}` placeholders, e.g. `{ can:
3293
+ * 'public.authorize_scope({scope}::public.scope_type, {id}, {permission})'
3294
+ * }`.
3295
+ */
3296
+ readonly functions?: {
3297
+ readonly can?: string;
3298
+ readonly tenantIdsWith?: string;
3299
+ readonly isPlatform?: string;
3300
+ readonly canUser?: string;
3301
+ /**
3302
+ * `{tenant}` and `{role}`: whether the caller may assign the role. Required
3303
+ * by the `custom` model. The `provider` model defaults to the provider's
3304
+ * `canAssign`; without either, only the service role assigns roles unless
3305
+ * the `tenant` module is installed, and doctor BS411 warns.
3306
+ */
3307
+ readonly canAssign?: string;
3308
+ /**
3309
+ * `{user}`, `{tenant}` and `{role}`: whether that user may assign the role,
3310
+ * for SQL that acts later for a stored user (an invitation accept checking
3311
+ * the inviter again), as `can_assign_as`. The `provider` model defaults to
3312
+ * the provider's `canAssignFor`.
3313
+ */
3314
+ readonly canAssignFor?: string;
3315
+ /**
3316
+ * `{permission}` and `{tenant}`: the user ids that hold the permission in
3317
+ * the tenant, for the `custom` model's notification audiences.
3318
+ */
3319
+ readonly holdersOf?: string;
3320
+ /** `{user}`: the permission claim for the access token hook. */
3321
+ readonly permissionClaims?: string;
3322
+ };
3323
+ /**
3324
+ * `roles` model: the JWT claim holding the caller's platform permission keys
3325
+ * (an array). Defaults to `platform_permissions`.
3326
+ */
3327
+ readonly platformClaim?: string;
3328
+ /**
3329
+ * OAuth scope to the permission keys it grants a delegated token (a
3330
+ * `client_id`, or an `act` chain that is not a support or impersonation
3331
+ * level). The access functions refuse every key the token's scopes don't map
3332
+ * to, whatever the user holds. A scope without an entry grants the key with
3333
+ * its own name; map a scope to `["*"]` to grant everything. Merged over
3334
+ * `authorization.delegation.scopes`.
3335
+ */
3336
+ readonly scopes?: Readonly<Record<string, readonly string[]>>;
3337
+ /**
3338
+ * What disables a tenant or a user. A string is a column that disables when
3339
+ * set, as `schema.table.column`, keyed by the table's `id` (tenant) or the
3340
+ * column named in `userKey` (user). An object is an active row: only a row
3341
+ * whose `disabledAt` is null and whose `status` is in `active` is active, and
3342
+ * a missing row counts as disabled. Disabled tenants and users get no
3343
+ * permissions. Under the `provider` model both default to the provider's
3344
+ * `suspension`.
3345
+ */
3346
+ readonly disabled?: {
3347
+ readonly tenant?: string | DisabledRow;
3348
+ readonly user?: string | DisabledRow;
3349
+ readonly userKey?: string;
3350
+ };
3351
+ readonly activeTenant?: ActiveTenantSource;
3352
+ }
3353
+ /** A block name, a key of the block options registry. */
3354
+ type BlockName = Extract<keyof BlockOptionsRegistry, string>;
3355
+ /** One block's config, with `options` and names typed from the block. */
3356
+ type BlockConfigOf<M extends BlockName> = M extends "permissions" ? AccessBlockConfig<BlockOptionsRegistry[M], NamesOf<M>> : BlockConfig<BlockOptionsRegistry[M], NamesOf<M>>;
3357
+ /**
3358
+ * An instance under its own key: the block it names in `block`, checked by
3359
+ * `defineConfig` against that block's options and names.
3360
+ */
3361
+ interface NamedInstance extends InstanceKeys {
3362
+ readonly block?: BlockName;
3363
+ readonly [key: string]: unknown;
3364
+ }
3365
+ /**
3366
+ * `blocks` in the config, keyed by instance. A key that is a block name
3367
+ * installs that block, with `options` typed from its manifest's options schema;
3368
+ * any other key names an instance and sets `block`.
3369
+ */
3370
+ type BlocksConfig = { readonly [M in BlockName]?: BlockConfigOf<M>; } & {
3371
+ readonly [instance: string]: NamedInstance | undefined;
3372
+ };
3373
+ /**
3374
+ * `blocks` keyed by any module name, as the resolved config and the SQL
3375
+ * renderer read it.
3376
+ */
3377
+ interface AnyBlocksConfig {
3378
+ readonly permissions?: AccessBlockConfig;
3379
+ /**
3380
+ * `AccessBlockConfig` is listed so a `permissions` entry fits the index
3381
+ * signature.
3382
+ */
3383
+ readonly [module: string]: BlockConfig | AccessBlockConfig | undefined;
3384
+ }
3385
+ /**
3386
+ * The tenant's new singular name (`blocks.memberships.names.organization`), or
3387
+ * `undefined` while it is `organization`. `blocks` may be the config's list of
3388
+ * block names, which renames nothing.
3389
+ */
3390
+ declare function tenantNameOf(blocks: AnyBlocksConfig | readonly string[] | undefined): string | undefined;
3391
+ /** A module's config with defaults applied. */
3392
+ interface ResolvedBlock {
3393
+ readonly mode: BlockMode;
3394
+ readonly schema: string;
3395
+ readonly tables: Readonly<Record<string, string | null>>;
3396
+ readonly columns: Readonly<Record<string, Readonly<Record<string, string | null>>>>;
3397
+ /** `values`, unchecked; the module context checks it against its tables. */
3398
+ readonly values?: Readonly<Record<string, unknown>>;
3399
+ readonly idType?: string;
3400
+ readonly scope?: BlockScope;
3401
+ /** `ownTablePolicies`, with its default. */
3402
+ readonly ownTablePolicies: OwnTablePolicies;
3403
+ readonly functions: Readonly<Record<string, string>>;
3404
+ readonly permissions: Readonly<Record<string, string>>;
3405
+ readonly options: Readonly<Record<string, unknown>>;
3406
+ readonly hooks: {
3407
+ readonly schema: string;
3408
+ readonly functions: Readonly<Record<string, string>>;
3409
+ };
3410
+ readonly events: boolean;
3411
+ readonly audit: boolean;
3412
+ readonly api?: {
3413
+ readonly schema: string;
3414
+ readonly functions?: readonly string[];
3415
+ };
3416
+ }
3417
+ declare function resolveBlock(config?: BlockConfig): ResolvedBlock;
3418
+ /**
3419
+ * SQL expression templates the SQL modules and the access policies call.
3420
+ * `{permission}` is a text expression (a literal or a parameter), `{user}` a
3421
+ * uuid expression, `{tenant}` an expression of the tenant id type, `{role}` a
3422
+ * text expression and `{roles}` a `text[]` of the roles being assigned
3423
+ * (`array[{role}]` for one role, the whole set with
3424
+ * `blocks.memberships.options.roles.many`). `{scope}` is the scope's name
3425
+ * unquoted, so it can be part of a function name
3426
+ * (`app.ids_{scope}({permission})`); write `'{scope}'` to pass it as text.
3427
+ */
3428
+ interface AuthorizationFunctions {
3429
+ /**
3430
+ * The ids of the `{scope}` instances where the caller holds `{permission}`,
3431
+ * as a set: it is used as `select t.id::text from <template> as t(id)`.
3432
+ */
3433
+ readonly idsWith: string;
3434
+ /** Whether the caller holds `{permission}` platform-wide. */
3435
+ readonly isPlatform: string;
3436
+ /** `idsWith` for `{user}`, so `can_user` answers for another user. */
3437
+ readonly idsWithFor?: string;
3438
+ /** `isPlatform` for `{user}`. */
3439
+ readonly isPlatformFor?: string;
3440
+ /** The ids of the `{scope}` instances the caller is a member of, as a set. */
3441
+ readonly memberIds?: string;
3442
+ /**
3443
+ * `memberIds` for `{user}`, which the access token hook calls as
3444
+ * `supabase_auth_admin`.
3445
+ */
3446
+ readonly memberIdsFor?: string;
3447
+ /**
3448
+ * The team ids `{user}` belongs to, as a set of the team id type: it is used
3449
+ * as `select t.id from <template> as t(id)`. Under the provider model the
3450
+ * teams module's `team_ids_of()`, and the team sharing in `saved-views` and
3451
+ * `collections`, call it instead of reading `team_members`.
3452
+ */
3453
+ readonly teamIdsOf?: string;
3454
+ /**
3455
+ * Whether the caller may assign `{role}` (or every one of `{roles}`) in
3456
+ * `{tenant}`.
3457
+ */
3458
+ readonly canAssign?: string;
3459
+ /**
3460
+ * Whether `{user}` may assign `{role}` (or every one of `{roles}`) in
3461
+ * `{tenant}`.
3462
+ */
3463
+ readonly canAssignFor?: string;
3464
+ /**
3465
+ * The permission keys `{user}` holds in `{tenant}`, as a `text[]`. It fills
3466
+ * `member_permissions` and the `permissions` claim; without it both are
3467
+ * empty.
3468
+ */
3469
+ readonly permissionsFor?: string;
3470
+ /**
3471
+ * Whether the caller may decide the tool call `{tool}` (text) waits on in
3472
+ * `{tenant}`. Without it only the chat's owner and the service role decide.
3473
+ *
3474
+ * @deprecated Use `isApprover`, which every module that waits for an
3475
+ * approval reads. `canApprove` is read for tool calls only when
3476
+ * `isApprover` is unset.
3477
+ */
3478
+ readonly canApprove?: string;
3479
+ /**
3480
+ * Whether the caller may approve the request `{subject}` (text) of kind
3481
+ * `{kind}` (a text literal: `'ai-tool'` with the tool name as `{subject}`,
3482
+ * `'support-session'` with the request id, or the app's own kind) in
3483
+ * `{tenant}`. `{requester}` is the uuid of the user who asked (the approval's
3484
+ * `requested_by`, the support admin, the chat's owner), or `null`; a provider
3485
+ * that resolves out-of-office covers reads it to refuse a cover by the
3486
+ * requester's own delegator. It replaces each module's own eligibility check;
3487
+ * the requester is refused before it runs. Without it a module falls back to
3488
+ * its default approver (the chat's owner, a platform permission).
3489
+ */
3490
+ readonly isApprover?: string;
3491
+ /**
3492
+ * The user ids that hold `{permission}` on `{tenant}`, as a set: it is used
3493
+ * as `select u from <template> as t(u)`. A notification's `permission`
3494
+ * audience calls it. Without it, naming `permission` is refused.
3495
+ */
3496
+ readonly holdersOf?: string;
3497
+ /**
3498
+ * Whether the caller's session may write. No placeholders. Write functions
3499
+ * and write policies call it instead of the built-in act check.
3500
+ */
3501
+ readonly actorMayWrite?: string;
3502
+ /**
3503
+ * Whether the caller holds `{permission}` on the instance `{id}` (text) of
3504
+ * `{resource}` in `{tenant}`, at `{scope}`. A realtime topic that declares a
3505
+ * `permission` calls it for the instance in its topic name.
3506
+ */
3507
+ readonly permitted?: string;
3508
+ /**
3509
+ * The ids of the rows of `{resource}` the caller holds `{permission}` on, as
3510
+ * a set of text: it is used as `select r.id from <template> as r(id)`.
3511
+ * `{resource}` is a resource name as the provider spells it in SQL (such as
3512
+ * `file_node`), unquoted, so it can be part of a function name; `{ids}` is a
3513
+ * `text[]` of the candidate ids, which a provider may use to limit the work.
3514
+ * `can_subject` calls it for a `config.subjects.<type>.permissions.<action>`
3515
+ * entry with `rows`.
3516
+ */
3517
+ readonly rowsWith?: string;
3518
+ /**
3519
+ * `rowsWith` for `{user}`, so `can_subject_for` answers per-row grants for
3520
+ * another user. Without it those grants count for the caller only.
3521
+ */
3522
+ readonly rowsWithFor?: string;
3523
+ /**
3524
+ * The records the caller may reach as a guest for `{action}` (`read`,
3525
+ * `comment` or `upload`), as a set of `(tenant text, subject_type text,
3526
+ * subject_id text)`: it is used as `select g.tenant, g.subject_type,
3527
+ * g.subject_id from <template> as g(tenant, subject_type, subject_id)`.
3528
+ * `ctx.scope.guest` calls it, so comments, attachments, invoices and bookings
3529
+ * let a provider's external users in (ADR 0070). With the `guests` block
3530
+ * installed its grants are added to these.
3531
+ */
3532
+ readonly portalSubjects?: string;
3533
+ /**
3534
+ * The parties the caller acts for as a guest, as a set of `(tenant text,
3535
+ * party_type text, party_id text)`. No placeholders. `ctx.scope.guestParty`
3536
+ * calls it for portal reads such as a customer's own invoices.
3537
+ */
3538
+ readonly portalParties?: string;
3539
+ }
3540
+ /** One scope the provider decides permissions in, such as `organization`. */
3541
+ interface AuthorizationScope {
3542
+ /** Lower case letters, digits and `_`, starting with a letter. */
3543
+ readonly name: string;
3544
+ /**
3545
+ * The Postgres type of the scope's ids: `uuid`, `text`, `bigint` or
3546
+ * `integer`.
3547
+ */
3548
+ readonly idType?: string;
3549
+ /** The scope this one sits in; the root scope has none. */
3550
+ readonly parent?: string;
3551
+ }
3552
+ /** A function the templates call, which must exist and be executable by `role`. */
3553
+ interface AuthorizationRequirement {
3554
+ /** `schema.name`. */
3555
+ readonly function: string;
3556
+ /** The argument types, such as `text` or `uuid, text`. */
3557
+ readonly args?: string;
3558
+ readonly role: string;
3559
+ }
3560
+ /** A permission key the provider defines. */
3561
+ interface AuthorizationPermission {
3562
+ readonly key: string;
3563
+ /**
3564
+ * `true` when the SQL functions answer for the key completely. A key with row
3565
+ * conditions they don't check is `false`, and policies refuse it. Unset means
3566
+ * unknown, which counts as `false`.
3567
+ */
3568
+ readonly sqlComplete?: boolean;
3569
+ /** The scopes it can be granted at. */
3570
+ readonly scopes?: readonly string[];
3571
+ }
3572
+ /**
3573
+ * One named operation: what workflow builder nodes, MCP tools, AI tools and
3574
+ * inbox commands with that name need. The provider supplies the table;
3575
+ * `blocks.<module>.permissions` still renames a module's own keys.
3576
+ */
3577
+ interface AuthorizationOperation {
3578
+ /** The permission key the operation needs. */
3579
+ readonly permission: string;
3580
+ readonly meta?: {
3581
+ /** `low`, `medium` or `high`; a `high` operation can ask for approval. */
3582
+ readonly risk?: "low" | "medium" | "high";
3583
+ /** What it changes: `read`, `write`, `delete`, `external`. */
3584
+ readonly effects?: readonly ("read" | "write" | "delete" | "external")[];
3585
+ readonly title?: string;
3586
+ };
3587
+ }
3588
+ /** A table of memberships the provider reads. */
3589
+ interface AuthorizationMembership {
3590
+ /** `schema.table`. */
3591
+ readonly table: string;
3592
+ readonly userColumn: string;
3593
+ /** The scope column, or the scope every row is in. */
3594
+ readonly scope: {
3595
+ readonly column: string;
3596
+ } | {
3597
+ readonly value: string;
3598
+ };
3599
+ readonly idColumn: string;
3600
+ /**
3601
+ * `schema.table` of the membership's role set, one row per `(scope id, user,
3602
+ * role)`, when a member can hold several roles. better-supabase's own is
3603
+ * `better_supabase.membership_roles`
3604
+ * (`blocks.memberships.options.roles.many`).
3605
+ */
3606
+ readonly rolesTable?: string;
3607
+ }
3608
+ /** A membership table whose role column points into a roles table. */
3609
+ interface AuthorizationRoleSource {
3610
+ /** `schema.table` of the memberships. */
3611
+ readonly table: string;
3612
+ readonly role: {
3613
+ readonly column: string;
3614
+ readonly through: {
3615
+ /** `schema.table` of the roles. */
3616
+ readonly table: string;
3617
+ readonly id: string;
3618
+ readonly column: string;
3619
+ };
3620
+ };
3621
+ }
3622
+ /** The access token hook the provider generates. */
3623
+ interface AuthorizationTokenHook {
3624
+ /** `schema.name`. */
3625
+ readonly function: string;
3626
+ /** The claim it writes the active tenant id to. */
3627
+ readonly tenantClaim?: string;
3628
+ /**
3629
+ * Where it reads the active organization from: the `auth.tenant.claim` key in
3630
+ * `app_metadata` (`"claim"`), a profile column, or the request
3631
+ * (`"resolver"`). Doctor BS409 warns when `switch_organization` writes it
3632
+ * somewhere else (`blocks.permissions.activeTenant`).
3633
+ */
3634
+ readonly activeOrganizationFrom?: ActiveTenantSource;
3635
+ /** Claims it writes itself, which a second writer would contradict. */
3636
+ readonly ownedClaims: readonly string[];
3637
+ /**
3638
+ * Claims it fills from other functions, such as `features` from
3639
+ * `better_supabase.feature_claims`.
3640
+ */
3641
+ readonly registeredClaims?: readonly {
3642
+ readonly name: string;
3643
+ /** `schema.name`. */
3644
+ readonly function: string;
3645
+ }[];
3646
+ /** A byte budget over some claims, which doctor `--as` measures (BS405). */
3647
+ readonly budget?: {
3648
+ readonly claims: readonly string[];
3649
+ readonly bytes: number;
3650
+ /**
3651
+ * A claim the hook sets to `true` when it dropped entries to stay within
3652
+ * the budget.
3653
+ */
3654
+ readonly truncatedClaim?: string;
3655
+ };
3656
+ /**
3657
+ * Comment lines the provider's generated files contain, so doctor recognises
3658
+ * them.
3659
+ */
3660
+ readonly markers?: {
3661
+ /** In the file that defines the hook. */
3662
+ readonly hook?: string;
3663
+ /** In the migration that grants the hook's functions. */
3664
+ readonly grants?: string;
3665
+ };
3666
+ /** The command that writes the hook's grants, for BS404. */
3667
+ readonly grantsCommand?: string;
3668
+ }
3669
+ /**
3670
+ * An authorization system the SQL modules, the policies and doctor delegate to.
3671
+ * It is plain data, usually built from the provider's own output files.
3672
+ */
3673
+ interface AuthorizationProvider {
3674
+ readonly apiVersion: 1;
3675
+ /** The provider's name, for messages. */
3676
+ readonly name: string;
3677
+ readonly scopes: readonly AuthorizationScope[];
3678
+ /** The scope tenants are. */
3679
+ readonly tenantScope: string;
3680
+ readonly functions: AuthorizationFunctions;
3681
+ readonly requires?: readonly AuthorizationRequirement[];
3682
+ readonly permissions?: readonly AuthorizationPermission[];
3683
+ /**
3684
+ * Operations by name (`workflow.node.http`, `mcp.tool.search_posts`,
3685
+ * `ai.tool.send_email`, `inbox.command.assign`). A module looks an operation
3686
+ * up here first and uses its own default permission otherwise.
3687
+ */
3688
+ readonly operations?: Readonly<Record<string, AuthorizationOperation>>;
3689
+ readonly memberships?: readonly AuthorizationMembership[];
3690
+ /** Rows that say whether a user or a tenant is active. */
3691
+ readonly suspension?: {
3692
+ readonly user?: DisabledRow;
3693
+ readonly tenant?: DisabledRow;
3694
+ };
3695
+ readonly roleSources?: readonly AuthorizationRoleSource[];
3696
+ /** `schema.table.column` of every column that decides access (BS213). */
3697
+ readonly decidingColumns?: readonly string[];
3698
+ readonly tokenHook?: AuthorizationTokenHook;
3699
+ /** What a delegated token (an OAuth client or agent) may use. */
3700
+ readonly delegation?: {
3701
+ /**
3702
+ * OAuth scope to the permission keys it grants (RFC 9396 details stay with
3703
+ * the app). `blocks.permissions.scopes` is merged over it.
3704
+ */
3705
+ readonly scopes?: Readonly<Record<string, readonly string[]>>;
3706
+ };
3707
+ /** How `canApprove` decisions are made. */
3708
+ readonly approvals?: {
3709
+ /** The user who asked for the tool call can't approve it. Default `false`. */
3710
+ readonly distinctApprover?: boolean;
3711
+ };
3712
+ /** What the provider found wrong while building this, for doctor. */
3713
+ readonly problems?: readonly string[];
3714
+ }
3715
+ /**
3716
+ * The error for a provider built for another API version, or `undefined` for
3717
+ * version 1.
3718
+ */
3719
+ declare function providerApiProblem(provider: {
3720
+ readonly name?: unknown;
3721
+ readonly apiVersion?: unknown;
3722
+ }): string | undefined;
3723
+ export { tenantNameOf as A, EntityConfig as C, OwnTablePolicies as D, NamedInstance as E, CommentsSqlOptions as F, TablesOf as I, BlockNameRegistry as L, BlockOptionsRegistry as M, PlatformRolesOption as N, ResolvedBlock as O, MessagingSqlOptions as P, EntitiesConfig as S, InstanceOn as T, BlockName as _, AuthorizationProvider as a, DEFAULT_ACTIVE_TENANT as b, AuthorizationScope as c, AccessBlockConfig as d, ActiveTenantSource as f, BlockMode as g, BlockConfigOf as h, AuthorizationPermission as i, BLOCK_OPTION_SCHEMAS as j, resolveBlock as k, AuthorizationTokenHook as l, BlockConfig as m, AuthorizationMembership as n, AuthorizationRequirement as o, AnyBlocksConfig as p, AuthorizationOperation as r, AuthorizationRoleSource as s, AuthorizationFunctions as t, providerApiProblem as u, BlockScope as v, InstanceKeys as w, DisabledRow as x, BlocksConfig as y };