permdock 0.35.1 → 0.36.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 (275) hide show
  1. package/dist/a2a/index.d.ts +1 -1
  2. package/dist/a2a/index.js +2 -2
  3. package/dist/{adoption-scan-B_jVJgMK.js → adoption-scan-FcbJOEo1.js} +1 -1
  4. package/dist/agent/index.d.ts +1 -1
  5. package/dist/agent/index.js +1 -1
  6. package/dist/ai-sdk/index.d.ts +1 -1
  7. package/dist/ai-sdk/index.js +3 -3
  8. package/dist/app/index.d.ts +1 -1
  9. package/dist/app/index.js +1 -1
  10. package/dist/approvals/index.d.ts +1 -1
  11. package/dist/{arazzo-D-fDq8Dv.js → arazzo-BRWgVc8j.js} +1 -1
  12. package/dist/{arazzo-CKsNFj_5.js → arazzo-rYG2UY9k.js} +2 -2
  13. package/dist/astro/index.d.ts +3 -3
  14. package/dist/astro/index.js +1 -1
  15. package/dist/authzen/index.d.ts +3 -3
  16. package/dist/authzen/index.js +1 -1
  17. package/dist/better-supabase/index.d.ts +13 -4
  18. package/dist/better-supabase/index.js +8 -8
  19. package/dist/{bind-DPptdk31.js → bind-2Cuy29LS.js} +2 -2
  20. package/dist/{bind-BnrOLyJq.d.ts → bind-Caffleoh.d.ts} +5 -5
  21. package/dist/{bsb-access-tags-1oVQZWKp.js → bsb-access-tags-Bfmhft2o.js} +1 -1
  22. package/dist/{bsb-action-keys-BfZAwg-9.js → bsb-action-keys-LgveZiHJ.js} +2 -2
  23. package/dist/{bsb-actions-BHiyBxQZ.js → bsb-actions-DcDxQ_Ku.js} +3 -3
  24. package/dist/{budgets-hi-ecgEd.js → budgets-B2hIDaz7.js} +2 -2
  25. package/dist/{build-instance-DZEWYO-A.js → build-instance-CZg_Bf45.js} +1 -1
  26. package/dist/{bundle-size-DbXV65Ix.js → bundle-size-BjdmlKWJ.js} +2 -2
  27. package/dist/bundle-size-BoG9Jm7c.js +1 -0
  28. package/dist/{casbin-CWfeuRmI.js → casbin-4FACZ5Ez.js} +1 -1
  29. package/dist/{casbin-DqiTIceJ.js → casbin-Cz8BGXHW.js} +1 -1
  30. package/dist/{catalog-CBPFyRv7.js → catalog-DYC6wfAj.js} +1 -1
  31. package/dist/{catalog-BExjL94D.js → catalog-SnaPhbZ1.js} +2 -2
  32. package/dist/{catalog-doc-D4g3nyFB.js → catalog-doc-BX97oFAn.js} +1 -1
  33. package/dist/catalog-e6QRd1JP.js +1 -0
  34. package/dist/chat/index.d.ts +1 -1
  35. package/dist/chat/index.js +1 -1
  36. package/dist/chat-sdk/index.d.ts +1 -1
  37. package/dist/claude-agent/index.d.ts +2 -2
  38. package/dist/claude-agent/index.js +2 -2
  39. package/dist/clerk/index.d.ts +1 -1
  40. package/dist/cli/bin.js +1 -1
  41. package/dist/cli/generate/watch-worker.js +1 -1
  42. package/dist/cli/index.js +1 -1
  43. package/dist/cli/plugins/app.js +1 -1
  44. package/dist/cli/plugins/openapi.js +1 -1
  45. package/dist/cli/plugins/powersync.js +1 -1
  46. package/dist/cli/plugins/rls.js +1 -1
  47. package/dist/cli/plugins/schemas.js +1 -1
  48. package/dist/cli/plugins/supabase-hook.js +1 -1
  49. package/dist/cli/plugins/supabase.js +2 -2
  50. package/dist/cli/plugins/ui.js +1 -1
  51. package/dist/{cloud-CvA_LeOt.js → cloud-BB67klb4.js} +2 -2
  52. package/dist/{codemod-DduTfuWM.js → codemod-BPcxGOlq.js} +5 -5
  53. package/dist/{codemod-CA0MQoG4.js → codemod-Lov9764v.js} +1 -1
  54. package/dist/collect-C2_CKZ09.js +1 -0
  55. package/dist/{collect-Ba7ccZ23.js → collect-CcE8QBtZ.js} +2 -2
  56. package/dist/{collect-CPimbkC5.js → collect-Co-w8Eg2.js} +1 -1
  57. package/dist/compile/index.d.ts +1 -1
  58. package/dist/{compile-CoUadQXF.d.ts → compile-CyUn58lf.d.ts} +1 -1
  59. package/dist/{compile-D-BULiHE.js → compile-EtZv2wc0.js} +6 -6
  60. package/dist/{completion-DXdFnwLY.js → completion-5Y8toe1d.js} +1 -1
  61. package/dist/{config-BWYfHYvW.js → config-DfbiV554.js} +1 -1
  62. package/dist/{config-report-pg-66Bdr.js → config-report-Cs6iDebE.js} +2 -2
  63. package/dist/{context-rioF4fQl.js → context-CFPsmfPl.js} +1 -1
  64. package/dist/convex/index.d.ts +2 -2
  65. package/dist/convex/index.js +2 -2
  66. package/dist/{core-DCMIztx1.d.ts → core-_Lofwt2K.d.ts} +1 -1
  67. package/dist/{core-DIUrkFNL.js → core-s_TCdJ6G.js} +2 -2
  68. package/dist/{create-BYL8xCJB.d.ts → create-BfTbYrts.d.ts} +1 -1
  69. package/dist/{create-T_NqxU31.d.ts → create-D12I1Vkl.d.ts} +4 -4
  70. package/dist/{create-BMRnaZel.js → create-D6B06lb8.js} +3 -3
  71. package/dist/{create-iCwrnaFE.d.ts → create-EPbgV-LA.d.ts} +2 -2
  72. package/dist/{create-BRY0OtFV.js → create-bbjS7tCW.js} +2 -2
  73. package/dist/{credentials-DzNrCNZY.d.ts → credentials-DtSnydoD.d.ts} +1 -1
  74. package/dist/{custom-role-rebuild-wzN8pqDk.js → custom-role-rebuild-QFXiMHqJ.js} +1 -1
  75. package/dist/{define-permdock-CO7YNrOF.js → define-permdock-Dazve5lw.js} +1 -1
  76. package/dist/{define-permdock-Bhye7WSY.d.ts → define-permdock-ZR0w-Loy.d.ts} +3 -3
  77. package/dist/delivery/index.d.ts +1 -1
  78. package/dist/{diff-CkSZF7LO.js → diff-BABnQ-z0.js} +3 -3
  79. package/dist/{diff-CS8ks9h3.js → diff-C7zKA7ny.js} +1 -1
  80. package/dist/{doctor-Cs0Xl46A.js → doctor-Chio5Col.js} +101 -31
  81. package/dist/{doctor-B55XfWdG.js → doctor-Cm1HDI5s.js} +2 -2
  82. package/dist/drizzle/index.d.ts +2 -2
  83. package/dist/elysia/index.d.ts +3 -3
  84. package/dist/elysia/index.js +1 -1
  85. package/dist/{evaluations-CUkSKioS.d.ts → evaluations-BYoj5ci6.d.ts} +1 -1
  86. package/dist/eve/index.d.ts +2 -2
  87. package/dist/eve/index.js +2 -2
  88. package/dist/{execute-Vfo2CAhv.js → execute-B_yY9xWV.js} +4 -4
  89. package/dist/{explain-DISCeeYS.js → explain-Blkq60Ff.js} +2 -2
  90. package/dist/{explain-D4ipf8IH.js → explain-CKIqxXSe.js} +1 -1
  91. package/dist/express/index.d.ts +3 -3
  92. package/dist/express/index.js +1 -1
  93. package/dist/fastify/index.d.ts +3 -3
  94. package/dist/fastify/index.js +1 -1
  95. package/dist/{fetch-adapter-Ds2-fUUi.d.ts → fetch-adapter-CdaSVKrt.d.ts} +2 -2
  96. package/dist/{fetch-adapter-BXQc4NoV.js → fetch-adapter-DXgza6EM.js} +1 -1
  97. package/dist/{fields-CwFej4gp.js → fields-CKX-qjWb.js} +1 -1
  98. package/dist/gen-CYuPbpBZ.js +1 -0
  99. package/dist/{gen-M_5UU5Ck.js → gen-DlJK73v7.js} +4 -4
  100. package/dist/{gen-kind-DLz0P-TB.js → gen-kind-C4tERYMw.js} +1 -1
  101. package/dist/{generate-CNkkKAL-.js → generate-CFqcr3H6.js} +94 -15
  102. package/dist/{generate-GCDLA8vW.js → generate-CbLA2WW_.js} +3 -3
  103. package/dist/{generate-options-O3mVjjcG.js → generate-options-BFAvlJKQ.js} +9 -9
  104. package/dist/h3/index.d.ts +3 -3
  105. package/dist/h3/index.js +2 -2
  106. package/dist/{helper-calls-B5MOl99d.js → helper-calls-DN1PJcNY.js} +53 -1
  107. package/dist/hono/index.d.ts +3 -3
  108. package/dist/hono/index.js +1 -1
  109. package/dist/{hook-sql-y0CJBLJr.js → hook-sql-CSUFnRn0.js} +283 -13
  110. package/dist/{import-CQSJ6xcN.js → import-B-17dw3B.js} +1 -1
  111. package/dist/{import-Bz6IKoMM.js → import-wBO24zgo.js} +1 -1
  112. package/dist/{index-Cjr8Q-uq.d.ts → index-Bb2sZq1K.d.ts} +8 -7
  113. package/dist/{index-CWBCzwOp.d.ts → index-CT4VKXU-.d.ts} +1 -1
  114. package/dist/{index-ktQ7E4qB.d.ts → index-Cfg0ED9K.d.ts} +2 -2
  115. package/dist/{index-BOJPdIBk.d.ts → index-DY1aJ-K1.d.ts} +1 -1
  116. package/dist/index.d.ts +4 -4
  117. package/dist/index.js +2 -2
  118. package/dist/{init-BucxAxRw.js → init-Bg0vS1LV.js} +1 -1
  119. package/dist/{init-Cfb0VX3T.js → init-DRbkPclr.js} +3 -3
  120. package/dist/{inspect-functions-CzrQtRDb.js → inspect-functions-DLP72IMA.js} +1 -1
  121. package/dist/{instance-options-DDERlopm.d.ts → instance-options-D-SLCp4I.d.ts} +1 -1
  122. package/dist/{interactive-only-Bbq9e61G.js → interactive-only-CylKSukS.js} +1 -1
  123. package/dist/{kernel-DSnWVZ0O.js → kernel-CzzmzwLg.js} +3 -3
  124. package/dist/{keys-BWhAnANj.js → keys-C-W0yrql.js} +1 -1
  125. package/dist/kysely/index.d.ts +2 -2
  126. package/dist/{lazy-provider-Clt2095H.d.ts → lazy-provider-BSHAIpMK.d.ts} +1 -1
  127. package/dist/{login-qYcM0hKh.js → login-D6IJk8k1.js} +1 -1
  128. package/dist/{login-CU89mk0U.js → login-yF-sDNm9.js} +3 -3
  129. package/dist/{manifest-Bu9gUrI0.js → manifest-DkHIGPoY.js} +63 -52
  130. package/dist/{manifest-schema-N3v2RVL-.js → manifest-schema-CkROwfT9.js} +1 -1
  131. package/dist/{manifest-CIWOmdlP.js → manifest-teSfgeqF.js} +1 -1
  132. package/dist/mcp/index.d.ts +3 -3
  133. package/dist/mcp/index.js +2 -2
  134. package/dist/{measure-C_Z0a7B8.js → measure-_VlSPfSY.js} +2 -2
  135. package/dist/{memberships-CNoAlsma.js → memberships-CDiSsFTu.js} +1 -1
  136. package/dist/{memberships-4e6qi8Uv.js → memberships-DiCbNRny.js} +1 -1
  137. package/dist/{model-BYCtXS_g.js → model-r7X_HXyS.js} +2 -2
  138. package/dist/{names-DBxKx2bz.js → names-DwGleRKB.js} +3 -3
  139. package/dist/nest/index.d.ts +3 -3
  140. package/dist/nest/index.js +1 -1
  141. package/dist/next/index.d.ts +6 -6
  142. package/dist/next/index.js +3 -3
  143. package/dist/next/plugin.js +1 -1
  144. package/dist/node/index.d.ts +3 -3
  145. package/dist/node/index.js +1 -1
  146. package/dist/openai/index.d.ts +2 -2
  147. package/dist/openai/index.js +3 -3
  148. package/dist/{openapi-DIhS8iHN.js → openapi-D156UqcM.js} +100 -5
  149. package/dist/{openapi-ZIlGKUwQ.js → openapi-Dcqqja0n.js} +1 -1
  150. package/dist/{openapi-document-D5IhoJo0.js → openapi-document-CTvHkCXz.js} +1 -1
  151. package/dist/orpc/index.d.ts +4 -4
  152. package/dist/orpc/index.js +2 -2
  153. package/dist/otel/index.d.ts +2 -2
  154. package/dist/{output-DIjUJioq.js → output-DNbj0_Yi.js} +1 -1
  155. package/dist/{ownership-Bmt-z0rF.js → ownership-BvKT4DBj.js} +3 -3
  156. package/dist/pdp/index.d.ts +2 -2
  157. package/dist/pdp/index.js +1 -1
  158. package/dist/{permdock-DkvkGVF0.d.ts → permdock-CHU1LZGq.d.ts} +5 -3
  159. package/dist/{permdock-JM9TKevZ.js → permdock-DZmr2kJw.js} +2 -1
  160. package/dist/{permissions-xPyAmuXi.js → permissions-DUmypTlO.js} +1 -1
  161. package/dist/{pipeline-BAGSNnct.js → pipeline-BMbLI2Sj.js} +2 -2
  162. package/dist/{policy-D8RxFeZO.js → policy-DekUQ-6v.js} +1 -1
  163. package/dist/{policy-bundle-DC_xq2R5.js → policy-bundle-JU4-AFJM.js} +3 -3
  164. package/dist/{powersync-CgCMKvaU.js → powersync-CpxkK_Lz.js} +1 -1
  165. package/dist/{powersync-BlfO3_jN.js → powersync-D9ZLDzyv.js} +1 -1
  166. package/dist/{powersync-CiQ97gzz.js → powersync-cG4lxrzQ.js} +8 -8
  167. package/dist/prisma/index.d.ts +1 -1
  168. package/dist/{protected-action-gBxeetqY.d.ts → protected-action-Dux5RJbA.d.ts} +3 -3
  169. package/dist/{provider-Clt2095H.d.ts → provider-BSHAIpMK.d.ts} +1 -1
  170. package/dist/{provider-BwqzED5h.js → provider-BfKUBNyV.js} +32 -5
  171. package/dist/{prune-config-CbhJ_XvD.js → prune-config-ByigsAkl.js} +4 -4
  172. package/dist/{pull-DLyCr-7L.js → pull-4Cyo0uTS.js} +3 -3
  173. package/dist/pull-_ic7Md2h.js +1 -0
  174. package/dist/{push-D5so0ptb.js → push-Br0Uz5pT.js} +2 -2
  175. package/dist/{rbac-DbyaaNLa.js → rbac-BOVyTCI6.js} +3 -3
  176. package/dist/react/index.d.ts +4 -4
  177. package/dist/react/lazy.d.ts +4 -4
  178. package/dist/react/provider-client-lazy.d.ts +1 -1
  179. package/dist/react/provider-client.d.ts +1 -1
  180. package/dist/react-native/index.d.ts +4 -4
  181. package/dist/{rename-CI6NIF9t.js → rename-Dp47Gs_j.js} +2 -2
  182. package/dist/{report-DF0zUNut.js → report-Dp-ApWVC.js} +1 -1
  183. package/dist/{report-XdCm1y_J.js → report-x9GeUvjx.js} +1 -1
  184. package/dist/{request-context-CqqdiVp4.js → request-context-LvIolknK.js} +1 -1
  185. package/dist/{resolve-names-BR6PiCrx.js → resolve-names-B_no27Dh.js} +4 -4
  186. package/dist/{resolver-D2c1CcoZ.js → resolver-CAmmdVAL.js} +22 -11
  187. package/dist/{rls-CdQW7v9D.js → rls-C816Uuvx.js} +5 -5
  188. package/dist/{rls-BfUIMNeV.js → rls-DB18scnl.js} +13 -12
  189. package/dist/{rls-files-68-nKfmG.js → rls-files-Cp-qzl61.js} +1 -1
  190. package/dist/{row-conditions-DwIJocfQ.js → row-conditions-BjARoFLU.js} +1 -1
  191. package/dist/{rpc-BYFB37KV.d.ts → rpc-CL8lrV5Y.d.ts} +1 -1
  192. package/dist/{rpc-BQPa7tLP.js → rpc-CoClxzcc.js} +1 -1
  193. package/dist/{run-B2Axta4z.js → run-CJhz8BHw.js} +2 -2
  194. package/dist/run-PpoUQXDc.js +1 -0
  195. package/dist/{run-ticket-CRldclc7.d.ts → run-ticket-CCRYQNj0.d.ts} +1 -1
  196. package/dist/{saas-DSeazNrN.js → saas-iXqf78G8.js} +2 -2
  197. package/dist/{scan-DNzOELYT.js → scan-DvM-_F8-.js} +1 -1
  198. package/dist/{schema-CJc23R4a.js → schema-uTRr3B9f.js} +1 -1
  199. package/dist/server/index.d.ts +5 -5
  200. package/dist/server/index.js +1 -1
  201. package/dist/{server-types-FkdDSB9h.d.ts → server-types-C_Lnc8Ec.d.ts} +5 -5
  202. package/dist/{size-CY6rK6l9.js → size-BO7J8M3B.js} +2 -2
  203. package/dist/{skills-DTpSMQRg.js → skills-B5exEJf5.js} +1 -1
  204. package/dist/{skills-TqrLrmuv.js → skills-DF_3nX9_.js} +1 -1
  205. package/dist/{snapshot-size-D6ixbYvH.js → snapshot-size-BzamcZrn.js} +1 -1
  206. package/dist/{snapshot-size-NklqBKcV.js → snapshot-size-CJ53OOen.js} +1 -1
  207. package/dist/solid/index.d.ts +2 -2
  208. package/dist/solid-start/index.d.ts +3 -3
  209. package/dist/solid-start/index.js +2 -2
  210. package/dist/{src-BXDohWNO.js → src-CYKqpYUM.js} +4 -4
  211. package/dist/{store-core-aluQ3R1M.d.ts → store-core-D5-cqb6z.d.ts} +1 -1
  212. package/dist/{stores-hHICuiQl.d.ts → stores-DPUPLu29.d.ts} +3 -3
  213. package/dist/supabase/index.d.ts +2 -2
  214. package/dist/supabase/index.js +3 -3
  215. package/dist/supabase/middleware.d.ts +4 -4
  216. package/dist/supabase/middleware.js +3 -3
  217. package/dist/{supabase-MitbozF6.js → supabase-Dpy2XE9v.js} +2 -2
  218. package/dist/{supabase-ByhSqBDB.js → supabase-NpHqrRXC.js} +2 -2
  219. package/dist/supabase-hook-DaK4Rirh.js +2 -0
  220. package/dist/{supabase-hook-RFLW2YPX.js → supabase-hook-VIpXUHKI.js} +5 -5
  221. package/dist/{supabase-schemas-CVhpyYB6.js → supabase-schemas-DA28GP4N.js} +1 -1
  222. package/dist/{supautils-C85NuESf.js → supautils-ym4X20ig.js} +2 -1
  223. package/dist/svelte/index.d.ts +3 -3
  224. package/dist/svelte/runtime.d.ts +2 -2
  225. package/dist/svelte/source.d.ts +3 -3
  226. package/dist/sveltekit/index.d.ts +3 -3
  227. package/dist/sveltekit/index.js +1 -1
  228. package/dist/{table-reads-Dso5UyeT.js → table-reads-4KzGXg9f.js} +1 -1
  229. package/dist/{table-reads-D0M_X-pj.js → table-reads-B5kunhny.js} +3 -3
  230. package/dist/{tables-DrrGtayG.js → tables-BwQvlpS4.js} +4 -4
  231. package/dist/tanstack-start/index.d.ts +3 -3
  232. package/dist/tanstack-start/index.js +1 -1
  233. package/dist/{tenant-check-D6fnfQBP.js → tenant-check-CsJkduIb.js} +3 -3
  234. package/dist/terminal/index.d.ts +2 -2
  235. package/dist/terminal/index.js +2 -2
  236. package/dist/testing/core.d.ts +1 -1
  237. package/dist/testing/core.js +1 -1
  238. package/dist/testing/fixtures/index.js +1753 -162
  239. package/dist/testing/index.d.ts +7 -7
  240. package/dist/testing/index.js +6 -6
  241. package/dist/testing/saas/index.d.ts +1 -1
  242. package/dist/testing/saas/index.js +2 -2
  243. package/dist/testing/saas/permissions.js +1 -1
  244. package/dist/trpc/index.d.ts +4 -4
  245. package/dist/trpc/index.js +2 -2
  246. package/dist/{types-DRMoZjJm.d.ts → types-B23A72BG.d.ts} +1 -1
  247. package/dist/{types-D417woMp.d.ts → types-BRaJxlqL.d.ts} +2 -2
  248. package/dist/{types-CBUYbPwl.d.ts → types-C8sDUhaF.d.ts} +1 -1
  249. package/dist/{types-dtDg4goh.d.ts → types-CM5GwxiJ.d.ts} +2 -2
  250. package/dist/{types-BzsplNgO.d.ts → types-iwSmOTcK.d.ts} +2 -2
  251. package/dist/unplugin/index.js +1 -1
  252. package/dist/{usage-DBaJfCZB.js → usage-BD_z4pba.js} +1 -1
  253. package/dist/{usage-Cv4WDRWv.js → usage-_9h9jQo8.js} +4 -4
  254. package/dist/usage-wphGxzPQ.js +1 -0
  255. package/dist/{verify-DT9WS_Gm.js → verify-cw6SFoQE.js} +9 -9
  256. package/dist/vue/index.d.ts +2 -2
  257. package/dist/{warm-BZ0ZwSmO.js → warm-XyQ-2nUR.js} +1 -1
  258. package/dist/watch-5WP3ZCcR.js +1 -0
  259. package/dist/{watch-14vng0pg.js → watch-BFDMb5N4.js} +1 -1
  260. package/dist/{watch-DuIAsqFR.js → watch-Cvc7eUPk.js} +2 -2
  261. package/dist/workflow/index.d.ts +1 -1
  262. package/dist/workflow/index.js +1 -1
  263. package/dist/workflow-sdk/index.d.ts +2 -2
  264. package/dist/{wrap-C36-eV-C.d.ts → wrap-B4Ge6LOd.d.ts} +1 -1
  265. package/package.json +1 -1
  266. package/schemas/supabase-manifest-v1.json +1 -1
  267. package/dist/bundle-size-BRFeBvuv.js +0 -1
  268. package/dist/catalog-sR0m6x2g.js +0 -1
  269. package/dist/collect-CIdE3FGC.js +0 -1
  270. package/dist/gen-vr1udb1p.js +0 -1
  271. package/dist/pull-IQPhpX4y.js +0 -1
  272. package/dist/run-CfvcMtPK.js +0 -1
  273. package/dist/supabase-hook-DZk7PV7Z.js +0 -2
  274. package/dist/usage-DOcCnIdW.js +0 -1
  275. package/dist/watch-Be7ja4dL.js +0 -1
@@ -1,12 +1,12 @@
1
1
  import { t as parseCatalog } from "../../parse-CUqZ_lLC.js";
2
- import { n as parseSupabaseManifest } from "../../manifest-CIWOmdlP.js";
2
+ import { n as parseSupabaseManifest } from "../../manifest-teSfgeqF.js";
3
3
  // src/testing/fixtures/better-supabase.catalog.json
4
4
  var better_supabase_catalog_default = {
5
5
  $schema: "https://permdock.com/schemas/catalog-v2.json",
6
6
  version: 2,
7
- generatedAt: "2026-11-06T23:09:19.776Z",
8
- generator: "permdock@0.25.1",
9
- fingerprint: "sha-256:iKNsQAMzVN_7mK67fGSmEGLcdPhrdxpPirx-2DOVIsg",
7
+ generatedAt: "2026-11-26T11:21:36.919Z",
8
+ generator: "permdock@0.33.0",
9
+ fingerprint: "sha-256:M593lHf0ftevbsfKu2CkUl3B4SoeyQsVA44CfveAd0w",
10
10
  resources: {
11
11
  "staff": {
12
12
  "id": "id",
@@ -78,7 +78,20 @@ var better_supabase_catalog_default = {
78
78
  "type": "string",
79
79
  "minLength": 3,
80
80
  "maxLength": 3
81
- }
81
+ },
82
+ "status": {
83
+ "type": "string",
84
+ "enum": [
85
+ "draft",
86
+ "sent",
87
+ "approved"
88
+ ]
89
+ },
90
+ "team_id": { "anyOf": [{
91
+ "type": "string",
92
+ "format": "uuid",
93
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
94
+ }, { "type": "null" }] }
82
95
  },
83
96
  "required": [
84
97
  "id",
@@ -86,7 +99,9 @@ var better_supabase_catalog_default = {
86
99
  "customer_id",
87
100
  "title",
88
101
  "amount_minor",
89
- "currency"
102
+ "currency",
103
+ "status",
104
+ "team_id"
90
105
  ],
91
106
  "additionalProperties": false
92
107
  },
@@ -99,6 +114,10 @@ var better_supabase_catalog_default = {
99
114
  "customer": {
100
115
  "field": "customer_id",
101
116
  "memberOf": "customer"
117
+ },
118
+ "team": {
119
+ "field": "team_id",
120
+ "memberOf": "team"
102
121
  }
103
122
  }
104
123
  },
@@ -111,9 +130,191 @@ var better_supabase_catalog_default = {
111
130
  "id": "id",
112
131
  "schema": null,
113
132
  "definedIn": "src/permissions.ts"
133
+ },
134
+ "members": {
135
+ "id": "id",
136
+ "schema": null,
137
+ "definedIn": "src/permissions.ts"
138
+ },
139
+ "organization": {
140
+ "id": "id",
141
+ "schema": null,
142
+ "definedIn": "src/permissions.ts"
143
+ },
144
+ "teams": {
145
+ "id": "id",
146
+ "schema": null,
147
+ "definedIn": "src/permissions.ts"
148
+ },
149
+ "settings": {
150
+ "id": "id",
151
+ "schema": null,
152
+ "definedIn": "src/permissions.ts"
153
+ },
154
+ "approvals": {
155
+ "id": "id",
156
+ "schema": null,
157
+ "definedIn": "src/permissions.ts"
158
+ },
159
+ "access_requests": {
160
+ "id": "id",
161
+ "schema": null,
162
+ "definedIn": "src/permissions.ts"
163
+ },
164
+ "impersonation": {
165
+ "id": "id",
166
+ "schema": null,
167
+ "definedIn": "src/permissions.ts"
168
+ },
169
+ "api_keys": {
170
+ "id": "id",
171
+ "schema": null,
172
+ "definedIn": "src/permissions.ts"
173
+ },
174
+ "service_accounts": {
175
+ "id": "id",
176
+ "schema": null,
177
+ "definedIn": "src/permissions.ts"
178
+ },
179
+ "usage": {
180
+ "id": "id",
181
+ "schema": null,
182
+ "definedIn": "src/permissions.ts"
183
+ },
184
+ "sso": {
185
+ "id": "id",
186
+ "schema": null,
187
+ "definedIn": "src/permissions.ts"
188
+ },
189
+ "relations": {
190
+ "id": "id",
191
+ "schema": null,
192
+ "definedIn": "src/permissions.ts"
193
+ },
194
+ "automations": {
195
+ "id": "id",
196
+ "schema": null,
197
+ "definedIn": "src/permissions.ts"
198
+ },
199
+ "billing": {
200
+ "id": "id",
201
+ "schema": null,
202
+ "definedIn": "src/permissions.ts"
114
203
  }
115
204
  },
116
205
  permissions: [
206
+ {
207
+ "key": "access_requests.create",
208
+ "scope": "access_requests:create",
209
+ "resource": "access_requests",
210
+ "action": "create",
211
+ "arity": "collection",
212
+ "meta": {},
213
+ "usages": [],
214
+ "rowConditions": false
215
+ },
216
+ {
217
+ "key": "access_requests.emergency",
218
+ "scope": "access_requests:emergency",
219
+ "resource": "access_requests",
220
+ "action": "emergency",
221
+ "arity": "collection",
222
+ "meta": {},
223
+ "usages": [],
224
+ "rowConditions": false
225
+ },
226
+ {
227
+ "key": "access_requests.manage",
228
+ "scope": "access_requests:manage",
229
+ "resource": "access_requests",
230
+ "action": "manage",
231
+ "arity": "collection",
232
+ "meta": {},
233
+ "usages": [],
234
+ "rowConditions": false
235
+ },
236
+ {
237
+ "key": "access_requests.read",
238
+ "scope": "access_requests:read",
239
+ "resource": "access_requests",
240
+ "action": "read",
241
+ "arity": "collection",
242
+ "meta": {},
243
+ "usages": [],
244
+ "rowConditions": false
245
+ },
246
+ {
247
+ "key": "access_requests.review",
248
+ "scope": "access_requests:review",
249
+ "resource": "access_requests",
250
+ "action": "review",
251
+ "arity": "collection",
252
+ "meta": {},
253
+ "usages": [],
254
+ "rowConditions": false
255
+ },
256
+ {
257
+ "key": "api_keys.manage",
258
+ "scope": "api_keys:manage",
259
+ "resource": "api_keys",
260
+ "action": "manage",
261
+ "arity": "collection",
262
+ "meta": {},
263
+ "usages": [{
264
+ "file": "src/app/[locale]/(app)/[orgSlug]/nav.tsx",
265
+ "line": 77,
266
+ "call": "tools"
267
+ }, {
268
+ "file": "src/features/developer/credential-actions.ts",
269
+ "line": 12,
270
+ "call": "protectAction"
271
+ }],
272
+ "rowConditions": false
273
+ },
274
+ {
275
+ "key": "api_keys.own",
276
+ "scope": "api_keys:own",
277
+ "resource": "api_keys",
278
+ "action": "own",
279
+ "arity": "collection",
280
+ "meta": {},
281
+ "usages": [],
282
+ "rowConditions": false
283
+ },
284
+ {
285
+ "key": "approvals.manage",
286
+ "scope": "approvals:manage",
287
+ "resource": "approvals",
288
+ "action": "manage",
289
+ "arity": "collection",
290
+ "meta": {},
291
+ "usages": [],
292
+ "rowConditions": false
293
+ },
294
+ {
295
+ "key": "approvals.read",
296
+ "scope": "approvals:read",
297
+ "resource": "approvals",
298
+ "action": "read",
299
+ "arity": "collection",
300
+ "meta": {},
301
+ "usages": [{
302
+ "file": "src/app/[locale]/(app)/[orgSlug]/nav.tsx",
303
+ "line": 53,
304
+ "call": "tools"
305
+ }],
306
+ "rowConditions": false
307
+ },
308
+ {
309
+ "key": "approvals.request",
310
+ "scope": "approvals:request",
311
+ "resource": "approvals",
312
+ "action": "request",
313
+ "arity": "collection",
314
+ "meta": {},
315
+ "usages": [],
316
+ "rowConditions": false
317
+ },
117
318
  {
118
319
  "key": "audit.read",
119
320
  "scope": "audit:read",
@@ -122,8 +323,12 @@ var better_supabase_catalog_default = {
122
323
  "arity": "collection",
123
324
  "meta": {},
124
325
  "usages": [{
326
+ "file": "src/app/[locale]/(app)/[orgSlug]/nav.tsx",
327
+ "line": 95,
328
+ "call": "tools"
329
+ }, {
125
330
  "file": "src/policy.ts",
126
- "line": 28,
331
+ "line": 68,
127
332
  "call": "reference"
128
333
  }],
129
334
  "rowConditions": false
@@ -136,205 +341,1378 @@ var better_supabase_catalog_default = {
136
341
  "arity": "collection",
137
342
  "meta": {},
138
343
  "usages": [{
139
- "file": "src/policy.ts",
140
- "line": 29,
141
- "call": "reference"
344
+ "file": "src/features/audit/audit-actions.ts",
345
+ "line": 14,
346
+ "call": "protectAction"
142
347
  }],
143
348
  "rowConditions": false
144
349
  },
145
350
  {
146
- "key": "quotes.list",
147
- "scope": "quotes:list",
148
- "resource": "quotes",
149
- "action": "list",
351
+ "key": "automations.manage",
352
+ "scope": "automations:manage",
353
+ "resource": "automations",
354
+ "action": "manage",
355
+ "arity": "collection",
356
+ "meta": {},
357
+ "usages": [],
358
+ "rowConditions": false
359
+ },
360
+ {
361
+ "key": "automations.publish",
362
+ "scope": "automations:publish",
363
+ "resource": "automations",
364
+ "action": "publish",
365
+ "arity": "collection",
366
+ "meta": {},
367
+ "usages": [{
368
+ "file": "src/features/automation/automation-actions.ts",
369
+ "line": 12,
370
+ "call": "protectAction"
371
+ }],
372
+ "rowConditions": false
373
+ },
374
+ {
375
+ "key": "automations.read",
376
+ "scope": "automations:read",
377
+ "resource": "automations",
378
+ "action": "read",
379
+ "arity": "collection",
380
+ "meta": {},
381
+ "usages": [{
382
+ "file": "src/app/[locale]/(app)/[orgSlug]/nav.tsx",
383
+ "line": 89,
384
+ "call": "tools"
385
+ }],
386
+ "rowConditions": false
387
+ },
388
+ {
389
+ "key": "automations.write",
390
+ "scope": "automations:write",
391
+ "resource": "automations",
392
+ "action": "write",
393
+ "arity": "collection",
394
+ "meta": {},
395
+ "usages": [],
396
+ "rowConditions": false
397
+ },
398
+ {
399
+ "key": "billing.read",
400
+ "scope": "billing:read",
401
+ "resource": "billing",
402
+ "action": "read",
150
403
  "arity": "collection",
151
404
  "meta": {},
152
405
  "usages": [
153
- {
154
- "file": "src/agent/tools.ts",
155
- "line": 86,
156
- "call": "tools"
157
- },
158
406
  {
159
407
  "file": "src/app/[locale]/(app)/[orgSlug]/nav.tsx",
160
- "line": 33,
408
+ "line": 119,
161
409
  "call": "tools"
162
410
  },
163
411
  {
164
- "file": "src/app/[locale]/(app)/[orgSlug]/quotes/page.tsx",
165
- "line": 19,
412
+ "file": "src/features/access/components/access-panel.tsx",
413
+ "line": 36,
166
414
  "call": "reference"
167
415
  },
168
416
  {
169
- "file": "src/app/[locale]/(portal)/portal/[orgSlug]/quotes/page.tsx",
170
- "line": 19,
417
+ "file": "src/features/billing/components/billing-gate.tsx",
418
+ "line": 13,
171
419
  "call": "reference"
172
420
  },
173
421
  {
174
- "file": "src/policy.ts",
175
- "line": 26,
422
+ "file": "src/features/billing/components/billing-gate.tsx",
423
+ "line": 14,
176
424
  "call": "reference"
177
425
  },
178
426
  {
179
427
  "file": "src/policy.ts",
180
- "line": 42,
181
- "call": "reference"
428
+ "line": 122,
429
+ "call": "allow"
182
430
  }
183
431
  ],
184
432
  "rowConditions": false
185
433
  },
186
434
  {
187
- "key": "quotes.read",
188
- "scope": "quotes:read",
189
- "resource": "quotes",
435
+ "key": "impersonation.read",
436
+ "scope": "impersonation:read",
437
+ "resource": "impersonation",
190
438
  "action": "read",
191
- "arity": "instance",
439
+ "arity": "collection",
192
440
  "meta": {},
193
- "usages": [
194
- {
195
- "file": "src/lib/share.ts",
196
- "line": 54,
197
- "call": "can"
198
- },
199
- {
200
- "file": "src/policy.ts",
201
- "line": 25,
202
- "call": "reference"
203
- },
204
- {
205
- "file": "src/policy.ts",
206
- "line": 42,
207
- "call": "reference"
208
- },
209
- {
210
- "file": "src/policy.ts",
211
- "line": 46,
212
- "call": "allow"
213
- }
214
- ],
441
+ "usages": [],
215
442
  "rowConditions": false
216
443
  },
217
444
  {
218
- "key": "quotes.update",
219
- "scope": "quotes:update",
220
- "resource": "quotes",
221
- "action": "update",
222
- "arity": "instance",
445
+ "key": "impersonation.revoke",
446
+ "scope": "impersonation:revoke",
447
+ "resource": "impersonation",
448
+ "action": "revoke",
449
+ "arity": "collection",
450
+ "meta": {},
451
+ "usages": [],
452
+ "rowConditions": false
453
+ },
454
+ {
455
+ "key": "impersonation.start",
456
+ "scope": "impersonation:start",
457
+ "resource": "impersonation",
458
+ "action": "start",
459
+ "arity": "collection",
223
460
  "meta": {},
224
461
  "usages": [{
225
- "file": "src/agent/tools.ts",
226
- "line": 88,
462
+ "file": "src/app/[locale]/(app)/[orgSlug]/nav.tsx",
463
+ "line": 83,
227
464
  "call": "tools"
228
465
  }, {
229
- "file": "src/policy.ts",
230
- "line": 27,
231
- "call": "reference"
466
+ "file": "src/features/support/support-actions.ts",
467
+ "line": 32,
468
+ "call": "protectAction"
232
469
  }],
233
470
  "rowConditions": false
234
471
  },
235
472
  {
236
- "key": "roles.manage",
237
- "scope": "roles:manage",
238
- "resource": "roles",
239
- "action": "manage",
473
+ "key": "members.invite",
474
+ "scope": "members:invite",
475
+ "resource": "members",
476
+ "action": "invite",
240
477
  "arity": "collection",
241
478
  "meta": {},
242
479
  "usages": [{
480
+ "file": "src/features/member/member-role.ts",
481
+ "line": 57,
482
+ "call": "protectAction"
483
+ }, {
243
484
  "file": "src/policy.ts",
244
- "line": 30,
485
+ "line": 63,
245
486
  "call": "reference"
246
487
  }],
247
488
  "rowConditions": false
248
489
  },
249
490
  {
250
- "key": "staff.list",
251
- "scope": "staff:list",
252
- "resource": "staff",
253
- "action": "list",
491
+ "key": "members.read",
492
+ "scope": "members:read",
493
+ "resource": "members",
494
+ "action": "read",
254
495
  "arity": "collection",
255
496
  "meta": {},
256
497
  "usages": [
257
498
  {
258
499
  "file": "src/app/[locale]/(app)/[orgSlug]/nav.tsx",
259
- "line": 27,
500
+ "line": 59,
260
501
  "call": "tools"
261
502
  },
262
503
  {
263
- "file": "src/app/[locale]/(app)/[orgSlug]/staff/page.tsx",
264
- "line": 19,
265
- "call": "reference"
266
- },
267
- {
268
- "file": "src/app/api/staff/route.ts",
269
- "line": 15,
504
+ "file": "src/app/[locale]/(app)/[orgSlug]/nav.tsx",
505
+ "line": 101,
270
506
  "call": "tools"
271
507
  },
272
508
  {
273
509
  "file": "src/policy.ts",
274
- "line": 24,
275
- "call": "reference"
276
- },
277
- {
278
- "file": "src/policy.ts",
279
- "line": 37,
510
+ "line": 62,
280
511
  "call": "reference"
281
512
  }
282
513
  ],
283
514
  "rowConditions": false
284
515
  },
285
516
  {
286
- "key": "staff.read",
287
- "scope": "staff:read",
288
- "resource": "staff",
289
- "action": "read",
290
- "arity": "instance",
291
- "meta": {},
292
- "usages": [{
293
- "file": "src/policy.ts",
294
- "line": 23,
295
- "call": "reference"
296
- }, {
297
- "file": "src/policy.ts",
298
- "line": 37,
299
- "call": "reference"
300
- }],
301
- "rowConditions": false
302
- }
303
- ],
304
- scopes: [{
305
- "name": "organization",
306
- "key": "organization_id"
307
- }, {
308
- "name": "customer",
309
- "key": "customer_id",
310
- "within": "organization"
311
- }],
312
- roles: [
517
+ "key": "members.remove",
518
+ "scope": "members:remove",
519
+ "resource": "members",
520
+ "action": "remove",
521
+ "arity": "collection",
522
+ "meta": {},
523
+ "usages": [{
524
+ "file": "src/features/access-review/review-actions.ts",
525
+ "line": 13,
526
+ "call": "protectAction"
527
+ }, {
528
+ "file": "src/features/member/member-role.ts",
529
+ "line": 43,
530
+ "call": "protectAction"
531
+ }],
532
+ "rowConditions": false
533
+ },
534
+ {
535
+ "key": "members.update_role",
536
+ "scope": "members:update_role",
537
+ "resource": "members",
538
+ "action": "update_role",
539
+ "arity": "collection",
540
+ "meta": {},
541
+ "usages": [{
542
+ "file": "src/features/member/member-role.ts",
543
+ "line": 35,
544
+ "call": "protectAction"
545
+ }],
546
+ "rowConditions": false
547
+ },
548
+ {
549
+ "key": "organization.delete",
550
+ "scope": "organization:delete",
551
+ "resource": "organization",
552
+ "action": "delete",
553
+ "arity": "collection",
554
+ "meta": {},
555
+ "usages": [],
556
+ "rowConditions": false
557
+ },
558
+ {
559
+ "key": "organization.transfer_ownership",
560
+ "scope": "organization:transfer_ownership",
561
+ "resource": "organization",
562
+ "action": "transfer_ownership",
563
+ "arity": "collection",
564
+ "meta": {},
565
+ "usages": [{
566
+ "file": "src/features/member/member-actions.ts",
567
+ "line": 18,
568
+ "call": "protectAction"
569
+ }],
570
+ "rowConditions": false
571
+ },
572
+ {
573
+ "key": "organization.update",
574
+ "scope": "organization:update",
575
+ "resource": "organization",
576
+ "action": "update",
577
+ "arity": "collection",
578
+ "meta": {},
579
+ "usages": [{
580
+ "file": "src/app/[locale]/(app)/[orgSlug]/nav.tsx",
581
+ "line": 107,
582
+ "call": "tools"
583
+ }],
584
+ "rowConditions": false
585
+ },
586
+ {
587
+ "key": "quotes.approve",
588
+ "scope": "quotes:approve",
589
+ "resource": "quotes",
590
+ "action": "approve",
591
+ "arity": "instance",
592
+ "meta": {},
593
+ "usages": [
594
+ {
595
+ "file": "src/features/quote/components/quote-actions.tsx",
596
+ "line": 77,
597
+ "call": "reference"
598
+ },
599
+ {
600
+ "file": "src/features/quote/quote-actions.ts",
601
+ "line": 76,
602
+ "call": "protectAction"
603
+ },
604
+ {
605
+ "file": "src/policy.ts",
606
+ "line": 44,
607
+ "call": "allow"
608
+ }
609
+ ],
610
+ "rowConditions": true,
611
+ "approvals": ["human"]
612
+ },
613
+ {
614
+ "key": "quotes.create",
615
+ "scope": "quotes:create",
616
+ "resource": "quotes",
617
+ "action": "create",
618
+ "arity": "collection",
619
+ "meta": {},
620
+ "usages": [
621
+ {
622
+ "file": "src/features/quote/quote-actions.ts",
623
+ "line": 29,
624
+ "call": "protectAction"
625
+ },
626
+ {
627
+ "file": "src/policy.ts",
628
+ "line": 61,
629
+ "call": "reference"
630
+ },
631
+ {
632
+ "file": "src/policy.ts",
633
+ "line": 123,
634
+ "call": "allow"
635
+ }
636
+ ],
637
+ "rowConditions": false
638
+ },
639
+ {
640
+ "key": "quotes.delete",
641
+ "scope": "quotes:delete",
642
+ "resource": "quotes",
643
+ "action": "delete",
644
+ "arity": "instance",
645
+ "meta": {},
646
+ "usages": [
647
+ {
648
+ "file": "src/features/quote/components/quote-actions.tsx",
649
+ "line": 100,
650
+ "call": "reference"
651
+ },
652
+ {
653
+ "file": "src/features/quote/quote-actions.ts",
654
+ "line": 88,
655
+ "call": "protectAction"
656
+ },
657
+ {
658
+ "file": "src/policy.ts",
659
+ "line": 49,
660
+ "call": "allow"
661
+ }
662
+ ],
663
+ "rowConditions": true
664
+ },
665
+ {
666
+ "key": "quotes.list",
667
+ "scope": "quotes:list",
668
+ "resource": "quotes",
669
+ "action": "list",
670
+ "arity": "collection",
671
+ "meta": {},
672
+ "usages": [
673
+ {
674
+ "file": "src/agent/tools.ts",
675
+ "line": 86,
676
+ "call": "tools"
677
+ },
678
+ {
679
+ "file": "src/app/[locale]/(app)/[orgSlug]/access/page.tsx",
680
+ "line": 23,
681
+ "call": "reference"
682
+ },
683
+ {
684
+ "file": "src/app/[locale]/(app)/[orgSlug]/nav.tsx",
685
+ "line": 47,
686
+ "call": "tools"
687
+ },
688
+ {
689
+ "file": "src/app/[locale]/(app)/[orgSlug]/quotes/page.tsx",
690
+ "line": 30,
691
+ "call": "reference"
692
+ },
693
+ {
694
+ "file": "src/app/[locale]/(portal)/portal/[orgSlug]/quotes/page.tsx",
695
+ "line": 30,
696
+ "call": "reference"
697
+ },
698
+ {
699
+ "file": "src/app/api/mcp/route.ts",
700
+ "line": 29,
701
+ "call": "tools"
702
+ },
703
+ {
704
+ "file": "src/app/api/v1/quotes/route.ts",
705
+ "line": 15,
706
+ "call": "reference"
707
+ },
708
+ {
709
+ "file": "src/features/access/access-cache.ts",
710
+ "line": 16,
711
+ "call": "tools"
712
+ },
713
+ {
714
+ "file": "src/features/access/components/access-panel.tsx",
715
+ "line": 26,
716
+ "call": "usePermission"
717
+ },
718
+ {
719
+ "file": "src/features/access/components/access-panel.tsx",
720
+ "line": 28,
721
+ "call": "reference"
722
+ },
723
+ {
724
+ "file": "src/features/quote/quote-actions.ts",
725
+ "line": 21,
726
+ "call": "protectAction"
727
+ },
728
+ {
729
+ "file": "src/policy.ts",
730
+ "line": 24,
731
+ "call": "reference"
732
+ },
733
+ {
734
+ "file": "src/policy.ts",
735
+ "line": 59,
736
+ "call": "reference"
737
+ },
738
+ {
739
+ "file": "src/policy.ts",
740
+ "line": 81,
741
+ "call": "reference"
742
+ },
743
+ {
744
+ "file": "src/policy.ts",
745
+ "line": 103,
746
+ "call": "allow"
747
+ },
748
+ {
749
+ "file": "src/proxy.ts",
750
+ "line": 65,
751
+ "call": "reference"
752
+ }
753
+ ],
754
+ "rowConditions": true
755
+ },
756
+ {
757
+ "key": "quotes.read",
758
+ "scope": "quotes:read",
759
+ "resource": "quotes",
760
+ "action": "read",
761
+ "arity": "instance",
762
+ "meta": {},
763
+ "usages": [
764
+ {
765
+ "file": "src/app/api/v1/quotes/route.ts",
766
+ "line": 15,
767
+ "call": "reference"
768
+ },
769
+ {
770
+ "file": "src/features/access/access-cache.ts",
771
+ "line": 11,
772
+ "call": "getPermission"
773
+ },
774
+ {
775
+ "file": "src/features/access/components/access-panel.tsx",
776
+ "line": 27,
777
+ "call": "reference"
778
+ },
779
+ {
780
+ "file": "src/features/access/components/access-panel.tsx",
781
+ "line": 29,
782
+ "call": "reference"
783
+ },
784
+ {
785
+ "file": "src/features/automation/automation-actions.ts",
786
+ "line": 22,
787
+ "call": "tools"
788
+ },
789
+ {
790
+ "file": "src/features/developer/credential-actions.ts",
791
+ "line": 22,
792
+ "call": "reference"
793
+ },
794
+ {
795
+ "file": "src/features/developer/credential-actions.ts",
796
+ "line": 40,
797
+ "call": "reference"
798
+ },
799
+ {
800
+ "file": "src/features/quote/components/quote-detail.tsx",
801
+ "line": 36,
802
+ "call": "reference"
803
+ },
804
+ {
805
+ "file": "src/lib/share.ts",
806
+ "line": 54,
807
+ "call": "can"
808
+ },
809
+ {
810
+ "file": "src/policy.ts",
811
+ "line": 23,
812
+ "call": "reference"
813
+ },
814
+ {
815
+ "file": "src/policy.ts",
816
+ "line": 58,
817
+ "call": "reference"
818
+ },
819
+ {
820
+ "file": "src/policy.ts",
821
+ "line": 81,
822
+ "call": "reference"
823
+ },
824
+ {
825
+ "file": "src/policy.ts",
826
+ "line": 85,
827
+ "call": "allow"
828
+ }
829
+ ],
830
+ "rowConditions": false
831
+ },
832
+ {
833
+ "key": "quotes.send",
834
+ "scope": "quotes:send",
835
+ "resource": "quotes",
836
+ "action": "send",
837
+ "arity": "instance",
838
+ "meta": {},
839
+ "usages": [
840
+ {
841
+ "file": "src/features/quote/components/quote-actions.tsx",
842
+ "line": 57,
843
+ "call": "reference"
844
+ },
845
+ {
846
+ "file": "src/features/quote/quote-actions.ts",
847
+ "line": 64,
848
+ "call": "protectAction"
849
+ },
850
+ {
851
+ "file": "src/policy.ts",
852
+ "line": 43,
853
+ "call": "allow"
854
+ }
855
+ ],
856
+ "rowConditions": true
857
+ },
858
+ {
859
+ "key": "quotes.update",
860
+ "scope": "quotes:update",
861
+ "resource": "quotes",
862
+ "action": "update",
863
+ "arity": "instance",
864
+ "meta": {},
865
+ "usages": [
866
+ {
867
+ "file": "src/agent/tools.ts",
868
+ "line": 88,
869
+ "call": "tools"
870
+ },
871
+ {
872
+ "file": "src/features/quote/components/quote-actions.tsx",
873
+ "line": 34,
874
+ "call": "reference"
875
+ },
876
+ {
877
+ "file": "src/features/quote/quote-actions.ts",
878
+ "line": 43,
879
+ "call": "protectAction"
880
+ },
881
+ {
882
+ "file": "src/features/quote/share-actions.ts",
883
+ "line": 18,
884
+ "call": "protectAction"
885
+ },
886
+ {
887
+ "file": "src/features/quote/share-actions.ts",
888
+ "line": 30,
889
+ "call": "protectAction"
890
+ },
891
+ {
892
+ "file": "src/policy.ts",
893
+ "line": 25,
894
+ "call": "reference"
895
+ },
896
+ {
897
+ "file": "src/policy.ts",
898
+ "line": 60,
899
+ "call": "reference"
900
+ }
901
+ ],
902
+ "rowConditions": false
903
+ },
904
+ {
905
+ "key": "relations.manage",
906
+ "scope": "relations:manage",
907
+ "resource": "relations",
908
+ "action": "manage",
909
+ "arity": "collection",
910
+ "meta": {},
911
+ "usages": [],
912
+ "rowConditions": false
913
+ },
914
+ {
915
+ "key": "relations.read",
916
+ "scope": "relations:read",
917
+ "resource": "relations",
918
+ "action": "read",
919
+ "arity": "collection",
920
+ "meta": {},
921
+ "usages": [],
922
+ "rowConditions": false
923
+ },
924
+ {
925
+ "key": "roles.manage",
926
+ "scope": "roles:manage",
927
+ "resource": "roles",
928
+ "action": "manage",
929
+ "arity": "collection",
930
+ "meta": {},
931
+ "usages": [{
932
+ "file": "src/app/[locale]/(app)/[orgSlug]/nav.tsx",
933
+ "line": 65,
934
+ "call": "tools"
935
+ }, {
936
+ "file": "src/features/role/role-actions.ts",
937
+ "line": 11,
938
+ "call": "protectAction"
939
+ }],
940
+ "rowConditions": false
941
+ },
942
+ {
943
+ "key": "service_accounts.manage",
944
+ "scope": "service_accounts:manage",
945
+ "resource": "service_accounts",
946
+ "action": "manage",
947
+ "arity": "collection",
948
+ "meta": {},
949
+ "usages": [{
950
+ "file": "src/features/developer/credential-actions.ts",
951
+ "line": 30,
952
+ "call": "protectAction"
953
+ }],
954
+ "rowConditions": false
955
+ },
956
+ {
957
+ "key": "service_accounts.read",
958
+ "scope": "service_accounts:read",
959
+ "resource": "service_accounts",
960
+ "action": "read",
961
+ "arity": "collection",
962
+ "meta": {},
963
+ "usages": [],
964
+ "rowConditions": false
965
+ },
966
+ {
967
+ "key": "settings.manage",
968
+ "scope": "settings:manage",
969
+ "resource": "settings",
970
+ "action": "manage",
971
+ "arity": "collection",
972
+ "meta": {},
973
+ "usages": [],
974
+ "rowConditions": false
975
+ },
976
+ {
977
+ "key": "settings.read",
978
+ "scope": "settings:read",
979
+ "resource": "settings",
980
+ "action": "read",
981
+ "arity": "collection",
982
+ "meta": {},
983
+ "usages": [
984
+ {
985
+ "file": "src/app/[locale]/(app)/[orgSlug]/nav.tsx",
986
+ "line": 113,
987
+ "call": "tools"
988
+ },
989
+ {
990
+ "file": "src/app/[locale]/(app)/[orgSlug]/settings/page.tsx",
991
+ "line": 26,
992
+ "call": "requirePermission"
993
+ },
994
+ {
995
+ "file": "src/policy.ts",
996
+ "line": 65,
997
+ "call": "reference"
998
+ }
999
+ ],
1000
+ "rowConditions": false
1001
+ },
1002
+ {
1003
+ "key": "settings.update",
1004
+ "scope": "settings:update",
1005
+ "resource": "settings",
1006
+ "action": "update",
1007
+ "arity": "collection",
1008
+ "meta": {},
1009
+ "usages": [{
1010
+ "file": "src/policy.ts",
1011
+ "line": 66,
1012
+ "call": "reference"
1013
+ }],
1014
+ "rowConditions": false
1015
+ },
1016
+ {
1017
+ "key": "sso.manage",
1018
+ "scope": "sso:manage",
1019
+ "resource": "sso",
1020
+ "action": "manage",
1021
+ "arity": "collection",
1022
+ "meta": {},
1023
+ "usages": [],
1024
+ "rowConditions": false
1025
+ },
1026
+ {
1027
+ "key": "staff.list",
1028
+ "scope": "staff:list",
1029
+ "resource": "staff",
1030
+ "action": "list",
1031
+ "arity": "collection",
1032
+ "meta": {},
1033
+ "usages": [
1034
+ {
1035
+ "file": "src/app/[locale]/(app)/[orgSlug]/nav.tsx",
1036
+ "line": 41,
1037
+ "call": "tools"
1038
+ },
1039
+ {
1040
+ "file": "src/app/[locale]/(app)/[orgSlug]/staff/page.tsx",
1041
+ "line": 30,
1042
+ "call": "reference"
1043
+ },
1044
+ {
1045
+ "file": "src/app/api/staff/route.ts",
1046
+ "line": 15,
1047
+ "call": "tools"
1048
+ },
1049
+ {
1050
+ "file": "src/policy.ts",
1051
+ "line": 75,
1052
+ "call": "reference"
1053
+ }
1054
+ ],
1055
+ "rowConditions": false
1056
+ },
1057
+ {
1058
+ "key": "staff.read",
1059
+ "scope": "staff:read",
1060
+ "resource": "staff",
1061
+ "action": "read",
1062
+ "arity": "instance",
1063
+ "meta": {},
1064
+ "usages": [{
1065
+ "file": "src/policy.ts",
1066
+ "line": 75,
1067
+ "call": "reference"
1068
+ }],
1069
+ "rowConditions": false
1070
+ },
1071
+ {
1072
+ "key": "teams.manage",
1073
+ "scope": "teams:manage",
1074
+ "resource": "teams",
1075
+ "action": "manage",
1076
+ "arity": "collection",
1077
+ "meta": {},
1078
+ "usages": [],
1079
+ "rowConditions": false
1080
+ },
1081
+ {
1082
+ "key": "teams.read",
1083
+ "scope": "teams:read",
1084
+ "resource": "teams",
1085
+ "action": "read",
1086
+ "arity": "collection",
1087
+ "meta": {},
1088
+ "usages": [{
1089
+ "file": "src/app/[locale]/(app)/[orgSlug]/nav.tsx",
1090
+ "line": 71,
1091
+ "call": "tools"
1092
+ }, {
1093
+ "file": "src/policy.ts",
1094
+ "line": 78,
1095
+ "call": "allow"
1096
+ }],
1097
+ "rowConditions": false
1098
+ },
1099
+ {
1100
+ "key": "usage.read",
1101
+ "scope": "usage:read",
1102
+ "resource": "usage",
1103
+ "action": "read",
1104
+ "arity": "collection",
1105
+ "meta": {},
1106
+ "usages": [],
1107
+ "rowConditions": false
1108
+ },
1109
+ {
1110
+ "key": "usage.record",
1111
+ "scope": "usage:record",
1112
+ "resource": "usage",
1113
+ "action": "record",
1114
+ "arity": "collection",
1115
+ "meta": {},
1116
+ "usages": [],
1117
+ "rowConditions": false
1118
+ }
1119
+ ],
1120
+ scopes: [
1121
+ {
1122
+ "name": "organization",
1123
+ "key": "organization_id"
1124
+ },
1125
+ {
1126
+ "name": "team",
1127
+ "key": "team_id",
1128
+ "within": "organization"
1129
+ },
1130
+ {
1131
+ "name": "customer",
1132
+ "key": "customer_id",
1133
+ "within": "organization"
1134
+ }
1135
+ ],
1136
+ roles: [
1137
+ {
1138
+ "key": "admin",
1139
+ "on": "organization",
1140
+ "assignable": true
1141
+ },
1142
+ {
1143
+ "key": "contact",
1144
+ "on": "customer",
1145
+ "assignable": false
1146
+ },
1147
+ {
1148
+ "key": "guest",
1149
+ "on": "resource",
1150
+ "assignable": true
1151
+ },
1152
+ {
1153
+ "key": "lead",
1154
+ "on": "team",
1155
+ "assignable": true
1156
+ },
1157
+ {
1158
+ "key": "member",
1159
+ "on": "organization",
1160
+ "assignable": true
1161
+ },
1162
+ {
1163
+ "key": "owner",
1164
+ "on": "organization",
1165
+ "assignable": true,
1166
+ "min": 1
1167
+ }
1168
+ ],
1169
+ grants: [
1170
+ {
1171
+ "permission": "access_requests.create",
1172
+ "effect": "allow",
1173
+ "role": "owner",
1174
+ "to": {
1175
+ "kind": "role",
1176
+ "role": "owner",
1177
+ "scope": "organization"
1178
+ },
1179
+ "scope": "organization"
1180
+ },
1181
+ {
1182
+ "permission": "access_requests.emergency",
1183
+ "effect": "allow",
1184
+ "role": "owner",
1185
+ "to": {
1186
+ "kind": "role",
1187
+ "role": "owner",
1188
+ "scope": "organization"
1189
+ },
1190
+ "scope": "organization"
1191
+ },
1192
+ {
1193
+ "permission": "access_requests.manage",
1194
+ "effect": "allow",
1195
+ "role": "owner",
1196
+ "to": {
1197
+ "kind": "role",
1198
+ "role": "owner",
1199
+ "scope": "organization"
1200
+ },
1201
+ "scope": "organization"
1202
+ },
1203
+ {
1204
+ "permission": "access_requests.read",
1205
+ "effect": "allow",
1206
+ "role": "owner",
1207
+ "to": {
1208
+ "kind": "role",
1209
+ "role": "owner",
1210
+ "scope": "organization"
1211
+ },
1212
+ "scope": "organization"
1213
+ },
1214
+ {
1215
+ "permission": "access_requests.review",
1216
+ "effect": "allow",
1217
+ "role": "owner",
1218
+ "to": {
1219
+ "kind": "role",
1220
+ "role": "owner",
1221
+ "scope": "organization"
1222
+ },
1223
+ "scope": "organization"
1224
+ },
1225
+ {
1226
+ "permission": "api_keys.manage",
1227
+ "effect": "allow",
1228
+ "role": "owner",
1229
+ "to": {
1230
+ "kind": "role",
1231
+ "role": "owner",
1232
+ "scope": "organization"
1233
+ },
1234
+ "scope": "organization"
1235
+ },
1236
+ {
1237
+ "permission": "api_keys.own",
1238
+ "effect": "allow",
1239
+ "role": "owner",
1240
+ "to": {
1241
+ "kind": "role",
1242
+ "role": "owner",
1243
+ "scope": "organization"
1244
+ },
1245
+ "scope": "organization"
1246
+ },
1247
+ {
1248
+ "permission": "approvals.manage",
1249
+ "effect": "allow",
1250
+ "role": "admin",
1251
+ "to": {
1252
+ "kind": "role",
1253
+ "role": "admin",
1254
+ "scope": "organization"
1255
+ },
1256
+ "scope": "organization"
1257
+ },
1258
+ {
1259
+ "permission": "approvals.manage",
1260
+ "effect": "allow",
1261
+ "role": "owner",
1262
+ "to": {
1263
+ "kind": "role",
1264
+ "role": "owner",
1265
+ "scope": "organization"
1266
+ },
1267
+ "scope": "organization"
1268
+ },
1269
+ {
1270
+ "permission": "approvals.read",
1271
+ "effect": "allow",
1272
+ "role": "admin",
1273
+ "to": {
1274
+ "kind": "role",
1275
+ "role": "admin",
1276
+ "scope": "organization"
1277
+ },
1278
+ "scope": "organization"
1279
+ },
1280
+ {
1281
+ "permission": "approvals.read",
1282
+ "effect": "allow",
1283
+ "role": "owner",
1284
+ "to": {
1285
+ "kind": "role",
1286
+ "role": "owner",
1287
+ "scope": "organization"
1288
+ },
1289
+ "scope": "organization"
1290
+ },
1291
+ {
1292
+ "permission": "approvals.request",
1293
+ "effect": "allow",
1294
+ "role": "admin",
1295
+ "to": {
1296
+ "kind": "role",
1297
+ "role": "admin",
1298
+ "scope": "organization"
1299
+ },
1300
+ "scope": "organization"
1301
+ },
1302
+ {
1303
+ "permission": "approvals.request",
1304
+ "effect": "allow",
1305
+ "role": "owner",
1306
+ "to": {
1307
+ "kind": "role",
1308
+ "role": "owner",
1309
+ "scope": "organization"
1310
+ },
1311
+ "scope": "organization"
1312
+ },
1313
+ {
1314
+ "permission": "audit.read",
1315
+ "effect": "allow",
1316
+ "role": "admin",
1317
+ "to": {
1318
+ "kind": "role",
1319
+ "role": "admin",
1320
+ "scope": "organization"
1321
+ },
1322
+ "scope": "organization"
1323
+ },
1324
+ {
1325
+ "permission": "audit.read",
1326
+ "effect": "allow",
1327
+ "role": "owner",
1328
+ "to": {
1329
+ "kind": "role",
1330
+ "role": "owner",
1331
+ "scope": "organization"
1332
+ },
1333
+ "scope": "organization"
1334
+ },
1335
+ {
1336
+ "permission": "audit.revert",
1337
+ "effect": "allow",
1338
+ "role": "owner",
1339
+ "to": {
1340
+ "kind": "role",
1341
+ "role": "owner",
1342
+ "scope": "organization"
1343
+ },
1344
+ "scope": "organization"
1345
+ },
1346
+ {
1347
+ "permission": "automations.manage",
1348
+ "effect": "allow",
1349
+ "role": "owner",
1350
+ "to": {
1351
+ "kind": "role",
1352
+ "role": "owner",
1353
+ "scope": "organization"
1354
+ },
1355
+ "scope": "organization"
1356
+ },
1357
+ {
1358
+ "permission": "automations.publish",
1359
+ "effect": "allow",
1360
+ "role": "owner",
1361
+ "to": {
1362
+ "kind": "role",
1363
+ "role": "owner",
1364
+ "scope": "organization"
1365
+ },
1366
+ "scope": "organization"
1367
+ },
1368
+ {
1369
+ "permission": "automations.read",
1370
+ "effect": "allow",
1371
+ "role": "owner",
1372
+ "to": {
1373
+ "kind": "role",
1374
+ "role": "owner",
1375
+ "scope": "organization"
1376
+ },
1377
+ "scope": "organization"
1378
+ },
1379
+ {
1380
+ "permission": "automations.write",
1381
+ "effect": "allow",
1382
+ "role": "owner",
1383
+ "to": {
1384
+ "kind": "role",
1385
+ "role": "owner",
1386
+ "scope": "organization"
1387
+ },
1388
+ "scope": "organization"
1389
+ },
1390
+ {
1391
+ "permission": "billing.read",
1392
+ "effect": "allow",
1393
+ "role": "owner",
1394
+ "to": {
1395
+ "kind": "role",
1396
+ "role": "owner",
1397
+ "scope": "organization"
1398
+ },
1399
+ "scope": "organization"
1400
+ },
1401
+ {
1402
+ "permission": "impersonation.read",
1403
+ "effect": "allow",
1404
+ "role": "owner",
1405
+ "to": {
1406
+ "kind": "role",
1407
+ "role": "owner",
1408
+ "scope": "organization"
1409
+ },
1410
+ "scope": "organization"
1411
+ },
1412
+ {
1413
+ "permission": "impersonation.revoke",
1414
+ "effect": "allow",
1415
+ "role": "owner",
1416
+ "to": {
1417
+ "kind": "role",
1418
+ "role": "owner",
1419
+ "scope": "organization"
1420
+ },
1421
+ "scope": "organization"
1422
+ },
1423
+ {
1424
+ "permission": "impersonation.start",
1425
+ "effect": "allow",
1426
+ "role": "owner",
1427
+ "to": {
1428
+ "kind": "role",
1429
+ "role": "owner",
1430
+ "scope": "organization"
1431
+ },
1432
+ "scope": "organization"
1433
+ },
1434
+ {
1435
+ "permission": "members.invite",
1436
+ "effect": "allow",
1437
+ "role": "admin",
1438
+ "to": {
1439
+ "kind": "role",
1440
+ "role": "admin",
1441
+ "scope": "organization"
1442
+ },
1443
+ "scope": "organization"
1444
+ },
1445
+ {
1446
+ "permission": "members.invite",
1447
+ "effect": "allow",
1448
+ "role": "owner",
1449
+ "to": {
1450
+ "kind": "role",
1451
+ "role": "owner",
1452
+ "scope": "organization"
1453
+ },
1454
+ "scope": "organization"
1455
+ },
1456
+ {
1457
+ "permission": "members.read",
1458
+ "effect": "allow",
1459
+ "role": "admin",
1460
+ "to": {
1461
+ "kind": "role",
1462
+ "role": "admin",
1463
+ "scope": "organization"
1464
+ },
1465
+ "scope": "organization"
1466
+ },
1467
+ {
1468
+ "permission": "members.read",
1469
+ "effect": "allow",
1470
+ "role": "owner",
1471
+ "to": {
1472
+ "kind": "role",
1473
+ "role": "owner",
1474
+ "scope": "organization"
1475
+ },
1476
+ "scope": "organization"
1477
+ },
1478
+ {
1479
+ "permission": "members.remove",
1480
+ "effect": "allow",
1481
+ "role": "owner",
1482
+ "to": {
1483
+ "kind": "role",
1484
+ "role": "owner",
1485
+ "scope": "organization"
1486
+ },
1487
+ "scope": "organization"
1488
+ },
1489
+ {
1490
+ "permission": "members.update_role",
1491
+ "effect": "allow",
1492
+ "role": "owner",
1493
+ "to": {
1494
+ "kind": "role",
1495
+ "role": "owner",
1496
+ "scope": "organization"
1497
+ },
1498
+ "scope": "organization"
1499
+ },
1500
+ {
1501
+ "permission": "organization.delete",
1502
+ "effect": "allow",
1503
+ "role": "owner",
1504
+ "to": {
1505
+ "kind": "role",
1506
+ "role": "owner",
1507
+ "scope": "organization"
1508
+ },
1509
+ "scope": "organization"
1510
+ },
1511
+ {
1512
+ "permission": "organization.transfer_ownership",
1513
+ "effect": "allow",
1514
+ "role": "owner",
1515
+ "to": {
1516
+ "kind": "role",
1517
+ "role": "owner",
1518
+ "scope": "organization"
1519
+ },
1520
+ "scope": "organization"
1521
+ },
1522
+ {
1523
+ "permission": "organization.update",
1524
+ "effect": "allow",
1525
+ "role": "owner",
1526
+ "to": {
1527
+ "kind": "role",
1528
+ "role": "owner",
1529
+ "scope": "organization"
1530
+ },
1531
+ "scope": "organization"
1532
+ },
1533
+ {
1534
+ "permission": "quotes.approve",
1535
+ "effect": "allow",
1536
+ "role": "owner",
1537
+ "to": {
1538
+ "kind": "role",
1539
+ "role": "owner",
1540
+ "scope": "organization"
1541
+ },
1542
+ "scope": "organization",
1543
+ "where": {
1544
+ "op": "eq",
1545
+ "field": "status",
1546
+ "value": "sent"
1547
+ },
1548
+ "approval": "human"
1549
+ },
1550
+ {
1551
+ "permission": "quotes.create",
1552
+ "effect": "allow",
1553
+ "role": "admin",
1554
+ "to": {
1555
+ "kind": "role",
1556
+ "role": "admin",
1557
+ "scope": "organization"
1558
+ },
1559
+ "scope": "organization"
1560
+ },
1561
+ {
1562
+ "permission": "quotes.delete",
1563
+ "effect": "allow",
1564
+ "role": "owner",
1565
+ "to": {
1566
+ "kind": "role",
1567
+ "role": "owner",
1568
+ "scope": "organization"
1569
+ },
1570
+ "scope": "organization",
1571
+ "where": {
1572
+ "op": "eq",
1573
+ "field": "status",
1574
+ "value": "draft"
1575
+ }
1576
+ },
1577
+ {
1578
+ "permission": "quotes.list",
1579
+ "effect": "allow",
1580
+ "role": "admin",
1581
+ "to": {
1582
+ "kind": "role",
1583
+ "role": "admin",
1584
+ "scope": "organization"
1585
+ },
1586
+ "scope": "organization"
1587
+ },
1588
+ {
1589
+ "permission": "quotes.list",
1590
+ "effect": "allow",
1591
+ "role": "contact",
1592
+ "to": {
1593
+ "kind": "role",
1594
+ "role": "contact",
1595
+ "scope": "customer"
1596
+ },
1597
+ "scope": "customer"
1598
+ },
1599
+ {
1600
+ "permission": "quotes.list",
1601
+ "effect": "allow",
1602
+ "role": "owner",
1603
+ "to": {
1604
+ "kind": "role",
1605
+ "role": "owner",
1606
+ "scope": "organization"
1607
+ },
1608
+ "scope": "organization"
1609
+ },
1610
+ {
1611
+ "permission": "quotes.list",
1612
+ "effect": "allow",
1613
+ "role": null,
1614
+ "to": {
1615
+ "kind": "relation",
1616
+ "resource": "quotes",
1617
+ "relation": "customer"
1618
+ },
1619
+ "scope": "global"
1620
+ },
1621
+ {
1622
+ "permission": "quotes.read",
1623
+ "effect": "allow",
1624
+ "role": "admin",
1625
+ "to": {
1626
+ "kind": "role",
1627
+ "role": "admin",
1628
+ "scope": "organization"
1629
+ },
1630
+ "scope": "organization"
1631
+ },
1632
+ {
1633
+ "permission": "quotes.read",
1634
+ "effect": "allow",
1635
+ "role": "contact",
1636
+ "to": {
1637
+ "kind": "role",
1638
+ "role": "contact",
1639
+ "scope": "customer"
1640
+ },
1641
+ "scope": "customer"
1642
+ },
1643
+ {
1644
+ "permission": "quotes.read",
1645
+ "effect": "allow",
1646
+ "role": "guest",
1647
+ "to": {
1648
+ "kind": "role",
1649
+ "role": "guest",
1650
+ "scope": { "resource": "quotes" }
1651
+ },
1652
+ "scope": { "resource": "quotes" }
1653
+ },
1654
+ {
1655
+ "permission": "quotes.read",
1656
+ "effect": "allow",
1657
+ "role": "owner",
1658
+ "to": {
1659
+ "kind": "role",
1660
+ "role": "owner",
1661
+ "scope": "organization"
1662
+ },
1663
+ "scope": "organization"
1664
+ },
313
1665
  {
314
- "key": "contact",
315
- "on": "customer",
316
- "assignable": false
1666
+ "permission": "quotes.send",
1667
+ "effect": "allow",
1668
+ "role": "owner",
1669
+ "to": {
1670
+ "kind": "role",
1671
+ "role": "owner",
1672
+ "scope": "organization"
1673
+ },
1674
+ "scope": "organization",
1675
+ "where": {
1676
+ "op": "eq",
1677
+ "field": "status",
1678
+ "value": "draft"
1679
+ }
317
1680
  },
318
1681
  {
319
- "key": "guest",
320
- "on": "resource",
321
- "assignable": true
1682
+ "permission": "quotes.update",
1683
+ "effect": "allow",
1684
+ "role": "admin",
1685
+ "to": {
1686
+ "kind": "role",
1687
+ "role": "admin",
1688
+ "scope": "organization"
1689
+ },
1690
+ "scope": "organization"
322
1691
  },
323
1692
  {
324
- "key": "member",
325
- "on": "organization",
326
- "assignable": true
1693
+ "permission": "quotes.update",
1694
+ "effect": "allow",
1695
+ "role": "owner",
1696
+ "to": {
1697
+ "kind": "role",
1698
+ "role": "owner",
1699
+ "scope": "organization"
1700
+ },
1701
+ "scope": "organization"
327
1702
  },
328
1703
  {
329
- "key": "owner",
330
- "on": "organization",
331
- "assignable": true,
332
- "min": 1
333
- }
334
- ],
335
- grants: [
1704
+ "permission": "relations.manage",
1705
+ "effect": "allow",
1706
+ "role": "owner",
1707
+ "to": {
1708
+ "kind": "role",
1709
+ "role": "owner",
1710
+ "scope": "organization"
1711
+ },
1712
+ "scope": "organization"
1713
+ },
336
1714
  {
337
- "permission": "audit.read",
1715
+ "permission": "relations.read",
338
1716
  "effect": "allow",
339
1717
  "role": "owner",
340
1718
  "to": {
@@ -345,7 +1723,7 @@ var better_supabase_catalog_default = {
345
1723
  "scope": "organization"
346
1724
  },
347
1725
  {
348
- "permission": "audit.revert",
1726
+ "permission": "roles.manage",
349
1727
  "effect": "allow",
350
1728
  "role": "owner",
351
1729
  "to": {
@@ -356,18 +1734,18 @@ var better_supabase_catalog_default = {
356
1734
  "scope": "organization"
357
1735
  },
358
1736
  {
359
- "permission": "quotes.list",
1737
+ "permission": "service_accounts.manage",
360
1738
  "effect": "allow",
361
- "role": "contact",
1739
+ "role": "owner",
362
1740
  "to": {
363
1741
  "kind": "role",
364
- "role": "contact",
365
- "scope": "customer"
1742
+ "role": "owner",
1743
+ "scope": "organization"
366
1744
  },
367
- "scope": "customer"
1745
+ "scope": "organization"
368
1746
  },
369
1747
  {
370
- "permission": "quotes.list",
1748
+ "permission": "service_accounts.read",
371
1749
  "effect": "allow",
372
1750
  "role": "owner",
373
1751
  "to": {
@@ -378,29 +1756,29 @@ var better_supabase_catalog_default = {
378
1756
  "scope": "organization"
379
1757
  },
380
1758
  {
381
- "permission": "quotes.read",
1759
+ "permission": "settings.manage",
382
1760
  "effect": "allow",
383
- "role": "contact",
1761
+ "role": "owner",
384
1762
  "to": {
385
1763
  "kind": "role",
386
- "role": "contact",
387
- "scope": "customer"
1764
+ "role": "owner",
1765
+ "scope": "organization"
388
1766
  },
389
- "scope": "customer"
1767
+ "scope": "organization"
390
1768
  },
391
1769
  {
392
- "permission": "quotes.read",
1770
+ "permission": "settings.read",
393
1771
  "effect": "allow",
394
- "role": "guest",
1772
+ "role": "admin",
395
1773
  "to": {
396
1774
  "kind": "role",
397
- "role": "guest",
398
- "scope": { "resource": "quotes" }
1775
+ "role": "admin",
1776
+ "scope": "organization"
399
1777
  },
400
- "scope": { "resource": "quotes" }
1778
+ "scope": "organization"
401
1779
  },
402
1780
  {
403
- "permission": "quotes.read",
1781
+ "permission": "settings.read",
404
1782
  "effect": "allow",
405
1783
  "role": "owner",
406
1784
  "to": {
@@ -411,7 +1789,18 @@ var better_supabase_catalog_default = {
411
1789
  "scope": "organization"
412
1790
  },
413
1791
  {
414
- "permission": "quotes.update",
1792
+ "permission": "settings.update",
1793
+ "effect": "allow",
1794
+ "role": "admin",
1795
+ "to": {
1796
+ "kind": "role",
1797
+ "role": "admin",
1798
+ "scope": "organization"
1799
+ },
1800
+ "scope": "organization"
1801
+ },
1802
+ {
1803
+ "permission": "settings.update",
415
1804
  "effect": "allow",
416
1805
  "role": "owner",
417
1806
  "to": {
@@ -422,7 +1811,7 @@ var better_supabase_catalog_default = {
422
1811
  "scope": "organization"
423
1812
  },
424
1813
  {
425
- "permission": "roles.manage",
1814
+ "permission": "sso.manage",
426
1815
  "effect": "allow",
427
1816
  "role": "owner",
428
1817
  "to": {
@@ -432,6 +1821,17 @@ var better_supabase_catalog_default = {
432
1821
  },
433
1822
  "scope": "organization"
434
1823
  },
1824
+ {
1825
+ "permission": "staff.list",
1826
+ "effect": "allow",
1827
+ "role": "admin",
1828
+ "to": {
1829
+ "kind": "role",
1830
+ "role": "admin",
1831
+ "scope": "organization"
1832
+ },
1833
+ "scope": "organization"
1834
+ },
435
1835
  {
436
1836
  "permission": "staff.list",
437
1837
  "effect": "allow",
@@ -454,6 +1854,17 @@ var better_supabase_catalog_default = {
454
1854
  },
455
1855
  "scope": "organization"
456
1856
  },
1857
+ {
1858
+ "permission": "staff.read",
1859
+ "effect": "allow",
1860
+ "role": "admin",
1861
+ "to": {
1862
+ "kind": "role",
1863
+ "role": "admin",
1864
+ "scope": "organization"
1865
+ },
1866
+ "scope": "organization"
1867
+ },
457
1868
  {
458
1869
  "permission": "staff.read",
459
1870
  "effect": "allow",
@@ -475,6 +1886,83 @@ var better_supabase_catalog_default = {
475
1886
  "scope": "organization"
476
1887
  },
477
1888
  "scope": "organization"
1889
+ },
1890
+ {
1891
+ "permission": "teams.manage",
1892
+ "effect": "allow",
1893
+ "role": "admin",
1894
+ "to": {
1895
+ "kind": "role",
1896
+ "role": "admin",
1897
+ "scope": "organization"
1898
+ },
1899
+ "scope": "organization"
1900
+ },
1901
+ {
1902
+ "permission": "teams.manage",
1903
+ "effect": "allow",
1904
+ "role": "owner",
1905
+ "to": {
1906
+ "kind": "role",
1907
+ "role": "owner",
1908
+ "scope": "organization"
1909
+ },
1910
+ "scope": "organization"
1911
+ },
1912
+ {
1913
+ "permission": "teams.read",
1914
+ "effect": "allow",
1915
+ "role": "admin",
1916
+ "to": {
1917
+ "kind": "role",
1918
+ "role": "admin",
1919
+ "scope": "organization"
1920
+ },
1921
+ "scope": "organization"
1922
+ },
1923
+ {
1924
+ "permission": "teams.read",
1925
+ "effect": "allow",
1926
+ "role": "lead",
1927
+ "to": {
1928
+ "kind": "role",
1929
+ "role": "lead",
1930
+ "scope": "team"
1931
+ },
1932
+ "scope": "team"
1933
+ },
1934
+ {
1935
+ "permission": "teams.read",
1936
+ "effect": "allow",
1937
+ "role": "owner",
1938
+ "to": {
1939
+ "kind": "role",
1940
+ "role": "owner",
1941
+ "scope": "organization"
1942
+ },
1943
+ "scope": "organization"
1944
+ },
1945
+ {
1946
+ "permission": "usage.read",
1947
+ "effect": "allow",
1948
+ "role": "owner",
1949
+ "to": {
1950
+ "kind": "role",
1951
+ "role": "owner",
1952
+ "scope": "organization"
1953
+ },
1954
+ "scope": "organization"
1955
+ },
1956
+ {
1957
+ "permission": "usage.record",
1958
+ "effect": "allow",
1959
+ "role": "owner",
1960
+ "to": {
1961
+ "kind": "role",
1962
+ "role": "owner",
1963
+ "scope": "organization"
1964
+ },
1965
+ "scope": "organization"
478
1966
  }
479
1967
  ],
480
1968
  delegations: [{
@@ -485,8 +1973,12 @@ var better_supabase_catalog_default = {
485
1973
  },
486
1974
  "to": { "kind": "agent" },
487
1975
  "permissions": [
1976
+ "quotes.approve",
1977
+ "quotes.create",
1978
+ "quotes.delete",
488
1979
  "quotes.list",
489
1980
  "quotes.read",
1981
+ "quotes.send",
490
1982
  "quotes.update"
491
1983
  ]
492
1984
  }, {
@@ -497,8 +1989,12 @@ var better_supabase_catalog_default = {
497
1989
  },
498
1990
  "to": { "kind": "support" },
499
1991
  "permissions": [
1992
+ "quotes.approve",
1993
+ "quotes.create",
1994
+ "quotes.delete",
500
1995
  "quotes.list",
501
1996
  "quotes.read",
1997
+ "quotes.send",
502
1998
  "quotes.update"
503
1999
  ]
504
2000
  }]
@@ -521,6 +2017,9 @@ var better_supabase_manifest_default = {
521
2017
  "permitted_organization_ids",
522
2018
  "member_organization_ids",
523
2019
  "member_organization_ids_for",
2020
+ "permitted_team_ids",
2021
+ "member_team_ids",
2022
+ "member_team_ids_for",
524
2023
  "permitted_customer_ids",
525
2024
  "member_customer_ids",
526
2025
  "member_customer_ids_for"
@@ -552,6 +2051,11 @@ var better_supabase_manifest_default = {
552
2051
  "source": "permdock",
553
2052
  "budget": false
554
2053
  },
2054
+ {
2055
+ "name": "suspended_in",
2056
+ "source": "permdock",
2057
+ "budget": false
2058
+ },
555
2059
  {
556
2060
  "name": "tenant_id",
557
2061
  "source": "permdock",
@@ -608,14 +2112,22 @@ var better_supabase_manifest_default = {
608
2112
  "schema": "permdock",
609
2113
  "mode": "database",
610
2114
  "tenantClaim": "tenant_id",
611
- "scopes": [{
612
- "name": "organization",
613
- "type": "uuid"
614
- }, {
615
- "name": "customer",
616
- "type": "uuid",
617
- "within": "organization"
618
- }],
2115
+ "scopes": [
2116
+ {
2117
+ "name": "organization",
2118
+ "type": "uuid"
2119
+ },
2120
+ {
2121
+ "name": "team",
2122
+ "type": "uuid",
2123
+ "within": "organization"
2124
+ },
2125
+ {
2126
+ "name": "customer",
2127
+ "type": "uuid",
2128
+ "within": "organization"
2129
+ }
2130
+ ],
619
2131
  "helpers": [
620
2132
  {
621
2133
  "name": "permdock_has",
@@ -641,6 +2153,24 @@ var better_supabase_manifest_default = {
641
2153
  "returns": "setof uuid",
642
2154
  "execute": ["supabase_auth_admin"]
643
2155
  },
2156
+ {
2157
+ "name": "permitted_team_ids",
2158
+ "args": "p_grant text",
2159
+ "returns": "setof uuid",
2160
+ "execute": ["authenticated"]
2161
+ },
2162
+ {
2163
+ "name": "member_team_ids",
2164
+ "args": "",
2165
+ "returns": "setof uuid",
2166
+ "execute": ["authenticated"]
2167
+ },
2168
+ {
2169
+ "name": "member_team_ids_for",
2170
+ "args": "p_user uuid, p_active text",
2171
+ "returns": "setof uuid",
2172
+ "execute": ["supabase_auth_admin"]
2173
+ },
644
2174
  {
645
2175
  "name": "permitted_customer_ids",
646
2176
  "args": "p_grant text",
@@ -683,6 +2213,12 @@ var better_supabase_manifest_default = {
683
2213
  "returns": "jsonb",
684
2214
  "execute": ["authenticated"]
685
2215
  },
2216
+ {
2217
+ "name": "permdock_api_key_allows",
2218
+ "args": "p_grant text",
2219
+ "returns": "boolean",
2220
+ "execute": ["authenticated"]
2221
+ },
686
2222
  {
687
2223
  "name": "permdock_actor_may_write",
688
2224
  "args": "",
@@ -701,6 +2237,12 @@ var better_supabase_manifest_default = {
701
2237
  "returns": "setof uuid",
702
2238
  "execute": ["authenticated"]
703
2239
  },
2240
+ {
2241
+ "name": "permdock_approver_request_ids",
2242
+ "args": "p_requests jsonb, p_kinds jsonb, p_current boolean",
2243
+ "returns": "setof text",
2244
+ "execute": ["authenticated"]
2245
+ },
704
2246
  {
705
2247
  "name": "permdock_has_for",
706
2248
  "args": "p_user uuid, p_grant text",
@@ -713,6 +2255,12 @@ var better_supabase_manifest_default = {
713
2255
  "returns": "setof uuid",
714
2256
  "execute": []
715
2257
  },
2258
+ {
2259
+ "name": "permitted_team_ids_for",
2260
+ "args": "p_user uuid, p_grant text",
2261
+ "returns": "setof uuid",
2262
+ "execute": []
2263
+ },
716
2264
  {
717
2265
  "name": "permitted_customer_ids_for",
718
2266
  "args": "p_user uuid, p_grant text",
@@ -725,6 +2273,12 @@ var better_supabase_manifest_default = {
725
2273
  "returns": "setof text",
726
2274
  "execute": []
727
2275
  },
2276
+ {
2277
+ "name": "permitted_team_permission_keys_for",
2278
+ "args": "p_user uuid, p_id uuid",
2279
+ "returns": "setof text",
2280
+ "execute": []
2281
+ },
728
2282
  {
729
2283
  "name": "permitted_customer_permission_keys_for",
730
2284
  "args": "p_user uuid, p_id uuid",
@@ -782,6 +2336,20 @@ var better_supabase_manifest_default = {
782
2336
  "user": { "column": "user_id" },
783
2337
  "role": { "column": "role" }
784
2338
  },
2339
+ "suspension": { "scopes": { "organization": {
2340
+ "table": "public.organizations",
2341
+ "id": "id",
2342
+ "status": "status",
2343
+ "active": ["active"]
2344
+ } } },
2345
+ "assignments": { "tables": ["better_supabase.invitations"] },
2346
+ "apiKeys": {
2347
+ "claim": "api_key",
2348
+ "scopes": "scopes",
2349
+ "tenant": "tenant",
2350
+ "roles": "roles",
2351
+ "serviceRoles": []
2352
+ },
785
2353
  "tableReads": [
786
2354
  {
787
2355
  "table": "public.contacts",
@@ -819,11 +2387,17 @@ var better_supabase_manifest_default = {
819
2387
  "rules": ["condition"],
820
2388
  "reason": "policy organizations_public_read in supabase/schemas/public/tables/organizations.sql is a row condition: it calls none and reads no column, which no tenant check of permdock.permitted_organization_ids_by_permission covers"
821
2389
  },
2390
+ {
2391
+ "table": "public.quote_overviews",
2392
+ "share": "tenant",
2393
+ "column": "organization_id",
2394
+ "permissions": ["quotes.list"]
2395
+ },
822
2396
  {
823
2397
  "table": "public.quotes",
824
2398
  "share": "row",
825
2399
  "rules": ["condition"],
826
- "reason": "policy quotes_select in supabase/schemas/public/policies/permdock.sql is a row condition: it calls permdock.permitted_organization_ids(), permdock.permitted_customer_ids() and reads column organization_id, customer_id, which no tenant check of permdock.permitted_organization_ids_by_permission covers"
2400
+ "reason": "policy quotes_select in supabase/schemas/public/policies/permdock.sql is a row condition: it calls permdock.permitted_organization_ids(), permdock.permitted_customer_ids(), permdock.permdock_api_key_allows(), permdock.member_customer_ids() and reads column organization_id, customer_id, which no tenant check of permdock.permitted_organization_ids_by_permission covers"
827
2401
  },
828
2402
  {
829
2403
  "table": "public.role_permissions",
@@ -845,7 +2419,11 @@ var better_supabase_manifest_default = {
845
2419
  "reason": "policy staff_select in supabase/schemas/public/policies/permdock.sql uses permdock.permitted_organization_ids inside a larger expression, not as \"<column> in (select permdock.permitted_organization_ids('<key>'))\"; key staff.list: every grant of it is unconditional; key staff.read: every grant of it is unconditional"
846
2420
  }
847
2421
  ],
848
- "sharedFunctions": [],
2422
+ "sharedFunctions": [{
2423
+ "function": "public.quotes_overview_payload",
2424
+ "tables": ["public.quote_overviews"],
2425
+ "permissions": ["quotes.list"]
2426
+ }],
849
2427
  "tenantPureHelpers": [{
850
2428
  "name": "permdock.permdock_organization_has",
851
2429
  "keyArgument": "p_grant",
@@ -897,6 +2475,7 @@ var better_supabase_manifest_default = {
897
2475
  "tenant": "tenant_id",
898
2476
  "role": "user_role"
899
2477
  },
2478
+ "teamScope": "team",
900
2479
  "scopes": {
901
2480
  "organization": {
902
2481
  "permittedIds": "permitted_organization_ids",
@@ -905,6 +2484,14 @@ var better_supabase_manifest_default = {
905
2484
  "memberIdsFor": "member_organization_ids_for",
906
2485
  "permittedUsers": "permitted_organization_users"
907
2486
  },
2487
+ "team": {
2488
+ "permittedIds": "permitted_team_ids",
2489
+ "permittedIdsFor": "permitted_team_ids_for",
2490
+ "memberIds": "member_team_ids",
2491
+ "memberIdsFor": "member_team_ids_for",
2492
+ "memberIdsOf": "member_team_ids_of",
2493
+ "permittedUsers": "permitted_team_users"
2494
+ },
908
2495
  "customer": {
909
2496
  "permittedIds": "permitted_customer_ids",
910
2497
  "permittedIdsFor": "permitted_customer_ids_for",
@@ -918,7 +2505,11 @@ var better_supabase_manifest_default = {
918
2505
  "quotes": { "table": "quotes" }
919
2506
  }
920
2507
  },
921
- fixtureRoles: ["member", "owner"],
2508
+ fixtureRoles: [
2509
+ "admin",
2510
+ "member",
2511
+ "owner"
2512
+ ],
922
2513
  managementApi: {
923
2514
  "hook_custom_access_token_enabled": true,
924
2515
  "hook_custom_access_token_uri": "pg-functions://postgres/permdock/custom_access_token_hook",